n8n-nodes-qlik-cloud 1.0.0 → 1.0.1
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/dist/credentials/QlikCloudApi.credentials.d.ts +7 -0
- package/dist/credentials/QlikCloudApi.credentials.js +33 -0
- package/dist/credentials/QlikCloudOAuth2Api.credentials.d.ts +9 -0
- package/dist/credentials/QlikCloudOAuth2Api.credentials.js +72 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +5 -0
- package/dist/nodes/QlikCloud/QlikCloud.node.d.ts +5 -0
- package/dist/nodes/QlikCloud/QlikCloud.node.js +346 -0
- package/dist/nodes/QlikCloud/resources/apps/index.d.ts +11 -0
- package/dist/nodes/QlikCloud/resources/apps/index.js +391 -0
- package/dist/nodes/QlikCloud/resources/assistants/index.d.ts +7 -0
- package/dist/nodes/QlikCloud/resources/assistants/index.js +219 -0
- package/dist/nodes/QlikCloud/resources/audits/index.d.ts +7 -0
- package/dist/nodes/QlikCloud/resources/audits/index.js +213 -0
- package/dist/nodes/QlikCloud/resources/items/index.d.ts +9 -0
- package/dist/nodes/QlikCloud/resources/items/index.js +352 -0
- package/dist/nodes/QlikCloud/shared/transport.d.ts +2 -0
- package/dist/nodes/QlikCloud/shared/transport.js +34 -0
- package/dist/shared/transport.d.ts +2 -0
- package/dist/shared/transport.js +32 -0
- package/package.json +1 -1
- package/src/index.ts +1 -1
- package/src/nodes/QlikCloud/QlikCloud.node.ts +318 -320
- package/src/{shared → nodes/QlikCloud/shared}/transport.ts +9 -7
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type {
|
|
2
2
|
IExecuteFunctions,
|
|
3
|
-
|
|
3
|
+
IHttpRequestOptions,
|
|
4
4
|
IHttpRequestMethods,
|
|
5
5
|
} from 'n8n-workflow';
|
|
6
6
|
import { NodeApiError } from 'n8n-workflow';
|
|
@@ -9,21 +9,21 @@ export async function qlikApiRequest(
|
|
|
9
9
|
this: IExecuteFunctions,
|
|
10
10
|
method: IHttpRequestMethods,
|
|
11
11
|
endpoint: string,
|
|
12
|
-
body?: any
|
|
13
|
-
qs?: any
|
|
14
|
-
): Promise<any
|
|
12
|
+
body?: Record<string, any>,
|
|
13
|
+
qs?: Record<string, any>,
|
|
14
|
+
): Promise<Record<string, any>> {
|
|
15
15
|
const credentials = await this.getCredentials('qlikCloudApi');
|
|
16
16
|
|
|
17
17
|
if (!credentials) {
|
|
18
18
|
throw new NodeApiError(this.getNode(), {
|
|
19
19
|
message: 'No credentials found for Qlik Cloud API',
|
|
20
|
-
});
|
|
20
|
+
} as any);
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
const baseUrl = credentials.baseUrl as string;
|
|
24
24
|
const accessToken = credentials.accessToken as string;
|
|
25
25
|
|
|
26
|
-
const options:
|
|
26
|
+
const options: IHttpRequestOptions = {
|
|
27
27
|
headers: {
|
|
28
28
|
Authorization: `Bearer ${accessToken}`,
|
|
29
29
|
'Content-Type': 'application/json',
|
|
@@ -40,6 +40,8 @@ export async function qlikApiRequest(
|
|
|
40
40
|
try {
|
|
41
41
|
return await this.helpers.httpRequest(options);
|
|
42
42
|
} catch (error) {
|
|
43
|
-
throw new NodeApiError(this.getNode(),
|
|
43
|
+
throw new NodeApiError(this.getNode(), {
|
|
44
|
+
message: (error as Error).message,
|
|
45
|
+
} as any);
|
|
44
46
|
}
|
|
45
47
|
}
|