2020-07-03 02:22:39 -07:00
|
|
|
import {
|
|
|
|
ICredentialType,
|
2021-06-12 09:39:55 -07:00
|
|
|
INodeProperties,
|
2020-07-03 02:22:39 -07:00
|
|
|
} from 'n8n-workflow';
|
|
|
|
|
|
|
|
|
|
|
|
export class BitlyOAuth2Api implements ICredentialType {
|
|
|
|
name = 'bitlyOAuth2Api';
|
2020-10-01 05:01:39 -07:00
|
|
|
displayName = 'Bitly OAuth2 API';
|
2020-08-17 05:42:09 -07:00
|
|
|
documentationUrl = 'bitly';
|
2020-10-01 05:01:39 -07:00
|
|
|
extends = [
|
2020-07-03 02:22:39 -07:00
|
|
|
'oAuth2Api',
|
|
|
|
];
|
2021-06-12 09:39:55 -07:00
|
|
|
properties: INodeProperties[] = [
|
2020-07-03 02:22:39 -07:00
|
|
|
{
|
|
|
|
displayName: 'Authorization URL',
|
|
|
|
name: 'authUrl',
|
2021-06-12 09:39:55 -07:00
|
|
|
type: 'hidden',
|
2020-07-03 02:22:39 -07:00
|
|
|
default: 'https://bitly.com/oauth/authorize',
|
|
|
|
required: true,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Access Token URL',
|
|
|
|
name: 'accessTokenUrl',
|
2021-06-12 09:39:55 -07:00
|
|
|
type: 'hidden',
|
2020-07-03 02:22:39 -07:00
|
|
|
default: 'https://api-ssl.bitly.com/oauth/access_token',
|
|
|
|
required: true,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Client ID',
|
|
|
|
name: 'clientId',
|
2021-06-12 09:39:55 -07:00
|
|
|
type: 'string',
|
2020-07-03 02:22:39 -07:00
|
|
|
default: '',
|
|
|
|
required: true,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Client Secret',
|
|
|
|
name: 'clientSecret',
|
2021-06-12 09:39:55 -07:00
|
|
|
type: 'string',
|
2020-07-03 02:22:39 -07:00
|
|
|
typeOptions: {
|
|
|
|
password: true,
|
|
|
|
},
|
|
|
|
default: '',
|
|
|
|
required: true,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Scope',
|
|
|
|
name: 'scope',
|
2021-06-12 09:39:55 -07:00
|
|
|
type: 'hidden',
|
2020-07-03 02:22:39 -07:00
|
|
|
default: '',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Auth URI Query Parameters',
|
|
|
|
name: 'authQueryParameters',
|
2021-06-12 09:39:55 -07:00
|
|
|
type: 'hidden',
|
2020-07-03 02:22:39 -07:00
|
|
|
default: '',
|
2022-04-13 23:32:27 -07:00
|
|
|
description: 'For some services additional query parameters have to be set which can be defined here',
|
2020-07-08 12:15:25 -07:00
|
|
|
placeholder: '',
|
2020-07-03 02:22:39 -07:00
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Authentication',
|
|
|
|
name: 'authentication',
|
2021-06-12 09:39:55 -07:00
|
|
|
type: 'hidden',
|
2020-07-08 12:15:25 -07:00
|
|
|
default: 'body',
|
2020-07-03 02:22:39 -07:00
|
|
|
},
|
|
|
|
];
|
|
|
|
}
|