n8n/packages/nodes-base/credentials/MailjetSmsApi.credentials.ts

35 lines
686 B
TypeScript
Raw Normal View History

2020-02-13 07:43:59 -08:00
import {
IAuthenticateHeaderAuth,
ICredentialTestRequest,
2020-02-13 07:43:59 -08:00
ICredentialType,
INodeProperties,
2020-02-13 07:43:59 -08:00
} from 'n8n-workflow';
export class MailjetSmsApi implements ICredentialType {
name = 'mailjetSmsApi';
displayName = 'Mailjet SMS API';
documentationUrl = 'mailjet';
properties: INodeProperties[] = [
2020-02-13 07:43:59 -08:00
{
displayName: 'Token',
name: 'token',
type: 'string',
2020-02-13 07:43:59 -08:00
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',
},
};
2020-02-13 07:43:59 -08:00
}