Merge branch 'Master' into 'Pipedrive-OAuth2-support'

This commit is contained in:
ricardo
2020-07-23 16:51:05 -04:00
parent c1b4c570fd
commit b187a8fd7d
271 changed files with 17019 additions and 2796 deletions

View File

@@ -14,8 +14,10 @@ import {
} from './GenericFunctions';
import * as basicAuth from 'basic-auth';
import { Response } from 'express';
import {
Response,
} from 'express';
function authorizationError(resp: Response, realm: string, responseCode: number, message?: string) {
if (message === undefined) {
@@ -52,6 +54,10 @@ export class PipedriveTrigger implements INodeType {
{
name: 'pipedriveApi',
required: true,
},
{
name: 'httpBasicAuth',
required: true,
displayOptions: {
show: {
authentication: [
@@ -60,18 +66,6 @@ export class PipedriveTrigger implements INodeType {
},
},
},
{
name: 'pipedriveOAuth2Api',
required: true,
displayOptions: {
show: {
authentication: [
'oAuth2',
],
},
},
},
],
],
webhooks: [
{
@@ -91,17 +85,13 @@ export class PipedriveTrigger implements INodeType {
name: 'Basic Auth',
value: 'basicAuth'
},
{
name: 'OAuth2',
value: 'oAuth2',
},
{
name: 'None',
value: 'none',
value: 'none'
},
],
default: 'basicAuth',
description: 'Method of authentication.',
default: 'none',
description: 'If authentication should be activated for the webhook (makes it more scure).',
},
{
displayName: 'Action',
@@ -191,7 +181,6 @@ export class PipedriveTrigger implements INodeType {
description: 'Type of object to receive notifications about.',
},
],
};
// @ts-ignore (because of request)
@@ -288,8 +277,6 @@ export class PipedriveTrigger implements INodeType {
},
};
async webhook(this: IWebhookFunctions): Promise<IWebhookResponseData> {
const req = this.getRequestObject();
const resp = this.getResponseObject();