n8n-nodes-hudu 1.3.0 → 1.3.2
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 +60 -27
- package/dist/nodes/Hudu/Hudu.node.js +5 -0
- package/dist/nodes/Hudu/Hudu.node.js.map +1 -1
- package/dist/nodes/Hudu/Hudu.node.ts +10 -1
- package/dist/nodes/Hudu/descriptions/index.js +1 -0
- package/dist/nodes/Hudu/descriptions/index.js.map +1 -1
- package/dist/nodes/Hudu/descriptions/index.ts +1 -0
- package/dist/nodes/Hudu/descriptions/lists.description.js +253 -0
- package/dist/nodes/Hudu/descriptions/lists.description.js.map +1 -0
- package/dist/nodes/Hudu/descriptions/lists.description.ts +259 -0
- package/dist/nodes/Hudu/descriptions/resources.js +4 -0
- package/dist/nodes/Hudu/descriptions/resources.js.map +1 -1
- package/dist/nodes/Hudu/descriptions/resources.ts +4 -0
- package/dist/nodes/Hudu/resources/index.js +2 -0
- package/dist/nodes/Hudu/resources/index.js.map +1 -1
- package/dist/nodes/Hudu/resources/index.ts +2 -0
- package/dist/nodes/Hudu/resources/lists/lists.handler.js +82 -0
- package/dist/nodes/Hudu/resources/lists/lists.handler.js.map +1 -0
- package/dist/nodes/Hudu/resources/lists/lists.handler.ts +122 -0
- package/dist/nodes/Hudu/resources/lists/lists.types.js +3 -0
- package/dist/nodes/Hudu/resources/lists/lists.types.js.map +1 -0
- package/dist/nodes/Hudu/resources/lists/lists.types.ts +26 -0
- package/dist/nodes/Hudu/resources/procedures/procedures.handler.js +7 -0
- package/dist/nodes/Hudu/resources/procedures/procedures.handler.js.map +1 -1
- package/dist/nodes/Hudu/resources/procedures/procedures.handler.ts +8 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,4 +1,28 @@
|
|
|
1
1
|
# n8n-nodes-hudu
|
|
2
|
+
This community node enables seamless integration with Hudu documentation platform in your n8n workflows, allowing you to automate and manage your IT documentation tasks.
|
|
3
|
+
|
|
4
|
+

|
|
5
|
+

