n8n/packages/nodes-base/credentials/MailjetSmsApi.credentials.ts
Michael Kret e09e349fed
fix(Mailjet Trigger Node): Fix issue that node could not get activated (#3281)
* 🔨 fix and clean up

*  Improvements

Co-authored-by: ricardo <ricardoespinoza105@gmail.com>
2022-05-15 20:39:54 +02:00

35 lines
686 B
TypeScript

import {
IAuthenticateHeaderAuth,
ICredentialTestRequest,
ICredentialType,
INodeProperties,
} from 'n8n-workflow';
export class MailjetSmsApi implements ICredentialType {
name = 'mailjetSmsApi';
displayName = 'Mailjet SMS API';
documentationUrl = 'mailjet';
properties: INodeProperties[] = [
{
displayName: 'Token',
name: 'token',
type: 'string',
default: '',
},
];
authenticate: IAuthenticateHeaderAuth = {
type: 'headerAuth',
properties: {
name: 'Authorization',
value: '=Bearer {{$credentials.token}}',
},
};
test: ICredentialTestRequest = {
request: {
baseURL: `https://api.mailjet.com`,
url: '/v4/sms',
method: 'GET',
},
};
}