n8n-nodes-hudu 1.5.0 → 1.5.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/nodes/Hudu/descriptions/articles.description.ts +1 -1
- package/dist/nodes/Hudu/descriptions/magic_dash.description.ts +308 -308
- package/dist/nodes/Hudu/resources/articles/articles.handler.js +19 -8
- package/dist/nodes/Hudu/resources/articles/articles.handler.js.map +1 -1
- package/dist/nodes/Hudu/resources/articles/articles.handler.ts +25 -7
- package/dist/nodes/Hudu/resources/magic_dash/magic_dash.handler.ts +100 -100
- package/dist/nodes/Hudu/utils/operations/magic_dash.ts +68 -68
- package/dist/nodes/Hudu/utils/requestUtils.js +6 -3
- package/dist/nodes/Hudu/utils/requestUtils.js.map +1 -1
- package/dist/nodes/Hudu/utils/requestUtils.ts +9 -4
- package/package.json +1 -1
|
@@ -1,308 +1,308 @@
|
|
|
1
|
-
import type { INodeProperties } from 'n8n-workflow';
|
|
2
|
-
import { HUDU_API_CONSTANTS } from '../utils/constants';
|
|
3
|
-
|
|
4
|
-
export const magicDashOperations: INodeProperties[] = [
|
|
5
|
-
{
|
|
6
|
-
displayName: 'Operation',
|
|
7
|
-
name: 'operation',
|
|
8
|
-
type: 'options',
|
|
9
|
-
noDataExpression: true,
|
|
10
|
-
displayOptions: {
|
|
11
|
-
show: {
|
|
12
|
-
resource: ['magic_dash'],
|
|
13
|
-
},
|
|
14
|
-
},
|
|
15
|
-
options: [
|
|
16
|
-
{
|
|
17
|
-
name: 'Create or Update',
|
|
18
|
-
value: 'createOrUpdate',
|
|
19
|
-
description: 'Create or update item',
|
|
20
|
-
action: 'Create or update item',
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
name: 'Delete',
|
|
24
|
-
value: 'deleteById',
|
|
25
|
-
description: 'Delete item',
|
|
26
|
-
action: 'Delete item',
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
name: 'Delete by Title',
|
|
30
|
-
value: 'deleteByTitle',
|
|
31
|
-
description: 'Delete item by title and company name',
|
|
32
|
-
action: 'Delete item by title',
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
name: 'Get',
|
|
36
|
-
value: 'get',
|
|
37
|
-
description: 'Get item',
|
|
38
|
-
action: 'Get item',
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
name: 'Get Many',
|
|
42
|
-
value: 'getAll',
|
|
43
|
-
description: 'Get many items',
|
|
44
|
-
action: 'Get many items',
|
|
45
|
-
},
|
|
46
|
-
],
|
|
47
|
-
default: 'getAll',
|
|
48
|
-
},
|
|
49
|
-
];
|
|
50
|
-
|
|
51
|
-
export const magicDashFields: INodeProperties[] = [
|
|
52
|
-
// ----------------------------------
|
|
53
|
-
// getAll
|
|
54
|
-
// ----------------------------------
|
|
55
|
-
{
|
|
56
|
-
displayName: 'Return All',
|
|
57
|
-
name: 'returnAll',
|
|
58
|
-
type: 'boolean',
|
|
59
|
-
displayOptions: {
|
|
60
|
-
show: {
|
|
61
|
-
resource: ['magic_dash'],
|
|
62
|
-
operation: ['getAll'],
|
|
63
|
-
},
|
|
64
|
-
},
|
|
65
|
-
default: false,
|
|
66
|
-
description: 'Whether to return all results or only up to a given limit',
|
|
67
|
-
},
|
|
68
|
-
{
|
|
69
|
-
displayName: 'Limit',
|
|
70
|
-
name: 'limit',
|
|
71
|
-
type: 'number',
|
|
72
|
-
displayOptions: {
|
|
73
|
-
show: {
|
|
74
|
-
resource: ['magic_dash'],
|
|
75
|
-
operation: ['getAll'],
|
|
76
|
-
returnAll: [false],
|
|
77
|
-
},
|
|
78
|
-
},
|
|
79
|
-
typeOptions: {
|
|
80
|
-
minValue: 1,
|
|
81
|
-
},
|
|
82
|
-
default: HUDU_API_CONSTANTS.PAGE_SIZE,
|
|
83
|
-
description: 'Max number of results to return',
|
|
84
|
-
},
|
|
85
|
-
{
|
|
86
|
-
displayName: 'Filters',
|
|
87
|
-
name: 'filters',
|
|
88
|
-
type: 'collection',
|
|
89
|
-
placeholder: 'Add Filter',
|
|
90
|
-
default: {},
|
|
91
|
-
displayOptions: {
|
|
92
|
-
show: {
|
|
93
|
-
resource: ['magic_dash'],
|
|
94
|
-
operation: ['getAll'],
|
|
95
|
-
},
|
|
96
|
-
},
|
|
97
|
-
options: [
|
|
98
|
-
{
|
|
99
|
-
displayName: 'Company Name or ID',
|
|
100
|
-
name: 'company_id',
|
|
101
|
-
type: 'options',
|
|
102
|
-
typeOptions: {
|
|
103
|
-
loadOptionsMethod: 'getCompanies',
|
|
104
|
-
loadOptionsParameters: {
|
|
105
|
-
includeBlank: true,
|
|
106
|
-
},
|
|
107
|
-
},
|
|
108
|
-
default: '',
|
|
109
|
-
description: 'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>',
|
|
110
|
-
},
|
|
111
|
-
{
|
|
112
|
-
displayName: 'Title',
|
|
113
|
-
name: 'title',
|
|
114
|
-
type: 'string',
|
|
115
|
-
default: '',
|
|
116
|
-
description: 'Filter by title',
|
|
117
|
-
},
|
|
118
|
-
],
|
|
119
|
-
},
|
|
120
|
-
|
|
121
|
-
// ----------------------------------
|
|
122
|
-
// createOrUpdate
|
|
123
|
-
// ----------------------------------
|
|
124
|
-
{
|
|
125
|
-
displayName: 'Message',
|
|
126
|
-
name: 'message',
|
|
127
|
-
type: 'string',
|
|
128
|
-
required: true,
|
|
129
|
-
displayOptions: {
|
|
130
|
-
show: {
|
|
131
|
-
resource: ['magic_dash'],
|
|
132
|
-
operation: ['createOrUpdate'],
|
|
133
|
-
},
|
|
134
|
-
},
|
|
135
|
-
default: '',
|
|
136
|
-
description: 'The primary content to be displayed on the Magic Dash Item',
|
|
137
|
-
},
|
|
138
|
-
{
|
|
139
|
-
displayName: 'Company Name',
|
|
140
|
-
name: 'companyName',
|
|
141
|
-
type: 'string',
|
|
142
|
-
required: true,
|
|
143
|
-
displayOptions: {
|
|
144
|
-
show: {
|
|
145
|
-
resource: ['magic_dash'],
|
|
146
|
-
operation: ['createOrUpdate'],
|
|
147
|
-
},
|
|
148
|
-
},
|
|
149
|
-
default: '',
|
|
150
|
-
description: 'The company name attribute used to match an existing company',
|
|
151
|
-
},
|
|
152
|
-
{
|
|
153
|
-
displayName: 'Title',
|
|
154
|
-
name: 'title',
|
|
155
|
-
type: 'string',
|
|
156
|
-
required: true,
|
|
157
|
-
displayOptions: {
|
|
158
|
-
show: {
|
|
159
|
-
resource: ['magic_dash'],
|
|
160
|
-
operation: ['createOrUpdate'],
|
|
161
|
-
},
|
|
162
|
-
},
|
|
163
|
-
default: '',
|
|
164
|
-
description:
|
|
165
|
-
'The title attribute, used for matching existing Magic Dash Items with the same title and company name',
|
|
166
|
-
},
|
|
167
|
-
{
|
|
168
|
-
displayName: 'Content',
|
|
169
|
-
name: 'content',
|
|
170
|
-
type: 'string',
|
|
171
|
-
typeOptions: {
|
|
172
|
-
rows: 4,
|
|
173
|
-
},
|
|
174
|
-
displayOptions: {
|
|
175
|
-
show: {
|
|
176
|
-
resource: ['magic_dash'],
|
|
177
|
-
operation: ['createOrUpdate'],
|
|
178
|
-
},
|
|
179
|
-
},
|
|
180
|
-
default: '',
|
|
181
|
-
description:
|
|
182
|
-
'HTML content (tables, images, videos, etc.) to be displayed in the Magic Dash Item',
|
|
183
|
-
},
|
|
184
|
-
{
|
|
185
|
-
displayName: 'Additional Fields',
|
|
186
|
-
name: 'additionalFields',
|
|
187
|
-
type: 'collection',
|
|
188
|
-
placeholder: 'Add Field',
|
|
189
|
-
default: {},
|
|
190
|
-
displayOptions: {
|
|
191
|
-
show: {
|
|
192
|
-
resource: ['magic_dash'],
|
|
193
|
-
operation: ['createOrUpdate'],
|
|
194
|
-
},
|
|
195
|
-
},
|
|
196
|
-
options: [
|
|
197
|
-
{
|
|
198
|
-
displayName: 'Company Name or ID',
|
|
199
|
-
name: 'company_id',
|
|
200
|
-
type: 'options',
|
|
201
|
-
typeOptions: {
|
|
202
|
-
loadOptionsMethod: 'getCompanies',
|
|
203
|
-
loadOptionsParameters: {
|
|
204
|
-
includeBlank: true,
|
|
205
|
-
},
|
|
206
|
-
},
|
|
207
|
-
default: '',
|
|
208
|
-
description: 'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>',
|
|
209
|
-
},
|
|
210
|
-
{
|
|
211
|
-
displayName: 'Content Link',
|
|
212
|
-
name: 'content_link',
|
|
213
|
-
type: 'string',
|
|
214
|
-
default: '',
|
|
215
|
-
description: "A link to an external website associated with the Magic Dash Item's content",
|
|
216
|
-
},
|
|
217
|
-
{
|
|
218
|
-
displayName: 'Icon',
|
|
219
|
-
name: 'icon',
|
|
220
|
-
type: 'string',
|
|
221
|
-
default: '',
|
|
222
|
-
description: 'Font Awesome icon code (e.g. fa-home). Search for icons at <a href="https://fontawesome.com/search">Font Awesome</a>.',
|
|
223
|
-
},
|
|
224
|
-
{
|
|
225
|
-
displayName: 'Image URL',
|
|
226
|
-
name: 'image_url',
|
|
227
|
-
type: 'string',
|
|
228
|
-
default: '',
|
|
229
|
-
description: 'A URL for an image to be used in the header of the Magic Dash Item',
|
|
230
|
-
},
|
|
231
|
-
{
|
|
232
|
-
displayName: 'Shade',
|
|
233
|
-
name: 'shade',
|
|
234
|
-
type: 'color',
|
|
235
|
-
default: '',
|
|
236
|
-
//description: 'An optional color for the Magic Dash Item to represent different contextual states (e.g., success, danger)',
|
|
237
|
-
},
|
|
238
|
-
],
|
|
239
|
-
},
|
|
240
|
-
|
|
241
|
-
// ----------------------------------
|
|
242
|
-
// deleteById
|
|
243
|
-
// ----------------------------------
|
|
244
|
-
{
|
|
245
|
-
displayName: 'ID',
|
|
246
|
-
name: 'id',
|
|
247
|
-
type: 'number',
|
|
248
|
-
displayOptions: {
|
|
249
|
-
show: {
|
|
250
|
-
resource: ['magic_dash'],
|
|
251
|
-
operation: ['deleteById'],
|
|
252
|
-
},
|
|
253
|
-
},
|
|
254
|
-
default: 0,
|
|
255
|
-
required: true,
|
|
256
|
-
description: 'The ID of the Magic Dash item to delete',
|
|
257
|
-
},
|
|
258
|
-
|
|
259
|
-
// ----------------------------------
|
|
260
|
-
// deleteByTitle
|
|
261
|
-
// ----------------------------------
|
|
262
|
-
{
|
|
263
|
-
displayName: 'Title',
|
|
264
|
-
name: 'title',
|
|
265
|
-
type: 'string',
|
|
266
|
-
required: true,
|
|
267
|
-
displayOptions: {
|
|
268
|
-
show: {
|
|
269
|
-
resource: ['magic_dash'],
|
|
270
|
-
operation: ['deleteByTitle'],
|
|
271
|
-
},
|
|
272
|
-
},
|
|
273
|
-
default: '',
|
|
274
|
-
description: 'The title of the Magic Dash item to delete',
|
|
275
|
-
},
|
|
276
|
-
{
|
|
277
|
-
displayName: 'Company Name',
|
|
278
|
-
name: 'companyName',
|
|
279
|
-
type: 'string',
|
|
280
|
-
required: true,
|
|
281
|
-
displayOptions: {
|
|
282
|
-
show: {
|
|
283
|
-
resource: ['magic_dash'],
|
|
284
|
-
operation: ['deleteByTitle'],
|
|
285
|
-
},
|
|
286
|
-
},
|
|
287
|
-
default: '',
|
|
288
|
-
description: 'The company name for the Magic Dash item to delete',
|
|
289
|
-
},
|
|
290
|
-
|
|
291
|
-
// ----------------------------------
|
|
292
|
-
// get
|
|
293
|
-
// ----------------------------------
|
|
294
|
-
{
|
|
295
|
-
displayName: 'ID',
|
|
296
|
-
name: 'id',
|
|
297
|
-
type: 'number',
|
|
298
|
-
displayOptions: {
|
|
299
|
-
show: {
|
|
300
|
-
resource: ['magic_dash'],
|
|
301
|
-
operation: ['get'],
|
|
302
|
-
},
|
|
303
|
-
},
|
|
304
|
-
default: 0,
|
|
305
|
-
required: true,
|
|
306
|
-
description: 'The ID of the Magic Dash item to get',
|
|
307
|
-
},
|
|
308
|
-
];
|
|
1
|
+
import type { INodeProperties } from 'n8n-workflow';
|
|
2
|
+
import { HUDU_API_CONSTANTS } from '../utils/constants';
|
|
3
|
+
|
|
4
|
+
export const magicDashOperations: INodeProperties[] = [
|
|
5
|
+
{
|
|
6
|
+
displayName: 'Operation',
|
|
7
|
+
name: 'operation',
|
|
8
|
+
type: 'options',
|
|
9
|
+
noDataExpression: true,
|
|
10
|
+
displayOptions: {
|
|
11
|
+
show: {
|
|
12
|
+
resource: ['magic_dash'],
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
options: [
|
|
16
|
+
{
|
|
17
|
+
name: 'Create or Update',
|
|
18
|
+
value: 'createOrUpdate',
|
|
19
|
+
description: 'Create or update item',
|
|
20
|
+
action: 'Create or update item',
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
name: 'Delete',
|
|
24
|
+
value: 'deleteById',
|
|
25
|
+
description: 'Delete item',
|
|
26
|
+
action: 'Delete item',
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
name: 'Delete by Title',
|
|
30
|
+
value: 'deleteByTitle',
|
|
31
|
+
description: 'Delete item by title and company name',
|
|
32
|
+
action: 'Delete item by title',
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
name: 'Get',
|
|
36
|
+
value: 'get',
|
|
37
|
+
description: 'Get item',
|
|
38
|
+
action: 'Get item',
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
name: 'Get Many',
|
|
42
|
+
value: 'getAll',
|
|
43
|
+
description: 'Get many items',
|
|
44
|
+
action: 'Get many items',
|
|
45
|
+
},
|
|
46
|
+
],
|
|
47
|
+
default: 'getAll',
|
|
48
|
+
},
|
|
49
|
+
];
|
|
50
|
+
|
|
51
|
+
export const magicDashFields: INodeProperties[] = [
|
|
52
|
+
// ----------------------------------
|
|
53
|
+
// getAll
|
|
54
|
+
// ----------------------------------
|
|
55
|
+
{
|
|
56
|
+
displayName: 'Return All',
|
|
57
|
+
name: 'returnAll',
|
|
58
|
+
type: 'boolean',
|
|
59
|
+
displayOptions: {
|
|
60
|
+
show: {
|
|
61
|
+
resource: ['magic_dash'],
|
|
62
|
+
operation: ['getAll'],
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
default: false,
|
|
66
|
+
description: 'Whether to return all results or only up to a given limit',
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
displayName: 'Limit',
|
|
70
|
+
name: 'limit',
|
|
71
|
+
type: 'number',
|
|
72
|
+
displayOptions: {
|
|
73
|
+
show: {
|
|
74
|
+
resource: ['magic_dash'],
|
|
75
|
+
operation: ['getAll'],
|
|
76
|
+
returnAll: [false],
|
|
77
|
+
},
|
|
78
|
+
},
|
|
79
|
+
typeOptions: {
|
|
80
|
+
minValue: 1,
|
|
81
|
+
},
|
|
82
|
+
default: HUDU_API_CONSTANTS.PAGE_SIZE,
|
|
83
|
+
description: 'Max number of results to return',
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
displayName: 'Filters',
|
|
87
|
+
name: 'filters',
|
|
88
|
+
type: 'collection',
|
|
89
|
+
placeholder: 'Add Filter',
|
|
90
|
+
default: {},
|
|
91
|
+
displayOptions: {
|
|
92
|
+
show: {
|
|
93
|
+
resource: ['magic_dash'],
|
|
94
|
+
operation: ['getAll'],
|
|
95
|
+
},
|
|
96
|
+
},
|
|
97
|
+
options: [
|
|
98
|
+
{
|
|
99
|
+
displayName: 'Company Name or ID',
|
|
100
|
+
name: 'company_id',
|
|
101
|
+
type: 'options',
|
|
102
|
+
typeOptions: {
|
|
103
|
+
loadOptionsMethod: 'getCompanies',
|
|
104
|
+
loadOptionsParameters: {
|
|
105
|
+
includeBlank: true,
|
|
106
|
+
},
|
|
107
|
+
},
|
|
108
|
+
default: '',
|
|
109
|
+
description: 'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>',
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
displayName: 'Title',
|
|
113
|
+
name: 'title',
|
|
114
|
+
type: 'string',
|
|
115
|
+
default: '',
|
|
116
|
+
description: 'Filter by title',
|
|
117
|
+
},
|
|
118
|
+
],
|
|
119
|
+
},
|
|
120
|
+
|
|
121
|
+
// ----------------------------------
|
|
122
|
+
// createOrUpdate
|
|
123
|
+
// ----------------------------------
|
|
124
|
+
{
|
|
125
|
+
displayName: 'Message',
|
|
126
|
+
name: 'message',
|
|
127
|
+
type: 'string',
|
|
128
|
+
required: true,
|
|
129
|
+
displayOptions: {
|
|
130
|
+
show: {
|
|
131
|
+
resource: ['magic_dash'],
|
|
132
|
+
operation: ['createOrUpdate'],
|
|
133
|
+
},
|
|
134
|
+
},
|
|
135
|
+
default: '',
|
|
136
|
+
description: 'The primary content to be displayed on the Magic Dash Item',
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
displayName: 'Company Name',
|
|
140
|
+
name: 'companyName',
|
|
141
|
+
type: 'string',
|
|
142
|
+
required: true,
|
|
143
|
+
displayOptions: {
|
|
144
|
+
show: {
|
|
145
|
+
resource: ['magic_dash'],
|
|
146
|
+
operation: ['createOrUpdate'],
|
|
147
|
+
},
|
|
148
|
+
},
|
|
149
|
+
default: '',
|
|
150
|
+
description: 'The company name attribute used to match an existing company',
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
displayName: 'Title',
|
|
154
|
+
name: 'title',
|
|
155
|
+
type: 'string',
|
|
156
|
+
required: true,
|
|
157
|
+
displayOptions: {
|
|
158
|
+
show: {
|
|
159
|
+
resource: ['magic_dash'],
|
|
160
|
+
operation: ['createOrUpdate'],
|
|
161
|
+
},
|
|
162
|
+
},
|
|
163
|
+
default: '',
|
|
164
|
+
description:
|
|
165
|
+
'The title attribute, used for matching existing Magic Dash Items with the same title and company name',
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
displayName: 'Content',
|
|
169
|
+
name: 'content',
|
|
170
|
+
type: 'string',
|
|
171
|
+
typeOptions: {
|
|
172
|
+
rows: 4,
|
|
173
|
+
},
|
|
174
|
+
displayOptions: {
|
|
175
|
+
show: {
|
|
176
|
+
resource: ['magic_dash'],
|
|
177
|
+
operation: ['createOrUpdate'],
|
|
178
|
+
},
|
|
179
|
+
},
|
|
180
|
+
default: '',
|
|
181
|
+
description:
|
|
182
|
+
'HTML content (tables, images, videos, etc.) to be displayed in the Magic Dash Item',
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
displayName: 'Additional Fields',
|
|
186
|
+
name: 'additionalFields',
|
|
187
|
+
type: 'collection',
|
|
188
|
+
placeholder: 'Add Field',
|
|
189
|
+
default: {},
|
|
190
|
+
displayOptions: {
|
|
191
|
+
show: {
|
|
192
|
+
resource: ['magic_dash'],
|
|
193
|
+
operation: ['createOrUpdate'],
|
|
194
|
+
},
|
|
195
|
+
},
|
|
196
|
+
options: [
|
|
197
|
+
{
|
|
198
|
+
displayName: 'Company Name or ID',
|
|
199
|
+
name: 'company_id',
|
|
200
|
+
type: 'options',
|
|
201
|
+
typeOptions: {
|
|
202
|
+
loadOptionsMethod: 'getCompanies',
|
|
203
|
+
loadOptionsParameters: {
|
|
204
|
+
includeBlank: true,
|
|
205
|
+
},
|
|
206
|
+
},
|
|
207
|
+
default: '',
|
|
208
|
+
description: 'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>',
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
displayName: 'Content Link',
|
|
212
|
+
name: 'content_link',
|
|
213
|
+
type: 'string',
|
|
214
|
+
default: '',
|
|
215
|
+
description: "A link to an external website associated with the Magic Dash Item's content",
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
displayName: 'Icon',
|
|
219
|
+
name: 'icon',
|
|
220
|
+
type: 'string',
|
|
221
|
+
default: '',
|
|
222
|
+
description: 'Font Awesome icon code (e.g. fa-home). Search for icons at <a href="https://fontawesome.com/search">Font Awesome</a>.',
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
displayName: 'Image URL',
|
|
226
|
+
name: 'image_url',
|
|
227
|
+
type: 'string',
|
|
228
|
+
default: '',
|
|
229
|
+
description: 'A URL for an image to be used in the header of the Magic Dash Item',
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
displayName: 'Shade',
|
|
233
|
+
name: 'shade',
|
|
234
|
+
type: 'color',
|
|
235
|
+
default: '',
|
|
236
|
+
//description: 'An optional color for the Magic Dash Item to represent different contextual states (e.g., success, danger)',
|
|
237
|
+
},
|
|
238
|
+
],
|
|
239
|
+
},
|
|
240
|
+
|
|
241
|
+
// ----------------------------------
|
|
242
|
+
// deleteById
|
|
243
|
+
// ----------------------------------
|
|
244
|
+
{
|
|
245
|
+
displayName: 'ID',
|
|
246
|
+
name: 'id',
|
|
247
|
+
type: 'number',
|
|
248
|
+
displayOptions: {
|
|
249
|
+
show: {
|
|
250
|
+
resource: ['magic_dash'],
|
|
251
|
+
operation: ['deleteById'],
|
|
252
|
+
},
|
|
253
|
+
},
|
|
254
|
+
default: 0,
|
|
255
|
+
required: true,
|
|
256
|
+
description: 'The ID of the Magic Dash item to delete',
|
|
257
|
+
},
|
|
258
|
+
|
|
259
|
+
// ----------------------------------
|
|
260
|
+
// deleteByTitle
|
|
261
|
+
// ----------------------------------
|
|
262
|
+
{
|
|
263
|
+
displayName: 'Title',
|
|
264
|
+
name: 'title',
|
|
265
|
+
type: 'string',
|
|
266
|
+
required: true,
|
|
267
|
+
displayOptions: {
|
|
268
|
+
show: {
|
|
269
|
+
resource: ['magic_dash'],
|
|
270
|
+
operation: ['deleteByTitle'],
|
|
271
|
+
},
|
|
272
|
+
},
|
|
273
|
+
default: '',
|
|
274
|
+
description: 'The title of the Magic Dash item to delete',
|
|
275
|
+
},
|
|
276
|
+
{
|
|
277
|
+
displayName: 'Company Name',
|
|
278
|
+
name: 'companyName',
|
|
279
|
+
type: 'string',
|
|
280
|
+
required: true,
|
|
281
|
+
displayOptions: {
|
|
282
|
+
show: {
|
|
283
|
+
resource: ['magic_dash'],
|
|
284
|
+
operation: ['deleteByTitle'],
|
|
285
|
+
},
|
|
286
|
+
},
|
|
287
|
+
default: '',
|
|
288
|
+
description: 'The company name for the Magic Dash item to delete',
|
|
289
|
+
},
|
|
290
|
+
|
|
291
|
+
// ----------------------------------
|
|
292
|
+
// get
|
|
293
|
+
// ----------------------------------
|
|
294
|
+
{
|
|
295
|
+
displayName: 'ID',
|
|
296
|
+
name: 'id',
|
|
297
|
+
type: 'number',
|
|
298
|
+
displayOptions: {
|
|
299
|
+
show: {
|
|
300
|
+
resource: ['magic_dash'],
|
|
301
|
+
operation: ['get'],
|
|
302
|
+
},
|
|
303
|
+
},
|
|
304
|
+
default: 0,
|
|
305
|
+
required: true,
|
|
306
|
+
description: 'The ID of the Magic Dash item to get',
|
|
307
|
+
},
|
|
308
|
+
];
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.handleArticlesOperation = handleArticlesOperation;
|
|
4
4
|
const operations_1 = require("../../utils/operations");
|
|
5
|
+
const articles_types_1 = require("./articles.types");
|
|
5
6
|
const debugConfig_1 = require("../../utils/debugConfig");
|
|
6
7
|
const utils_1 = require("../../utils");
|
|
7
8
|
const constants_1 = require("../../utils/constants");
|
|
@@ -72,17 +73,27 @@ async function handleArticlesOperation(operation, i) {
|
|
|
72
73
|
const filters = this.getNodeParameter('filters', i);
|
|
73
74
|
const limit = this.getNodeParameter('limit', i, constants_1.HUDU_API_CONSTANTS.PAGE_SIZE);
|
|
74
75
|
const includeMarkdownContent = this.getNodeParameter('includeMarkdownContent', i, false);
|
|
75
|
-
|
|
76
|
-
|
|
76
|
+
const postProcessFilters = {};
|
|
77
|
+
const apiFilters = {};
|
|
78
|
+
for (const [key, value] of Object.entries(filters)) {
|
|
79
|
+
if (key === 'folder_id') {
|
|
80
|
+
postProcessFilters.folder_id = value;
|
|
81
|
+
}
|
|
82
|
+
else {
|
|
83
|
+
apiFilters[key] = value;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
if (apiFilters.company_id) {
|
|
87
|
+
apiFilters.company_id = (0, utils_1.validateCompanyId)(apiFilters.company_id, this.getNode(), 'Company ID');
|
|
77
88
|
}
|
|
78
89
|
const qs = {
|
|
79
|
-
...
|
|
90
|
+
...apiFilters,
|
|
80
91
|
};
|
|
81
|
-
if (
|
|
82
|
-
const updatedAtFilter =
|
|
92
|
+
if (apiFilters.updated_at) {
|
|
93
|
+
const updatedAtFilter = apiFilters.updated_at;
|
|
83
94
|
if (updatedAtFilter.range) {
|
|
84
95
|
const rangeObj = updatedAtFilter.range;
|
|
85
|
-
|
|
96
|
+
apiFilters.updated_at = (0, utils_1.processDateRange)({
|
|
86
97
|
range: {
|
|
87
98
|
mode: rangeObj.mode,
|
|
88
99
|
exact: rangeObj.exact,
|
|
@@ -91,10 +102,10 @@ async function handleArticlesOperation(operation, i) {
|
|
|
91
102
|
preset: rangeObj.preset,
|
|
92
103
|
},
|
|
93
104
|
});
|
|
94
|
-
qs.updated_at =
|
|
105
|
+
qs.updated_at = apiFilters.updated_at;
|
|
95
106
|
}
|
|
96
107
|
}
|
|
97
|
-
responseData = await operations_1.handleGetAllOperation.call(this, resourceEndpoint, 'articles', qs, returnAll, limit);
|
|
108
|
+
responseData = await operations_1.handleGetAllOperation.call(this, resourceEndpoint, 'articles', qs, returnAll, limit, postProcessFilters, articles_types_1.articleFilterMapping);
|
|
98
109
|
if (includeMarkdownContent && responseData && Array.isArray(responseData)) {
|
|
99
110
|
responseData = (0, markdownUtils_1.processArticlesContent)(responseData, true);
|
|
100
111
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"articles.handler.js","sourceRoot":"","sources":["../../../../../../src/nodes/Hudu/resources/articles/articles.handler.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"articles.handler.js","sourceRoot":"","sources":["../../../../../../src/nodes/Hudu/resources/articles/articles.handler.ts"],"names":[],"mappings":";;AAkBA,0DAuTC;AAxUD,uDAOgC;AAIhC,qDAAwD;AACxD,yDAAiE;AACjE,uCAAwF;AACxF,qDAA2D;AAC3D,6DAA0F;AAEnF,KAAK,UAAU,uBAAuB,CAE3C,SAA4B,EAC5B,CAAS;IAET,MAAM,gBAAgB,GAAG,W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|
} from '../../utils/operations';
|
|
10
10
|
import type { ArticlesOperation } from './articles.types';
|
|
11
|
+
import type { FilterMapping } from '../../utils/types';
|
|
12
|
+
import type { IArticlePostProcessFilters } from './articles.types';
|
|
13
|
+
import { articleFilterMapping } from './articles.types';
|
|
11
14
|
import { DEBUG_CONFIG, debugLog } from '../../utils/debugConfig';
|
|
12
15
|
import { processDateRange, type DateRangePreset, validateCompanyId } from '../../utils';
|
|
13
16
|
import { HUDU_API_CONSTANTS } from '../../utils/constants';
|
|
@@ -108,20 +111,33 @@ export async function handleArticlesOperation(
|
|
|
108
111
|
const limit = this.getNodeParameter('limit', i, HUDU_API_CONSTANTS.PAGE_SIZE) as number;
|
|
109
112
|
const includeMarkdownContent = this.getNodeParameter('includeMarkdownContent', i, false) as boolean;
|
|
110
113
|
|
|
114
|
+
// Extract post-processing filters and API filters separately
|
|
115
|
+
const postProcessFilters: IArticlePostProcessFilters = {};
|
|
116
|
+
const apiFilters: IDataObject = {};
|
|
117
|
+
|
|
118
|
+
// Copy only API filters (excluding folder_id which is post-processed)
|
|
119
|
+
for (const [key, value] of Object.entries(filters)) {
|
|
120
|
+
if (key === 'folder_id') {
|
|
121
|
+
postProcessFilters.folder_id = value as number;
|
|
122
|
+
} else {
|
|
123
|
+
apiFilters[key] = value;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
|
|
111
127
|
// Validate company_id if provided in filters
|
|
112
|
-
if (
|
|
113
|
-
|
|
128
|
+
if (apiFilters.company_id) {
|
|
129
|
+
apiFilters.company_id = validateCompanyId(apiFilters.company_id, this.getNode(), 'Company ID');
|
|
114
130
|
}
|
|
115
131
|
|
|
116
132
|
const qs: IDataObject = {
|
|
117
|
-
...
|
|
133
|
+
...apiFilters,
|
|
118
134
|
};
|
|
119
135
|
|
|
120
|
-
if (
|
|
121
|
-
const updatedAtFilter =
|
|
136
|
+
if (apiFilters.updated_at) {
|
|
137
|
+
const updatedAtFilter = apiFilters.updated_at as IDataObject;
|
|
122
138
|
if (updatedAtFilter.range) {
|
|
123
139
|
const rangeObj = updatedAtFilter.range as IDataObject;
|
|
124
|
-
|
|
140
|
+
apiFilters.updated_at = processDateRange({
|
|
125
141
|
range: {
|
|
126
142
|
mode: rangeObj.mode as 'exact' | 'range' | 'preset',
|
|
127
143
|
exact: rangeObj.exact as string,
|
|
@@ -130,7 +146,7 @@ export async function handleArticlesOperation(
|
|
|
130
146
|
preset: rangeObj.preset as DateRangePreset,
|
|
131
147
|
},
|
|
132
148
|
});
|
|
133
|
-
qs.updated_at =
|
|
149
|
+
qs.updated_at = apiFilters.updated_at;
|
|
134
150
|
}
|
|
135
151
|
}
|
|
136
152
|
|
|
@@ -141,6 +157,8 @@ export async function handleArticlesOperation(
|
|
|
141
157
|
qs,
|
|
142
158
|
returnAll,
|
|
143
159
|
limit,
|
|
160
|
+
postProcessFilters as IDataObject,
|
|
161
|
+
articleFilterMapping as FilterMapping,
|
|
144
162
|
);
|
|
145
163
|
|
|
146
164
|
// Process markdown content if requested
|
|
@@ -1,100 +1,100 @@
|
|
|
1
|
-
import type { IDataObject, IExecuteFunctions } from 'n8n-workflow';
|
|
2
|
-
import { handleCreateOperation, handleDeleteOperation } from '../../utils/operations';
|
|
3
|
-
import { huduApiRequest } from '../../utils/requestUtils';
|
|
4
|
-
import {
|
|
5
|
-
handleMagicDashGetAllOperation,
|
|
6
|
-
handleMagicDashGetByIdOperation,
|
|
7
|
-
} from '../../utils/operations/magic_dash';
|
|
8
|
-
import type { MagicDashOperation } from './magic_dash.types';
|
|
9
|
-
import { HUDU_API_CONSTANTS } from '../../utils/constants';
|
|
10
|
-
|
|
11
|
-
export async function handleMagicDashOperation(
|
|
12
|
-
this: IExecuteFunctions,
|
|
13
|
-
operation: MagicDashOperation,
|
|
14
|
-
i: number,
|
|
15
|
-
): Promise<IDataObject | IDataObject[]> {
|
|
16
|
-
const resourceEndpoint = '/magic_dash';
|
|
17
|
-
let responseData: IDataObject | IDataObject[] = {};
|
|
18
|
-
|
|
19
|
-
switch (operation) {
|
|
20
|
-
case 'getAll': {
|
|
21
|
-
const returnAll = this.getNodeParameter('returnAll', i) as boolean;
|
|
22
|
-
const filters = this.getNodeParameter('filters', i) as IDataObject;
|
|
23
|
-
const limit = this.getNodeParameter('limit', i, HUDU_API_CONSTANTS.PAGE_SIZE) as number;
|
|
24
|
-
|
|
25
|
-
return await handleMagicDashGetAllOperation.call(this, filters, returnAll, limit as 25);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
case 'get': {
|
|
29
|
-
const id = this.getNodeParameter('id', i) as number;
|
|
30
|
-
return await handleMagicDashGetByIdOperation.call(this, id);
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
case 'createOrUpdate': {
|
|
34
|
-
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
|
35
|
-
const message = this.getNodeParameter('message', i) as string;
|
|
36
|
-
const companyName = this.getNodeParameter('companyName', i) as string;
|
|
37
|
-
const title = this.getNodeParameter('title', i) as string;
|
|
38
|
-
const content = this.getNodeParameter('content', i) as string;
|
|
39
|
-
|
|
40
|
-
// Build the request body
|
|
41
|
-
const magicDashBody: IDataObject = {
|
|
42
|
-
message,
|
|
43
|
-
company_name: companyName,
|
|
44
|
-
title,
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
// Add content if it's not empty
|
|
48
|
-
if (content) {
|
|
49
|
-
magicDashBody.content = content;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
// Add any additional fields
|
|
53
|
-
for (const key of Object.keys(additionalFields)) {
|
|
54
|
-
if (additionalFields[key] !== undefined && additionalFields[key] !== '') {
|
|
55
|
-
magicDashBody[key] = additionalFields[key];
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
// Ensure mutually exclusive fields are handled
|
|
60
|
-
// content and content_link are mutually exclusive
|
|
61
|
-
if (magicDashBody.content && magicDashBody.content_link) {
|
|
62
|
-
delete magicDashBody.content_link;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
// icon and image_url are mutually exclusive
|
|
66
|
-
if (magicDashBody.icon && magicDashBody.image_url) {
|
|
67
|
-
delete magicDashBody.image_url;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
// API v2.39.6 requires body to be wrapped in magic_dash_item key
|
|
71
|
-
const requestBody = { magic_dash_item: magicDashBody };
|
|
72
|
-
|
|
73
|
-
responseData = await handleCreateOperation.call(
|
|
74
|
-
this,
|
|
75
|
-
resourceEndpoint,
|
|
76
|
-
requestBody,
|
|
77
|
-
);
|
|
78
|
-
break;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
case 'deleteById': {
|
|
82
|
-
// Note: API v2.39.6 supports two DELETE methods:
|
|
83
|
-
// 1. DELETE /magic_dash/{id} - implemented here (delete by ID)
|
|
84
|
-
// 2. DELETE /magic_dash - not implemented (delete by title + company_name)
|
|
85
|
-
const id = this.getNodeParameter('id', i) as number;
|
|
86
|
-
responseData = await handleDeleteOperation.call(this, resourceEndpoint, id);
|
|
87
|
-
break;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
case 'deleteByTitle': {
|
|
91
|
-
const title = this.getNodeParameter('title', i) as string;
|
|
92
|
-
const companyName = this.getNodeParameter('companyName', i) as string;
|
|
93
|
-
const body = { title, company_name: companyName } as IDataObject;
|
|
94
|
-
responseData = await huduApiRequest.call(this, 'DELETE', resourceEndpoint, body);
|
|
95
|
-
break;
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
return responseData;
|
|
100
|
-
}
|
|
1
|
+
import type { IDataObject, IExecuteFunctions } from 'n8n-workflow';
|
|
2
|
+
import { handleCreateOperation, handleDeleteOperation } from '../../utils/operations';
|
|
3
|
+
import { huduApiRequest } from '../../utils/requestUtils';
|
|
4
|
+
import {
|
|
5
|
+
handleMagicDashGetAllOperation,
|
|
6
|
+
handleMagicDashGetByIdOperation,
|
|
7
|
+
} from '../../utils/operations/magic_dash';
|
|
8
|
+
import type { MagicDashOperation } from './magic_dash.types';
|
|
9
|
+
import { HUDU_API_CONSTANTS } from '../../utils/constants';
|
|
10
|
+
|
|
11
|
+
export async function handleMagicDashOperation(
|
|
12
|
+
this: IExecuteFunctions,
|
|
13
|
+
operation: MagicDashOperation,
|
|
14
|
+
i: number,
|
|
15
|
+
): Promise<IDataObject | IDataObject[]> {
|
|
16
|
+
const resourceEndpoint = '/magic_dash';
|
|
17
|
+
let responseData: IDataObject | IDataObject[] = {};
|
|
18
|
+
|
|
19
|
+
switch (operation) {
|
|
20
|
+
case 'getAll': {
|
|
21
|
+
const returnAll = this.getNodeParameter('returnAll', i) as boolean;
|
|
22
|
+
const filters = this.getNodeParameter('filters', i) as IDataObject;
|
|
23
|
+
const limit = this.getNodeParameter('limit', i, HUDU_API_CONSTANTS.PAGE_SIZE) as number;
|
|
24
|
+
|
|
25
|
+
return await handleMagicDashGetAllOperation.call(this, filters, returnAll, limit as 25);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
case 'get': {
|
|
29
|
+
const id = this.getNodeParameter('id', i) as number;
|
|
30
|
+
return await handleMagicDashGetByIdOperation.call(this, id);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
case 'createOrUpdate': {
|
|
34
|
+
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
|
35
|
+
const message = this.getNodeParameter('message', i) as string;
|
|
36
|
+
const companyName = this.getNodeParameter('companyName', i) as string;
|
|
37
|
+
const title = this.getNodeParameter('title', i) as string;
|
|
38
|
+
const content = this.getNodeParameter('content', i) as string;
|
|
39
|
+
|
|
40
|
+
// Build the request body
|
|
41
|
+
const magicDashBody: IDataObject = {
|
|
42
|
+
message,
|
|
43
|
+
company_name: companyName,
|
|
44
|
+
title,
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
// Add content if it's not empty
|
|
48
|
+
if (content) {
|
|
49
|
+
magicDashBody.content = content;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
// Add any additional fields
|
|
53
|
+
for (const key of Object.keys(additionalFields)) {
|
|
54
|
+
if (additionalFields[key] !== undefined && additionalFields[key] !== '') {
|
|
55
|
+
magicDashBody[key] = additionalFields[key];
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
// Ensure mutually exclusive fields are handled
|
|
60
|
+
// content and content_link are mutually exclusive
|
|
61
|
+
if (magicDashBody.content && magicDashBody.content_link) {
|
|
62
|
+
delete magicDashBody.content_link;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
// icon and image_url are mutually exclusive
|
|
66
|
+
if (magicDashBody.icon && magicDashBody.image_url) {
|
|
67
|
+
delete magicDashBody.image_url;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
// API v2.39.6 requires body to be wrapped in magic_dash_item key
|
|
71
|
+
const requestBody = { magic_dash_item: magicDashBody };
|
|
72
|
+
|
|
73
|
+
responseData = await handleCreateOperation.call(
|
|
74
|
+
this,
|
|
75
|
+
resourceEndpoint,
|
|
76
|
+
requestBody,
|
|
77
|
+
);
|
|
78
|
+
break;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
case 'deleteById': {
|
|
82
|
+
// Note: API v2.39.6 supports two DELETE methods:
|
|
83
|
+
// 1. DELETE /magic_dash/{id} - implemented here (delete by ID)
|
|
84
|
+
// 2. DELETE /magic_dash - not implemented (delete by title + company_name)
|
|
85
|
+
const id = this.getNodeParameter('id', i) as number;
|
|
86
|
+
responseData = await handleDeleteOperation.call(this, resourceEndpoint, id);
|
|
87
|
+
break;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
case 'deleteByTitle': {
|
|
91
|
+
const title = this.getNodeParameter('title', i) as string;
|
|
92
|
+
const companyName = this.getNodeParameter('companyName', i) as string;
|
|
93
|
+
const body = { title, company_name: companyName } as IDataObject;
|
|
94
|
+
responseData = await huduApiRequest.call(this, 'DELETE', resourceEndpoint, body);
|
|
95
|
+
break;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
return responseData;
|
|
100
|
+
}
|
|
@@ -1,69 +1,69 @@
|
|
|
1
|
-
import type { IExecuteFunctions, IDataObject } from 'n8n-workflow';
|
|
2
|
-
import { huduApiRequest } from '../requestUtils';
|
|
3
|
-
import { HUDU_API_CONSTANTS } from '../constants';
|
|
4
|
-
|
|
5
|
-
export async function handleMagicDashGetAllOperation(
|
|
6
|
-
this: IExecuteFunctions,
|
|
7
|
-
filters: IDataObject = {},
|
|
8
|
-
returnAll = false,
|
|
9
|
-
limit = HUDU_API_CONSTANTS.PAGE_SIZE,
|
|
10
|
-
): Promise<IDataObject[]> {
|
|
11
|
-
let allItems: IDataObject[] = [];
|
|
12
|
-
let page = 1;
|
|
13
|
-
const pageSize = HUDU_API_CONSTANTS.PAGE_SIZE;
|
|
14
|
-
|
|
15
|
-
let hasMorePages = true;
|
|
16
|
-
do {
|
|
17
|
-
const qs: IDataObject = {
|
|
18
|
-
page,
|
|
19
|
-
page_size: pageSize,
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
// Handle filters
|
|
23
|
-
if (filters.company_id) {
|
|
24
|
-
qs.company_id = Number.parseInt(filters.company_id as string, 10);
|
|
25
|
-
}
|
|
26
|
-
if (filters.title) {
|
|
27
|
-
qs.title = filters.title;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
const response = await huduApiRequest.call(
|
|
31
|
-
this,
|
|
32
|
-
'GET',
|
|
33
|
-
'/magic_dash',
|
|
34
|
-
{},
|
|
35
|
-
qs,
|
|
36
|
-
);
|
|
37
|
-
|
|
38
|
-
const items = Array.isArray(response) ? response : [];
|
|
39
|
-
allItems.push(...items);
|
|
40
|
-
|
|
41
|
-
if (items.length < pageSize || (!returnAll && allItems.length >= limit)) {
|
|
42
|
-
hasMorePages = false;
|
|
43
|
-
} else {
|
|
44
|
-
page++;
|
|
45
|
-
}
|
|
46
|
-
} while (hasMorePages);
|
|
47
|
-
|
|
48
|
-
if (!returnAll) {
|
|
49
|
-
allItems = allItems.slice(0, limit);
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
return allItems;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
export async function handleMagicDashGetByIdOperation(
|
|
56
|
-
this: IExecuteFunctions,
|
|
57
|
-
id: number,
|
|
58
|
-
): Promise<IDataObject> {
|
|
59
|
-
// Use the getAll operation to fetch all items, ensuring pagination is handled.
|
|
60
|
-
const allItems = await handleMagicDashGetAllOperation.call(this, {}, true);
|
|
61
|
-
|
|
62
|
-
const item = allItems.find((item) => item.id === id);
|
|
63
|
-
|
|
64
|
-
if (!item) {
|
|
65
|
-
throw new Error(`Magic Dash item with ID ${id} not found.`);
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
return item;
|
|
1
|
+
import type { IExecuteFunctions, IDataObject } from 'n8n-workflow';
|
|
2
|
+
import { huduApiRequest } from '../requestUtils';
|
|
3
|
+
import { HUDU_API_CONSTANTS } from '../constants';
|
|
4
|
+
|
|
5
|
+
export async function handleMagicDashGetAllOperation(
|
|
6
|
+
this: IExecuteFunctions,
|
|
7
|
+
filters: IDataObject = {},
|
|
8
|
+
returnAll = false,
|
|
9
|
+
limit = HUDU_API_CONSTANTS.PAGE_SIZE,
|
|
10
|
+
): Promise<IDataObject[]> {
|
|
11
|
+
let allItems: IDataObject[] = [];
|
|
12
|
+
let page = 1;
|
|
13
|
+
const pageSize = HUDU_API_CONSTANTS.PAGE_SIZE;
|
|
14
|
+
|
|
15
|
+
let hasMorePages = true;
|
|
16
|
+
do {
|
|
17
|
+
const qs: IDataObject = {
|
|
18
|
+
page,
|
|
19
|
+
page_size: pageSize,
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
// Handle filters
|
|
23
|
+
if (filters.company_id) {
|
|
24
|
+
qs.company_id = Number.parseInt(filters.company_id as string, 10);
|
|
25
|
+
}
|
|
26
|
+
if (filters.title) {
|
|
27
|
+
qs.title = filters.title;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
const response = await huduApiRequest.call(
|
|
31
|
+
this,
|
|
32
|
+
'GET',
|
|
33
|
+
'/magic_dash',
|
|
34
|
+
{},
|
|
35
|
+
qs,
|
|
36
|
+
);
|
|
37
|
+
|
|
38
|
+
const items = Array.isArray(response) ? response : [];
|
|
39
|
+
allItems.push(...items);
|
|
40
|
+
|
|
41
|
+
if (items.length < pageSize || (!returnAll && allItems.length >= limit)) {
|
|
42
|
+
hasMorePages = false;
|
|
43
|
+
} else {
|
|
44
|
+
page++;
|
|
45
|
+
}
|
|
46
|
+
} while (hasMorePages);
|
|
47
|
+
|
|
48
|
+
if (!returnAll) {
|
|
49
|
+
allItems = allItems.slice(0, limit);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
return allItems;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export async function handleMagicDashGetByIdOperation(
|
|
56
|
+
this: IExecuteFunctions,
|
|
57
|
+
id: number,
|
|
58
|
+
): Promise<IDataObject> {
|
|
59
|
+
// Use the getAll operation to fetch all items, ensuring pagination is handled.
|
|
60
|
+
const allItems = await handleMagicDashGetAllOperation.call(this, {}, true);
|
|
61
|
+
|
|
62
|
+
const item = allItems.find((item) => item.id === id);
|
|
63
|
+
|
|
64
|
+
if (!item) {
|
|
65
|
+
throw new Error(`Magic Dash item with ID ${id} not found.`);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
return item;
|
|
69
69
|
}
|
|
@@ -278,9 +278,12 @@ async function handleListing(method, endpoint, resourceName, body = {}, query =
|
|
|
278
278
|
let filteredResults = [];
|
|
279
279
|
let hasMore = true;
|
|
280
280
|
let page = 1;
|
|
281
|
-
const
|
|
282
|
-
|
|
283
|
-
|
|
281
|
+
const hasPostProcessFilters = !!(postProcessFilters && filterMapping);
|
|
282
|
+
const pageSize = hasPostProcessFilters
|
|
283
|
+
? constants_1.HUDU_API_CONSTANTS.PAGE_SIZE
|
|
284
|
+
: !returnAll && limit > 0 && limit < constants_1.HUDU_API_CONSTANTS.PAGE_SIZE
|
|
285
|
+
? limit
|
|
286
|
+
: constants_1.HUDU_API_CONSTANTS.PAGE_SIZE;
|
|
284
287
|
const resourcePath = endpoint.startsWith('/') ? endpoint.substring(1) : endpoint;
|
|
285
288
|
const supportsPagination = constants_1.RESOURCES_WITH_PAGE_SIZE.includes(resourcePath) ||
|
|
286
289
|
(resourcePath.startsWith('companies/') && resourcePath.endsWith('/assets'));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"requestUtils.js","sourceRoot":"","sources":["../../../../../src/nodes/Hudu/utils/requestUtils.ts"],"names":[],"mappings":";;AAsCA,kDAOC;AAKD,wDAOC;AAmDD,oCAQC;AAKD,8CAqCC;AAYD,gDA2LC;AAKD,8CAmCC;AAKD,wCAYC;AAKD,sCAkGC;AAjfD,+CAA4C;AAC5C,2CAA2E;AAE3E,+CAAiD;AACjD,+CAAuD;AAcvD,SAAgB,mBAAmB,CAAwB,EAAK;IAC9D,MAAM,OAAO,GAAgB,EAAE,CAAC;IAChC,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC;QACpD,IAAI,KAAK,KAAK,EAAE,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI;YAAE,SAAS;QACpE,OAAO,CAAC,GAAG,CAAC,GAAG,KAAY,CAAC;IAC9B,CAAC;IACD,OAAO,OAAY,CAAC;AACtB,CAAC;AAKD,SAAgB,sBAAsB,CAAwB,IAAO;IACnE,MAAM,OAAO,GAAgB,EAAE,CAAC;IAChC,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,IAAI,IAAI,EAAE,CAAC,EAAE,CAAC;QACtD,IAAI,KAAK,KAAK,EAAE,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI;YAAE,SAAS;QACpE,OAAO,CAAC,GAAG,CAA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,OAAO,GAAG,KAAK,CAAC;gBAClB,CAAC;qBAAM,CAAC;oBAEN,OAAO,GAAG,YAAY,CAAC,MAAM,KAAK,QAAQ,CAAC;gBAC7C,CAAC;YACH,CAAC;iBAAM,CAAC;gBAEN,OAAO,GAAG,YAAY,CAAC,MAAM,KAAK,QAAQ,CAAC;YAC7C,CAAC;YAED,IAAI,EAAE,CAAC;QACT,CAAC;IACH,CAAC;IAGD,IAAI,CAAC,SAAS,IAAI,KAAK,IAAI,eAAe,CAAC,MAAM,GAAG,KAAK,EAAE,CAAC;QAC1D,eAAe,GAAG,eAAe,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC;IACpD,CAAC;IAED,OAAO,eAAe,CAAC;AACzB,CAAC"}
|
|
@@ -434,10 +434,15 @@ export async function handleListing<T extends IDataObject>(
|
|
|
434
434
|
let hasMore = true;
|
|
435
435
|
let page = 1;
|
|
436
436
|
|
|
437
|
-
//
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
437
|
+
// When post-processing filters are present, always use maximum page size to minimize API calls
|
|
438
|
+
// since filtering happens client-side and we may need to fetch more items to meet the limit
|
|
439
|
+
// Otherwise, optimise page size if we have a specific limit less than default page size
|
|
440
|
+
const hasPostProcessFilters = !!(postProcessFilters && filterMapping);
|
|
441
|
+
const pageSize = hasPostProcessFilters
|
|
442
|
+
? HUDU_API_CONSTANTS.PAGE_SIZE
|
|
443
|
+
: !returnAll && limit > 0 && limit < HUDU_API_CONSTANTS.PAGE_SIZE
|
|
444
|
+
? limit
|
|
445
|
+
: HUDU_API_CONSTANTS.PAGE_SIZE;
|
|
441
446
|
|
|
442
447
|
//debugLog('[handleListing] Start', { endpoint, resourceName, returnAll, limit, pageSize });
|
|
443
448
|
|