n8n-nodes-chat-data
Version:
Chatdata integration for n8n. Manage chatbots, send messages, and retrieve leads from your Chatdata account.
50 lines • 1.59 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.ChatDataApi = void 0;
class ChatDataApi {
constructor() {
this.name = 'chatDataApi';
this.displayName = 'Chat Data API';
this.properties = [
{
displayName: 'API URL',
name: 'baseUrl',
type: 'string',
default: 'https://api.chat-data.com',
description: 'The URL to the Chat Data API',
},
{
displayName: 'API Key',
name: 'apiKey',
type: 'string',
typeOptions: {
password: true,
},
default: '',
placeholder: 'sk-...',
description: 'The API Key of your Chat Data account',
},
];
this.authenticate = {
type: 'generic',
properties: {
headers: {
Authorization: '=Bearer {{$credentials.apiKey}}',
},
},
};
this.test = {
request: {
baseURL: '={{$credentials.baseUrl}}',
url: '/api/v2/current-plan',
method: 'GET',
headers: {
Authorization: '=Bearer {{$credentials.apiKey}}',
},
skipSslCertificateValidation: '={{$credentials.ignoreSSLErrors}}',
},
};
}
}
exports.ChatDataApi = ChatDataApi;
//# sourceMappingURL=ChatDataApi.credentials.js.map