import { Injectable } from '@nestjs/common' ; import { eidasCountryListData } from './data' ; import { IEidasCountryElement } from './interfaces' ; export interface EidasCountryServiceInterface { getListByIso ( availables ) : Promise < IEidasCountryElement [ ] > ; } @ Injectable ( ) export class EidasCountryService implements EidasCountryServiceInterface { param { string [ ] } availables returns { IEidasCountryElement [ ] } async getListByIso ( availables ) { return eidasCountryListData . filter ( ( { iso } ) => availables . includes ( iso ) ) ; } }