|
|
6
|
+
|
|
7
|
+
[](https://buymeacoffee.com/msoukhomlinov)
|
|
8
|
+
|
|
9
|
+
## Recent Changes
|
|
10
|
+
|
|
11
|
+
### [1.3.1] - 2025-04-21
|
|
12
|
+
- Aligned package general content such as README and documentation
|
|
13
|
+
|
|
14
|
+
### [1.3.0] - 2025-03-20
|
|
15
|
+
- Fixed missing company_id field in asset delete, archive, and unarchive operations
|
|
16
|
+
|
|
17
|
+
### [1.2.9] - 2025-01-25
|
|
18
|
+
- Improved Asset operations with enhanced UI, custom asset tags support, and optimised asset creation/update
|
|
19
|
+
- Added streamlined workflow for using asset data between operations
|
|
20
|
+
|
|
21
|
+
### [1.2.8] - 2025-01-21
|
|
22
|
+
- Fixed asset passwords create/update operations with required fields and enhanced validation
|
|
23
|
+
- Improved field validation and error handling for asset password operations
|
|
24
|
+
|
|
25
|
+
> **IMPORTANT**: When updating between versions, make sure to restart your n8n instance after the update. UI changes and new features are only picked up after a restart. The recommended update process is:
|
|
2
26
|
|
|
3
27
|
This n8n community node enables the integration of Hudu within your n8n workflows.
|
|
4
28
|
|
|
@@ -8,19 +32,39 @@ This n8n community node enables the integration of Hudu within your n8n workflow
|
|
|
8
32
|
|
|
9
33
|
This node was built against Hudu v2.34.4. Future versions of Hudu may not be 100% compatible without node updates.
|
|
10
34
|
|
|
35
|
+
[Installation](#installation)
|
|
36
|
+
[Credentials](#credentials)
|
|
37
|
+
[Features](#features)
|
|
38
|
+
[Supported Resources & Operations](#supported-resources--operations)
|
|
39
|
+
[Resources](#resources)
|
|
40
|
+
[Contributing](#contributing)
|
|
41
|
+
[Support](#support)
|
|
42
|
+
[License](#license)
|
|
43
|
+
|
|
11
44
|
## Installation
|
|
12
45
|
|
|
13
46
|
Follow the [installation guide](https://docs.n8n.io/integrations/community-nodes/installation/) in the n8n community nodes documentation.
|
|
14
47
|
|
|
15
|
-
##
|
|
48
|
+
## Credentials
|
|
49
|
+
|
|
50
|
+
To use this node, you need to:
|
|
16
51
|
|
|
17
|
-
|
|
52
|
+
1. Have a Hudu instance
|
|
53
|
+
2. Generate an API key in your Hudu settings
|
|
54
|
+
3. Configure the node with:
|
|
55
|
+
- Base URL (e.g., https://your-hudu-instance.com)
|
|
56
|
+
- API Key
|
|
18
57
|
|
|
19
|
-
|
|
20
|
-
2. Restart n8n instance
|
|
21
|
-
3. Clear browser cache if needed
|
|
58
|
+
## Features
|
|
22
59
|
|
|
23
|
-
|
|
60
|
+
- Comprehensive pagination support for all applicable resources
|
|
61
|
+
- Robust error handling and debugging capabilities
|
|
62
|
+
- Advanced filtering options with both API-side and client-side filtering
|
|
63
|
+
- Support for both single and bulk operations
|
|
64
|
+
- Dynamic loading of related resources (companies, layouts, etc.)
|
|
65
|
+
- Date range filtering with preset options
|
|
66
|
+
- Automatic type conversion and validation
|
|
67
|
+
- Debug logging for troubleshooting
|
|
24
68
|
|
|
25
69
|
## Supported Resources & Operations
|
|
26
70
|
|
|
@@ -170,27 +214,6 @@ Note: Custom field support has some limitations:
|
|
|
170
214
|
- Link to companies
|
|
171
215
|
- Filter by company and status
|
|
172
216
|
|
|
173
|
-
## Credentials
|
|
174
|
-
|
|
175
|
-
To use this node, you need to:
|
|
176
|
-
|
|
177
|
-
1. Have a Hudu instance
|
|
178
|
-
2. Generate an API key in your Hudu settings
|
|
179
|
-
3. Configure the node with:
|
|
180
|
-
- Base URL (e.g., https://your-hudu-instance.com)
|
|
181
|
-
- API Key
|
|
182
|
-
|
|
183
|
-
## Features
|
|
184
|
-
|
|
185
|
-
- Comprehensive pagination support for all applicable resources
|
|
186
|
-
- Robust error handling and debugging capabilities
|
|
187
|
-
- Advanced filtering options with both API-side and client-side filtering
|
|
188
|
-
- Support for both single and bulk operations
|
|
189
|
-
- Dynamic loading of related resources (companies, layouts, etc.)
|
|
190
|
-
- Date range filtering with preset options
|
|
191
|
-
- Automatic type conversion and validation
|
|
192
|
-
- Debug logging for troubleshooting
|
|
193
|
-
|
|
194
217
|
## Resources
|
|
195
218
|
|
|
196
219
|
- [n8n community nodes documentation](https://docs.n8n.io/integrations/community-nodes/)
|
|
@@ -215,3 +238,13 @@ Please ensure your PR:
|
|
|
215
238
|
- Includes tests if applicable
|
|
216
239
|
|
|
217
240
|
For bug reports or feature requests, please use the GitHub issues section.
|
|
241
|
+
|
|
242
|
+
## Support
|
|
243
|
+
|
|
244
|
+
If you find this node helpful and would like to support its development:
|
|
245
|
+
|
|
246
|
+
[](https://buymeacoffee.com/msoukhomlinov)
|
|
247
|
+
|
|
248
|
+
## License
|
|
249
|
+
|
|
250
|
+
[MIT](LICENSE)
|
|
@@ -84,6 +84,7 @@ class Hudu {
|
|
|
84
84
|
...descriptions.expirationsOperations,
|
|
85
85
|
...descriptions.folderOperations,
|
|
86
86
|
...descriptions.ipAddressOperations,
|
|
87
|
+
...descriptions.listsOperations,
|
|
87
88
|
...descriptions.magicDashOperations,
|
|
88
89
|
...descriptions.matchersOperations,
|
|
89
90
|
...descriptions.networksOperations,
|
|
@@ -109,6 +110,7 @@ class Hudu {
|
|
|
109
110
|
...descriptions.expirationsFields,
|
|
110
111
|
...descriptions.folderFields,
|
|
111
112
|
...descriptions.ipAddressFields,
|
|
113
|
+
...descriptions.listsFields,
|
|
112
114
|
...descriptions.magicDashFields,
|
|
113
115
|
...descriptions.matchersFields,
|
|
114
116
|
...descriptions.networksFields,
|
|
@@ -198,6 +200,9 @@ class Hudu {
|
|
|
198
200
|
case 'ipAddresses':
|
|
199
201
|
responseData = await resources.handleIpAddressesOperation.call(this, operation, i);
|
|
200
202
|
break;
|
|
203
|
+
case 'lists':
|
|
204
|
+
responseData = await resources.handleListsOperation.call(this, operation, i);
|
|
205
|
+
break;
|
|
201
206
|
case 'magic_dash':
|
|
202
207
|
responseData = await resources.handleMagicDashOperation.call(this, operation, i);
|
|
203
208
|
break;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Hudu.node.js","sourceRoot":"","sources":["../../../../src/nodes/Hudu/Hudu.node.ts"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AC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC;wBAC/D,KAAK,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS;wBACvD,KAAK,EAAE,OAAO;qBACf,CAAC,CAAC;iBACJ;gBAED,IAAI,IAAI,CAAC,cAAc,EAAE,EAAE;oBACzB,MAAM,kBAAkB,GAAG,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,IAAiB,EAAE,EAAE,CAAC,CAAC;wBAC5G,IAAI,EAAE,IAAI;wBACV,UAAU,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE;qBACxB,CAAC,CAAC,CAAC;oBACJ,UAAU,CAAC,IAAI,CAAC,GAAG,kBAAkB,CAAC,CAAC;oBACvC,SAAS;iBACV;gBACD,MAAM,KAAK,CAAC;aACb;SACF;QAED,IAAI,0BAAY,CAAC,WAAW,EAAE;YAC5B,IAAA,sBAAQ,EAAC,+BAA+B,EAAE;gBACxC,eAAe,EAAE,UAAU,CAAC,MAAM;gBAClC,UAAU;aACX,CAAC,CAAC;SACJ;QAED,OAAO,CAAC,UAAU,CAAC,CAAC;IACtB,CAAC;CACF;AA7WD,oBA6WC"}
|
|
@@ -81,6 +81,7 @@ export class Hudu implements INodeType {
|
|
|
81
81
|
...descriptions.expirationsOperations,
|
|
82
82
|
...descriptions.folderOperations,
|
|
83
83
|
...descriptions.ipAddressOperations,
|
|
84
|
+
...descriptions.listsOperations,
|
|
84
85
|
...descriptions.magicDashOperations,
|
|
85
86
|
...descriptions.matchersOperations,
|
|
86
87
|
...descriptions.networksOperations,
|
|
@@ -107,6 +108,7 @@ export class Hudu implements INodeType {
|
|
|
107
108
|
...descriptions.expirationsFields,
|
|
108
109
|
...descriptions.folderFields,
|
|
109
110
|
...descriptions.ipAddressFields,
|
|
111
|
+
...descriptions.listsFields,
|
|
110
112
|
...descriptions.magicDashFields,
|
|
111
113
|
...descriptions.matchersFields,
|
|
112
114
|
...descriptions.networksFields,
|
|
@@ -249,6 +251,13 @@ export class Hudu implements INodeType {
|
|
|
249
251
|
i,
|
|
250
252
|
);
|
|
251
253
|
break;
|
|
254
|
+
case 'lists':
|
|
255
|
+
responseData = await resources.handleListsOperation.call(
|
|
256
|
+
this,
|
|
257
|
+
operation as resources.ListsOperation,
|
|
258
|
+
i,
|
|
259
|
+
);
|
|
260
|
+
break;
|
|
252
261
|
case 'magic_dash':
|
|
253
262
|
responseData = await resources.handleMagicDashOperation.call(
|
|
254
263
|
this,
|
|
@@ -387,4 +396,4 @@ export class Hudu implements INodeType {
|
|
|
387
396
|
|
|
388
397
|
return [returnData];
|
|
389
398
|
}
|
|
390
|
-
}
|
|
399
|
+
}
|
|
@@ -39,4 +39,5 @@ __exportStar(require("./relations.description"), exports);
|
|
|
39
39
|
__exportStar(require("./uploads.description"), exports);
|
|
40
40
|
__exportStar(require("./users.description"), exports);
|
|
41
41
|
__exportStar(require("./websites.description"), exports);
|
|
42
|
+
__exportStar(require("./lists.description"), exports);
|
|
42
43
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/nodes/Hudu/descriptions/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8DAA4C;AAC5C,yDAAuC;AACvC,yDAAuC;AACvC,8DAA4C;AAC5C,oEAAkD;AAClD,gEAA8C;AAC9C,uDAAqC;AACrC,sDAAoC;AACpC,0DAAwC;AACxC,4DAA0C;AAC1C,wDAAsC;AACtC,6DAA2C;AAC3C,2DAAyC;AACzC,yDAAuC;AACvC,yDAAuC;AACvC,iEAA+C;AAC/C,2DAAyC;AACzC,gEAA8C;AAC9C,8DAA4C;AAC5C,8DAA4C;AAC5C,mEAAiD;AACjD,0DAAwC;AACxC,wDAAsC;AACtC,sDAAoC;AACpC,yDAAuC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/nodes/Hudu/descriptions/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8DAA4C;AAC5C,yDAAuC;AACvC,yDAAuC;AACvC,8DAA4C;AAC5C,oEAAkD;AAClD,gEAA8C;AAC9C,uDAAqC;AACrC,sDAAoC;AACpC,0DAAwC;AACxC,4DAA0C;AAC1C,wDAAsC;AACtC,6DAA2C;AAC3C,2DAAyC;AACzC,yDAAuC;AACvC,yDAAuC;AACvC,iEAA+C;AAC/C,2DAAyC;AACzC,gEAA8C;AAC9C,8DAA4C;AAC5C,8DAA4C;AAC5C,mEAAiD;AACjD,0DAAwC;AACxC,wDAAsC;AACtC,sDAAoC;AACpC,yDAAuC;AACvC,sDAAoC"}
|
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.listsFields = exports.listsOperations = void 0;
|
|
4
|
+
exports.listsOperations = [
|
|
5
|
+
{
|
|
6
|
+
displayName: 'Operation',
|
|
7
|
+
name: 'operation',
|
|
8
|
+
type: 'options',
|
|
9
|
+
noDataExpression: true,
|
|
10
|
+
displayOptions: {
|
|
11
|
+
show: {
|
|
12
|
+
resource: ['lists'],
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
options: [
|
|
16
|
+
{
|
|
17
|
+
name: 'Create',
|
|
18
|
+
value: 'create',
|
|
19
|
+
description: 'Create a new list',
|
|
20
|
+
action: 'Create a list',
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
name: 'Delete',
|
|
24
|
+
value: 'delete',
|
|
25
|
+
description: 'Delete a list',
|
|
26
|
+
action: 'Delete a list',
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
name: 'Get',
|
|
30
|
+
value: 'get',
|
|
31
|
+
description: 'Get a specific list',
|
|
32
|
+
action: 'Get a list',
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
name: 'Get Many',
|
|
36
|
+
value: 'getAll',
|
|
37
|
+
description: 'Get many lists',
|
|
38
|
+
action: 'Get many lists',
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
name: 'Update',
|
|
42
|
+
value: 'update',
|
|
43
|
+
description: 'Update a list',
|
|
44
|
+
action: 'Update a list',
|
|
45
|
+
},
|
|
46
|
+
],
|
|
47
|
+
default: 'getAll',
|
|
48
|
+
},
|
|
49
|
+
];
|
|
50
|
+
exports.listsFields = [
|
|
51
|
+
{
|
|
52
|
+
displayName: 'List ID',
|
|
53
|
+
name: 'id',
|
|
54
|
+
type: 'string',
|
|
55
|
+
required: true,
|
|
56
|
+
displayOptions: {
|
|
57
|
+
show: {
|
|
58
|
+
resource: ['lists'],
|
|
59
|
+
operation: ['get', 'update', 'delete'],
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
default: '',
|
|
63
|
+
description: 'The unique ID of the list',
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
displayName: 'Name',
|
|
67
|
+
name: 'name',
|
|
68
|
+
type: 'string',
|
|
69
|
+
required: true,
|
|
70
|
+
displayOptions: {
|
|
71
|
+
show: {
|
|
72
|
+
resource: ['lists'],
|
|
73
|
+
operation: ['create'],
|
|
74
|
+
},
|
|
75
|
+
},
|
|
76
|
+
default: '',
|
|
77
|
+
description: 'The name of the list',
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
displayName: 'List Items',
|
|
81
|
+
name: 'list_items_attributes',
|
|
82
|
+
type: 'fixedCollection',
|
|
83
|
+
typeOptions: {
|
|
84
|
+
multipleValues: true,
|
|
85
|
+
},
|
|
86
|
+
displayOptions: {
|
|
87
|
+
show: {
|
|
88
|
+
resource: ['lists'],
|
|
89
|
+
operation: ['create'],
|
|
90
|
+
},
|
|
91
|
+
},
|
|
92
|
+
default: {},
|
|
93
|
+
placeholder: 'Add List Item',
|
|
94
|
+
options: [
|
|
95
|
+
{
|
|
96
|
+
name: 'item',
|
|
97
|
+
displayName: 'Item',
|
|
98
|
+
values: [
|
|
99
|
+
{
|
|
100
|
+
displayName: 'Name',
|
|
101
|
+
name: 'name',
|
|
102
|
+
type: 'string',
|
|
103
|
+
required: true,
|
|
104
|
+
default: '',
|
|
105
|
+
description: 'Name of the list item',
|
|
106
|
+
},
|
|
107
|
+
],
|
|
108
|
+
},
|
|
109
|
+
],
|
|
110
|
+
description: 'Array of list items to create',
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
displayName: 'Update Fields',
|
|
114
|
+
name: 'updateFields',
|
|
115
|
+
type: 'collection',
|
|
116
|
+
placeholder: 'Add Field',
|
|
117
|
+
default: {},
|
|
118
|
+
displayOptions: {
|
|
119
|
+
show: {
|
|
120
|
+
resource: ['lists'],
|
|
121
|
+
operation: ['update'],
|
|
122
|
+
},
|
|
123
|
+
},
|
|
124
|
+
options: [
|
|
125
|
+
{
|
|
126
|
+
displayName: 'Name',
|
|
127
|
+
name: 'name',
|
|
128
|
+
type: 'string',
|
|
129
|
+
default: '',
|
|
130
|
+
description: 'Name of the list',
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
displayName: 'List Items',
|
|
134
|
+
name: 'list_items_attributes',
|
|
135
|
+
type: 'fixedCollection',
|
|
136
|
+
typeOptions: {
|
|
137
|
+
multipleValues: true,
|
|
138
|
+
},
|
|
139
|
+
default: {},
|
|
140
|
+
placeholder: 'Add List Item',
|
|
141
|
+
options: [
|
|
142
|
+
{
|
|
143
|
+
name: 'item',
|
|
144
|
+
displayName: 'Item',
|
|
145
|
+
values: [
|
|
146
|
+
{
|
|
147
|
+
displayName: 'Add New Item',
|
|
148
|
+
name: 'addNew',
|
|
149
|
+
type: 'boolean',
|
|
150
|
+
default: false,
|
|
151
|
+
description: 'Whether to add a new list item. Disable to update or delete an existing item by ID.',
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
displayName: 'ID',
|
|
155
|
+
name: 'id',
|
|
156
|
+
type: 'number',
|
|
157
|
+
default: 0,
|
|
158
|
+
description: 'ID of the existing list item (required for updates or deletion)',
|
|
159
|
+
displayOptions: {
|
|
160
|
+
show: {
|
|
161
|
+
addNew: [false],
|
|
162
|
+
},
|
|
163
|
+
},
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
displayName: 'Name',
|
|
167
|
+
name: 'name',
|
|
168
|
+
type: 'string',
|
|
169
|
+
default: '',
|
|
170
|
+
description: 'Name of the list item',
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
displayName: 'Destroy',
|
|
174
|
+
name: '_destroy',
|
|
175
|
+
type: 'boolean',
|
|
176
|
+
default: false,
|
|
177
|
+
description: 'Whether to remove this item',
|
|
178
|
+
displayOptions: {
|
|
179
|
+
show: {
|
|
180
|
+
addNew: [false],
|
|
181
|
+
},
|
|
182
|
+
},
|
|
183
|
+
},
|
|
184
|
+
],
|
|
185
|
+
},
|
|
186
|
+
],
|
|
187
|
+
description: 'Array of list items to update, add, or remove',
|
|
188
|
+
},
|
|
189
|
+
],
|
|
190
|
+
description: 'Fields to update on the list',
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
displayName: 'Filters',
|
|
194
|
+
name: 'filters',
|
|
195
|
+
type: 'collection',
|
|
196
|
+
placeholder: 'Add Filter',
|
|
197
|
+
default: {},
|
|
198
|
+
displayOptions: {
|
|
199
|
+
show: {
|
|
200
|
+
resource: ['lists'],
|
|
201
|
+
operation: ['getAll'],
|
|
202
|
+
},
|
|
203
|
+
},
|
|
204
|
+
options: [
|
|
205
|
+
{
|
|
206
|
+
displayName: 'Query',
|
|
207
|
+
name: 'query',
|
|
208
|
+
type: 'string',
|
|
209
|
+
default: '',
|
|
210
|
+
description: 'Search lists by name (partial match)',
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
displayName: 'Name',
|
|
214
|
+
name: 'name',
|
|
215
|
+
type: 'string',
|
|
216
|
+
default: '',
|
|
217
|
+
description: 'Filter by exact list name',
|
|
218
|
+
},
|
|
219
|
+
],
|
|
220
|
+
description: 'Filters to apply when retrieving lists',
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
displayName: 'Return All',
|
|
224
|
+
name: 'returnAll',
|
|
225
|
+
type: 'boolean',
|
|
226
|
+
displayOptions: {
|
|
227
|
+
show: {
|
|
228
|
+
resource: ['lists'],
|
|
229
|
+
operation: ['getAll'],
|
|
230
|
+
},
|
|
231
|
+
},
|
|
232
|
+
default: false,
|
|
233
|
+
description: 'Whether to return all results or limit by a set number',
|
|
234
|
+
},
|
|
235
|
+
{
|
|
236
|
+
displayName: 'Limit',
|
|
237
|
+
name: 'limit',
|
|
238
|
+
type: 'number',
|
|
239
|
+
typeOptions: {
|
|
240
|
+
minValue: 1,
|
|
241
|
+
},
|
|
242
|
+
displayOptions: {
|
|
243
|
+
show: {
|
|
244
|
+
resource: ['lists'],
|
|
245
|
+
operation: ['getAll'],
|
|
246
|
+
returnAll: [false],
|
|
247
|
+
},
|
|
248
|
+
},
|
|
249
|
+
default: 50,
|
|
250
|
+
description: 'Max number of results to return',
|
|
251
|
+
},
|
|
252
|
+
];
|
|
253
|
+
//# sourceMappingURL=lists.description.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lists.description.js","sourceRoot":"","sources":["../../../../../src/nodes/Hudu/descriptions/lists.description.ts"],"names":[],"mappings":";;;AAEa,QAAA,eAAe,GAAsB;IAChD;QACE,WAAW,EAAE,WAAW;QACxB,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,SAAS;QACf,gBAAgB,EAAE,IAAI;QACtB,cAAc,EAAE;YACd,IAAI,EAAE;gBACJ,QAAQ,EAAE,CAAC,OAAO,CAAC;aACpB;SACF;QACD,OAAO,EAAE;YACP;gBACE,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,QAAQ;gBACf,WAAW,EAAE,mBAAmB;gBAChC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AAE,QAAQ;gBACd,OAAO,EAAE,EAAE;gBACX,WAAW,EAAE,2BAA2B;aACzC;SACF;QACD,WAAW,EAAE,wCAAwC;KACtD;IAED;QACE,WAAW,EAAE,YAAY;QACzB,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,SAAS;QACf,cAAc,EAAE;YACd,IAAI,EAAE;gBACJ,QAAQ,EAAE,CAAC,OAAO,CAAC;gBACnB,SAAS,EAAE,CAAC,QAAQ,CAAC;aACtB;SACF;QACD,OAAO,EAAE,KAAK;QACd,WAAW,EAAE,wDAAwD;KACtE;IAED;QACE,WAAW,EAAE,OAAO;QACpB,IAAI,EAAE,OAAO;QACb,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE;YACX,QAAQ,EAAE,CAAC;SACZ;QACD,cAAc,EAAE;YACd,IAAI,EAAE;gBACJ,QAAQ,EAAE,CAAC,OAAO,CAAC;gBACnB,SAAS,EAAE,CAAC,QAAQ,CAAC;gBACrB,SAAS,EAAE,CAAC,KAAK,CAAC;aACnB;SACF;QACD,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,iCAAiC;KAC/C;CACF,CAAC"}
|
|
@@ -0,0 +1,259 @@
|
|
|
1
|
+
import type { INodeProperties } from 'n8n-workflow';
|
|
2
|
+
|
|
3
|
+
export const listsOperations: INodeProperties[] = [
|
|
4
|
+
{
|
|
5
|
+
displayName: 'Operation',
|
|
6
|
+
name: 'operation',
|
|
7
|
+
type: 'options',
|
|
8
|
+
noDataExpression: true,
|
|
9
|
+
displayOptions: {
|
|
10
|
+
show: {
|
|
11
|
+
resource: ['lists'],
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
options: [
|
|
15
|
+
{
|
|
16
|
+
name: 'Create',
|
|
17
|
+
value: 'create',
|
|
18
|
+
description: 'Create a new list',
|
|
19
|
+
action: 'Create a list',
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
name: 'Delete',
|
|
23
|
+
value: 'delete',
|
|
24
|
+
description: 'Delete a list',
|
|
25
|
+
action: 'Delete a list',
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
name: 'Get',
|
|
29
|
+
value: 'get',
|
|
30
|
+
description: 'Get a specific list',
|
|
31
|
+
action: 'Get a list',
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
name: 'Get Many',
|
|
35
|
+
value: 'getAll',
|
|
36
|
+
description: 'Get many lists',
|
|
37
|
+
action: 'Get many lists',
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
name: 'Update',
|
|
41
|
+
value: 'update',
|
|
42
|
+
description: 'Update a list',
|
|
43
|
+
action: 'Update a list',
|
|
44
|
+
},
|
|
45
|
+
],
|
|
46
|
+
default: 'getAll',
|
|
47
|
+
},
|
|
48
|
+
];
|
|
49
|
+
|
|
50
|
+
export const listsFields: INodeProperties[] = [
|
|
51
|
+
// List ID for get, update, delete
|
|
52
|
+
{
|
|
53
|
+
displayName: 'List ID',
|
|
54
|
+
name: 'id',
|
|
55
|
+
type: 'string',
|
|
56
|
+
required: true,
|
|
57
|
+
displayOptions: {
|
|
58
|
+
show: {
|
|
59
|
+
resource: ['lists'],
|
|
60
|
+
operation: ['get', 'update', 'delete'],
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
default: '',
|
|
64
|
+
description: 'The unique ID of the list',
|
|
65
|
+
},
|
|
66
|
+
// Name for create
|
|
67
|
+
{
|
|
68
|
+
displayName: 'Name',
|
|
69
|
+
name: 'name',
|
|
70
|
+
type: 'string',
|
|
71
|
+
required: true,
|
|
72
|
+
displayOptions: {
|
|
73
|
+
show: {
|
|
74
|
+
resource: ['lists'],
|
|
75
|
+
operation: ['create'],
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
default: '',
|
|
79
|
+
description: 'The name of the list',
|
|
80
|
+
},
|
|
81
|
+
// List items for create
|
|
82
|
+
{
|
|
83
|
+
displayName: 'List Items',
|
|
84
|
+
name: 'list_items_attributes',
|
|
85
|
+
type: 'fixedCollection',
|
|
86
|
+
typeOptions: {
|
|
87
|
+
multipleValues: true,
|
|
88
|
+
},
|
|
89
|
+
displayOptions: {
|
|
90
|
+
show: {
|
|
91
|
+
resource: ['lists'],
|
|
92
|
+
operation: ['create'],
|
|
93
|
+
},
|
|
94
|
+
},
|
|
95
|
+
default: {},
|
|
96
|
+
placeholder: 'Add List Item',
|
|
97
|
+
options: [
|
|
98
|
+
{
|
|
99
|
+
name: 'item',
|
|
100
|
+
displayName: 'Item',
|
|
101
|
+
values: [
|
|
102
|
+
{
|
|
103
|
+
displayName: 'Name',
|
|
104
|
+
name: 'name',
|
|
105
|
+
type: 'string',
|
|
106
|
+
required: true,
|
|
107
|
+
default: '',
|
|
108
|
+
description: 'Name of the list item',
|
|
109
|
+
},
|
|
110
|
+
],
|
|
111
|
+
},
|
|
112
|
+
],
|
|
113
|
+
description: 'Array of list items to create',
|
|
114
|
+
},
|
|
115
|
+
// Fields for update
|
|
116
|
+
{
|
|
117
|
+
displayName: 'Update Fields',
|
|
118
|
+
name: 'updateFields',
|
|
119
|
+
type: 'collection',
|
|
120
|
+
placeholder: 'Add Field',
|
|
121
|
+
default: {},
|
|
122
|
+
displayOptions: {
|
|
123
|
+
show: {
|
|
124
|
+
resource: ['lists'],
|
|
125
|
+
operation: ['update'],
|
|
126
|
+
},
|
|
127
|
+
},
|
|
128
|
+
options: [
|
|
129
|
+
{
|
|
130
|
+
displayName: 'Name',
|
|
131
|
+
name: 'name',
|
|
132
|
+
type: 'string',
|
|
133
|
+
default: '',
|
|
134
|
+
description: 'Name of the list',
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
displayName: 'List Items',
|
|
138
|
+
name: 'list_items_attributes',
|
|
139
|
+
type: 'fixedCollection',
|
|
140
|
+
typeOptions: {
|
|
141
|
+
multipleValues: true,
|
|
142
|
+
},
|
|
143
|
+
default: {},
|
|
144
|
+
placeholder: 'Add List Item',
|
|
145
|
+
options: [
|
|
146
|
+
{
|
|
147
|
+
name: 'item',
|
|
148
|
+
displayName: 'Item',
|
|
149
|
+
values: [
|
|
150
|
+
{
|
|
151
|
+
displayName: 'Add New Item',
|
|
152
|
+
name: 'addNew',
|
|
153
|
+
type: 'boolean',
|
|
154
|
+
default: false,
|
|
155
|
+
description: 'Whether to add a new list item. Disable to update or delete an existing item by ID.',
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
displayName: 'ID',
|
|
159
|
+
name: 'id',
|
|
160
|
+
type: 'number',
|
|
161
|
+
default: 0,
|
|
162
|
+
description: 'ID of the existing list item (required for updates or deletion)',
|
|
163
|
+
displayOptions: {
|
|
164
|
+
show: {
|
|
165
|
+
addNew: [false],
|
|
166
|
+
},
|
|
167
|
+
},
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
displayName: 'Name',
|
|
171
|
+
name: 'name',
|
|
172
|
+
type: 'string',
|
|
173
|
+
default: '',
|
|
174
|
+
description: 'Name of the list item',
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
displayName: 'Destroy',
|
|
178
|
+
name: '_destroy',
|
|
179
|
+
type: 'boolean',
|
|
180
|
+
default: false,
|
|
181
|
+
description: 'Whether to remove this item',
|
|
182
|
+
displayOptions: {
|
|
183
|
+
show: {
|
|
184
|
+
addNew: [false],
|
|
185
|
+
},
|
|
186
|
+
},
|
|
187
|
+
},
|
|
188
|
+
],
|
|
189
|
+
},
|
|
190
|
+
],
|
|
191
|
+
description: 'Array of list items to update, add, or remove',
|
|
192
|
+
},
|
|
193
|
+
],
|
|
194
|
+
description: 'Fields to update on the list',
|
|
195
|
+
},
|
|
196
|
+
// Filters for getAll
|
|
197
|
+
{
|
|
198
|
+
displayName: 'Filters',
|
|
199
|
+
name: 'filters',
|
|
200
|
+
type: 'collection',
|
|
201
|
+
placeholder: 'Add Filter',
|
|
202
|
+
default: {},
|
|
203
|
+
displayOptions: {
|
|
204
|
+
show: {
|
|
205
|
+
resource: ['lists'],
|
|
206
|
+
operation: ['getAll'],
|
|
207
|
+
},
|
|
208
|
+
},
|
|
209
|
+
options: [
|
|
210
|
+
{
|
|
211
|
+
displayName: 'Query',
|
|
212
|
+
name: 'query',
|
|
213
|
+
type: 'string',
|
|
214
|
+
default: '',
|
|
215
|
+
description: 'Search lists by name (partial match)',
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
displayName: 'Name',
|
|
219
|
+
name: 'name',
|
|
220
|
+
type: 'string',
|
|
221
|
+
default: '',
|
|
222
|
+
description: 'Filter by exact list name',
|
|
223
|
+
},
|
|
224
|
+
],
|
|
225
|
+
description: 'Filters to apply when retrieving lists',
|
|
226
|
+
},
|
|
227
|
+
// Return all toggle for getAll
|
|
228
|
+
{
|
|
229
|
+
displayName: 'Return All',
|
|
230
|
+
name: 'returnAll',
|
|
231
|
+
type: 'boolean',
|
|
232
|
+
displayOptions: {
|
|
233
|
+
show: {
|
|
234
|
+
resource: ['lists'],
|
|
235
|
+
operation: ['getAll'],
|
|
236
|
+
},
|
|
237
|
+
},
|
|
238
|
+
default: false,
|
|
239
|
+
description: 'Whether to return all results or limit by a set number',
|
|
240
|
+
},
|
|
241
|
+
// Limit for getAll
|
|
242
|
+
{
|
|
243
|
+
displayName: 'Limit',
|
|
244
|
+
name: 'limit',
|
|
245
|
+
type: 'number',
|
|
246
|
+
typeOptions: {
|
|
247
|
+
minValue: 1,
|
|
248
|
+
},
|
|
249
|
+
displayOptions: {
|
|
250
|
+
show: {
|
|
251
|
+
resource: ['lists'],
|
|
252
|
+
operation: ['getAll'],
|
|
253
|
+
returnAll: [false],
|
|
254
|
+
},
|
|
255
|
+
},
|
|
256
|
+
default: 50,
|
|
257
|
+
description: 'Max number of results to return',
|
|
258
|
+
},
|
|
259
|
+
];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resources.js","sourceRoot":"","sources":["../../../../../src/nodes/Hudu/descriptions/resources.ts"],"names":[],"mappings":";;;AAEa,QAAA,eAAe,GAAG;IAC7B;QACE,IAAI,EAAE,cAAc;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AU;QAChB,KAAK,EAAE,WAAW;KACnB;IACD;QACE,IAAI,EAAE,QAAQ;QACd,KAAK,EAAE,SAAS;KACjB;IACD;QACE,IAAI,EAAE,MAAM;QACZ,KAAK,EAAE,OAAO;KACf;IACD;QACE,IAAI,EAAE,SAAS;QACf,KAAK,EAAE,UAAU;KAClB;CACF,CAAC;AAEW,QAAA,gBAAgB,GAAoB;IAC/C,WAAW,EAAE,UAAU;IACvB,IAAI,EAAE,UAAU;IAChB,IAAI,EAAE,SAAS;IACf,gBAAgB,EAAE,IAAI;IACtB,OAAO,EAAE,uBAAe;IACxB,OAAO,EAAE,WAAW;CACrB,CAAC"}
|
|
1
|
+
{"version":3,"file":"resources.js","sourceRoot":"","sources":["../../../../../src/nodes/Hudu/descriptions/resources.ts"],"names":[],"mappings":";;;AAEa,QAAA,eAAe,GAAG;IAC7B;QACE,IAAI,EAAE,cAAc;QACpB,KAAK,EAAE,eAAe;KACvB;IACD;QACE,IAAI,EAAE,UAAU;QAChB,KAAK,EAAE,UAAU;KAClB;IACD;QACE,IAAI,EAAE,SAAS;QACf,KAAK,EAAE,UAAU;KAClB;IACD;QACE,IAAI,EAAE,OAAO;QACb,KAAK,EAAE,QAAQ;KAChB;IACD;QACE,IAAI,EAAE,cAAc;QACpB,KAAK,EAAE,eAAe;KACvB;IACD;QACE,IAAI,EAAE,oBAAoB;QAC1B,KAAK,EAAE,qBAAqB;KAC7B;IACD;QACE,IAAI,EAAE,gBAAgB;QACtB,KAAK,EAAE,iBAAiB;KACzB;IACD;QACE,IAAI,EAAE,MAAM;QACZ,KAAK,EAAE,OAAO;KACf;IACD;QACE,IAAI,EAAE,SAAS;QACf,KAAK,EAAE,WAAW;KACnB;IACD;QACE,IAAI,EAAE,YAAY;QAClB,KAAK,EAAE,aAAa;KACrB;IACD;QACE,IAAI,EAAE,QAAQ;QACd,KAAK,EAAE,SAAS;KACjB;IACD;QACE,IAAI,EAAE,YAAY;QAClB,KAAK,EAAE,aAAa;KACrB;IACD;QACE,IAAI,EAAE,MAAM;QACZ,KAAK,EAAE,OAAO;KACf;IACD;QACE,IAAI,EAAE,YAAY;QAClB,KAAK,EAAE,YAAY;KACpB;IACD;QACE,IAAI,EAAE,SAAS;QACf,KAAK,EAAE,UAAU;KAClB;IACD;QACE,IAAI,EAAE,SAAS;QACf,KAAK,EAAE,UAAU;KAClB;IACD;QACE,IAAI,EAAE,iBAAiB;QACvB,KAAK,EAAE,kBAAkB;KAC1B;IACD;QACE,IAAI,EAAE,WAAW;QACjB,KAAK,EAAE,YAAY;KACpB;IACD;QACE,IAAI,EAAE,gBAAgB;QACtB,KAAK,EAAE,iBAAiB;KACzB;IACD;QACE,IAAI,EAAE,cAAc;QACpB,KAAK,EAAE,eAAe;KACvB;IACD;QACE,IAAI,EAAE,cAAc;QACpB,KAAK,EAAE,eAAe;KACvB;IACD;QACE,IAAI,EAAE,mBAAmB;QACzB,KAAK,EAAE,oBAAoB;KAC5B;IACD;QACE,IAAI,EAAE,UAAU;QAChB,KAAK,EAAE,WAAW;KACnB;IACD;QACE,IAAI,EAAE,QAAQ;QACd,KAAK,EAAE,SAAS;KACjB;IACD;QACE,IAAI,EAAE,MAAM;QACZ,KAAK,EAAE,OAAO;KACf;IACD;QACE,IAAI,EAAE,SAAS;QACf,KAAK,EAAE,UAAU;KAClB;CACF,CAAC;AAEW,QAAA,gBAAgB,GAAoB;IAC/C,WAAW,EAAE,UAAU;IACvB,IAAI,EAAE,UAAU;IAChB,IAAI,EAAE,SAAS;IACf,gBAAgB,EAAE,IAAI;IACtB,OAAO,EAAE,uBAAe;IACxB,OAAO,EAAE,WAAW;CACrB,CAAC"}
|
|
@@ -64,4 +64,6 @@ __exportStar(require("./users/users.handler"), exports);
|
|
|
64
64
|
__exportStar(require("./users/users.types"), exports);
|
|
65
65
|
__exportStar(require("./websites/websites.handler"), exports);
|
|
66
66
|
__exportStar(require("./websites/websites.types"), exports);
|
|
67
|
+
__exportStar(require("./lists/lists.handler"), exports);
|
|
68
|
+
__exportStar(require("./lists/lists.types"), exports);
|
|
67
69
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/nodes/Hudu/resources/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AACA,wEAAsD;AACtD,sEAAoD;AACpD,8DAA4C;AAC5C,4DAA0C;AAC1C,8DAA4C;AAC5C,4DAA0C;AAC1C,wEAAsD;AACtD,sEAAoD;AACpD,oFAAkE;AAClE,kFAAgE;AAChE,4EAA0D;AAC1D,0EAAwD;AACxD,0DAAwC;AACxC,wDAAsC;AACtC,wDAAsC;AACtC,sDAAoC;AACpC,gEAA8C;AAC9C,8DAA4C;AAC5C,oEAAkD;AAClD,kEAAgD;AAChD,4DAA0C;AAC1C,0DAAwC;AACxC,sEAAoD;AACpD,oEAAkD;AAClD,kEAAgD;AAChD,gEAA8C;AAC9C,8DAA4C;AAC5C,4DAA0C;AAC1C,8DAA4C;AAC5C,4DAA0C;AAC1C,8EAA4D;AAC5D,4EAA0D;AAC1D,kEAAgD;AAChD,gEAA8C;AAC9C,4EAA0D;AAC1D,0EAAwD;AACxD,wEAAsD;AACtD,sEAAoD;AACpD,wEAAsD;AACtD,sEAAoD;AACpD,kFAAgE;AAChE,gFAA8D;AAC9D,gEAA8C;AAC9C,8DAA4C;AAC5C,4DAA0C;AAC1C,0DAAwC;AACxC,wDAAsC;AACtC,sDAAoC;AACpC,8DAA4C;AAC5C,4DAA0C"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/nodes/Hudu/resources/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AACA,wEAAsD;AACtD,sEAAoD;AACpD,8DAA4C;AAC5C,4DAA0C;AAC1C,8DAA4C;AAC5C,4DAA0C;AAC1C,wEAAsD;AACtD,sEAAoD;AACpD,oFAAkE;AAClE,kFAAgE;AAChE,4EAA0D;AAC1D,0EAAwD;AACxD,0DAAwC;AACxC,wDAAsC;AACtC,wDAAsC;AACtC,sDAAoC;AACpC,gEAA8C;AAC9C,8DAA4C;AAC5C,oEAAkD;AAClD,kEAAgD;AAChD,4DAA0C;AAC1C,0DAAwC;AACxC,sEAAoD;AACpD,oEAAkD;AAClD,kEAAgD;AAChD,gEAA8C;AAC9C,8DAA4C;AAC5C,4DAA0C;AAC1C,8DAA4C;AAC5C,4DAA0C;AAC1C,8EAA4D;AAC5D,4EAA0D;AAC1D,kEAAgD;AAChD,gEAA8C;AAC9C,4EAA0D;AAC1D,0EAAwD;AACxD,wEAAsD;AACtD,sEAAoD;AACpD,wEAAsD;AACtD,sEAAoD;AACpD,kFAAgE;AAChE,gFAA8D;AAC9D,gEAA8C;AAC9C,8DAA4C;AAC5C,4DAA0C;AAC1C,0DAAwC;AACxC,wDAAsC;AACtC,sDAAoC;AACpC,8DAA4C;AAC5C,4DAA0C;AAC1C,wDAAsC;AACtC,sDAAoC"}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.handleListsOperation = void 0;
|
|
4
|
+
const operations_1 = require("../../utils/operations");
|
|
5
|
+
const debugConfig_1 = require("../../utils/debugConfig");
|
|
6
|
+
async function handleListsOperation(operation, i) {
|
|
7
|
+
const resourceEndpoint = '/lists';
|
|
8
|
+
let responseData = {};
|
|
9
|
+
if (debugConfig_1.DEBUG_CONFIG.RESOURCE_PROCESSING) {
|
|
10
|
+
(0, debugConfig_1.debugLog)('Lists Handler - Input', {
|
|
11
|
+
operation,
|
|
12
|
+
index: i,
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
switch (operation) {
|
|
16
|
+
case 'create': {
|
|
17
|
+
const name = this.getNodeParameter('name', i);
|
|
18
|
+
if (!name || name.trim() === '') {
|
|
19
|
+
throw new Error('List name cannot be blank');
|
|
20
|
+
}
|
|
21
|
+
const listItemsRaw = this.getNodeParameter('list_items_attributes', i, {});
|
|
22
|
+
const listItems = Array.isArray(listItemsRaw.item) ? listItemsRaw.item : [];
|
|
23
|
+
const body = {
|
|
24
|
+
name,
|
|
25
|
+
};
|
|
26
|
+
if (listItems.length > 0) {
|
|
27
|
+
body.list_items_attributes = listItems;
|
|
28
|
+
}
|
|
29
|
+
responseData = await operations_1.handleCreateOperation.call(this, resourceEndpoint, { list: body });
|
|
30
|
+
break;
|
|
31
|
+
}
|
|
32
|
+
case 'get': {
|
|
33
|
+
const listId = this.getNodeParameter('id', i);
|
|
34
|
+
responseData = await operations_1.handleGetOperation.call(this, resourceEndpoint, listId);
|
|
35
|
+
break;
|
|
36
|
+
}
|
|
37
|
+
case 'getAll': {
|
|
38
|
+
const returnAll = this.getNodeParameter('returnAll', i);
|
|
39
|
+
const filters = this.getNodeParameter('filters', i, {});
|
|
40
|
+
const limit = this.getNodeParameter('limit', i, 25);
|
|
41
|
+
const qs = { ...filters };
|
|
42
|
+
responseData = await operations_1.handleGetAllOperation.call(this, resourceEndpoint, 'lists', qs, returnAll, limit);
|
|
43
|
+
break;
|
|
44
|
+
}
|
|
45
|
+
case 'update': {
|
|
46
|
+
const listId = this.getNodeParameter('id', i);
|
|
47
|
+
const updateFields = this.getNodeParameter('updateFields', i);
|
|
48
|
+
if (!updateFields || Object.keys(updateFields).length === 0) {
|
|
49
|
+
throw new Error('No fields to update were provided');
|
|
50
|
+
}
|
|
51
|
+
if (updateFields.list_items_attributes) {
|
|
52
|
+
const itemsRaw = updateFields.list_items_attributes;
|
|
53
|
+
let items = Array.isArray(itemsRaw.item) ? itemsRaw.item : [];
|
|
54
|
+
items = items.map(item => {
|
|
55
|
+
const newItem = { ...item };
|
|
56
|
+
if (newItem.addNew) {
|
|
57
|
+
delete newItem.id;
|
|
58
|
+
delete newItem._destroy;
|
|
59
|
+
}
|
|
60
|
+
delete newItem.addNew;
|
|
61
|
+
return newItem;
|
|
62
|
+
});
|
|
63
|
+
updateFields.list_items_attributes = items;
|
|
64
|
+
}
|
|
65
|
+
responseData = await operations_1.handleUpdateOperation.call(this, resourceEndpoint, listId, { list: updateFields });
|
|
66
|
+
break;
|
|
67
|
+
}
|
|
68
|
+
case 'delete': {
|
|
69
|
+
const listId = this.getNodeParameter('id', i);
|
|
70
|
+
responseData = await operations_1.handleDeleteOperation.call(this, resourceEndpoint, listId);
|
|
71
|
+
break;
|
|
72
|
+
}
|
|
73
|
+
default:
|
|
74
|
+
throw new Error(`The operation "${operation}" is not supported!`);
|
|
75
|
+
}
|
|
76
|
+
if (debugConfig_1.DEBUG_CONFIG.RESOURCE_PROCESSING) {
|
|
77
|
+
(0, debugConfig_1.debugLog)('Lists Handler - Response', responseData);
|
|
78
|
+
}
|
|
79
|
+
return responseData;
|
|
80
|
+
}
|
|
81
|
+
exports.handleListsOperation = handleListsOperation;
|
|
82
|
+
//# sourceMappingURL=lists.handler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lists.handler.js","sourceRoot":"","sources":["../../../../../../src/nodes/Hudu/resources/lists/lists.handler.ts"],"names":[],"mappings":";;;AACA,uDAMgC;AAEhC,yDAAiE;AAE1D,KAAK,UAAU,oBAAoB,CAExC,SAAyB,EACzB,CAAS;IAET,MAAM,gBAAgB,GAAG,QAAQ,CAAC;IAClC,IAAI,YAAY,GAAgC,EAAE,CAAC;IAEnD,IAAI,0BAAY,CAAC,mBAAmB,EAAE;QACpC,IAAA,sBAAQ,EAAC,uBAAuB,EAAE;YAChC,SAAS;YACT,KAAK,EAAE,CAAC;SACT,CAAC,CAAC;KACJ;IAED,QAAQ,SAAS,EAAE;QACjB,KAAK,QAAQ,CAAC,CAAC;YAEb,MAAM,IAAI,GAAG,IAAI,CAAC,gBAAgB,CAAC,MAAM,EAAE,CAAC,CAAW,CAAC;YACxD,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE;gBAC/B,MAAM,IAAI,KAAK,CAAC,2BAA2B,CAAC,CAAC;aAC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G,MAAM,kCAAqB,CAAC,IAAI,CAC7C,IAAI,EACJ,gBAAgB,EAChB,MAAM,CACP,CAAC;YACF,MAAM;SACP;QACD;YACE,MAAM,IAAI,KAAK,CAAC,kBAAkB,SAAS,qBAAqB,CAAC,CAAC;KACrE;IAED,IAAI,0BAAY,CAAC,mBAAmB,EAAE;QACpC,IAAA,sBAAQ,EAAC,0BAA0B,EAAE,YAAY,CAAC,CAAC;KACpD;IAED,OAAO,YAAY,CAAC;AACtB,CAAC;AA9GD,oDA8GC"}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import type { IExecuteFunctions, IDataObject } from 'n8n-workflow';
|
|
2
|
+
import {
|
|
3
|
+
handleCreateOperation,
|
|
4
|
+
handleGetOperation,
|
|
5
|
+
handleGetAllOperation,
|
|
6
|
+
handleUpdateOperation,
|
|
7
|
+
handleDeleteOperation,
|
|
8
|
+
} from '../../utils/operations';
|
|
9
|
+
import type { ListsOperation } from './lists.types';
|
|
10
|
+
import { DEBUG_CONFIG, debugLog } from '../../utils/debugConfig';
|
|
11
|
+
|
|
12
|
+
export async function handleListsOperation(
|
|
13
|
+
this: IExecuteFunctions,
|
|
14
|
+
operation: ListsOperation,
|
|
15
|
+
i: number,
|
|
16
|
+
): Promise<IDataObject | IDataObject[]> {
|
|
17
|
+
const resourceEndpoint = '/lists';
|
|
18
|
+
let responseData: IDataObject | IDataObject[] = {};
|
|
19
|
+
|
|
20
|
+
if (DEBUG_CONFIG.RESOURCE_PROCESSING) {
|
|
21
|
+
debugLog('Lists Handler - Input', {
|
|
22
|
+
operation,
|
|
23
|
+
index: i,
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
switch (operation) {
|
|
28
|
+
case 'create': {
|
|
29
|
+
// Name is required
|
|
30
|
+
const name = this.getNodeParameter('name', i) as string;
|
|
31
|
+
if (!name || name.trim() === '') {
|
|
32
|
+
throw new Error('List name cannot be blank');
|
|
33
|
+
}
|
|
34
|
+
// Flatten the fixedCollection structure for list_items_attributes
|
|
35
|
+
const listItemsRaw = this.getNodeParameter('list_items_attributes', i, {}) as IDataObject;
|
|
36
|
+
const listItems = Array.isArray(listItemsRaw.item) ? listItemsRaw.item : [];
|
|
37
|
+
const body: IDataObject = {
|
|
38
|
+
name,
|
|
39
|
+
};
|
|
40
|
+
if (listItems.length > 0) {
|
|
41
|
+
body.list_items_attributes = listItems;
|
|
42
|
+
}
|
|
43
|
+
responseData = await handleCreateOperation.call(
|
|
44
|
+
this,
|
|
45
|
+
resourceEndpoint,
|
|
46
|
+
{ list: body },
|
|
47
|
+
);
|
|
48
|
+
break;
|
|
49
|
+
}
|
|
50
|
+
case 'get': {
|
|
51
|
+
const listId = this.getNodeParameter('id', i) as string;
|
|
52
|
+
responseData = await handleGetOperation.call(
|
|
53
|
+
this,
|
|
54
|
+
resourceEndpoint,
|
|
55
|
+
listId,
|
|
56
|
+
);
|
|
57
|
+
break;
|
|
58
|
+
}
|
|
59
|
+
case 'getAll': {
|
|
60
|
+
const returnAll = this.getNodeParameter('returnAll', i) as boolean;
|
|
61
|
+
const filters = this.getNodeParameter('filters', i, {}) as IDataObject;
|
|
62
|
+
const limit = this.getNodeParameter('limit', i, 25) as number;
|
|
63
|
+
const qs: IDataObject = { ...filters };
|
|
64
|
+
responseData = await handleGetAllOperation.call(
|
|
65
|
+
this,
|
|
66
|
+
resourceEndpoint,
|
|
67
|
+
'lists',
|
|
68
|
+
qs,
|
|
69
|
+
returnAll,
|
|
70
|
+
limit,
|
|
71
|
+
);
|
|
72
|
+
break;
|
|
73
|
+
}
|
|
74
|
+
case 'update': {
|
|
75
|
+
const listId = this.getNodeParameter('id', i) as string;
|
|
76
|
+
const updateFields = this.getNodeParameter('updateFields', i) as IDataObject;
|
|
77
|
+
if (!updateFields || Object.keys(updateFields).length === 0) {
|
|
78
|
+
throw new Error('No fields to update were provided');
|
|
79
|
+
}
|
|
80
|
+
// Flatten the fixedCollection structure for list_items_attributes if present
|
|
81
|
+
if (updateFields.list_items_attributes) {
|
|
82
|
+
const itemsRaw = updateFields.list_items_attributes as IDataObject;
|
|
83
|
+
let items = Array.isArray(itemsRaw.item) ? itemsRaw.item : [];
|
|
84
|
+
// Process each item for addNew logic
|
|
85
|
+
items = items.map(item => {
|
|
86
|
+
const newItem = { ...item };
|
|
87
|
+
if (newItem.addNew) {
|
|
88
|
+
delete newItem.id;
|
|
89
|
+
delete newItem._destroy;
|
|
90
|
+
}
|
|
91
|
+
delete newItem.addNew;
|
|
92
|
+
return newItem;
|
|
93
|
+
});
|
|
94
|
+
updateFields.list_items_attributes = items;
|
|
95
|
+
}
|
|
96
|
+
responseData = await handleUpdateOperation.call(
|
|
97
|
+
this,
|
|
98
|
+
resourceEndpoint,
|
|
99
|
+
listId,
|
|
100
|
+
{ list: updateFields },
|
|
101
|
+
);
|
|
102
|
+
break;
|
|
103
|
+
}
|
|
104
|
+
case 'delete': {
|
|
105
|
+
const listId = this.getNodeParameter('id', i) as string;
|
|
106
|
+
responseData = await handleDeleteOperation.call(
|
|
107
|
+
this,
|
|
108
|
+
resourceEndpoint,
|
|
109
|
+
listId,
|
|
110
|
+
);
|
|
111
|
+
break;
|
|
112
|
+
}
|
|
113
|
+
default:
|
|
114
|
+
throw new Error(`The operation "${operation}" is not supported!`);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
if (DEBUG_CONFIG.RESOURCE_PROCESSING) {
|
|
118
|
+
debugLog('Lists Handler - Response', responseData);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
return responseData;
|
|
122
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lists.types.js","sourceRoot":"","sources":["../../../../../../src/nodes/Hudu/resources/lists/lists.types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { IDataObject } from 'n8n-workflow';
|
|
2
|
+
|
|
3
|
+
export interface IListItem extends IDataObject {
|
|
4
|
+
id?: number; // The unique ID of the list item
|
|
5
|
+
name: string; // The name of the list item
|
|
6
|
+
_destroy?: boolean; // Used for marking item for deletion in update
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export interface IList extends IDataObject {
|
|
10
|
+
id: number; // The unique ID of the list
|
|
11
|
+
name: string; // The name of the list
|
|
12
|
+
list_items: IListItem[]; // The items in the list
|
|
13
|
+
created_at?: string; // The date and time when the list was created
|
|
14
|
+
updated_at?: string; // The date and time when the list was last updated
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export interface IListResponse extends IDataObject {
|
|
18
|
+
list: IList;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export type ListsOperation =
|
|
22
|
+
| 'create'
|
|
23
|
+
| 'get'
|
|
24
|
+
| 'getAll'
|
|
25
|
+
| 'update'
|
|
26
|
+
| 'delete';
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.handleProceduresOperation = void 0;
|
|
4
4
|
const index_1 = require("../../utils/index");
|
|
5
5
|
const operations_1 = require("../../utils/operations");
|
|
6
|
+
const procedures_1 = require("../../utils/operations/procedures");
|
|
6
7
|
async function handleProceduresOperation(operation, i) {
|
|
7
8
|
const resourceEndpoint = '/procedures';
|
|
8
9
|
let responseData = {};
|
|
@@ -105,6 +106,12 @@ async function handleProceduresOperation(operation, i) {
|
|
|
105
106
|
responseData = await operations_1.handleCreateOperation.call(this, `${resourceEndpoint}/${procedureId}/duplicate`, { procedure: body });
|
|
106
107
|
break;
|
|
107
108
|
}
|
|
109
|
+
case 'kickoff': {
|
|
110
|
+
const procedureId = this.getNodeParameter('id', i);
|
|
111
|
+
const additionalFields = this.getNodeParameter('additionalFields', i);
|
|
112
|
+
responseData = await procedures_1.handleProcedureKickoffOperation.call(this, procedureId, additionalFields);
|
|
113
|
+
break;
|
|
114
|
+
}
|
|
108
115
|
}
|
|
109
116
|
return responseData;
|
|
110
117
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"procedures.handler.js","sourceRoot":"","sources":["../../../../../../src/nodes/Hudu/resources/procedures/procedures.handler.ts"],"names":[],"mappings":";;;AACA,6CAAwE;AACxE,uDAOgC;
|
|
1
|
+
{"version":3,"file":"procedures.handler.js","sourceRoot":"","sources":["../../../../../../src/nodes/Hudu/resources/procedures/procedures.handler.ts"],"names":[],"mappings":";;;AACA,6CAAwE;AACxE,uDAOgC;AAChC,kEAAoF;AAI7E,KAAK,UAAU,yBAAyB,CAE7C,SAA+B,EAC/B,CAAS;IAET,MAAM,gBAAgB,GAAG,aAAa,CAAC;IACvC,IAAI,YAAY,GAAgC,EAAE,CAAC;IAEnD,QAAQ,SAAS,EAAE;QACjB,KAAK,QAAQ,CAAC,CAAC;YACb,MAAM,IAAI,GAAG,IAAI,CAAC,gBAAgB,CAAC,MAAM,EAAE,CAAC,CAAW,CAAC;YACxD,MAAM,gBAAgB,GAAG,IAAI,CAAC,gBAAgB,CAAC,kBAAkB,EAAE,CAAC,CAAgB,CAAC;YAGrF,IAAI,gBAAgB,CAAC,UAAU,EAAE;gBAC/B,gBAAgB,CAAC,UAAU,GAAG,IAAA,yBAAiB,EAC7C,gBAAgB,CAAC,UAAU,EAC3B,IAAI,CAAC,OAAO,EAAE,EACd,YAAY,CACb,CAAC;aACH;YAED,MAAM,IAAI,GAAgB;gBACxB,IAAI;gBACJ,GAAG,gBAAgB;aACpB,CAAC;YAEF,YAAY,GAAG,MAAM,kCAAqB,CAAC,IAAI,CAAC,IAAI,EAAE,gBAAgB,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;YAC7F,MAAM;SACP;QAED,KAAK,KAAK,CAAC,CAAC;YACV,MAAM,WAAW,GAAG,IAAI,CAAC,gBAAgB,CAAC,IAAI,EAAE,CAAC,CAAW,CAAC;YAC7D,YAAY,GAAG,MAAM,+BAAkB,CAAC,IAAI,CAAC,IAAI,EAAE,gBAAgB,EAAE,WAAW,CAAC,CAAC;YAClF,MAAM;SACP;QAED,K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AW,CAAC;YAC7D,MAAM,gBAAgB,GAAG,IAAI,CAAC,gBAAgB,CAAC,kBAAkB,EAAE,CAAC,CAAgB,CAAC;YACrF,YAAY,GAAG,MAAM,4CAA+B,CAAC,IAAI,CAAC,IAAI,EAAE,WAAW,EAAE,gBAAgB,CAAC,CAAC;YAC/F,MAAM;SACP;KACF;IAED,OAAO,YAAY,CAAC;AACtB,CAAC;AArLD,8DAqLC"}
|
|
@@ -8,6 +8,7 @@ import {
|
|
|
8
8
|
handleDeleteOperation,
|
|
9
9
|
handleArchiveOperation,
|
|
10
10
|
} from '../../utils/operations';
|
|
11
|
+
import { handleProcedureKickoffOperation } from '../../utils/operations/procedures';
|
|
11
12
|
import type { ProceduresOperations } from './procedures.types';
|
|
12
13
|
import type { DateRangePreset } from '../../utils/dateUtils';
|
|
13
14
|
|
|
@@ -182,6 +183,13 @@ export async function handleProceduresOperation(
|
|
|
182
183
|
);
|
|
183
184
|
break;
|
|
184
185
|
}
|
|
186
|
+
|
|
187
|
+
case 'kickoff': {
|
|
188
|
+
const procedureId = this.getNodeParameter('id', i) as string;
|
|
189
|
+
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
|
190
|
+
responseData = await handleProcedureKickoffOperation.call(this, procedureId, additionalFields);
|
|
191
|
+
break;
|
|
192
|
+
}
|
|
185
193
|
}
|
|
186
194
|
|
|
187
195
|
return responseData;
|