@worktables/n8n-nodes-worktables 11.51.0 → 12.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.
|
@@ -10,6 +10,260 @@ const form_data_1 = __importDefault(require("form-data"));
|
|
|
10
10
|
const axios_1 = __importDefault(require("axios"));
|
|
11
11
|
const parseValue_1 = require("../../utils/parseValue");
|
|
12
12
|
const country_codes_json_1 = __importDefault(require("../../utils/country_codes.json"));
|
|
13
|
+
const OPERATION_OPTIONS_BOARD = [
|
|
14
|
+
{
|
|
15
|
+
name: 'List Boards',
|
|
16
|
+
value: 'listBoards',
|
|
17
|
+
description: 'List all boards',
|
|
18
|
+
action: 'List boards',
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
name: "List Board's Groups",
|
|
22
|
+
value: 'listBoardGroups',
|
|
23
|
+
description: 'List all groups in a board',
|
|
24
|
+
action: 'List group',
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
name: 'Create a Board',
|
|
28
|
+
value: 'createBoard',
|
|
29
|
+
description: 'Create a new board',
|
|
30
|
+
action: 'Create a board',
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
name: 'Create a Group',
|
|
34
|
+
value: 'createGroup',
|
|
35
|
+
description: 'Create a new group in a board',
|
|
36
|
+
action: 'Create a group',
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
name: 'Get a Board',
|
|
40
|
+
value: 'getBoard',
|
|
41
|
+
description: 'Retrieve details of a specific board',
|
|
42
|
+
action: 'Get a board',
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
name: 'Get a Group',
|
|
46
|
+
value: 'getGroup',
|
|
47
|
+
description: 'Retrieve details of a specific group in a board',
|
|
48
|
+
action: 'Get a group',
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
name: 'Duplicate a Group',
|
|
52
|
+
value: 'duplicateGroup',
|
|
53
|
+
description: 'Duplicate an existing group in a board',
|
|
54
|
+
action: 'Duplicate a group',
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
name: 'Duplicate a Board',
|
|
58
|
+
value: 'duplicateBoard',
|
|
59
|
+
description: 'Duplicate an existing board',
|
|
60
|
+
action: 'Duplicate a board',
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
name: 'List Board Activity Logs',
|
|
64
|
+
value: 'listBoardActivityLogs',
|
|
65
|
+
description: 'Retrieve activity logs of a board',
|
|
66
|
+
action: 'List board activity logs',
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
name: 'List Board Subscribers',
|
|
70
|
+
value: 'listBoardSubscribers',
|
|
71
|
+
description: 'List all subscribers of a board',
|
|
72
|
+
action: 'List board subscribers',
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
name: 'Add Board Subscribers',
|
|
76
|
+
value: 'addBoardSubscribers',
|
|
77
|
+
description: 'Add subscribers to a board',
|
|
78
|
+
action: 'Add board subscribers',
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
name: 'Remove Board Subscribers',
|
|
82
|
+
value: 'removeBoardSubscribers',
|
|
83
|
+
description: 'Remove subscribers from a board',
|
|
84
|
+
action: 'Remove board subscribers',
|
|
85
|
+
},
|
|
86
|
+
];
|
|
87
|
+
const OPERATION_OPTIONS_QUERY = [
|
|
88
|
+
{
|
|
89
|
+
name: 'Run API',
|
|
90
|
+
value: 'query',
|
|
91
|
+
description: 'Run a custom query',
|
|
92
|
+
action: 'Run api a query',
|
|
93
|
+
},
|
|
94
|
+
];
|
|
95
|
+
const OPERATION_OPTIONS_ITEM = [
|
|
96
|
+
{
|
|
97
|
+
name: 'Get an Item',
|
|
98
|
+
value: 'getItem',
|
|
99
|
+
description: 'Retrieve details of a specific item',
|
|
100
|
+
action: 'Get an item',
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
name: 'Create an Item',
|
|
104
|
+
value: 'createItem',
|
|
105
|
+
description: 'Create an item in a board',
|
|
106
|
+
action: 'Create an item',
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
name: 'Update Column Values of an Item',
|
|
110
|
+
value: 'updateItem',
|
|
111
|
+
action: 'Update column values of an item',
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
name: 'Delete an Item',
|
|
115
|
+
value: 'deleteItem',
|
|
116
|
+
description: 'Delete an item from a board',
|
|
117
|
+
action: 'Delete an item',
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
name: 'Duplicate an Item',
|
|
121
|
+
value: 'duplicateItem',
|
|
122
|
+
description: 'Duplicate an existing item',
|
|
123
|
+
action: 'Duplicate an item',
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
name: 'List Items in a Board',
|
|
127
|
+
value: 'listBoardItems',
|
|
128
|
+
description: 'List all items in a board',
|
|
129
|
+
action: 'List items in a board',
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
name: 'List Items in a Group',
|
|
133
|
+
value: 'listGroupItems',
|
|
134
|
+
description: 'List all items in a group',
|
|
135
|
+
action: 'List items in a group',
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
name: 'Search Items by Filter',
|
|
139
|
+
value: 'searchItems',
|
|
140
|
+
description: 'Search items in a board using a filter',
|
|
141
|
+
action: 'Search items by filter',
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
name: 'List Item Subscribers',
|
|
145
|
+
value: 'listItemSubscribers',
|
|
146
|
+
description: 'List all subscribers of an item',
|
|
147
|
+
action: 'List item subscribers',
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
name: 'Upload files to column',
|
|
151
|
+
value: 'uploadItemFile',
|
|
152
|
+
action: 'Upload files to column',
|
|
153
|
+
},
|
|
154
|
+
];
|
|
155
|
+
const OPERATION_OPTIONS_UPDATE = [
|
|
156
|
+
{
|
|
157
|
+
name: 'List',
|
|
158
|
+
value: 'listUpdates',
|
|
159
|
+
description: 'List updates',
|
|
160
|
+
action: 'List an update',
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
name: 'Create',
|
|
164
|
+
value: 'createUpdate',
|
|
165
|
+
description: 'Create an update',
|
|
166
|
+
action: 'Create an update',
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
name: 'Update',
|
|
170
|
+
value: 'updateUpdate',
|
|
171
|
+
description: 'Update an update',
|
|
172
|
+
action: 'Update an update',
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
name: 'Delete',
|
|
176
|
+
value: 'deleteUpdate',
|
|
177
|
+
description: 'Delete an update',
|
|
178
|
+
action: 'Delete an update',
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
name: 'Pin',
|
|
182
|
+
value: 'pinUpdate',
|
|
183
|
+
description: 'Pin an update',
|
|
184
|
+
action: 'Pin an update',
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
name: 'Duplicate',
|
|
188
|
+
value: 'duplicateUpdate',
|
|
189
|
+
description: 'Duplicate an update',
|
|
190
|
+
action: 'Duplicate an update',
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
name: 'Upload files to update',
|
|
194
|
+
value: 'uploadFile',
|
|
195
|
+
description: 'Upload a file to an update',
|
|
196
|
+
action: 'Upload files to update',
|
|
197
|
+
},
|
|
198
|
+
];
|
|
199
|
+
const OPERATION_OPTIONS_ACCOUNT = [
|
|
200
|
+
{
|
|
201
|
+
name: 'Get Info',
|
|
202
|
+
value: 'getInfoAccount',
|
|
203
|
+
description: 'Get a info account',
|
|
204
|
+
action: 'Get info an account',
|
|
205
|
+
},
|
|
206
|
+
];
|
|
207
|
+
const OPERATION_OPTIONS_TEAM = [
|
|
208
|
+
{
|
|
209
|
+
name: 'List Teams',
|
|
210
|
+
value: 'listTeams',
|
|
211
|
+
description: 'List all teams',
|
|
212
|
+
action: 'List teams',
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
name: 'Get a Team',
|
|
216
|
+
value: 'getTeam',
|
|
217
|
+
description: 'Retrieve details of a specific team',
|
|
218
|
+
action: 'Get a team',
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
name: 'Create a Team',
|
|
222
|
+
value: 'createTeam',
|
|
223
|
+
description: 'Create a new team',
|
|
224
|
+
action: 'Create a team',
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
name: 'Delete a Team',
|
|
228
|
+
value: 'deleteTeam',
|
|
229
|
+
description: 'Delete a specific team',
|
|
230
|
+
action: 'Delete a team',
|
|
231
|
+
},
|
|
232
|
+
{
|
|
233
|
+
name: 'Add Users to Team',
|
|
234
|
+
value: 'addUsersToTeam',
|
|
235
|
+
description: 'Add users to a specific team',
|
|
236
|
+
action: 'Add users to team',
|
|
237
|
+
},
|
|
238
|
+
{
|
|
239
|
+
name: 'Remove Users From Team',
|
|
240
|
+
value: 'removeUsersFromTeam',
|
|
241
|
+
description: 'Remove users from a specific team',
|
|
242
|
+
action: 'Remove users from team',
|
|
243
|
+
},
|
|
244
|
+
];
|
|
245
|
+
const OPERATION_OPTIONS_USER = [
|
|
246
|
+
{
|
|
247
|
+
name: 'List Users',
|
|
248
|
+
value: 'listUsers',
|
|
249
|
+
description: 'List all users',
|
|
250
|
+
action: 'List users',
|
|
251
|
+
},
|
|
252
|
+
{
|
|
253
|
+
name: 'Get a User',
|
|
254
|
+
value: 'getUser',
|
|
255
|
+
description: 'Retrieve details of a specific user',
|
|
256
|
+
action: 'Get a user',
|
|
257
|
+
},
|
|
258
|
+
];
|
|
259
|
+
const OPERATION_OPTIONS_DOWNLOADFILE = [
|
|
260
|
+
{
|
|
261
|
+
name: 'Download File',
|
|
262
|
+
value: 'downloadFile',
|
|
263
|
+
description: 'Download a file from Monday.com',
|
|
264
|
+
action: 'Download a file',
|
|
265
|
+
},
|
|
266
|
+
];
|
|
13
267
|
class Worktables {
|
|
14
268
|
constructor() {
|
|
15
269
|
this.description = {
|
|
@@ -70,80 +324,7 @@ class Worktables {
|
|
|
70
324
|
name: 'operation',
|
|
71
325
|
type: 'options',
|
|
72
326
|
noDataExpression: true,
|
|
73
|
-
|
|
74
|
-
{
|
|
75
|
-
name: 'List Boards',
|
|
76
|
-
value: 'listBoards',
|
|
77
|
-
description: 'List all boards',
|
|
78
|
-
action: 'List boards',
|
|
79
|
-
},
|
|
80
|
-
{
|
|
81
|
-
name: "List Board's Groups",
|
|
82
|
-
value: 'listBoardGroups',
|
|
83
|
-
description: 'List all groups in a board',
|
|
84
|
-
action: 'List group',
|
|
85
|
-
},
|
|
86
|
-
{
|
|
87
|
-
name: 'Create a Board',
|
|
88
|
-
value: 'createBoard',
|
|
89
|
-
description: 'Create a new board',
|
|
90
|
-
action: 'Create a board',
|
|
91
|
-
},
|
|
92
|
-
{
|
|
93
|
-
name: 'Create a Group',
|
|
94
|
-
value: 'createGroup',
|
|
95
|
-
description: 'Create a new group in a board',
|
|
96
|
-
action: 'Create a group',
|
|
97
|
-
},
|
|
98
|
-
{
|
|
99
|
-
name: 'Get a Board',
|
|
100
|
-
value: 'getBoard',
|
|
101
|
-
description: 'Retrieve details of a specific board',
|
|
102
|
-
action: 'Get a board',
|
|
103
|
-
},
|
|
104
|
-
{
|
|
105
|
-
name: 'Get a Group',
|
|
106
|
-
value: 'getGroup',
|
|
107
|
-
description: 'Retrieve details of a specific group in a board',
|
|
108
|
-
action: 'Get a group',
|
|
109
|
-
},
|
|
110
|
-
{
|
|
111
|
-
name: 'Duplicate a Group',
|
|
112
|
-
value: 'duplicateGroup',
|
|
113
|
-
description: 'Duplicate an existing group in a board',
|
|
114
|
-
action: 'Duplicate a group',
|
|
115
|
-
},
|
|
116
|
-
{
|
|
117
|
-
name: 'Duplicate a Board',
|
|
118
|
-
value: 'duplicateBoard',
|
|
119
|
-
description: 'Duplicate an existing board',
|
|
120
|
-
action: 'Duplicate a board',
|
|
121
|
-
},
|
|
122
|
-
{
|
|
123
|
-
name: 'List Board Activity Logs',
|
|
124
|
-
value: 'listBoardActivityLogs',
|
|
125
|
-
description: 'Retrieve activity logs of a board',
|
|
126
|
-
action: 'List board activity logs',
|
|
127
|
-
},
|
|
128
|
-
{
|
|
129
|
-
name: 'List Board Subscribers',
|
|
130
|
-
value: 'listBoardSubscribers',
|
|
131
|
-
description: 'List all subscribers of a board',
|
|
132
|
-
action: 'List board subscribers',
|
|
133
|
-
},
|
|
134
|
-
{
|
|
135
|
-
name: 'Add Board Subscribers',
|
|
136
|
-
value: 'addBoardSubscribers',
|
|
137
|
-
description: 'Add subscribers to a board',
|
|
138
|
-
action: 'Add board subscribers',
|
|
139
|
-
},
|
|
140
|
-
{
|
|
141
|
-
name: 'Remove Board Subscribers',
|
|
142
|
-
value: 'removeBoardSubscribers',
|
|
143
|
-
description: 'Remove subscribers from a board',
|
|
144
|
-
action: 'Remove board subscribers',
|
|
145
|
-
},
|
|
146
|
-
],
|
|
327
|
+
typeOptions: { loadOptionsMethod: 'getBoardOperations', searchListMethod: 'searchBoardOperations' },
|
|
147
328
|
default: 'listBoards',
|
|
148
329
|
required: true,
|
|
149
330
|
displayOptions: {
|
|
@@ -155,14 +336,7 @@ class Worktables {
|
|
|
155
336
|
name: 'operation',
|
|
156
337
|
type: 'options',
|
|
157
338
|
noDataExpression: true,
|
|
158
|
-
|
|
159
|
-
{
|
|
160
|
-
name: 'Run API',
|
|
161
|
-
value: 'query',
|
|
162
|
-
description: 'Run a custom query',
|
|
163
|
-
action: 'Run api a query',
|
|
164
|
-
},
|
|
165
|
-
],
|
|
339
|
+
typeOptions: { loadOptionsMethod: 'getQueryOperations', searchListMethod: 'searchQueryOperations' },
|
|
166
340
|
default: 'query',
|
|
167
341
|
required: true,
|
|
168
342
|
displayOptions: {
|
|
@@ -174,66 +348,7 @@ class Worktables {
|
|
|
174
348
|
name: 'operation',
|
|
175
349
|
type: 'options',
|
|
176
350
|
noDataExpression: true,
|
|
177
|
-
|
|
178
|
-
{
|
|
179
|
-
name: 'Get an Item',
|
|
180
|
-
value: 'getItem',
|
|
181
|
-
description: 'Retrieve details of a specific item',
|
|
182
|
-
action: 'Get an item',
|
|
183
|
-
},
|
|
184
|
-
{
|
|
185
|
-
name: 'Create an Item',
|
|
186
|
-
value: 'createItem',
|
|
187
|
-
description: 'Create an item in a board',
|
|
188
|
-
action: 'Create an item',
|
|
189
|
-
},
|
|
190
|
-
{
|
|
191
|
-
name: 'Update Column Values of an Item',
|
|
192
|
-
value: 'updateItem',
|
|
193
|
-
action: 'Update column values of an item',
|
|
194
|
-
},
|
|
195
|
-
{
|
|
196
|
-
name: 'Delete an Item',
|
|
197
|
-
value: 'deleteItem',
|
|
198
|
-
description: 'Delete an item from a board',
|
|
199
|
-
action: 'Delete an item',
|
|
200
|
-
},
|
|
201
|
-
{
|
|
202
|
-
name: 'Duplicate an Item',
|
|
203
|
-
value: 'duplicateItem',
|
|
204
|
-
description: 'Duplicate an existing item',
|
|
205
|
-
action: 'Duplicate an item',
|
|
206
|
-
},
|
|
207
|
-
{
|
|
208
|
-
name: 'List Items in a Board',
|
|
209
|
-
value: 'listBoardItems',
|
|
210
|
-
description: 'List all items in a board',
|
|
211
|
-
action: 'List items in a board',
|
|
212
|
-
},
|
|
213
|
-
{
|
|
214
|
-
name: 'List Items in a Group',
|
|
215
|
-
value: 'listGroupItems',
|
|
216
|
-
description: 'List all items in a group',
|
|
217
|
-
action: 'List items in a group',
|
|
218
|
-
},
|
|
219
|
-
{
|
|
220
|
-
name: 'Search Items by Filter',
|
|
221
|
-
value: 'searchItems',
|
|
222
|
-
description: 'Search items in a board using a filter',
|
|
223
|
-
action: 'Search items by filter',
|
|
224
|
-
},
|
|
225
|
-
{
|
|
226
|
-
name: 'List Item Subscribers',
|
|
227
|
-
value: 'listItemSubscribers',
|
|
228
|
-
description: 'List all subscribers of an item',
|
|
229
|
-
action: 'List item subscribers',
|
|
230
|
-
},
|
|
231
|
-
{
|
|
232
|
-
name: 'Upload files to column',
|
|
233
|
-
value: 'uploadItemFile',
|
|
234
|
-
action: 'Upload files to column',
|
|
235
|
-
},
|
|
236
|
-
],
|
|
351
|
+
typeOptions: { loadOptionsMethod: 'getItemOperations', searchListMethod: 'searchItemOperations' },
|
|
237
352
|
default: 'createItem',
|
|
238
353
|
required: true,
|
|
239
354
|
displayOptions: {
|
|
@@ -245,50 +360,7 @@ class Worktables {
|
|
|
245
360
|
name: 'operation',
|
|
246
361
|
type: 'options',
|
|
247
362
|
noDataExpression: true,
|
|
248
|
-
|
|
249
|
-
{
|
|
250
|
-
name: 'List',
|
|
251
|
-
value: 'listUpdates',
|
|
252
|
-
description: 'List updates',
|
|
253
|
-
action: 'List an update',
|
|
254
|
-
},
|
|
255
|
-
{
|
|
256
|
-
name: 'Create',
|
|
257
|
-
value: 'createUpdate',
|
|
258
|
-
description: 'Create an update',
|
|
259
|
-
action: 'Create an update',
|
|
260
|
-
},
|
|
261
|
-
{
|
|
262
|
-
name: 'Update',
|
|
263
|
-
value: 'updateUpdate',
|
|
264
|
-
description: 'Update an update',
|
|
265
|
-
action: 'Update an update',
|
|
266
|
-
},
|
|
267
|
-
{
|
|
268
|
-
name: 'Delete',
|
|
269
|
-
value: 'deleteUpdate',
|
|
270
|
-
description: 'Delete an update',
|
|
271
|
-
action: 'Delete an update',
|
|
272
|
-
},
|
|
273
|
-
{
|
|
274
|
-
name: 'Pin',
|
|
275
|
-
value: 'pinUpdate',
|
|
276
|
-
description: 'Pin an update',
|
|
277
|
-
action: 'Pin an update',
|
|
278
|
-
},
|
|
279
|
-
{
|
|
280
|
-
name: 'Duplicate',
|
|
281
|
-
value: 'duplicateUpdate',
|
|
282
|
-
description: 'Duplicate an update',
|
|
283
|
-
action: 'Duplicate an update',
|
|
284
|
-
},
|
|
285
|
-
{
|
|
286
|
-
name: 'Upload files to update',
|
|
287
|
-
value: 'uploadFile',
|
|
288
|
-
description: 'Upload a file to an update',
|
|
289
|
-
action: 'Upload files to update',
|
|
290
|
-
},
|
|
291
|
-
],
|
|
363
|
+
typeOptions: { loadOptionsMethod: 'getUpdateOperations', searchListMethod: 'searchUpdateOperations' },
|
|
292
364
|
default: 'listUpdates',
|
|
293
365
|
required: true,
|
|
294
366
|
displayOptions: {
|
|
@@ -300,14 +372,7 @@ class Worktables {
|
|
|
300
372
|
name: 'operation',
|
|
301
373
|
type: 'options',
|
|
302
374
|
noDataExpression: true,
|
|
303
|
-
|
|
304
|
-
{
|
|
305
|
-
name: 'Get Info',
|
|
306
|
-
value: 'getInfoAccount',
|
|
307
|
-
description: 'Get a info account',
|
|
308
|
-
action: 'Get info an account',
|
|
309
|
-
},
|
|
310
|
-
],
|
|
375
|
+
typeOptions: { loadOptionsMethod: 'getAccountOperations', searchListMethod: 'searchAccountOperations' },
|
|
311
376
|
default: 'getInfoAccount',
|
|
312
377
|
required: true,
|
|
313
378
|
displayOptions: {
|
|
@@ -319,44 +384,7 @@ class Worktables {
|
|
|
319
384
|
name: 'operation',
|
|
320
385
|
type: 'options',
|
|
321
386
|
noDataExpression: true,
|
|
322
|
-
|
|
323
|
-
{
|
|
324
|
-
name: 'List Teams',
|
|
325
|
-
value: 'listTeams',
|
|
326
|
-
description: 'List all teams',
|
|
327
|
-
action: 'List teams',
|
|
328
|
-
},
|
|
329
|
-
{
|
|
330
|
-
name: 'Get a Team',
|
|
331
|
-
value: 'getTeam',
|
|
332
|
-
description: 'Retrieve details of a specific team',
|
|
333
|
-
action: 'Get a team',
|
|
334
|
-
},
|
|
335
|
-
{
|
|
336
|
-
name: 'Create a Team',
|
|
337
|
-
value: 'createTeam',
|
|
338
|
-
description: 'Create a new team',
|
|
339
|
-
action: 'Create a team',
|
|
340
|
-
},
|
|
341
|
-
{
|
|
342
|
-
name: 'Delete a Team',
|
|
343
|
-
value: 'deleteTeam',
|
|
344
|
-
description: 'Delete a specific team',
|
|
345
|
-
action: 'Delete a team',
|
|
346
|
-
},
|
|
347
|
-
{
|
|
348
|
-
name: 'Add Users to Team',
|
|
349
|
-
value: 'addUsersToTeam',
|
|
350
|
-
description: 'Add users to a specific team',
|
|
351
|
-
action: 'Add users to team',
|
|
352
|
-
},
|
|
353
|
-
{
|
|
354
|
-
name: 'Remove Users From Team',
|
|
355
|
-
value: 'removeUsersFromTeam',
|
|
356
|
-
description: 'Remove users from a specific team',
|
|
357
|
-
action: 'Remove users from team',
|
|
358
|
-
},
|
|
359
|
-
],
|
|
387
|
+
typeOptions: { loadOptionsMethod: 'getTeamOperations', searchListMethod: 'searchTeamOperations' },
|
|
360
388
|
default: 'listTeams',
|
|
361
389
|
required: true,
|
|
362
390
|
displayOptions: {
|
|
@@ -368,20 +396,7 @@ class Worktables {
|
|
|
368
396
|
name: 'operation',
|
|
369
397
|
type: 'options',
|
|
370
398
|
noDataExpression: true,
|
|
371
|
-
|
|
372
|
-
{
|
|
373
|
-
name: 'List Users',
|
|
374
|
-
value: 'listUsers',
|
|
375
|
-
description: 'List all users',
|
|
376
|
-
action: 'List users',
|
|
377
|
-
},
|
|
378
|
-
{
|
|
379
|
-
name: 'Get a User',
|
|
380
|
-
value: 'getUser',
|
|
381
|
-
description: 'Retrieve details of a specific user',
|
|
382
|
-
action: 'Get a user',
|
|
383
|
-
},
|
|
384
|
-
],
|
|
399
|
+
typeOptions: { loadOptionsMethod: 'getUserOperations', searchListMethod: 'searchUserOperations' },
|
|
385
400
|
default: 'listUsers',
|
|
386
401
|
required: true,
|
|
387
402
|
displayOptions: {
|
|
@@ -401,14 +416,7 @@ class Worktables {
|
|
|
401
416
|
name: 'operation',
|
|
402
417
|
type: 'options',
|
|
403
418
|
noDataExpression: true,
|
|
404
|
-
|
|
405
|
-
{
|
|
406
|
-
name: 'Download File',
|
|
407
|
-
value: 'downloadFile',
|
|
408
|
-
description: 'Download a file from Monday.com',
|
|
409
|
-
action: 'Download a file',
|
|
410
|
-
},
|
|
411
|
-
],
|
|
419
|
+
typeOptions: { loadOptionsMethod: 'getDownloadFileOperations', searchListMethod: 'searchDownloadFileOperations' },
|
|
412
420
|
displayOptions: {
|
|
413
421
|
show: { resource: ['downloadFile'] },
|
|
414
422
|
},
|
|
@@ -1888,6 +1896,126 @@ class Worktables {
|
|
|
1888
1896
|
};
|
|
1889
1897
|
this.methods = {
|
|
1890
1898
|
loadOptions: {
|
|
1899
|
+
async getBoardOperations() {
|
|
1900
|
+
return OPERATION_OPTIONS_BOARD;
|
|
1901
|
+
},
|
|
1902
|
+
async searchBoardOperations(query) {
|
|
1903
|
+
var _a;
|
|
1904
|
+
const raw = typeof query === 'string' ? query : ((_a = query === null || query === void 0 ? void 0 : query.filter) !== null && _a !== void 0 ? _a : '');
|
|
1905
|
+
const filter = raw.toLowerCase();
|
|
1906
|
+
return OPERATION_OPTIONS_BOARD.filter((o) => {
|
|
1907
|
+
var _a, _b, _c;
|
|
1908
|
+
const name = String((_a = o.name) !== null && _a !== void 0 ? _a : '').toLowerCase();
|
|
1909
|
+
const desc = String((_b = o.description) !== null && _b !== void 0 ? _b : '').toLowerCase();
|
|
1910
|
+
const act = String((_c = o.action) !== null && _c !== void 0 ? _c : '').toLowerCase();
|
|
1911
|
+
return name.includes(filter) || desc.includes(filter) || act.includes(filter);
|
|
1912
|
+
});
|
|
1913
|
+
},
|
|
1914
|
+
async getQueryOperations() {
|
|
1915
|
+
return OPERATION_OPTIONS_QUERY;
|
|
1916
|
+
},
|
|
1917
|
+
async searchQueryOperations(query) {
|
|
1918
|
+
var _a;
|
|
1919
|
+
const raw = typeof query === 'string' ? query : ((_a = query === null || query === void 0 ? void 0 : query.filter) !== null && _a !== void 0 ? _a : '');
|
|
1920
|
+
const filter = raw.toLowerCase();
|
|
1921
|
+
return OPERATION_OPTIONS_QUERY.filter((o) => {
|
|
1922
|
+
var _a, _b, _c;
|
|
1923
|
+
const name = String((_a = o.name) !== null && _a !== void 0 ? _a : '').toLowerCase();
|
|
1924
|
+
const desc = String((_b = o.description) !== null && _b !== void 0 ? _b : '').toLowerCase();
|
|
1925
|
+
const act = String((_c = o.action) !== null && _c !== void 0 ? _c : '').toLowerCase();
|
|
1926
|
+
return name.includes(filter) || desc.includes(filter) || act.includes(filter);
|
|
1927
|
+
});
|
|
1928
|
+
},
|
|
1929
|
+
async getItemOperations() {
|
|
1930
|
+
return OPERATION_OPTIONS_ITEM;
|
|
1931
|
+
},
|
|
1932
|
+
async searchItemOperations(query) {
|
|
1933
|
+
var _a;
|
|
1934
|
+
const raw = typeof query === 'string' ? query : ((_a = query === null || query === void 0 ? void 0 : query.filter) !== null && _a !== void 0 ? _a : '');
|
|
1935
|
+
const filter = raw.toLowerCase();
|
|
1936
|
+
return OPERATION_OPTIONS_ITEM.filter((o) => {
|
|
1937
|
+
var _a, _b, _c;
|
|
1938
|
+
const name = String((_a = o.name) !== null && _a !== void 0 ? _a : '').toLowerCase();
|
|
1939
|
+
const desc = String((_b = o.description) !== null && _b !== void 0 ? _b : '').toLowerCase();
|
|
1940
|
+
const act = String((_c = o.action) !== null && _c !== void 0 ? _c : '').toLowerCase();
|
|
1941
|
+
return name.includes(filter) || desc.includes(filter) || act.includes(filter);
|
|
1942
|
+
});
|
|
1943
|
+
},
|
|
1944
|
+
async getUpdateOperations() {
|
|
1945
|
+
return OPERATION_OPTIONS_UPDATE;
|
|
1946
|
+
},
|
|
1947
|
+
async searchUpdateOperations(query) {
|
|
1948
|
+
var _a;
|
|
1949
|
+
const raw = typeof query === 'string' ? query : ((_a = query === null || query === void 0 ? void 0 : query.filter) !== null && _a !== void 0 ? _a : '');
|
|
1950
|
+
const filter = raw.toLowerCase();
|
|
1951
|
+
return OPERATION_OPTIONS_UPDATE.filter((o) => {
|
|
1952
|
+
var _a, _b, _c;
|
|
1953
|
+
const name = String((_a = o.name) !== null && _a !== void 0 ? _a : '').toLowerCase();
|
|
1954
|
+
const desc = String((_b = o.description) !== null && _b !== void 0 ? _b : '').toLowerCase();
|
|
1955
|
+
const act = String((_c = o.action) !== null && _c !== void 0 ? _c : '').toLowerCase();
|
|
1956
|
+
return name.includes(filter) || desc.includes(filter) || act.includes(filter);
|
|
1957
|
+
});
|
|
1958
|
+
},
|
|
1959
|
+
async getAccountOperations() {
|
|
1960
|
+
return OPERATION_OPTIONS_ACCOUNT;
|
|
1961
|
+
},
|
|
1962
|
+
async searchAccountOperations(query) {
|
|
1963
|
+
var _a;
|
|
1964
|
+
const raw = typeof query === 'string' ? query : ((_a = query === null || query === void 0 ? void 0 : query.filter) !== null && _a !== void 0 ? _a : '');
|
|
1965
|
+
const filter = raw.toLowerCase();
|
|
1966
|
+
return OPERATION_OPTIONS_ACCOUNT.filter((o) => {
|
|
1967
|
+
var _a, _b, _c;
|
|
1968
|
+
const name = String((_a = o.name) !== null && _a !== void 0 ? _a : '').toLowerCase();
|
|
1969
|
+
const desc = String((_b = o.description) !== null && _b !== void 0 ? _b : '').toLowerCase();
|
|
1970
|
+
const act = String((_c = o.action) !== null && _c !== void 0 ? _c : '').toLowerCase();
|
|
1971
|
+
return name.includes(filter) || desc.includes(filter) || act.includes(filter);
|
|
1972
|
+
});
|
|
1973
|
+
},
|
|
1974
|
+
async getTeamOperations() {
|
|
1975
|
+
return OPERATION_OPTIONS_TEAM;
|
|
1976
|
+
},
|
|
1977
|
+
async searchTeamOperations(query) {
|
|
1978
|
+
var _a;
|
|
1979
|
+
const raw = typeof query === 'string' ? query : ((_a = query === null || query === void 0 ? void 0 : query.filter) !== null && _a !== void 0 ? _a : '');
|
|
1980
|
+
const filter = raw.toLowerCase();
|
|
1981
|
+
return OPERATION_OPTIONS_TEAM.filter((o) => {
|
|
1982
|
+
var _a, _b, _c;
|
|
1983
|
+
const name = String((_a = o.name) !== null && _a !== void 0 ? _a : '').toLowerCase();
|
|
1984
|
+
const desc = String((_b = o.description) !== null && _b !== void 0 ? _b : '').toLowerCase();
|
|
1985
|
+
const act = String((_c = o.action) !== null && _c !== void 0 ? _c : '').toLowerCase();
|
|
1986
|
+
return name.includes(filter) || desc.includes(filter) || act.includes(filter);
|
|
1987
|
+
});
|
|
1988
|
+
},
|
|
1989
|
+
async getUserOperations() {
|
|
1990
|
+
return OPERATION_OPTIONS_USER;
|
|
1991
|
+
},
|
|
1992
|
+
async searchUserOperations(query) {
|
|
1993
|
+
var _a;
|
|
1994
|
+
const raw = typeof query === 'string' ? query : ((_a = query === null || query === void 0 ? void 0 : query.filter) !== null && _a !== void 0 ? _a : '');
|
|
1995
|
+
const filter = raw.toLowerCase();
|
|
1996
|
+
return OPERATION_OPTIONS_USER.filter((o) => {
|
|
1997
|
+
var _a, _b, _c;
|
|
1998
|
+
const name = String((_a = o.name) !== null && _a !== void 0 ? _a : '').toLowerCase();
|
|
1999
|
+
const desc = String((_b = o.description) !== null && _b !== void 0 ? _b : '').toLowerCase();
|
|
2000
|
+
const act = String((_c = o.action) !== null && _c !== void 0 ? _c : '').toLowerCase();
|
|
2001
|
+
return name.includes(filter) || desc.includes(filter) || act.includes(filter);
|
|
2002
|
+
});
|
|
2003
|
+
},
|
|
2004
|
+
async getDownloadFileOperations() {
|
|
2005
|
+
return OPERATION_OPTIONS_DOWNLOADFILE;
|
|
2006
|
+
},
|
|
2007
|
+
async searchDownloadFileOperations(query) {
|
|
2008
|
+
var _a;
|
|
2009
|
+
const raw = typeof query === 'string' ? query : ((_a = query === null || query === void 0 ? void 0 : query.filter) !== null && _a !== void 0 ? _a : '');
|
|
2010
|
+
const filter = raw.toLowerCase();
|
|
2011
|
+
return OPERATION_OPTIONS_DOWNLOADFILE.filter((o) => {
|
|
2012
|
+
var _a, _b, _c;
|
|
2013
|
+
const name = String((_a = o.name) !== null && _a !== void 0 ? _a : '').toLowerCase();
|
|
2014
|
+
const desc = String((_b = o.description) !== null && _b !== void 0 ? _b : '').toLowerCase();
|
|
2015
|
+
const act = String((_c = o.action) !== null && _c !== void 0 ? _c : '').toLowerCase();
|
|
2016
|
+
return name.includes(filter) || desc.includes(filter) || act.includes(filter);
|
|
2017
|
+
});
|
|
2018
|
+
},
|
|
1891
2019
|
async getWorkspaces() {
|
|
1892
2020
|
const credentials = await this.getCredentials('WorktablesApi');
|
|
1893
2021
|
const apiKey = credentials === null || credentials === void 0 ? void 0 : credentials.apiKey;
|
|
@@ -4684,6 +4812,7 @@ class Worktables {
|
|
|
4684
4812
|
}
|
|
4685
4813
|
switch (operation) {
|
|
4686
4814
|
case 'query': {
|
|
4815
|
+
console.log('Run Query:', runQuery);
|
|
4687
4816
|
response = await this.helpers.request({
|
|
4688
4817
|
method: 'POST',
|
|
4689
4818
|
url: 'https://api.monday.com/v2',
|