Merge 'master' into 'Typeform-OAuth2-support''

This commit is contained in:
ricardo
2020-06-14 19:19:07 -04:00
57 changed files with 3092 additions and 615 deletions

View File

@@ -0,0 +1,26 @@
import {
ICredentialType,
NodePropertyTypes,
} from 'n8n-workflow';
const scopes = [
'https://www.googleapis.com/auth/drive',
'https://www.googleapis.com/auth/drive.appdata',
'https://www.googleapis.com/auth/drive.photos.readonly',
];
export class GoogleDriveOAuth2Api implements ICredentialType {
name = 'googleDriveOAuth2Api';
extends = [
'googleOAuth2Api',
];
displayName = 'Google Drive OAuth2 API';
properties = [
{
displayName: 'Scope',
name: 'scope',
type: 'hidden' as NodePropertyTypes,
default: scopes.join(' '),
},
];
}

View File

@@ -0,0 +1,53 @@
import {
ICredentialType,
NodePropertyTypes,
} from 'n8n-workflow';
const scopes = [
'contacts',
'forms',
'tickets',
];
export class HubspotOAuth2Api implements ICredentialType {
name = 'hubspotOAuth2Api';
extends = [
'oAuth2Api',
];
displayName = 'Hubspot OAuth2 API';
properties = [
{
displayName: 'Authorization URL',
name: 'authUrl',
type: 'hidden' as NodePropertyTypes,
default: 'https://app.hubspot.com/oauth/authorize',
required: true,
},
{
displayName: 'Access Token URL',
name: 'accessTokenUrl',
type: 'hidden' as NodePropertyTypes,
default: 'https://api.hubapi.com/oauth/v1/token',
required: true,
},
{
displayName: 'Scope',
name: 'scope',
type: 'hidden' as NodePropertyTypes,
default: scopes.join(' '),
},
{
displayName: 'Auth URI Query Parameters',
name: 'authQueryParameters',
type: 'hidden' as NodePropertyTypes,
default: 'grant_type=authorization_code',
},
{
displayName: 'Authentication',
name: 'authentication',
type: 'hidden' as NodePropertyTypes,
default: 'body',
description: 'Resource to consume.',
},
];
}

View File

@@ -0,0 +1,54 @@
import {
ICredentialType,
NodePropertyTypes,
} from 'n8n-workflow';
export class MailchimpOAuth2Api implements ICredentialType {
name = 'mailchimpOAuth2Api';
extends = [
'oAuth2Api',
];
displayName = 'Mailchimp OAuth2 API';
properties = [
{
displayName: 'Authorization URL',
name: 'authUrl',
type: 'hidden' as NodePropertyTypes,
default: 'https://login.mailchimp.com/oauth2/authorize',
required: true,
},
{
displayName: 'Access Token URL',
name: 'accessTokenUrl',
type: 'hidden' as NodePropertyTypes,
default: 'https://login.mailchimp.com/oauth2/token',
required: true,
},
{
displayName: 'Metadata',
name: 'metadataUrl',
type: 'hidden' as NodePropertyTypes,
default: 'https://login.mailchimp.com/oauth2/metadata',
required: true,
},
{
displayName: 'Scope',
name: 'scope',
type: 'hidden' as NodePropertyTypes,
default: '',
},
{
displayName: 'Auth URI Query Parameters',
name: 'authQueryParameters',
type: 'hidden' as NodePropertyTypes,
default: '',
},
{
displayName: 'Authentication',
name: 'authentication',
type: 'hidden' as NodePropertyTypes,
default: 'header',
},
];
}

View File

@@ -0,0 +1,55 @@
import {
ICredentialType,
NodePropertyTypes,
} from 'n8n-workflow';
export class MauticOAuth2Api implements ICredentialType {
name = 'mauticOAuth2Api';
extends = [
'oAuth2Api',
];
displayName = 'Mautic OAuth2 API';
properties = [
{
displayName: 'URL',
name: 'url',
type: 'string' as NodePropertyTypes,
default: '',
placeholder: 'https://name.mautic.net',
},
{
displayName: 'Authorization URL',
name: 'authUrl',
type: 'string' as NodePropertyTypes,
default: '',
placeholder: 'https://name.mautic.net/oauth/v2/authorize',
required: true,
},
{
displayName: 'Access Token URL',
name: 'accessTokenUrl',
type: 'string' as NodePropertyTypes,
default: '',
placeholder: 'https://name.mautic.net/oauth/v2/token',
required: true,
},
{
displayName: 'Scope',
name: 'scope',
type: 'hidden' as NodePropertyTypes,
default: '',
},
{
displayName: 'Auth URI Query Parameters',
name: 'authQueryParameters',
type: 'hidden' as NodePropertyTypes,
default: '',
},
{
displayName: 'Authentication',
name: 'authentication',
type: 'hidden' as NodePropertyTypes,
default: 'header',
},
];
}

