n8n/packages/nodes-base/credentials/NocoDbApiToken.credentials.ts
Michael Kret 91d7e16c81
n8n-3867-progressively-apply-prettier-to-all (#3873)
* 🔨 formatting nodes with prettier
2022-08-17 17:50:24 +02:00

37 lines
680 B
TypeScript

import {
IAuthenticateGeneric,
ICredentialTestRequest,
ICredentialType,
INodeProperties,
} from 'n8n-workflow';
export class NocoDbApiToken implements ICredentialType {
name = 'nocoDbApiToken';
displayName = 'NocoDB API Token';
documentationUrl = 'nocoDb';
properties: INodeProperties[] = [
{
displayName: 'API Token',
name: 'apiToken',
type: 'string',
default: '',
},
{
displayName: 'Host',
name: 'host',
type: 'string',
default: '',
placeholder: 'http(s)://localhost:8080',
},
];
authenticate: IAuthenticateGeneric = {
type: 'generic',
properties: {
headers: {
'xc-token': '={{$credentials.apiToken}}',
},
},
};
}