n8n/packages/nodes-base/credentials/RaindropOAuth2Api.credentials.ts
Iván Ovejero 9dba8b866a
Add Raindrop node (#1464)
*  Register node and credentials

*  Implement OAuth2 flow

* 🎨 Add SVG icon

*  Add preliminary node stub

*  Add preliminary generic functions

*  Add resource description stubs

*  Implement collection:getAll

*  Implement collection:get

*  Implement collection:create

*  Implement collection:delete

*  Implement collection:update

*  Implement raindrop:create

*  Implement raindrop:delete and update

*  Implement user:get

*  Improvements

* 🎨 Touch up resource descriptions

* 🎨 Rename resource description files

*  Remove params for uneditable properties

*  Remove unneeded success response assignment

*  Update raindrop params

*  Minor improvements

*  Small improvement

*  Minor improvements

Co-authored-by: ricardo <ricardoespinoza105@gmail.com>
Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
2021-02-22 13:11:51 +01:00

48 lines
1 KiB
TypeScript

import {
ICredentialType,
NodePropertyTypes,
} from 'n8n-workflow';
// https://developer.raindrop.io/v1/authentication
export class RaindropOAuth2Api implements ICredentialType {
name = 'raindropOAuth2Api';
extends = [
'oAuth2Api',
];
displayName = 'Raindrop OAuth2 API';
documentationUrl = 'raindrop';
properties = [
{
displayName: 'Authorization URL',
name: 'authUrl',
type: 'hidden' as NodePropertyTypes,
default: 'https://raindrop.io/oauth/authorize',
},
{
displayName: 'Access Token URL',
name: 'accessTokenUrl',
type: 'hidden' as NodePropertyTypes,
default: 'https://raindrop.io/oauth/access_token',
},
{
displayName: 'Auth URI Query Parameters',
name: 'authQueryParameters',
type: 'hidden' as NodePropertyTypes,
default: '',
},
{
displayName: 'Authentication',
name: 'authentication',
type: 'hidden' as NodePropertyTypes,
default: 'body',
},
{
displayName: 'Scope',
name: 'scope',
type: 'hidden' as NodePropertyTypes,
default: '',
},
];
}