import { JurisdictionDomainModel } from '@mds-core/mds-jurisdiction-service' ; import { JurisdictionApiResponse } from '../@types' ; export const HasJurisdictionClaim = < TBody extends { } > ( res ) => ( jurisdiction ) : boolean => res . locals . scopes . includes ( 'jurisdictions:read' ) || ( res . locals . claims ?. jurisdictions ?. split ( ' ' ) ?? [ ] ) . includes ( jurisdiction . agency_key ) ;