{"_id":"@digigov-oss/sms-sender-service-client","_rev":"1-9e80a985f3b1cd1398fcd52a5e35648e","name":"@digigov-oss/sms-sender-service-client","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.0":{"name":"@digigov-oss/sms-sender-service-client","version":"1.0.0","type":"module","description":"Client for SmsSenderService of KED","engines":{"node":">=16.13.1"},"author":{"name":"Dimitrios Michail","email":"michail@admin.grnet.gr"},"dependencies":{"@digigov-oss/gsis-audit-record-db":"^1.2.0","soap":"^0.43.0"},"repository":{"type":"git","url":"git+https://gitlab.grnet.gr/digigov-oss/smsSenderServiceClient.git"},"main":"dist/cjs/index.js","module":"dist/esm/index.js","exports":{".":{"import":"./dist/esm/index.js","require":"./dist/cjs/index.js"}},"directories":{"src":"src","test":"test"},"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","testPostgreSql":"node --experimental-specifier-resolution=node --experimental-modules --no-warnings --loader ts-node/esm ./test/testPostgreSql.ts","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","ked","sms","SmsSenderService"],"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/smsSenderServiceClient/-/issues"},"homepage":"https://gitlab.grnet.gr/digigov-oss/smsSenderServiceClient/-/blob/main/README.md","types":"./dist/cjs/index.d.ts","gitHead":"84c3c17a728ab70703aaeb1fdc48729d7ae4fc48","_id":"@digigov-oss/sms-sender-service-client@1.0.0","_nodeVersion":"16.14.0","_npmVersion":"8.3.1","dist":{"integrity":"sha512-hBbbJfvecQEX6BG0JbQb3500PoL5P1AL5a1PZau/Ao1AnFr7x0+RPWzQN5CU1tUMvrCKIlEejVERTGxPSmpNCA==","shasum":"309efc43f74a02d5604f851135c648dc7ce213dd","tarball":"https://registry.npmjs.org/@digigov-oss/sms-sender-service-client/-/sms-sender-service-client-1.0.0.tgz","fileCount":28,"unpackedSize":47413,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDiE3UT7PzLUCo+bVJyg5w/w/WLmDtaARVDet19euw8YAIgdIx14V5C2Xa3604HnUHb2Q/5vGrDtT4Zp/BGm/99Lzs="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj9yqXACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrWShAAjtSU6/8Ujr3pC3B5b2Xuw1qb2KrNeRTZNOpjbFyYntYg+4QX\r\nnHsKPATcJ+8E2QAaGat2MRTftwf2B/mB+IIj88TvJ67Ntwg++mKr4YbTUC5Y\r\nob+BvfzS5RFwObN1WuvbI5tspP0/F0NEhHfQHnpRgfg/66fGRJji1Obz8bLM\r\nCIluuIQKmdGrNeueiBusEX4NNNYInbKHLH9feQA/jYIZwuRfbPZ5zBpmnjgb\r\n8DaxXhJLOYscHNii+oFuZVsxYatwN5AlsHuUI0UJRB8Asw6YXqDjm/IWrb3Q\r\n4vxY8E9B0KG7SSAyXEhx5xEz2C3k+6O4woogUCv3oq1EzZkqfe78jMD/OPTv\r\nwRXya5JH+4nRH9BZYFR5BVlXXQblXWHiszz8F+V0vinWkwjdM19ydrp1OwIq\r\nk6Xx0ONQiIxfuHzNxuaHRq004fKpkfF44/kVaXuFn0b9woZwBTJdC1OAYKiy\r\n0D8kJvcgJa6e5qxWi3Hh/0ZmOL/VpB2p1EMPr3n5vIViOU35J/HLkt6HB+lU\r\nJNinCYjnrP8V/TRml4FAfJHaA2kmUGrRdFut0e4n9sv74V14WlQSCslXb7Ua\r\nBnihZ1OnTYLSdMtV16za96lqnfJbHYvolFJcM036YCRYPtBqlxVBvy94i7Ar\r\nR5xPVmYunier+rnketMzjduZ7VVi1wqb5Zo=\r\n=hWiW\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"dmichail","email":"dimitrios.michail@gmail.com"},"maintainers":[{"name":"dmassaad-grnet","email":"dmassaad@admin.grnet.gr"},{"name":"dmichail","email":"dimitrios.michail@gmail.com"},{"name":"pskarvelis","email":"pskarvelis@admin.grnet.gr"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sms-sender-service-client_1.0.0_1677142679223_0.7158663562807481"},"_hasShrinkwrap":false},"1.0.1":{"name":"@digigov-oss/sms-sender-service-client","version":"1.0.1","type":"module","description":"Client for SmsSenderService of KED","engines":{"node":">=16.13.1"},"author":{"name":"Dimitrios Michail","email":"michail@admin.grnet.gr"},"dependencies":{"@digigov-oss/gsis-audit-record-db":"^1.2.0","axios":"^1.6.2","soap":"^0.45.0"},"repository":{"type":"git","url":"git+https://gitlab.grnet.gr/digigov-oss/smsSenderServiceClient.git"},"main":"dist/cjs/index.js","module":"dist/esm/index.js","exports":{".":{"import":"./dist/esm/index.js","require":"./dist/cjs/index.js"}},"directories":{"src":"src","test":"test"},"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","testPostgreSql":"node --experimental-specifier-resolution=node --experimental-modules --no-warnings --loader ts-node/esm ./test/testPostgreSql.ts","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","ked","sms","SmsSenderService"],"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/smsSenderServiceClient/-/issues"},"homepage":"https://gitlab.grnet.gr/digigov-oss/smsSenderServiceClient/-/blob/main/README.md","types":"./dist/cjs/index.d.ts","gitHead":"cb137d997bc9935bef06923ed10fdf9110bf708a","_id":"@digigov-oss/sms-sender-service-client@1.0.1","_nodeVersion":"16.18.0","_npmVersion":"8.19.2","dist":{"integrity":"sha512-vp02nNasTQ/1DKzyxaDflOnMMzi8aD/eQeO6CQGcmWk6gfeShuEqEBIdz63pDrArC3AsaHvbuEZMIytGt17qXg==","shasum":"a7198d22c7b1253ab6e142dfddaeb3a5c97e27be","tarball":"https://registry.npmjs.org/@digigov-oss/sms-sender-service-client/-/sms-sender-service-client-1.0.1.tgz","fileCount":28,"unpackedSize":47448,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCGI08D29qvQFeNL/EBjQbdvor8Z0+NH+L34Ub6QloSWgIgAwTn4eZ9Gpv0KJM2ROE34R44rR9bm+UoS/0EgiZgHNA="}]},"_npmUser":{"name":"dmichail","email":"dimitrios.michail@gmail.com"},"maintainers":[{"name":"dmassaad-grnet","email":"dmassaad@admin.grnet.gr"},{"name":"dmichail","email":"dimitrios.michail@gmail.com"},{"name":"pskarvelis","email":"pskarvelis@admin.grnet.gr"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sms-sender-service-client_1.0.1_1702364843467_0.4695187170460484"},"_hasShrinkwrap":false}},"time":{"created":"2023-02-23T08:57:59.128Z","1.0.0":"2023-02-23T08:57:59.397Z","modified":"2023-12-12T07:07:23.873Z","1.0.1":"2023-12-12T07:07:23.667Z"},"maintainers":[{"name":"dmassaad-grnet","email":"dmassaad@admin.grnet.gr"},{"name":"dmichail","email":"dimitrios.michail@gmail.com"},{"name":"pskarvelis","email":"pskarvelis@admin.grnet.gr"}],"description":"Client for SmsSenderService of KED","homepage":"https://gitlab.grnet.gr/digigov-oss/smsSenderServiceClient/-/blob/main/README.md","keywords":["gsis","ked","sms","SmsSenderService"],"repository":{"type":"git","url":"git+https://gitlab.grnet.gr/digigov-oss/smsSenderServiceClient.git"},"author":{"name":"Dimitrios Michail","email":"michail@admin.grnet.gr"},"bugs":{"url":"https://gitlab.grnet.gr/digigov-oss/smsSenderServiceClient/-/issues"},"readme":"# Client for Sms sender service of KED\n\nClient to connect to the SMS sender service, useful for nextjs/nodejs projects.\n\n#### Example:\n\n```\nimport sendSMSToMobile from '@digigov-oss/sms-sender-service-client';\n\nconst test = async () => {\n   const overrides = {\n        prod:false,\n        auditInit: {\n            auditUnit: 'grnet.gr',\n        },\n        auditStoragePath: '/auditStorage',\n    }\n\n    try {\n        const result = await sendSMSToMobile(\"accountAfm\", \"mobile\", \"message\", \"username\", \"password\",overrides);\n        return result;\n    } catch (error) {\n        console.log(error);\n    }\n}\n\ntest().then((x) => { console.log('response', x); });\n```\n\n-   you can use `overrides` to override the default values\n-   for your tests, you don't need to use the `overrides` mecahnism,in that case, the default storage path will be used ie `/tmp`\n-   look at [KED](https://www.gsis.gr/dimosia-dioikisi/ked/) standard guides for records you can use on auditInit\"\n    Also, you can use `overrides` to override the default storage engine.\n\n```\nimport sendSMSToMobile from '@digigov-oss/get-nnc-identity-Ext-client';\nimport {PostgreSqlEngine} from '@digigov-oss/gsis-audit-record-db';\n\nconst test = async () => {\n    try {\n        const overrides = {\n        auditEngine: new PostgreSqlEngine('postgres://postgres:postgres@localhost:5432/postgres'),\n        auditInit: {\n            auditUnit: 'grnet.gr',\n        },\n        }\n        const result = await sendSMSToMobile(\"accountAfm\", \"mobile\", \"message\", \"username\", \"password\",overrides);\n        return result;\n    } catch (error) {\n        console.log(error);\n    }\n}\n\ntest().then((x) => { console.log('response', x); });\n\n```\n\nLook at module [AuditRecordDB](https://gitlab.grnet.gr/digigov-oss/auditRecordDB/-/blob/main/README.md) for more details on how to use the AuditEngine.\n\nIf you plan to use only the `FileEngine`, you can skip the installation of other engines by ignoring optional dependencies.\ni.e.` yarn install --ignore-optional`\n\n#### Returns\n\nan object like the following:\n\n```\n{\n    status: '1',\n    message: 'Δοκιμαστικό μήνυμα\", \n    credits: '85'\n}\n```\n\nor an error message like:\n\n```\n{ message: 'Ο Α.Φ.Μ. δεν είναι καταχωρημένος' }\n```\n\n#### Available Mobile Numbers for testing:\n\n0000000000\n\n##### \\* Notes\n\nyou have to ask KED for smsSenderService_KED_v_0.91 documentation to get more info about the output and error fields.\n\n#### \\* known issues\n\nIf the endpoint is not correct, you can override it by setting the `endpoint` property on the `overrides` object.\n\n```\nconst overrides = {\n    endpoint: 'https://ked.gsis.gr/esb/...',\n}\n```\n","readmeFilename":"README.md"}