italia / verificac19-sdk

✅ Official VerificaC19 Node.js SDK
MIT License
49 stars 17 forks source link

Hardcoded check for San Marino #13

Closed qippur closed 2 years ago

qippur commented 2 years ago

Issue content

@astagi ,

validator.js has this hardcoded check (below), which is not dependent on the settings file that can be downloaded from dgc official site, nor can be found in any of the files that can be cached by the library:

 72     if (type === 'Sputnik-V' && last.countryOfVaccination !== 'SM') {
 73       return {
 74         code: NOT_VALID,
 75         message: 'Vaccine Sputnik-V is valid only in San Marino',
 76       };
 77     }

Is there a place where all these special rules are listed (and maybe can also be downloaded like the settings file)?

Thank you.

astagi commented 2 years ago

Hi @qippur unfortunately not, this is something that will be implemented in business rules. At the moment Italy is not using business rules to verify DCCs so we're forced to use settings + hardcoded values.