2021-01-19 15:16:25 -08:00
|
|
|
import {
|
2022-07-10 03:32:19 -07:00
|
|
|
IAuthenticateGeneric,
|
2021-01-19 15:16:25 -08:00
|
|
|
ICredentialType,
|
2021-06-12 09:39:55 -07:00
|
|
|
INodeProperties,
|
2021-01-19 15:16:25 -08:00
|
|
|
} from 'n8n-workflow';
|
|
|
|
|
|
|
|
export class SendGridApi implements ICredentialType {
|
|
|
|
name = 'sendGridApi';
|
|
|
|
displayName = 'SendGrid API';
|
|
|
|
documentationUrl = 'sendgrid';
|
2021-06-12 09:39:55 -07:00
|
|
|
properties: INodeProperties[] = [
|
2021-01-19 15:16:25 -08:00
|
|
|
{
|
|
|
|
displayName: 'API Key',
|
|
|
|
name: 'apiKey',
|
2021-06-12 09:39:55 -07:00
|
|
|
type: 'string',
|
2021-01-19 15:16:25 -08:00
|
|
|
default: '',
|
|
|
|
},
|
|
|
|
];
|
2022-07-10 03:32:19 -07:00
|
|
|
authenticate = {
|
|
|
|
type: 'generic',
|
|
|
|
properties: {
|
|
|
|
headers: {
|
|
|
|
Authorization: '=Bearer {{$credentials.apiKey}}',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
} as IAuthenticateGeneric;
|
2021-01-19 15:16:25 -08:00
|
|
|
}
|