n8n-nodes-whoz
Version:
N8N community node for Whoz talent management platform
126 lines (125 loc) • 3.5 kB
TypeScript
export interface ICredentialType {
name: string;
displayName: string;
documentationUrl?: string;
properties: INodeProperties[];
authenticate?: (credentials: any, requestOptions: any) => Promise<any>;
test?: any;
}
export interface INodeType {
description: INodeTypeDescription;
execute?(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
webhook?(this: IWebhookFunctions): Promise<IWebhookResponseData>;
webhookMethods?: any;
}
export interface INodeTypeDescription {
displayName: string;
name: string;
icon?: string;
group: string[];
version: number;
subtitle?: string;
description: string;
defaults: {
name: string;
};
inputs: string[];
outputs: string[];
credentials?: Array<{
name: string;
required: boolean;
}>;
requestDefaults?: {
baseURL?: string;
headers?: Record<string, string>;
};
webhooks?: Array<{
name: string;
httpMethod: string;
responseMode: string;
path: string;
}>;
properties: INodeProperties[];
}
export interface INodeProperties {
displayName: string;
name: string;
type: string;
noDataExpression?: boolean;
displayOptions?: {
show?: Record<string, string[]>;
};
options?: any;
default?: any;
description?: string;
required?: boolean;
typeOptions?: any;
placeholder?: string;
items?: any;
}
export interface IExecuteFunctions {
getInputData(): INodeExecutionData[];
getNodeParameter(parameterName: string, itemIndex: number, fallbackValue?: any): any;
getCredentials(type: string): Promise<any>;
helpers: {
returnJsonArray(jsonData: any[]): INodeExecutionData[];
httpRequest(requestOptions: any): Promise<any>;
};
continueOnFail(): boolean;
getNode(): any;
}
export interface INodeExecutionData {
json: any;
binary?: any;
}
export interface IDataObject {
[key: string]: any;
}
export interface IHttpRequestOptions {
method: string;
url: string;
headers?: Record<string, string>;
body?: any;
form?: any;
qs?: any;
json?: boolean;
}
export type IHttpRequestMethods = 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH';
export interface ICredentialDataDecryptedObject {
[key: string]: any;
}
export interface ICredentialTestRequest {
request: {
baseURL?: string;
url: string;
method: string;
headers?: Record<string, string>;
};
}
export interface IHookFunctions extends IExecuteFunctions {
getWorkflowStaticData(type: string): any;
getNodeWebhookUrl(name: string): string;
getNodeParameter(parameterName: string, fallbackValue?: any): any;
}
export interface ILoadOptionsFunctions extends IExecuteFunctions {
}
export interface IWebhookFunctions extends IExecuteFunctions {
getBodyData(): any;
getHeaderData(): Record<string, string>;
getNodeParameter(parameterName: string, fallbackValue?: any): any;
}
export type JsonObject = Record<string, any>;
export interface IWebhookResponseData {
workflowData?: INodeExecutionData[][];
webhookResponse?: {
statusCode?: number;
headers?: Record<string, string>;
body?: any;
};
}
export declare class NodeOperationError extends Error {
constructor(node: any, message: string, options?: any);
}
export declare class NodeApiError extends Error {
constructor(node: any, error: any, options?: any);
}