@worktables/n8n-nodes-worktables 12.0.0 → 12.0.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.
@@ -10,260 +10,6 @@ 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
- ];
267
13
  class Worktables {
268
14
  constructor() {
269
15
  this.description = {
@@ -277,6 +23,7 @@ class Worktables {
277
23
  defaults: {
278
24
  name: 'Worktables',
279
25
  },
26
+ usableAsTool: true,
280
27
  inputs: ["main"],
281
28
  outputs: ["main"],
282
29
  credentials: [
@@ -324,7 +71,80 @@ class Worktables {
324
71
  name: 'operation',
325
72
  type: 'options',
326
73
  noDataExpression: true,
327
- typeOptions: { loadOptionsMethod: 'getBoardOperations', searchListMethod: 'searchBoardOperations' },
74
+ options: [
75
+ {
76
+ name: 'List Boards',
77
+ value: 'listBoards',
78
+ description: 'List all boards',
79
+ action: 'List boards',
80
+ },
81
+ {
82
+ name: "List Board's Groups",
83
+ value: 'listBoardGroups',
84
+ description: 'List all groups in a board',
85
+ action: 'List group',
86
+ },
87
+ {
88
+ name: 'Create a Board',
89
+ value: 'createBoard',
90
+ description: 'Create a new board',
91
+ action: 'Create a board',
92
+ },
93
+ {
94
+ name: 'Create a Group',
95
+ value: 'createGroup',
96
+ description: 'Create a new group in a board',
97
+ action: 'Create a group',
98
+ },
99
+ {
100
+ name: 'Get a Board',
101
+ value: 'getBoard',
102
+ description: 'Retrieve details of a specific board',
103
+ action: 'Get a board',
104
+ },
105
+ {
106
+ name: 'Get a Group',
107
+ value: 'getGroup',
108
+ description: 'Retrieve details of a specific group in a board',
109
+ action: 'Get a group',
110
+ },
111
+ {
112
+ name: 'Duplicate a Group',
113
+ value: 'duplicateGroup',
114
+ description: 'Duplicate an existing group in a board',
115
+ action: 'Duplicate a group',
116
+ },
117
+ {
118
+ name: 'Duplicate a Board',
119
+ value: 'duplicateBoard',
120
+ description: 'Duplicate an existing board',
121
+ action: 'Duplicate a board',
122
+ },
123
+ {
124
+ name: 'List Board Activity Logs',
125
+ value: 'listBoardActivityLogs',
126
+ description: 'Retrieve activity logs of a board',
127
+ action: 'List board activity logs',
128
+ },
129
+ {
130
+ name: 'List Board Subscribers',
131
+ value: 'listBoardSubscribers',
132
+ description: 'List all subscribers of a board',
133
+ action: 'List board subscribers',
134
+ },
135
+ {
136
+ name: 'Add Board Subscribers',
137
+ value: 'addBoardSubscribers',
138
+ description: 'Add subscribers to a board',
139
+ action: 'Add board subscribers',
140
+ },
141
+ {
142
+ name: 'Remove Board Subscribers',
143
+ value: 'removeBoardSubscribers',
144
+ description: 'Remove subscribers from a board',
145
+ action: 'Remove board subscribers',
146
+ },
147
+ ],
328
148
  default: 'listBoards',
329
149
  required: true,
330
150
  displayOptions: {
@@ -336,7 +156,14 @@ class Worktables {
336
156
  name: 'operation',
337
157
  type: 'options',
338
158
  noDataExpression: true,
339
- typeOptions: { loadOptionsMethod: 'getQueryOperations', searchListMethod: 'searchQueryOperations' },
159
+ options: [
160
+ {
161
+ name: 'Run API',
162
+ value: 'query',
163
+ description: 'Run a custom query',
164
+ action: 'Run api a query',
165
+ },
166
+ ],
340
167
  default: 'query',
341
168
  required: true,
342
169
  displayOptions: {
@@ -348,7 +175,66 @@ class Worktables {
348
175
  name: 'operation',
349
176
  type: 'options',
350
177
  noDataExpression: true,
351
- typeOptions: { loadOptionsMethod: 'getItemOperations', searchListMethod: 'searchItemOperations' },
178
+ options: [
179
+ {
180
+ name: 'Get an Item',
181
+ value: 'getItem',
182
+ description: 'Retrieve details of a specific item',
183
+ action: 'Get an item',
184
+ },
185
+ {
186
+ name: 'Create an Item',
187
+ value: 'createItem',
188
+ description: 'Create an item in a board',
189
+ action: 'Create an item',
190
+ },
191
+ {
192
+ name: 'Update Column Values of an Item',
193
+ value: 'updateItem',
194
+ action: 'Update column values of an item',
195
+ },
196
+ {
197
+ name: 'Delete an Item',
198
+ value: 'deleteItem',
199
+ description: 'Delete an item from a board',
200
+ action: 'Delete an item',
201
+ },
202
+ {
203
+ name: 'Duplicate an Item',
204
+ value: 'duplicateItem',
205
+ description: 'Duplicate an existing item',
206
+ action: 'Duplicate an item',
207
+ },
208
+ {
209
+ name: 'List Items in a Board',
210
+ value: 'listBoardItems',
211
+ description: 'List all items in a board',
212
+ action: 'List items in a board',
213
+ },
214
+ {
215
+ name: 'List Items in a Group',
216
+ value: 'listGroupItems',
217
+ description: 'List all items in a group',
218
+ action: 'List items in a group',
219
+ },
220
+ {
221
+ name: 'Search Items by Filter',
222
+ value: 'searchItems',
223
+ description: 'Search items in a board using a filter',
224
+ action: 'Search items by filter',
225
+ },
226
+ {
227
+ name: 'List Item Subscribers',
228
+ value: 'listItemSubscribers',
229
+ description: 'List all subscribers of an item',
230
+ action: 'List item subscribers',
231
+ },
232
+ {
233
+ name: 'Upload files to column',
234
+ value: 'uploadItemFile',
235
+ action: 'Upload files to column',
236
+ },
237
+ ],
352
238
  default: 'createItem',
353
239
  required: true,
354
240
  displayOptions: {
@@ -360,7 +246,50 @@ class Worktables {
360
246
  name: 'operation',
361
247
  type: 'options',
362
248
  noDataExpression: true,
363
- typeOptions: { loadOptionsMethod: 'getUpdateOperations', searchListMethod: 'searchUpdateOperations' },
249
+ options: [
250
+ {
251
+ name: 'List',
252
+ value: 'listUpdates',
253
+ description: 'List updates',
254
+ action: 'List an update',
255
+ },
256
+ {
257
+ name: 'Create',
258
+ value: 'createUpdate',
259
+ description: 'Create an update',
260
+ action: 'Create an update',
261
+ },
262
+ {
263
+ name: 'Update',
264
+ value: 'updateUpdate',
265
+ description: 'Update an update',
266
+ action: 'Update an update',
267
+ },
268
+ {
269
+ name: 'Delete',
270
+ value: 'deleteUpdate',
271
+ description: 'Delete an update',
272
+ action: 'Delete an update',
273
+ },
274
+ {
275
+ name: 'Pin',
276
+ value: 'pinUpdate',
277
+ description: 'Pin an update',
278
+ action: 'Pin an update',
279
+ },
280
+ {
281
+ name: 'Duplicate',
282
+ value: 'duplicateUpdate',
283
+ description: 'Duplicate an update',
284
+ action: 'Duplicate an update',
285
+ },
286
+ {
287
+ name: 'Upload files to update',
288
+ value: 'uploadFile',
289
+ description: 'Upload a file to an update',
290
+ action: 'Upload files to update',
291
+ },
292
+ ],
364
293
  default: 'listUpdates',
365
294
  required: true,
366
295
  displayOptions: {
@@ -372,7 +301,14 @@ class Worktables {
372
301
  name: 'operation',
373
302
  type: 'options',
374
303
  noDataExpression: true,
375
- typeOptions: { loadOptionsMethod: 'getAccountOperations', searchListMethod: 'searchAccountOperations' },
304
+ options: [
305
+ {
306
+ name: 'Get Info',
307
+ value: 'getInfoAccount',
308
+ description: 'Get a info account',
309
+ action: 'Get info an account',
310
+ },
311
+ ],
376
312
  default: 'getInfoAccount',
377
313
  required: true,
378
314
  displayOptions: {
@@ -384,7 +320,44 @@ class Worktables {
384
320
  name: 'operation',
385
321
  type: 'options',
386
322
  noDataExpression: true,
387
- typeOptions: { loadOptionsMethod: 'getTeamOperations', searchListMethod: 'searchTeamOperations' },
323
+ options: [
324
+ {
325
+ name: 'List Teams',
326
+ value: 'listTeams',
327
+ description: 'List all teams',
328
+ action: 'List teams',
329
+ },
330
+ {
331
+ name: 'Get a Team',
332
+ value: 'getTeam',
333
+ description: 'Retrieve details of a specific team',
334
+ action: 'Get a team',
335
+ },
336
+ {
337
+ name: 'Create a Team',
338
+ value: 'createTeam',
339
+ description: 'Create a new team',
340
+ action: 'Create a team',
341
+ },
342
+ {
343
+ name: 'Delete a Team',
344
+ value: 'deleteTeam',
345
+ description: 'Delete a specific team',
346
+ action: 'Delete a team',
347
+ },
348
+ {
349
+ name: 'Add Users to Team',
350
+ value: 'addUsersToTeam',
351
+ description: 'Add users to a specific team',
352
+ action: 'Add users to team',
353
+ },
354
+ {
355
+ name: 'Remove Users From Team',
356
+ value: 'removeUsersFromTeam',
357
+ description: 'Remove users from a specific team',
358
+ action: 'Remove users from team',
359
+ },
360
+ ],
388
361
  default: 'listTeams',
389
362
  required: true,
390
363
  displayOptions: {
@@ -396,7 +369,20 @@ class Worktables {
396
369
  name: 'operation',
397
370
  type: 'options',
398
371
  noDataExpression: true,
399
- typeOptions: { loadOptionsMethod: 'getUserOperations', searchListMethod: 'searchUserOperations' },
372
+ options: [
373
+ {
374
+ name: 'List Users',
375
+ value: 'listUsers',
376
+ description: 'List all users',
377
+ action: 'List users',
378
+ },
379
+ {
380
+ name: 'Get a User',
381
+ value: 'getUser',
382
+ description: 'Retrieve details of a specific user',
383
+ action: 'Get a user',
384
+ },
385
+ ],
400
386
  default: 'listUsers',
401
387
  required: true,
402
388
  displayOptions: {
@@ -416,7 +402,14 @@ class Worktables {
416
402
  name: 'operation',
417
403
  type: 'options',
418
404
  noDataExpression: true,
419
- typeOptions: { loadOptionsMethod: 'getDownloadFileOperations', searchListMethod: 'searchDownloadFileOperations' },
405
+ options: [
406
+ {
407
+ name: 'Download File',
408
+ value: 'downloadFile',
409
+ description: 'Download a file from Monday.com',
410
+ action: 'Download a file',
411
+ },
412
+ ],
420
413
  displayOptions: {
421
414
  show: { resource: ['downloadFile'] },
422
415
  },
@@ -1896,126 +1889,6 @@ class Worktables {
1896
1889
  };
1897
1890
  this.methods = {
1898
1891
  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
- },
2019
1892
  async getWorkspaces() {
2020
1893
  const credentials = await this.getCredentials('WorktablesApi');
2021
1894
  const apiKey = credentials === null || credentials === void 0 ? void 0 : credentials.apiKey;