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

41 lines
685 B
TypeScript
Raw Normal View History

2020-02-13 07:43:59 -08:00
import {
IAuthenticateGeneric,
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';
2020-02-13 07:43:59 -08:00
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: IAuthenticateGeneric = {
type: 'generic',
properties: {
headers: {
Authorization: '=Bearer {{$credentials.token}}',
},
},
};
test: ICredentialTestRequest = {
request: {
baseURL: `https://api.mailjet.com`,
url: '/v4/sms',
method: 'GET',
},
};
2020-02-13 07:43:59 -08:00
}