mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-10 14:44:05 -08:00
86721fc496
* ⚡ Add generic auth type * ⚡ Remove queryAuth * ⚡ Remove bearer * ⚡ Remove headerAuth * ⚡ Remove basicAuth * ⚡ Adjust tests * ⚡ Small improvements * 👕 Fix lint issue
38 lines
682 B
TypeScript
38 lines
682 B
TypeScript
import {
|
|
IAuthenticateGeneric,
|
|
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: IAuthenticateGeneric = {
|
|
type: 'generic',
|
|
properties: {
|
|
headers: {
|
|
Authorization: '=Bearer {{$credentials.token}}',
|
|
},
|
|
},
|
|
};
|
|
|
|
test: ICredentialTestRequest = {
|
|
request: {
|
|
baseURL: `https://api.mailjet.com`,
|
|
url: '/v4/sms',
|
|
method: 'GET',
|
|
},
|
|
};
|
|
}
|