2022-07-24 08:36:17 -07:00
|
|
|
import { ICredentialType, INodeProperties } from 'n8n-workflow';
|
2021-04-15 15:35:39 -07:00
|
|
|
|
2022-07-24 08:36:17 -07:00
|
|
|
const scopes = ['boards:write', 'boards:read'];
|
2021-04-15 15:35:39 -07:00
|
|
|
|
|
|
|
export class MondayComOAuth2Api implements ICredentialType {
|
|
|
|
name = 'mondayComOAuth2Api';
|
2022-07-24 08:36:17 -07:00
|
|
|
extends = ['oAuth2Api'];
|
2021-04-15 15:35:39 -07:00
|
|
|
displayName = 'Monday.com OAuth2 API';
|
|
|
|
documentationUrl = 'monday';
|
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-04-15 15:35:39 -07:00
|
|
|
{
|
|
|
|
displayName: 'Authorization URL',
|
|
|
|
name: 'authUrl',
|
2021-06-12 09:39:55 -07:00
|
|
|
type: 'hidden',
|
2021-04-15 15:35:39 -07:00
|
|
|
default: 'https://auth.monday.com/oauth2/authorize',
|
|
|
|
required: true,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Access Token URL',
|
|
|
|
name: 'accessTokenUrl',
|
2021-06-12 09:39:55 -07:00
|
|
|
type: 'hidden',
|
2021-04-15 15:35:39 -07:00
|
|
|
default: 'https://auth.monday.com/oauth2/token',
|
|
|
|
required: true,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Scope',
|
|
|
|
name: 'scope',
|
2021-06-12 09:39:55 -07:00
|
|
|
type: 'hidden',
|
2021-04-15 15:35:39 -07:00
|
|
|
default: scopes.join(' '),
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Auth URI Query Parameters',
|
|
|
|
name: 'authQueryParameters',
|
2021-06-12 09:39:55 -07:00
|
|
|
type: 'hidden',
|
2021-04-15 15:35:39 -07:00
|
|
|
default: '',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Authentication',
|
|
|
|
name: 'authentication',
|
2021-06-12 09:39:55 -07:00
|
|
|
type: 'hidden',
|
2021-04-15 15:35:39 -07:00
|
|
|
default: 'body',
|
|
|
|
},
|
|
|
|
];
|
|
|
|
}
|