index.ts
1.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import { EnrichmentCategoryComponentEnum } from '../../../enum/category';
import { useCreateNodeKey } from '../../../hook/useCreateNodeKey';
import type { NodeItemConfigType } from '../../../types/node';
import { RuleNodeTypeEnum } from '../../index.type';
const keys = useCreateNodeKey(EnrichmentCategoryComponentEnum.TENANT_DETAILS);
export interface TenantDetailsDataType {
someConfiguration?: Recordable;
}
export const TenantDetailsConfig: NodeItemConfigType = {
...keys,
clazz: 'org.thingsboard.rule.engine.metadata.TbGetTenantDetailsNode',
categoryType: RuleNodeTypeEnum.ENRICHMENT,
name: 'tenant details',
configurationDescriptor: {
nodeDefinition: {
details:
'If checkbox: <b>Add selected details to the message metadata</b> is selected, existing fields will be added to the message metadata instead of message data.<br><br><b>Note:</b> only Device, Asset, and Entity View type are allowed.<br><br>If the originator of the message is not assigned to Tenant, or originator type is not supported - Message will be forwarded to <b>Failure</b> chain, otherwise, <b>Success</b> chain will be used.',
description: 'Adds fields from Tenant details to the message body or metadata',
inEnabled: true,
outEnabled: true,
relationTypes: ['Success', 'Failure'],
customRelations: false,
ruleChainNode: false,
defaultConfiguration: {
detailsList: [],
addToMetadata: false,
},
uiResources: ['static/rulenode/rulenode-core-config.js'],
configDirective: 'tbEnrichmentNodeEntityDetailsConfig',
icon: '',
iconUrl: '',
docUrl: '',
},
},
};