2022-07-24 08:36:17 -07:00
|
|
|
import { ICredentialType, INodeProperties } from 'n8n-workflow';
|
2021-08-22 01:31:50 -07:00
|
|
|
|
|
|
|
const scopes: string[] = [];
|
|
|
|
|
|
|
|
export class FormstackOAuth2Api implements ICredentialType {
|
|
|
|
name = 'formstackOAuth2Api';
|
2022-07-24 08:36:17 -07:00
|
|
|
extends = ['oAuth2Api'];
|
2021-08-22 01:31:50 -07:00
|
|
|
displayName = 'Formstack OAuth2 API';
|
2021-09-21 10:43:45 -07:00
|
|
|
documentationUrl = 'formstackTrigger';
|
2021-10-07 14:07:56 -07:00
|
|
|
properties: INodeProperties[] = [
|
2022-06-13 22:27:19 -07:00
|
|
|
{
|
|
|
|
displayName: 'Grant Type',
|
|
|
|
name: 'grantType',
|
|
|
|
type: 'hidden',
|
|
|
|
default: 'authorizationCode',
|
|
|
|
},
|
2021-08-22 01:31:50 -07:00
|
|
|
{
|
|
|
|
displayName: 'Authorization URL',
|
|
|
|
name: 'authUrl',
|
2021-10-07 14:07:56 -07:00
|
|
|
type: 'hidden',
|
2021-08-22 01:31:50 -07:00
|
|
|
default: 'https://www.formstack.com/api/v2/oauth2/authorize',
|
|
|
|
required: true,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Access Token URL',
|
|
|
|
name: 'accessTokenUrl',
|
2021-10-07 14:07:56 -07:00
|
|
|
type: 'hidden',
|
2021-08-22 01:31:50 -07:00
|
|
|
default: 'https://www.formstack.com/api/v2/oauth2/token',
|
|
|
|
required: true,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Scope',
|
|
|
|
name: 'scope',
|
2021-10-07 14:07:56 -07:00
|
|
|
type: 'hidden',
|
2021-08-22 01:31:50 -07:00
|
|
|
default: scopes.join(' '),
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Auth URI Query Parameters',
|
|
|
|
name: 'authQueryParameters',
|
2021-10-07 14:07:56 -07:00
|
|
|
type: 'hidden',
|
2021-08-22 01:31:50 -07:00
|
|
|
default: '',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Authentication',
|
|
|
|
name: 'authentication',
|
2021-10-07 14:07:56 -07:00
|
|
|
type: 'hidden',
|
2021-08-22 01:31:50 -07:00
|
|
|
default: 'header',
|
|
|
|
},
|
|
|
|
];
|
|
|
|
}
|