@gudhub/core 1.1.83 → 1.1.85

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.
@@ -210,7 +210,7 @@ async getFiles(app_id, filesId = []) {
210
210
  return file;
211
211
  }
212
212
 
213
- async deleteFile(app_id, id) {
213
+ async deleteFile(id, app_id) {
214
214
  await this.deleteFileApi(id);
215
215
  this.deleteFileFromStorage(id, app_id);
216
216
  return true;
@@ -1308,6 +1308,13 @@ export default function generateModulesList(async_modules_path, file_server_url,
1308
1308
  url: file_server_url + '/' + automation_modules_path + 'fireworks_node.js',
1309
1309
  type: 'automation',
1310
1310
  icon: 'weeding_party'
1311
+ },
1312
+ {
1313
+ data_type: 'SendMessage',
1314
+ name: 'Send Message',
1315
+ url: file_server_url + '/' + automation_modules_path + 'send_message.js',
1316
+ type: 'automation',
1317
+ icon: 'speech_bubble'
1311
1318
  }
1312
1319
  ]
1313
1320
  }
@@ -217,4 +217,14 @@ export class Utils {
217
217
  sortItems(items, options) {
218
218
  return sortItems(items, options);
219
219
  }
220
+
221
+ debounce(func, delay) {
222
+ let timeoutId;
223
+ return function (...args) {
224
+ clearTimeout(timeoutId);
225
+ timeoutId = setTimeout(() => {
226
+ func.apply(this, args);
227
+ }, delay);
228
+ };
229
+ }
220
230
  }
package/GUDHUB/gudhub.js CHANGED
@@ -152,6 +152,11 @@ export class GudHub {
152
152
  );
153
153
  }
154
154
 
155
+ //============ DEBOUNCE ========//
156
+ debounce(func, delay) {
157
+ return this.util.debounce(func, delay);
158
+ }
159
+
155
160
  //************************* WEBSOCKETS EMITTER ****************************//
156
161
 
157
162
  emitToUser(user_id, data) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gudhub/core",
3
- "version": "1.1.83",
3
+ "version": "1.1.85",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {