UNPKG

n8n-nodes-everest-tms

Version:

Everest TMS n8n integration

71 lines 2.53 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.EverestApi = void 0; class EverestApi { constructor() { this.name = 'everestApi'; this.displayName = 'Everest API'; this.documentationUrl = 'https://geteverest.io/'; this.properties = [ { displayName: 'API Domain', name: 'domain', type: 'string', default: 'tests.everst.io', required: true, description: 'The domain of your Everest platform (e.g., your-platform.everst.io)', placeholder: 'your-platform.everst.io', }, { displayName: 'Client ID', name: 'client_id', type: 'string', default: '', required: true, description: 'The Client ID from your Everest API credentials', placeholder: 'your-client-id-here', }, { displayName: 'Client Secret', name: 'client_secret', type: 'string', typeOptions: { password: true }, default: '', required: true, description: 'The Client Secret from your Everest API credentials', placeholder: 'your-client-secret-here', }, ]; this.authenticate = { type: 'generic', properties: { headers: { 'Authorization': '=Bearer {{$credentials.bearer_token}}', 'Content-Type': 'application/json', }, }, }; this.test = { request: { baseURL: '={{$credentials.domain.includes("://") ? $credentials.domain : "https://" + $credentials.domain}}', url: '/api/me', method: 'GET', headers: { 'Authorization': '=Bearer {{$credentials.bearer_token}}', 'Content-Type': 'application/json', }, }, rules: [ { type: 'responseCode', properties: { value: 200, message: 'Authentication failed. Please check your credentials.', }, }, ], }; } } exports.EverestApi = EverestApi; //# sourceMappingURL=EverestApi.credentials.js.map