View File

@@ -0,0 +1,14 @@
import { ICredentialType, NodePropertyTypes } from 'n8n-workflow';
export class MessageBirdApi implements ICredentialType {
name = 'messageBirdApi';
displayName = 'MessageBird API';
properties = [
{
displayName: 'API Key',
name: 'accessKey',
type: 'string' as NodePropertyTypes,
default: ''
}
];
}

View File

@@ -0,0 +1,55 @@
import {
ICredentialType,
NodePropertyTypes,
} from 'n8n-workflow';
const scopes = [
'surveys_read',
'collectors_read',
'responses_read',
'responses_read_detail',
'webhooks_write',
'webhooks_read',
];
export class SurveyMonkeyOAuth2Api implements ICredentialType {
name = 'surveyMonkeyOAuth2Api';
extends = [
'oAuth2Api',
];
displayName = 'SurveyMonkey OAuth2 API';
properties = [
{
displayName: 'Authorization URL',
name: 'authUrl',
type: 'hidden' as NodePropertyTypes,
default: 'https://api.surveymonkey.com/oauth/authorize',
required: true,
},
{
displayName: 'Access Token URL',
name: 'accessTokenUrl',
type: 'hidden' as NodePropertyTypes,
default: 'https://api.surveymonkey.com/oauth/token',
required: true,
},
{
displayName: 'Scope',
name: 'scope',
type: 'hidden' as NodePropertyTypes,
default: scopes.join(','),
},
{
displayName: 'Auth URI Query Parameters',
name: 'authQueryParameters',
type: 'hidden' as NodePropertyTypes,
default: '',
},
{
displayName: 'Authentication',
name: 'authentication',
type: 'hidden' as NodePropertyTypes,
default: 'body'
},
];
}

View File

@@ -8,10 +8,11 @@ export class ZendeskApi implements ICredentialType {
displayName = 'Zendesk API';
properties = [
{
displayName: 'URL',
name: 'url',
displayName: 'Subdomain',
name: 'subdomain',
type: 'string' as NodePropertyTypes,
default: '',
description: 'The subdomain of your Zendesk work environment.',
default: 'n8n',
},
{
displayName: 'Email',

View File

@@ -0,0 +1,79 @@
import {
ICredentialType,
NodePropertyTypes,
} from 'n8n-workflow';
const scopes = [
'read',
'write',
];
export class ZendeskOAuth2Api implements ICredentialType {
name = 'zendeskOAuth2Api';
extends = [
'oAuth2Api',
];
displayName = 'Zendesk OAuth2 API';
properties = [
{
displayName: 'Subdomain',
name: 'subdomain',
type: 'string' as NodePropertyTypes,
default: '',
placeholder: 'n8n',
description: 'The subdomain of your Zendesk work environment.',
required: true,
},
{
displayName: 'Authorization URL',
name: 'authUrl',
type: 'string' as NodePropertyTypes,
default: 'https://{SUBDOMAIN_HERE}.zendesk.com/oauth/authorizations/new',
description: 'URL to get authorization code. Replace {SUBDOMAIN_HERE} with your subdomain.',
required: true,
},
{
displayName: 'Access Token URL',
name: 'accessTokenUrl',
type: 'string' as NodePropertyTypes,
default: 'https://{SUBDOMAIN_HERE}.zendesk.com/oauth/tokens',
description: 'URL to get access token. Replace {SUBDOMAIN_HERE} with your subdomain.',
required: true,
},
{
displayName: 'Client ID',
name: 'clientId',
type: 'string' as NodePropertyTypes,
default: '',
required: true,
},
{
displayName: 'Client Secret',
name: 'clientSecret',
type: 'string' as NodePropertyTypes,
default: '',
required: true,
},
{
displayName: 'Scope',
name: 'scope',
type: 'hidden' as NodePropertyTypes,
default: scopes.join(' '),
},
{
displayName: 'Auth URI Query Parameters',
name: 'authQueryParameters',
type: 'hidden' as NodePropertyTypes,
default: '',
description: 'For some services additional query parameters have to be set which can be defined here.',
placeholder: '',
},
{
displayName: 'Authentication',
name: 'authentication',
type: 'hidden' as NodePropertyTypes,
default: 'body',
description: 'Resource to consume.',
},
];
}