n8n-nodes-qlik-cloud 1.0.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/.eslintrc.cjs +18 -0
- package/LICENSE.md +21 -0
- package/README.md +122 -0
- package/package.json +44 -0
- package/src/credentials/QlikCloudApi.credentials.ts +33 -0
- package/src/credentials/QlikCloudOAuth2Api.credentials.ts +80 -0
- package/src/index.ts +1 -0
- package/src/nodes/QlikCloud/QlikCloud.node.ts +424 -0
- package/src/nodes/QlikCloud/resources/apps/index.ts +399 -0
- package/src/nodes/QlikCloud/resources/assistants/index.ts +223 -0
- package/src/nodes/QlikCloud/resources/audits/index.ts +217 -0
- package/src/nodes/QlikCloud/resources/items/index.ts +358 -0
- package/src/shared/transport.ts +45 -0
- package/tsconfig.json +18 -0
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
import type { INodeProperties } from 'n8n-workflow';
|
|
2
|
+
|
|
3
|
+
export const auditsGetAllDescription: INodeProperties[] = [
|
|
4
|
+
{
|
|
5
|
+
displayName: 'Return All',
|
|
6
|
+
name: 'returnAll',
|
|
7
|
+
type: 'boolean',
|
|
8
|
+
default: false,
|
|
9
|
+
displayOptions: {
|
|
10
|
+
show: {
|
|
11
|
+
resource: ['audits'],
|
|
12
|
+
operation: ['getAll'],
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
description: 'Whether to return all results',
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
displayName: 'Limit',
|
|
19
|
+
name: 'limit',
|
|
20
|
+
type: 'number',
|
|
21
|
+
default: 10,
|
|
22
|
+
displayOptions: {
|
|
23
|
+
show: {
|
|
24
|
+
resource: ['audits'],
|
|
25
|
+
operation: ['getAll'],
|
|
26
|
+
returnAll: [false],
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
description: 'Max number of audit events to return (1-100)',
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
displayName: 'Options',
|
|
33
|
+
name: 'options',
|
|
34
|
+
type: 'collection',
|
|
35
|
+
placeholder: 'Add Option',
|
|
36
|
+
default: {},
|
|
37
|
+
displayOptions: {
|
|
38
|
+
show: {
|
|
39
|
+
resource: ['audits'],
|
|
40
|
+
operation: ['getAll'],
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
options: [
|
|
44
|
+
{
|
|
45
|
+
displayName: 'Filter by Event Type',
|
|
46
|
+
name: 'eventType',
|
|
47
|
+
type: 'string',
|
|
48
|
+
default: '',
|
|
49
|
+
description: 'Filter by event type',
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
displayName: 'Filter by User ID',
|
|
53
|
+
name: 'userId',
|
|
54
|
+
type: 'string',
|
|
55
|
+
default: '',
|
|
56
|
+
description: 'Filter by user who triggered the event',
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
displayName: 'Filter by Source',
|
|
60
|
+
name: 'source',
|
|
61
|
+
type: 'string',
|
|
62
|
+
default: '',
|
|
63
|
+
description: 'Filter by event source',
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
displayName: 'Event Time Range',
|
|
67
|
+
name: 'eventTime',
|
|
68
|
+
type: 'string',
|
|
69
|
+
default: '',
|
|
70
|
+
placeholder: 'YYYY-MM-DDThh:mm:ss.sssZ/YYYY-MM-DDThh:mm:ss.sssZ',
|
|
71
|
+
description: 'ISO 8601 formatted time range',
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
displayName: 'Sort By',
|
|
75
|
+
name: 'sort',
|
|
76
|
+
type: 'options',
|
|
77
|
+
options: [
|
|
78
|
+
{
|
|
79
|
+
name: 'Event Time (Descending)',
|
|
80
|
+
value: '-eventTime',
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
name: 'Event Time (Ascending)',
|
|
84
|
+
value: '+eventTime',
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
name: 'Source',
|
|
88
|
+
value: 'source',
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
name: 'Event Type',
|
|
92
|
+
value: 'eventType',
|
|
93
|
+
},
|
|
94
|
+
],
|
|
95
|
+
default: '-eventTime',
|
|
96
|
+
description: 'Property to sort by',
|
|
97
|
+
},
|
|
98
|
+
],
|
|
99
|
+
},
|
|
100
|
+
];
|
|
101
|
+
|
|
102
|
+
export const auditsGetDescription: INodeProperties[] = [
|
|
103
|
+
{
|
|
104
|
+
displayName: 'Audit Event ID',
|
|
105
|
+
name: 'auditId',
|
|
106
|
+
type: 'string',
|
|
107
|
+
default: '',
|
|
108
|
+
required: true,
|
|
109
|
+
displayOptions: {
|
|
110
|
+
show: {
|
|
111
|
+
resource: ['audits'],
|
|
112
|
+
operation: ['get'],
|
|
113
|
+
},
|
|
114
|
+
},
|
|
115
|
+
description: 'The ID of the audit event to retrieve',
|
|
116
|
+
},
|
|
117
|
+
];
|
|
118
|
+
|
|
119
|
+
export const auditsGetSourcesDescription: INodeProperties[] = [
|
|
120
|
+
{
|
|
121
|
+
displayName: 'Description',
|
|
122
|
+
name: 'description',
|
|
123
|
+
type: 'string',
|
|
124
|
+
default: 'Retrieves list of possible event sources for audit events',
|
|
125
|
+
displayOptions: {
|
|
126
|
+
show: {
|
|
127
|
+
resource: ['audits'],
|
|
128
|
+
operation: ['getSources'],
|
|
129
|
+
},
|
|
130
|
+
},
|
|
131
|
+
description: 'Returns available audit event sources',
|
|
132
|
+
},
|
|
133
|
+
];
|
|
134
|
+
|
|
135
|
+
export const auditsGetTypesDescription: INodeProperties[] = [
|
|
136
|
+
{
|
|
137
|
+
displayName: 'Description',
|
|
138
|
+
name: 'description',
|
|
139
|
+
type: 'string',
|
|
140
|
+
default: 'Retrieves list of possible event types for audit events',
|
|
141
|
+
displayOptions: {
|
|
142
|
+
show: {
|
|
143
|
+
resource: ['audits'],
|
|
144
|
+
operation: ['getTypes'],
|
|
145
|
+
},
|
|
146
|
+
},
|
|
147
|
+
description: 'Returns available audit event types',
|
|
148
|
+
},
|
|
149
|
+
];
|
|
150
|
+
|
|
151
|
+
export const auditsGetSettingsDescription: INodeProperties[] = [
|
|
152
|
+
{
|
|
153
|
+
displayName: 'Description',
|
|
154
|
+
name: 'description',
|
|
155
|
+
type: 'string',
|
|
156
|
+
default: 'Retrieves audit server configuration options',
|
|
157
|
+
displayOptions: {
|
|
158
|
+
show: {
|
|
159
|
+
resource: ['audits'],
|
|
160
|
+
operation: ['getSettings'],
|
|
161
|
+
},
|
|
162
|
+
},
|
|
163
|
+
description: 'Returns audit server configuration including TTL and archive settings',
|
|
164
|
+
},
|
|
165
|
+
];
|
|
166
|
+
|
|
167
|
+
export const auditDescription: INodeProperties[] = [
|
|
168
|
+
{
|
|
169
|
+
displayName: 'Operation',
|
|
170
|
+
name: 'operation',
|
|
171
|
+
type: 'options',
|
|
172
|
+
noDataExpression: true,
|
|
173
|
+
displayOptions: {
|
|
174
|
+
show: {
|
|
175
|
+
resource: ['audits'],
|
|
176
|
+
},
|
|
177
|
+
},
|
|
178
|
+
options: [
|
|
179
|
+
{
|
|
180
|
+
name: 'Get All',
|
|
181
|
+
value: 'getAll',
|
|
182
|
+
action: 'Get all audit events',
|
|
183
|
+
description: 'Retrieve recent audit events',
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
name: 'Get',
|
|
187
|
+
value: 'get',
|
|
188
|
+
action: 'Get an audit event',
|
|
189
|
+
description: 'Retrieve a specific audit event by ID',
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
name: 'Get Sources',
|
|
193
|
+
value: 'getSources',
|
|
194
|
+
action: 'Get available event sources',
|
|
195
|
+
description: 'List possible audit event sources',
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
name: 'Get Types',
|
|
199
|
+
value: 'getTypes',
|
|
200
|
+
action: 'Get available event types',
|
|
201
|
+
description: 'List possible audit event types',
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
name: 'Get Settings',
|
|
205
|
+
value: 'getSettings',
|
|
206
|
+
action: 'Get audit settings',
|
|
207
|
+
description: 'Retrieve audit server configuration',
|
|
208
|
+
},
|
|
209
|
+
],
|
|
210
|
+
default: 'getAll',
|
|
211
|
+
},
|
|
212
|
+
...auditsGetAllDescription,
|
|
213
|
+
...auditsGetDescription,
|
|
214
|
+
...auditsGetSourcesDescription,
|
|
215
|
+
...auditsGetTypesDescription,
|
|
216
|
+
...auditsGetSettingsDescription,
|
|
217
|
+
];
|
|
@@ -0,0 +1,358 @@
|
|
|
1
|
+
import type { INodeProperties } from 'n8n-workflow';
|
|
2
|
+
|
|
3
|
+
export const itemsGetAllDescription: INodeProperties[] = [
|
|
4
|
+
{
|
|
5
|
+
displayName: 'Return All',
|
|
6
|
+
name: 'returnAll',
|
|
7
|
+
type: 'boolean',
|
|
8
|
+
default: false,
|
|
9
|
+
displayOptions: {
|
|
10
|
+
show: {
|
|
11
|
+
resource: ['items'],
|
|
12
|
+
operation: ['getAll'],
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
description: 'Whether to return all results',
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
displayName: 'Limit',
|
|
19
|
+
name: 'limit',
|
|
20
|
+
type: 'number',
|
|
21
|
+
default: 10,
|
|
22
|
+
displayOptions: {
|
|
23
|
+
show: {
|
|
24
|
+
resource: ['items'],
|
|
25
|
+
operation: ['getAll'],
|
|
26
|
+
returnAll: [false],
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
description: 'Max number of items to return (1-100)',
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
displayName: 'Options',
|
|
33
|
+
name: 'options',
|
|
34
|
+
type: 'collection',
|
|
35
|
+
placeholder: 'Add Option',
|
|
36
|
+
default: {},
|
|
37
|
+
displayOptions: {
|
|
38
|
+
show: {
|
|
39
|
+
resource: ['items'],
|
|
40
|
+
operation: ['getAll'],
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
options: [
|
|
44
|
+
{
|
|
45
|
+
displayName: 'Search by Name',
|
|
46
|
+
name: 'name',
|
|
47
|
+
type: 'string',
|
|
48
|
+
default: '',
|
|
49
|
+
description: 'Case-insensitive search for item by name',
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
displayName: 'Filter by Resource Type',
|
|
53
|
+
name: 'resourceType',
|
|
54
|
+
type: 'string',
|
|
55
|
+
default: '',
|
|
56
|
+
placeholder: 'e.g., app,qvapp,dataasset',
|
|
57
|
+
description: 'Filter by resource type(s)',
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
displayName: 'Filter by Space',
|
|
61
|
+
name: 'spaceId',
|
|
62
|
+
type: 'string',
|
|
63
|
+
default: '',
|
|
64
|
+
description: 'Filter by space ID',
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
displayName: 'Filter by Owner',
|
|
68
|
+
name: 'ownerId',
|
|
69
|
+
type: 'string',
|
|
70
|
+
default: '',
|
|
71
|
+
description: 'Filter by owner ID',
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
displayName: 'Sort By',
|
|
75
|
+
name: 'sort',
|
|
76
|
+
type: 'options',
|
|
77
|
+
options: [
|
|
78
|
+
{
|
|
79
|
+
name: 'Created (Ascending)',
|
|
80
|
+
value: '+createdAt',
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
name: 'Created (Descending)',
|
|
84
|
+
value: '-createdAt',
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
name: 'Name (Ascending)',
|
|
88
|
+
value: '+name',
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
name: 'Name (Descending)',
|
|
92
|
+
value: '-name',
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
name: 'Updated (Ascending)',
|
|
96
|
+
value: '+updatedAt',
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
name: 'Updated (Descending)',
|
|
100
|
+
value: '-updatedAt',
|
|
101
|
+
},
|
|
102
|
+
],
|
|
103
|
+
default: '+createdAt',
|
|
104
|
+
description: 'Property to sort by',
|
|
105
|
+
},
|
|
106
|
+
],
|
|
107
|
+
},
|
|
108
|
+
];
|
|
109
|
+
|
|
110
|
+
export const itemsGetDescription: INodeProperties[] = [
|
|
111
|
+
{
|
|
112
|
+
displayName: 'Item ID',
|
|
113
|
+
name: 'itemId',
|
|
114
|
+
type: 'string',
|
|
115
|
+
default: '',
|
|
116
|
+
required: true,
|
|
117
|
+
displayOptions: {
|
|
118
|
+
show: {
|
|
119
|
+
resource: ['items'],
|
|
120
|
+
operation: ['get'],
|
|
121
|
+
},
|
|
122
|
+
},
|
|
123
|
+
description: 'The ID of the item to retrieve',
|
|
124
|
+
},
|
|
125
|
+
];
|
|
126
|
+
|
|
127
|
+
export const itemsUpdateDescription: INodeProperties[] = [
|
|
128
|
+
{
|
|
129
|
+
displayName: 'Item ID',
|
|
130
|
+
name: 'itemId',
|
|
131
|
+
type: 'string',
|
|
132
|
+
default: '',
|
|
133
|
+
required: true,
|
|
134
|
+
displayOptions: {
|
|
135
|
+
show: {
|
|
136
|
+
resource: ['items'],
|
|
137
|
+
operation: ['update'],
|
|
138
|
+
},
|
|
139
|
+
},
|
|
140
|
+
description: 'The ID of the item to update',
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
displayName: 'Body (JSON)',
|
|
144
|
+
name: 'body',
|
|
145
|
+
type: 'json',
|
|
146
|
+
default: '{}',
|
|
147
|
+
required: true,
|
|
148
|
+
displayOptions: {
|
|
149
|
+
show: {
|
|
150
|
+
resource: ['items'],
|
|
151
|
+
operation: ['update'],
|
|
152
|
+
},
|
|
153
|
+
},
|
|
154
|
+
description: 'Item attributes to update',
|
|
155
|
+
},
|
|
156
|
+
];
|
|
157
|
+
|
|
158
|
+
export const itemsDeleteDescription: INodeProperties[] = [
|
|
159
|
+
{
|
|
160
|
+
displayName: 'Item ID',
|
|
161
|
+
name: 'itemId',
|
|
162
|
+
type: 'string',
|
|
163
|
+
default: '',
|
|
164
|
+
required: true,
|
|
165
|
+
displayOptions: {
|
|
166
|
+
show: {
|
|
167
|
+
resource: ['items'],
|
|
168
|
+
operation: ['delete'],
|
|
169
|
+
},
|
|
170
|
+
},
|
|
171
|
+
description: 'The ID of the item to delete',
|
|
172
|
+
},
|
|
173
|
+
];
|
|
174
|
+
|
|
175
|
+
export const itemsCollectionsDescription: INodeProperties[] = [
|
|
176
|
+
{
|
|
177
|
+
displayName: 'Item ID',
|
|
178
|
+
name: 'itemId',
|
|
179
|
+
type: 'string',
|
|
180
|
+
default: '',
|
|
181
|
+
required: true,
|
|
182
|
+
displayOptions: {
|
|
183
|
+
show: {
|
|
184
|
+
resource: ['items'],
|
|
185
|
+
operation: ['collections'],
|
|
186
|
+
},
|
|
187
|
+
},
|
|
188
|
+
description: 'The ID of the item',
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
displayName: 'Options',
|
|
192
|
+
name: 'options',
|
|
193
|
+
type: 'collection',
|
|
194
|
+
placeholder: 'Add Option',
|
|
195
|
+
default: {},
|
|
196
|
+
displayOptions: {
|
|
197
|
+
show: {
|
|
198
|
+
resource: ['items'],
|
|
199
|
+
operation: ['collections'],
|
|
200
|
+
},
|
|
201
|
+
},
|
|
202
|
+
options: [
|
|
203
|
+
{
|
|
204
|
+
displayName: 'Limit',
|
|
205
|
+
name: 'limit',
|
|
206
|
+
type: 'number',
|
|
207
|
+
default: 10,
|
|
208
|
+
description: 'Max number of collections to return',
|
|
209
|
+
},
|
|
210
|
+
],
|
|
211
|
+
},
|
|
212
|
+
];
|
|
213
|
+
|
|
214
|
+
export const itemsPublishedItemsDescription: INodeProperties[] = [
|
|
215
|
+
{
|
|
216
|
+
displayName: 'Item ID',
|
|
217
|
+
name: 'itemId',
|
|
218
|
+
type: 'string',
|
|
219
|
+
default: '',
|
|
220
|
+
required: true,
|
|
221
|
+
displayOptions: {
|
|
222
|
+
show: {
|
|
223
|
+
resource: ['items'],
|
|
224
|
+
operation: ['publishedItems'],
|
|
225
|
+
},
|
|
226
|
+
},
|
|
227
|
+
description: 'The ID of the item',
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
displayName: 'Options',
|
|
231
|
+
name: 'options',
|
|
232
|
+
type: 'collection',
|
|
233
|
+
placeholder: 'Add Option',
|
|
234
|
+
default: {},
|
|
235
|
+
displayOptions: {
|
|
236
|
+
show: {
|
|
237
|
+
resource: ['items'],
|
|
238
|
+
operation: ['publishedItems'],
|
|
239
|
+
},
|
|
240
|
+
},
|
|
241
|
+
options: [
|
|
242
|
+
{
|
|
243
|
+
displayName: 'Limit',
|
|
244
|
+
name: 'limit',
|
|
245
|
+
type: 'number',
|
|
246
|
+
default: 10,
|
|
247
|
+
description: 'Max number of published items to return',
|
|
248
|
+
},
|
|
249
|
+
],
|
|
250
|
+
},
|
|
251
|
+
];
|
|
252
|
+
|
|
253
|
+
export const itemsSettingsDescription: INodeProperties[] = [
|
|
254
|
+
{
|
|
255
|
+
displayName: 'Operation Type',
|
|
256
|
+
name: 'settingsOperation',
|
|
257
|
+
type: 'options',
|
|
258
|
+
default: 'get',
|
|
259
|
+
displayOptions: {
|
|
260
|
+
show: {
|
|
261
|
+
resource: ['items'],
|
|
262
|
+
operation: ['settings'],
|
|
263
|
+
},
|
|
264
|
+
},
|
|
265
|
+
options: [
|
|
266
|
+
{
|
|
267
|
+
name: 'Get',
|
|
268
|
+
value: 'get',
|
|
269
|
+
description: 'Retrieve items service settings',
|
|
270
|
+
},
|
|
271
|
+
{
|
|
272
|
+
name: 'Patch',
|
|
273
|
+
value: 'patch',
|
|
274
|
+
description: 'Update items service settings',
|
|
275
|
+
},
|
|
276
|
+
],
|
|
277
|
+
},
|
|
278
|
+
{
|
|
279
|
+
displayName: 'Patch Body (JSON)',
|
|
280
|
+
name: 'body',
|
|
281
|
+
type: 'json',
|
|
282
|
+
default: '[]',
|
|
283
|
+
displayOptions: {
|
|
284
|
+
show: {
|
|
285
|
+
resource: ['items'],
|
|
286
|
+
operation: ['settings'],
|
|
287
|
+
settingsOperation: ['patch'],
|
|
288
|
+
},
|
|
289
|
+
},
|
|
290
|
+
description: 'JSONPatch document per RFC 6902',
|
|
291
|
+
},
|
|
292
|
+
];
|
|
293
|
+
|
|
294
|
+
export const itemDescription: INodeProperties[] = [
|
|
295
|
+
{
|
|
296
|
+
displayName: 'Operation',
|
|
297
|
+
name: 'operation',
|
|
298
|
+
type: 'options',
|
|
299
|
+
noDataExpression: true,
|
|
300
|
+
displayOptions: {
|
|
301
|
+
show: {
|
|
302
|
+
resource: ['items'],
|
|
303
|
+
},
|
|
304
|
+
},
|
|
305
|
+
options: [
|
|
306
|
+
{
|
|
307
|
+
name: 'Get All',
|
|
308
|
+
value: 'getAll',
|
|
309
|
+
action: 'Get all items',
|
|
310
|
+
description: 'Retrieve all accessible items',
|
|
311
|
+
},
|
|
312
|
+
{
|
|
313
|
+
name: 'Get',
|
|
314
|
+
value: 'get',
|
|
315
|
+
action: 'Get an item',
|
|
316
|
+
description: 'Retrieve a specific item by ID',
|
|
317
|
+
},
|
|
318
|
+
{
|
|
319
|
+
name: 'Update',
|
|
320
|
+
value: 'update',
|
|
321
|
+
action: 'Update an item',
|
|
322
|
+
description: 'Update item properties',
|
|
323
|
+
},
|
|
324
|
+
{
|
|
325
|
+
name: 'Delete',
|
|
326
|
+
value: 'delete',
|
|
327
|
+
action: 'Delete an item',
|
|
328
|
+
description: 'Delete an item',
|
|
329
|
+
},
|
|
330
|
+
{
|
|
331
|
+
name: 'Collections',
|
|
332
|
+
value: 'collections',
|
|
333
|
+
action: 'Get item collections',
|
|
334
|
+
description: 'List collections (tags) for an item',
|
|
335
|
+
},
|
|
336
|
+
{
|
|
337
|
+
name: 'Published Items',
|
|
338
|
+
value: 'publishedItems',
|
|
339
|
+
action: 'Get published items',
|
|
340
|
+
description: 'List published copies for an item',
|
|
341
|
+
},
|
|
342
|
+
{
|
|
343
|
+
name: 'Settings',
|
|
344
|
+
value: 'settings',
|
|
345
|
+
action: 'Get/Update items settings',
|
|
346
|
+
description: 'Manage items service settings',
|
|
347
|
+
},
|
|
348
|
+
],
|
|
349
|
+
default: 'getAll',
|
|
350
|
+
},
|
|
351
|
+
...itemsGetAllDescription,
|
|
352
|
+
...itemsGetDescription,
|
|
353
|
+
...itemsUpdateDescription,
|
|
354
|
+
...itemsDeleteDescription,
|
|
355
|
+
...itemsCollectionsDescription,
|
|
356
|
+
...itemsPublishedItemsDescription,
|
|
357
|
+
...itemsSettingsDescription,
|
|
358
|
+
];
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
IExecuteFunctions,
|
|
3
|
+
IRequestOptions,
|
|
4
|
+
IHttpRequestMethods,
|
|
5
|
+
} from 'n8n-workflow';
|
|
6
|
+
import { NodeApiError } from 'n8n-workflow';
|
|
7
|
+
|
|
8
|
+
export async function qlikApiRequest(
|
|
9
|
+
this: IExecuteFunctions,
|
|
10
|
+
method: IHttpRequestMethods,
|
|
11
|
+
endpoint: string,
|
|
12
|
+
body?: any,
|
|
13
|
+
qs?: any,
|
|
14
|
+
): Promise<any> {
|
|
15
|
+
const credentials = await this.getCredentials('qlikCloudApi');
|
|
16
|
+
|
|
17
|
+
if (!credentials) {
|
|
18
|
+
throw new NodeApiError(this.getNode(), {
|
|
19
|
+
message: 'No credentials found for Qlik Cloud API',
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
const baseUrl = credentials.baseUrl as string;
|
|
24
|
+
const accessToken = credentials.accessToken as string;
|
|
25
|
+
|
|
26
|
+
const options: IRequestOptions = {
|
|
27
|
+
headers: {
|
|
28
|
+
Authorization: `Bearer ${accessToken}`,
|
|
29
|
+
'Content-Type': 'application/json',
|
|
30
|
+
},
|
|
31
|
+
method,
|
|
32
|
+
url: `${baseUrl}${endpoint}`,
|
|
33
|
+
qs,
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
if (body !== undefined) {
|
|
37
|
+
options.body = body;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
try {
|
|
41
|
+
return await this.helpers.httpRequest(options);
|
|
42
|
+
} catch (error) {
|
|
43
|
+
throw new NodeApiError(this.getNode(), error as Error);
|
|
44
|
+
}
|
|
45
|
+
}
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2020",
|
|
4
|
+
"module": "commonjs",
|
|
5
|
+
"lib": ["ES2020"],
|
|
6
|
+
"declaration": true,
|
|
7
|
+
"outDir": "./dist",
|
|
8
|
+
"rootDir": "./src",
|
|
9
|
+
"strict": true,
|
|
10
|
+
"esModuleInterop": true,
|
|
11
|
+
"skipLibCheck": true,
|
|
12
|
+
"forceConsistentCasingInFileNames": true,
|
|
13
|
+
"resolveJsonModule": true,
|
|
14
|
+
"moduleResolution": "node"
|
|
15
|
+
},
|
|
16
|
+
"include": ["src/**/*"],
|
|
17
|
+
"exclude": ["node_modules", "dist"]
|
|
18
|
+
}
|