From eff5c7f3c099c28b631725709e69902fb6773739 Mon Sep 17 00:00:00 2001 From: Kevin Leyow Date: Sun, 13 Jun 2021 14:44:21 -0500 Subject: [PATCH] feat: add endpoints for last stage of account linking (#849) * feat: add endpoints for last stage of account linking * chore: update comment * chore: resolve audit vulnerabilities --- audit-resolve.json | 28 ++++++--- package-lock.json | 128 ++++++++++++++---------------------------- package.json | 2 +- seeds/endpointType.js | 16 ++++++ 4 files changed, 78 insertions(+), 96 deletions(-) diff --git a/audit-resolve.json b/audit-resolve.json index 1ed22249c..bdba03c8c 100644 --- a/audit-resolve.json +++ b/audit-resolve.json @@ -97,8 +97,8 @@ }, "1500|@mojaloop/central-services-shared>widdershins>yargs>yargs-parser": { "decision": "ignore", - "madeAt": 1620636596190, - "expiresAt": 1623228560826 + "madeAt": 1623606400566, + "expiresAt": 1626198161510 }, "1594|@mojaloop/central-services-health>@mojaloop/central-services-shared>axios": { "decision": "ignore", @@ -187,8 +187,8 @@ }, "1675|@mojaloop/central-services-shared>shins>sanitize-html": { "decision": "ignore", - "madeAt": 1620636606023, - "expiresAt": 1623228560826 + "madeAt": 1623606402052, + "expiresAt": 1626198161510 }, "1676|@mojaloop/central-services-health>@mojaloop/central-services-shared>shins>sanitize-html": { "decision": "ignore", @@ -197,8 +197,8 @@ }, "1676|@mojaloop/central-services-shared>shins>sanitize-html": { "decision": "ignore", - "madeAt": 1620636606023, - "expiresAt": 1623228560826 + "madeAt": 1623606402052, + "expiresAt": 1626198161510 }, "1693|@mojaloop/central-services-health>@mojaloop/central-services-shared>shins>sanitize-html>postcss": { "decision": "ignore", @@ -207,8 +207,20 @@ }, "1693|@mojaloop/central-services-shared>shins>sanitize-html>postcss": { "decision": "ignore", - "madeAt": 1621957953345, - "expiresAt": 1622562734399 + "madeAt": 1623606403377, + "expiresAt": 1626198161510 + }, + "1751|require-glob>glob-parent": { + "decision": "fix", + "madeAt": 1623606347615 + }, + "1754|@mojaloop/central-services-shared>shins>cheerio>cheerio-select>css-select>css-what": { + "decision": "fix", + "madeAt": 1623606387347 + }, + "1754|@mojaloop/central-services-shared>shins>cheerio>cheerio-select>css-what": { + "decision": "fix", + "madeAt": 1623606387347 } }, "rules": {}, diff --git a/package-lock.json b/package-lock.json index bcf2fb79e..91144c055 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1441,7 +1441,6 @@ "version": "2.1.4", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.4.tgz", "integrity": "sha512-33g3pMJk3bg5nXbL/+CY6I2eJDzZAni49PfJnL5fghPTggPvBd/pFNSgJsdAgWptuFu7qq/ERvOYFlhvsLTCKA==", - "dev": true, "requires": { "@nodelib/fs.stat": "2.0.4", "run-parallel": "^1.1.9" @@ -1450,14 +1449,12 @@ "@nodelib/fs.stat": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.4.tgz", - "integrity": "sha512-IYlHJA0clt2+Vg7bccq+TzRdJvv19c2INqBSsoOLp1je7xjtr7J26+WXR72MCdvU9q1qTzIWDfhMf+DRvQJK4Q==", - "dev": true + "integrity": "sha512-IYlHJA0clt2+Vg7bccq+TzRdJvv19c2INqBSsoOLp1je7xjtr7J26+WXR72MCdvU9q1qTzIWDfhMf+DRvQJK4Q==" }, "@nodelib/fs.walk": { "version": "1.2.6", "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.6.tgz", "integrity": "sha512-8Broas6vTtW4GIXTAHDoE32hnN2M5ykgCpWGbuXHQ15vEMqr23pB76e/GZcYsZCHALv50ktd24qhEyKr6wBtow==", - "dev": true, "requires": { "@nodelib/fs.scandir": "2.1.4", "fastq": "^1.6.0" @@ -2090,17 +2087,9 @@ } }, "array-union": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", - "integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=", - "requires": { - "array-uniq": "^1.0.1" - } - }, - "array-uniq": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz", - "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=" + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==" }, "array.prototype.flat": { "version": "1.2.4", @@ -2609,7 +2598,6 @@ "version": "3.0.2", "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "dev": true, "requires": { "fill-range": "^7.0.1" } @@ -2767,9 +2755,9 @@ "integrity": "sha1-JtII6onje1y95gJQoV8DHBak1ms=" }, "callsites": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-1.0.1.tgz", - "integrity": "sha1-wUwkGIzo4dagMLTDyULmuolbaho=" + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==" }, "camelcase": { "version": "2.1.1", @@ -3676,9 +3664,9 @@ } }, "css-what": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/css-what/-/css-what-5.0.0.tgz", - "integrity": "sha512-qxyKHQvgKwzwDWC/rGbT821eJalfupxYW2qbSJSAtdSTimsr/MlaGONoNLllaUPZWf8QnbcKM/kPVYUQuEKAFA==" + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/css-what/-/css-what-5.0.1.tgz", + "integrity": "sha512-FYDTSHb/7KXsWICVsxdmiExPjCfRC4qRFBdVwv7Ax9hMnvMmEjP9RfxTEZ3qPZGmADDn2vAKSo9UcN1jKVYscg==" }, "currently-unhandled": { "version": "0.4.1", @@ -3901,7 +3889,6 @@ "version": "3.0.1", "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", - "dev": true, "requires": { "path-type": "^4.0.0" }, @@ -3909,8 +3896,7 @@ "path-type": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", - "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", - "dev": true + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==" } } }, @@ -5054,7 +5040,6 @@ "version": "3.2.5", "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.5.tgz", "integrity": "sha512-2DtFcgT68wiTTiwZ2hNdJfcHNke9XOfnwmBRWXhmeKM8rF0TGwmC/Qto3S7RoZKp5cilZbxzO5iTNTQsJ+EeDg==", - "dev": true, "requires": { "@nodelib/fs.stat": "^2.0.2", "@nodelib/fs.walk": "^1.2.3", @@ -5084,7 +5069,6 @@ "version": "1.11.0", "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.11.0.tgz", "integrity": "sha512-7Eczs8gIPDrVzT+EksYBcupqMyxSHXXrHOLRRxU2/DicV8789MRBRR8+Hc2uWzUupOs4YS4JzBmBxjjCVBxD/g==", - "dev": true, "requires": { "reusify": "^1.0.4" } @@ -5174,7 +5158,6 @@ "version": "7.0.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "dev": true, "requires": { "to-regex-range": "^5.0.1" } @@ -5882,22 +5865,16 @@ "dev": true }, "globby": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-6.1.0.tgz", - "integrity": "sha1-9abXDoOV4hyFj7BInWTfAkJNUGw=", - "requires": { - "array-union": "^1.0.1", - "glob": "^7.0.3", - "object-assign": "^4.0.1", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0" - }, - "dependencies": { - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=" - } + "version": "11.0.3", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.0.3.tgz", + "integrity": "sha512-ffdmosjA807y7+lA1NM0jELARVmYul/715xiILEjo3hBLPTcirgQNnXECn5g3mtR8TOLCVbkfua1Hpen25/Xcg==", + "requires": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.1.1", + "ignore": "^5.1.4", + "merge2": "^1.3.0", + "slash": "^3.0.0" } }, "got": { @@ -6394,8 +6371,7 @@ "ignore": { "version": "5.1.8", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.8.tgz", - "integrity": "sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw==", - "dev": true + "integrity": "sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw==" }, "ignore-by-default": { "version": "1.0.1", @@ -6667,8 +6643,7 @@ "is-number": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==" }, "is-number-object": { "version": "1.0.5", @@ -7906,8 +7881,7 @@ "merge2": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", - "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", - "dev": true + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==" }, "methods": { "version": "1.1.2", @@ -7918,7 +7892,6 @@ "version": "4.0.4", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.4.tgz", "integrity": "sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg==", - "dev": true, "requires": { "braces": "^3.0.1", "picomatch": "^2.2.3" @@ -9617,11 +9590,11 @@ } }, "parent-module": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-0.1.0.tgz", - "integrity": "sha1-tSkoY6HoxHbs+Ffn11yYkgskuKY=", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-2.0.0.tgz", + "integrity": "sha512-uo0Z9JJeWzv8BG+tRcapBKNJ0dro9cLyczGzulS6EfeyAdeC9sbojtW6XwvYxJkEne9En+J2XEl4zyglVeIwFg==", "requires": { - "callsites": "^1.0.0" + "callsites": "^3.1.0" } }, "parse-github-repo-url": { @@ -9673,11 +9646,6 @@ "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==" }, - "path-dirname": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz", - "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=" - }, "path-exists": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", @@ -10085,8 +10053,7 @@ "queue-microtask": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", - "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", - "dev": true + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==" }, "quick-lru": { "version": "4.0.1", @@ -10486,30 +10453,21 @@ "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==" }, "require-glob": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/require-glob/-/require-glob-3.2.0.tgz", - "integrity": "sha1-kL/iyO+0ufly65o/XlgIMuBPZNM=", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/require-glob/-/require-glob-4.0.0.tgz", + "integrity": "sha512-it036McAdNoDjFtq9ZcLy7dG42yMfm7d8MVm6yZVSiBt6gcGl4OcU3zpEPUrfoXZM60U6kwAYo1gfXMcNye6Bg==", "requires": { - "glob-parent": "^3.0.0", - "globby": "^6.0.0", - "parent-module": "^0.1.0" + "glob-parent": "^6.0.0", + "globby": "^11.0.3", + "parent-module": "^2.0.0" }, "dependencies": { "glob-parent": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", - "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", - "requires": { - "is-glob": "^3.1.0", - "path-dirname": "^1.0.0" - } - }, - "is-glob": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", - "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.0.tgz", + "integrity": "sha512-Hdd4287VEJcZXUwv1l8a+vXC1GjOQqXe+VS30w/ypihpcnu9M1n3xeYeJu5CBpeEQj2nAab2xxz28GuA3vp4Ww==", "requires": { - "is-extglob": "^2.1.0" + "is-glob": "^4.0.1" } } } @@ -10569,8 +10527,7 @@ "reusify": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", - "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", - "dev": true + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==" }, "right-align": { "version": "0.1.3", @@ -10593,7 +10550,6 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", - "dev": true, "requires": { "queue-microtask": "^1.2.2" } @@ -10953,8 +10909,7 @@ "slash": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", - "dev": true + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==" }, "slice-ansi": { "version": "2.1.0", @@ -12114,7 +12069,6 @@ "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, "requires": { "is-number": "^7.0.0" } diff --git a/package.json b/package.json index 9f16964e3..085e17f73 100644 --- a/package.json +++ b/package.json @@ -119,7 +119,7 @@ "mongoose": "5.12.11", "npm-run-all": "4.1.5", "rc": "1.2.8", - "require-glob": "3.2.0", + "require-glob": "^4.0.0", "uuid4": "2.0.2" }, "optionalDependencies": { diff --git a/seeds/endpointType.js b/seeds/endpointType.js index 6e1349929..520de9247 100644 --- a/seeds/endpointType.js +++ b/seeds/endpointType.js @@ -210,6 +210,10 @@ const endpointTypes = [ name: 'TP_CB_URL_CONSENT_PUT', description: 'Participant callback URL where PUT /consents/{ID} can be sent' }, + { + name: 'TP_CB_URL_CONSENT_PATCH', + description: 'Participant callback URL where PATCH /consents/{ID} can be sent' + }, { name: 'TP_CB_URL_CONSENT_PUT_ERROR', description: 'Participant callback URL where PUT /consents/{ID}/error error information can be sent' @@ -245,6 +249,18 @@ const endpointTypes = [ { name: 'TP_CB_URL_SERVICES_PUT_ERROR', description: 'Participant callback URL where PUT /services/{ServiceType}/error can be sent' + }, + { + name: 'TP_CB_URL_PARTICIPANT_TYPE_ID_POST', + description: 'Participant callback URL where POST /participants/{Type}/{ID} can be sent (specific to thirdparty flows)' + }, + { + name: 'TP_CB_URL_PARTICIPANT_TYPE_ID_PUT', + description: 'Participant callback URL where PUT /participants/{Type}/{ID} can be sent (specific to thirdparty flows)' + }, + { + name: 'TP_CB_URL_PARTICIPANT_TYPE_ID_PUT_ERROR', + description: 'Participant callback URL where PUT /participants/{Type}/{ID}/error can be sent (specific to thirdparty flows)' } ]