UNPKG

n8n-nodes-tulip

Version:
20 lines 757 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.apiRequest = apiRequest; async function apiRequest(method, endpoint, body = {}, query = {}, resolveWithFullResponse = false) { const credentials = await this.getCredentials('tulipApi'); const baseUrl = credentials.factoryUrl.replace(/\/$/, ''); const options = { method, body, qs: query, url: `${baseUrl}/api/v3/${endpoint}`, headers: { 'content-type': 'application/json; charset=utf-8', }, json: true, resolveWithFullResponse: resolveWithFullResponse, }; return await this.helpers.requestWithAuthentication.call(this, 'tulipApi', options); } //# sourceMappingURL=index.js.map