{"_id":"@digigov-oss/medcert","_rev":"2-0f519bf345c40bc7c982be76de792f6d","name":"@digigov-oss/medcert","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.1":{"name":"@digigov-oss/medcert","version":"1.0.1","type":"module","description":"Client for IDIKA medcert service","engines":{"node":">=16.13.1"},"author":{"name":"Panagiotis Skarvelis","email":"pskarvelis@admin.grnet.gr"},"dependencies":{"axios":"^0.25.0","moment":"^2.29.1"},"repository":{"type":"git","url":"git+https://gitlab.grnet.gr/digigov-oss/medcert.git"},"main":"dist/cjs/index.js","module":"dist/esm/index.js","exports":{".":{"import":"./dist/esm/index.js","require":"./dist/cjs/index.js"}},"scripts":{"test":"node --experimental-specifier-resolution=node --experimental-modules --no-warnings --loader ts-node/esm ./test/test.ts","testesm":"node --experimental-json-modules --no-warnings ./test/test.mjs","testcjs":"node ./test/test.cjs","build":"rm -fr dist/* && tsc -p tsconfig.json && tsc -p tsconfig.commonjs.json && ./setType.sh"},"eslintConfig":{"parser":"@typescript-eslint/parser","plugins":["@typescript-eslint"],"extends":["eslint:recommended","plugin:@typescript-eslint/recommended","plugin:@typescript-eslint/recommended-requiring-type-checking"],"parserOptions":{"project":"./tsconfig.json"},"rules":{"max-len":["error",{"code":100}],"no-console":1,"no-extra-boolean-cast":0,"@typescript-eslint/restrict-plus-operands":0,"@typescript-eslint/explicit-module-boundary-types":0,"@typescript-eslint/no-explicit-any":0,"@typescript-eslint/no-floating-promises":0,"@typescript-eslint/no-unsafe-member-access":0,"@typescript-eslint/no-unsafe-assignment":0}},"eslintIgnore":[],"keywords":["gsis","idika","data2amka"],"licenses":[{"type":"MIT","url":"http://en.wikipedia.org/wiki/MIT_License"}],"devDependencies":{"@types/node":"^16.9.0","ts-node":"^10.4.0","tsconfig-paths":"^3.12.0","typescript":"^4.5.4"},"bugs":{"url":"https://gitlab.grnet.gr/digigov-oss/medcert/-/issues"},"homepage":"https://gitlab.grnet.gr/digigov-oss/medcert/-/blob/main/README.md","license":"MIT","_id":"@digigov-oss/medcert@1.0.1","dist":{"shasum":"3bd3a1db93a6baa11a2d1475cdfeab0a4ecea688","integrity":"sha512-/mxvhKiT0BIgRL4zg0LOCbqqxgK2OQ+uRgcKXfmcJYu+8fkwFdwxsNL5uVAiYjBREOGsnK0c2EWI5iYPTltLwg==","tarball":"https://registry.npmjs.org/@digigov-oss/medcert/-/medcert-1.0.1.tgz","fileCount":26,"unpackedSize":24165,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiDj+KACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrpAA//aqknxo6XxIkGeqdrObR4mbndJ1Lkd4uStw6UnHX0TPCtlB+T\r\n+Gmu52E0YLnZ78ZwDwHNUQ02ZwE7xqh7hBwKh8ANYDQgebZS+eOvSDj6TSOQ\r\nAayk2xfS1QPRBd5/YIpbrxAnU7poda19evLT361wlohrLvox8BcTutdnfEHy\r\nTu+k1ft5MkbkcpQNSSNMVljkENdIoF+ImWZmJUT1hsbgTpTbNQpfVeZZWBEE\r\ncyvjglJ7qOdiXk9sbeBNWjUWepLyuXxmhLXH9dGNi8ish1aaLTv+rh9wv1+M\r\n47irMLYOix9YsNireAbmknoI1L/DDyKCq5aWZLHcBVM87mSP6/58xy0gUq5u\r\nBp1sGwagQphtn4ek37/pRKqoCY4ydUBq4FMEtCUdiJWH3udolt0zXPteBBhj\r\nQ0KBxT9V23qUpdJoF1pbDk/gzTVlb1gMQSXq2yWVFlvXE5TVwkwlLXmgXzKe\r\nOR9CaVbyzzMcJ1BjriHXxc4bmUvolby1JBZMrtG4dBj/mk8WGu+RQEf81oNC\r\nz2T7KbCFLhlQ8FtYZHplgt1jqLvtp14BoPBa225kPZ/S8L5a3H1HYVC9VF4u\r\nKOxQ/xRtazaiZkiF1coAvNIdmzZOCr4fQ/3m0L3ARSnGy+Gu/GZY5/4QPFRV\r\nwXZL4G/72dsVbuuXaEsE9QDasJlIKwI+bSU=\r\n=mVJT\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDv8UR3yMkMb3WunOS2n/ILXkA+hVHY5rVpIntoC3g1ygIgbQfKJCKcuMOW0iL2t+dymWj7LjLhzDGl0QndJ4b5XkU="}]},"_npmUser":{"name":"pskarvelis","email":"pskarvelis@admin.grnet.gr"},"directories":{},"maintainers":[{"name":"dmichail","email":"dimitrios.michail@gmail.com"},{"name":"pskarvelis","email":"pskarvelis@admin.grnet.gr"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/medcert_1.0.1_1645100938664_0.6433815060308721"},"_hasShrinkwrap":false}},"time":{"created":"2022-02-17T12:28:58.583Z","1.0.1":"2022-02-17T12:28:58.828Z","modified":"2022-11-02T10:53:41.776Z"},"maintainers":[{"email":"dmassaad@admin.grnet.gr","name":"dmassaad-grnet"},{"email":"dimitrios.michail@gmail.com","name":"dmichail"},{"email":"pskarvelis@admin.grnet.gr","name":"pskarvelis"}],"description":"Client for IDIKA medcert service","homepage":"https://gitlab.grnet.gr/digigov-oss/medcert/-/blob/main/README.md","keywords":["gsis","idika","data2amka"],"repository":{"type":"git","url":"git+https://gitlab.grnet.gr/digigov-oss/medcert.git"},"author":{"name":"Panagiotis Skarvelis","email":"pskarvelis@admin.grnet.gr"},"bugs":{"url":"https://gitlab.grnet.gr/digigov-oss/medcert/-/issues"},"license":"MIT","readme":"# medcert\n\nThis service from IDIKA is outside of KED at the moment. It is used to get a medical certification of the person by amka.\n\n#### Usage\n```\nimport getCerts from '@digigov-oss/medcert';\nimport config from './config.json'; \n\n//If you ommit the application_date, the current date will be used.\nconst test = async () => {\n    try {\n        const data = await getCerts(\"15093103933\",config.user, config.pass);\n        return data;\n    } catch (error:any) {\n        console.log(error.message);\n    }\n}\n\ntest().then((certs) => { console.log('certificates',certs); });\n```\n#### Returns\n\nan object like the following:\n```\n{\n  certificates: [\n    {\n      speciality: 'Δερματολόγος',\n      insert_date: '2022-02-03 09:15:46.0',\n      result: 'ΙΚΑΝΟΣ-Η'\n    },\n    {\n      speciality: 'Παθολόγος',\n      insert_date: '2022-02-08 09:15:39.0',\n      result: 'ΙΚΑΝΟΣ-Η'\n    },\n    {\n      speciality: 'Ψυχίατρος',\n      insert_date: null,\n      result: 'Δεν βρέθηκε βεβαίωση'\n    }\n  ],\n  requestBody: { amka: '15093103933', application_date: '2022-02-11' }\n}\n```\nor an error object like the following:\n```\n{ error: 'Request failed with status code 401' }\n```\n\n\n ","readmeFilename":"README.md"}