export interface Authorization {
  id: string;
  name: string;
}

export interface AuthorizationApiResponse {
  data: AuthorizationApiResponseData[];
}

export interface AuthorizationApiResponseData {
  id: string;
  name: string;
}

export function mapAuthorizationApiResponseToAuthorization(data: AuthorizationApiResponseData): Authorization {
  const { id, name } = data;
  return {
    id,
    name,
  };
}
