mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
feat(core): Display conditions in displayOptions (no-changelog) (#7888)
This commit is contained in:
@@ -1160,7 +1160,31 @@ export type FilterTypeOptions = Partial<{
|
||||
typeValidation: 'strict' | 'loose' | {}; // default = strict, `| {}` is a TypeScript trick to allow custom strings, but still give autocomplete
|
||||
}>;
|
||||
|
||||
export type DisplayCondition =
|
||||
| { _cnd: { eq: NodeParameterValue } }
|
||||
| { _cnd: { not: NodeParameterValue } }
|
||||
| { _cnd: { gte: number | string } }
|
||||
| { _cnd: { lte: number | string } }
|
||||
| { _cnd: { gt: number | string } }
|
||||
| { _cnd: { lt: number | string } }
|
||||
| { _cnd: { between: { from: number | string; to: number | string } } }
|
||||
| { _cnd: { startsWith: string } }
|
||||
| { _cnd: { endsWith: string } }
|
||||
| { _cnd: { includes: string } }
|
||||
| { _cnd: { regex: string } };
|
||||
|
||||
export interface IDisplayOptions {
|
||||
hide?: {
|
||||
[key: string]: Array<NodeParameterValue | DisplayCondition> | undefined;
|
||||
};
|
||||
show?: {
|
||||
'@version'?: Array<number | DisplayCondition>;
|
||||
[key: string]: Array<NodeParameterValue | DisplayCondition> | undefined;
|
||||
};
|
||||
|
||||
hideOnCloud?: boolean;
|
||||
}
|
||||
export interface ICredentialsDisplayOptions {
|
||||
hide?: {
|
||||
[key: string]: NodeParameterValue[] | undefined;
|
||||
};
|
||||
@@ -1402,7 +1426,7 @@ export interface INodeCredentialTestRequest {
|
||||
export interface INodeCredentialDescription {
|
||||
name: string;
|
||||
required?: boolean;
|
||||
displayOptions?: IDisplayOptions;
|
||||
displayOptions?: ICredentialsDisplayOptions;
|
||||
testedBy?: ICredentialTestRequest | string; // Name of a function inside `loadOptions.credentialTest`
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user