n8n-nodes-qlik-cloud 1.0.2 → 1.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,32 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.qlikApiRequest = qlikApiRequest;
4
- const n8n_workflow_1 = require("n8n-workflow");
5
- async function qlikApiRequest(method, endpoint, body, qs) {
6
- const credentials = await this.getCredentials('qlikCloudApi');
7
- if (!credentials) {
8
- throw new n8n_workflow_1.NodeApiError(this.getNode(), {
9
- message: 'No credentials found for Qlik Cloud API',
10
- });
11
- }
12
- const baseUrl = credentials.baseUrl;
13
- const accessToken = credentials.accessToken;
14
- const options = {
15
- headers: {
16
- Authorization: `Bearer ${accessToken}`,
17
- 'Content-Type': 'application/json',
18
- },
19
- method,
20
- url: `${baseUrl}${endpoint}`,
21
- qs,
22
- };
23
- if (body !== undefined) {
24
- options.body = body;
25
- }
26
- try {
27
- return await this.helpers.httpRequest(options);
28
- }
29
- catch (error) {
30
- throw new n8n_workflow_1.NodeApiError(this.getNode(), error);
31
- }
32
- }