message: Fix IdentityPermissionApi typings
diff: @@ -19,6 +19,7 @@ import { PermissionApi } from './PermissionApi';
  import {
  EvaluatePermissionRequest,
  EvaluatePermissionResponse,
  + isResourcePermission,
  PermissionClient,
  } from '@backstage/plugin-permission-common';
  import { Config } from '@backstage/config';
  @@ -47,8 +48,21 @@ export class IdentityPermissionApi implements PermissionApi {
  async authorize(
  request: EvaluatePermissionRequest,
  ): Promise<EvaluatePermissionResponse> {
  + const { permission, resourceRef } = request;
  + if (isResourcePermission(permission)) {
  + if (!resourceRef) {
  + throw new Error(
  + 'A resourceRef should be provided when a ResourcePermission is used.',
  + );
  + }
  + const response = await this.permissionClient.authorize(
  + [{ permission, resourceRef }],
  + await this.identityApi.getCredentials(),
  + );
  + return response[0];
  + }
  const response = await this.permissionClient.authorize(
  - [request],
  + [{ permission }],
  await this.identityApi.getCredentials(),
  );
  return response[0];
  