permission-node: expose ApplyConditionsResponse type

This type will be shared with the backend.

Signed-off-by: Mike Lewis <mtlewis@users.noreply.github.com>
This commit is contained in:
Mike Lewis
2021-11-22 13:06:39 +00:00
parent 3254303a96
commit 5bff67aac4
2 changed files with 15 additions and 0 deletions
@@ -61,6 +61,16 @@ export type ApplyConditionsRequest = {
conditions: PermissionCriteria<PermissionCondition>;
};
/**
* The result of applying the conditions, expressed as a definitive authorize
* result of ALLOW or DENY.
*
* @public
*/
export type ApplyConditionsResponse = {
result: AuthorizeResult.ALLOW | AuthorizeResult.DENY;
};
const applyConditions = <TResource>(
criteria: PermissionCriteria<PermissionCondition>,
resource: TResource,