diff --git a/plugins/permission-common/api-report.md b/plugins/permission-common/api-report.md index 001ba53f3a..07c1904183 100644 --- a/plugins/permission-common/api-report.md +++ b/plugins/permission-common/api-report.md @@ -72,14 +72,7 @@ export type EvaluatePermissionRequestBatch = PermissionMessageBatch; // @public -export type EvaluatePermissionResponse = - | { - result: AuthorizeResult.ALLOW | AuthorizeResult.DENY; - } - | { - result: AuthorizeResult.CONDITIONAL; - conditions: PermissionCriteria; - }; +export type EvaluatePermissionResponse = PolicyDecision; // @public export type EvaluatePermissionResponseBatch = diff --git a/plugins/permission-common/src/types/api.ts b/plugins/permission-common/src/types/api.ts index f8537f5d45..66693ccf1b 100644 --- a/plugins/permission-common/src/types/api.ts +++ b/plugins/permission-common/src/types/api.ts @@ -161,14 +161,16 @@ export type EvaluatePermissionRequestBatch = /** * An individual response from the permission backend. + * + * @remarks + * + * This response type is an alias of {@link PolicyDecision} to maintain separation between the + * {@link @backstage/plugin-permission-node#PermissionPolicy} interface and the permission backend + * api. They may diverge at some point in the future. The response + * * @public */ -export type EvaluatePermissionResponse = - | { result: AuthorizeResult.ALLOW | AuthorizeResult.DENY } - | { - result: AuthorizeResult.CONDITIONAL; - conditions: PermissionCriteria; - }; +export type EvaluatePermissionResponse = PolicyDecision; /** * A batch of responses from the permission backend.