2020-02-13 07:43:59 -08:00
|
|
|
import {
|
2022-06-26 15:55:51 -07:00
|
|
|
IAuthenticateGeneric,
|
2022-05-15 11:39:54 -07:00
|
|
|
ICredentialTestRequest,
|
2020-02-13 07:43:59 -08:00
|
|
|
ICredentialType,
|
2021-06-12 09:39:55 -07:00
|
|
|
INodeProperties,
|
2020-02-13 07:43:59 -08:00
|
|
|
} from 'n8n-workflow';
|
|
|
|
|
|
|
|
export class MailjetSmsApi implements ICredentialType {
|
|
|
|
name = 'mailjetSmsApi';
|
2022-12-02 12:54:28 -08:00
|
|
|
|
2020-02-13 07:43:59 -08:00
|
|
|
displayName = 'Mailjet SMS API';
|
2022-12-02 12:54:28 -08:00
|
|
|
|
2020-08-17 05:42:09 -07:00
|
|
|
documentationUrl = 'mailjet';
|
2022-12-02 12:54:28 -08:00
|
|
|
|
2021-06-12 09:39:55 -07:00
|
|
|
properties: INodeProperties[] = [
|
2020-02-13 07:43:59 -08:00
|
|
|
{
|
|
|
|
displayName: 'Token',
|
|
|
|
name: 'token',
|
2021-06-12 09:39:55 -07:00
|
|
|
type: 'string',
|
2020-02-13 07:43:59 -08:00
|
|
|
default: '',
|
|
|
|
},
|
|
|
|
];
|
2022-06-26 15:55:51 -07:00
|
|
|
|
|
|
|
authenticate: IAuthenticateGeneric = {
|
|
|
|
type: 'generic',
|
2022-05-15 11:39:54 -07:00
|
|
|
properties: {
|
2022-06-26 15:55:51 -07:00
|
|
|
headers: {
|
|
|
|
Authorization: '=Bearer {{$credentials.token}}',
|
|
|
|
},
|
2022-05-15 11:39:54 -07:00
|
|
|
},
|
|
|
|
};
|
2022-06-26 15:55:51 -07:00
|
|
|
|
2022-05-15 11:39:54 -07:00
|
|
|
test: ICredentialTestRequest = {
|
|
|
|
request: {
|
|
|
|
baseURL: `https://api.mailjet.com`,
|
|
|
|
url: '/v4/sms',
|
|
|
|
method: 'GET',
|
|
|
|
},
|
|
|
|
};
|
2020-02-13 07:43:59 -08:00
|
|
|
}
|