mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-25 04:34:06 -08:00
e09e349fed
* 🔨 fix and clean up * ⚡ Improvements Co-authored-by: ricardo <ricardoespinoza105@gmail.com>
35 lines
686 B
TypeScript
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',
|
|
},
|
|
};
|
|
}
|