LucidCardIntegration


Constructors

new LucidCardIntegration()

new LucidCardIntegration(client): LucidCardIntegration

Parameters

ParameterType
clientEditorClient

Returns

LucidCardIntegration


Properties

addCard?

optional addCard: object;

If specified, allow the user to create new cards and convert other shapes to cards

createCardData()

createCardData: (input) => Promise<object>;

Given the values entered by the user into input fields, create a new data record to represent the
created card, and return information about that record.

Parameters
ParameterType
inputMap<string, SerializedFieldType>
Returns

Promise<object>

collection
collection: CollectionProxy;
primaryKey
primaryKey: string;

getInputFields()

getInputFields: (inputSoFar) => Promise<ExtensionCardFieldDefinition[]>;

Given the values entered by the user so far into input fields, return the list of all input fields
to display in the create-card form.

Parameters
ParameterType
inputSoFarMap<string, SerializedFieldType>
Returns

Promise<ExtensionCardFieldDefinition[]>


client

protected readonly client: EditorClient;

dataConnectorName

abstract dataConnectorName: string;

The name of the data connector associated with the card integration.


dependencyMappingPhrases?

optional dependencyMappingPhrases: DependencyMappingPhrasesType;

If specified, the text phrases to show in the dependency mapping UI.
If not specified, dependency mapping for this integration uses the default fallback phrases.


fieldConfiguration

abstract fieldConfiguration: object;

fieldValueSearchCallbacks?

optional fieldValueSearchCallbacks: Map<string, string>;

Specify callbacks for searching for legal values for the given fields.

For example, a Task collection may have an Assignee field that references a User collection,
but you don't import all the users in the entire source data set. Here, you can provide a way
to search for legal values for the Assignee field, similar to the ExtensionCardFieldDefinition.search
functionality.

Register a search callback using LucidCardIntegrationRegistry.registerFieldSearchCallback, then set
the returned string as a value in this Map. The inputSoFar parameter passed to the callback will
be all the current field values on the item being edited.

getAllFields()

getAllFields: (dataSource) => Promise<string[]>;

Callback to provide a list of all supported field names for the card integration.

Parameters
ParameterType
dataSourceDataSourceProxy
Returns

Promise<string[]>

onSelectedFieldsChange()?

optional onSelectedFieldsChange: (dataSource, selectedFields) => Promise<void>;

Callback that handled changes in the fields the user wants to be displayed in the card integration.
If this callback is not provided then the user will not be shown the modal to configure fields.

Parameters
ParameterType
dataSourceDataSourceProxy
selectedFieldsstring[]
Returns

Promise<void>


getDefaultConfig()

abstract getDefaultConfig: (dataSource) => Promise<CardIntegrationConfig>;

Provide the default configuration for a new import

Parameters

ParameterType
dataSourceDataSourceProxy

Returns

Promise<CardIntegrationConfig>


iconConfiguration?

optional iconConfiguration: object;

lightIconUrl?

optional lightIconUrl: string;

Optional. URL for an alternate light icon to show in colored components where the primary icon may appear too dark.
If not provided, the primaryIconUrl will be used. Should be at least 24x24.

primaryIconUrl

primaryIconUrl: string;

URL for the primary icon to display in most components, usually on a white background.
Should be at least 24x24.


iconUrl

abstract iconUrl: string;

Deprecated

Use iconConfiguration.primaryIconUrl.
URL for an icon to display in toolbars, etc. Should be at least 24x24.


importModal?

optional importModal: LucidCardIntegrationCustomImportModal | LucidCardIntegrationStandardImportModal;

This allows the user to import cards by selecting items from within a modal. You can either create a custom
import modal or the standard import modal can be used.


itemLabel

abstract itemLabel: string;

Label used to identify one card worth of data, e.g. "Jira task"


itemsLabel

abstract itemsLabel: string;

Label used to identify multiple cards worth of data, e.g. "Jira tasks"


label

abstract label: string;

Label used to identify the integration, e.g. "Jira", which will be used in menu items, etc.
Should be unique within any given extension.


searchUserByName?

optional searchUserByName: boolean;

If we are only able to search by name and not email in the card integration (ex: for JDC)


showDependencyMapping?

optional showDependencyMapping: boolean;

showIntro()?

optional showIntro: () => void;

Deprecated

Use AuthorizationFlowHandlerRegistry.registerAuthorizationFlowHandler.
WARNING: Currently unused and does nothing.

Returns

void


textStyle?

optional textStyle: Partial<TextStyle>;

The default text style to use on cards created as part of this integration.
These can be overridden by values in getDefaultConfig().fieldStyles for
individual fields that should have different styles.


userSearchCallback?

optional userSearchCallback: string;

This is used to search for users in the card integration. It returns an additional email field of the user if available.


Methods

showCardImport()

showCardImport(name): ImportCardsResult

Parameters

ParameterType
namestring

Returns

ImportCardsResult