n8n-workflow
Advanced tools
Comparing version 0.31.0 to 0.32.0
@@ -6,2 +6,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
__export(require("./Interfaces")); | ||
__export(require("./Workflow")); | ||
@@ -8,0 +9,0 @@ __export(require("./WorkflowDataProxy")); |
import { Workflow } from './Workflow'; | ||
import { WorkflowHooks } from './WorkflowHooks'; | ||
import * as express from 'express'; | ||
export declare type IAllExecuteFunctions = IExecuteFunctions | IExecuteSingleFunctions | IHookFunctions | ILoadOptionsFunctions | IPollFunctions | ITriggerFunctions | IWebhookFunctions; | ||
export interface IBinaryData { | ||
@@ -24,2 +25,15 @@ [key: string]: string | undefined; | ||
} | ||
export declare abstract class ICredentials { | ||
name: string; | ||
type: string; | ||
data: string | undefined; | ||
nodesAccess: ICredentialNodeAccess[]; | ||
constructor(name: string, type: string, nodesAccess: ICredentialNodeAccess[], data?: string); | ||
abstract getData(encryptionKey: string, nodeType?: string): ICredentialDataDecryptedObject; | ||
abstract getDataKey(key: string, encryptionKey: string, nodeType?: string): CredentialInformation; | ||
abstract getDataToSave(): ICredentialsEncrypted; | ||
abstract hasNodeAccess(nodeType: string): boolean; | ||
abstract setData(data: ICredentialDataDecryptedObject, encryptionKey: string): void; | ||
abstract setDataKey(key: string, data: CredentialInformation, encryptionKey: string): void; | ||
} | ||
export interface ICredentialNodeAccess { | ||
@@ -42,6 +56,16 @@ nodeType: string; | ||
} | ||
export declare abstract class ICredentialsHelper { | ||
encryptionKey: string; | ||
workflowCredentials: IWorkflowCredentials; | ||
constructor(workflowCredentials: IWorkflowCredentials, encryptionKey: string); | ||
abstract getCredentials(name: string, type: string): ICredentials; | ||
abstract getDecrypted(name: string, type: string): ICredentialDataDecryptedObject; | ||
abstract updateCredentials(name: string, type: string, data: ICredentialDataDecryptedObject): Promise<void>; | ||
} | ||
export interface ICredentialType { | ||
name: string; | ||
displayName: string; | ||
extends?: string[]; | ||
properties: INodeProperties[]; | ||
__overwrittenProperties?: string[]; | ||
} | ||
@@ -63,3 +87,3 @@ export interface ICredentialTypes { | ||
} | ||
export declare type CredentialInformation = string | number | boolean; | ||
export declare type CredentialInformation = string | number | boolean | IDataObject; | ||
export interface ICredentialDataDecryptedObject { | ||
@@ -269,3 +293,3 @@ [key: string]: CredentialInformation; | ||
} | ||
export declare type NodePropertyTypes = 'boolean' | 'collection' | 'color' | 'dateTime' | 'fixedCollection' | 'json' | 'multiOptions' | 'number' | 'options' | 'string'; | ||
export declare type NodePropertyTypes = 'boolean' | 'collection' | 'color' | 'dateTime' | 'fixedCollection' | 'hidden' | 'json' | 'multiOptions' | 'number' | 'options' | 'string'; | ||
export declare type EditorTypes = 'code'; | ||
@@ -528,2 +552,3 @@ export interface INodePropertyTypeOptions { | ||
credentials: IWorkflowCredentials; | ||
credentialsHelper: ICredentialsHelper; | ||
encryptionKey: string; | ||
@@ -530,0 +555,0 @@ executeWorkflow: (workflowInfo: IExecuteWorkflowInfo, additionalData: IWorkflowExecuteAdditionalData, inputData?: INodeExecutionData[]) => Promise<any>; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
class ICredentials { | ||
constructor(name, type, nodesAccess, data) { | ||
this.name = name; | ||
this.type = type; | ||
this.nodesAccess = nodesAccess; | ||
this.data = data; | ||
} | ||
} | ||
exports.ICredentials = ICredentials; | ||
class ICredentialsHelper { | ||
constructor(workflowCredentials, encryptionKey) { | ||
this.encryptionKey = encryptionKey; | ||
this.workflowCredentials = workflowCredentials; | ||
} | ||
} | ||
exports.ICredentialsHelper = ICredentialsHelper; | ||
//# sourceMappingURL=Interfaces.js.map |
@@ -113,1 +113,2 @@ import { IContextObject, INodeCredentialDescription, INode, INodeExecutionData, INodeIssues, INodeParameters, INodeProperties, INodeType, IParameterDependencies, IRunExecutionData, IWebhookData, IWorkflowExecuteAdditionalData, NodeParameterValue } from './Interfaces'; | ||
export declare function mergeIssues(destination: INodeIssues, source: INodeIssues | null): void; | ||
export declare function mergeNodeProperties(mainProperties: INodeProperties[], addProperties: INodeProperties[]): void; |
@@ -746,2 +746,15 @@ "use strict"; | ||
exports.mergeIssues = mergeIssues; | ||
function mergeNodeProperties(mainProperties, addProperties) { | ||
let existingIndex; | ||
for (const property of addProperties) { | ||
existingIndex = mainProperties.findIndex(element => element.name === property.name); | ||
if (existingIndex === -1) { | ||
mainProperties.push(property); | ||
} | ||
else { | ||
mainProperties[existingIndex] = property; | ||
} | ||
} | ||
} | ||
exports.mergeNodeProperties = mergeNodeProperties; | ||
//# sourceMappingURL=NodeHelpers.js.map |
{ | ||
"name": "n8n-workflow", | ||
"version": "0.31.0", | ||
"version": "0.32.0", | ||
"description": "Workflow base code of n8n", | ||
@@ -5,0 +5,0 @@ "license": "SEE LICENSE IN LICENSE.md", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
411953
6566