n8n-nodes-espocrm
Version:
n8n Community Node for EspoCRM
47 lines (46 loc) • 1.41 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.EspoCRMApi = void 0;
class EspoCRMApi {
constructor() {
this.name = 'espoCRMApi';
this.displayName = 'EspoCRM API';
this.documentationUrl = 'https://docs.espocrm.com/development/api/';
this.properties = [
{
displayName: 'URL',
name: 'url',
type: 'string',
default: '',
placeholder: 'https://your-espocrm-instance.com',
description: 'The URL of your EspoCRM instance',
required: true,
},
{
displayName: 'API Key',
name: 'apiKey',
type: 'string',
typeOptions: { password: true },
default: '',
description: 'The API key for authentication',
required: true,
},
];
this.authenticate = {
type: 'generic',
properties: {
headers: {
'X-API-KEY': '={{$credentials.apiKey}}',
},
},
};
this.test = {
request: {
baseURL: '={{$credentials.url}}',
url: '/api/v1/App/user',
method: 'GET',
},
};
}
}
exports.EspoCRMApi = EspoCRMApi;