UNPKG

n8n-nodes-base

Version:

Base nodes of n8n

25 lines 885 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.twakeApiRequest = twakeApiRequest; /** * Make an API request to Twake * */ async function twakeApiRequest(method, resource, body, query, uri) { const options = { headers: {}, method, body, qs: query, uri: uri || `https://plugins.twake.app/plugins/n8n${resource}`, json: true, }; // if (authenticationMethod === 'cloud') { // } else { // const credentials = await this.getCredentials('twakeServerApi'); // options.auth = { user: credentials!.publicId as string, pass: credentials!.privateApiKey as string }; // options.uri = `${credentials!.hostUrl}/api/v1${resource}`; // } return await this.helpers.requestWithAuthentication.call(this, 'twakeCloudApi', options); } //# sourceMappingURL=GenericFunctions.js.map