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

36 lines
706 B
TypeScript
Raw Normal View History

import {
IAuthenticateGeneric,
ICredentialTestRequest,
ICredentialType,
INodeProperties,
} from 'n8n-workflow';
2020-06-24 06:46:56 -07:00
export class PostmarkApi implements ICredentialType {
name = 'postmarkApi';
displayName = 'Postmark API';
documentationUrl = 'postmark';
properties: INodeProperties[] = [
2020-06-24 06:46:56 -07:00
{
2020-07-07 01:48:56 -07:00
displayName: 'Server API Token',
2020-06-24 06:46:56 -07:00
name: 'serverToken',
type: 'string',
2020-06-24 06:46:56 -07:00
default: '',
},
];
authenticate: IAuthenticateGeneric = {
type: 'generic',
properties: {
headers: {
'X-Postmark-Server-Token': '={{$credentials.serverToken}}',
},
},
};
test: ICredentialTestRequest = {
request: {
baseURL: 'https://api.postmarkapp.com',
url: '/server',
method: 'GET',
},
};
2020-06-24 06:46:56 -07:00
}