2021-02-22 04:11:51 -08:00
|
|
|
import {
|
|
|
|
ICredentialType,
|
2021-06-12 09:39:55 -07:00
|
|
|
INodeProperties,
|
2021-02-22 04:11:51 -08:00
|
|
|
} from 'n8n-workflow';
|
|
|
|
|
|
|
|
// https://developer.raindrop.io/v1/authentication
|
|
|
|
|
|
|
|
export class RaindropOAuth2Api implements ICredentialType {
|
|
|
|
name = 'raindropOAuth2Api';
|
|
|
|
extends = [
|
|
|
|
'oAuth2Api',
|
|
|
|
];
|
|
|
|
displayName = 'Raindrop OAuth2 API';
|
|
|
|
documentationUrl = 'raindrop';
|
2021-06-12 09:39:55 -07:00
|
|
|
properties: INodeProperties[] = [
|
2022-06-13 22:27:19 -07:00
|
|
|
{
|
|
|
|
displayName: 'Grant Type',
|
|
|
|
name: 'grantType',
|
|
|
|
type: 'hidden',
|
|
|
|
default: 'authorizationCode',
|
|
|
|
},
|
2021-02-22 04:11:51 -08:00
|
|
|
{
|
|
|
|
displayName: 'Authorization URL',
|
|
|
|
name: 'authUrl',
|
2021-06-12 09:39:55 -07:00
|
|
|
type: 'hidden',
|
2021-02-22 04:11:51 -08:00
|
|
|
default: 'https://raindrop.io/oauth/authorize',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Access Token URL',
|
|
|
|
name: 'accessTokenUrl',
|
2021-06-12 09:39:55 -07:00
|
|
|
type: 'hidden',
|
2021-02-22 04:11:51 -08:00
|
|
|
default: 'https://raindrop.io/oauth/access_token',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Auth URI Query Parameters',
|
|
|
|
name: 'authQueryParameters',
|
2021-06-12 09:39:55 -07:00
|
|
|
type: 'hidden',
|
2021-02-22 04:11:51 -08:00
|
|
|
default: '',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Authentication',
|
|
|
|
name: 'authentication',
|
2021-06-12 09:39:55 -07:00
|
|
|
type: 'hidden',
|
2021-02-22 04:11:51 -08:00
|
|
|
default: 'body',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Scope',
|
|
|
|
name: 'scope',
|
2021-06-12 09:39:55 -07:00
|
|
|
type: 'hidden',
|
2021-02-22 04:11:51 -08:00
|
|
|
default: '',
|
|
|
|
},
|
|
|
|
];
|
|
|
|
}
|