Added support for query parameters to filter rule revisions. It's fully backwards compatible and should not affect any current usages without query parameters. Closes #64
Related Issue
64
Motivation and Context
The Reactor API supports filtering revisions, but that functionality has not been built into the JavaScript SDK yet. This adds support for rules, but support for filtering other resource revisions needs to be added as well. Ticket for that here:
How Has This Been Tested?
I wrote an integration test to filter on rule revisions. I also manually tested using the below code to test against multiple rules on a property.
let rulesForProperty = await reactor.listRulesForProperty(propertyId);
for (let rule of rulesForProperty.data) {
await reactor.listRevisionsForRule(
rule.id,
{'filter[published]': 'EQ true'}
).then(revisionList => {
revisionList.data.map(ruleRevision => {
console.log(`${ruleRevision.attributes.name}: `, ruleRevision);
});
});
};
I swapped out what was being filtered to test multiple attributes.
Screenshots (if appropriate):
Types of changes
[ ] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)
Description
Added support for query parameters to filter rule revisions. It's fully backwards compatible and should not affect any current usages without query parameters. Closes #64
Related Issue
64
Motivation and Context
The Reactor API supports filtering revisions, but that functionality has not been built into the JavaScript SDK yet. This adds support for rules, but support for filtering other resource revisions needs to be added as well. Ticket for that here:
How Has This Been Tested?
I wrote an integration test to filter on rule revisions. I also manually tested using the below code to test against multiple rules on a property.
I swapped out what was being filtered to test multiple attributes.
Screenshots (if appropriate):
Types of changes
Checklist: