n8n-nodes-qlik-cloud 1.0.18 → 1.1.0
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.
- package/README.md +11 -6
- package/dist/credentials/QlikCloudOAuth2Api.credentials.js +21 -21
- package/dist/nodes/QlikCloud/QlikCloud.node.js +405 -133
- package/dist/nodes/QlikCloud/resources/apps/index.d.ts +36 -0
- package/dist/nodes/QlikCloud/resources/apps/index.js +1115 -111
- package/dist/nodes/QlikCloud/resources/assistants/index.js +27 -7
- package/dist/nodes/QlikCloud/shared/transport.d.ts +2 -2
- package/dist/nodes/QlikCloud/shared/transport.js +16 -9
- package/package.json +1 -1
- package/src/credentials/QlikCloudOAuth2Api.credentials.ts +25 -28
- package/src/nodes/QlikCloud/QlikCloud.node.ts +530 -136
- package/src/nodes/QlikCloud/resources/apps/index.ts +1151 -110
- package/src/nodes/QlikCloud/resources/assistants/index.ts +27 -7
- package/src/nodes/QlikCloud/shared/transport.ts +21 -11
package/README.md
CHANGED
|
@@ -9,12 +9,17 @@ Complete integration with Qlik Cloud REST APIs covering:
|
|
|
9
9
|
### Apps Management
|
|
10
10
|
- **Get All Apps** - Retrieve all apps with filtering and pagination
|
|
11
11
|
- **Get App** - Retrieve a specific app by ID
|
|
12
|
-
- **Create
|
|
13
|
-
- **
|
|
14
|
-
- **
|
|
15
|
-
- **
|
|
16
|
-
- **
|
|
17
|
-
- **
|
|
12
|
+
- **Create / Update / Delete / Copy** - Full CRUD on apps plus copy
|
|
13
|
+
- **Export / Import** - Export apps and import QVF files
|
|
14
|
+
- **Publish / Republish / Move / Remove** - Publish or republish to a space, move between spaces, or remove from a space
|
|
15
|
+
- **Ownership** - Change object owner or update app owner
|
|
16
|
+
- **Data Insights** - Get data lineage, data metadata, list insight analyses, recommend insights, and fetch the insight model
|
|
17
|
+
- **Media** - Upload, download, delete, and list media files; fetch app thumbnail
|
|
18
|
+
- **Reloads** - List reload logs, fetch a specific reload log, and retrieve reload metadata
|
|
19
|
+
- **Report Filters** - List, create, get, update, delete, and count report filters
|
|
20
|
+
- **Scripts** - List, create, get, update, delete scripts
|
|
21
|
+
- **Evaluations** - List/create evaluations, compare evaluations, and download results
|
|
22
|
+
- **Validate Script** - Validate a script payload
|
|
18
23
|
- **Get Privileges** - Retrieve app access privileges
|
|
19
24
|
|
|
20
25
|
### Assistants
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.QlikCloudOAuth2Api = void 0;
|
|
4
|
-
const
|
|
5
|
-
'https://analysis.windows.net/powerbi/api/.default',
|
|
6
|
-
];
|
|
4
|
+
const DEFAULT_SCOPES = ['openid', 'profile', 'email', 'offline_access'];
|
|
7
5
|
class QlikCloudOAuth2Api {
|
|
8
6
|
constructor() {
|
|
9
7
|
this.name = 'qlikCloudOAuth2Api';
|
|
@@ -25,21 +23,19 @@ class QlikCloudOAuth2Api {
|
|
|
25
23
|
name: 'authUrl',
|
|
26
24
|
type: 'hidden',
|
|
27
25
|
default: '',
|
|
28
|
-
required: true,
|
|
29
26
|
},
|
|
30
27
|
{
|
|
31
28
|
displayName: 'Access Token URL',
|
|
32
29
|
name: 'accessTokenUrl',
|
|
33
30
|
type: 'hidden',
|
|
34
31
|
default: '',
|
|
35
|
-
required: true,
|
|
36
32
|
},
|
|
37
33
|
{
|
|
38
34
|
displayName: 'Scope',
|
|
39
35
|
name: 'scope',
|
|
40
|
-
type: '
|
|
41
|
-
default:
|
|
42
|
-
description: 'OAuth2 scopes
|
|
36
|
+
type: 'string',
|
|
37
|
+
default: DEFAULT_SCOPES.join(' '),
|
|
38
|
+
description: 'OAuth2 scopes requested from Qlik Cloud (space-separated)',
|
|
43
39
|
},
|
|
44
40
|
{
|
|
45
41
|
displayName: 'Authentication',
|
|
@@ -51,21 +47,25 @@ class QlikCloudOAuth2Api {
|
|
|
51
47
|
}
|
|
52
48
|
async preAuthentication(credentials) {
|
|
53
49
|
const baseUrl = credentials.baseUrl;
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
if (parts.length < 3) {
|
|
50
|
+
let parsed;
|
|
51
|
+
try {
|
|
52
|
+
parsed = new URL(baseUrl);
|
|
53
|
+
}
|
|
54
|
+
catch (error) {
|
|
60
55
|
throw new Error('Invalid Qlik Cloud tenant URL format');
|
|
61
56
|
}
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
57
|
+
if (parsed.protocol !== 'https:') {
|
|
58
|
+
throw new Error('Qlik Cloud tenant URL must use HTTPS');
|
|
59
|
+
}
|
|
60
|
+
if (!parsed.hostname.endsWith('.qlikcloud.com')) {
|
|
61
|
+
throw new Error('Tenant URL must end with .qlikcloud.com');
|
|
62
|
+
}
|
|
63
|
+
const oauthBase = `${parsed.origin}/oauth`;
|
|
64
|
+
credentials.authUrl = `${oauthBase}/authorize`;
|
|
65
|
+
credentials.accessTokenUrl = `${oauthBase}/token`;
|
|
66
|
+
if (!credentials.scope) {
|
|
67
|
+
credentials.scope = DEFAULT_SCOPES.join(' ');
|
|
68
|
+
}
|
|
69
69
|
return credentials;
|
|
70
70
|
}
|
|
71
71
|
}
|