Skip to content

Commit eda21fe

Browse files
Merge pull request #45 from myDevicesIoT/feat/search-rules-with-filters
feat: searchRulesWithFilters
2 parents f64142d + 6433a9a commit eda21fe

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

lib/Services/executor.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,20 @@ class Executor extends Request {
4444
return this.send('GET', path, { query });
4545
}
4646

47+
/**
48+
* @param {string} applicationId
49+
* @param {string} userId
50+
* @param {string[]} ruleIds
51+
* @param {Object} query
52+
*/
53+
searchRulesWithFilters(applicationId, userId, ruleIds, query, order) {
54+
const path = `/rules/search`;
55+
const payload = { rule_ids: ruleIds, order };
56+
query = this.setTenant(applicationId, userId, query);
57+
58+
return this.send('POST', path, { payload, query });
59+
}
60+
4761
/**
4862
* @param {string} applicationId
4963
* @param {string} userId

0 commit comments

Comments
 (0)