2021-02-20 04:51:06 -08:00
/* eslint-disable @typescript-eslint/no-explicit-any */
2023-07-31 02:00:48 -07:00
2024-09-18 00:19:33 -07:00
import type { CallbackManager as CallbackManagerLC } from '@langchain/core/callbacks/manager' ;
import type { AxiosProxyConfig } from 'axios' ;
2022-11-23 07:20:28 -08:00
import type * as express from 'express' ;
2023-07-19 03:54:31 -07:00
import type FormData from 'form-data' ;
2023-10-20 04:43:55 -07:00
import type { PathLike } from 'fs' ;
2022-10-28 02:24:11 -07:00
import type { IncomingHttpHeaders } from 'http' ;
2024-06-20 07:42:52 -07:00
import type { RequestBodyMatcher } from 'nock' ;
2024-07-04 03:29:44 -07:00
import type { Client as SSHClient } from 'ssh2' ;
2024-09-18 00:19:33 -07:00
import type { Readable } from 'stream' ;
import type { SecureContextOptions } from 'tls' ;
import type { URLSearchParams } from 'url' ;
2022-12-23 09:27:07 -08:00
2023-10-25 07:35:22 -07:00
import type { CODE_EXECUTION_MODES , CODE_LANGUAGES , LOG_LEVELS } from './Constants' ;
2022-09-23 07:14:28 -07:00
import type { IDeferredPromise } from './DeferredPromise' ;
2024-09-18 00:19:33 -07:00
import type { ExecutionCancelledError } from './errors' ;
2023-11-27 06:33:21 -08:00
import type { ExpressionError } from './errors/expression.error' ;
2024-09-18 00:19:33 -07:00
import type { NodeApiError } from './errors/node-api.error' ;
import type { NodeOperationError } from './errors/node-operation.error' ;
2023-11-27 06:33:21 -08:00
import type { WorkflowActivationError } from './errors/workflow-activation.error' ;
import type { WorkflowOperationError } from './errors/workflow-operation.error' ;
2024-09-18 00:19:33 -07:00
import type { ExecutionStatus } from './ExecutionStatus' ;
import type { Workflow } from './Workflow' ;
2023-10-20 04:43:55 -07:00
import type { WorkflowHooks } from './WorkflowHooks' ;
2019-06-23 03:35:23 -07:00
2022-02-05 13:55:43 -08:00
export interface IAdditionalCredentialOptions {
oauth2? : IOAuth2Options ;
credentialsDecrypted? : ICredentialsDecrypted ;
}
2020-01-13 18:46:58 -08:00
export type IAllExecuteFunctions =
| IExecuteFunctions
2022-02-05 13:55:43 -08:00
| IExecutePaginationFunctions
2020-01-13 18:46:58 -08:00
| IExecuteSingleFunctions
| IHookFunctions
| ILoadOptionsFunctions
| IPollFunctions
| ITriggerFunctions
| IWebhookFunctions ;
2023-10-11 03:09:19 -07:00
export type BinaryFileType = 'text' | 'json' | 'image' | 'audio' | 'video' | 'pdf' | 'html' ;
2019-06-23 03:35:23 -07:00
export interface IBinaryData {
2024-05-21 04:19:56 -07:00
[ key : string ] : string | number | undefined ;
2019-06-23 03:35:23 -07:00
data : string ;
mimeType : string ;
2022-11-24 07:54:43 -08:00
fileType? : BinaryFileType ;
2019-06-23 03:35:23 -07:00
fileName? : string ;
2021-03-18 10:13:24 -07:00
directory? : string ;
2019-06-23 03:35:23 -07:00
fileExtension? : string ;
2023-01-04 03:29:56 -08:00
fileSize? : string ; // TODO: change this to number and store the actual value
2021-12-23 13:29:04 -08:00
id? : string ;
2019-06-23 03:35:23 -07:00
}
2022-07-15 01:36:01 -07:00
// All properties in this interface except for
// "includeCredentialsOnRefreshOnBody" will get
// removed once we add the OAuth2 hooks to the
// credentials file.
2020-07-25 10:58:38 -07:00
export interface IOAuth2Options {
includeCredentialsOnRefreshOnBody? : boolean ;
property? : string ;
tokenType? : string ;
2020-09-16 00:16:06 -07:00
keepBearer? : boolean ;
2021-02-21 23:49:00 -08:00
tokenExpiredStatusCode? : number ;
2022-07-15 01:36:01 -07:00
keyToIncludeInAccessTokenHeader? : string ;
2020-07-25 10:58:38 -07:00
}
2019-06-23 03:35:23 -07:00
export interface IConnection {
// The node the connection is to
node : string ;
// The type of the input on destination node (for example "main")
2024-06-03 07:33:20 -07:00
type : NodeConnectionType ;
2019-06-23 03:35:23 -07:00
// The output/input-index of destination node (if node has multiple inputs/outputs of the same type)
index : number ;
}
2022-06-06 00:17:35 -07:00
export type ExecutionError =
2022-09-29 14:02:25 -07:00
| ExpressionError
2022-06-06 00:17:35 -07:00
| WorkflowActivationError
| WorkflowOperationError
2024-07-16 10:25:20 -07:00
| ExecutionCancelledError
2022-06-06 00:17:35 -07:00
| NodeOperationError
| NodeApiError ;
2019-06-23 03:35:23 -07:00
// Get used to gives nodes access to credentials
export interface IGetCredentials {
2021-10-13 15:21:00 -07:00
get ( type : string , id : string | null ) : Promise < ICredentialsEncrypted > ;
2019-06-23 03:35:23 -07:00
}
2024-08-27 06:23:58 -07:00
export abstract class ICredentials < T extends object = ICredentialDataDecryptedObject > {
2021-10-13 15:21:00 -07:00
id? : string ;
2020-01-25 23:48:38 -08:00
name : string ;
2021-08-29 11:58:11 -07:00
2020-01-25 23:48:38 -08:00
type : string ;
2021-08-29 11:58:11 -07:00
2020-01-25 23:48:38 -08:00
data : string | undefined ;
2021-08-29 11:58:11 -07:00
2024-04-05 04:17:34 -07:00
constructor ( nodeCredentials : INodeCredentialsDetails , type : string , data? : string ) {
2022-09-09 07:34:50 -07:00
this . id = nodeCredentials . id ? ? undefined ;
2021-10-13 15:21:00 -07:00
this . name = nodeCredentials . name ;
2020-01-25 23:48:38 -08:00
this . type = type ;
this . data = data ;
}
2024-08-27 06:23:58 -07:00
abstract getData ( nodeType? : string ) : T ;
2021-08-29 11:58:11 -07:00
2020-01-25 23:48:38 -08:00
abstract getDataToSave ( ) : ICredentialsEncrypted ;
2021-08-29 11:58:11 -07:00
2024-08-27 06:23:58 -07:00
abstract setData ( data : T ) : void ;
2020-01-25 23:48:38 -08:00
}
2022-09-21 01:20:29 -07:00
export interface IUser {
id : string ;
email : string ;
firstName : string ;
lastName : string ;
}
2024-06-10 06:23:06 -07:00
export type ProjectSharingData = {
id : string ;
name : string | null ;
type : 'personal' | 'team' | 'public' ;
createdAt : string ;
updatedAt : string ;
} ;
2024-08-27 06:23:58 -07:00
export interface ICredentialsDecrypted < T extends object = ICredentialDataDecryptedObject > {
2023-01-02 08:42:32 -08:00
id : string ;
2019-06-23 03:35:23 -07:00
name : string ;
type : string ;
2024-08-27 06:23:58 -07:00
data? : T ;
2024-06-10 06:23:06 -07:00
homeProject? : ProjectSharingData ;
sharedWithProjects? : ProjectSharingData [ ] ;
2019-06-23 03:35:23 -07:00
}
export interface ICredentialsEncrypted {
2023-01-02 08:42:32 -08:00
id? : string ;
2019-06-23 03:35:23 -07:00
name : string ;
type : string ;
data? : string ;
}
2021-01-24 04:33:57 -08:00
export interface ICredentialsExpressionResolveValues {
connectionInputData : INodeExecutionData [ ] ;
itemIndex : number ;
node : INode ;
runExecutionData : IRunExecutionData | null ;
runIndex : number ;
workflow : Workflow ;
}
2022-02-05 13:55:43 -08:00
// Simplified options of request library
export interface IRequestOptionsSimplified {
auth ? : {
username : string ;
password : string ;
2023-04-19 04:44:41 -07:00
sendImmediately? : boolean ;
2022-02-05 13:55:43 -08:00
} ;
body : IDataObject ;
headers : IDataObject ;
qs : IDataObject ;
}
2022-06-26 15:55:51 -07:00
export interface IRequestOptionsSimplifiedAuth {
auth ? : {
username : string ;
password : string ;
2023-04-19 04:44:41 -07:00
sendImmediately? : boolean ;
2022-06-26 15:55:51 -07:00
} ;
body? : IDataObject ;
headers? : IDataObject ;
qs? : IDataObject ;
2023-02-01 06:26:13 -08:00
url? : string ;
feat(Elasticsearch Node): Add credential tests, index pipelines and index refresh (#2420)
* 🐛 ES query string not passed to request
* 🔑 Add ES credential test
* ✨ Add ES index pipelines and index refresh
* :hammer: merge fix
* :zap: renamed additional filds as options
* :zap: added ignore ssl to credentials
* :zap: Improvements
* :zap: Improvements
* feat(Redis Node): Add push and pop operations (#3127)
* ✨ Add push and pop operations
* :zap: linter fixes
* :zap: linter fixes
* 🐛 Fix errors and remove overwrite
* 🐛 Remove errant hint
* :zap: Small change
Co-authored-by: Michael Kret <michael.k@radency.com>
Co-authored-by: ricardo <ricardoespinoza105@gmail.com>
* refactor: Telemetry updates (#3529)
* Init unit tests for telemetry
* Update telemetry tests
* Test Workflow execution errored event
* Add new tracking logic in pulse
* cleanup
* interfaces
* Add event_version for Workflow execution count event
* add version_cli in all events
* add user saved credentials event
* update manual wf exec finished, fixes
* improve typings, lint
* add node_graph_string in User clicked execute workflow button event
* add User set node operation or mode event
* Add instance started event in FE
* Add User clicked retry execution button event
* add expression editor event
* add input node type to add node event
* add User stopped workflow execution wvent
* add error message in saved credential event
* update stop execution event
* add execution preflight event
* Remove instance started even tfrom FE, add session started to FE,BE
* improve typing
* remove node_graph as property from all events
* move back from default export
* move psl npm package to cli package
* cr
* update webhook node domain logic
* fix is_valid for User saved credentials event
* fix Expression Editor variable selector event
* add caused_by_credential in preflight event
* undo webhook_domain
* change node_type to full type
* add webhook_domain property in manual execution event (#3680)
* add webhook_domain property in manual execution event
* lint fix
* feat(SpreadsheetFile Node): Allow skipping headers when writing spreadsheets (#3234)
* ⚡ Allow skipping headers when writing spreadsheets
* Fix type on sheet options
* fix(Telegram Node): Fix sending binaryData media (photo, document, video etc.) (#3408)
* fixed send media (photo, document, video etc.) issues on Telegram Node
* fixed send media (photo, document, video etc.) issues on Telegram Node
* file name is optional now
* :zap: lock file and linter fix
* :zap: improvements
* :zap: fixes
* :zap: Improvements
* :zap: Add placeholder to File Name
* :zap: Add error message
* :fire: Remove requestWithAuthentication
* :zap: Fix typo
* :shirt: Fix linting issues
Co-authored-by: Michael Kret <michael.k@radency.com>
Co-authored-by: ricardo <ricardoespinoza105@gmail.com>
* feat(Freshworks CRM Node): Add Search + Lookup functionality (#3131)
* Add fields and Ops for Lookup Search
* Adds Search (Search + Lookup) operations
* :hammer: credentials update
* :hammer: improvements
* :zap: clean up and linter fixes
* :zap: merged search and query, more hints
* :zap: Improvements
* :zap: Add generic type to authentication method
Co-authored-by: Michael Kret <michael.k@radency.com>
Co-authored-by: ricardo <ricardoespinoza105@gmail.com>
* feat(Jira Trigger Node): Add optional query auth for security (#3172)
* ✨ Add query auth for Jira Trigger security
* :zap: small fixes:
* :zap: Response with 403 when invalid query authentication
* :shirt: Fix linting issues
Co-authored-by: Michael Kret <michael.k@radency.com>
Co-authored-by: ricardo <ricardoespinoza105@gmail.com>
* :zap: Changed authentication to use the generic type
Co-authored-by: Michael Kret <michael.k@radency.com>
Co-authored-by: ricardo <ricardoespinoza105@gmail.com>
Co-authored-by: Ahsan Virani <ahsan.virani@gmail.com>
Co-authored-by: Nicholas Penree <nick@penree.com>
Co-authored-by: Taha Sönmez <35905778+tahasonmez@users.noreply.github.com>
Co-authored-by: Jan Thiel <JanThiel@users.noreply.github.com>
Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
2022-07-10 02:00:47 -07:00
skipSslCertificateValidation? : boolean | string ;
2022-06-26 15:55:51 -07:00
}
2022-07-19 01:09:06 -07:00
export interface IHttpRequestHelper {
helpers : { httpRequest : IAllExecuteFunctions [ 'helpers' ] [ 'httpRequest' ] } ;
}
2020-01-25 23:48:38 -08:00
export abstract class ICredentialsHelper {
2022-02-05 13:55:43 -08:00
abstract getParentTypes ( name : string ) : string [ ] ;
abstract authenticate (
credentials : ICredentialDataDecryptedObject ,
typeName : string ,
requestOptions : IHttpRequestOptions | IRequestOptionsSimplified ,
workflow : Workflow ,
node : INode ,
) : Promise < IHttpRequestOptions > ;
2022-07-19 01:09:06 -07:00
abstract preAuthentication (
helpers : IHttpRequestHelper ,
credentials : ICredentialDataDecryptedObject ,
typeName : string ,
node : INode ,
credentialsExpired : boolean ,
) : Promise < ICredentialDataDecryptedObject | undefined > ;
2021-10-13 15:21:00 -07:00
abstract getCredentials (
nodeCredentials : INodeCredentialsDetails ,
type : string ,
) : Promise < ICredentials > ;
2021-08-29 11:58:11 -07:00
2021-08-20 09:57:30 -07:00
abstract getDecrypted (
2023-08-25 01:33:46 -07:00
additionalData : IWorkflowExecuteAdditionalData ,
2021-10-13 15:21:00 -07:00
nodeCredentials : INodeCredentialsDetails ,
2021-08-20 09:57:30 -07:00
type : string ,
mode : WorkflowExecuteMode ,
2024-01-08 01:48:20 -08:00
executeData? : IExecuteData ,
2021-08-20 09:57:30 -07:00
raw? : boolean ,
expressionResolveValues? : ICredentialsExpressionResolveValues ,
) : Promise < ICredentialDataDecryptedObject > ;
2021-08-29 11:58:11 -07:00
2020-01-25 23:48:38 -08:00
abstract updateCredentials (
2021-10-13 15:21:00 -07:00
nodeCredentials : INodeCredentialsDetails ,
2020-01-25 23:48:38 -08:00
type : string ,
data : ICredentialDataDecryptedObject ,
) : Promise < void > ;
2024-06-05 00:25:39 -07:00
abstract getCredentialsProperties ( type : string ) : INodeProperties [ ] ;
2020-01-25 23:48:38 -08:00
}
2022-02-05 13:55:43 -08:00
export interface IAuthenticateBase {
type : string ;
2022-06-26 15:55:51 -07:00
properties :
| {
[ key : string ] : string ;
}
| IRequestOptionsSimplifiedAuth ;
2022-02-05 13:55:43 -08:00
}
2022-06-26 15:55:51 -07:00
export interface IAuthenticateGeneric extends IAuthenticateBase {
type : 'generic' ;
properties : IRequestOptionsSimplifiedAuth ;
2022-02-05 13:55:43 -08:00
}
export type IAuthenticate =
| ( (
credentials : ICredentialDataDecryptedObject ,
requestOptions : IHttpRequestOptions ,
) = > Promise < IHttpRequestOptions > )
2022-06-26 15:55:51 -07:00
| IAuthenticateGeneric ;
2022-02-05 13:55:43 -08:00
export interface IAuthenticateRuleBase {
type : string ;
properties : {
[ key : string ] : string | number ;
} ;
errorMessage? : string ;
}
export interface IAuthenticateRuleResponseCode extends IAuthenticateRuleBase {
type : 'responseCode' ;
properties : {
value : number ;
message : string ;
} ;
}
2022-04-19 03:36:01 -07:00
export interface IAuthenticateRuleResponseSuccessBody extends IAuthenticateRuleBase {
type : 'responseSuccessBody' ;
properties : {
message : string ;
key : string ;
value : any ;
} ;
}
2022-07-20 04:50:16 -07:00
type Override < A extends object , B extends object > = Omit < A , keyof B > & B ;
export namespace DeclarativeRestApiSettings {
// The type below might be extended
// with new options that need to be parsed as expressions
export type HttpRequestOptions = Override <
IHttpRequestOptions ,
{ skipSslCertificateValidation? : string | boolean ; url? : string }
> ;
export type ResultOptions = {
maxResults? : number | string ;
options : HttpRequestOptions ;
paginate? : boolean | string ;
preSend : PreSendAction [ ] ;
postReceive : Array < {
data : {
parameterValue : string | IDataObject | undefined ;
} ;
actions : PostReceiveAction [ ] ;
} > ;
requestOperations? : IN8nRequestOperations ;
} ;
}
2022-02-05 13:55:43 -08:00
export interface ICredentialTestRequest {
2022-07-20 04:50:16 -07:00
request : DeclarativeRestApiSettings.HttpRequestOptions ;
2022-04-19 03:36:01 -07:00
rules? : IAuthenticateRuleResponseCode [ ] | IAuthenticateRuleResponseSuccessBody [ ] ;
2022-02-05 13:55:43 -08:00
}
export interface ICredentialTestRequestData {
nodeType? : INodeType ;
testRequest : ICredentialTestRequest ;
}
2023-11-13 03:11:16 -08:00
type ICredentialHttpRequestNode = {
name : string ;
docsUrl : string ;
2024-08-12 08:49:06 -07:00
hidden? : boolean ;
2023-11-13 03:11:16 -08:00
} & ( { apiBaseUrl : string } | { apiBaseUrlPlaceholder : string } ) ;
2019-06-23 03:35:23 -07:00
export interface ICredentialType {
name : string ;
displayName : string ;
2024-06-27 03:09:43 -07:00
icon? : Icon ;
2024-09-27 03:04:00 -07:00
iconColor? : ThemeIconColor ;
2024-06-06 04:34:30 -07:00
iconUrl? : Themed < string > ;
2020-01-13 18:46:58 -08:00
extends ? : string [ ] ;
2019-06-23 03:35:23 -07:00
properties : INodeProperties [ ] ;
2020-08-17 02:58:36 -07:00
documentationUrl? : string ;
2020-01-25 23:48:38 -08:00
__overwrittenProperties? : string [ ] ;
2022-02-05 13:55:43 -08:00
authenticate? : IAuthenticate ;
2022-07-19 01:09:06 -07:00
preAuthentication ? : (
this : IHttpRequestHelper ,
credentials : ICredentialDataDecryptedObject ,
) = > Promise < IDataObject > ;
2022-02-05 13:55:43 -08:00
test? : ICredentialTestRequest ;
2022-05-24 02:36:19 -07:00
genericAuth? : boolean ;
2023-11-13 03:11:16 -08:00
httpRequestNode? : ICredentialHttpRequestNode ;
2024-09-27 03:04:00 -07:00
supportedNodes? : string [ ] ;
2019-06-23 03:35:23 -07:00
}
export interface ICredentialTypes {
2022-11-23 07:20:28 -08:00
recognizes ( credentialType : string ) : boolean ;
2019-06-23 03:35:23 -07:00
getByName ( credentialType : string ) : ICredentialType ;
2023-11-13 03:11:16 -08:00
getSupportedNodes ( type : string ) : string [ ] ;
2023-01-04 09:16:48 -08:00
getParentTypes ( typeName : string ) : string [ ] ;
2019-06-23 03:35:23 -07:00
}
// The way the credentials get saved in the database (data encrypted)
export interface ICredentialData {
2021-10-13 15:21:00 -07:00
id? : string ;
2019-06-23 03:35:23 -07:00
name : string ;
data : string ; // Contains the access data as encrypted JSON string
}
// The encrypted credentials which the nodes can access
2024-06-10 06:23:06 -07:00
export type CredentialInformation =
| string
| string [ ]
| number
| boolean
| IDataObject
| IDataObject [ ] ;
2019-06-23 03:35:23 -07:00
// The encrypted credentials which the nodes can access
export interface ICredentialDataDecryptedObject {
[ key : string ] : CredentialInformation ;
}
// First array index: The output/input-index (if node has multiple inputs/outputs of the same type)
// Second array index: The different connections (if one node is connected to multiple nodes)
export type NodeInputConnections = IConnection [ ] [ ] ;
2022-06-03 08:25:07 -07:00
export interface INodeConnection {
sourceIndex : number ;
destinationIndex : number ;
}
2019-06-23 03:35:23 -07:00
export interface INodeConnections {
// Input name
[ key : string ] : NodeInputConnections ;
}
export interface IConnections {
// Node name
[ key : string ] : INodeConnections ;
}
export type GenericValue = string | object | number | boolean | undefined | null ;
2023-12-21 05:21:09 -08:00
export type CloseFunction = ( ) = > Promise < void > ;
2019-06-23 03:35:23 -07:00
export interface IDataObject {
[ key : string ] : GenericValue | IDataObject | GenericValue [ ] | IDataObject [ ] ;
}
2021-11-05 09:45:51 -07:00
export type IExecuteResponsePromiseData = IDataObject | IN8nHttpFullResponse ;
2021-09-21 10:38:24 -07:00
export interface INodeTypeNameVersion {
name : string ;
version : number ;
}
2019-12-31 12:19:37 -08:00
export interface IGetExecutePollFunctions {
2021-03-23 11:08:47 -07:00
(
workflow : Workflow ,
node : INode ,
additionalData : IWorkflowExecuteAdditionalData ,
mode : WorkflowExecuteMode ,
activation : WorkflowActivateMode ,
) : IPollFunctions ;
2019-12-31 12:19:37 -08:00
}
2019-08-08 11:38:25 -07:00
export interface IGetExecuteTriggerFunctions {
2021-03-23 11:08:47 -07:00
(
workflow : Workflow ,
node : INode ,
additionalData : IWorkflowExecuteAdditionalData ,
mode : WorkflowExecuteMode ,
activation : WorkflowActivateMode ,
) : ITriggerFunctions ;
2019-08-08 11:38:25 -07:00
}
2022-05-30 03:16:44 -07:00
export interface IRunNodeResponse {
2024-05-13 05:46:02 -07:00
data : INodeExecutionData [ ] [ ] | NodeExecutionOutput | null | undefined ;
2023-12-21 05:21:09 -08:00
closeFunction? : CloseFunction ;
2022-05-30 03:16:44 -07:00
}
2019-08-08 11:38:25 -07:00
export interface IGetExecuteFunctions {
(
workflow : Workflow ,
runExecutionData : IRunExecutionData ,
runIndex : number ,
connectionInputData : INodeExecutionData [ ] ,
inputData : ITaskDataConnections ,
node : INode ,
additionalData : IWorkflowExecuteAdditionalData ,
2022-06-03 08:25:07 -07:00
executeData : IExecuteData ,
2019-08-08 11:38:25 -07:00
mode : WorkflowExecuteMode ,
2023-12-21 05:21:09 -08:00
closeFunctions : CloseFunction [ ] ,
2023-11-24 09:17:06 -08:00
abortSignal? : AbortSignal ,
2019-08-08 11:38:25 -07:00
) : IExecuteFunctions ;
}
export interface IGetExecuteSingleFunctions {
(
workflow : Workflow ,
runExecutionData : IRunExecutionData ,
runIndex : number ,
connectionInputData : INodeExecutionData [ ] ,
inputData : ITaskDataConnections ,
node : INode ,
itemIndex : number ,
additionalData : IWorkflowExecuteAdditionalData ,
2022-06-03 08:25:07 -07:00
executeData : IExecuteData ,
2019-08-08 11:38:25 -07:00
mode : WorkflowExecuteMode ,
2023-11-24 09:17:06 -08:00
abortSignal? : AbortSignal ,
2019-08-08 11:38:25 -07:00
) : IExecuteSingleFunctions ;
}
export interface IGetExecuteHookFunctions {
2021-03-23 11:08:47 -07:00
(
workflow : Workflow ,
node : INode ,
additionalData : IWorkflowExecuteAdditionalData ,
mode : WorkflowExecuteMode ,
activation : WorkflowActivateMode ,
webhookData? : IWebhookData ,
) : IHookFunctions ;
2019-08-08 11:38:25 -07:00
}
export interface IGetExecuteWebhookFunctions {
(
workflow : Workflow ,
node : INode ,
additionalData : IWorkflowExecuteAdditionalData ,
mode : WorkflowExecuteMode ,
webhookData : IWebhookData ,
2024-01-09 03:11:39 -08:00
closeFunctions : CloseFunction [ ] ,
2024-08-01 01:21:58 -07:00
runExecutionData : IRunExecutionData | null ,
2019-08-08 11:38:25 -07:00
) : IWebhookFunctions ;
}
2022-06-03 08:25:07 -07:00
export interface ISourceDataConnections {
// Key for each input type and because there can be multiple inputs of the same type it is an array
2022-09-02 07:13:17 -07:00
// null is also allowed because if we still need data for a later while executing the workflow set temporary to null
2022-06-03 08:25:07 -07:00
// the nodes get as input TaskDataConnections which is identical to this one except that no null is allowed.
[ key : string ] : Array < ISourceData [ ] | null > ;
}
2019-06-23 03:35:23 -07:00
export interface IExecuteData {
data : ITaskDataConnections ;
node : INode ;
2022-06-03 08:25:07 -07:00
source : ITaskDataConnectionsSource | null ;
2019-06-23 03:35:23 -07:00
}
export type IContextObject = {
[ key : string ] : any ;
} ;
export interface IExecuteContextData {
// Keys are: "flow" | "node:<NODE_NAME>"
[ key : string ] : IContextObject ;
}
2022-02-05 13:55:43 -08:00
export type IHttpRequestMethods = 'DELETE' | 'GET' | 'HEAD' | 'PATCH' | 'POST' | 'PUT' ;
2024-02-14 07:29:09 -08:00
/** used in helpers.httpRequest(WithAuthentication) */
2021-09-21 10:38:24 -07:00
export interface IHttpRequestOptions {
url : string ;
2022-02-05 13:55:43 -08:00
baseURL? : string ;
2021-09-21 10:38:24 -07:00
headers? : IDataObject ;
2022-02-05 13:55:43 -08:00
method? : IHttpRequestMethods ;
2021-09-21 10:38:24 -07:00
body? : FormData | GenericValue | GenericValue [ ] | Buffer | URLSearchParams ;
qs? : IDataObject ;
arrayFormat ? : 'indices' | 'brackets' | 'repeat' | 'comma' ;
auth ? : {
username : string ;
password : string ;
2023-04-19 04:44:41 -07:00
sendImmediately? : boolean ;
2021-09-21 10:38:24 -07:00
} ;
disableFollowRedirect? : boolean ;
encoding ? : 'arraybuffer' | 'blob' | 'document' | 'json' | 'text' | 'stream' ;
skipSslCertificateValidation? : boolean ;
returnFullResponse? : boolean ;
2022-03-06 02:41:01 -08:00
ignoreHttpStatusErrors? : boolean ;
2021-09-21 10:38:24 -07:00
proxy ? : {
host : string ;
port : number ;
auth ? : {
username : string ;
password : string ;
} ;
protocol? : string ;
} ;
timeout? : number ;
json? : boolean ;
}
2024-02-14 07:29:09 -08:00
/ * *
* used in helpers . request ( WithAuthentication )
* @see IHttpRequestOptions
* @deprecated Prefer using IHttpRequestOptions
* /
export interface IRequestOptions {
baseURL? : string ;
uri? : string ;
url? : string ;
method? : IHttpRequestMethods ;
qs? : IDataObject ;
qsStringifyOptions ? : { arrayFormat : 'repeat' | 'brackets' | 'indices' } ;
useQuerystring? : boolean ;
headers? : IDataObject ;
auth? : Partial < {
sendImmediately : boolean ;
bearer : string ;
user : string ;
username : string ;
password : string ;
pass : string ;
} > ;
body? : any ;
formData? : IDataObject | FormData ;
form? : IDataObject | FormData ;
json? : boolean ;
useStream? : boolean ;
encoding? : string | null ;
timeout? : number ;
rejectUnauthorized? : boolean ;
proxy? : string | AxiosProxyConfig ;
simple? : boolean ;
gzip? : boolean ;
resolveWithFullResponse? : boolean ;
2024-02-22 08:56:48 -08:00
/** Whether to follow GET or HEAD HTTP 3xx redirects @default true */
followRedirect? : boolean ;
/** Whether to follow **All** HTTP 3xx redirects @default false */
followAllRedirects? : boolean ;
/** Max number of redirects to follow @default 21 */
maxRedirects? : number ;
2024-04-24 07:28:02 -07:00
agentOptions? : SecureContextOptions ;
2024-02-14 07:29:09 -08:00
}
2023-11-01 06:24:43 -07:00
export interface PaginationOptions {
binaryResult? : boolean ;
continue : boolean | string ;
request : IRequestOptionsSimplifiedAuth ;
2024-01-04 07:11:16 -08:00
requestInterval : number ;
2023-11-01 06:24:43 -07:00
maxRequests? : number ;
}
2021-11-05 09:45:51 -07:00
export type IN8nHttpResponse = IDataObject | Buffer | GenericValue | GenericValue [ ] | null ;
2021-09-21 10:38:24 -07:00
export interface IN8nHttpFullResponse {
2023-05-17 01:06:24 -07:00
body : IN8nHttpResponse | Readable ;
2023-11-01 06:24:43 -07:00
__bodyResolved? : boolean ;
2021-09-21 10:38:24 -07:00
headers : IDataObject ;
statusCode : number ;
2021-11-05 09:45:51 -07:00
statusMessage? : string ;
2021-09-21 10:38:24 -07:00
}
2022-02-05 13:55:43 -08:00
export interface IN8nRequestOperations {
pagination ? :
2023-02-01 06:26:13 -08:00
| IN8nRequestOperationPaginationGeneric
2022-02-05 13:55:43 -08:00
| IN8nRequestOperationPaginationOffset
| ( (
this : IExecutePaginationFunctions ,
2022-07-20 04:50:16 -07:00
requestOptions : DeclarativeRestApiSettings.ResultOptions ,
2022-02-05 13:55:43 -08:00
) = > Promise < INodeExecutionData [ ] > ) ;
}
export interface IN8nRequestOperationPaginationBase {
type : string ;
properties : {
2023-02-01 06:26:13 -08:00
[ key : string ] : unknown ;
} ;
}
export interface IN8nRequestOperationPaginationGeneric extends IN8nRequestOperationPaginationBase {
type : 'generic' ;
properties : {
continue : boolean | string ;
request : IRequestOptionsSimplifiedAuth ;
2022-02-05 13:55:43 -08:00
} ;
}
export interface IN8nRequestOperationPaginationOffset extends IN8nRequestOperationPaginationBase {
type : 'offset' ;
properties : {
limitParameter : string ;
offsetParameter : string ;
pageSize : number ;
rootProperty? : string ; // Optional Path to option array
type : 'body' | 'query' ;
} ;
}
2024-06-18 03:50:44 -07:00
export type EnsureTypeOptions = 'string' | 'number' | 'boolean' | 'object' | 'array' | 'json' ;
2022-09-23 02:56:57 -07:00
export interface IGetNodeParameterOptions {
2023-10-02 08:33:43 -07:00
contextNode? : INode ;
2024-06-18 03:50:44 -07:00
// make sure that returned value would be of specified type, converts it if needed
ensureType? : EnsureTypeOptions ;
2023-09-19 03:16:35 -07:00
// extract value from regex, works only when parameter type is resourceLocator
2022-09-23 02:56:57 -07:00
extractValue? : boolean ;
2023-09-19 03:16:35 -07:00
// get raw value of parameter with unresolved expressions
rawExpressions? : boolean ;
2022-09-23 02:56:57 -07:00
}
2022-11-18 05:31:38 -08:00
namespace ExecuteFunctions {
2022-12-02 03:53:59 -08:00
namespace StringReturning {
2023-01-06 06:09:32 -08:00
export type NodeParameter =
| 'binaryProperty'
| 'binaryPropertyName'
| 'binaryPropertyOutput'
| 'dataPropertyName'
| 'dataBinaryProperty'
| 'resource'
| 'operation'
| 'filePath'
| 'encodingType' ;
2022-12-02 03:53:59 -08:00
}
2022-11-18 06:26:22 -08:00
namespace NumberReturning {
export type NodeParameter = 'limit' ;
}
2022-11-18 05:31:38 -08:00
namespace BooleanReturning {
export type NodeParameter =
| 'binaryData'
| 'download'
| 'jsonParameters'
| 'returnAll'
| 'rawData'
| 'resolveData' ;
}
2022-11-18 07:29:44 -08:00
namespace RecordReturning {
export type NodeParameter = 'additionalFields' | 'filters' | 'options' | 'updateFields' ;
}
2022-11-18 05:31:38 -08:00
export type GetNodeParameterFn = {
// @TECH_DEBT: Refactor to remove this barely used overload - N8N-5632
getNodeParameter < T extends { resource : string } > (
parameterName : 'resource' ,
itemIndex? : number ,
) : T [ 'resource' ] ;
2022-12-02 03:53:59 -08:00
getNodeParameter (
parameterName : StringReturning.NodeParameter ,
itemIndex : number ,
fallbackValue? : string ,
options? : IGetNodeParameterOptions ,
) : string ;
2022-11-18 07:29:44 -08:00
getNodeParameter (
parameterName : RecordReturning.NodeParameter ,
itemIndex : number ,
fallbackValue? : IDataObject ,
options? : IGetNodeParameterOptions ,
) : IDataObject ;
2022-11-18 05:31:38 -08:00
getNodeParameter (
parameterName : BooleanReturning.NodeParameter ,
itemIndex : number ,
2022-11-18 06:26:22 -08:00
fallbackValue? : boolean ,
2022-11-18 05:31:38 -08:00
options? : IGetNodeParameterOptions ,
) : boolean ;
2022-11-18 06:26:22 -08:00
getNodeParameter (
parameterName : NumberReturning.NodeParameter ,
itemIndex : number ,
fallbackValue? : number ,
options? : IGetNodeParameterOptions ,
) : number ;
2023-05-05 01:22:49 -07:00
getNodeParameter (
2022-11-18 05:31:38 -08:00
parameterName : string ,
itemIndex : number ,
fallbackValue? : any ,
options? : IGetNodeParameterOptions ,
2023-05-05 01:22:49 -07:00
) : NodeParameterValueType | object ;
2022-11-18 05:31:38 -08:00
} ;
}
2022-12-23 09:27:07 -08:00
export interface IExecuteWorkflowInfo {
code? : IWorkflowBase ;
id? : string ;
}
export type ICredentialTestFunction = (
this : ICredentialTestFunctions ,
2024-08-27 06:23:58 -07:00
credential : ICredentialsDecrypted < ICredentialDataDecryptedObject > ,
2022-12-23 09:27:07 -08:00
) = > Promise < INodeCredentialTestResult > ;
export interface ICredentialTestFunctions {
2024-07-04 03:29:44 -07:00
helpers : SSHTunnelFunctions & {
2023-06-14 07:40:16 -07:00
request : ( uriOrObject : string | object , options? : object ) = > Promise < any > ;
2022-12-23 09:27:07 -08:00
} ;
}
2023-03-22 06:04:15 -07:00
interface BaseHelperFunctions {
2024-09-13 06:53:03 -07:00
createDeferredPromise : < T = void > ( ) = > IDeferredPromise < T > ;
2023-03-22 06:04:15 -07:00
}
interface JsonHelperFunctions {
2022-12-23 09:27:07 -08:00
returnJsonArray ( jsonData : IDataObject | IDataObject [ ] ) : INodeExecutionData [ ] ;
}
2023-01-06 05:15:46 -08:00
export interface FileSystemHelperFunctions {
createReadStream ( path : PathLike ) : Promise < Readable > ;
2023-07-07 07:43:45 -07:00
getStoragePath ( ) : string ;
2023-07-31 05:20:39 -07:00
writeContentToFile (
path : PathLike ,
content : string | Buffer | Readable ,
flag? : string ,
) : Promise < void > ;
2023-01-06 05:15:46 -08:00
}
2022-12-23 09:27:07 -08:00
export interface BinaryHelperFunctions {
2023-01-02 08:07:10 -08:00
prepareBinaryData (
binaryData : Buffer | Readable ,
filePath? : string ,
mimeType? : string ,
) : Promise < IBinaryData > ;
2022-12-23 09:27:07 -08:00
setBinaryDataBuffer ( data : IBinaryData , binaryData : Buffer ) : Promise < IBinaryData > ;
2023-03-23 07:11:18 -07:00
copyBinaryFile ( ) : Promise < never > ;
2023-03-09 06:38:54 -08:00
binaryToBuffer ( body : Buffer | Readable ) : Promise < Buffer > ;
2024-07-11 08:03:52 -07:00
binaryToString ( body : Buffer | Readable , encoding? : BufferEncoding ) : Promise < string > ;
2023-07-18 11:07:29 -07:00
getBinaryPath ( binaryDataId : string ) : string ;
2023-09-25 07:59:45 -07:00
getBinaryStream ( binaryDataId : string , chunkSize? : number ) : Promise < Readable > ;
2023-09-25 01:07:06 -07:00
getBinaryMetadata ( binaryDataId : string ) : Promise < {
fileName? : string ;
mimeType? : string ;
fileSize : number ;
} > ;
2022-12-23 09:27:07 -08:00
}
2023-03-23 07:11:18 -07:00
export interface NodeHelperFunctions {
copyBinaryFile ( filePath : string , fileName : string , mimeType? : string ) : Promise < IBinaryData > ;
}
2022-12-23 09:27:07 -08:00
export interface RequestHelperFunctions {
httpRequest ( requestOptions : IHttpRequestOptions ) : Promise < any > ;
httpRequestWithAuthentication (
this : IAllExecuteFunctions ,
credentialsType : string ,
requestOptions : IHttpRequestOptions ,
additionalCredentialOptions? : IAdditionalCredentialOptions ,
) : Promise < any > ;
2023-11-01 06:24:43 -07:00
requestWithAuthenticationPaginated (
this : IAllExecuteFunctions ,
2024-02-14 07:29:09 -08:00
requestOptions : IRequestOptions ,
2023-11-01 06:24:43 -07:00
itemIndex : number ,
paginationOptions : PaginationOptions ,
credentialsType? : string ,
additionalCredentialOptions? : IAdditionalCredentialOptions ,
) : Promise < any [ ] > ;
2022-12-23 09:27:07 -08:00
2024-02-14 07:29:09 -08:00
/ * *
* @deprecated Use . httpRequest instead
* @see RequestHelperFunctions . httpRequest
* /
request ( uriOrObject : string | IRequestOptions , options? : IRequestOptions ) : Promise < any > ;
/ * *
* @deprecated Use . httpRequestWithAuthentication instead
* @see RequestHelperFunctions . requestWithAuthentication
* /
requestWithAuthentication (
this : IAllExecuteFunctions ,
credentialsType : string ,
requestOptions : IRequestOptions ,
additionalCredentialOptions? : IAdditionalCredentialOptions ,
itemIndex? : number ,
) : Promise < any > ;
/ * *
* @deprecated Use . httpRequestWithAuthentication instead
* @see RequestHelperFunctions . requestWithAuthentication
* /
2022-12-23 09:27:07 -08:00
requestOAuth1 (
this : IAllExecuteFunctions ,
credentialsType : string ,
2024-02-14 07:29:09 -08:00
requestOptions : IRequestOptions ,
2022-12-23 09:27:07 -08:00
) : Promise < any > ;
2024-02-14 07:29:09 -08:00
/ * *
* @deprecated Use . httpRequestWithAuthentication instead
* @see RequestHelperFunctions . requestWithAuthentication
* /
2022-12-23 09:27:07 -08:00
requestOAuth2 (
this : IAllExecuteFunctions ,
credentialsType : string ,
2024-02-14 07:29:09 -08:00
requestOptions : IRequestOptions ,
2022-12-23 09:27:07 -08:00
oAuth2Options? : IOAuth2Options ,
) : Promise < any > ;
}
2024-07-04 03:29:44 -07:00
export type SSHCredentials = {
sshHost : string ;
sshPort : number ;
sshUser : string ;
} & (
| {
sshAuthenticateWith : 'password' ;
sshPassword : string ;
}
| {
sshAuthenticateWith : 'privateKey' ;
// TODO: rename this to `sshPrivateKey`
privateKey : string ;
// TODO: rename this to `sshPassphrase`
passphrase? : string ;
}
) ;
export interface SSHTunnelFunctions {
getSSHClient ( credentials : SSHCredentials ) : Promise < SSHClient > ;
}
2024-07-16 11:42:48 -07:00
type CronUnit = number | '*' | ` */ ${ number } ` ;
export type CronExpression =
` ${ CronUnit } ${ CronUnit } ${ CronUnit } ${ CronUnit } ${ CronUnit } ${ CronUnit } ` ;
export interface SchedulingFunctions {
registerCron ( cronExpression : CronExpression , onTick : ( ) = > void ) : void ;
}
2024-03-28 01:46:39 -07:00
export type NodeTypeAndVersion = {
name : string ;
type : string ;
typeVersion : number ;
} ;
2022-12-23 09:27:07 -08:00
export interface FunctionsBase {
2023-10-25 07:35:22 -07:00
logger : Logger ;
2024-08-27 06:23:58 -07:00
getCredentials < T extends object = ICredentialDataDecryptedObject > (
type : string ,
itemIndex? : number ,
) : Promise < T > ;
2024-06-05 00:25:39 -07:00
getCredentialsProperties ( type : string ) : INodeProperties [ ] ;
2023-04-17 01:11:26 -07:00
getExecutionId ( ) : string ;
2020-02-15 17:07:01 -08:00
getNode ( ) : INode ;
2022-12-23 09:27:07 -08:00
getWorkflow ( ) : IWorkflowMetadata ;
2019-06-23 03:35:23 -07:00
getWorkflowStaticData ( type : string ) : IDataObject ;
getTimezone ( ) : string ;
2022-12-23 09:27:07 -08:00
getRestApiUrl ( ) : string ;
2023-07-10 06:03:21 -07:00
getInstanceBaseUrl ( ) : string ;
2023-10-23 04:39:35 -07:00
getInstanceId ( ) : string ;
2024-03-28 01:46:39 -07:00
getChildNodes ( nodeName : string ) : NodeTypeAndVersion [ ] ;
getParentNodes ( nodeName : string ) : NodeTypeAndVersion [ ] ;
2024-05-08 04:02:36 -07:00
getKnownNodeTypes ( ) : IDataObject ;
2022-12-23 09:27:07 -08:00
getMode ? : ( ) = > WorkflowExecuteMode ;
getActivationMode ? : ( ) = > WorkflowActivateMode ;
2023-09-05 03:59:02 -07:00
/** @deprecated */
prepareOutputData ( outputData : INodeExecutionData [ ] ) : Promise < INodeExecutionData [ ] [ ] > ;
2022-12-23 09:27:07 -08:00
}
type FunctionsBaseWithRequiredKeys < Keys extends keyof FunctionsBase > = FunctionsBase & {
[ K in Keys ] : NonNullable < FunctionsBase [ K ] > ;
2022-11-18 05:31:38 -08:00
} ;
2019-06-23 03:35:23 -07:00
2023-11-01 06:24:43 -07:00
export type ContextType = 'flow' | 'node' ;
2022-12-23 09:27:07 -08:00
type BaseExecutionFunctions = FunctionsBaseWithRequiredKeys < 'getMode' > & {
2024-08-30 00:59:30 -07:00
continueOnFail ( ) : boolean ;
2022-12-23 09:27:07 -08:00
evaluateExpression ( expression : string , itemIndex : number ) : NodeParameterValueType ;
2023-11-01 06:24:43 -07:00
getContext ( type : ContextType ) : IContextObject ;
2022-12-23 09:27:07 -08:00
getExecuteData ( ) : IExecuteData ;
getWorkflowDataProxy ( itemIndex : number ) : IWorkflowDataProxyData ;
2022-12-09 04:39:06 -08:00
getInputSourceData ( inputIndex? : number , inputName? : string ) : ISourceData ;
2023-11-24 09:17:06 -08:00
getExecutionCancelSignal ( ) : AbortSignal | undefined ;
onExecutionCancellation ( handler : ( ) = > unknown ) : void ;
2024-09-12 03:02:47 -07:00
logAiEvent ( eventName : AiEvent , msg? : string | undefined ) : Promise < void > ;
2022-12-23 09:27:07 -08:00
} ;
2023-10-02 08:33:43 -07:00
// TODO: Create later own type only for Config-Nodes
2022-12-23 09:27:07 -08:00
export type IExecuteFunctions = ExecuteFunctions . GetNodeParameterFn &
BaseExecutionFunctions & {
executeWorkflow (
workflowInfo : IExecuteWorkflowInfo ,
inputData? : INodeExecutionData [ ] ,
2024-04-08 13:51:49 -07:00
parentCallbackManager? : CallbackManager ,
2022-12-23 09:27:07 -08:00
) : Promise < any > ;
2023-10-02 08:33:43 -07:00
getInputConnectionData (
2024-08-29 06:55:53 -07:00
inputName : NodeConnectionType ,
2023-10-02 08:33:43 -07:00
itemIndex : number ,
inputIndex? : number ,
) : Promise < unknown > ;
2022-12-23 09:27:07 -08:00
getInputData ( inputIndex? : number , inputName? : string ) : INodeExecutionData [ ] ;
2024-07-02 03:47:04 -07:00
getNodeInputs ( ) : INodeInputConfiguration [ ] ;
2023-10-02 08:33:43 -07:00
getNodeOutputs ( ) : INodeOutputConfiguration [ ] ;
2022-12-23 09:27:07 -08:00
putExecutionToWait ( waitTill : Date ) : Promise < void > ;
sendMessageToUI ( message : any ) : void ;
sendResponse ( response : IExecuteResponsePromiseData ) : void ;
2023-10-02 08:33:43 -07:00
// TODO: Make this one then only available in the new config one
addInputData (
2024-08-29 06:55:53 -07:00
connectionType : NodeConnectionType ,
2023-10-02 08:33:43 -07:00
data : INodeExecutionData [ ] [ ] | ExecutionError ,
runIndex? : number ,
) : { index : number } ;
addOutputData (
2024-08-29 06:55:53 -07:00
connectionType : NodeConnectionType ,
2023-10-02 08:33:43 -07:00
currentNodeRunIndex : number ,
data : INodeExecutionData [ ] [ ] | ExecutionError ,
) : void ;
2023-03-23 07:11:18 -07:00
nodeHelpers : NodeHelperFunctions ;
2022-12-23 09:27:07 -08:00
helpers : RequestHelperFunctions &
2023-03-22 06:04:15 -07:00
BaseHelperFunctions &
2022-12-23 09:27:07 -08:00
BinaryHelperFunctions &
2023-01-06 05:15:46 -08:00
FileSystemHelperFunctions &
2024-07-04 03:29:44 -07:00
SSHTunnelFunctions &
2022-12-23 09:27:07 -08:00
JsonHelperFunctions & {
normalizeItems ( items : INodeExecutionData | INodeExecutionData [ ] ) : INodeExecutionData [ ] ;
constructExecutionMetaData (
inputData : INodeExecutionData [ ] ,
options : { itemData : IPairedItemData | IPairedItemData [ ] } ,
) : NodeExecutionWithMetadata [ ] ;
2023-03-06 08:33:32 -08:00
assertBinaryData ( itemIndex : number , propertyName : string ) : IBinaryData ;
2022-12-23 09:27:07 -08:00
getBinaryDataBuffer ( itemIndex : number , propertyName : string ) : Promise < Buffer > ;
2023-10-06 07:25:58 -07:00
copyInputItems ( items : INodeExecutionData [ ] , properties : string [ ] ) : IDataObject [ ] ;
2022-12-23 09:27:07 -08:00
} ;
2024-04-08 13:51:49 -07:00
getParentCallbackManager ( ) : CallbackManager | undefined ;
2024-10-02 01:31:56 -07:00
startJob < T = unknown > ( jobType : string , settings : unknown , itemIndex : number ) : Promise < T > ;
2022-12-23 09:27:07 -08:00
} ;
export interface IExecuteSingleFunctions extends BaseExecutionFunctions {
getInputData ( inputIndex? : number , inputName? : string ) : INodeExecutionData ;
2022-06-26 15:52:37 -07:00
getItemIndex ( ) : number ;
2022-09-23 02:56:57 -07:00
getNodeParameter (
parameterName : string ,
fallbackValue? : any ,
options? : IGetNodeParameterOptions ,
) : NodeParameterValueType | object ;
2022-12-23 09:27:07 -08:00
helpers : RequestHelperFunctions &
2023-03-22 06:04:15 -07:00
BaseHelperFunctions &
2022-12-23 09:27:07 -08:00
BinaryHelperFunctions & {
2023-03-06 08:33:32 -08:00
assertBinaryData ( propertyName : string , inputIndex? : number ) : IBinaryData ;
2022-12-23 09:27:07 -08:00
getBinaryDataBuffer ( propertyName : string , inputIndex? : number ) : Promise < Buffer > ;
} ;
2019-06-23 03:35:23 -07:00
}
2022-02-05 13:55:43 -08:00
export interface IExecutePaginationFunctions extends IExecuteSingleFunctions {
makeRoutingRequest (
this : IAllExecuteFunctions ,
2022-07-20 04:50:16 -07:00
requestOptions : DeclarativeRestApiSettings.ResultOptions ,
2022-02-05 13:55:43 -08:00
) : Promise < INodeExecutionData [ ] > ;
}
2022-12-23 09:27:07 -08:00
export interface ILoadOptionsFunctions extends FunctionsBase {
2022-09-23 02:56:57 -07:00
getNodeParameter (
parameterName : string ,
fallbackValue? : any ,
options? : IGetNodeParameterOptions ,
) : NodeParameterValueType | object ;
2022-11-11 04:37:52 -08:00
getCurrentNodeParameter (
parameterName : string ,
options? : IGetNodeParameterOptions ,
) : NodeParameterValueType | object | undefined ;
2019-10-20 12:42:34 -07:00
getCurrentNodeParameters ( ) : INodeParameters | undefined ;
2024-07-04 03:29:44 -07:00
helpers : RequestHelperFunctions & SSHTunnelFunctions ;
2019-06-23 03:35:23 -07:00
}
2022-12-23 09:27:07 -08:00
export interface IPollFunctions
extends FunctionsBaseWithRequiredKeys < 'getMode' | 'getActivationMode' > {
2022-11-08 05:29:20 -08:00
__emit (
data : INodeExecutionData [ ] [ ] ,
responsePromise? : IDeferredPromise < IExecuteResponsePromiseData > ,
donePromise? : IDeferredPromise < IRun > ,
) : void ;
__emitError ( error : Error , responsePromise? : IDeferredPromise < IExecuteResponsePromiseData > ) : void ;
2022-09-23 02:56:57 -07:00
getNodeParameter (
parameterName : string ,
fallbackValue? : any ,
options? : IGetNodeParameterOptions ,
) : NodeParameterValueType | object ;
2023-03-22 06:04:15 -07:00
helpers : RequestHelperFunctions &
BaseHelperFunctions &
BinaryHelperFunctions &
2024-07-16 11:42:48 -07:00
SchedulingFunctions &
2023-03-22 06:04:15 -07:00
JsonHelperFunctions ;
2019-12-31 12:19:37 -08:00
}
2022-12-23 09:27:07 -08:00
export interface ITriggerFunctions
extends FunctionsBaseWithRequiredKeys < 'getMode' | 'getActivationMode' > {
2021-11-05 09:45:51 -07:00
emit (
data : INodeExecutionData [ ] [ ] ,
responsePromise? : IDeferredPromise < IExecuteResponsePromiseData > ,
2022-05-30 03:16:44 -07:00
donePromise? : IDeferredPromise < IRun > ,
2021-11-05 09:45:51 -07:00
) : void ;
2022-04-02 08:33:31 -07:00
emitError ( error : Error , responsePromise? : IDeferredPromise < IExecuteResponsePromiseData > ) : void ;
2022-09-23 02:56:57 -07:00
getNodeParameter (
parameterName : string ,
fallbackValue? : any ,
options? : IGetNodeParameterOptions ,
) : NodeParameterValueType | object ;
2023-03-22 06:04:15 -07:00
helpers : RequestHelperFunctions &
BaseHelperFunctions &
BinaryHelperFunctions &
2024-07-04 03:29:44 -07:00
SSHTunnelFunctions &
2024-07-16 11:42:48 -07:00
SchedulingFunctions &
2023-03-22 06:04:15 -07:00
JsonHelperFunctions ;
2019-06-23 03:35:23 -07:00
}
2022-12-23 09:27:07 -08:00
export interface IHookFunctions
extends FunctionsBaseWithRequiredKeys < 'getMode' | 'getActivationMode' > {
getWebhookName ( ) : string ;
getWebhookDescription ( name : string ) : IWebhookDescription | undefined ;
getNodeWebhookUrl : ( name : string ) = > string | undefined ;
getNodeParameter (
parameterName : string ,
fallbackValue? : any ,
options? : IGetNodeParameterOptions ,
) : NodeParameterValueType | object ;
helpers : RequestHelperFunctions ;
}
export interface IWebhookFunctions extends FunctionsBaseWithRequiredKeys < 'getMode' > {
2019-06-23 03:35:23 -07:00
getBodyData ( ) : IDataObject ;
2022-10-28 02:24:11 -07:00
getHeaderData ( ) : IncomingHttpHeaders ;
2024-01-09 03:11:39 -08:00
getInputConnectionData (
2024-08-29 06:55:53 -07:00
inputName : NodeConnectionType ,
2024-01-09 03:11:39 -08:00
itemIndex : number ,
inputIndex? : number ,
) : Promise < unknown > ;
2022-09-23 02:56:57 -07:00
getNodeParameter (
parameterName : string ,
fallbackValue? : any ,
options? : IGetNodeParameterOptions ,
) : NodeParameterValueType | object ;
2019-07-12 02:33:18 -07:00
getNodeWebhookUrl : ( name : string ) = > string | undefined ;
2021-01-23 11:00:32 -08:00
getParamsData ( ) : object ;
2019-06-23 03:35:23 -07:00
getQueryData ( ) : object ;
getRequestObject ( ) : express . Request ;
getResponseObject ( ) : express . Response ;
2019-07-12 02:33:18 -07:00
getWebhookName ( ) : string ;
2023-03-23 07:11:18 -07:00
nodeHelpers : NodeHelperFunctions ;
2023-03-22 06:04:15 -07:00
helpers : RequestHelperFunctions &
BaseHelperFunctions &
BinaryHelperFunctions &
JsonHelperFunctions ;
2019-06-23 03:35:23 -07:00
}
2021-10-13 15:21:00 -07:00
export interface INodeCredentialsDetails {
id : string | null ;
name : string ;
}
2019-06-23 03:35:23 -07:00
export interface INodeCredentials {
2021-10-13 15:21:00 -07:00
[ key : string ] : INodeCredentialsDetails ;
2019-06-23 03:35:23 -07:00
}
2023-10-30 10:42:47 -07:00
export type OnError = 'continueErrorOutput' | 'continueRegularOutput' | 'stopWorkflow' ;
2019-06-23 03:35:23 -07:00
export interface INode {
2022-08-03 04:06:53 -07:00
id : string ;
2019-06-23 03:35:23 -07:00
name : string ;
typeVersion : number ;
type : string ;
position : [ number , number ] ;
disabled? : boolean ;
2021-07-01 00:04:24 -07:00
notes? : string ;
2020-05-05 08:34:12 -07:00
notesInFlow? : boolean ;
2019-07-18 10:26:16 -07:00
retryOnFail? : boolean ;
maxTries? : number ;
waitBetweenTries? : number ;
2020-04-12 10:58:30 -07:00
alwaysOutputData? : boolean ;
2020-08-08 11:31:04 -07:00
executeOnce? : boolean ;
2023-10-30 10:42:47 -07:00
onError? : OnError ;
2019-06-23 03:35:23 -07:00
continueOnFail? : boolean ;
parameters : INodeParameters ;
credentials? : INodeCredentials ;
2020-06-10 07:17:16 -07:00
webhookId? : string ;
2023-11-13 03:11:16 -08:00
extendsCredential? : string ;
2022-07-20 08:50:39 -07:00
}
2022-07-22 03:19:45 -07:00
export interface IPinData {
2022-08-22 08:46:22 -07:00
[ nodeName : string ] : INodeExecutionData [ ] ;
2019-06-23 03:35:23 -07:00
}
export interface INodes {
[ key : string ] : INode ;
}
export interface IObservableObject {
[ key : string ] : any ;
__dataChanged : boolean ;
}
export interface IBinaryKeyData {
[ key : string ] : IBinaryData ;
}
2022-06-03 08:25:07 -07:00
export interface IPairedItemData {
item : number ;
input? : number ; // If undefined "0" gets used
2022-12-09 04:39:06 -08:00
sourceOverwrite? : ISourceData ;
2022-06-03 08:25:07 -07:00
}
2019-06-23 03:35:23 -07:00
export interface INodeExecutionData {
2022-06-03 08:25:07 -07:00
[ key : string ] :
| IDataObject
| IBinaryKeyData
| IPairedItemData
| IPairedItemData [ ]
| NodeApiError
| NodeOperationError
| number
| undefined ;
2019-06-23 03:35:23 -07:00
json : IDataObject ;
binary? : IBinaryKeyData ;
2021-09-21 10:38:24 -07:00
error? : NodeApiError | NodeOperationError ;
2022-06-03 08:25:07 -07:00
pairedItem? : IPairedItemData | IPairedItemData [ ] | number ;
2022-09-11 07:42:09 -07:00
index? : number ;
2019-06-23 03:35:23 -07:00
}
export interface INodeExecuteFunctions {
2019-12-31 12:19:37 -08:00
getExecutePollFunctions : IGetExecutePollFunctions ;
2019-08-08 11:38:25 -07:00
getExecuteTriggerFunctions : IGetExecuteTriggerFunctions ;
getExecuteFunctions : IGetExecuteFunctions ;
getExecuteSingleFunctions : IGetExecuteSingleFunctions ;
getExecuteHookFunctions : IGetExecuteHookFunctions ;
getExecuteWebhookFunctions : IGetExecuteWebhookFunctions ;
2019-06-23 03:35:23 -07:00
}
2020-10-26 01:26:07 -07:00
export type NodeParameterValue = string | number | boolean | undefined | null ;
2019-06-23 03:35:23 -07:00
2022-09-21 06:44:45 -07:00
export type ResourceLocatorModes = 'id' | 'url' | 'list' | string ;
export interface IResourceLocatorResult {
name : string ;
value : string ;
url? : string ;
}
export interface INodeParameterResourceLocator {
2022-09-22 10:04:26 -07:00
__rl : true ;
2022-09-21 06:44:45 -07:00
mode : ResourceLocatorModes ;
value : NodeParameterValue ;
cachedResultName? : string ;
cachedResultUrl? : string ;
2022-09-22 10:04:26 -07:00
__regex? : string ;
2022-09-21 06:44:45 -07:00
}
export type NodeParameterValueType =
2019-06-23 03:35:23 -07:00
// TODO: Later also has to be possible to add multiple ones with the name name. So array has to be possible
2022-09-21 06:44:45 -07:00
| NodeParameterValue
| INodeParameters
| INodeParameterResourceLocator
2024-05-21 06:04:20 -07:00
| ResourceMapperValue
| FilterValue
| AssignmentCollectionValue
2022-09-21 06:44:45 -07:00
| NodeParameterValue [ ]
| INodeParameters [ ]
feat(editor): Implement Resource Mapper component (#6207)
* :zap: scaffolding
* :zap: finished scaffolding
* :zap: renamed types
* :zap: updated subtitle
* :zap: renamed functions file, UI updates
* :zap: query parameters fixes, ui updates, refactoring
* :zap: fixes for credentials test, setup for error parsing
* :zap: rlc for schema and table, error handling tweaks
* :zap: delete operation, new options
* :zap: columns loader
* :zap: linter fixes
* :zap: where clauses setup
* :zap: logic for processing where clauses
* :zap: select operation
* :zap: refactoring
* :zap: data mode for insert and update, wip
* :zap: data mapping, insert update, skip on conflict option
* :zap: select columns with spaces fix
* :zap: update operation update, wip
* :zap: finished update operation
* :zap: upsert operation
* :zap: ui fixes
* Copy updates.
* Copy updates.
* :zap: option to convert empty strings to nulls, schema checks
* :zap: UI requested updates
* :zap: ssh setup WIP
* :zap: fixes, ssh WIP
* :zap: ssh fixes, credentials
* :zap: credentials testing update
* :zap: uncaught error fix
* :zap: clean up
* :zap: address in use fix
* :zap: improved error message
* :zap: tests setup
* :zap: unit tests wip
* :zap: config files clean up
* :zap: utils unit tests
* :zap: refactoring
* :zap: setup for testing operations, tests for deleteTable operation
* :zap: executeQuery and insert operations tests
* :zap: select, update, upsert operations tests
* :zap: runQueries tests setup
* :zap: hint to query
* Copy updates.
* :zap: ui fixes
* :zap: clean up
* :zap: error message update
* :zap: ui update
* Minor tweaks to query params decription.
* feat(Google Sheets Node): Implement Resource mapper in Google Sheets node (#5752)
* ✨ Added initial resource mapping support in google sheets node
* ✨ Wired mapping API endpoint with node-specific logic for fetching mapping fields
* ✨ Implementing mapping fields logic for google sheets
* ✨ Updating Google Sheets execute methods to support resource mapper fields
* 🚧 Added initial version of `ResourceLocator` component
* 👌 Added `update` mode to resource mapper modes
* 👌 Addressing PR feedback
* 👌 Removing leftover const reference
* 👕 Fixing lint errors
* :zap: singlton for conections
* :zap: credentials test fix, clean up
* feat(Postgres Node): Add resource mapper to new version of Postgres node (#5814)
* :zap: scaffolding
* :zap: finished scaffolding
* :zap: renamed types
* :zap: updated subtitle
* :zap: renamed functions file, UI updates
* :zap: query parameters fixes, ui updates, refactoring
* :zap: fixes for credentials test, setup for error parsing
* :zap: rlc for schema and table, error handling tweaks
* :zap: delete operation, new options
* :zap: columns loader
* :zap: linter fixes
* :zap: where clauses setup
* :zap: logic for processing where clauses
* :zap: select operation
* :zap: refactoring
* :zap: data mode for insert and update, wip
* :zap: data mapping, insert update, skip on conflict option
* :zap: select columns with spaces fix
* :zap: update operation update, wip
* :zap: finished update operation
* :zap: upsert operation
* :zap: ui fixes
* Copy updates.
* Copy updates.
* :zap: option to convert empty strings to nulls, schema checks
* :zap: UI requested updates
* :zap: ssh setup WIP
* :zap: fixes, ssh WIP
* :zap: ssh fixes, credentials
* :zap: credentials testing update
* :zap: uncaught error fix
* :zap: clean up
* :zap: address in use fix
* :zap: improved error message
* :zap: tests setup
* :zap: unit tests wip
* :zap: config files clean up
* :zap: utils unit tests
* :zap: refactoring
* :zap: setup for testing operations, tests for deleteTable operation
* :zap: executeQuery and insert operations tests
* :zap: select, update, upsert operations tests
* :zap: runQueries tests setup
* :zap: hint to query
* Copy updates.
* :zap: ui fixes
* :zap: clean up
* :zap: error message update
* :zap: ui update
* Minor tweaks to query params decription.
* ✨ Updated Postgres node to use resource mapper component
* ✨ Implemented postgres <-> resource mapper type mapping
* ✨ Updated Postgres node execution to use resource mapper fields in v3
* 🔥 Removing unused import
---------
Co-authored-by: Michael Kret <michael.k@radency.com>
Co-authored-by: Giulio Andreini <g.andreini@gmail.com>
* feat(core): Resource editor componend P0 (#5970)
* ✨ Added inital value of mapping mode dropdown
* ✨ Finished mapping mode selector
* ✨ Finished implementing mapping mode selector
* ✨ Implemented 'Columns to match on' dropdown
* ✨ Implemented `loadOptionsDependOn` support in resource mapper
* ✨ Implemented initial version of mapping fields
* ✨ Implementing dependant fields watcher in new component setup
* ✨ Generating correct resource mapper field types. Added `supportAutoMap` to node specification and UI. Not showing fields with `display=false`. Pre-selecting matching columns if it's the only one
* ✨ Handling matching columns correctly in UI
* ✨ Saving and loading resourceMapper values in component
* ✨ Implemented proper data saving and loading
* ✨ ResourceMapper component refactor, fixing value save/load
* ✨ Refactoring MatchingColumnSelect component. Updating Sheets node to use single key match and Postgres to use multi key
* ✨ Updated Google Sheets node to work with the new UI
* ✨ Updating Postgres Node to work with new UI
* ✨ Additional loading indicator that shown if there is no mapping mode selector
* ✨ Removing hard-coded values, fixing matching columns ordering, refactoring
* ✨ Updating field names in nodes
* ✨ Fixing minor UI issues
* ✨ Implemented matching fields filter logic
* ✨ Moving loading label outside of fields list
* ✅ Added initial unit tests for resource mapper
* ✅ Finished default rendering test
* ✅ Test refactoring
* ✅ Finished unit tests
* 🔨 Updating the way i18n is used in resource mapper components
* ✔️ Fixing value to match on logic for postgres node
* ✨ Hiding mapping fields when auto-map mode is selected
* ✨ Syncing selected mapping mode between components
* ✨ Fixing dateTime input rendering and adding update check to Postgres node
* ✨ Properly handling database connections. Sending null for empty string values.
* 💄 Updated wording in the error message for non-existing rows
* ✨ Fixing issues with selected matching values
* ✔️ Updating unit tests after matching logic update
* ✨ Updating matching columns when new fields are loaded
* ✨ Defaulting to null for empty parameter values
* ✨ Allowing zero as valid value for number imputs
* ✨ Updated list of types that use datepicker as widger
* ✨ Using text inputs for time types
* ✨ Initial mapping field rework
* ✨ Added new component for mapping fields, moved bit of logic from root component to matching selector, fixing some lint errors
* ✨ Added tooltip for columns that cannot be deleted
* ✨ Saving deleted values in parameter value
* ✨ Implemented control to add/remove mapping fields
* ✨ Syncing field list with add field dropdown when changing dependent values
* ✨ Not showing removed fields in matching columns selector. Updating wording in matching columns selector description
* ✨ Implementing disabled states for add/remove all fields options
* ✨ Saving removed columns separately, updating copy
* ✨ Implemented resource mapper values validation
* ✨ Updated validation logic and error input styling
* ✨ Validating resource mapper fields when new nodes are added
* ✨ Using node field words in validation, refactoring resource mapper component
* ✨ Implemented schema syncing and add/remove all fields
* ✨ Implemented custom parameter actions
* ✨ Implemented loading indicator in parameter options
* 🔨 Removing unnecessary constants and vue props
* ✨ Handling default values properly
* ✨ Fixing validation logic
* 👕 Fixing lint errors
* ⚡ Fixing type issues
* ⚡ Not showing fields by default if `addAllFields` is set to `false`
* ✨ Implemented field type validation in resource mapper
* ✨ Updated casing in copy, removed all/remove all option from bottom menu
* ✨ Added auto mapping mode notice
* ✨ Added support for more types in validation
* ✨ Added support for enumerated values
* ✨ Fixing imports after merging
* ✨ Not showing removed fields in matching columns selector. Refactoring validation logic.
* 👕 Fixing imports
* ✔️ Updating unit tests
* ✅ Added resource mapper schema tests
* ⚡ Removing `match` from resource mapper field definition, fixing matching columns loading
* ⚡ Fixed schema merging
* :zap: update operation return data fix
* :zap: review
* 🐛 Added missing import
* 💄 Updating parameter actions icon based on the ui review
* 💄 Updating word capitalisation in tooltips
* 💄 Added empty state to mapping fields list
* 💄 Removing asterisk from fields, updating tooltips for matching fields
* ⚡ Preventing matching fields from being removed by 'Remove All option'
* ⚡ Not showing hidden fields in the `Add field` dropdown
* ⚡ Added support for custom matching columns labels
* :zap: query optimization
* :zap: fix
* ⚡ Optimizing Postgres node enumeration logic
* ⚡ Added empty state for matching columns
* ⚡ Only fully loading fields if there is no schema fetched
* ⚡ Hiding mapping fields if there is no matching columns available in the schema
* ✔️ Fixing minor issues
* ✨ Implemented runtime type validation
* 🔨 Refactoring validation logic
* ✨ Implemented required check, added more custom messages
* ✨ Skipping boolean type in required check
* Type check improvements
* ✨ Only reloading fields if dependent values actually change
* ✨ Adding item index to validation error title
* ✨ Updating Postgres fetching logic, using resource mapper mode to determine if a field can be deleted
* ✨ Resetting field values when adding them via the addAll option
* ⚡ Using minor version (2.2) for new Postgres node
* ⚡ Implemented proper date validation and type casting
* 👕 Consolidating typing
* ✅ Added unit tests for type validations
* 👌 Addressing front-end review comments
* ⚡ More refactoring to address review changes
* ⚡ Updating leftover props
* ⚡ Added fallback for ISO dates with invalid timezones
* Added timestamp to datetime test cases
* ⚡ Reseting matching columns if operation changes
* ⚡ Not forcing auto-increment fields to be filled in in Postgres node. Handling null values
* 💄 Added a custom message for invalid dates
* ⚡ Better handling of JSON values
* ⚡ Updating codemirror readonly stauts based on component property, handling objects in json validation
* Deleting leftover console.log
* ⚡ Better time validation
* ⚡ Fixing build error after merging
* 👕 Fixing lint error
* ⚡ Updating node configuration values
* ⚡ Handling postgres arrays better
* ⚡ Handling SQL array syntax
* ⚡ Updating time validation rules to include timezone
* ⚡ Sending expressions that resolve to `null` or `undefined` by the resource mapper to delete cell content in Google Sheets
* ⚡ Allowing removed fields to be selected for match
* ⚡ Updated the query for fetching unique columns and primary keys
* ⚡ Optimizing the unique query
* ⚡ Setting timezone to all parsed dates
* ⚡ Addressing PR review feedback
* ⚡ Configuring Sheets node for production, minor vue component update
* New cases added to the TypeValidation test.
* ✅ Tweaking validation rules for arrays/objects and updating test cases
---------
Co-authored-by: Michael Kret <michael.k@radency.com>
Co-authored-by: Giulio Andreini <g.andreini@gmail.com>
2023-05-31 02:56:09 -07:00
| INodeParameterResourceLocator [ ]
| ResourceMapperValue [ ] ;
2022-09-21 06:44:45 -07:00
export interface INodeParameters {
[ key : string ] : NodeParameterValueType ;
2019-06-23 03:35:23 -07:00
}
2021-08-21 05:11:32 -07:00
export type NodePropertyTypes =
| 'boolean'
2023-10-02 08:33:43 -07:00
| 'button'
2021-08-21 05:11:32 -07:00
| 'collection'
| 'color'
| 'dateTime'
| 'fixedCollection'
| 'hidden'
| 'json'
| 'notice'
| 'multiOptions'
| 'number'
| 'options'
2022-05-24 02:36:19 -07:00
| 'string'
2022-09-21 06:44:45 -07:00
| 'credentialsSelect'
2022-09-29 14:28:02 -07:00
| 'resourceLocator'
feat(editor): Implement Resource Mapper component (#6207)
* :zap: scaffolding
* :zap: finished scaffolding
* :zap: renamed types
* :zap: updated subtitle
* :zap: renamed functions file, UI updates
* :zap: query parameters fixes, ui updates, refactoring
* :zap: fixes for credentials test, setup for error parsing
* :zap: rlc for schema and table, error handling tweaks
* :zap: delete operation, new options
* :zap: columns loader
* :zap: linter fixes
* :zap: where clauses setup
* :zap: logic for processing where clauses
* :zap: select operation
* :zap: refactoring
* :zap: data mode for insert and update, wip
* :zap: data mapping, insert update, skip on conflict option
* :zap: select columns with spaces fix
* :zap: update operation update, wip
* :zap: finished update operation
* :zap: upsert operation
* :zap: ui fixes
* Copy updates.
* Copy updates.
* :zap: option to convert empty strings to nulls, schema checks
* :zap: UI requested updates
* :zap: ssh setup WIP
* :zap: fixes, ssh WIP
* :zap: ssh fixes, credentials
* :zap: credentials testing update
* :zap: uncaught error fix
* :zap: clean up
* :zap: address in use fix
* :zap: improved error message
* :zap: tests setup
* :zap: unit tests wip
* :zap: config files clean up
* :zap: utils unit tests
* :zap: refactoring
* :zap: setup for testing operations, tests for deleteTable operation
* :zap: executeQuery and insert operations tests
* :zap: select, update, upsert operations tests
* :zap: runQueries tests setup
* :zap: hint to query
* Copy updates.
* :zap: ui fixes
* :zap: clean up
* :zap: error message update
* :zap: ui update
* Minor tweaks to query params decription.
* feat(Google Sheets Node): Implement Resource mapper in Google Sheets node (#5752)
* ✨ Added initial resource mapping support in google sheets node
* ✨ Wired mapping API endpoint with node-specific logic for fetching mapping fields
* ✨ Implementing mapping fields logic for google sheets
* ✨ Updating Google Sheets execute methods to support resource mapper fields
* 🚧 Added initial version of `ResourceLocator` component
* 👌 Added `update` mode to resource mapper modes
* 👌 Addressing PR feedback
* 👌 Removing leftover const reference
* 👕 Fixing lint errors
* :zap: singlton for conections
* :zap: credentials test fix, clean up
* feat(Postgres Node): Add resource mapper to new version of Postgres node (#5814)
* :zap: scaffolding
* :zap: finished scaffolding
* :zap: renamed types
* :zap: updated subtitle
* :zap: renamed functions file, UI updates
* :zap: query parameters fixes, ui updates, refactoring
* :zap: fixes for credentials test, setup for error parsing
* :zap: rlc for schema and table, error handling tweaks
* :zap: delete operation, new options
* :zap: columns loader
* :zap: linter fixes
* :zap: where clauses setup
* :zap: logic for processing where clauses
* :zap: select operation
* :zap: refactoring
* :zap: data mode for insert and update, wip
* :zap: data mapping, insert update, skip on conflict option
* :zap: select columns with spaces fix
* :zap: update operation update, wip
* :zap: finished update operation
* :zap: upsert operation
* :zap: ui fixes
* Copy updates.
* Copy updates.
* :zap: option to convert empty strings to nulls, schema checks
* :zap: UI requested updates
* :zap: ssh setup WIP
* :zap: fixes, ssh WIP
* :zap: ssh fixes, credentials
* :zap: credentials testing update
* :zap: uncaught error fix
* :zap: clean up
* :zap: address in use fix
* :zap: improved error message
* :zap: tests setup
* :zap: unit tests wip
* :zap: config files clean up
* :zap: utils unit tests
* :zap: refactoring
* :zap: setup for testing operations, tests for deleteTable operation
* :zap: executeQuery and insert operations tests
* :zap: select, update, upsert operations tests
* :zap: runQueries tests setup
* :zap: hint to query
* Copy updates.
* :zap: ui fixes
* :zap: clean up
* :zap: error message update
* :zap: ui update
* Minor tweaks to query params decription.
* ✨ Updated Postgres node to use resource mapper component
* ✨ Implemented postgres <-> resource mapper type mapping
* ✨ Updated Postgres node execution to use resource mapper fields in v3
* 🔥 Removing unused import
---------
Co-authored-by: Michael Kret <michael.k@radency.com>
Co-authored-by: Giulio Andreini <g.andreini@gmail.com>
* feat(core): Resource editor componend P0 (#5970)
* ✨ Added inital value of mapping mode dropdown
* ✨ Finished mapping mode selector
* ✨ Finished implementing mapping mode selector
* ✨ Implemented 'Columns to match on' dropdown
* ✨ Implemented `loadOptionsDependOn` support in resource mapper
* ✨ Implemented initial version of mapping fields
* ✨ Implementing dependant fields watcher in new component setup
* ✨ Generating correct resource mapper field types. Added `supportAutoMap` to node specification and UI. Not showing fields with `display=false`. Pre-selecting matching columns if it's the only one
* ✨ Handling matching columns correctly in UI
* ✨ Saving and loading resourceMapper values in component
* ✨ Implemented proper data saving and loading
* ✨ ResourceMapper component refactor, fixing value save/load
* ✨ Refactoring MatchingColumnSelect component. Updating Sheets node to use single key match and Postgres to use multi key
* ✨ Updated Google Sheets node to work with the new UI
* ✨ Updating Postgres Node to work with new UI
* ✨ Additional loading indicator that shown if there is no mapping mode selector
* ✨ Removing hard-coded values, fixing matching columns ordering, refactoring
* ✨ Updating field names in nodes
* ✨ Fixing minor UI issues
* ✨ Implemented matching fields filter logic
* ✨ Moving loading label outside of fields list
* ✅ Added initial unit tests for resource mapper
* ✅ Finished default rendering test
* ✅ Test refactoring
* ✅ Finished unit tests
* 🔨 Updating the way i18n is used in resource mapper components
* ✔️ Fixing value to match on logic for postgres node
* ✨ Hiding mapping fields when auto-map mode is selected
* ✨ Syncing selected mapping mode between components
* ✨ Fixing dateTime input rendering and adding update check to Postgres node
* ✨ Properly handling database connections. Sending null for empty string values.
* 💄 Updated wording in the error message for non-existing rows
* ✨ Fixing issues with selected matching values
* ✔️ Updating unit tests after matching logic update
* ✨ Updating matching columns when new fields are loaded
* ✨ Defaulting to null for empty parameter values
* ✨ Allowing zero as valid value for number imputs
* ✨ Updated list of types that use datepicker as widger
* ✨ Using text inputs for time types
* ✨ Initial mapping field rework
* ✨ Added new component for mapping fields, moved bit of logic from root component to matching selector, fixing some lint errors
* ✨ Added tooltip for columns that cannot be deleted
* ✨ Saving deleted values in parameter value
* ✨ Implemented control to add/remove mapping fields
* ✨ Syncing field list with add field dropdown when changing dependent values
* ✨ Not showing removed fields in matching columns selector. Updating wording in matching columns selector description
* ✨ Implementing disabled states for add/remove all fields options
* ✨ Saving removed columns separately, updating copy
* ✨ Implemented resource mapper values validation
* ✨ Updated validation logic and error input styling
* ✨ Validating resource mapper fields when new nodes are added
* ✨ Using node field words in validation, refactoring resource mapper component
* ✨ Implemented schema syncing and add/remove all fields
* ✨ Implemented custom parameter actions
* ✨ Implemented loading indicator in parameter options
* 🔨 Removing unnecessary constants and vue props
* ✨ Handling default values properly
* ✨ Fixing validation logic
* 👕 Fixing lint errors
* ⚡ Fixing type issues
* ⚡ Not showing fields by default if `addAllFields` is set to `false`
* ✨ Implemented field type validation in resource mapper
* ✨ Updated casing in copy, removed all/remove all option from bottom menu
* ✨ Added auto mapping mode notice
* ✨ Added support for more types in validation
* ✨ Added support for enumerated values
* ✨ Fixing imports after merging
* ✨ Not showing removed fields in matching columns selector. Refactoring validation logic.
* 👕 Fixing imports
* ✔️ Updating unit tests
* ✅ Added resource mapper schema tests
* ⚡ Removing `match` from resource mapper field definition, fixing matching columns loading
* ⚡ Fixed schema merging
* :zap: update operation return data fix
* :zap: review
* 🐛 Added missing import
* 💄 Updating parameter actions icon based on the ui review
* 💄 Updating word capitalisation in tooltips
* 💄 Added empty state to mapping fields list
* 💄 Removing asterisk from fields, updating tooltips for matching fields
* ⚡ Preventing matching fields from being removed by 'Remove All option'
* ⚡ Not showing hidden fields in the `Add field` dropdown
* ⚡ Added support for custom matching columns labels
* :zap: query optimization
* :zap: fix
* ⚡ Optimizing Postgres node enumeration logic
* ⚡ Added empty state for matching columns
* ⚡ Only fully loading fields if there is no schema fetched
* ⚡ Hiding mapping fields if there is no matching columns available in the schema
* ✔️ Fixing minor issues
* ✨ Implemented runtime type validation
* 🔨 Refactoring validation logic
* ✨ Implemented required check, added more custom messages
* ✨ Skipping boolean type in required check
* Type check improvements
* ✨ Only reloading fields if dependent values actually change
* ✨ Adding item index to validation error title
* ✨ Updating Postgres fetching logic, using resource mapper mode to determine if a field can be deleted
* ✨ Resetting field values when adding them via the addAll option
* ⚡ Using minor version (2.2) for new Postgres node
* ⚡ Implemented proper date validation and type casting
* 👕 Consolidating typing
* ✅ Added unit tests for type validations
* 👌 Addressing front-end review comments
* ⚡ More refactoring to address review changes
* ⚡ Updating leftover props
* ⚡ Added fallback for ISO dates with invalid timezones
* Added timestamp to datetime test cases
* ⚡ Reseting matching columns if operation changes
* ⚡ Not forcing auto-increment fields to be filled in in Postgres node. Handling null values
* 💄 Added a custom message for invalid dates
* ⚡ Better handling of JSON values
* ⚡ Updating codemirror readonly stauts based on component property, handling objects in json validation
* Deleting leftover console.log
* ⚡ Better time validation
* ⚡ Fixing build error after merging
* 👕 Fixing lint error
* ⚡ Updating node configuration values
* ⚡ Handling postgres arrays better
* ⚡ Handling SQL array syntax
* ⚡ Updating time validation rules to include timezone
* ⚡ Sending expressions that resolve to `null` or `undefined` by the resource mapper to delete cell content in Google Sheets
* ⚡ Allowing removed fields to be selected for match
* ⚡ Updated the query for fetching unique columns and primary keys
* ⚡ Optimizing the unique query
* ⚡ Setting timezone to all parsed dates
* ⚡ Addressing PR review feedback
* ⚡ Configuring Sheets node for production, minor vue component update
* New cases added to the TypeValidation test.
* ✅ Tweaking validation rules for arrays/objects and updating test cases
---------
Co-authored-by: Michael Kret <michael.k@radency.com>
Co-authored-by: Giulio Andreini <g.andreini@gmail.com>
2023-05-31 02:56:09 -07:00
| 'curlImport'
2023-11-13 03:11:16 -08:00
| 'resourceMapper'
2023-12-13 05:45:22 -08:00
| 'filter'
2024-02-06 09:34:34 -08:00
| 'assignmentCollection'
2024-08-22 07:59:12 -07:00
| 'credentials'
| 'workflowSelector' ;
2019-06-23 03:35:23 -07:00
2021-12-23 02:41:46 -08:00
export type CodeAutocompleteTypes = 'function' | 'functionItem' ;
2023-12-29 01:49:27 -08:00
export type EditorType = 'codeNodeEditor' | 'jsEditor' | 'htmlEditor' | 'sqlEditor' ;
2023-05-04 11:00:00 -07:00
export type CodeNodeEditorLanguage = ( typeof CODE_LANGUAGES ) [ number ] ;
export type CodeExecutionMode = ( typeof CODE_EXECUTION_MODES ) [ number ] ;
2023-06-22 07:47:28 -07:00
export type SQLDialect =
| 'StandardSQL'
| 'PostgreSQL'
| 'MySQL'
| 'MariaSQL'
| 'MSSQL'
| 'SQLite'
| 'Cassandra'
| 'PLSQL' ;
2019-09-04 09:22:06 -07:00
2022-02-05 13:55:43 -08:00
export interface ILoadOptions {
routing ? : {
operations? : IN8nRequestOperations ;
output? : INodeRequestOutput ;
2022-07-20 04:50:16 -07:00
request? : DeclarativeRestApiSettings.HttpRequestOptions ;
2022-02-05 13:55:43 -08:00
} ;
}
2024-08-14 06:20:02 -07:00
export type NodePropertyAction = {
type : 'askAiCodeGeneration' ;
handler? : string ;
target? : string ;
} ;
2019-06-23 03:35:23 -07:00
export interface INodePropertyTypeOptions {
2024-08-14 06:20:02 -07:00
// Supported by: button
buttonConfig ? : {
action? : string | NodePropertyAction ;
label? : string ; // otherwise "displayName" is used
hasInputField? : boolean ;
inputFieldMaxLength? : number ; // Supported if hasInputField is true
} ;
2023-11-28 07:47:28 -08:00
containerClass? : string ; // Supported by: notice
2022-12-07 06:29:45 -08:00
alwaysOpenEditWindow? : boolean ; // Supported by: json
2021-12-23 02:41:46 -08:00
codeAutocomplete? : CodeAutocompleteTypes ; // Supported by: string
2023-04-25 07:57:21 -07:00
editor? : EditorType ; // Supported by: string
2024-08-14 06:20:02 -07:00
editorIsReadOnly? : boolean ; // Supported by: string
2023-04-25 09:18:27 -07:00
sqlDialect? : SQLDialect ; // Supported by: sqlEditor
2020-01-04 20:28:09 -08:00
loadOptionsDependsOn? : string [ ] ; // Supported by: options
2019-06-23 03:35:23 -07:00
loadOptionsMethod? : string ; // Supported by: options
2022-02-05 13:55:43 -08:00
loadOptions? : ILoadOptions ; // Supported by: options
2019-06-23 03:35:23 -07:00
maxValue? : number ; // Supported by: number
minValue? : number ; // Supported by: number
multipleValues? : boolean ; // Supported by: <All>
multipleValueButtonText? : string ; // Supported when "multipleValues" set to true
numberPrecision? : number ; // Supported by: number
password? : boolean ; // Supported by: string
rows? : number ; // Supported by: string
2020-11-09 02:26:46 -08:00
showAlpha? : boolean ; // Supported by: color
2020-12-26 15:15:33 -08:00
sortable? : boolean ; // Supported when "multipleValues" set to true
2022-07-19 01:09:06 -07:00
expirable? : boolean ; // Supported by: hidden (only in the credentials)
feat(editor): Implement Resource Mapper component (#6207)
* :zap: scaffolding
* :zap: finished scaffolding
* :zap: renamed types
* :zap: updated subtitle
* :zap: renamed functions file, UI updates
* :zap: query parameters fixes, ui updates, refactoring
* :zap: fixes for credentials test, setup for error parsing
* :zap: rlc for schema and table, error handling tweaks
* :zap: delete operation, new options
* :zap: columns loader
* :zap: linter fixes
* :zap: where clauses setup
* :zap: logic for processing where clauses
* :zap: select operation
* :zap: refactoring
* :zap: data mode for insert and update, wip
* :zap: data mapping, insert update, skip on conflict option
* :zap: select columns with spaces fix
* :zap: update operation update, wip
* :zap: finished update operation
* :zap: upsert operation
* :zap: ui fixes
* Copy updates.
* Copy updates.
* :zap: option to convert empty strings to nulls, schema checks
* :zap: UI requested updates
* :zap: ssh setup WIP
* :zap: fixes, ssh WIP
* :zap: ssh fixes, credentials
* :zap: credentials testing update
* :zap: uncaught error fix
* :zap: clean up
* :zap: address in use fix
* :zap: improved error message
* :zap: tests setup
* :zap: unit tests wip
* :zap: config files clean up
* :zap: utils unit tests
* :zap: refactoring
* :zap: setup for testing operations, tests for deleteTable operation
* :zap: executeQuery and insert operations tests
* :zap: select, update, upsert operations tests
* :zap: runQueries tests setup
* :zap: hint to query
* Copy updates.
* :zap: ui fixes
* :zap: clean up
* :zap: error message update
* :zap: ui update
* Minor tweaks to query params decription.
* feat(Google Sheets Node): Implement Resource mapper in Google Sheets node (#5752)
* ✨ Added initial resource mapping support in google sheets node
* ✨ Wired mapping API endpoint with node-specific logic for fetching mapping fields
* ✨ Implementing mapping fields logic for google sheets
* ✨ Updating Google Sheets execute methods to support resource mapper fields
* 🚧 Added initial version of `ResourceLocator` component
* 👌 Added `update` mode to resource mapper modes
* 👌 Addressing PR feedback
* 👌 Removing leftover const reference
* 👕 Fixing lint errors
* :zap: singlton for conections
* :zap: credentials test fix, clean up
* feat(Postgres Node): Add resource mapper to new version of Postgres node (#5814)
* :zap: scaffolding
* :zap: finished scaffolding
* :zap: renamed types
* :zap: updated subtitle
* :zap: renamed functions file, UI updates
* :zap: query parameters fixes, ui updates, refactoring
* :zap: fixes for credentials test, setup for error parsing
* :zap: rlc for schema and table, error handling tweaks
* :zap: delete operation, new options
* :zap: columns loader
* :zap: linter fixes
* :zap: where clauses setup
* :zap: logic for processing where clauses
* :zap: select operation
* :zap: refactoring
* :zap: data mode for insert and update, wip
* :zap: data mapping, insert update, skip on conflict option
* :zap: select columns with spaces fix
* :zap: update operation update, wip
* :zap: finished update operation
* :zap: upsert operation
* :zap: ui fixes
* Copy updates.
* Copy updates.
* :zap: option to convert empty strings to nulls, schema checks
* :zap: UI requested updates
* :zap: ssh setup WIP
* :zap: fixes, ssh WIP
* :zap: ssh fixes, credentials
* :zap: credentials testing update
* :zap: uncaught error fix
* :zap: clean up
* :zap: address in use fix
* :zap: improved error message
* :zap: tests setup
* :zap: unit tests wip
* :zap: config files clean up
* :zap: utils unit tests
* :zap: refactoring
* :zap: setup for testing operations, tests for deleteTable operation
* :zap: executeQuery and insert operations tests
* :zap: select, update, upsert operations tests
* :zap: runQueries tests setup
* :zap: hint to query
* Copy updates.
* :zap: ui fixes
* :zap: clean up
* :zap: error message update
* :zap: ui update
* Minor tweaks to query params decription.
* ✨ Updated Postgres node to use resource mapper component
* ✨ Implemented postgres <-> resource mapper type mapping
* ✨ Updated Postgres node execution to use resource mapper fields in v3
* 🔥 Removing unused import
---------
Co-authored-by: Michael Kret <michael.k@radency.com>
Co-authored-by: Giulio Andreini <g.andreini@gmail.com>
* feat(core): Resource editor componend P0 (#5970)
* ✨ Added inital value of mapping mode dropdown
* ✨ Finished mapping mode selector
* ✨ Finished implementing mapping mode selector
* ✨ Implemented 'Columns to match on' dropdown
* ✨ Implemented `loadOptionsDependOn` support in resource mapper
* ✨ Implemented initial version of mapping fields
* ✨ Implementing dependant fields watcher in new component setup
* ✨ Generating correct resource mapper field types. Added `supportAutoMap` to node specification and UI. Not showing fields with `display=false`. Pre-selecting matching columns if it's the only one
* ✨ Handling matching columns correctly in UI
* ✨ Saving and loading resourceMapper values in component
* ✨ Implemented proper data saving and loading
* ✨ ResourceMapper component refactor, fixing value save/load
* ✨ Refactoring MatchingColumnSelect component. Updating Sheets node to use single key match and Postgres to use multi key
* ✨ Updated Google Sheets node to work with the new UI
* ✨ Updating Postgres Node to work with new UI
* ✨ Additional loading indicator that shown if there is no mapping mode selector
* ✨ Removing hard-coded values, fixing matching columns ordering, refactoring
* ✨ Updating field names in nodes
* ✨ Fixing minor UI issues
* ✨ Implemented matching fields filter logic
* ✨ Moving loading label outside of fields list
* ✅ Added initial unit tests for resource mapper
* ✅ Finished default rendering test
* ✅ Test refactoring
* ✅ Finished unit tests
* 🔨 Updating the way i18n is used in resource mapper components
* ✔️ Fixing value to match on logic for postgres node
* ✨ Hiding mapping fields when auto-map mode is selected
* ✨ Syncing selected mapping mode between components
* ✨ Fixing dateTime input rendering and adding update check to Postgres node
* ✨ Properly handling database connections. Sending null for empty string values.
* 💄 Updated wording in the error message for non-existing rows
* ✨ Fixing issues with selected matching values
* ✔️ Updating unit tests after matching logic update
* ✨ Updating matching columns when new fields are loaded
* ✨ Defaulting to null for empty parameter values
* ✨ Allowing zero as valid value for number imputs
* ✨ Updated list of types that use datepicker as widger
* ✨ Using text inputs for time types
* ✨ Initial mapping field rework
* ✨ Added new component for mapping fields, moved bit of logic from root component to matching selector, fixing some lint errors
* ✨ Added tooltip for columns that cannot be deleted
* ✨ Saving deleted values in parameter value
* ✨ Implemented control to add/remove mapping fields
* ✨ Syncing field list with add field dropdown when changing dependent values
* ✨ Not showing removed fields in matching columns selector. Updating wording in matching columns selector description
* ✨ Implementing disabled states for add/remove all fields options
* ✨ Saving removed columns separately, updating copy
* ✨ Implemented resource mapper values validation
* ✨ Updated validation logic and error input styling
* ✨ Validating resource mapper fields when new nodes are added
* ✨ Using node field words in validation, refactoring resource mapper component
* ✨ Implemented schema syncing and add/remove all fields
* ✨ Implemented custom parameter actions
* ✨ Implemented loading indicator in parameter options
* 🔨 Removing unnecessary constants and vue props
* ✨ Handling default values properly
* ✨ Fixing validation logic
* 👕 Fixing lint errors
* ⚡ Fixing type issues
* ⚡ Not showing fields by default if `addAllFields` is set to `false`
* ✨ Implemented field type validation in resource mapper
* ✨ Updated casing in copy, removed all/remove all option from bottom menu
* ✨ Added auto mapping mode notice
* ✨ Added support for more types in validation
* ✨ Added support for enumerated values
* ✨ Fixing imports after merging
* ✨ Not showing removed fields in matching columns selector. Refactoring validation logic.
* 👕 Fixing imports
* ✔️ Updating unit tests
* ✅ Added resource mapper schema tests
* ⚡ Removing `match` from resource mapper field definition, fixing matching columns loading
* ⚡ Fixed schema merging
* :zap: update operation return data fix
* :zap: review
* 🐛 Added missing import
* 💄 Updating parameter actions icon based on the ui review
* 💄 Updating word capitalisation in tooltips
* 💄 Added empty state to mapping fields list
* 💄 Removing asterisk from fields, updating tooltips for matching fields
* ⚡ Preventing matching fields from being removed by 'Remove All option'
* ⚡ Not showing hidden fields in the `Add field` dropdown
* ⚡ Added support for custom matching columns labels
* :zap: query optimization
* :zap: fix
* ⚡ Optimizing Postgres node enumeration logic
* ⚡ Added empty state for matching columns
* ⚡ Only fully loading fields if there is no schema fetched
* ⚡ Hiding mapping fields if there is no matching columns available in the schema
* ✔️ Fixing minor issues
* ✨ Implemented runtime type validation
* 🔨 Refactoring validation logic
* ✨ Implemented required check, added more custom messages
* ✨ Skipping boolean type in required check
* Type check improvements
* ✨ Only reloading fields if dependent values actually change
* ✨ Adding item index to validation error title
* ✨ Updating Postgres fetching logic, using resource mapper mode to determine if a field can be deleted
* ✨ Resetting field values when adding them via the addAll option
* ⚡ Using minor version (2.2) for new Postgres node
* ⚡ Implemented proper date validation and type casting
* 👕 Consolidating typing
* ✅ Added unit tests for type validations
* 👌 Addressing front-end review comments
* ⚡ More refactoring to address review changes
* ⚡ Updating leftover props
* ⚡ Added fallback for ISO dates with invalid timezones
* Added timestamp to datetime test cases
* ⚡ Reseting matching columns if operation changes
* ⚡ Not forcing auto-increment fields to be filled in in Postgres node. Handling null values
* 💄 Added a custom message for invalid dates
* ⚡ Better handling of JSON values
* ⚡ Updating codemirror readonly stauts based on component property, handling objects in json validation
* Deleting leftover console.log
* ⚡ Better time validation
* ⚡ Fixing build error after merging
* 👕 Fixing lint error
* ⚡ Updating node configuration values
* ⚡ Handling postgres arrays better
* ⚡ Handling SQL array syntax
* ⚡ Updating time validation rules to include timezone
* ⚡ Sending expressions that resolve to `null` or `undefined` by the resource mapper to delete cell content in Google Sheets
* ⚡ Allowing removed fields to be selected for match
* ⚡ Updated the query for fetching unique columns and primary keys
* ⚡ Optimizing the unique query
* ⚡ Setting timezone to all parsed dates
* ⚡ Addressing PR review feedback
* ⚡ Configuring Sheets node for production, minor vue component update
* New cases added to the TypeValidation test.
* ✅ Tweaking validation rules for arrays/objects and updating test cases
---------
Co-authored-by: Michael Kret <michael.k@radency.com>
Co-authored-by: Giulio Andreini <g.andreini@gmail.com>
2023-05-31 02:56:09 -07:00
resourceMapper? : ResourceMapperTypeOptions ;
2023-12-13 05:45:22 -08:00
filter? : FilterTypeOptions ;
2024-02-06 09:34:34 -08:00
assignment? : AssignmentTypeOptions ;
2022-02-05 13:55:43 -08:00
[ key : string ] : any ;
2019-06-23 03:35:23 -07:00
}
feat(editor): Implement Resource Mapper component (#6207)
* :zap: scaffolding
* :zap: finished scaffolding
* :zap: renamed types
* :zap: updated subtitle
* :zap: renamed functions file, UI updates
* :zap: query parameters fixes, ui updates, refactoring
* :zap: fixes for credentials test, setup for error parsing
* :zap: rlc for schema and table, error handling tweaks
* :zap: delete operation, new options
* :zap: columns loader
* :zap: linter fixes
* :zap: where clauses setup
* :zap: logic for processing where clauses
* :zap: select operation
* :zap: refactoring
* :zap: data mode for insert and update, wip
* :zap: data mapping, insert update, skip on conflict option
* :zap: select columns with spaces fix
* :zap: update operation update, wip
* :zap: finished update operation
* :zap: upsert operation
* :zap: ui fixes
* Copy updates.
* Copy updates.
* :zap: option to convert empty strings to nulls, schema checks
* :zap: UI requested updates
* :zap: ssh setup WIP
* :zap: fixes, ssh WIP
* :zap: ssh fixes, credentials
* :zap: credentials testing update
* :zap: uncaught error fix
* :zap: clean up
* :zap: address in use fix
* :zap: improved error message
* :zap: tests setup
* :zap: unit tests wip
* :zap: config files clean up
* :zap: utils unit tests
* :zap: refactoring
* :zap: setup for testing operations, tests for deleteTable operation
* :zap: executeQuery and insert operations tests
* :zap: select, update, upsert operations tests
* :zap: runQueries tests setup
* :zap: hint to query
* Copy updates.
* :zap: ui fixes
* :zap: clean up
* :zap: error message update
* :zap: ui update
* Minor tweaks to query params decription.
* feat(Google Sheets Node): Implement Resource mapper in Google Sheets node (#5752)
* ✨ Added initial resource mapping support in google sheets node
* ✨ Wired mapping API endpoint with node-specific logic for fetching mapping fields
* ✨ Implementing mapping fields logic for google sheets
* ✨ Updating Google Sheets execute methods to support resource mapper fields
* 🚧 Added initial version of `ResourceLocator` component
* 👌 Added `update` mode to resource mapper modes
* 👌 Addressing PR feedback
* 👌 Removing leftover const reference
* 👕 Fixing lint errors
* :zap: singlton for conections
* :zap: credentials test fix, clean up
* feat(Postgres Node): Add resource mapper to new version of Postgres node (#5814)
* :zap: scaffolding
* :zap: finished scaffolding
* :zap: renamed types
* :zap: updated subtitle
* :zap: renamed functions file, UI updates
* :zap: query parameters fixes, ui updates, refactoring
* :zap: fixes for credentials test, setup for error parsing
* :zap: rlc for schema and table, error handling tweaks
* :zap: delete operation, new options
* :zap: columns loader
* :zap: linter fixes
* :zap: where clauses setup
* :zap: logic for processing where clauses
* :zap: select operation
* :zap: refactoring
* :zap: data mode for insert and update, wip
* :zap: data mapping, insert update, skip on conflict option
* :zap: select columns with spaces fix
* :zap: update operation update, wip
* :zap: finished update operation
* :zap: upsert operation
* :zap: ui fixes
* Copy updates.
* Copy updates.
* :zap: option to convert empty strings to nulls, schema checks
* :zap: UI requested updates
* :zap: ssh setup WIP
* :zap: fixes, ssh WIP
* :zap: ssh fixes, credentials
* :zap: credentials testing update
* :zap: uncaught error fix
* :zap: clean up
* :zap: address in use fix
* :zap: improved error message
* :zap: tests setup
* :zap: unit tests wip
* :zap: config files clean up
* :zap: utils unit tests
* :zap: refactoring
* :zap: setup for testing operations, tests for deleteTable operation
* :zap: executeQuery and insert operations tests
* :zap: select, update, upsert operations tests
* :zap: runQueries tests setup
* :zap: hint to query
* Copy updates.
* :zap: ui fixes
* :zap: clean up
* :zap: error message update
* :zap: ui update
* Minor tweaks to query params decription.
* ✨ Updated Postgres node to use resource mapper component
* ✨ Implemented postgres <-> resource mapper type mapping
* ✨ Updated Postgres node execution to use resource mapper fields in v3
* 🔥 Removing unused import
---------
Co-authored-by: Michael Kret <michael.k@radency.com>
Co-authored-by: Giulio Andreini <g.andreini@gmail.com>
* feat(core): Resource editor componend P0 (#5970)
* ✨ Added inital value of mapping mode dropdown
* ✨ Finished mapping mode selector
* ✨ Finished implementing mapping mode selector
* ✨ Implemented 'Columns to match on' dropdown
* ✨ Implemented `loadOptionsDependOn` support in resource mapper
* ✨ Implemented initial version of mapping fields
* ✨ Implementing dependant fields watcher in new component setup
* ✨ Generating correct resource mapper field types. Added `supportAutoMap` to node specification and UI. Not showing fields with `display=false`. Pre-selecting matching columns if it's the only one
* ✨ Handling matching columns correctly in UI
* ✨ Saving and loading resourceMapper values in component
* ✨ Implemented proper data saving and loading
* ✨ ResourceMapper component refactor, fixing value save/load
* ✨ Refactoring MatchingColumnSelect component. Updating Sheets node to use single key match and Postgres to use multi key
* ✨ Updated Google Sheets node to work with the new UI
* ✨ Updating Postgres Node to work with new UI
* ✨ Additional loading indicator that shown if there is no mapping mode selector
* ✨ Removing hard-coded values, fixing matching columns ordering, refactoring
* ✨ Updating field names in nodes
* ✨ Fixing minor UI issues
* ✨ Implemented matching fields filter logic
* ✨ Moving loading label outside of fields list
* ✅ Added initial unit tests for resource mapper
* ✅ Finished default rendering test
* ✅ Test refactoring
* ✅ Finished unit tests
* 🔨 Updating the way i18n is used in resource mapper components
* ✔️ Fixing value to match on logic for postgres node
* ✨ Hiding mapping fields when auto-map mode is selected
* ✨ Syncing selected mapping mode between components
* ✨ Fixing dateTime input rendering and adding update check to Postgres node
* ✨ Properly handling database connections. Sending null for empty string values.
* 💄 Updated wording in the error message for non-existing rows
* ✨ Fixing issues with selected matching values
* ✔️ Updating unit tests after matching logic update
* ✨ Updating matching columns when new fields are loaded
* ✨ Defaulting to null for empty parameter values
* ✨ Allowing zero as valid value for number imputs
* ✨ Updated list of types that use datepicker as widger
* ✨ Using text inputs for time types
* ✨ Initial mapping field rework
* ✨ Added new component for mapping fields, moved bit of logic from root component to matching selector, fixing some lint errors
* ✨ Added tooltip for columns that cannot be deleted
* ✨ Saving deleted values in parameter value
* ✨ Implemented control to add/remove mapping fields
* ✨ Syncing field list with add field dropdown when changing dependent values
* ✨ Not showing removed fields in matching columns selector. Updating wording in matching columns selector description
* ✨ Implementing disabled states for add/remove all fields options
* ✨ Saving removed columns separately, updating copy
* ✨ Implemented resource mapper values validation
* ✨ Updated validation logic and error input styling
* ✨ Validating resource mapper fields when new nodes are added
* ✨ Using node field words in validation, refactoring resource mapper component
* ✨ Implemented schema syncing and add/remove all fields
* ✨ Implemented custom parameter actions
* ✨ Implemented loading indicator in parameter options
* 🔨 Removing unnecessary constants and vue props
* ✨ Handling default values properly
* ✨ Fixing validation logic
* 👕 Fixing lint errors
* ⚡ Fixing type issues
* ⚡ Not showing fields by default if `addAllFields` is set to `false`
* ✨ Implemented field type validation in resource mapper
* ✨ Updated casing in copy, removed all/remove all option from bottom menu
* ✨ Added auto mapping mode notice
* ✨ Added support for more types in validation
* ✨ Added support for enumerated values
* ✨ Fixing imports after merging
* ✨ Not showing removed fields in matching columns selector. Refactoring validation logic.
* 👕 Fixing imports
* ✔️ Updating unit tests
* ✅ Added resource mapper schema tests
* ⚡ Removing `match` from resource mapper field definition, fixing matching columns loading
* ⚡ Fixed schema merging
* :zap: update operation return data fix
* :zap: review
* 🐛 Added missing import
* 💄 Updating parameter actions icon based on the ui review
* 💄 Updating word capitalisation in tooltips
* 💄 Added empty state to mapping fields list
* 💄 Removing asterisk from fields, updating tooltips for matching fields
* ⚡ Preventing matching fields from being removed by 'Remove All option'
* ⚡ Not showing hidden fields in the `Add field` dropdown
* ⚡ Added support for custom matching columns labels
* :zap: query optimization
* :zap: fix
* ⚡ Optimizing Postgres node enumeration logic
* ⚡ Added empty state for matching columns
* ⚡ Only fully loading fields if there is no schema fetched
* ⚡ Hiding mapping fields if there is no matching columns available in the schema
* ✔️ Fixing minor issues
* ✨ Implemented runtime type validation
* 🔨 Refactoring validation logic
* ✨ Implemented required check, added more custom messages
* ✨ Skipping boolean type in required check
* Type check improvements
* ✨ Only reloading fields if dependent values actually change
* ✨ Adding item index to validation error title
* ✨ Updating Postgres fetching logic, using resource mapper mode to determine if a field can be deleted
* ✨ Resetting field values when adding them via the addAll option
* ⚡ Using minor version (2.2) for new Postgres node
* ⚡ Implemented proper date validation and type casting
* 👕 Consolidating typing
* ✅ Added unit tests for type validations
* 👌 Addressing front-end review comments
* ⚡ More refactoring to address review changes
* ⚡ Updating leftover props
* ⚡ Added fallback for ISO dates with invalid timezones
* Added timestamp to datetime test cases
* ⚡ Reseting matching columns if operation changes
* ⚡ Not forcing auto-increment fields to be filled in in Postgres node. Handling null values
* 💄 Added a custom message for invalid dates
* ⚡ Better handling of JSON values
* ⚡ Updating codemirror readonly stauts based on component property, handling objects in json validation
* Deleting leftover console.log
* ⚡ Better time validation
* ⚡ Fixing build error after merging
* 👕 Fixing lint error
* ⚡ Updating node configuration values
* ⚡ Handling postgres arrays better
* ⚡ Handling SQL array syntax
* ⚡ Updating time validation rules to include timezone
* ⚡ Sending expressions that resolve to `null` or `undefined` by the resource mapper to delete cell content in Google Sheets
* ⚡ Allowing removed fields to be selected for match
* ⚡ Updated the query for fetching unique columns and primary keys
* ⚡ Optimizing the unique query
* ⚡ Setting timezone to all parsed dates
* ⚡ Addressing PR review feedback
* ⚡ Configuring Sheets node for production, minor vue component update
* New cases added to the TypeValidation test.
* ✅ Tweaking validation rules for arrays/objects and updating test cases
---------
Co-authored-by: Michael Kret <michael.k@radency.com>
Co-authored-by: Giulio Andreini <g.andreini@gmail.com>
2023-05-31 02:56:09 -07:00
export interface ResourceMapperTypeOptions {
resourceMapperMethod : string ;
mode : 'add' | 'update' | 'upsert' ;
2023-09-04 08:15:52 -07:00
valuesLabel? : string ;
feat(editor): Implement Resource Mapper component (#6207)
* :zap: scaffolding
* :zap: finished scaffolding
* :zap: renamed types
* :zap: updated subtitle
* :zap: renamed functions file, UI updates
* :zap: query parameters fixes, ui updates, refactoring
* :zap: fixes for credentials test, setup for error parsing
* :zap: rlc for schema and table, error handling tweaks
* :zap: delete operation, new options
* :zap: columns loader
* :zap: linter fixes
* :zap: where clauses setup
* :zap: logic for processing where clauses
* :zap: select operation
* :zap: refactoring
* :zap: data mode for insert and update, wip
* :zap: data mapping, insert update, skip on conflict option
* :zap: select columns with spaces fix
* :zap: update operation update, wip
* :zap: finished update operation
* :zap: upsert operation
* :zap: ui fixes
* Copy updates.
* Copy updates.
* :zap: option to convert empty strings to nulls, schema checks
* :zap: UI requested updates
* :zap: ssh setup WIP
* :zap: fixes, ssh WIP
* :zap: ssh fixes, credentials
* :zap: credentials testing update
* :zap: uncaught error fix
* :zap: clean up
* :zap: address in use fix
* :zap: improved error message
* :zap: tests setup
* :zap: unit tests wip
* :zap: config files clean up
* :zap: utils unit tests
* :zap: refactoring
* :zap: setup for testing operations, tests for deleteTable operation
* :zap: executeQuery and insert operations tests
* :zap: select, update, upsert operations tests
* :zap: runQueries tests setup
* :zap: hint to query
* Copy updates.
* :zap: ui fixes
* :zap: clean up
* :zap: error message update
* :zap: ui update
* Minor tweaks to query params decription.
* feat(Google Sheets Node): Implement Resource mapper in Google Sheets node (#5752)
* ✨ Added initial resource mapping support in google sheets node
* ✨ Wired mapping API endpoint with node-specific logic for fetching mapping fields
* ✨ Implementing mapping fields logic for google sheets
* ✨ Updating Google Sheets execute methods to support resource mapper fields
* 🚧 Added initial version of `ResourceLocator` component
* 👌 Added `update` mode to resource mapper modes
* 👌 Addressing PR feedback
* 👌 Removing leftover const reference
* 👕 Fixing lint errors
* :zap: singlton for conections
* :zap: credentials test fix, clean up
* feat(Postgres Node): Add resource mapper to new version of Postgres node (#5814)
* :zap: scaffolding
* :zap: finished scaffolding
* :zap: renamed types
* :zap: updated subtitle
* :zap: renamed functions file, UI updates
* :zap: query parameters fixes, ui updates, refactoring
* :zap: fixes for credentials test, setup for error parsing
* :zap: rlc for schema and table, error handling tweaks
* :zap: delete operation, new options
* :zap: columns loader
* :zap: linter fixes
* :zap: where clauses setup
* :zap: logic for processing where clauses
* :zap: select operation
* :zap: refactoring
* :zap: data mode for insert and update, wip
* :zap: data mapping, insert update, skip on conflict option
* :zap: select columns with spaces fix
* :zap: update operation update, wip
* :zap: finished update operation
* :zap: upsert operation
* :zap: ui fixes
* Copy updates.
* Copy updates.
* :zap: option to convert empty strings to nulls, schema checks
* :zap: UI requested updates
* :zap: ssh setup WIP
* :zap: fixes, ssh WIP
* :zap: ssh fixes, credentials
* :zap: credentials testing update
* :zap: uncaught error fix
* :zap: clean up
* :zap: address in use fix
* :zap: improved error message
* :zap: tests setup
* :zap: unit tests wip
* :zap: config files clean up
* :zap: utils unit tests
* :zap: refactoring
* :zap: setup for testing operations, tests for deleteTable operation
* :zap: executeQuery and insert operations tests
* :zap: select, update, upsert operations tests
* :zap: runQueries tests setup
* :zap: hint to query
* Copy updates.
* :zap: ui fixes
* :zap: clean up
* :zap: error message update
* :zap: ui update
* Minor tweaks to query params decription.
* ✨ Updated Postgres node to use resource mapper component
* ✨ Implemented postgres <-> resource mapper type mapping
* ✨ Updated Postgres node execution to use resource mapper fields in v3
* 🔥 Removing unused import
---------
Co-authored-by: Michael Kret <michael.k@radency.com>
Co-authored-by: Giulio Andreini <g.andreini@gmail.com>
* feat(core): Resource editor componend P0 (#5970)
* ✨ Added inital value of mapping mode dropdown
* ✨ Finished mapping mode selector
* ✨ Finished implementing mapping mode selector
* ✨ Implemented 'Columns to match on' dropdown
* ✨ Implemented `loadOptionsDependOn` support in resource mapper
* ✨ Implemented initial version of mapping fields
* ✨ Implementing dependant fields watcher in new component setup
* ✨ Generating correct resource mapper field types. Added `supportAutoMap` to node specification and UI. Not showing fields with `display=false`. Pre-selecting matching columns if it's the only one
* ✨ Handling matching columns correctly in UI
* ✨ Saving and loading resourceMapper values in component
* ✨ Implemented proper data saving and loading
* ✨ ResourceMapper component refactor, fixing value save/load
* ✨ Refactoring MatchingColumnSelect component. Updating Sheets node to use single key match and Postgres to use multi key
* ✨ Updated Google Sheets node to work with the new UI
* ✨ Updating Postgres Node to work with new UI
* ✨ Additional loading indicator that shown if there is no mapping mode selector
* ✨ Removing hard-coded values, fixing matching columns ordering, refactoring
* ✨ Updating field names in nodes
* ✨ Fixing minor UI issues
* ✨ Implemented matching fields filter logic
* ✨ Moving loading label outside of fields list
* ✅ Added initial unit tests for resource mapper
* ✅ Finished default rendering test
* ✅ Test refactoring
* ✅ Finished unit tests
* 🔨 Updating the way i18n is used in resource mapper components
* ✔️ Fixing value to match on logic for postgres node
* ✨ Hiding mapping fields when auto-map mode is selected
* ✨ Syncing selected mapping mode between components
* ✨ Fixing dateTime input rendering and adding update check to Postgres node
* ✨ Properly handling database connections. Sending null for empty string values.
* 💄 Updated wording in the error message for non-existing rows
* ✨ Fixing issues with selected matching values
* ✔️ Updating unit tests after matching logic update
* ✨ Updating matching columns when new fields are loaded
* ✨ Defaulting to null for empty parameter values
* ✨ Allowing zero as valid value for number imputs
* ✨ Updated list of types that use datepicker as widger
* ✨ Using text inputs for time types
* ✨ Initial mapping field rework
* ✨ Added new component for mapping fields, moved bit of logic from root component to matching selector, fixing some lint errors
* ✨ Added tooltip for columns that cannot be deleted
* ✨ Saving deleted values in parameter value
* ✨ Implemented control to add/remove mapping fields
* ✨ Syncing field list with add field dropdown when changing dependent values
* ✨ Not showing removed fields in matching columns selector. Updating wording in matching columns selector description
* ✨ Implementing disabled states for add/remove all fields options
* ✨ Saving removed columns separately, updating copy
* ✨ Implemented resource mapper values validation
* ✨ Updated validation logic and error input styling
* ✨ Validating resource mapper fields when new nodes are added
* ✨ Using node field words in validation, refactoring resource mapper component
* ✨ Implemented schema syncing and add/remove all fields
* ✨ Implemented custom parameter actions
* ✨ Implemented loading indicator in parameter options
* 🔨 Removing unnecessary constants and vue props
* ✨ Handling default values properly
* ✨ Fixing validation logic
* 👕 Fixing lint errors
* ⚡ Fixing type issues
* ⚡ Not showing fields by default if `addAllFields` is set to `false`
* ✨ Implemented field type validation in resource mapper
* ✨ Updated casing in copy, removed all/remove all option from bottom menu
* ✨ Added auto mapping mode notice
* ✨ Added support for more types in validation
* ✨ Added support for enumerated values
* ✨ Fixing imports after merging
* ✨ Not showing removed fields in matching columns selector. Refactoring validation logic.
* 👕 Fixing imports
* ✔️ Updating unit tests
* ✅ Added resource mapper schema tests
* ⚡ Removing `match` from resource mapper field definition, fixing matching columns loading
* ⚡ Fixed schema merging
* :zap: update operation return data fix
* :zap: review
* 🐛 Added missing import
* 💄 Updating parameter actions icon based on the ui review
* 💄 Updating word capitalisation in tooltips
* 💄 Added empty state to mapping fields list
* 💄 Removing asterisk from fields, updating tooltips for matching fields
* ⚡ Preventing matching fields from being removed by 'Remove All option'
* ⚡ Not showing hidden fields in the `Add field` dropdown
* ⚡ Added support for custom matching columns labels
* :zap: query optimization
* :zap: fix
* ⚡ Optimizing Postgres node enumeration logic
* ⚡ Added empty state for matching columns
* ⚡ Only fully loading fields if there is no schema fetched
* ⚡ Hiding mapping fields if there is no matching columns available in the schema
* ✔️ Fixing minor issues
* ✨ Implemented runtime type validation
* 🔨 Refactoring validation logic
* ✨ Implemented required check, added more custom messages
* ✨ Skipping boolean type in required check
* Type check improvements
* ✨ Only reloading fields if dependent values actually change
* ✨ Adding item index to validation error title
* ✨ Updating Postgres fetching logic, using resource mapper mode to determine if a field can be deleted
* ✨ Resetting field values when adding them via the addAll option
* ⚡ Using minor version (2.2) for new Postgres node
* ⚡ Implemented proper date validation and type casting
* 👕 Consolidating typing
* ✅ Added unit tests for type validations
* 👌 Addressing front-end review comments
* ⚡ More refactoring to address review changes
* ⚡ Updating leftover props
* ⚡ Added fallback for ISO dates with invalid timezones
* Added timestamp to datetime test cases
* ⚡ Reseting matching columns if operation changes
* ⚡ Not forcing auto-increment fields to be filled in in Postgres node. Handling null values
* 💄 Added a custom message for invalid dates
* ⚡ Better handling of JSON values
* ⚡ Updating codemirror readonly stauts based on component property, handling objects in json validation
* Deleting leftover console.log
* ⚡ Better time validation
* ⚡ Fixing build error after merging
* 👕 Fixing lint error
* ⚡ Updating node configuration values
* ⚡ Handling postgres arrays better
* ⚡ Handling SQL array syntax
* ⚡ Updating time validation rules to include timezone
* ⚡ Sending expressions that resolve to `null` or `undefined` by the resource mapper to delete cell content in Google Sheets
* ⚡ Allowing removed fields to be selected for match
* ⚡ Updated the query for fetching unique columns and primary keys
* ⚡ Optimizing the unique query
* ⚡ Setting timezone to all parsed dates
* ⚡ Addressing PR review feedback
* ⚡ Configuring Sheets node for production, minor vue component update
* New cases added to the TypeValidation test.
* ✅ Tweaking validation rules for arrays/objects and updating test cases
---------
Co-authored-by: Michael Kret <michael.k@radency.com>
Co-authored-by: Giulio Andreini <g.andreini@gmail.com>
2023-05-31 02:56:09 -07:00
fieldWords ? : { singular : string ; plural : string } ;
addAllFields? : boolean ;
noFieldsError? : string ;
multiKeyMatch? : boolean ;
supportAutoMap? : boolean ;
matchingFieldsLabels ? : {
title? : string ;
description? : string ;
hint? : string ;
} ;
}
2023-12-13 05:45:22 -08:00
type NonEmptyArray < T > = [ T , . . . T [ ] ] ;
export type FilterTypeCombinator = 'and' | 'or' ;
2024-09-09 00:54:36 -07:00
export type FilterTypeOptions = {
version : 1 | 2 | { } ; // required so nodes are pinned on a version
caseSensitive? : boolean | string ; // default = true
leftValue? : string ; // when set, user can't edit left side of condition
allowedCombinators? : NonEmptyArray < FilterTypeCombinator > ; // default = ['and', 'or']
maxConditions? : number ; // default = 10
typeValidation ? : 'strict' | 'loose' | { } ; // default = strict, `| {}` is a TypeScript trick to allow custom strings (expressions), but still give autocomplete
} ;
2023-12-13 05:45:22 -08:00
2024-02-06 09:34:34 -08:00
export type AssignmentTypeOptions = Partial < {
hideType? : boolean ; // visible by default
} > ;
2024-01-24 08:04:46 -08:00
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 } }
2024-07-16 23:25:16 -07:00
| { _cnd : { regex : string } }
| { _cnd : { exists : true } } ;
2024-01-24 08:04:46 -08:00
2019-06-23 03:35:23 -07:00
export interface IDisplayOptions {
2024-01-24 08:04:46 -08:00
hide ? : {
[ key : string ] : Array < NodeParameterValue | DisplayCondition > | undefined ;
} ;
show ? : {
'@version' ? : Array < number | DisplayCondition > ;
[ key : string ] : Array < NodeParameterValue | DisplayCondition > | undefined ;
} ;
hideOnCloud? : boolean ;
}
export interface ICredentialsDisplayOptions {
2019-06-23 03:35:23 -07:00
hide ? : {
2021-09-21 10:38:24 -07:00
[ key : string ] : NodeParameterValue [ ] | undefined ;
2019-06-23 03:35:23 -07:00
} ;
show ? : {
2023-10-05 05:57:47 -07:00
'@version' ? : number [ ] ;
2021-09-21 10:38:24 -07:00
[ key : string ] : NodeParameterValue [ ] | undefined ;
2019-06-23 03:35:23 -07:00
} ;
2023-07-18 02:43:28 -07:00
hideOnCloud? : boolean ;
2019-06-23 03:35:23 -07:00
}
export interface INodeProperties {
displayName : string ;
name : string ;
type : NodePropertyTypes ;
typeOptions? : INodePropertyTypeOptions ;
2022-09-21 06:44:45 -07:00
default : NodeParameterValueType ;
2019-06-23 03:35:23 -07:00
description? : string ;
2022-01-27 22:55:25 -08:00
hint? : string ;
2019-06-23 03:35:23 -07:00
displayOptions? : IDisplayOptions ;
2021-02-20 04:51:06 -08:00
options? : Array < INodePropertyOptions | INodeProperties | INodePropertyCollection > ;
2019-06-23 03:35:23 -07:00
placeholder? : string ;
isNodeSetting? : boolean ;
noDataExpression? : boolean ;
required? : boolean ;
2022-02-05 13:55:43 -08:00
routing? : INodePropertyRouting ;
2022-05-24 02:36:19 -07:00
credentialTypes? : Array <
'extends:oAuth2Api' | 'extends:oAuth1Api' | 'has:authenticate' | 'has:genericAuth'
> ;
2022-09-21 06:44:45 -07:00
extractValue? : INodePropertyValueExtractor ;
modes? : INodePropertyMode [ ] ;
2023-01-30 03:42:08 -08:00
requiresDataPath ? : 'single' | 'multiple' ;
2023-07-26 08:56:59 -07:00
doNotInherit? : boolean ;
2023-09-19 03:16:35 -07:00
// set expected type for the value which would be used for validation and type casting
validateType? : FieldType ;
// works only if validateType is set
// allows to skip validation during execution or set custom validation/casting logic inside node
// inline error messages would still be shown in UI
ignoreValidationDuringExecution? : boolean ;
2022-09-21 06:44:45 -07:00
}
export interface INodePropertyModeTypeOptions {
searchListMethod? : string ; // Supported by: options
searchFilterRequired? : boolean ;
searchable? : boolean ;
2019-06-23 03:35:23 -07:00
}
2022-09-21 06:44:45 -07:00
export interface INodePropertyMode {
displayName : string ;
name : string ;
type : 'string' | 'list' ;
hint? : string ;
validation? : Array <
INodePropertyModeValidation | { ( this : IExecuteSingleFunctions , value : string ) : void }
> ;
placeholder? : string ;
url? : string ;
extractValue? : INodePropertyValueExtractor ;
initType? : string ;
entryTypes ? : {
[ name : string ] : {
selectable? : boolean ;
hidden? : boolean ;
queryable? : boolean ;
data ? : {
request? : IHttpRequestOptions ;
output? : INodeRequestOutput ;
} ;
} ;
} ;
search? : INodePropertyRouting ;
typeOptions? : INodePropertyModeTypeOptions ;
}
export interface INodePropertyModeValidation {
type : string ;
properties : { } ;
}
export interface INodePropertyRegexValidation extends INodePropertyModeValidation {
type : 'regex' ;
properties : {
regex : string ;
errorMessage : string ;
} ;
}
2019-06-23 03:35:23 -07:00
export interface INodePropertyOptions {
name : string ;
2021-12-03 00:44:16 -08:00
value : string | number | boolean ;
2022-07-04 12:54:56 -07:00
action? : string ;
2019-06-23 03:35:23 -07:00
description? : string ;
2022-02-05 13:55:43 -08:00
routing? : INodePropertyRouting ;
2019-06-23 03:35:23 -07:00
}
2022-09-21 06:44:45 -07:00
export interface INodeListSearchItems extends INodePropertyOptions {
icon? : string ;
url? : string ;
}
export interface INodeListSearchResult {
results : INodeListSearchItems [ ] ;
paginationToken? : unknown ;
}
2019-06-23 03:35:23 -07:00
export interface INodePropertyCollection {
displayName : string ;
name : string ;
values : INodeProperties [ ] ;
}
2022-09-21 06:44:45 -07:00
export interface INodePropertyValueExtractorBase {
type : string ;
}
export interface INodePropertyValueExtractorRegex extends INodePropertyValueExtractorBase {
type : 'regex' ;
regex : string | RegExp ;
}
export interface INodePropertyValueExtractorFunction {
2023-07-28 09:28:17 -07:00
(
this : IExecuteSingleFunctions ,
value : string | NodeParameterValue ,
) : Promise < string | NodeParameterValue > | ( string | NodeParameterValue ) ;
2022-09-21 06:44:45 -07:00
}
export type INodePropertyValueExtractor = INodePropertyValueExtractorRegex ;
2019-07-13 10:50:41 -07:00
export interface IParameterDependencies {
[ key : string ] : string [ ] ;
}
2023-01-20 08:07:28 -08:00
export type IParameterLabel = {
size ? : 'small' | 'medium' ;
} ;
2019-06-23 03:35:23 -07:00
export interface ITriggerResponse {
2023-12-21 05:21:09 -08:00
closeFunction? : CloseFunction ;
2019-06-23 03:35:23 -07:00
// To manually trigger the run
2024-07-16 11:42:48 -07:00
manualTriggerFunction ? : ( ) = > Promise < void > ;
2019-06-23 03:35:23 -07:00
// Gets added automatically at manual workflow runs resolves with
// the first emitted data
manualTriggerResponse? : Promise < INodeExecutionData [ ] [ ] > ;
}
2023-03-17 04:25:31 -07:00
export type WebhookSetupMethodNames = 'checkExists' | 'create' | 'delete' ;
2023-08-01 08:32:30 -07:00
export namespace MultiPartFormData {
export interface File {
filepath : string ;
mimetype? : string ;
originalFilename? : string ;
newFilename : string ;
2024-07-29 05:58:03 -07:00
size? : number ;
2023-08-01 08:32:30 -07:00
}
export type Request = express . Request <
{ } ,
{ } ,
{
data : Record < string , string | string [ ] > ;
files : Record < string , File | File [ ] > ;
}
> ;
}
2023-10-02 08:33:43 -07:00
export interface SupplyData {
metadata? : IDataObject ;
response : unknown ;
2023-12-21 05:21:09 -08:00
closeFunction? : CloseFunction ;
2023-10-02 08:33:43 -07:00
}
2024-05-13 05:46:02 -07:00
export class NodeExecutionOutput extends Array {
private hints : NodeExecutionHint [ ] ;
constructor ( data : INodeExecutionData [ ] [ ] , hints : NodeExecutionHint [ ] = [ ] ) {
super ( ) ;
this . push ( . . . data ) ;
this . hints = hints ;
}
public getHints ( ) : NodeExecutionHint [ ] {
return this . hints ;
}
}
2019-06-23 03:35:23 -07:00
export interface INodeType {
description : INodeTypeDescription ;
2024-01-09 03:11:39 -08:00
supplyData ? ( this : IAllExecuteFunctions , itemIndex : number ) : Promise < SupplyData > ;
2022-08-30 08:55:33 -07:00
execute ? (
this : IExecuteFunctions ,
) : Promise < INodeExecutionData [ ] [ ] | NodeExecutionWithMetadata [ ] [ ] | null > ;
2019-12-31 12:19:37 -08:00
poll ? ( this : IPollFunctions ) : Promise < INodeExecutionData [ ] [ ] | null > ;
2019-06-23 03:35:23 -07:00
trigger ? ( this : ITriggerFunctions ) : Promise < ITriggerResponse | undefined > ;
2019-10-11 04:02:44 -07:00
webhook ? ( this : IWebhookFunctions ) : Promise < IWebhookResponseData > ;
2019-06-23 03:35:23 -07:00
methods ? : {
loadOptions ? : {
[ key : string ] : ( this : ILoadOptionsFunctions ) = > Promise < INodePropertyOptions [ ] > ;
} ;
2022-09-21 06:44:45 -07:00
listSearch ? : {
[ key : string ] : (
this : ILoadOptionsFunctions ,
filter? : string ,
paginationToken? : string ,
) = > Promise < INodeListSearchResult > ;
} ;
2021-09-11 01:15:36 -07:00
credentialTest ? : {
2022-09-02 07:13:17 -07:00
// Contains a group of functions that test credentials.
2022-02-05 13:55:43 -08:00
[ functionName : string ] : ICredentialTestFunction ;
2021-09-11 01:15:36 -07:00
} ;
feat(editor): Implement Resource Mapper component (#6207)
* :zap: scaffolding
* :zap: finished scaffolding
* :zap: renamed types
* :zap: updated subtitle
* :zap: renamed functions file, UI updates
* :zap: query parameters fixes, ui updates, refactoring
* :zap: fixes for credentials test, setup for error parsing
* :zap: rlc for schema and table, error handling tweaks
* :zap: delete operation, new options
* :zap: columns loader
* :zap: linter fixes
* :zap: where clauses setup
* :zap: logic for processing where clauses
* :zap: select operation
* :zap: refactoring
* :zap: data mode for insert and update, wip
* :zap: data mapping, insert update, skip on conflict option
* :zap: select columns with spaces fix
* :zap: update operation update, wip
* :zap: finished update operation
* :zap: upsert operation
* :zap: ui fixes
* Copy updates.
* Copy updates.
* :zap: option to convert empty strings to nulls, schema checks
* :zap: UI requested updates
* :zap: ssh setup WIP
* :zap: fixes, ssh WIP
* :zap: ssh fixes, credentials
* :zap: credentials testing update
* :zap: uncaught error fix
* :zap: clean up
* :zap: address in use fix
* :zap: improved error message
* :zap: tests setup
* :zap: unit tests wip
* :zap: config files clean up
* :zap: utils unit tests
* :zap: refactoring
* :zap: setup for testing operations, tests for deleteTable operation
* :zap: executeQuery and insert operations tests
* :zap: select, update, upsert operations tests
* :zap: runQueries tests setup
* :zap: hint to query
* Copy updates.
* :zap: ui fixes
* :zap: clean up
* :zap: error message update
* :zap: ui update
* Minor tweaks to query params decription.
* feat(Google Sheets Node): Implement Resource mapper in Google Sheets node (#5752)
* ✨ Added initial resource mapping support in google sheets node
* ✨ Wired mapping API endpoint with node-specific logic for fetching mapping fields
* ✨ Implementing mapping fields logic for google sheets
* ✨ Updating Google Sheets execute methods to support resource mapper fields
* 🚧 Added initial version of `ResourceLocator` component
* 👌 Added `update` mode to resource mapper modes
* 👌 Addressing PR feedback
* 👌 Removing leftover const reference
* 👕 Fixing lint errors
* :zap: singlton for conections
* :zap: credentials test fix, clean up
* feat(Postgres Node): Add resource mapper to new version of Postgres node (#5814)
* :zap: scaffolding
* :zap: finished scaffolding
* :zap: renamed types
* :zap: updated subtitle
* :zap: renamed functions file, UI updates
* :zap: query parameters fixes, ui updates, refactoring
* :zap: fixes for credentials test, setup for error parsing
* :zap: rlc for schema and table, error handling tweaks
* :zap: delete operation, new options
* :zap: columns loader
* :zap: linter fixes
* :zap: where clauses setup
* :zap: logic for processing where clauses
* :zap: select operation
* :zap: refactoring
* :zap: data mode for insert and update, wip
* :zap: data mapping, insert update, skip on conflict option
* :zap: select columns with spaces fix
* :zap: update operation update, wip
* :zap: finished update operation
* :zap: upsert operation
* :zap: ui fixes
* Copy updates.
* Copy updates.
* :zap: option to convert empty strings to nulls, schema checks
* :zap: UI requested updates
* :zap: ssh setup WIP
* :zap: fixes, ssh WIP
* :zap: ssh fixes, credentials
* :zap: credentials testing update
* :zap: uncaught error fix
* :zap: clean up
* :zap: address in use fix
* :zap: improved error message
* :zap: tests setup
* :zap: unit tests wip
* :zap: config files clean up
* :zap: utils unit tests
* :zap: refactoring
* :zap: setup for testing operations, tests for deleteTable operation
* :zap: executeQuery and insert operations tests
* :zap: select, update, upsert operations tests
* :zap: runQueries tests setup
* :zap: hint to query
* Copy updates.
* :zap: ui fixes
* :zap: clean up
* :zap: error message update
* :zap: ui update
* Minor tweaks to query params decription.
* ✨ Updated Postgres node to use resource mapper component
* ✨ Implemented postgres <-> resource mapper type mapping
* ✨ Updated Postgres node execution to use resource mapper fields in v3
* 🔥 Removing unused import
---------
Co-authored-by: Michael Kret <michael.k@radency.com>
Co-authored-by: Giulio Andreini <g.andreini@gmail.com>
* feat(core): Resource editor componend P0 (#5970)
* ✨ Added inital value of mapping mode dropdown
* ✨ Finished mapping mode selector
* ✨ Finished implementing mapping mode selector
* ✨ Implemented 'Columns to match on' dropdown
* ✨ Implemented `loadOptionsDependOn` support in resource mapper
* ✨ Implemented initial version of mapping fields
* ✨ Implementing dependant fields watcher in new component setup
* ✨ Generating correct resource mapper field types. Added `supportAutoMap` to node specification and UI. Not showing fields with `display=false`. Pre-selecting matching columns if it's the only one
* ✨ Handling matching columns correctly in UI
* ✨ Saving and loading resourceMapper values in component
* ✨ Implemented proper data saving and loading
* ✨ ResourceMapper component refactor, fixing value save/load
* ✨ Refactoring MatchingColumnSelect component. Updating Sheets node to use single key match and Postgres to use multi key
* ✨ Updated Google Sheets node to work with the new UI
* ✨ Updating Postgres Node to work with new UI
* ✨ Additional loading indicator that shown if there is no mapping mode selector
* ✨ Removing hard-coded values, fixing matching columns ordering, refactoring
* ✨ Updating field names in nodes
* ✨ Fixing minor UI issues
* ✨ Implemented matching fields filter logic
* ✨ Moving loading label outside of fields list
* ✅ Added initial unit tests for resource mapper
* ✅ Finished default rendering test
* ✅ Test refactoring
* ✅ Finished unit tests
* 🔨 Updating the way i18n is used in resource mapper components
* ✔️ Fixing value to match on logic for postgres node
* ✨ Hiding mapping fields when auto-map mode is selected
* ✨ Syncing selected mapping mode between components
* ✨ Fixing dateTime input rendering and adding update check to Postgres node
* ✨ Properly handling database connections. Sending null for empty string values.
* 💄 Updated wording in the error message for non-existing rows
* ✨ Fixing issues with selected matching values
* ✔️ Updating unit tests after matching logic update
* ✨ Updating matching columns when new fields are loaded
* ✨ Defaulting to null for empty parameter values
* ✨ Allowing zero as valid value for number imputs
* ✨ Updated list of types that use datepicker as widger
* ✨ Using text inputs for time types
* ✨ Initial mapping field rework
* ✨ Added new component for mapping fields, moved bit of logic from root component to matching selector, fixing some lint errors
* ✨ Added tooltip for columns that cannot be deleted
* ✨ Saving deleted values in parameter value
* ✨ Implemented control to add/remove mapping fields
* ✨ Syncing field list with add field dropdown when changing dependent values
* ✨ Not showing removed fields in matching columns selector. Updating wording in matching columns selector description
* ✨ Implementing disabled states for add/remove all fields options
* ✨ Saving removed columns separately, updating copy
* ✨ Implemented resource mapper values validation
* ✨ Updated validation logic and error input styling
* ✨ Validating resource mapper fields when new nodes are added
* ✨ Using node field words in validation, refactoring resource mapper component
* ✨ Implemented schema syncing and add/remove all fields
* ✨ Implemented custom parameter actions
* ✨ Implemented loading indicator in parameter options
* 🔨 Removing unnecessary constants and vue props
* ✨ Handling default values properly
* ✨ Fixing validation logic
* 👕 Fixing lint errors
* ⚡ Fixing type issues
* ⚡ Not showing fields by default if `addAllFields` is set to `false`
* ✨ Implemented field type validation in resource mapper
* ✨ Updated casing in copy, removed all/remove all option from bottom menu
* ✨ Added auto mapping mode notice
* ✨ Added support for more types in validation
* ✨ Added support for enumerated values
* ✨ Fixing imports after merging
* ✨ Not showing removed fields in matching columns selector. Refactoring validation logic.
* 👕 Fixing imports
* ✔️ Updating unit tests
* ✅ Added resource mapper schema tests
* ⚡ Removing `match` from resource mapper field definition, fixing matching columns loading
* ⚡ Fixed schema merging
* :zap: update operation return data fix
* :zap: review
* 🐛 Added missing import
* 💄 Updating parameter actions icon based on the ui review
* 💄 Updating word capitalisation in tooltips
* 💄 Added empty state to mapping fields list
* 💄 Removing asterisk from fields, updating tooltips for matching fields
* ⚡ Preventing matching fields from being removed by 'Remove All option'
* ⚡ Not showing hidden fields in the `Add field` dropdown
* ⚡ Added support for custom matching columns labels
* :zap: query optimization
* :zap: fix
* ⚡ Optimizing Postgres node enumeration logic
* ⚡ Added empty state for matching columns
* ⚡ Only fully loading fields if there is no schema fetched
* ⚡ Hiding mapping fields if there is no matching columns available in the schema
* ✔️ Fixing minor issues
* ✨ Implemented runtime type validation
* 🔨 Refactoring validation logic
* ✨ Implemented required check, added more custom messages
* ✨ Skipping boolean type in required check
* Type check improvements
* ✨ Only reloading fields if dependent values actually change
* ✨ Adding item index to validation error title
* ✨ Updating Postgres fetching logic, using resource mapper mode to determine if a field can be deleted
* ✨ Resetting field values when adding them via the addAll option
* ⚡ Using minor version (2.2) for new Postgres node
* ⚡ Implemented proper date validation and type casting
* 👕 Consolidating typing
* ✅ Added unit tests for type validations
* 👌 Addressing front-end review comments
* ⚡ More refactoring to address review changes
* ⚡ Updating leftover props
* ⚡ Added fallback for ISO dates with invalid timezones
* Added timestamp to datetime test cases
* ⚡ Reseting matching columns if operation changes
* ⚡ Not forcing auto-increment fields to be filled in in Postgres node. Handling null values
* 💄 Added a custom message for invalid dates
* ⚡ Better handling of JSON values
* ⚡ Updating codemirror readonly stauts based on component property, handling objects in json validation
* Deleting leftover console.log
* ⚡ Better time validation
* ⚡ Fixing build error after merging
* 👕 Fixing lint error
* ⚡ Updating node configuration values
* ⚡ Handling postgres arrays better
* ⚡ Handling SQL array syntax
* ⚡ Updating time validation rules to include timezone
* ⚡ Sending expressions that resolve to `null` or `undefined` by the resource mapper to delete cell content in Google Sheets
* ⚡ Allowing removed fields to be selected for match
* ⚡ Updated the query for fetching unique columns and primary keys
* ⚡ Optimizing the unique query
* ⚡ Setting timezone to all parsed dates
* ⚡ Addressing PR review feedback
* ⚡ Configuring Sheets node for production, minor vue component update
* New cases added to the TypeValidation test.
* ✅ Tweaking validation rules for arrays/objects and updating test cases
---------
Co-authored-by: Michael Kret <michael.k@radency.com>
Co-authored-by: Giulio Andreini <g.andreini@gmail.com>
2023-05-31 02:56:09 -07:00
resourceMapping ? : {
[ functionName : string ] : ( this : ILoadOptionsFunctions ) = > Promise < ResourceMapperFields > ;
} ;
2024-08-14 06:20:02 -07:00
actionHandler ? : {
[ functionName : string ] : (
this : ILoadOptionsFunctions ,
payload : IDataObject | string | undefined ,
) = > Promise < NodeParameterValueType > ;
} ;
2019-06-23 03:35:23 -07:00
} ;
webhookMethods ? : {
2023-03-17 04:25:31 -07:00
[ name in IWebhookDescription [ 'name' ] ] ? : {
[ method in WebhookSetupMethodNames ] : ( this : IHookFunctions ) = > Promise < boolean > ;
} ;
2019-06-23 03:35:23 -07:00
} ;
}
2023-07-04 07:17:50 -07:00
/ * *
* This class serves as the base for all nodes using the new context API
* having this as a class enables us to identify these instances at runtime
* /
export abstract class Node {
abstract description : INodeTypeDescription ;
execute ? ( context : IExecuteFunctions ) : Promise < INodeExecutionData [ ] [ ] > ;
webhook ? ( context : IWebhookFunctions ) : Promise < IWebhookResponseData > ;
}
2022-10-25 12:33:12 -07:00
export interface IVersionedNodeType {
2021-09-21 10:38:24 -07:00
nodeVersions : {
[ key : number ] : INodeType ;
} ;
currentVersion : number ;
description : INodeTypeBaseDescription ;
getNodeType : ( version? : number ) = > INodeType ;
}
2022-02-05 13:55:43 -08:00
export interface INodeCredentialTestResult {
2021-09-11 01:15:36 -07:00
status : 'OK' | 'Error' ;
message : string ;
}
2022-02-05 13:55:43 -08:00
export interface INodeCredentialTestRequest {
2021-09-11 01:15:36 -07:00
credentials : ICredentialsDecrypted ;
}
2019-06-23 03:35:23 -07:00
export interface INodeCredentialDescription {
name : string ;
required? : boolean ;
2024-04-30 21:26:09 -07:00
displayName? : string ;
2024-01-24 08:04:46 -08:00
displayOptions? : ICredentialsDisplayOptions ;
2022-02-05 13:55:43 -08:00
testedBy? : ICredentialTestRequest | string ; // Name of a function inside `loadOptions.credentialTest`
2019-06-23 03:35:23 -07:00
}
2023-10-02 08:33:43 -07:00
export type INodeIssueTypes = 'credentials' | 'execution' | 'input' | 'parameters' | 'typeUnknown' ;
2019-06-23 03:35:23 -07:00
export interface INodeIssueObjectProperty {
[ key : string ] : string [ ] ;
}
export interface INodeIssueData {
node : string ;
type : INodeIssueTypes ;
2024-06-10 06:23:06 -07:00
value : null | boolean | string | string [ ] | INodeIssueObjectProperty ;
2019-06-23 03:35:23 -07:00
}
export interface INodeIssues {
execution? : boolean ;
credentials? : INodeIssueObjectProperty ;
2023-10-02 08:33:43 -07:00
input? : INodeIssueObjectProperty ;
2019-06-23 03:35:23 -07:00
parameters? : INodeIssueObjectProperty ;
typeUnknown? : boolean ;
[ key : string ] : undefined | boolean | INodeIssueObjectProperty ;
}
2022-11-30 03:16:19 -08:00
export interface IWorkflowIssues {
2019-06-23 03:35:23 -07:00
[ key : string ] : INodeIssues ;
}
2024-09-27 03:04:00 -07:00
export type ThemeIconColor =
2024-06-06 04:34:30 -07:00
| 'gray'
| 'black'
| 'blue'
| 'light-blue'
| 'dark-blue'
| 'orange'
| 'orange-red'
| 'pink-red'
| 'red'
| 'light-green'
| 'green'
| 'dark-green'
| 'azure'
| 'purple'
| 'crimson' ;
export type Themed < T > = T | { light : T ; dark : T } ;
2024-06-27 03:09:43 -07:00
export type IconRef = ` fa: ${ string } ` | ` node: ${ string } . ${ string } ` ;
export type IconFile = ` file: ${ string } .png ` | ` file: ${ string } .svg ` ;
export type Icon = IconRef | Themed < IconFile > ;
2024-06-06 04:34:30 -07:00
2021-09-21 10:38:24 -07:00
export interface INodeTypeBaseDescription {
2019-06-23 03:35:23 -07:00
displayName : string ;
name : string ;
2024-06-27 03:09:43 -07:00
icon? : Icon ;
2024-09-27 03:04:00 -07:00
iconColor? : ThemeIconColor ;
2024-06-06 04:34:30 -07:00
iconUrl? : Themed < string > ;
2024-06-10 06:23:06 -07:00
badgeIconUrl? : Themed < string > ;
2019-06-23 03:35:23 -07:00
group : string [ ] ;
description : string ;
2020-11-09 03:23:53 -08:00
documentationUrl? : string ;
2021-09-21 10:38:24 -07:00
subtitle? : string ;
defaultVersion? : number ;
codex? : CodexData ;
2022-10-13 05:28:02 -07:00
parameterPane ? : 'wide' ;
2022-09-15 01:52:24 -07:00
/ * *
* Whether the node must be hidden in the node creator panel ,
* due to deprecation or as a special case ( e . g . Start node )
* /
hidden? : true ;
2024-09-04 03:06:17 -07:00
/ * *
* Whether the node will be wrapped for tool - use by AI Agents
* /
usableAsTool? : true ;
2021-09-21 10:38:24 -07:00
}
2022-02-05 13:55:43 -08:00
export interface INodePropertyRouting {
operations? : IN8nRequestOperations ; // Should be changed, does not sound right
output? : INodeRequestOutput ;
2022-07-20 04:50:16 -07:00
request? : DeclarativeRestApiSettings.HttpRequestOptions ;
2022-02-05 13:55:43 -08:00
send? : INodeRequestSend ;
}
export type PostReceiveAction =
| ( (
this : IExecuteSingleFunctions ,
items : INodeExecutionData [ ] ,
response : IN8nHttpFullResponse ,
) = > Promise < INodeExecutionData [ ] > )
| IPostReceiveBinaryData
2022-12-15 16:05:42 -08:00
| IPostReceiveFilter
2022-08-03 09:08:51 -07:00
| IPostReceiveLimit
2022-02-05 13:55:43 -08:00
| IPostReceiveRootProperty
| IPostReceiveSet
| IPostReceiveSetKeyValue
| IPostReceiveSort ;
export type PreSendAction = (
this : IExecuteSingleFunctions ,
requestOptions : IHttpRequestOptions ,
) = > Promise < IHttpRequestOptions > ;
export interface INodeRequestOutput {
maxResults? : number | string ;
postReceive? : PostReceiveAction [ ] ;
}
export interface INodeRequestSend {
preSend? : PreSendAction [ ] ;
paginate? : boolean | string ; // Where should this life?
property? : string ; // Maybe: propertyName, destinationProperty?
propertyInDotNotation? : boolean ; // Enabled by default
type ? : 'body' | 'query' ;
value? : string ;
}
export interface IPostReceiveBase {
type : string ;
2022-07-26 05:43:36 -07:00
enabled? : boolean | string ;
2022-02-05 13:55:43 -08:00
properties : {
2022-12-15 16:05:42 -08:00
[ key : string ] : string | number | boolean | IDataObject ;
2022-02-05 13:55:43 -08:00
} ;
errorMessage? : string ;
}
export interface IPostReceiveBinaryData extends IPostReceiveBase {
type : 'binaryData' ;
properties : {
destinationProperty : string ;
2022-12-15 16:05:42 -08:00
} ;
}
export interface IPostReceiveFilter extends IPostReceiveBase {
type : 'filter' ;
properties : {
pass : boolean | string ;
2022-02-05 13:55:43 -08:00
} ;
}
2022-08-03 09:08:51 -07:00
export interface IPostReceiveLimit extends IPostReceiveBase {
type : 'limit' ;
properties : {
maxResults : number | string ;
} ;
}
2022-02-05 13:55:43 -08:00
export interface IPostReceiveRootProperty extends IPostReceiveBase {
type : 'rootProperty' ;
properties : {
property : string ;
} ;
}
export interface IPostReceiveSet extends IPostReceiveBase {
type : 'set' ;
properties : {
value : string ;
} ;
}
export interface IPostReceiveSetKeyValue extends IPostReceiveBase {
type : 'setKeyValue' ;
properties : {
[ key : string ] : string | number ;
} ;
}
export interface IPostReceiveSort extends IPostReceiveBase {
type : 'sort' ;
properties : {
key : string ;
} ;
}
2023-10-02 08:33:43 -07:00
export const enum NodeConnectionType {
2023-11-28 07:47:28 -08:00
AiAgent = 'ai_agent' ,
2024-06-24 03:13:18 -07:00
2023-10-02 08:33:43 -07:00
AiChain = 'ai_chain' ,
2024-06-24 03:13:18 -07:00
2023-10-02 08:33:43 -07:00
AiDocument = 'ai_document' ,
2024-06-24 03:13:18 -07:00
2023-10-02 08:33:43 -07:00
AiEmbedding = 'ai_embedding' ,
2024-06-24 03:13:18 -07:00
2023-10-02 08:33:43 -07:00
AiLanguageModel = 'ai_languageModel' ,
2024-06-24 03:13:18 -07:00
2023-10-02 08:33:43 -07:00
AiMemory = 'ai_memory' ,
2024-06-24 03:13:18 -07:00
2023-10-02 08:33:43 -07:00
AiOutputParser = 'ai_outputParser' ,
2024-06-24 03:13:18 -07:00
2023-10-02 08:33:43 -07:00
AiRetriever = 'ai_retriever' ,
2024-06-24 03:13:18 -07:00
2023-10-02 08:33:43 -07:00
AiTextSplitter = 'ai_textSplitter' ,
2024-06-24 03:13:18 -07:00
2023-10-02 08:33:43 -07:00
AiTool = 'ai_tool' ,
2024-06-24 03:13:18 -07:00
2023-10-02 08:33:43 -07:00
AiVectorStore = 'ai_vectorStore' ,
2024-06-24 03:13:18 -07:00
2023-10-02 08:33:43 -07:00
Main = 'main' ,
}
2024-05-21 21:54:55 -07:00
export const nodeConnectionTypes : NodeConnectionType [ ] = [
NodeConnectionType . AiAgent ,
NodeConnectionType . AiChain ,
NodeConnectionType . AiDocument ,
NodeConnectionType . AiEmbedding ,
NodeConnectionType . AiLanguageModel ,
NodeConnectionType . AiMemory ,
NodeConnectionType . AiOutputParser ,
NodeConnectionType . AiRetriever ,
NodeConnectionType . AiTextSplitter ,
NodeConnectionType . AiTool ,
NodeConnectionType . AiVectorStore ,
NodeConnectionType . Main ,
] ;
2023-10-02 08:33:43 -07:00
export interface INodeInputFilter {
// TODO: Later add more filter options like categories, subcatogries,
// regex, allow to exclude certain nodes, ... ?
// Potentially change totally after alpha/beta. Is not a breaking change after all.
nodes : string [ ] ; // Allowed nodes
}
export interface INodeInputConfiguration {
2024-07-02 03:47:04 -07:00
category? : string ;
2023-10-02 08:33:43 -07:00
displayName? : string ;
required? : boolean ;
2024-08-29 06:55:53 -07:00
type : NodeConnectionType ;
2024-07-02 03:47:04 -07:00
filter? : INodeInputFilter ;
maxConnections? : number ;
2023-10-02 08:33:43 -07:00
}
export interface INodeOutputConfiguration {
2024-06-25 04:53:31 -07:00
category ? : 'error' ;
2023-10-02 08:33:43 -07:00
displayName? : string ;
2024-06-25 04:53:31 -07:00
maxConnections? : number ;
2023-10-02 08:33:43 -07:00
required? : boolean ;
2024-08-29 06:55:53 -07:00
type : NodeConnectionType ;
2023-10-02 08:33:43 -07:00
}
2024-06-25 04:53:31 -07:00
export type ExpressionString = ` ={{ ${ string } }} ` ;
2024-07-19 05:49:35 -07:00
export type NodeDefaults = Partial < {
/ * *
* @deprecated Use { @link INodeTypeBaseDescription . iconColor | iconColor } instead . ` iconColor ` supports dark mode and uses preset colors from n8n ' s design system .
* /
color : string ;
name : string ;
} > ;
2021-09-21 10:38:24 -07:00
export interface INodeTypeDescription extends INodeTypeBaseDescription {
2022-04-28 10:04:09 -07:00
version : number | number [ ] ;
2024-07-19 05:49:35 -07:00
defaults : NodeDefaults ;
:sparkles: Improve Waiting Webhook call state in WF Canvas (#2430)
* N8N-2586 Improve Waiting Webhook call state in WF Canvas
* N8N-2586 Added watcher for showing Webhook's Node Tooltip on execution
* N8N-2586 Show helping tooltip for trigger node if wokrflow is running, it is a trigger node, if it is only one trigger node in WF
* N8N-2586 Rework/Move logic to computed property, Created getter for ActveTriggerNodesInWokrflow, Add style to trigger node's tooltip, remove comments
* N8N-2586 Added EventTriggerDescription prop in INodeTypeDescription Interface, Updated Logic for TriggerNode Tooltip based on the new prop
* N8N-2586 Add new use cases/watcher to show Trigger Nodes Tooltip / If has issues, if paused, if wokrlfow is running, Refactor Getter
* N8N-2586 Added z-index to tooltip, Added new Scenario for Tooltip if it is Draged&Droped on the WF
* N8N-2586 Refactor computed property for draged nodes
* N8N-2586 Fixed Conflicts
* N8N-2586 Fixed Tooltip
* N8N-2586 Dont show tooltip on core trigger nodes that execute automatically
* N8N-2586 Fixed Webhook tooltip when adding/deleting canvas during WF execution
* N8N-2586 Updated Logic, Simplify the code
* N8N-2586 Simplify Code
* N8N-2586 Added check for nodetype
* update dragging to use local state
* N8N-2586 Added eventTriggerDescription to Interval Node
* add comment, use new getter
* update to always check
Co-authored-by: Mutasem <mutdmour@gmail.com>
2021-11-25 14:33:41 -08:00
eventTriggerDescription? : string ;
2022-01-21 09:00:00 -08:00
activationMessage? : string ;
2024-08-29 06:55:53 -07:00
inputs : Array < NodeConnectionType | INodeInputConfiguration > | ExpressionString ;
2023-07-05 09:47:34 -07:00
requiredInputs? : string | number [ ] | number ; // Ony available with executionOrder => "v1"
2019-08-02 06:56:05 -07:00
inputNames? : string [ ] ;
2024-08-29 06:55:53 -07:00
outputs : Array < NodeConnectionType | INodeOutputConfiguration > | ExpressionString ;
2019-06-23 03:35:23 -07:00
outputNames? : string [ ] ;
properties : INodeProperties [ ] ;
credentials? : INodeCredentialDescription [ ] ;
maxNodes? : number ; // How many nodes of that type can be created in a workflow
2023-11-22 08:49:56 -08:00
polling? : true | undefined ;
supportsCORS? : true | undefined ;
2022-07-20 04:50:16 -07:00
requestDefaults? : DeclarativeRestApiSettings.HttpRequestOptions ;
2022-02-05 13:55:43 -08:00
requestOperations? : IN8nRequestOperations ;
2019-06-23 03:35:23 -07:00
hooks ? : {
[ key : string ] : INodeHookDescription [ ] | undefined ;
activate? : INodeHookDescription [ ] ;
deactivate? : INodeHookDescription [ ] ;
} ;
webhooks? : IWebhookDescription [ ] ;
2021-11-15 02:19:43 -08:00
translation ? : { [ key : string ] : object } ;
2022-06-20 12:39:24 -07:00
mockManualExecution? : true ;
2024-05-31 08:22:27 -07:00
triggerPanel? : TriggerPanelDefinition | boolean ;
2023-11-13 03:11:16 -08:00
extendsCredential? : string ;
2024-05-13 05:46:02 -07:00
hints? : NodeHint [ ] ;
2023-04-12 06:46:11 -07:00
__loadOptionsMethods? : string [ ] ; // only for validation during build
2019-06-23 03:35:23 -07:00
}
2024-05-31 08:22:27 -07:00
export type TriggerPanelDefinition = {
hideContent? : boolean | string ;
header? : string ;
executionsHelp? : string | { active : string ; inactive : string } ;
activationHint? : string | { active : string ; inactive : string } ;
} ;
2024-05-13 05:46:02 -07:00
export type NodeHint = {
message : string ;
type ? : 'info' | 'warning' | 'danger' ;
location ? : 'outputPane' | 'inputPane' | 'ndv' ;
displayCondition? : string ;
whenToDisplay ? : 'always' | 'beforeExecution' | 'afterExecution' ;
} ;
export type NodeExecutionHint = Omit < NodeHint , ' whenToDisplay ' | ' displayCondition ' > ;
2019-06-23 03:35:23 -07:00
export interface INodeHookDescription {
method : string ;
}
export interface IWebhookData {
2023-08-01 08:32:30 -07:00
httpMethod : IHttpRequestMethods ;
2019-06-23 03:35:23 -07:00
node : string ;
path : string ;
webhookDescription : IWebhookDescription ;
2020-01-22 15:06:43 -08:00
workflowId : string ;
2019-06-23 03:35:23 -07:00
workflowExecuteAdditionalData : IWorkflowExecuteAdditionalData ;
2021-01-23 11:00:32 -08:00
webhookId? : string ;
2023-12-19 08:32:02 -08:00
isTest? : boolean ;
2024-01-09 07:02:32 -08:00
userId? : string ;
staticData? : Workflow [ 'staticData' ] ;
2019-06-23 03:35:23 -07:00
}
export interface IWebhookDescription {
2023-08-01 08:32:30 -07:00
[ key : string ] : IHttpRequestMethods | WebhookResponseMode | boolean | string | undefined ;
httpMethod : IHttpRequestMethods | string ;
2020-06-10 06:39:15 -07:00
isFullPath? : boolean ;
2023-03-17 04:25:31 -07:00
name : 'default' | 'setup' ;
2019-06-23 03:35:23 -07:00
path : string ;
responseBinaryPropertyName? : string ;
2019-10-16 05:01:39 -07:00
responseContentType? : string ;
responsePropertyName? : string ;
2019-08-28 08:16:09 -07:00
responseMode? : WebhookResponseMode | string ;
responseData? : WebhookResponseData | string ;
2021-08-21 05:11:32 -07:00
restartWebhook? : boolean ;
2023-12-13 07:00:51 -08:00
isForm? : boolean ;
hasLifecycleMethods? : boolean ; // set automatically by generate-ui-types
2024-01-09 03:11:39 -08:00
ndvHideUrl? : string | boolean ; // If true the webhook will not be displayed in the editor
ndvHideMethod? : string | boolean ; // If true the method will not be displayed in the editor
2019-06-23 03:35:23 -07:00
}
2023-04-19 04:09:46 -07:00
export interface ProxyInput {
all : ( ) = > INodeExecutionData [ ] ;
context : any ;
first : ( ) = > INodeExecutionData | undefined ;
item : INodeExecutionData | undefined ;
last : ( ) = > INodeExecutionData | undefined ;
params? : INodeParameters ;
}
2019-09-04 05:53:39 -07:00
export interface IWorkflowDataProxyData {
2021-12-23 02:41:46 -08:00
[ key : string ] : any ;
2023-04-19 04:09:46 -07:00
$binary : INodeExecutionData [ 'binary' ] ;
2019-09-04 05:53:39 -07:00
$data : any ;
$env : any ;
2023-04-19 04:09:46 -07:00
$evaluateExpression : ( expression : string , itemIndex? : number ) = > NodeParameterValueType ;
$item : ( itemIndex : number , runIndex? : number ) = > IWorkflowDataProxyData ;
$items : ( nodeName? : string , outputIndex? : number , runIndex? : number ) = > INodeExecutionData [ ] ;
$json : INodeExecutionData [ 'json' ] ;
2019-09-04 05:53:39 -07:00
$node : any ;
2023-04-19 04:09:46 -07:00
$parameter : INodeParameters ;
$position : number ;
2020-03-21 09:25:29 -07:00
$workflow : any ;
2022-03-13 01:34:44 -08:00
$ : any ;
2023-04-19 04:09:46 -07:00
$input : ProxyInput ;
2022-03-13 01:34:44 -08:00
$thisItem : any ;
$thisRunIndex : number ;
$thisItemIndex : number ;
$now : any ;
$today : any ;
2023-10-30 10:42:47 -07:00
$getPairedItem : (
destinationNodeName : string ,
incomingSourceData : ISourceData | null ,
pairedItem : IPairedItemData ,
) = > INodeExecutionData | null ;
2022-10-31 04:45:34 -07:00
constructor : any ;
2019-09-04 05:53:39 -07:00
}
2022-02-05 13:55:43 -08:00
export type IWorkflowDataProxyAdditionalKeys = IDataObject ;
2021-08-21 05:11:32 -07:00
2020-02-15 17:07:01 -08:00
export interface IWorkflowMetadata {
2023-01-02 08:42:32 -08:00
id? : string ;
2020-02-15 17:07:01 -08:00
name? : string ;
active : boolean ;
}
2019-10-11 04:02:44 -07:00
export interface IWebhookResponseData {
2019-06-23 03:35:23 -07:00
workflowData? : INodeExecutionData [ ] [ ] ;
webhookResponse? : any ;
noWebhookResponse? : boolean ;
}
2022-02-19 03:37:41 -08:00
export type WebhookResponseData = 'allEntries' | 'firstEntryJson' | 'firstEntryBinary' | 'noData' ;
2024-05-07 04:48:20 -07:00
export type WebhookResponseMode = 'onReceived' | 'lastNode' | 'responseNode' ;
2019-06-23 03:35:23 -07:00
export interface INodeTypes {
2022-11-30 01:28:18 -08:00
getByName ( nodeType : string ) : INodeType | IVersionedNodeType ;
getByNameAndVersion ( nodeType : string , version? : number ) : INodeType ;
2024-05-08 04:02:36 -07:00
getKnownTypes ( ) : IDataObject ;
2019-06-23 03:35:23 -07:00
}
2022-11-30 03:16:19 -08:00
export type LoadingDetails = {
2022-11-23 07:20:28 -08:00
className : string ;
sourcePath : string ;
} ;
2022-11-30 01:28:18 -08:00
export type CredentialLoadingDetails = LoadingDetails & {
2023-11-13 03:11:16 -08:00
supportedNodes? : string [ ] ;
2023-07-10 08:57:26 -07:00
extends ? : string [ ] ;
2022-11-30 01:28:18 -08:00
} ;
export type NodeLoadingDetails = LoadingDetails ;
2022-11-23 07:20:28 -08:00
export type KnownNodesAndCredentials = {
2022-11-30 01:28:18 -08:00
nodes : Record < string , NodeLoadingDetails > ;
credentials : Record < string , CredentialLoadingDetails > ;
2022-11-23 07:20:28 -08:00
} ;
export interface LoadedClass < T > {
sourcePath : string ;
type : T ;
2022-02-05 13:55:43 -08:00
}
2022-11-23 07:20:28 -08:00
type LoadedData < T > = Record < string , LoadedClass < T > > ;
export type ICredentialTypeData = LoadedData < ICredentialType > ;
export type INodeTypeData = LoadedData < INodeType | IVersionedNodeType > ;
2019-06-23 03:35:23 -07:00
export interface IRun {
data : IRunExecutionData ;
finished? : boolean ;
mode : WorkflowExecuteMode ;
2023-03-30 02:12:29 -07:00
waitTill? : Date | null ;
2019-07-22 11:29:06 -07:00
startedAt : Date ;
2021-02-08 23:59:32 -08:00
stoppedAt? : Date ;
2023-02-17 01:54:07 -08:00
status : ExecutionStatus ;
2019-06-23 03:35:23 -07:00
}
// Contains all the data which is needed to execute a workflow and so also to
// start restart it again after it did fail.
// The RunData, ExecuteData and WaitForExecution contain often the same data.
export interface IRunExecutionData {
startData ? : {
destinationNode? : string ;
runNodeFilter? : string [ ] ;
} ;
resultData : {
2021-04-16 09:33:36 -07:00
error? : ExecutionError ;
2019-06-23 03:35:23 -07:00
runData : IRunData ;
2022-07-22 03:19:45 -07:00
pinData? : IPinData ;
2019-06-23 03:35:23 -07:00
lastNodeExecuted? : string ;
2023-03-23 10:07:46 -07:00
metadata? : Record < string , string > ;
2019-06-23 03:35:23 -07:00
} ;
executionData ? : {
contextData : IExecuteContextData ;
nodeExecutionStack : IExecuteData [ ] ;
2023-10-02 08:33:43 -07:00
metadata : {
// node-name: metadata by runIndex
[ key : string ] : ITaskMetadata [ ] ;
} ;
2019-06-23 03:35:23 -07:00
waitingExecution : IWaitingForExecution ;
2022-06-03 08:25:07 -07:00
waitingExecutionSource : IWaitingForExecutionSource | null ;
2019-06-23 03:35:23 -07:00
} ;
2021-08-21 05:11:32 -07:00
waitTill? : Date ;
2019-06-23 03:35:23 -07:00
}
export interface IRunData {
// node-name: result-data
[ key : string ] : ITaskData [ ] ;
}
2023-10-02 08:33:43 -07:00
export interface ITaskSubRunMetadata {
node : string ;
runIndex : number ;
}
export interface ITaskMetadata {
subRun? : ITaskSubRunMetadata [ ] ;
}
2019-06-23 03:35:23 -07:00
// The data that gets returned when a node runs
export interface ITaskData {
startTime : number ;
executionTime : number ;
2023-02-17 01:54:07 -08:00
executionStatus? : ExecutionStatus ;
2019-06-23 03:35:23 -07:00
data? : ITaskDataConnections ;
2023-10-02 08:33:43 -07:00
inputOverride? : ITaskDataConnections ;
2021-04-16 09:33:36 -07:00
error? : ExecutionError ;
2024-05-13 05:46:02 -07:00
hints? : NodeExecutionHint [ ] ;
2022-06-03 08:25:07 -07:00
source : Array < ISourceData | null > ; // Is an array as nodes have multiple inputs
2023-10-02 08:33:43 -07:00
metadata? : ITaskMetadata ;
2022-06-03 08:25:07 -07:00
}
export interface ISourceData {
previousNode : string ;
previousNodeOutput? : number ; // If undefined "0" gets used
previousNodeRun? : number ; // If undefined "0" gets used
2019-06-23 03:35:23 -07:00
}
2024-02-23 02:43:08 -08:00
export interface StartNodeData {
name : string ;
sourceData : ISourceData | null ;
}
2022-09-02 07:13:17 -07:00
// The data for all the different kind of connections (like main) and all the indexes
2019-06-23 03:35:23 -07:00
export interface ITaskDataConnections {
// Key for each input type and because there can be multiple inputs of the same type it is an array
2022-09-02 07:13:17 -07:00
// null is also allowed because if we still need data for a later while executing the workflow set temporary to null
2019-06-23 03:35:23 -07:00
// the nodes get as input TaskDataConnections which is identical to this one except that no null is allowed.
[ key : string ] : Array < INodeExecutionData [ ] | null > ;
}
// Keeps data while workflow gets executed and allows when provided to restart execution
export interface IWaitingForExecution {
// Node name
[ key : string ] : {
// Run index
[ key : number ] : ITaskDataConnections ;
} ;
}
2022-06-03 08:25:07 -07:00
export interface ITaskDataConnectionsSource {
// Key for each input type and because there can be multiple inputs of the same type it is an array
2022-09-02 07:13:17 -07:00
// null is also allowed because if we still need data for a later while executing the workflow set temporary to null
2022-06-03 08:25:07 -07:00
// the nodes get as input TaskDataConnections which is identical to this one except that no null is allowed.
[ key : string ] : Array < ISourceData | null > ;
}
export interface IWaitingForExecutionSource {
// Node name
[ key : string ] : {
// Run index
[ key : number ] : ITaskDataConnectionsSource ;
} ;
}
2019-12-19 14:07:55 -08:00
export interface IWorkflowBase {
2024-01-16 01:53:17 -08:00
id : string ;
2019-12-19 14:07:55 -08:00
name : string ;
active : boolean ;
createdAt : Date ;
2024-09-27 04:32:12 -07:00
startedAt? : Date ;
2019-12-19 14:07:55 -08:00
updatedAt : Date ;
nodes : INode [ ] ;
connections : IConnections ;
settings? : IWorkflowSettings ;
staticData? : IDataObject ;
2022-07-22 03:19:45 -07:00
pinData? : IPinData ;
2023-05-31 06:01:57 -07:00
versionId? : string ;
2019-12-19 14:07:55 -08:00
}
2019-06-23 03:35:23 -07:00
export interface IWorkflowCredentials {
2021-10-13 15:21:00 -07:00
[ credentialType : string ] : {
[ id : string ] : ICredentialsEncrypted ;
2019-06-23 03:35:23 -07:00
} ;
}
export interface IWorkflowExecuteHooks {
2019-08-08 11:38:25 -07:00
[ key : string ] : Array < ( . . . args : any [ ] ) = > Promise < void > > | undefined ;
2021-02-08 23:59:32 -08:00
nodeExecuteAfter? : Array <
( nodeName : string , data : ITaskData , executionData : IRunExecutionData ) = > Promise < void >
> ;
2019-08-08 11:38:25 -07:00
nodeExecuteBefore? : Array < ( nodeName : string ) = > Promise < void > > ;
workflowExecuteAfter? : Array < ( data : IRun , newStaticData : IDataObject ) = > Promise < void > > ;
2020-11-13 14:31:27 -08:00
workflowExecuteBefore? : Array < ( workflow : Workflow , data : IRunExecutionData ) = > Promise < void > > ;
2021-11-05 09:45:51 -07:00
sendResponse? : Array < ( response : IExecuteResponsePromiseData ) = > Promise < void > > ;
2019-06-23 03:35:23 -07:00
}
2024-09-11 01:39:18 -07:00
export interface IWorkflowExecutionDataProcess {
destinationNode? : string ;
restartExecutionId? : string ;
executionMode : WorkflowExecuteMode ;
2024-09-18 06:06:36 -07:00
/ * *
* The data that is sent in the body of the webhook that started this
* execution .
* /
2024-09-11 01:39:18 -07:00
executionData? : IRunExecutionData ;
runData? : IRunData ;
pinData? : IPinData ;
retryOf? : string ;
pushRef? : string ;
startNodes? : StartNodeData [ ] ;
workflowData : IWorkflowBase ;
userId? : string ;
projectId? : string ;
2024-09-18 06:06:36 -07:00
/ * *
* Defines which version of the partial execution flow is used .
* Possible values are :
* 0 - use the old flow
* 1 - use the new flow
* - 1 - the backend chooses which flow based on the environment variable
* PARTIAL_EXECUTION_VERSION_DEFAULT
* /
partialExecutionVersion? : string ;
2024-09-11 01:39:18 -07:00
}
2024-05-17 09:43:50 -07:00
export interface ExecuteWorkflowOptions {
node? : INode ;
parentWorkflowId : string ;
inputData? : INodeExecutionData [ ] ;
loadedWorkflowData? : IWorkflowBase ;
2024-09-11 01:39:18 -07:00
loadedRunData? : IWorkflowExecutionDataProcess ;
2024-05-17 09:43:50 -07:00
parentWorkflowSettings? : IWorkflowSettings ;
parentCallbackManager? : CallbackManager ;
}
2024-09-12 03:02:47 -07:00
export type AiEvent =
| 'ai-messages-retrieved-from-memory'
| 'ai-message-added-to-memory'
| 'ai-output-parsed'
| 'ai-documents-retrieved'
| 'ai-document-embedded'
| 'ai-query-embedded'
| 'ai-document-processed'
| 'ai-text-split'
| 'ai-tool-called'
| 'ai-vector-store-searched'
| 'ai-llm-generated-output'
| 'ai-llm-errored'
| 'ai-vector-store-populated'
| 'ai-vector-store-updated' ;
type AiEventPayload = {
msg : string ;
workflowName : string ;
executionId : string ;
nodeName : string ;
workflowId? : string ;
nodeType? : string ;
} ;
2019-06-23 03:35:23 -07:00
export interface IWorkflowExecuteAdditionalData {
2020-01-25 23:48:38 -08:00
credentialsHelper : ICredentialsHelper ;
2021-02-20 04:51:06 -08:00
executeWorkflow : (
workflowInfo : IExecuteWorkflowInfo ,
additionalData : IWorkflowExecuteAdditionalData ,
2024-05-17 09:43:50 -07:00
options : ExecuteWorkflowOptions ,
2021-02-20 04:51:06 -08:00
) = > Promise < any > ;
2021-08-21 05:11:32 -07:00
executionId? : string ;
2023-04-06 01:18:19 -07:00
restartExecutionId? : string ;
2019-12-19 14:07:55 -08:00
hooks? : WorkflowHooks ;
2019-06-23 03:35:23 -07:00
httpResponse? : express.Response ;
httpRequest? : express.Request ;
2019-12-19 14:07:55 -08:00
restApiUrl : string ;
2023-07-10 06:03:21 -07:00
instanceBaseUrl : string ;
2023-02-17 01:54:07 -08:00
setExecutionStatus ? : ( status : ExecutionStatus ) = > void ;
2023-10-02 08:33:43 -07:00
sendDataToUI ? : ( type : string , data : IDataObject | IDataObject [ ] ) = > void ;
2023-12-13 07:00:51 -08:00
formWaitingBaseUrl : string ;
2019-06-23 03:35:23 -07:00
webhookBaseUrl : string ;
2021-08-21 05:11:32 -07:00
webhookWaitingBaseUrl : string ;
2019-06-23 03:35:23 -07:00
webhookTestBaseUrl : string ;
2021-02-20 04:51:06 -08:00
currentNodeParameters? : INodeParameters ;
2021-04-17 07:44:07 -07:00
executionTimeoutTimestamp? : number ;
2024-05-17 01:53:15 -07:00
userId? : string ;
2023-04-18 03:41:55 -07:00
variables : IDataObject ;
2023-08-25 01:33:46 -07:00
secretsHelpers : SecretsHelpersBase ;
2024-09-12 03:02:47 -07:00
logAiEvent : ( eventName : AiEvent , payload : AiEventPayload ) = > void ;
2024-04-08 13:51:49 -07:00
parentCallbackManager? : CallbackManager ;
2024-10-02 01:31:56 -07:00
startAgentJob < T > (
additionalData : IWorkflowExecuteAdditionalData ,
jobType : string ,
settings : unknown ,
executeFunctions : IExecuteFunctions ,
inputData : ITaskDataConnections ,
node : INode ,
workflow : Workflow ,
runExecutionData : IRunExecutionData ,
runIndex : number ,
itemIndex : number ,
activeNodeName : string ,
connectionInputData : INodeExecutionData [ ] ,
siblingParameters : INodeParameters ,
mode : WorkflowExecuteMode ,
executeData? : IExecuteData ,
defaultReturnRunIndex? : number ,
selfData? : IDataObject ,
contextNodeName? : string ,
) : Promise < T > ;
2019-06-23 03:35:23 -07:00
}
2019-12-19 14:07:55 -08:00
export type WorkflowExecuteMode =
| 'cli'
| 'error'
| 'integrated'
| 'internal'
| 'manual'
| 'retry'
| 'trigger'
| 'webhook' ;
2023-11-07 04:48:48 -08:00
export type WorkflowActivateMode =
| 'init'
2024-02-05 00:26:55 -08:00
| 'create' // unused
2023-11-07 04:48:48 -08:00
| 'update'
| 'activate'
2024-02-05 00:26:55 -08:00
| 'manual' // unused
2023-11-07 04:48:48 -08:00
| 'leadershipChange' ;
2019-12-19 14:07:55 -08:00
export interface IWorkflowHooksOptionalParameters {
retryOf? : string ;
2024-04-03 04:43:14 -07:00
pushRef? : string ;
2019-12-19 14:07:55 -08:00
}
2023-03-24 05:11:48 -07:00
export namespace WorkflowSettings {
export type CallerPolicy = 'any' | 'none' | 'workflowsFromAList' | 'workflowsFromSameOwner' ;
export type SaveDataExecution = 'DEFAULT' | 'all' | 'none' ;
}
2019-06-23 03:35:23 -07:00
export interface IWorkflowSettings {
2023-03-24 05:11:48 -07:00
timezone ? : 'DEFAULT' | string ;
errorWorkflow? : string ;
callerIds? : string ;
callerPolicy? : WorkflowSettings.CallerPolicy ;
saveDataErrorExecution? : WorkflowSettings.SaveDataExecution ;
saveDataSuccessExecution? : WorkflowSettings.SaveDataExecution ;
saveManualExecutions ? : 'DEFAULT' | boolean ;
saveExecutionProgress ? : 'DEFAULT' | boolean ;
executionTimeout? : number ;
2023-07-05 09:47:34 -07:00
executionOrder ? : 'v0' | 'v1' ;
2023-06-21 00:38:28 -07:00
}
2023-09-25 06:49:36 -07:00
export interface WorkflowFEMeta {
onboardingId? : string ;
}
2023-06-21 00:38:28 -07:00
export interface WorkflowTestData {
description : string ;
input : {
workflowData : {
nodes : INode [ ] ;
connections : IConnections ;
settings? : IWorkflowSettings ;
} ;
} ;
output : {
nodeExecutionOrder? : string [ ] ;
2024-07-29 08:08:20 -07:00
testAllOutputs? : boolean ;
2023-06-21 00:38:28 -07:00
nodeData : {
[ key : string ] : any [ ] [ ] ;
} ;
} ;
2024-04-24 06:04:14 -07:00
nock ? : {
2024-02-15 08:49:18 -08:00
baseUrl : string ;
mocks : Array < {
2024-06-20 07:42:52 -07:00
method : 'get' | 'post' ;
2024-02-15 08:49:18 -08:00
path : string ;
2024-06-20 07:42:52 -07:00
requestBody? : RequestBodyMatcher ;
2024-02-15 08:49:18 -08:00
statusCode : number ;
2024-06-20 07:42:52 -07:00
responseBody : string | object ;
2024-02-15 08:49:18 -08:00
} > ;
} ;
2023-08-01 08:32:30 -07:00
trigger ? : {
mode : WorkflowExecuteMode ;
input : INodeExecutionData ;
} ;
2019-06-23 03:35:23 -07:00
}
2021-04-16 09:33:36 -07:00
2023-10-25 07:35:22 -07:00
export type LogLevel = ( typeof LOG_LEVELS ) [ number ] ;
export type Logger = Record < Exclude < LogLevel , ' silent ' > , ( message : string , meta? : object ) = > void > ;
2021-04-16 09:33:36 -07:00
export interface IStatusCodeMessages {
[ key : string ] : string ;
}
2021-06-12 08:15:23 -07:00
2022-09-29 03:33:16 -07:00
export type DocumentationLink = {
url : string ;
} ;
2021-06-17 22:58:26 -07:00
export type CodexData = {
categories? : string [ ] ;
subcategories ? : { [ category : string ] : string [ ] } ;
2022-09-29 03:33:16 -07:00
resources ? : {
credentialDocumentation? : DocumentationLink [ ] ;
primaryDocumentation? : DocumentationLink [ ] ;
} ;
2021-06-17 22:58:26 -07:00
alias? : string [ ] ;
} ;
2021-06-12 08:15:23 -07:00
export type JsonValue = string | number | boolean | null | JsonObject | JsonValue [ ] ;
export type JsonObject = { [ key : string ] : JsonValue } ;
2021-09-21 10:38:24 -07:00
export type AllEntities < M > = M extends { [ key : string ] : string } ? Entity < M , keyof M > : never ;
export type Entity < M , K > = K extends keyof M ? { resource : K ; operation : M [ K ] } : never ;
export type PropertiesOf < M extends { resource : string ; operation : string } > = Array <
Omit < INodeProperties , ' displayOptions ' > & {
displayOptions ? : {
[ key in 'show' | 'hide' ] ? : {
resource? : Array < M [ ' resource ' ] > ;
operation? : Array < M [ ' operation ' ] > ;
2024-02-20 23:59:59 -08:00
[ otherKey : string ] : Array < NodeParameterValue | DisplayCondition > | undefined ;
2021-09-21 10:38:24 -07:00
} ;
} ;
}
> ;
2021-10-18 20:57:49 -07:00
// Telemetry
2022-07-09 23:53:04 -07:00
export interface ITelemetryTrackProperties {
user_id? : string ;
[ key : string ] : GenericValue ;
}
2021-10-18 20:57:49 -07:00
export interface INodesGraph {
node_types : string [ ] ;
node_connections : IDataObject [ ] ;
nodes : INodesGraphNode ;
feat(editor): Add Workflow Stickies (Notes) (#3154)
* N8N-3029 Add Node Type for Wokrflow Stickies/Notes
* N8N-3029 Update Content, Update Aliasses
* N8N-3030 Created N8N Sticky Component in Design System
* N8N-3030 Fixed Code spaccing Sticky Component
* N8N-3030 Fixed Code spaccing StickyStories Component
* N8N-3030 Fixed Code spaccing Markdown Component
* N8N-3030 Added Sticky Colors Pallete into Storybook, Update Color Variables for Sticky Component
* N8N-3030 Added Unfocus Event
* N8N-3030 Update Default Placeholder, Markdown Styles, Fixed Edit State, Added Text to EditState, Fixed Height of Area, Turned off Resize of textarea
* N8N-3030 Update Sticky Overflow, Update Hover States, Updated Markdown Overflow
* N8N-3030, N8N-3031 - Add Resize to Sticky, Created N8n-Resize component
* N8N-3031 Fixed Importing Components in Editor-ui
* N8N-3031 Fixed Resize Component, Fixed Gradient
* N8N-3030, N8N-3031 Update Note Description
* N8N-3032 Hotfix Building Storybook
* N8N-3032 - Select Behaviour, Changes in Resize Component, Emit on Width/Height/Top/Left Change
* N8N-3032 Update Resize Component to emmit left/top, Update Dynamic Resize on Selected Background
* N8N-3032 Updated / Dragging vs Resizing, prevent open Modal for stickies
* N8N-3032 Added ID props to n8n-sticky // dynamic id for multi resizing in NodeView
* N8N-3033 Add dynamic size Tooltip on Sticky
* N8N-3033 Updated Z-index for Sticky Component
* N8N-3033 Updated N8N-Resize Component, Fixed SelectedBackround for Sticky Component
* N8N-3033 Refactor
* N8N-3033 Focus/Defocus on TextArea
* N8N-3033 Fixed Resizing on NW Point
* N8N-3030 Save content in vuex on input change
* N8N-3033 Fixed Resizer, Save Width and Height in Vue
* N8N-3033 Hide Sticky Footer on small height/width
* N8N-3033 Fixed Resizer
* N8N-3033 Dynamic Z-index for Stickies
* N8N-3033 Dynamic Z-index for Stickies
* N8N-3033 Removed static z-index for select sticky class
* N8N-3034 Added Telemetry
* N8N-3030 Formatter
* N8N-3030 Format code
* N8N-3030 Fixed Selecting Stickies
* N8N-3033 Fixed Notifications
* N8N-3030 Added new paddings for Default Stickies
* N8N-3033 Prevent Scrolling NodeView when Sticky is in Edit mode and Mouse is Over the TextArea
* N8N-3030 Prevent double clicking to switch state of Sticky component in Edit Mode
* N8N-3033 Fixed Z-index of Stickies
* N8N-3033 Prevent delete node when in EditMode
* N8N-3030 Prevent Delete Button to delete the Sticky while in Edit Mode
* N8N-3030 Change EditMode (emit) on keyboard shortucts, update Markdown Links & Images, Added new props
* N8N-3030 Sticky Component - No padding when hiding footer text
* N8N-3033 Fix Resizing enter into Edit Mode
* N8N-3033 Selecting different nodes - exit the edit mode
* N8N-3033 Auto Select Text in text-area by default - Sticky Component
* N8N-3033 Prevent Default behaviour for CTRL + X, CTRL + A when Sticky is Active && inEditMode
* N8N-3033 Refactor Resizer, Refactor Sticky, Update zIndex inEditMode
* N8N-3033 Updated Default Text // Node-base, Storybook
* N8N-3033 Add Resizing in EditMode - Components update
* N8N-3033 Fixed Footer - Show/Hide on Resize in EditMode
* N8N-3033 Fix ActiveSticky on Init
* N8N-3033 Refactor Sticky in Vuex, Fixed Init Sticky Tweaks, Prevent Modal Openning, Save on Keyboard shortcuts
* Stickies - Update Note node with new props
* N8N-3030 Updated Default Note text, Update the Markdown Link
* N8N-3030 CMD-C does not copy the text fix
* N8N-3030 Fix Max Zoom / Zoom out shortcuts disabled in editState
* N8N-3030 Z-index fixed during Edit Mode typing
* N8N-3030 Prevent Autoselect Text in Stickies if the text is not default
* N8N-3030 Fixed ReadOnly Bugs / Prevent showing Tooltip, Resizing
* N8N-3030 Added Sticky Creator Button
* N8N-3030 Update Icon / Sticky Creator Button
* N8N-3033 Update Sticky Icon / StickyCreator Button
* update package lock
* 🔩 update note props
* 🚿 clean props
* 🔧 linting
* :wrench: fix spacing
* remove resize component
* remove resize component
* ✂ clean up sticky
* revert back to height width
* revert back to height/width
* replace zindex property
* replace default text property
* use i18n to translate
* update package lock
* move resize
* clean up how height/width are set
* fix resize for sticky to support left/top
* clean up resize
* fix lasso/highlight bug
* remove unused props
* fix zoom to fit
* fix padding for demo view
* fix readonly
* remove iseditable, use active state
* clean up keyboard events
* chang button size, no edit on insert
* scale resizing correctly
* make active on resize
* fix select on resize/move
* use outline icon
* allow for multiple line breaks
* fix multi line bug
* fix edit mode outline
* keep edit open as one resizes
* respect multiple spaces
* fix scrolling bug
* clean up hover impl
* clean up references to note
* disable for rename
* fix drifting while drag
* fix mouse cursor on resize
* fix sticky min height
* refactor resize into component
* fix pulling too far bug
* fix delete/cut all bug
* fix padding bottom
* fix active change on resize
* add transition to button
* Fix sticky markdown click
* add solid fa icon
* update node graph, telemetry event
* add snapping
* change alt text
* update package lock
* fix bug in button hover
* add back transition
* clean up resize
* add grid size as param
* remove breaks
* clean up markdown
* lint fixes
* fix spacing
* clean up markdown colors
* clean up classes in resize
* clean up resize
* update sticky story
* fix spacing
* clean up classes
* revert change
* revert change
* revert change
* clean up sticky component
* remove unused component
* remove unnessary data
* remove unnessary data
* clean up actions
* clean up sticky size
* clean up unnessary border style
* fix bug
* replace sticky note name
* update description
* remove support for multi spaces
* update tracking name
* update telemetry reqs
* fix enter bug
* update alt text
* update sticky notes doc url
* fix readonly bug
* update class name
* update quote marks
Co-authored-by: SchnapsterDog <olivertrajceski@yahoo.com>
2022-04-25 03:38:37 -07:00
notes : INotesGraphNode ;
2022-07-20 08:50:39 -07:00
is_pinned : boolean ;
2021-10-18 20:57:49 -07:00
}
export interface INodesGraphNode {
[ key : string ] : INodeGraphItem ;
}
feat(editor): Add Workflow Stickies (Notes) (#3154)
* N8N-3029 Add Node Type for Wokrflow Stickies/Notes
* N8N-3029 Update Content, Update Aliasses
* N8N-3030 Created N8N Sticky Component in Design System
* N8N-3030 Fixed Code spaccing Sticky Component
* N8N-3030 Fixed Code spaccing StickyStories Component
* N8N-3030 Fixed Code spaccing Markdown Component
* N8N-3030 Added Sticky Colors Pallete into Storybook, Update Color Variables for Sticky Component
* N8N-3030 Added Unfocus Event
* N8N-3030 Update Default Placeholder, Markdown Styles, Fixed Edit State, Added Text to EditState, Fixed Height of Area, Turned off Resize of textarea
* N8N-3030 Update Sticky Overflow, Update Hover States, Updated Markdown Overflow
* N8N-3030, N8N-3031 - Add Resize to Sticky, Created N8n-Resize component
* N8N-3031 Fixed Importing Components in Editor-ui
* N8N-3031 Fixed Resize Component, Fixed Gradient
* N8N-3030, N8N-3031 Update Note Description
* N8N-3032 Hotfix Building Storybook
* N8N-3032 - Select Behaviour, Changes in Resize Component, Emit on Width/Height/Top/Left Change
* N8N-3032 Update Resize Component to emmit left/top, Update Dynamic Resize on Selected Background
* N8N-3032 Updated / Dragging vs Resizing, prevent open Modal for stickies
* N8N-3032 Added ID props to n8n-sticky // dynamic id for multi resizing in NodeView
* N8N-3033 Add dynamic size Tooltip on Sticky
* N8N-3033 Updated Z-index for Sticky Component
* N8N-3033 Updated N8N-Resize Component, Fixed SelectedBackround for Sticky Component
* N8N-3033 Refactor
* N8N-3033 Focus/Defocus on TextArea
* N8N-3033 Fixed Resizing on NW Point
* N8N-3030 Save content in vuex on input change
* N8N-3033 Fixed Resizer, Save Width and Height in Vue
* N8N-3033 Hide Sticky Footer on small height/width
* N8N-3033 Fixed Resizer
* N8N-3033 Dynamic Z-index for Stickies
* N8N-3033 Dynamic Z-index for Stickies
* N8N-3033 Removed static z-index for select sticky class
* N8N-3034 Added Telemetry
* N8N-3030 Formatter
* N8N-3030 Format code
* N8N-3030 Fixed Selecting Stickies
* N8N-3033 Fixed Notifications
* N8N-3030 Added new paddings for Default Stickies
* N8N-3033 Prevent Scrolling NodeView when Sticky is in Edit mode and Mouse is Over the TextArea
* N8N-3030 Prevent double clicking to switch state of Sticky component in Edit Mode
* N8N-3033 Fixed Z-index of Stickies
* N8N-3033 Prevent delete node when in EditMode
* N8N-3030 Prevent Delete Button to delete the Sticky while in Edit Mode
* N8N-3030 Change EditMode (emit) on keyboard shortucts, update Markdown Links & Images, Added new props
* N8N-3030 Sticky Component - No padding when hiding footer text
* N8N-3033 Fix Resizing enter into Edit Mode
* N8N-3033 Selecting different nodes - exit the edit mode
* N8N-3033 Auto Select Text in text-area by default - Sticky Component
* N8N-3033 Prevent Default behaviour for CTRL + X, CTRL + A when Sticky is Active && inEditMode
* N8N-3033 Refactor Resizer, Refactor Sticky, Update zIndex inEditMode
* N8N-3033 Updated Default Text // Node-base, Storybook
* N8N-3033 Add Resizing in EditMode - Components update
* N8N-3033 Fixed Footer - Show/Hide on Resize in EditMode
* N8N-3033 Fix ActiveSticky on Init
* N8N-3033 Refactor Sticky in Vuex, Fixed Init Sticky Tweaks, Prevent Modal Openning, Save on Keyboard shortcuts
* Stickies - Update Note node with new props
* N8N-3030 Updated Default Note text, Update the Markdown Link
* N8N-3030 CMD-C does not copy the text fix
* N8N-3030 Fix Max Zoom / Zoom out shortcuts disabled in editState
* N8N-3030 Z-index fixed during Edit Mode typing
* N8N-3030 Prevent Autoselect Text in Stickies if the text is not default
* N8N-3030 Fixed ReadOnly Bugs / Prevent showing Tooltip, Resizing
* N8N-3030 Added Sticky Creator Button
* N8N-3030 Update Icon / Sticky Creator Button
* N8N-3033 Update Sticky Icon / StickyCreator Button
* update package lock
* 🔩 update note props
* 🚿 clean props
* 🔧 linting
* :wrench: fix spacing
* remove resize component
* remove resize component
* ✂ clean up sticky
* revert back to height width
* revert back to height/width
* replace zindex property
* replace default text property
* use i18n to translate
* update package lock
* move resize
* clean up how height/width are set
* fix resize for sticky to support left/top
* clean up resize
* fix lasso/highlight bug
* remove unused props
* fix zoom to fit
* fix padding for demo view
* fix readonly
* remove iseditable, use active state
* clean up keyboard events
* chang button size, no edit on insert
* scale resizing correctly
* make active on resize
* fix select on resize/move
* use outline icon
* allow for multiple line breaks
* fix multi line bug
* fix edit mode outline
* keep edit open as one resizes
* respect multiple spaces
* fix scrolling bug
* clean up hover impl
* clean up references to note
* disable for rename
* fix drifting while drag
* fix mouse cursor on resize
* fix sticky min height
* refactor resize into component
* fix pulling too far bug
* fix delete/cut all bug
* fix padding bottom
* fix active change on resize
* add transition to button
* Fix sticky markdown click
* add solid fa icon
* update node graph, telemetry event
* add snapping
* change alt text
* update package lock
* fix bug in button hover
* add back transition
* clean up resize
* add grid size as param
* remove breaks
* clean up markdown
* lint fixes
* fix spacing
* clean up markdown colors
* clean up classes in resize
* clean up resize
* update sticky story
* fix spacing
* clean up classes
* revert change
* revert change
* revert change
* clean up sticky component
* remove unused component
* remove unnessary data
* remove unnessary data
* clean up actions
* clean up sticky size
* clean up unnessary border style
* fix bug
* replace sticky note name
* update description
* remove support for multi spaces
* update tracking name
* update telemetry reqs
* fix enter bug
* update alt text
* update sticky notes doc url
* fix readonly bug
* update class name
* update quote marks
Co-authored-by: SchnapsterDog <olivertrajceski@yahoo.com>
2022-04-25 03:38:37 -07:00
export interface INotesGraphNode {
[ key : string ] : INoteGraphItem ;
}
export interface INoteGraphItem {
overlapping : boolean ;
position : [ number , number ] ;
height : number ;
width : number ;
}
2021-10-18 20:57:49 -07:00
export interface INodeGraphItem {
2022-08-03 04:06:53 -07:00
id : string ;
2021-10-18 20:57:49 -07:00
type : string ;
2023-11-02 06:18:41 -07:00
version? : number ;
2021-10-18 20:57:49 -07:00
resource? : string ;
operation? : string ;
2022-05-24 02:36:19 -07:00
domain? : string ; // HTTP Request node v1
domain_base? : string ; // HTTP Request node v2
domain_path? : string ; // HTTP Request node v2
2022-01-07 08:14:59 -08:00
position : [ number , number ] ;
mode? : string ;
2022-05-24 02:36:19 -07:00
credential_type? : string ; // HTTP Request node v2
credential_set? : boolean ; // HTTP Request node v2
method? : string ; // HTTP Request node v2
2022-08-03 04:06:53 -07:00
src_node_id? : string ;
src_instance_id? : string ;
2024-02-26 05:35:00 -08:00
agent? : string ; //@n8n/n8n-nodes-langchain.agent
2024-03-07 02:46:07 -08:00
prompts? : IDataObject [ ] | IDataObject ; //ai node's prompts, cloud only
2024-06-19 00:54:13 -07:00
toolSettings? : IDataObject ; //various langchain tool's settings
2024-07-02 03:47:04 -07:00
sql? : string ; //merge node combineBySql, cloud only
2024-07-04 05:16:15 -07:00
workflow_id? : string ; //@n8n/n8n-nodes-langchain.toolWorkflow and n8n-nodes-base.executeWorkflow
2021-10-18 20:57:49 -07:00
}
export interface INodeNameIndex {
[ name : string ] : string ;
}
export interface INodesGraphResult {
nodeGraph : INodesGraph ;
nameIndices : INodeNameIndex ;
2022-07-09 23:53:04 -07:00
webhookNodeNames : string [ ] ;
2021-10-18 20:57:49 -07:00
}
2023-02-21 00:35:35 -08:00
export interface FeatureFlags {
[ featureFlag : string ] : string | boolean | undefined ;
}
2022-05-23 08:56:15 -07:00
export interface IConnectedNode {
name : string ;
indicies : number [ ] ;
depth : number ;
}
2022-06-13 22:27:19 -07:00
2022-07-20 07:24:03 -07:00
export type PublicInstalledPackage = {
packageName : string ;
installedVersion : string ;
authorName? : string ;
authorEmail? : string ;
installedNodes : PublicInstalledNode [ ] ;
createdAt : Date ;
updatedAt : Date ;
updateAvailable? : string ;
failedLoading? : boolean ;
} ;
export type PublicInstalledNode = {
name : string ;
type : string ;
2024-09-12 02:14:03 -07:00
latestVersion : number ;
2022-07-20 07:24:03 -07:00
package : PublicInstalledPackage ;
} ;
2022-08-30 08:55:33 -07:00
export interface NodeExecutionWithMetadata extends INodeExecutionData {
pairedItem : IPairedItemData | IPairedItemData [ ] ;
}
2023-02-17 01:54:07 -08:00
2024-09-02 06:20:08 -07:00
export type AnnotationVote = 'up' | 'down' ;
2024-01-23 00:48:50 -08:00
export interface ExecutionSummary {
2023-02-17 01:54:07 -08:00
id : string ;
finished? : boolean ;
mode : WorkflowExecuteMode ;
2023-07-04 00:42:58 -07:00
retryOf? : string | null ;
retrySuccessId? : string | null ;
2023-02-17 01:54:07 -08:00
waitTill? : Date ;
2024-09-27 04:32:12 -07:00
createdAt? : Date ;
2023-02-17 01:54:07 -08:00
startedAt : Date ;
stoppedAt? : Date ;
workflowId : string ;
workflowName? : string ;
2024-06-10 01:19:40 -07:00
status : ExecutionStatus ;
2023-02-17 01:54:07 -08:00
lastNodeExecuted? : string ;
executionError? : ExecutionError ;
nodeExecutionStatus ? : {
2023-07-10 08:57:26 -07:00
[ key : string ] : IExecutionSummaryNodeExecutionResult ;
2023-02-17 01:54:07 -08:00
} ;
2024-09-02 06:20:08 -07:00
annotation ? : {
vote : AnnotationVote ;
tags : Array < {
id : string ;
name : string ;
} > ;
} ;
2023-02-17 01:54:07 -08:00
}
2023-07-10 08:57:26 -07:00
export interface IExecutionSummaryNodeExecutionResult {
2023-02-17 01:54:07 -08:00
executionStatus : ExecutionStatus ;
errors? : Array < {
name? : string ;
message? : string ;
description? : string ;
} > ;
}
2023-04-11 09:43:47 -07:00
feat(editor): Implement Resource Mapper component (#6207)
* :zap: scaffolding
* :zap: finished scaffolding
* :zap: renamed types
* :zap: updated subtitle
* :zap: renamed functions file, UI updates
* :zap: query parameters fixes, ui updates, refactoring
* :zap: fixes for credentials test, setup for error parsing
* :zap: rlc for schema and table, error handling tweaks
* :zap: delete operation, new options
* :zap: columns loader
* :zap: linter fixes
* :zap: where clauses setup
* :zap: logic for processing where clauses
* :zap: select operation
* :zap: refactoring
* :zap: data mode for insert and update, wip
* :zap: data mapping, insert update, skip on conflict option
* :zap: select columns with spaces fix
* :zap: update operation update, wip
* :zap: finished update operation
* :zap: upsert operation
* :zap: ui fixes
* Copy updates.
* Copy updates.
* :zap: option to convert empty strings to nulls, schema checks
* :zap: UI requested updates
* :zap: ssh setup WIP
* :zap: fixes, ssh WIP
* :zap: ssh fixes, credentials
* :zap: credentials testing update
* :zap: uncaught error fix
* :zap: clean up
* :zap: address in use fix
* :zap: improved error message
* :zap: tests setup
* :zap: unit tests wip
* :zap: config files clean up
* :zap: utils unit tests
* :zap: refactoring
* :zap: setup for testing operations, tests for deleteTable operation
* :zap: executeQuery and insert operations tests
* :zap: select, update, upsert operations tests
* :zap: runQueries tests setup
* :zap: hint to query
* Copy updates.
* :zap: ui fixes
* :zap: clean up
* :zap: error message update
* :zap: ui update
* Minor tweaks to query params decription.
* feat(Google Sheets Node): Implement Resource mapper in Google Sheets node (#5752)
* ✨ Added initial resource mapping support in google sheets node
* ✨ Wired mapping API endpoint with node-specific logic for fetching mapping fields
* ✨ Implementing mapping fields logic for google sheets
* ✨ Updating Google Sheets execute methods to support resource mapper fields
* 🚧 Added initial version of `ResourceLocator` component
* 👌 Added `update` mode to resource mapper modes
* 👌 Addressing PR feedback
* 👌 Removing leftover const reference
* 👕 Fixing lint errors
* :zap: singlton for conections
* :zap: credentials test fix, clean up
* feat(Postgres Node): Add resource mapper to new version of Postgres node (#5814)
* :zap: scaffolding
* :zap: finished scaffolding
* :zap: renamed types
* :zap: updated subtitle
* :zap: renamed functions file, UI updates
* :zap: query parameters fixes, ui updates, refactoring
* :zap: fixes for credentials test, setup for error parsing
* :zap: rlc for schema and table, error handling tweaks
* :zap: delete operation, new options
* :zap: columns loader
* :zap: linter fixes
* :zap: where clauses setup
* :zap: logic for processing where clauses
* :zap: select operation
* :zap: refactoring
* :zap: data mode for insert and update, wip
* :zap: data mapping, insert update, skip on conflict option
* :zap: select columns with spaces fix
* :zap: update operation update, wip
* :zap: finished update operation
* :zap: upsert operation
* :zap: ui fixes
* Copy updates.
* Copy updates.
* :zap: option to convert empty strings to nulls, schema checks
* :zap: UI requested updates
* :zap: ssh setup WIP
* :zap: fixes, ssh WIP
* :zap: ssh fixes, credentials
* :zap: credentials testing update
* :zap: uncaught error fix
* :zap: clean up
* :zap: address in use fix
* :zap: improved error message
* :zap: tests setup
* :zap: unit tests wip
* :zap: config files clean up
* :zap: utils unit tests
* :zap: refactoring
* :zap: setup for testing operations, tests for deleteTable operation
* :zap: executeQuery and insert operations tests
* :zap: select, update, upsert operations tests
* :zap: runQueries tests setup
* :zap: hint to query
* Copy updates.
* :zap: ui fixes
* :zap: clean up
* :zap: error message update
* :zap: ui update
* Minor tweaks to query params decription.
* ✨ Updated Postgres node to use resource mapper component
* ✨ Implemented postgres <-> resource mapper type mapping
* ✨ Updated Postgres node execution to use resource mapper fields in v3
* 🔥 Removing unused import
---------
Co-authored-by: Michael Kret <michael.k@radency.com>
Co-authored-by: Giulio Andreini <g.andreini@gmail.com>
* feat(core): Resource editor componend P0 (#5970)
* ✨ Added inital value of mapping mode dropdown
* ✨ Finished mapping mode selector
* ✨ Finished implementing mapping mode selector
* ✨ Implemented 'Columns to match on' dropdown
* ✨ Implemented `loadOptionsDependOn` support in resource mapper
* ✨ Implemented initial version of mapping fields
* ✨ Implementing dependant fields watcher in new component setup
* ✨ Generating correct resource mapper field types. Added `supportAutoMap` to node specification and UI. Not showing fields with `display=false`. Pre-selecting matching columns if it's the only one
* ✨ Handling matching columns correctly in UI
* ✨ Saving and loading resourceMapper values in component
* ✨ Implemented proper data saving and loading
* ✨ ResourceMapper component refactor, fixing value save/load
* ✨ Refactoring MatchingColumnSelect component. Updating Sheets node to use single key match and Postgres to use multi key
* ✨ Updated Google Sheets node to work with the new UI
* ✨ Updating Postgres Node to work with new UI
* ✨ Additional loading indicator that shown if there is no mapping mode selector
* ✨ Removing hard-coded values, fixing matching columns ordering, refactoring
* ✨ Updating field names in nodes
* ✨ Fixing minor UI issues
* ✨ Implemented matching fields filter logic
* ✨ Moving loading label outside of fields list
* ✅ Added initial unit tests for resource mapper
* ✅ Finished default rendering test
* ✅ Test refactoring
* ✅ Finished unit tests
* 🔨 Updating the way i18n is used in resource mapper components
* ✔️ Fixing value to match on logic for postgres node
* ✨ Hiding mapping fields when auto-map mode is selected
* ✨ Syncing selected mapping mode between components
* ✨ Fixing dateTime input rendering and adding update check to Postgres node
* ✨ Properly handling database connections. Sending null for empty string values.
* 💄 Updated wording in the error message for non-existing rows
* ✨ Fixing issues with selected matching values
* ✔️ Updating unit tests after matching logic update
* ✨ Updating matching columns when new fields are loaded
* ✨ Defaulting to null for empty parameter values
* ✨ Allowing zero as valid value for number imputs
* ✨ Updated list of types that use datepicker as widger
* ✨ Using text inputs for time types
* ✨ Initial mapping field rework
* ✨ Added new component for mapping fields, moved bit of logic from root component to matching selector, fixing some lint errors
* ✨ Added tooltip for columns that cannot be deleted
* ✨ Saving deleted values in parameter value
* ✨ Implemented control to add/remove mapping fields
* ✨ Syncing field list with add field dropdown when changing dependent values
* ✨ Not showing removed fields in matching columns selector. Updating wording in matching columns selector description
* ✨ Implementing disabled states for add/remove all fields options
* ✨ Saving removed columns separately, updating copy
* ✨ Implemented resource mapper values validation
* ✨ Updated validation logic and error input styling
* ✨ Validating resource mapper fields when new nodes are added
* ✨ Using node field words in validation, refactoring resource mapper component
* ✨ Implemented schema syncing and add/remove all fields
* ✨ Implemented custom parameter actions
* ✨ Implemented loading indicator in parameter options
* 🔨 Removing unnecessary constants and vue props
* ✨ Handling default values properly
* ✨ Fixing validation logic
* 👕 Fixing lint errors
* ⚡ Fixing type issues
* ⚡ Not showing fields by default if `addAllFields` is set to `false`
* ✨ Implemented field type validation in resource mapper
* ✨ Updated casing in copy, removed all/remove all option from bottom menu
* ✨ Added auto mapping mode notice
* ✨ Added support for more types in validation
* ✨ Added support for enumerated values
* ✨ Fixing imports after merging
* ✨ Not showing removed fields in matching columns selector. Refactoring validation logic.
* 👕 Fixing imports
* ✔️ Updating unit tests
* ✅ Added resource mapper schema tests
* ⚡ Removing `match` from resource mapper field definition, fixing matching columns loading
* ⚡ Fixed schema merging
* :zap: update operation return data fix
* :zap: review
* 🐛 Added missing import
* 💄 Updating parameter actions icon based on the ui review
* 💄 Updating word capitalisation in tooltips
* 💄 Added empty state to mapping fields list
* 💄 Removing asterisk from fields, updating tooltips for matching fields
* ⚡ Preventing matching fields from being removed by 'Remove All option'
* ⚡ Not showing hidden fields in the `Add field` dropdown
* ⚡ Added support for custom matching columns labels
* :zap: query optimization
* :zap: fix
* ⚡ Optimizing Postgres node enumeration logic
* ⚡ Added empty state for matching columns
* ⚡ Only fully loading fields if there is no schema fetched
* ⚡ Hiding mapping fields if there is no matching columns available in the schema
* ✔️ Fixing minor issues
* ✨ Implemented runtime type validation
* 🔨 Refactoring validation logic
* ✨ Implemented required check, added more custom messages
* ✨ Skipping boolean type in required check
* Type check improvements
* ✨ Only reloading fields if dependent values actually change
* ✨ Adding item index to validation error title
* ✨ Updating Postgres fetching logic, using resource mapper mode to determine if a field can be deleted
* ✨ Resetting field values when adding them via the addAll option
* ⚡ Using minor version (2.2) for new Postgres node
* ⚡ Implemented proper date validation and type casting
* 👕 Consolidating typing
* ✅ Added unit tests for type validations
* 👌 Addressing front-end review comments
* ⚡ More refactoring to address review changes
* ⚡ Updating leftover props
* ⚡ Added fallback for ISO dates with invalid timezones
* Added timestamp to datetime test cases
* ⚡ Reseting matching columns if operation changes
* ⚡ Not forcing auto-increment fields to be filled in in Postgres node. Handling null values
* 💄 Added a custom message for invalid dates
* ⚡ Better handling of JSON values
* ⚡ Updating codemirror readonly stauts based on component property, handling objects in json validation
* Deleting leftover console.log
* ⚡ Better time validation
* ⚡ Fixing build error after merging
* 👕 Fixing lint error
* ⚡ Updating node configuration values
* ⚡ Handling postgres arrays better
* ⚡ Handling SQL array syntax
* ⚡ Updating time validation rules to include timezone
* ⚡ Sending expressions that resolve to `null` or `undefined` by the resource mapper to delete cell content in Google Sheets
* ⚡ Allowing removed fields to be selected for match
* ⚡ Updated the query for fetching unique columns and primary keys
* ⚡ Optimizing the unique query
* ⚡ Setting timezone to all parsed dates
* ⚡ Addressing PR review feedback
* ⚡ Configuring Sheets node for production, minor vue component update
* New cases added to the TypeValidation test.
* ✅ Tweaking validation rules for arrays/objects and updating test cases
---------
Co-authored-by: Michael Kret <michael.k@radency.com>
Co-authored-by: Giulio Andreini <g.andreini@gmail.com>
2023-05-31 02:56:09 -07:00
export interface ResourceMapperFields {
fields : ResourceMapperField [ ] ;
}
export interface ResourceMapperField {
id : string ;
displayName : string ;
defaultMatch : boolean ;
canBeUsedToMatch? : boolean ;
required : boolean ;
display : boolean ;
type ? : FieldType ;
removed? : boolean ;
options? : INodePropertyOptions [ ] ;
2023-07-17 09:42:30 -07:00
readOnly? : boolean ;
feat(editor): Implement Resource Mapper component (#6207)
* :zap: scaffolding
* :zap: finished scaffolding
* :zap: renamed types
* :zap: updated subtitle
* :zap: renamed functions file, UI updates
* :zap: query parameters fixes, ui updates, refactoring
* :zap: fixes for credentials test, setup for error parsing
* :zap: rlc for schema and table, error handling tweaks
* :zap: delete operation, new options
* :zap: columns loader
* :zap: linter fixes
* :zap: where clauses setup
* :zap: logic for processing where clauses
* :zap: select operation
* :zap: refactoring
* :zap: data mode for insert and update, wip
* :zap: data mapping, insert update, skip on conflict option
* :zap: select columns with spaces fix
* :zap: update operation update, wip
* :zap: finished update operation
* :zap: upsert operation
* :zap: ui fixes
* Copy updates.
* Copy updates.
* :zap: option to convert empty strings to nulls, schema checks
* :zap: UI requested updates
* :zap: ssh setup WIP
* :zap: fixes, ssh WIP
* :zap: ssh fixes, credentials
* :zap: credentials testing update
* :zap: uncaught error fix
* :zap: clean up
* :zap: address in use fix
* :zap: improved error message
* :zap: tests setup
* :zap: unit tests wip
* :zap: config files clean up
* :zap: utils unit tests
* :zap: refactoring
* :zap: setup for testing operations, tests for deleteTable operation
* :zap: executeQuery and insert operations tests
* :zap: select, update, upsert operations tests
* :zap: runQueries tests setup
* :zap: hint to query
* Copy updates.
* :zap: ui fixes
* :zap: clean up
* :zap: error message update
* :zap: ui update
* Minor tweaks to query params decription.
* feat(Google Sheets Node): Implement Resource mapper in Google Sheets node (#5752)
* ✨ Added initial resource mapping support in google sheets node
* ✨ Wired mapping API endpoint with node-specific logic for fetching mapping fields
* ✨ Implementing mapping fields logic for google sheets
* ✨ Updating Google Sheets execute methods to support resource mapper fields
* 🚧 Added initial version of `ResourceLocator` component
* 👌 Added `update` mode to resource mapper modes
* 👌 Addressing PR feedback
* 👌 Removing leftover const reference
* 👕 Fixing lint errors
* :zap: singlton for conections
* :zap: credentials test fix, clean up
* feat(Postgres Node): Add resource mapper to new version of Postgres node (#5814)
* :zap: scaffolding
* :zap: finished scaffolding
* :zap: renamed types
* :zap: updated subtitle
* :zap: renamed functions file, UI updates
* :zap: query parameters fixes, ui updates, refactoring
* :zap: fixes for credentials test, setup for error parsing
* :zap: rlc for schema and table, error handling tweaks
* :zap: delete operation, new options
* :zap: columns loader
* :zap: linter fixes
* :zap: where clauses setup
* :zap: logic for processing where clauses
* :zap: select operation
* :zap: refactoring
* :zap: data mode for insert and update, wip
* :zap: data mapping, insert update, skip on conflict option
* :zap: select columns with spaces fix
* :zap: update operation update, wip
* :zap: finished update operation
* :zap: upsert operation
* :zap: ui fixes
* Copy updates.
* Copy updates.
* :zap: option to convert empty strings to nulls, schema checks
* :zap: UI requested updates
* :zap: ssh setup WIP
* :zap: fixes, ssh WIP
* :zap: ssh fixes, credentials
* :zap: credentials testing update
* :zap: uncaught error fix
* :zap: clean up
* :zap: address in use fix
* :zap: improved error message
* :zap: tests setup
* :zap: unit tests wip
* :zap: config files clean up
* :zap: utils unit tests
* :zap: refactoring
* :zap: setup for testing operations, tests for deleteTable operation
* :zap: executeQuery and insert operations tests
* :zap: select, update, upsert operations tests
* :zap: runQueries tests setup
* :zap: hint to query
* Copy updates.
* :zap: ui fixes
* :zap: clean up
* :zap: error message update
* :zap: ui update
* Minor tweaks to query params decription.
* ✨ Updated Postgres node to use resource mapper component
* ✨ Implemented postgres <-> resource mapper type mapping
* ✨ Updated Postgres node execution to use resource mapper fields in v3
* 🔥 Removing unused import
---------
Co-authored-by: Michael Kret <michael.k@radency.com>
Co-authored-by: Giulio Andreini <g.andreini@gmail.com>
* feat(core): Resource editor componend P0 (#5970)
* ✨ Added inital value of mapping mode dropdown
* ✨ Finished mapping mode selector
* ✨ Finished implementing mapping mode selector
* ✨ Implemented 'Columns to match on' dropdown
* ✨ Implemented `loadOptionsDependOn` support in resource mapper
* ✨ Implemented initial version of mapping fields
* ✨ Implementing dependant fields watcher in new component setup
* ✨ Generating correct resource mapper field types. Added `supportAutoMap` to node specification and UI. Not showing fields with `display=false`. Pre-selecting matching columns if it's the only one
* ✨ Handling matching columns correctly in UI
* ✨ Saving and loading resourceMapper values in component
* ✨ Implemented proper data saving and loading
* ✨ ResourceMapper component refactor, fixing value save/load
* ✨ Refactoring MatchingColumnSelect component. Updating Sheets node to use single key match and Postgres to use multi key
* ✨ Updated Google Sheets node to work with the new UI
* ✨ Updating Postgres Node to work with new UI
* ✨ Additional loading indicator that shown if there is no mapping mode selector
* ✨ Removing hard-coded values, fixing matching columns ordering, refactoring
* ✨ Updating field names in nodes
* ✨ Fixing minor UI issues
* ✨ Implemented matching fields filter logic
* ✨ Moving loading label outside of fields list
* ✅ Added initial unit tests for resource mapper
* ✅ Finished default rendering test
* ✅ Test refactoring
* ✅ Finished unit tests
* 🔨 Updating the way i18n is used in resource mapper components
* ✔️ Fixing value to match on logic for postgres node
* ✨ Hiding mapping fields when auto-map mode is selected
* ✨ Syncing selected mapping mode between components
* ✨ Fixing dateTime input rendering and adding update check to Postgres node
* ✨ Properly handling database connections. Sending null for empty string values.
* 💄 Updated wording in the error message for non-existing rows
* ✨ Fixing issues with selected matching values
* ✔️ Updating unit tests after matching logic update
* ✨ Updating matching columns when new fields are loaded
* ✨ Defaulting to null for empty parameter values
* ✨ Allowing zero as valid value for number imputs
* ✨ Updated list of types that use datepicker as widger
* ✨ Using text inputs for time types
* ✨ Initial mapping field rework
* ✨ Added new component for mapping fields, moved bit of logic from root component to matching selector, fixing some lint errors
* ✨ Added tooltip for columns that cannot be deleted
* ✨ Saving deleted values in parameter value
* ✨ Implemented control to add/remove mapping fields
* ✨ Syncing field list with add field dropdown when changing dependent values
* ✨ Not showing removed fields in matching columns selector. Updating wording in matching columns selector description
* ✨ Implementing disabled states for add/remove all fields options
* ✨ Saving removed columns separately, updating copy
* ✨ Implemented resource mapper values validation
* ✨ Updated validation logic and error input styling
* ✨ Validating resource mapper fields when new nodes are added
* ✨ Using node field words in validation, refactoring resource mapper component
* ✨ Implemented schema syncing and add/remove all fields
* ✨ Implemented custom parameter actions
* ✨ Implemented loading indicator in parameter options
* 🔨 Removing unnecessary constants and vue props
* ✨ Handling default values properly
* ✨ Fixing validation logic
* 👕 Fixing lint errors
* ⚡ Fixing type issues
* ⚡ Not showing fields by default if `addAllFields` is set to `false`
* ✨ Implemented field type validation in resource mapper
* ✨ Updated casing in copy, removed all/remove all option from bottom menu
* ✨ Added auto mapping mode notice
* ✨ Added support for more types in validation
* ✨ Added support for enumerated values
* ✨ Fixing imports after merging
* ✨ Not showing removed fields in matching columns selector. Refactoring validation logic.
* 👕 Fixing imports
* ✔️ Updating unit tests
* ✅ Added resource mapper schema tests
* ⚡ Removing `match` from resource mapper field definition, fixing matching columns loading
* ⚡ Fixed schema merging
* :zap: update operation return data fix
* :zap: review
* 🐛 Added missing import
* 💄 Updating parameter actions icon based on the ui review
* 💄 Updating word capitalisation in tooltips
* 💄 Added empty state to mapping fields list
* 💄 Removing asterisk from fields, updating tooltips for matching fields
* ⚡ Preventing matching fields from being removed by 'Remove All option'
* ⚡ Not showing hidden fields in the `Add field` dropdown
* ⚡ Added support for custom matching columns labels
* :zap: query optimization
* :zap: fix
* ⚡ Optimizing Postgres node enumeration logic
* ⚡ Added empty state for matching columns
* ⚡ Only fully loading fields if there is no schema fetched
* ⚡ Hiding mapping fields if there is no matching columns available in the schema
* ✔️ Fixing minor issues
* ✨ Implemented runtime type validation
* 🔨 Refactoring validation logic
* ✨ Implemented required check, added more custom messages
* ✨ Skipping boolean type in required check
* Type check improvements
* ✨ Only reloading fields if dependent values actually change
* ✨ Adding item index to validation error title
* ✨ Updating Postgres fetching logic, using resource mapper mode to determine if a field can be deleted
* ✨ Resetting field values when adding them via the addAll option
* ⚡ Using minor version (2.2) for new Postgres node
* ⚡ Implemented proper date validation and type casting
* 👕 Consolidating typing
* ✅ Added unit tests for type validations
* 👌 Addressing front-end review comments
* ⚡ More refactoring to address review changes
* ⚡ Updating leftover props
* ⚡ Added fallback for ISO dates with invalid timezones
* Added timestamp to datetime test cases
* ⚡ Reseting matching columns if operation changes
* ⚡ Not forcing auto-increment fields to be filled in in Postgres node. Handling null values
* 💄 Added a custom message for invalid dates
* ⚡ Better handling of JSON values
* ⚡ Updating codemirror readonly stauts based on component property, handling objects in json validation
* Deleting leftover console.log
* ⚡ Better time validation
* ⚡ Fixing build error after merging
* 👕 Fixing lint error
* ⚡ Updating node configuration values
* ⚡ Handling postgres arrays better
* ⚡ Handling SQL array syntax
* ⚡ Updating time validation rules to include timezone
* ⚡ Sending expressions that resolve to `null` or `undefined` by the resource mapper to delete cell content in Google Sheets
* ⚡ Allowing removed fields to be selected for match
* ⚡ Updated the query for fetching unique columns and primary keys
* ⚡ Optimizing the unique query
* ⚡ Setting timezone to all parsed dates
* ⚡ Addressing PR review feedback
* ⚡ Configuring Sheets node for production, minor vue component update
* New cases added to the TypeValidation test.
* ✅ Tweaking validation rules for arrays/objects and updating test cases
---------
Co-authored-by: Michael Kret <michael.k@radency.com>
Co-authored-by: Giulio Andreini <g.andreini@gmail.com>
2023-05-31 02:56:09 -07:00
}
2024-05-21 06:04:20 -07:00
export type FieldTypeMap = {
// eslint-disable-next-line id-denylist
boolean : boolean ;
// eslint-disable-next-line id-denylist
number : number ;
// eslint-disable-next-line id-denylist
string : string ;
'string-alphanumeric' : string ;
dateTime : string ;
time : string ;
array : unknown [ ] ;
object : object ;
options : any ;
url : string ;
jwt : string ;
feat(editor): Implement Resource Mapper component (#6207)
* :zap: scaffolding
* :zap: finished scaffolding
* :zap: renamed types
* :zap: updated subtitle
* :zap: renamed functions file, UI updates
* :zap: query parameters fixes, ui updates, refactoring
* :zap: fixes for credentials test, setup for error parsing
* :zap: rlc for schema and table, error handling tweaks
* :zap: delete operation, new options
* :zap: columns loader
* :zap: linter fixes
* :zap: where clauses setup
* :zap: logic for processing where clauses
* :zap: select operation
* :zap: refactoring
* :zap: data mode for insert and update, wip
* :zap: data mapping, insert update, skip on conflict option
* :zap: select columns with spaces fix
* :zap: update operation update, wip
* :zap: finished update operation
* :zap: upsert operation
* :zap: ui fixes
* Copy updates.
* Copy updates.
* :zap: option to convert empty strings to nulls, schema checks
* :zap: UI requested updates
* :zap: ssh setup WIP
* :zap: fixes, ssh WIP
* :zap: ssh fixes, credentials
* :zap: credentials testing update
* :zap: uncaught error fix
* :zap: clean up
* :zap: address in use fix
* :zap: improved error message
* :zap: tests setup
* :zap: unit tests wip
* :zap: config files clean up
* :zap: utils unit tests
* :zap: refactoring
* :zap: setup for testing operations, tests for deleteTable operation
* :zap: executeQuery and insert operations tests
* :zap: select, update, upsert operations tests
* :zap: runQueries tests setup
* :zap: hint to query
* Copy updates.
* :zap: ui fixes
* :zap: clean up
* :zap: error message update
* :zap: ui update
* Minor tweaks to query params decription.
* feat(Google Sheets Node): Implement Resource mapper in Google Sheets node (#5752)
* ✨ Added initial resource mapping support in google sheets node
* ✨ Wired mapping API endpoint with node-specific logic for fetching mapping fields
* ✨ Implementing mapping fields logic for google sheets
* ✨ Updating Google Sheets execute methods to support resource mapper fields
* 🚧 Added initial version of `ResourceLocator` component
* 👌 Added `update` mode to resource mapper modes
* 👌 Addressing PR feedback
* 👌 Removing leftover const reference
* 👕 Fixing lint errors
* :zap: singlton for conections
* :zap: credentials test fix, clean up
* feat(Postgres Node): Add resource mapper to new version of Postgres node (#5814)
* :zap: scaffolding
* :zap: finished scaffolding
* :zap: renamed types
* :zap: updated subtitle
* :zap: renamed functions file, UI updates
* :zap: query parameters fixes, ui updates, refactoring
* :zap: fixes for credentials test, setup for error parsing
* :zap: rlc for schema and table, error handling tweaks
* :zap: delete operation, new options
* :zap: columns loader
* :zap: linter fixes
* :zap: where clauses setup
* :zap: logic for processing where clauses
* :zap: select operation
* :zap: refactoring
* :zap: data mode for insert and update, wip
* :zap: data mapping, insert update, skip on conflict option
* :zap: select columns with spaces fix
* :zap: update operation update, wip
* :zap: finished update operation
* :zap: upsert operation
* :zap: ui fixes
* Copy updates.
* Copy updates.
* :zap: option to convert empty strings to nulls, schema checks
* :zap: UI requested updates
* :zap: ssh setup WIP
* :zap: fixes, ssh WIP
* :zap: ssh fixes, credentials
* :zap: credentials testing update
* :zap: uncaught error fix
* :zap: clean up
* :zap: address in use fix
* :zap: improved error message
* :zap: tests setup
* :zap: unit tests wip
* :zap: config files clean up
* :zap: utils unit tests
* :zap: refactoring
* :zap: setup for testing operations, tests for deleteTable operation
* :zap: executeQuery and insert operations tests
* :zap: select, update, upsert operations tests
* :zap: runQueries tests setup
* :zap: hint to query
* Copy updates.
* :zap: ui fixes
* :zap: clean up
* :zap: error message update
* :zap: ui update
* Minor tweaks to query params decription.
* ✨ Updated Postgres node to use resource mapper component
* ✨ Implemented postgres <-> resource mapper type mapping
* ✨ Updated Postgres node execution to use resource mapper fields in v3
* 🔥 Removing unused import
---------
Co-authored-by: Michael Kret <michael.k@radency.com>
Co-authored-by: Giulio Andreini <g.andreini@gmail.com>
* feat(core): Resource editor componend P0 (#5970)
* ✨ Added inital value of mapping mode dropdown
* ✨ Finished mapping mode selector
* ✨ Finished implementing mapping mode selector
* ✨ Implemented 'Columns to match on' dropdown
* ✨ Implemented `loadOptionsDependOn` support in resource mapper
* ✨ Implemented initial version of mapping fields
* ✨ Implementing dependant fields watcher in new component setup
* ✨ Generating correct resource mapper field types. Added `supportAutoMap` to node specification and UI. Not showing fields with `display=false`. Pre-selecting matching columns if it's the only one
* ✨ Handling matching columns correctly in UI
* ✨ Saving and loading resourceMapper values in component
* ✨ Implemented proper data saving and loading
* ✨ ResourceMapper component refactor, fixing value save/load
* ✨ Refactoring MatchingColumnSelect component. Updating Sheets node to use single key match and Postgres to use multi key
* ✨ Updated Google Sheets node to work with the new UI
* ✨ Updating Postgres Node to work with new UI
* ✨ Additional loading indicator that shown if there is no mapping mode selector
* ✨ Removing hard-coded values, fixing matching columns ordering, refactoring
* ✨ Updating field names in nodes
* ✨ Fixing minor UI issues
* ✨ Implemented matching fields filter logic
* ✨ Moving loading label outside of fields list
* ✅ Added initial unit tests for resource mapper
* ✅ Finished default rendering test
* ✅ Test refactoring
* ✅ Finished unit tests
* 🔨 Updating the way i18n is used in resource mapper components
* ✔️ Fixing value to match on logic for postgres node
* ✨ Hiding mapping fields when auto-map mode is selected
* ✨ Syncing selected mapping mode between components
* ✨ Fixing dateTime input rendering and adding update check to Postgres node
* ✨ Properly handling database connections. Sending null for empty string values.
* 💄 Updated wording in the error message for non-existing rows
* ✨ Fixing issues with selected matching values
* ✔️ Updating unit tests after matching logic update
* ✨ Updating matching columns when new fields are loaded
* ✨ Defaulting to null for empty parameter values
* ✨ Allowing zero as valid value for number imputs
* ✨ Updated list of types that use datepicker as widger
* ✨ Using text inputs for time types
* ✨ Initial mapping field rework
* ✨ Added new component for mapping fields, moved bit of logic from root component to matching selector, fixing some lint errors
* ✨ Added tooltip for columns that cannot be deleted
* ✨ Saving deleted values in parameter value
* ✨ Implemented control to add/remove mapping fields
* ✨ Syncing field list with add field dropdown when changing dependent values
* ✨ Not showing removed fields in matching columns selector. Updating wording in matching columns selector description
* ✨ Implementing disabled states for add/remove all fields options
* ✨ Saving removed columns separately, updating copy
* ✨ Implemented resource mapper values validation
* ✨ Updated validation logic and error input styling
* ✨ Validating resource mapper fields when new nodes are added
* ✨ Using node field words in validation, refactoring resource mapper component
* ✨ Implemented schema syncing and add/remove all fields
* ✨ Implemented custom parameter actions
* ✨ Implemented loading indicator in parameter options
* 🔨 Removing unnecessary constants and vue props
* ✨ Handling default values properly
* ✨ Fixing validation logic
* 👕 Fixing lint errors
* ⚡ Fixing type issues
* ⚡ Not showing fields by default if `addAllFields` is set to `false`
* ✨ Implemented field type validation in resource mapper
* ✨ Updated casing in copy, removed all/remove all option from bottom menu
* ✨ Added auto mapping mode notice
* ✨ Added support for more types in validation
* ✨ Added support for enumerated values
* ✨ Fixing imports after merging
* ✨ Not showing removed fields in matching columns selector. Refactoring validation logic.
* 👕 Fixing imports
* ✔️ Updating unit tests
* ✅ Added resource mapper schema tests
* ⚡ Removing `match` from resource mapper field definition, fixing matching columns loading
* ⚡ Fixed schema merging
* :zap: update operation return data fix
* :zap: review
* 🐛 Added missing import
* 💄 Updating parameter actions icon based on the ui review
* 💄 Updating word capitalisation in tooltips
* 💄 Added empty state to mapping fields list
* 💄 Removing asterisk from fields, updating tooltips for matching fields
* ⚡ Preventing matching fields from being removed by 'Remove All option'
* ⚡ Not showing hidden fields in the `Add field` dropdown
* ⚡ Added support for custom matching columns labels
* :zap: query optimization
* :zap: fix
* ⚡ Optimizing Postgres node enumeration logic
* ⚡ Added empty state for matching columns
* ⚡ Only fully loading fields if there is no schema fetched
* ⚡ Hiding mapping fields if there is no matching columns available in the schema
* ✔️ Fixing minor issues
* ✨ Implemented runtime type validation
* 🔨 Refactoring validation logic
* ✨ Implemented required check, added more custom messages
* ✨ Skipping boolean type in required check
* Type check improvements
* ✨ Only reloading fields if dependent values actually change
* ✨ Adding item index to validation error title
* ✨ Updating Postgres fetching logic, using resource mapper mode to determine if a field can be deleted
* ✨ Resetting field values when adding them via the addAll option
* ⚡ Using minor version (2.2) for new Postgres node
* ⚡ Implemented proper date validation and type casting
* 👕 Consolidating typing
* ✅ Added unit tests for type validations
* 👌 Addressing front-end review comments
* ⚡ More refactoring to address review changes
* ⚡ Updating leftover props
* ⚡ Added fallback for ISO dates with invalid timezones
* Added timestamp to datetime test cases
* ⚡ Reseting matching columns if operation changes
* ⚡ Not forcing auto-increment fields to be filled in in Postgres node. Handling null values
* 💄 Added a custom message for invalid dates
* ⚡ Better handling of JSON values
* ⚡ Updating codemirror readonly stauts based on component property, handling objects in json validation
* Deleting leftover console.log
* ⚡ Better time validation
* ⚡ Fixing build error after merging
* 👕 Fixing lint error
* ⚡ Updating node configuration values
* ⚡ Handling postgres arrays better
* ⚡ Handling SQL array syntax
* ⚡ Updating time validation rules to include timezone
* ⚡ Sending expressions that resolve to `null` or `undefined` by the resource mapper to delete cell content in Google Sheets
* ⚡ Allowing removed fields to be selected for match
* ⚡ Updated the query for fetching unique columns and primary keys
* ⚡ Optimizing the unique query
* ⚡ Setting timezone to all parsed dates
* ⚡ Addressing PR review feedback
* ⚡ Configuring Sheets node for production, minor vue component update
* New cases added to the TypeValidation test.
* ✅ Tweaking validation rules for arrays/objects and updating test cases
---------
Co-authored-by: Michael Kret <michael.k@radency.com>
Co-authored-by: Giulio Andreini <g.andreini@gmail.com>
2023-05-31 02:56:09 -07:00
} ;
2024-05-21 06:04:20 -07:00
export type FieldType = keyof FieldTypeMap ;
export type ValidationResult < T extends FieldType = FieldType > =
| { valid : false ; errorMessage : string }
| {
valid : true ;
newValue? : FieldTypeMap [ T ] ;
} ;
feat(editor): Implement Resource Mapper component (#6207)
* :zap: scaffolding
* :zap: finished scaffolding
* :zap: renamed types
* :zap: updated subtitle
* :zap: renamed functions file, UI updates
* :zap: query parameters fixes, ui updates, refactoring
* :zap: fixes for credentials test, setup for error parsing
* :zap: rlc for schema and table, error handling tweaks
* :zap: delete operation, new options
* :zap: columns loader
* :zap: linter fixes
* :zap: where clauses setup
* :zap: logic for processing where clauses
* :zap: select operation
* :zap: refactoring
* :zap: data mode for insert and update, wip
* :zap: data mapping, insert update, skip on conflict option
* :zap: select columns with spaces fix
* :zap: update operation update, wip
* :zap: finished update operation
* :zap: upsert operation
* :zap: ui fixes
* Copy updates.
* Copy updates.
* :zap: option to convert empty strings to nulls, schema checks
* :zap: UI requested updates
* :zap: ssh setup WIP
* :zap: fixes, ssh WIP
* :zap: ssh fixes, credentials
* :zap: credentials testing update
* :zap: uncaught error fix
* :zap: clean up
* :zap: address in use fix
* :zap: improved error message
* :zap: tests setup
* :zap: unit tests wip
* :zap: config files clean up
* :zap: utils unit tests
* :zap: refactoring
* :zap: setup for testing operations, tests for deleteTable operation
* :zap: executeQuery and insert operations tests
* :zap: select, update, upsert operations tests
* :zap: runQueries tests setup
* :zap: hint to query
* Copy updates.
* :zap: ui fixes
* :zap: clean up
* :zap: error message update
* :zap: ui update
* Minor tweaks to query params decription.
* feat(Google Sheets Node): Implement Resource mapper in Google Sheets node (#5752)
* ✨ Added initial resource mapping support in google sheets node
* ✨ Wired mapping API endpoint with node-specific logic for fetching mapping fields
* ✨ Implementing mapping fields logic for google sheets
* ✨ Updating Google Sheets execute methods to support resource mapper fields
* 🚧 Added initial version of `ResourceLocator` component
* 👌 Added `update` mode to resource mapper modes
* 👌 Addressing PR feedback
* 👌 Removing leftover const reference
* 👕 Fixing lint errors
* :zap: singlton for conections
* :zap: credentials test fix, clean up
* feat(Postgres Node): Add resource mapper to new version of Postgres node (#5814)
* :zap: scaffolding
* :zap: finished scaffolding
* :zap: renamed types
* :zap: updated subtitle
* :zap: renamed functions file, UI updates
* :zap: query parameters fixes, ui updates, refactoring
* :zap: fixes for credentials test, setup for error parsing
* :zap: rlc for schema and table, error handling tweaks
* :zap: delete operation, new options
* :zap: columns loader
* :zap: linter fixes
* :zap: where clauses setup
* :zap: logic for processing where clauses
* :zap: select operation
* :zap: refactoring
* :zap: data mode for insert and update, wip
* :zap: data mapping, insert update, skip on conflict option
* :zap: select columns with spaces fix
* :zap: update operation update, wip
* :zap: finished update operation
* :zap: upsert operation
* :zap: ui fixes
* Copy updates.
* Copy updates.
* :zap: option to convert empty strings to nulls, schema checks
* :zap: UI requested updates
* :zap: ssh setup WIP
* :zap: fixes, ssh WIP
* :zap: ssh fixes, credentials
* :zap: credentials testing update
* :zap: uncaught error fix
* :zap: clean up
* :zap: address in use fix
* :zap: improved error message
* :zap: tests setup
* :zap: unit tests wip
* :zap: config files clean up
* :zap: utils unit tests
* :zap: refactoring
* :zap: setup for testing operations, tests for deleteTable operation
* :zap: executeQuery and insert operations tests
* :zap: select, update, upsert operations tests
* :zap: runQueries tests setup
* :zap: hint to query
* Copy updates.
* :zap: ui fixes
* :zap: clean up
* :zap: error message update
* :zap: ui update
* Minor tweaks to query params decription.
* ✨ Updated Postgres node to use resource mapper component
* ✨ Implemented postgres <-> resource mapper type mapping
* ✨ Updated Postgres node execution to use resource mapper fields in v3
* 🔥 Removing unused import
---------
Co-authored-by: Michael Kret <michael.k@radency.com>
Co-authored-by: Giulio Andreini <g.andreini@gmail.com>
* feat(core): Resource editor componend P0 (#5970)
* ✨ Added inital value of mapping mode dropdown
* ✨ Finished mapping mode selector
* ✨ Finished implementing mapping mode selector
* ✨ Implemented 'Columns to match on' dropdown
* ✨ Implemented `loadOptionsDependOn` support in resource mapper
* ✨ Implemented initial version of mapping fields
* ✨ Implementing dependant fields watcher in new component setup
* ✨ Generating correct resource mapper field types. Added `supportAutoMap` to node specification and UI. Not showing fields with `display=false`. Pre-selecting matching columns if it's the only one
* ✨ Handling matching columns correctly in UI
* ✨ Saving and loading resourceMapper values in component
* ✨ Implemented proper data saving and loading
* ✨ ResourceMapper component refactor, fixing value save/load
* ✨ Refactoring MatchingColumnSelect component. Updating Sheets node to use single key match and Postgres to use multi key
* ✨ Updated Google Sheets node to work with the new UI
* ✨ Updating Postgres Node to work with new UI
* ✨ Additional loading indicator that shown if there is no mapping mode selector
* ✨ Removing hard-coded values, fixing matching columns ordering, refactoring
* ✨ Updating field names in nodes
* ✨ Fixing minor UI issues
* ✨ Implemented matching fields filter logic
* ✨ Moving loading label outside of fields list
* ✅ Added initial unit tests for resource mapper
* ✅ Finished default rendering test
* ✅ Test refactoring
* ✅ Finished unit tests
* 🔨 Updating the way i18n is used in resource mapper components
* ✔️ Fixing value to match on logic for postgres node
* ✨ Hiding mapping fields when auto-map mode is selected
* ✨ Syncing selected mapping mode between components
* ✨ Fixing dateTime input rendering and adding update check to Postgres node
* ✨ Properly handling database connections. Sending null for empty string values.
* 💄 Updated wording in the error message for non-existing rows
* ✨ Fixing issues with selected matching values
* ✔️ Updating unit tests after matching logic update
* ✨ Updating matching columns when new fields are loaded
* ✨ Defaulting to null for empty parameter values
* ✨ Allowing zero as valid value for number imputs
* ✨ Updated list of types that use datepicker as widger
* ✨ Using text inputs for time types
* ✨ Initial mapping field rework
* ✨ Added new component for mapping fields, moved bit of logic from root component to matching selector, fixing some lint errors
* ✨ Added tooltip for columns that cannot be deleted
* ✨ Saving deleted values in parameter value
* ✨ Implemented control to add/remove mapping fields
* ✨ Syncing field list with add field dropdown when changing dependent values
* ✨ Not showing removed fields in matching columns selector. Updating wording in matching columns selector description
* ✨ Implementing disabled states for add/remove all fields options
* ✨ Saving removed columns separately, updating copy
* ✨ Implemented resource mapper values validation
* ✨ Updated validation logic and error input styling
* ✨ Validating resource mapper fields when new nodes are added
* ✨ Using node field words in validation, refactoring resource mapper component
* ✨ Implemented schema syncing and add/remove all fields
* ✨ Implemented custom parameter actions
* ✨ Implemented loading indicator in parameter options
* 🔨 Removing unnecessary constants and vue props
* ✨ Handling default values properly
* ✨ Fixing validation logic
* 👕 Fixing lint errors
* ⚡ Fixing type issues
* ⚡ Not showing fields by default if `addAllFields` is set to `false`
* ✨ Implemented field type validation in resource mapper
* ✨ Updated casing in copy, removed all/remove all option from bottom menu
* ✨ Added auto mapping mode notice
* ✨ Added support for more types in validation
* ✨ Added support for enumerated values
* ✨ Fixing imports after merging
* ✨ Not showing removed fields in matching columns selector. Refactoring validation logic.
* 👕 Fixing imports
* ✔️ Updating unit tests
* ✅ Added resource mapper schema tests
* ⚡ Removing `match` from resource mapper field definition, fixing matching columns loading
* ⚡ Fixed schema merging
* :zap: update operation return data fix
* :zap: review
* 🐛 Added missing import
* 💄 Updating parameter actions icon based on the ui review
* 💄 Updating word capitalisation in tooltips
* 💄 Added empty state to mapping fields list
* 💄 Removing asterisk from fields, updating tooltips for matching fields
* ⚡ Preventing matching fields from being removed by 'Remove All option'
* ⚡ Not showing hidden fields in the `Add field` dropdown
* ⚡ Added support for custom matching columns labels
* :zap: query optimization
* :zap: fix
* ⚡ Optimizing Postgres node enumeration logic
* ⚡ Added empty state for matching columns
* ⚡ Only fully loading fields if there is no schema fetched
* ⚡ Hiding mapping fields if there is no matching columns available in the schema
* ✔️ Fixing minor issues
* ✨ Implemented runtime type validation
* 🔨 Refactoring validation logic
* ✨ Implemented required check, added more custom messages
* ✨ Skipping boolean type in required check
* Type check improvements
* ✨ Only reloading fields if dependent values actually change
* ✨ Adding item index to validation error title
* ✨ Updating Postgres fetching logic, using resource mapper mode to determine if a field can be deleted
* ✨ Resetting field values when adding them via the addAll option
* ⚡ Using minor version (2.2) for new Postgres node
* ⚡ Implemented proper date validation and type casting
* 👕 Consolidating typing
* ✅ Added unit tests for type validations
* 👌 Addressing front-end review comments
* ⚡ More refactoring to address review changes
* ⚡ Updating leftover props
* ⚡ Added fallback for ISO dates with invalid timezones
* Added timestamp to datetime test cases
* ⚡ Reseting matching columns if operation changes
* ⚡ Not forcing auto-increment fields to be filled in in Postgres node. Handling null values
* 💄 Added a custom message for invalid dates
* ⚡ Better handling of JSON values
* ⚡ Updating codemirror readonly stauts based on component property, handling objects in json validation
* Deleting leftover console.log
* ⚡ Better time validation
* ⚡ Fixing build error after merging
* 👕 Fixing lint error
* ⚡ Updating node configuration values
* ⚡ Handling postgres arrays better
* ⚡ Handling SQL array syntax
* ⚡ Updating time validation rules to include timezone
* ⚡ Sending expressions that resolve to `null` or `undefined` by the resource mapper to delete cell content in Google Sheets
* ⚡ Allowing removed fields to be selected for match
* ⚡ Updated the query for fetching unique columns and primary keys
* ⚡ Optimizing the unique query
* ⚡ Setting timezone to all parsed dates
* ⚡ Addressing PR review feedback
* ⚡ Configuring Sheets node for production, minor vue component update
* New cases added to the TypeValidation test.
* ✅ Tweaking validation rules for arrays/objects and updating test cases
---------
Co-authored-by: Michael Kret <michael.k@radency.com>
Co-authored-by: Giulio Andreini <g.andreini@gmail.com>
2023-05-31 02:56:09 -07:00
export type ResourceMapperValue = {
mappingMode : string ;
value : { [ key : string ] : string | number | boolean | null } | null ;
matchingColumns : string [ ] ;
schema : ResourceMapperField [ ] ;
} ;
2023-12-13 05:45:22 -08:00
export type FilterOperatorType =
| 'string'
| 'number'
| 'boolean'
| 'array'
| 'object'
| 'dateTime'
| 'any' ;
export interface FilterOperatorValue {
type : FilterOperatorType ;
operation : string ;
rightType? : FilterOperatorType ;
singleValue? : boolean ; // default = false
}
export type FilterConditionValue = {
id : string ;
2024-07-03 09:27:07 -07:00
leftValue : NodeParameterValue | NodeParameterValue [ ] ;
2023-12-13 05:45:22 -08:00
operator : FilterOperatorValue ;
2024-07-03 09:27:07 -07:00
rightValue : NodeParameterValue | NodeParameterValue [ ] ;
2023-12-13 05:45:22 -08:00
} ;
export type FilterOptionsValue = {
caseSensitive : boolean ;
leftValue : string ;
typeValidation : 'strict' | 'loose' ;
2024-09-09 00:54:36 -07:00
version : 1 | 2 ;
2023-12-13 05:45:22 -08:00
} ;
export type FilterValue = {
options : FilterOptionsValue ;
conditions : FilterConditionValue [ ] ;
combinator : FilterTypeCombinator ;
} ;
2024-02-06 09:34:34 -08:00
export type AssignmentCollectionValue = {
assignments : AssignmentValue [ ] ;
} ;
export type AssignmentValue = {
id : string ;
name : string ;
value : NodeParameterValue ;
type ? : string ;
} ;
2023-04-11 09:43:47 -07:00
export interface ExecutionOptions {
limit? : number ;
}
export interface ExecutionFilters {
finished? : boolean ;
mode? : WorkflowExecuteMode [ ] ;
retryOf? : string ;
retrySuccessId? : string ;
status? : ExecutionStatus [ ] ;
waitTill? : boolean ;
workflowId? : number | string ;
}
2023-04-21 04:30:57 -07:00
2024-06-11 01:23:30 -07:00
export type NpsSurveyRespondedState = { lastShownAt : number ; responded : true } ;
export type NpsSurveyWaitingState = {
lastShownAt : number ;
waitingForResponse : true ;
ignoredCount : number ;
} ;
export type NpsSurveyState = NpsSurveyRespondedState | NpsSurveyWaitingState ;
2023-05-30 03:52:02 -07:00
export interface IUserSettings {
isOnboarded? : boolean ;
firstSuccessfulWorkflowId? : string ;
userActivated? : boolean ;
2024-06-11 01:23:30 -07:00
userActivatedAt? : number ;
2023-05-30 03:52:02 -07:00
allowSSOManualLogin? : boolean ;
2024-06-11 01:23:30 -07:00
npsSurvey? : NpsSurveyState ;
2023-05-30 03:52:02 -07:00
}
2023-09-21 05:57:45 -07:00
export type ExpressionEvaluatorType = 'tmpl' | 'tournament' ;
2024-03-13 07:48:00 -07:00
export type N8nAIProviderType = 'openai' | 'unknown' ;
2023-08-25 01:33:46 -07:00
export interface SecretsHelpersBase {
update ( ) : Promise < void > ;
waitForInit ( ) : Promise < void > ;
2024-03-28 02:15:58 -07:00
getSecret ( provider : string , name : string ) : unknown ;
2023-08-25 01:33:46 -07:00
hasSecret ( provider : string , name : string ) : boolean ;
hasProvider ( provider : string ) : boolean ;
listProviders ( ) : string [ ] ;
listSecrets ( provider : string ) : string [ ] ;
}
2023-09-21 00:47:21 -07:00
export type BannerName =
| 'V1'
| 'TRIAL_OVER'
| 'TRIAL'
| 'NON_PRODUCTION_LICENSE'
| 'EMAIL_CONFIRMATION' ;
2023-11-27 06:33:21 -08:00
2024-02-27 01:29:16 -08:00
export type Functionality = 'regular' | 'configuration-node' | 'pairedItem' ;
2024-02-06 09:34:34 -08:00
export type Result < T , E > = { ok : true ; result : T } | { ok : false ; error : E } ;
2024-04-08 13:51:49 -07:00
export type CallbackManager = CallbackManagerLC ;
2024-08-21 07:18:16 -07:00
export type IPersonalizationSurveyAnswersV4 = {
version : 'v4' ;
personalization_survey_submitted_at : string ;
personalization_survey_n8n_version : string ;
automationGoalDevops? : string [ ] | null ;
automationGoalDevopsOther? : string | null ;
companyIndustryExtended? : string [ ] | null ;
otherCompanyIndustryExtended? : string [ ] | null ;
companySize? : string | null ;
companyType? : string | null ;
automationGoalSm? : string [ ] | null ;
automationGoalSmOther? : string | null ;
usageModes? : string [ ] | null ;
email? : string | null ;
role? : string | null ;
roleOther? : string | null ;
reportedSource? : string | null ;
reportedSourceOther? : string | null ;
} ;