n8n/packages/nodes-base/credentials/MailjetSmsApi.credentials.ts
Iván Ovejero d9b98fc8be
refactor: Lint for no unneeded backticks (#5057) (no-changelog)
*  Create rule `no-unneeded-backticks`

* 👕 Enable rule

*  Run rule on `cli`

*  Run rule on `core`

*  Run rule on `workflow`

*  Rule rule on `design-system`

*  Run rule on `node-dev`

*  Run rule on `editor-ui`

*  Run rule on `nodes-base`
2022-12-29 12:20:43 +01:00

41 lines
685 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',
},
};
}