Compare commits

...

7 Commits

Author SHA1 Message Date
920fb772f7 Merge pull request 'apifinal' (#8) from apifinal into main
Reviewed-on: #8
2022-01-20 14:21:05 +00:00
96f5296e3e apihitlog 2022-01-20 19:50:38 +05:30
9de189e18a apihitlog 2022-01-20 19:49:05 +05:30
65bb8a43e7 Merge pull request 'buy & sell W/O img edit' (#7) from apifinal into main
Reviewed-on: #7
2022-01-19 12:11:29 +00:00
55f5c22e4c buy & sell W/O img edit 2022-01-19 17:41:01 +05:30
90c1b4cbf5 Merge pull request 'Buy & Sell' (#5) from apifinal into main
Reviewed-on: #5
2022-01-17 13:50:22 +00:00
578d522f04 Buy & Sell 2022-01-17 19:19:47 +05:30
22 changed files with 1342 additions and 29 deletions

View File

@ -358,3 +358,8 @@ This is generated when user verify the otp...then check each and every process t
-->sent code 2 for no data & message
-->if no
-->show code is 2 for error & message is "this mobile number is register with another device please check"

View File

@ -1,4 +1,5 @@
var mysql = require('mysql');
var connection=mysql.createConnection({
host :process.env.DB_HOST,
user :process.env.DB_USER,
@ -15,4 +16,6 @@ connection.connect(function(error){
console.log("Database Connected...");
}
});
module.exports = connection;
module.exports = connection;

322
node_modules/.package-lock.json generated vendored
View File

@ -23,6 +23,25 @@
"node": ">=6"
}
},
"node_modules/@types/node": {
"version": "17.0.10",
"resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.10.tgz",
"integrity": "sha512-S/3xB4KzyFxYGCppyDt68yzBU9ysL88lSdIah4D6cptdcltc4NCPCAMc0+PCpg/lLIyC7IPvj2Z52OJWeIUkog=="
},
"node_modules/@types/webidl-conversions": {
"version": "6.1.1",
"resolved": "https://registry.npmjs.org/@types/webidl-conversions/-/webidl-conversions-6.1.1.tgz",
"integrity": "sha512-XAahCdThVuCFDQLT7R7Pk/vqeObFNL3YqRyFZg+AqAP/W1/w3xHaIxuW7WszQqTbIBOPRcItYJIou3i/mppu3Q=="
},
"node_modules/@types/whatwg-url": {
"version": "8.2.1",
"resolved": "https://registry.npmjs.org/@types/whatwg-url/-/whatwg-url-8.2.1.tgz",
"integrity": "sha512-2YubE1sjj5ifxievI5Ge1sckb9k/Er66HyR2c+3+I6VDUUg1TLPdYYTEbQ+DjRkS4nTxMJhgWfSfMRD2sl2EYQ==",
"dependencies": {
"@types/node": "*",
"@types/webidl-conversions": "*"
}
},
"node_modules/abbrev": {
"version": "1.1.1",
"dev": true,
@ -141,6 +160,25 @@
"dev": true,
"license": "MIT"
},
"node_modules/base64-js": {
"version": "1.5.1",
"resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz",
"integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==",
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/feross"
},
{
"type": "patreon",
"url": "https://www.patreon.com/feross"
},
{
"type": "consulting",
"url": "https://feross.org/support"
}
]
},
"node_modules/bcrypt-pbkdf": {
"version": "1.0.2",
"license": "BSD-3-Clause",
@ -223,6 +261,40 @@
"node": ">=8"
}
},
"node_modules/bson": {
"version": "4.6.1",
"resolved": "https://registry.npmjs.org/bson/-/bson-4.6.1.tgz",
"integrity": "sha512-I1LQ7Hz5zgwR4QquilLNZwbhPw0Apx7i7X9kGMBTsqPdml/03Q9NBtD9nt/19ahjlphktQImrnderxqpzeVDjw==",
"dependencies": {
"buffer": "^5.6.0"
},
"engines": {
"node": ">=6.9.0"
}
},
"node_modules/buffer": {
"version": "5.7.1",
"resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz",
"integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==",
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/feross"
},
{
"type": "patreon",
"url": "https://www.patreon.com/feross"
},
{
"type": "consulting",
"url": "https://feross.org/support"
}
],
"dependencies": {
"base64-js": "^1.3.1",
"ieee754": "^1.1.13"
}
},
"node_modules/buffer-equal-constant-time": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz",
@ -599,6 +671,14 @@
"node": ">=0.4.0"
}
},
"node_modules/denque": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/denque/-/denque-2.0.1.tgz",
"integrity": "sha512-tfiWc6BQLXNLpNiR5iGd0Ocu3P3VpxfzFiqubLgMfhfOw9WyvgJBd46CClNn9k3qfbjvT//0cf7AlYRX/OslMQ==",
"engines": {
"node": ">=0.10"
}
},
"node_modules/depd": {
"version": "1.1.2",
"license": "MIT",
@ -1037,6 +1117,25 @@
"node": ">=0.10.0"
}
},
"node_modules/ieee754": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz",
"integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==",
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/feross"
},
{
"type": "patreon",
"url": "https://www.patreon.com/feross"
},
{
"type": "consulting",
"url": "https://feross.org/support"
}
]
},
"node_modules/ignore-by-default": {
"version": "1.0.1",
"dev": true,
@ -1070,6 +1169,11 @@
"node": ">=10"
}
},
"node_modules/ip": {
"version": "1.1.5",
"resolved": "https://registry.npmjs.org/ip/-/ip-1.1.5.tgz",
"integrity": "sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo="
},
"node_modules/ipaddr.js": {
"version": "1.9.1",
"license": "MIT",
@ -1277,6 +1381,11 @@
"safe-buffer": "^5.0.1"
}
},
"node_modules/kareem": {
"version": "2.3.3",
"resolved": "https://registry.npmjs.org/kareem/-/kareem-2.3.3.tgz",
"integrity": "sha512-uESCXM2KdtOQ8LOvKyTUXEeg0MkYp4wGglTIpGcYHvjJcS5sn2Wkfrfit8m4xSbaNDAw2KdI9elgkOxZbrFYbg=="
},
"node_modules/keyv": {
"version": "3.1.0",
"dev": true,
@ -1389,6 +1498,12 @@
"node": ">= 0.6"
}
},
"node_modules/memory-pager": {
"version": "1.5.0",
"resolved": "https://registry.npmjs.org/memory-pager/-/memory-pager-1.5.0.tgz",
"integrity": "sha512-ZS4Bp4r/Zoeq6+NLJpP+0Zzm0pR8whtGPf1XExKLJBAczGMnSi3It14OiNCStjQjM6NU1okjQGSxgEZN8eBYKg==",
"optional": true
},
"node_modules/merge-descriptors": {
"version": "1.0.1",
"license": "MIT"
@ -1460,6 +1575,124 @@
"mkdirp": "bin/cmd.js"
}
},
"node_modules/mongodb": {
"version": "4.3.1",
"resolved": "https://registry.npmjs.org/mongodb/-/mongodb-4.3.1.tgz",
"integrity": "sha512-sNa8APSIk+r4x31ZwctKjuPSaeKuvUeNb/fu/3B6dRM02HpEgig7hTHM8A/PJQTlxuC/KFWlDlQjhsk/S43tBg==",
"dependencies": {
"bson": "^4.6.1",
"denque": "^2.0.1",
"mongodb-connection-string-url": "^2.4.1",
"socks": "^2.6.1"
},
"engines": {
"node": ">=12.9.0"
},
"optionalDependencies": {
"saslprep": "^1.0.3"
}
},
"node_modules/mongodb-connection-string-url": {
"version": "2.4.1",
"resolved": "https://registry.npmjs.org/mongodb-connection-string-url/-/mongodb-connection-string-url-2.4.1.tgz",
"integrity": "sha512-d5Kd2bVsKcSA7YI/yo57fSTtMwRQdFkvc5IZwod1RRxJtECeWPPSo7zqcUGJELifRA//Igs4spVtYAmvFCatug==",
"dependencies": {
"@types/whatwg-url": "^8.2.1",
"whatwg-url": "^11.0.0"
}
},
"node_modules/mongoose": {
"version": "6.1.7",
"resolved": "https://registry.npmjs.org/mongoose/-/mongoose-6.1.7.tgz",
"integrity": "sha512-GqU/G/5yu/CWBHdW24cfGPsW4rADER+eeXj+bwvb6mLjg6uAASl8GnE6pmEbafZJ4Uv9V7jf5LaBMJMNwvQEtg==",
"dependencies": {
"@types/node": "< 17.0.6",
"bson": "^4.2.2",
"kareem": "2.3.3",
"mongodb": "4.2.2",
"mpath": "0.8.4",
"mquery": "4.0.0",
"ms": "2.1.2",
"regexp-clone": "1.0.0",
"sift": "13.5.2",
"sliced": "1.0.1"
},
"engines": {
"node": ">=12.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/mongoose"
}
},
"node_modules/mongoose/node_modules/@types/node": {
"version": "17.0.5",
"resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.5.tgz",
"integrity": "sha512-w3mrvNXLeDYV1GKTZorGJQivK6XLCoGwpnyJFbJVK/aTBQUxOCaa/GlFAAN3OTDFcb7h5tiFG+YXCO2By+riZw=="
},
"node_modules/mongoose/node_modules/mongodb": {
"version": "4.2.2",
"resolved": "https://registry.npmjs.org/mongodb/-/mongodb-4.2.2.tgz",
"integrity": "sha512-zt8rCTnTKyMQppyt63qMnrLM5dbADgUk18ORPF1XbtHLIYCyc9hattaYHi0pqMvNxDpgGgUofSVzS+UQErgTug==",
"dependencies": {
"bson": "^4.6.0",
"denque": "^2.0.1",
"mongodb-connection-string-url": "^2.3.2"
},
"engines": {
"node": ">=12.9.0"
},
"optionalDependencies": {
"saslprep": "^1.0.3"
}
},
"node_modules/mongoose/node_modules/ms": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
},
"node_modules/mpath": {
"version": "0.8.4",
"resolved": "https://registry.npmjs.org/mpath/-/mpath-0.8.4.tgz",
"integrity": "sha512-DTxNZomBcTWlrMW76jy1wvV37X/cNNxPW1y2Jzd4DZkAaC5ZGsm8bfGfNOthcDuRJujXLqiuS6o3Tpy0JEoh7g==",
"engines": {
"node": ">=4.0.0"
}
},
"node_modules/mquery": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/mquery/-/mquery-4.0.0.tgz",
"integrity": "sha512-nGjm89lHja+T/b8cybAby6H0YgA4qYC/lx6UlwvHGqvTq8bDaNeCwl1sY8uRELrNbVWJzIihxVd+vphGGn1vBw==",
"dependencies": {
"debug": "4.x",
"regexp-clone": "^1.0.0",
"sliced": "1.0.1"
},
"engines": {
"node": ">=12.0.0"
}
},
"node_modules/mquery/node_modules/debug": {
"version": "4.3.3",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz",
"integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==",
"dependencies": {
"ms": "2.1.2"
},
"engines": {
"node": ">=6.0"
},
"peerDependenciesMeta": {
"supports-color": {
"optional": true
}
}
},
"node_modules/mquery/node_modules/ms": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
},
"node_modules/ms": {
"version": "2.0.0",
"license": "MIT"
@ -1827,6 +2060,11 @@
"node": ">=8.10.0"
}
},
"node_modules/regexp-clone": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/regexp-clone/-/regexp-clone-1.0.0.tgz",
"integrity": "sha512-TuAasHQNamyyJ2hb97IuBEif4qBHGjPHBS64sZwytpLEqtBQ1gPJTnOaQ6qmpET16cK14kkjbazl6+p0RRv0yw=="
},
"node_modules/registry-auth-token": {
"version": "4.2.1",
"dev": true,
@ -1901,6 +2139,18 @@
"version": "2.1.2",
"license": "MIT"
},
"node_modules/saslprep": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/saslprep/-/saslprep-1.0.3.tgz",
"integrity": "sha512-/MY/PEMbk2SuY5sScONwhUDsV2p77Znkb/q3nSVstq/yQzYJOH/Azh29p9oJLsl3LnQwSvZDKagDGBsBwSooag==",
"optional": true,
"dependencies": {
"sparse-bitfield": "^3.0.3"
},
"engines": {
"node": ">=6"
}
},
"node_modules/semver": {
"version": "5.7.1",
"license": "ISC",
@ -1977,11 +2227,52 @@
"version": "1.1.1",
"license": "ISC"
},
"node_modules/sift": {
"version": "13.5.2",
"resolved": "https://registry.npmjs.org/sift/-/sift-13.5.2.tgz",
"integrity": "sha512-+gxdEOMA2J+AI+fVsCqeNn7Tgx3M9ZN9jdi95939l1IJ8cZsqS8sqpJyOkic2SJk+1+98Uwryt/gL6XDaV+UZA=="
},
"node_modules/signal-exit": {
"version": "3.0.6",
"dev": true,
"license": "ISC"
},
"node_modules/sliced": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/sliced/-/sliced-1.0.1.tgz",
"integrity": "sha1-CzpmK10Ewxd7GSa+qCsD+Dei70E="
},
"node_modules/smart-buffer": {
"version": "4.2.0",
"resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz",
"integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==",
"engines": {
"node": ">= 6.0.0",
"npm": ">= 3.0.0"
}
},
"node_modules/socks": {
"version": "2.6.1",
"resolved": "https://registry.npmjs.org/socks/-/socks-2.6.1.tgz",
"integrity": "sha512-kLQ9N5ucj8uIcxrDwjm0Jsqk06xdpBjGNQtpXy4Q8/QY2k+fY7nZH8CARy+hkbG+SGAovmzzuauCpBlb8FrnBA==",
"dependencies": {
"ip": "^1.1.5",
"smart-buffer": "^4.1.0"
},
"engines": {
"node": ">= 10.13.0",
"npm": ">= 3.0.0"
}
},
"node_modules/sparse-bitfield": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/sparse-bitfield/-/sparse-bitfield-3.0.3.tgz",
"integrity": "sha1-/0rm5oZWBWuks+eSqzM004JzyhE=",
"optional": true,
"dependencies": {
"memory-pager": "^1.0.2"
}
},
"node_modules/sqlstring": {
"version": "2.3.1",
"license": "MIT",
@ -2123,6 +2414,17 @@
"node": ">=0.8"
}
},
"node_modules/tr46": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/tr46/-/tr46-3.0.0.tgz",
"integrity": "sha512-l7FvfAHlcmulp8kr+flpQZmVwtu7nfRV7NZujtN0OqES8EL4O4e0qqzL0DC5gAvx/ZC/9lk6rhcUwYvkBnBnYA==",
"dependencies": {
"punycode": "^2.1.1"
},
"engines": {
"node": ">=12"
}
},
"node_modules/tunnel-agent": {
"version": "0.6.0",
"license": "Apache-2.0",
@ -2311,6 +2613,26 @@
"version": "1.0.2",
"license": "MIT"
},
"node_modules/webidl-conversions": {
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz",
"integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==",
"engines": {
"node": ">=12"
}
},
"node_modules/whatwg-url": {
"version": "11.0.0",
"resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-11.0.0.tgz",
"integrity": "sha512-RKT8HExMpoYx4igMiVMY83lN6UeITKJlBQ+vR/8ZJ8OCdSiN3RwCq+9gH0+Xzj0+5IrM6i4j/6LuvzbZIQgEcQ==",
"dependencies": {
"tr46": "^3.0.0",
"webidl-conversions": "^7.0.0"
},
"engines": {
"node": ">=12"
}
},
"node_modules/widest-line": {
"version": "3.1.0",
"dev": true,

551
package-lock.json generated
View File

@ -21,6 +21,8 @@
"https": "^1.0.0",
"jsonwebtoken": "^8.5.1",
"md5": "^2.3.0",
"mongodb": "^4.3.1",
"mongoose": "^6.1.7",
"msg91": "^0.0.6",
"msg91-sms": "^1.0.1",
"multer": "^1.4.3",
@ -52,6 +54,25 @@
"node": ">=6"
}
},
"node_modules/@types/node": {
"version": "17.0.10",
"resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.10.tgz",
"integrity": "sha512-S/3xB4KzyFxYGCppyDt68yzBU9ysL88lSdIah4D6cptdcltc4NCPCAMc0+PCpg/lLIyC7IPvj2Z52OJWeIUkog=="
},
"node_modules/@types/webidl-conversions": {
"version": "6.1.1",
"resolved": "https://registry.npmjs.org/@types/webidl-conversions/-/webidl-conversions-6.1.1.tgz",
"integrity": "sha512-XAahCdThVuCFDQLT7R7Pk/vqeObFNL3YqRyFZg+AqAP/W1/w3xHaIxuW7WszQqTbIBOPRcItYJIou3i/mppu3Q=="
},
"node_modules/@types/whatwg-url": {
"version": "8.2.1",
"resolved": "https://registry.npmjs.org/@types/whatwg-url/-/whatwg-url-8.2.1.tgz",
"integrity": "sha512-2YubE1sjj5ifxievI5Ge1sckb9k/Er66HyR2c+3+I6VDUUg1TLPdYYTEbQ+DjRkS4nTxMJhgWfSfMRD2sl2EYQ==",
"dependencies": {
"@types/node": "*",
"@types/webidl-conversions": "*"
}
},
"node_modules/abbrev": {
"version": "1.1.1",
"dev": true,
@ -170,6 +191,25 @@
"dev": true,
"license": "MIT"
},
"node_modules/base64-js": {
"version": "1.5.1",
"resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz",
"integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==",
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/feross"
},
{
"type": "patreon",
"url": "https://www.patreon.com/feross"
},
{
"type": "consulting",
"url": "https://feross.org/support"
}
]
},
"node_modules/bcrypt-pbkdf": {
"version": "1.0.2",
"license": "BSD-3-Clause",
@ -252,6 +292,40 @@
"node": ">=8"
}
},
"node_modules/bson": {
"version": "4.6.1",
"resolved": "https://registry.npmjs.org/bson/-/bson-4.6.1.tgz",
"integrity": "sha512-I1LQ7Hz5zgwR4QquilLNZwbhPw0Apx7i7X9kGMBTsqPdml/03Q9NBtD9nt/19ahjlphktQImrnderxqpzeVDjw==",
"dependencies": {
"buffer": "^5.6.0"
},
"engines": {
"node": ">=6.9.0"
}
},
"node_modules/buffer": {
"version": "5.7.1",
"resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz",
"integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==",
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/feross"
},
{
"type": "patreon",
"url": "https://www.patreon.com/feross"
},
{
"type": "consulting",
"url": "https://feross.org/support"
}
],
"dependencies": {
"base64-js": "^1.3.1",
"ieee754": "^1.1.13"
}
},
"node_modules/buffer-equal-constant-time": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz",
@ -628,6 +702,14 @@
"node": ">=0.4.0"
}
},
"node_modules/denque": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/denque/-/denque-2.0.1.tgz",
"integrity": "sha512-tfiWc6BQLXNLpNiR5iGd0Ocu3P3VpxfzFiqubLgMfhfOw9WyvgJBd46CClNn9k3qfbjvT//0cf7AlYRX/OslMQ==",
"engines": {
"node": ">=0.10"
}
},
"node_modules/depd": {
"version": "1.1.2",
"license": "MIT",
@ -1066,6 +1148,25 @@
"node": ">=0.10.0"
}
},
"node_modules/ieee754": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz",
"integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==",
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/feross"
},
{
"type": "patreon",
"url": "https://www.patreon.com/feross"
},
{
"type": "consulting",
"url": "https://feross.org/support"
}
]
},
"node_modules/ignore-by-default": {
"version": "1.0.1",
"dev": true,
@ -1099,6 +1200,11 @@
"node": ">=10"
}
},
"node_modules/ip": {
"version": "1.1.5",
"resolved": "https://registry.npmjs.org/ip/-/ip-1.1.5.tgz",
"integrity": "sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo="
},
"node_modules/ipaddr.js": {
"version": "1.9.1",
"license": "MIT",
@ -1306,6 +1412,11 @@
"safe-buffer": "^5.0.1"
}
},
"node_modules/kareem": {
"version": "2.3.3",
"resolved": "https://registry.npmjs.org/kareem/-/kareem-2.3.3.tgz",
"integrity": "sha512-uESCXM2KdtOQ8LOvKyTUXEeg0MkYp4wGglTIpGcYHvjJcS5sn2Wkfrfit8m4xSbaNDAw2KdI9elgkOxZbrFYbg=="
},
"node_modules/keyv": {
"version": "3.1.0",
"dev": true,
@ -1418,6 +1529,12 @@
"node": ">= 0.6"
}
},
"node_modules/memory-pager": {
"version": "1.5.0",
"resolved": "https://registry.npmjs.org/memory-pager/-/memory-pager-1.5.0.tgz",
"integrity": "sha512-ZS4Bp4r/Zoeq6+NLJpP+0Zzm0pR8whtGPf1XExKLJBAczGMnSi3It14OiNCStjQjM6NU1okjQGSxgEZN8eBYKg==",
"optional": true
},
"node_modules/merge-descriptors": {
"version": "1.0.1",
"license": "MIT"
@ -1489,6 +1606,124 @@
"mkdirp": "bin/cmd.js"
}
},
"node_modules/mongodb": {
"version": "4.3.1",
"resolved": "https://registry.npmjs.org/mongodb/-/mongodb-4.3.1.tgz",
"integrity": "sha512-sNa8APSIk+r4x31ZwctKjuPSaeKuvUeNb/fu/3B6dRM02HpEgig7hTHM8A/PJQTlxuC/KFWlDlQjhsk/S43tBg==",
"dependencies": {
"bson": "^4.6.1",
"denque": "^2.0.1",
"mongodb-connection-string-url": "^2.4.1",
"socks": "^2.6.1"
},
"engines": {
"node": ">=12.9.0"
},
"optionalDependencies": {
"saslprep": "^1.0.3"
}
},
"node_modules/mongodb-connection-string-url": {
"version": "2.4.1",
"resolved": "https://registry.npmjs.org/mongodb-connection-string-url/-/mongodb-connection-string-url-2.4.1.tgz",
"integrity": "sha512-d5Kd2bVsKcSA7YI/yo57fSTtMwRQdFkvc5IZwod1RRxJtECeWPPSo7zqcUGJELifRA//Igs4spVtYAmvFCatug==",
"dependencies": {
"@types/whatwg-url": "^8.2.1",
"whatwg-url": "^11.0.0"
}
},
"node_modules/mongoose": {
"version": "6.1.7",
"resolved": "https://registry.npmjs.org/mongoose/-/mongoose-6.1.7.tgz",
"integrity": "sha512-GqU/G/5yu/CWBHdW24cfGPsW4rADER+eeXj+bwvb6mLjg6uAASl8GnE6pmEbafZJ4Uv9V7jf5LaBMJMNwvQEtg==",
"dependencies": {
"@types/node": "< 17.0.6",
"bson": "^4.2.2",
"kareem": "2.3.3",
"mongodb": "4.2.2",
"mpath": "0.8.4",
"mquery": "4.0.0",
"ms": "2.1.2",
"regexp-clone": "1.0.0",
"sift": "13.5.2",
"sliced": "1.0.1"
},
"engines": {
"node": ">=12.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/mongoose"
}
},
"node_modules/mongoose/node_modules/@types/node": {
"version": "17.0.5",
"resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.5.tgz",
"integrity": "sha512-w3mrvNXLeDYV1GKTZorGJQivK6XLCoGwpnyJFbJVK/aTBQUxOCaa/GlFAAN3OTDFcb7h5tiFG+YXCO2By+riZw=="
},
"node_modules/mongoose/node_modules/mongodb": {
"version": "4.2.2",
"resolved": "https://registry.npmjs.org/mongodb/-/mongodb-4.2.2.tgz",
"integrity": "sha512-zt8rCTnTKyMQppyt63qMnrLM5dbADgUk18ORPF1XbtHLIYCyc9hattaYHi0pqMvNxDpgGgUofSVzS+UQErgTug==",
"dependencies": {
"bson": "^4.6.0",
"denque": "^2.0.1",
"mongodb-connection-string-url": "^2.3.2"
},
"engines": {
"node": ">=12.9.0"
},
"optionalDependencies": {
"saslprep": "^1.0.3"
}
},
"node_modules/mongoose/node_modules/ms": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
},
"node_modules/mpath": {
"version": "0.8.4",
"resolved": "https://registry.npmjs.org/mpath/-/mpath-0.8.4.tgz",
"integrity": "sha512-DTxNZomBcTWlrMW76jy1wvV37X/cNNxPW1y2Jzd4DZkAaC5ZGsm8bfGfNOthcDuRJujXLqiuS6o3Tpy0JEoh7g==",
"engines": {
"node": ">=4.0.0"
}
},
"node_modules/mquery": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/mquery/-/mquery-4.0.0.tgz",
"integrity": "sha512-nGjm89lHja+T/b8cybAby6H0YgA4qYC/lx6UlwvHGqvTq8bDaNeCwl1sY8uRELrNbVWJzIihxVd+vphGGn1vBw==",
"dependencies": {
"debug": "4.x",
"regexp-clone": "^1.0.0",
"sliced": "1.0.1"
},
"engines": {
"node": ">=12.0.0"
}
},
"node_modules/mquery/node_modules/debug": {
"version": "4.3.3",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz",
"integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==",
"dependencies": {
"ms": "2.1.2"
},
"engines": {
"node": ">=6.0"
},
"peerDependenciesMeta": {
"supports-color": {
"optional": true
}
}
},
"node_modules/mquery/node_modules/ms": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
},
"node_modules/ms": {
"version": "2.0.0",
"license": "MIT"
@ -1856,6 +2091,11 @@
"node": ">=8.10.0"
}
},
"node_modules/regexp-clone": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/regexp-clone/-/regexp-clone-1.0.0.tgz",
"integrity": "sha512-TuAasHQNamyyJ2hb97IuBEif4qBHGjPHBS64sZwytpLEqtBQ1gPJTnOaQ6qmpET16cK14kkjbazl6+p0RRv0yw=="
},
"node_modules/registry-auth-token": {
"version": "4.2.1",
"dev": true,
@ -1930,6 +2170,18 @@
"version": "2.1.2",
"license": "MIT"
},
"node_modules/saslprep": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/saslprep/-/saslprep-1.0.3.tgz",
"integrity": "sha512-/MY/PEMbk2SuY5sScONwhUDsV2p77Znkb/q3nSVstq/yQzYJOH/Azh29p9oJLsl3LnQwSvZDKagDGBsBwSooag==",
"optional": true,
"dependencies": {
"sparse-bitfield": "^3.0.3"
},
"engines": {
"node": ">=6"
}
},
"node_modules/semver": {
"version": "5.7.1",
"license": "ISC",
@ -2006,11 +2258,52 @@
"version": "1.1.1",
"license": "ISC"
},
"node_modules/sift": {
"version": "13.5.2",
"resolved": "https://registry.npmjs.org/sift/-/sift-13.5.2.tgz",
"integrity": "sha512-+gxdEOMA2J+AI+fVsCqeNn7Tgx3M9ZN9jdi95939l1IJ8cZsqS8sqpJyOkic2SJk+1+98Uwryt/gL6XDaV+UZA=="
},
"node_modules/signal-exit": {
"version": "3.0.6",
"dev": true,
"license": "ISC"
},
"node_modules/sliced": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/sliced/-/sliced-1.0.1.tgz",
"integrity": "sha1-CzpmK10Ewxd7GSa+qCsD+Dei70E="
},
"node_modules/smart-buffer": {
"version": "4.2.0",
"resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz",
"integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==",
"engines": {
"node": ">= 6.0.0",
"npm": ">= 3.0.0"
}
},
"node_modules/socks": {
"version": "2.6.1",
"resolved": "https://registry.npmjs.org/socks/-/socks-2.6.1.tgz",
"integrity": "sha512-kLQ9N5ucj8uIcxrDwjm0Jsqk06xdpBjGNQtpXy4Q8/QY2k+fY7nZH8CARy+hkbG+SGAovmzzuauCpBlb8FrnBA==",
"dependencies": {
"ip": "^1.1.5",
"smart-buffer": "^4.1.0"
},
"engines": {
"node": ">= 10.13.0",
"npm": ">= 3.0.0"
}
},
"node_modules/sparse-bitfield": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/sparse-bitfield/-/sparse-bitfield-3.0.3.tgz",
"integrity": "sha1-/0rm5oZWBWuks+eSqzM004JzyhE=",
"optional": true,
"dependencies": {
"memory-pager": "^1.0.2"
}
},
"node_modules/sqlstring": {
"version": "2.3.1",
"license": "MIT",
@ -2152,6 +2445,17 @@
"node": ">=0.8"
}
},
"node_modules/tr46": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/tr46/-/tr46-3.0.0.tgz",
"integrity": "sha512-l7FvfAHlcmulp8kr+flpQZmVwtu7nfRV7NZujtN0OqES8EL4O4e0qqzL0DC5gAvx/ZC/9lk6rhcUwYvkBnBnYA==",
"dependencies": {
"punycode": "^2.1.1"
},
"engines": {
"node": ">=12"
}
},
"node_modules/tunnel-agent": {
"version": "0.6.0",
"license": "Apache-2.0",
@ -2340,6 +2644,26 @@
"version": "1.0.2",
"license": "MIT"
},
"node_modules/webidl-conversions": {
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz",
"integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==",
"engines": {
"node": ">=12"
}
},
"node_modules/whatwg-url": {
"version": "11.0.0",
"resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-11.0.0.tgz",
"integrity": "sha512-RKT8HExMpoYx4igMiVMY83lN6UeITKJlBQ+vR/8ZJ8OCdSiN3RwCq+9gH0+Xzj0+5IrM6i4j/6LuvzbZIQgEcQ==",
"dependencies": {
"tr46": "^3.0.0",
"webidl-conversions": "^7.0.0"
},
"engines": {
"node": ">=12"
}
},
"node_modules/widest-line": {
"version": "3.1.0",
"dev": true,
@ -2435,6 +2759,25 @@
"defer-to-connect": "^1.0.1"
}
},
"@types/node": {
"version": "17.0.10",
"resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.10.tgz",
"integrity": "sha512-S/3xB4KzyFxYGCppyDt68yzBU9ysL88lSdIah4D6cptdcltc4NCPCAMc0+PCpg/lLIyC7IPvj2Z52OJWeIUkog=="
},
"@types/webidl-conversions": {
"version": "6.1.1",
"resolved": "https://registry.npmjs.org/@types/webidl-conversions/-/webidl-conversions-6.1.1.tgz",
"integrity": "sha512-XAahCdThVuCFDQLT7R7Pk/vqeObFNL3YqRyFZg+AqAP/W1/w3xHaIxuW7WszQqTbIBOPRcItYJIou3i/mppu3Q=="
},
"@types/whatwg-url": {
"version": "8.2.1",
"resolved": "https://registry.npmjs.org/@types/whatwg-url/-/whatwg-url-8.2.1.tgz",
"integrity": "sha512-2YubE1sjj5ifxievI5Ge1sckb9k/Er66HyR2c+3+I6VDUUg1TLPdYYTEbQ+DjRkS4nTxMJhgWfSfMRD2sl2EYQ==",
"requires": {
"@types/node": "*",
"@types/webidl-conversions": "*"
}
},
"abbrev": {
"version": "1.1.1",
"dev": true
@ -2512,6 +2855,11 @@
"version": "1.0.2",
"dev": true
},
"base64-js": {
"version": "1.5.1",
"resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz",
"integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA=="
},
"bcrypt-pbkdf": {
"version": "1.0.2",
"requires": {
@ -2569,6 +2917,23 @@
"fill-range": "^7.0.1"
}
},
"bson": {
"version": "4.6.1",
"resolved": "https://registry.npmjs.org/bson/-/bson-4.6.1.tgz",
"integrity": "sha512-I1LQ7Hz5zgwR4QquilLNZwbhPw0Apx7i7X9kGMBTsqPdml/03Q9NBtD9nt/19ahjlphktQImrnderxqpzeVDjw==",
"requires": {
"buffer": "^5.6.0"
}
},
"buffer": {
"version": "5.7.1",
"resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz",
"integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==",
"requires": {
"base64-js": "^1.3.1",
"ieee754": "^1.1.13"
}
},
"buffer-equal-constant-time": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz",
@ -2816,6 +3181,11 @@
"delayed-stream": {
"version": "1.0.0"
},
"denque": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/denque/-/denque-2.0.1.tgz",
"integrity": "sha512-tfiWc6BQLXNLpNiR5iGd0Ocu3P3VpxfzFiqubLgMfhfOw9WyvgJBd46CClNn9k3qfbjvT//0cf7AlYRX/OslMQ=="
},
"depd": {
"version": "1.1.2"
},
@ -3108,6 +3478,11 @@
"safer-buffer": ">= 2.1.2 < 3"
}
},
"ieee754": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz",
"integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA=="
},
"ignore-by-default": {
"version": "1.0.1",
"dev": true
@ -3127,6 +3502,11 @@
"version": "2.0.0",
"dev": true
},
"ip": {
"version": "1.1.5",
"resolved": "https://registry.npmjs.org/ip/-/ip-1.1.5.tgz",
"integrity": "sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo="
},
"ipaddr.js": {
"version": "1.9.1"
},
@ -3269,6 +3649,11 @@
"safe-buffer": "^5.0.1"
}
},
"kareem": {
"version": "2.3.3",
"resolved": "https://registry.npmjs.org/kareem/-/kareem-2.3.3.tgz",
"integrity": "sha512-uESCXM2KdtOQ8LOvKyTUXEeg0MkYp4wGglTIpGcYHvjJcS5sn2Wkfrfit8m4xSbaNDAw2KdI9elgkOxZbrFYbg=="
},
"keyv": {
"version": "3.1.0",
"dev": true,
@ -3355,6 +3740,12 @@
"media-typer": {
"version": "0.3.0"
},
"memory-pager": {
"version": "1.5.0",
"resolved": "https://registry.npmjs.org/memory-pager/-/memory-pager-1.5.0.tgz",
"integrity": "sha512-ZS4Bp4r/Zoeq6+NLJpP+0Zzm0pR8whtGPf1XExKLJBAczGMnSi3It14OiNCStjQjM6NU1okjQGSxgEZN8eBYKg==",
"optional": true
},
"merge-descriptors": {
"version": "1.0.1"
},
@ -3393,6 +3784,97 @@
"minimist": "^1.2.5"
}
},
"mongodb": {
"version": "4.3.1",
"resolved": "https://registry.npmjs.org/mongodb/-/mongodb-4.3.1.tgz",
"integrity": "sha512-sNa8APSIk+r4x31ZwctKjuPSaeKuvUeNb/fu/3B6dRM02HpEgig7hTHM8A/PJQTlxuC/KFWlDlQjhsk/S43tBg==",
"requires": {
"bson": "^4.6.1",
"denque": "^2.0.1",
"mongodb-connection-string-url": "^2.4.1",
"saslprep": "^1.0.3",
"socks": "^2.6.1"
}
},
"mongodb-connection-string-url": {
"version": "2.4.1",
"resolved": "https://registry.npmjs.org/mongodb-connection-string-url/-/mongodb-connection-string-url-2.4.1.tgz",
"integrity": "sha512-d5Kd2bVsKcSA7YI/yo57fSTtMwRQdFkvc5IZwod1RRxJtECeWPPSo7zqcUGJELifRA//Igs4spVtYAmvFCatug==",
"requires": {
"@types/whatwg-url": "^8.2.1",
"whatwg-url": "^11.0.0"
}
},
"mongoose": {
"version": "6.1.7",
"resolved": "https://registry.npmjs.org/mongoose/-/mongoose-6.1.7.tgz",
"integrity": "sha512-GqU/G/5yu/CWBHdW24cfGPsW4rADER+eeXj+bwvb6mLjg6uAASl8GnE6pmEbafZJ4Uv9V7jf5LaBMJMNwvQEtg==",
"requires": {
"@types/node": "< 17.0.6",
"bson": "^4.2.2",
"kareem": "2.3.3",
"mongodb": "4.2.2",
"mpath": "0.8.4",
"mquery": "4.0.0",
"ms": "2.1.2",
"regexp-clone": "1.0.0",
"sift": "13.5.2",
"sliced": "1.0.1"
},
"dependencies": {
"@types/node": {
"version": "17.0.5",
"resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.5.tgz",
"integrity": "sha512-w3mrvNXLeDYV1GKTZorGJQivK6XLCoGwpnyJFbJVK/aTBQUxOCaa/GlFAAN3OTDFcb7h5tiFG+YXCO2By+riZw=="
},
"mongodb": {
"version": "4.2.2",
"resolved": "https://registry.npmjs.org/mongodb/-/mongodb-4.2.2.tgz",
"integrity": "sha512-zt8rCTnTKyMQppyt63qMnrLM5dbADgUk18ORPF1XbtHLIYCyc9hattaYHi0pqMvNxDpgGgUofSVzS+UQErgTug==",
"requires": {
"bson": "^4.6.0",
"denque": "^2.0.1",
"mongodb-connection-string-url": "^2.3.2",
"saslprep": "^1.0.3"
}
},
"ms": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
}
}
},
"mpath": {
"version": "0.8.4",
"resolved": "https://registry.npmjs.org/mpath/-/mpath-0.8.4.tgz",
"integrity": "sha512-DTxNZomBcTWlrMW76jy1wvV37X/cNNxPW1y2Jzd4DZkAaC5ZGsm8bfGfNOthcDuRJujXLqiuS6o3Tpy0JEoh7g=="
},
"mquery": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/mquery/-/mquery-4.0.0.tgz",
"integrity": "sha512-nGjm89lHja+T/b8cybAby6H0YgA4qYC/lx6UlwvHGqvTq8bDaNeCwl1sY8uRELrNbVWJzIihxVd+vphGGn1vBw==",
"requires": {
"debug": "4.x",
"regexp-clone": "^1.0.0",
"sliced": "1.0.1"
},
"dependencies": {
"debug": {
"version": "4.3.3",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz",
"integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==",
"requires": {
"ms": "2.1.2"
}
},
"ms": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
}
}
},
"ms": {
"version": "2.0.0"
},
@ -3633,6 +4115,11 @@
"picomatch": "^2.2.1"
}
},
"regexp-clone": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/regexp-clone/-/regexp-clone-1.0.0.tgz",
"integrity": "sha512-TuAasHQNamyyJ2hb97IuBEif4qBHGjPHBS64sZwytpLEqtBQ1gPJTnOaQ6qmpET16cK14kkjbazl6+p0RRv0yw=="
},
"registry-auth-token": {
"version": "4.2.1",
"dev": true,
@ -3690,6 +4177,15 @@
"safer-buffer": {
"version": "2.1.2"
},
"saslprep": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/saslprep/-/saslprep-1.0.3.tgz",
"integrity": "sha512-/MY/PEMbk2SuY5sScONwhUDsV2p77Znkb/q3nSVstq/yQzYJOH/Azh29p9oJLsl3LnQwSvZDKagDGBsBwSooag==",
"optional": true,
"requires": {
"sparse-bitfield": "^3.0.3"
}
},
"semver": {
"version": "5.7.1"
},
@ -3747,10 +4243,43 @@
"setprototypeof": {
"version": "1.1.1"
},
"sift": {
"version": "13.5.2",
"resolved": "https://registry.npmjs.org/sift/-/sift-13.5.2.tgz",
"integrity": "sha512-+gxdEOMA2J+AI+fVsCqeNn7Tgx3M9ZN9jdi95939l1IJ8cZsqS8sqpJyOkic2SJk+1+98Uwryt/gL6XDaV+UZA=="
},
"signal-exit": {
"version": "3.0.6",
"dev": true
},
"sliced": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/sliced/-/sliced-1.0.1.tgz",
"integrity": "sha1-CzpmK10Ewxd7GSa+qCsD+Dei70E="
},
"smart-buffer": {
"version": "4.2.0",
"resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz",
"integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg=="
},
"socks": {
"version": "2.6.1",
"resolved": "https://registry.npmjs.org/socks/-/socks-2.6.1.tgz",
"integrity": "sha512-kLQ9N5ucj8uIcxrDwjm0Jsqk06xdpBjGNQtpXy4Q8/QY2k+fY7nZH8CARy+hkbG+SGAovmzzuauCpBlb8FrnBA==",
"requires": {
"ip": "^1.1.5",
"smart-buffer": "^4.1.0"
}
},
"sparse-bitfield": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/sparse-bitfield/-/sparse-bitfield-3.0.3.tgz",
"integrity": "sha1-/0rm5oZWBWuks+eSqzM004JzyhE=",
"optional": true,
"requires": {
"memory-pager": "^1.0.2"
}
},
"sqlstring": {
"version": "2.3.1"
},
@ -3835,6 +4364,14 @@
"punycode": "^2.1.1"
}
},
"tr46": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/tr46/-/tr46-3.0.0.tgz",
"integrity": "sha512-l7FvfAHlcmulp8kr+flpQZmVwtu7nfRV7NZujtN0OqES8EL4O4e0qqzL0DC5gAvx/ZC/9lk6rhcUwYvkBnBnYA==",
"requires": {
"punycode": "^2.1.1"
}
},
"tunnel-agent": {
"version": "0.6.0",
"requires": {
@ -3958,6 +4495,20 @@
}
}
},
"webidl-conversions": {
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz",
"integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g=="
},
"whatwg-url": {
"version": "11.0.0",
"resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-11.0.0.tgz",
"integrity": "sha512-RKT8HExMpoYx4igMiVMY83lN6UeITKJlBQ+vR/8ZJ8OCdSiN3RwCq+9gH0+Xzj0+5IrM6i4j/6LuvzbZIQgEcQ==",
"requires": {
"tr46": "^3.0.0",
"webidl-conversions": "^7.0.0"
}
},
"widest-line": {
"version": "3.1.0",
"dev": true,

View File

@ -5,7 +5,6 @@
"main": "index.js",
"scripts": {
"start": "nodemon index.js"
},
"author": "",
"license": "ISC",
@ -22,6 +21,8 @@
"https": "^1.0.0",
"jsonwebtoken": "^8.5.1",
"md5": "^2.3.0",
"mongodb": "^4.3.1",
"mongoose": "^6.1.7",
"msg91": "^0.0.6",
"msg91-sms": "^1.0.1",
"multer": "^1.4.3",

View File

@ -15,12 +15,24 @@ var devicee_access_check="sThis mobile number is register on another device plea
const http = require("https");
var app = express();
var db= require('../lib/db');
const multer = require('multer');
const { monitorEventLoopDelay } = require('perf_hooks');
const { notEqual } = require('assert');
const { json } = require('body-parser');
app.use(bodyparser.json());
//mongo connect
var MongoClients=require('mongodb').MongoClient;
var url='mongodb://localhost:27017';
function listcalllog(userId,api,viewedId){
MongoClients.connect(url,function(err,mdb)
{
var dbmy=mdb.db('cma_api');
var mydata={userId: userId,api:api,date: Date(),viewedId:viewedId};
dbmy.collection('cmalog').insertOne(mydata,function(err,res){ mdb.close();})
});
}
//1.getotp
app.post('/getOtp',function(requ,res){
@ -270,6 +282,7 @@ app.post('/resendOtp',function(requ,rese){
//4. List Plans
app.get('/listPlans',checkToken,function(req,res){
let sql = "SELECT * FROM register WHERE id="+req.body.userId+" and device_unique_id='"+req.body.deviceId+"'";
let query = db.query(sql,(err, results) => {
if(err) throw err
@ -304,9 +317,11 @@ app.get('/listPlans',checkToken,function(req,res){
var response_msg=devicee_access_check;
res.send(JSON.stringify({ "code":response_code,"message":response_msg,"data": ""}));
}
});
listcalllog(req.body.userId,'listPlans');
});
//========================
//5.subscribe plans
@ -368,6 +383,7 @@ let date = ("0" + date_ob.getDate()).slice(-2);
}
});
listcalllog(req.body.userId,'subscribePlans');
});
//==================
@ -391,7 +407,7 @@ app.get('/listNews',checkToken,function(req,res){
res.send(JSON.stringify({ "code":response_code,"message":response_msg,"data": results}));
});
listcalllog(req.body.userId,'listNews');
});
//=======================
//7.categories
@ -431,7 +447,7 @@ app.get('/listCategories',checkToken,function(req,res){
},
);
});
listcalllog(req.body.userId,'listCategories');
});
//=================================
//8.markets
@ -452,7 +468,7 @@ app.get('/listMarkets',checkToken,function(req,res){
}
res.send(JSON.stringify({ "code":response_code,"message":response_msg,"data": results}));
});
listcalllog(req.body.userId,'listMarkets');
});
//====================
//9.Detailed category info
@ -496,7 +512,7 @@ app.get('/categoryDetail/:categoryId',checkToken,(req, res) => {
res.send(JSON.stringify({ "code":response_code,"message":response_msg,"data": finalresult}));
}
});
listcalllog(req.body.userId,'categoryDetail',req.params.categoryId);
});
//==========================
//10.Total items from market
@ -599,7 +615,7 @@ app.get('/listNewsCategory',checkToken,function(req,res){
res.send(JSON.stringify({ "code":response_code,"message":response_msg,"data": resultss}));
});
listcalllog(req.body.userId,'listNewsCategory');
});
//==========================
//13.This week filter
@ -719,7 +735,7 @@ app.get('/listNewsCategory/:newsCatId',checkToken,function(req,res){
res.send(JSON.stringify({ "code":response_code,"message":response_msg,"data": resultss}));
});
listcalllog(req.body.userId,'listNewsCategory',req.params.newsCatId);
});
//=======================
//18.particular news details
@ -742,7 +758,7 @@ app.get('/listNews/:newsId',checkToken,function(req,res){
res.send(JSON.stringify({ "code":response_code,"message":response_msg,"data": resultss}));
});
listcalllog(req.body.userId,'listNews',req.params.newsId);
});
//======================
//19.price graph using productid & marketid
@ -814,7 +830,7 @@ app.get('/statewisePriceGraph/:stateId/:productId',checkToken,function(req,res){
res.send(JSON.stringify({ "code":response_code,"message":response_msg,"data": results}));
});
});
});
//==============================
@ -911,6 +927,10 @@ app.get('/getLocByRegion',checkToken,function(req,res){
//===========================================================
//************BUY & SELL***************************************** */
//=============================================================
//=========BUY==========
//1.list all seller product category to buyer screeen
app.get('/buysellCategory',checkToken,function(req,res){
@ -936,7 +956,7 @@ app.get('/buysellCategory',checkToken,function(req,res){
});
//===================================
//2.list all seller products to buyer screeen
app.get('/buysellProducts',checkToken,function(req,res){
app.get('/buyProducts',checkToken,function(req,res){
let sql = "SELECT sp.*,bsc.name as categoryname,bspm.name as productname,bspm.image,m.name as unitname,p.region as areaname FROM seller_products as sp left join buysell_category as bsc on bsc.id=sp.cat_id left join buysell_product_master as bspm on bspm.id=sp.product left join measurement as m on m.id=sp.unit left join pincodes as p on p.id=sp.area WHERE sp.status=1";
@ -963,6 +983,10 @@ app.get('/buysellProducts',checkToken,function(req,res){
);
}
else
{
res.send(JSON.stringify({"code":"0","message":"No data"}));
}
});
@ -970,7 +994,7 @@ app.get('/buysellProducts',checkToken,function(req,res){
//====================
//3.list particular seller products to buyer screeen
app.get('/buysellProducts/:categoryId',checkToken,function(req,res){
app.get('/buyProducts/:categoryId',checkToken,function(req,res){
let sql = "SELECT sp.*,bsc.name as categoryname,bspm.name as productname,bspm.image,m.name as unitname,p.region as areaname FROM seller_products as sp left join buysell_category as bsc on bsc.id=sp.cat_id left join buysell_product_master as bspm on bspm.id=sp.product left join measurement as m on m.id=sp.unit left join pincodes as p on p.id=sp.area WHERE sp.status=1 and sp.cat_id="+req.params.categoryId;
@ -997,6 +1021,10 @@ app.get('/buysellProducts/:categoryId',checkToken,function(req,res){
);
}
else
{
res.send(JSON.stringify({"code":"0","message":"No data"}));
}
});
@ -1042,9 +1070,9 @@ app.get('/buyFilter',checkToken,function(req,res){
});
//========================
//5.view particular product to buyer
app.get('/viewProduct/:bPPrimaryId',checkToken,function(req,res){
app.get('/viewbuyProduct/:bPPrimaryId',checkToken,function(req,res){
let sql = "SELECT sp.*,bspm.name as productname,bspm.image,m.name as unitname,r.name as sellername FROM seller_products as sp left join buysell_product_master as bspm on bspm.id=sp.product left join measurement as m on m.id=sp.unit left join register as r on r.id=sp.seller WHERE sp.status=1 and sp.id="+req.params.bPPrimaryId;
let sql = "SELECT sp.*,p.region as location,bspm.name as productname,bspm.image,m.name as unitname,r.name as sellername FROM seller_products as sp left join buysell_product_master as bspm on bspm.id=sp.product left join measurement as m on m.id=sp.unit left join register as r on r.id=sp.seller left join pincodes as p on p.id=sp.area WHERE sp.status=1 and sp.id="+req.params.bPPrimaryId;
let query = db.query(sql,(err, resultss) => {
if(resultss.length > 0 ){
@ -1117,6 +1145,421 @@ app.get('/viewProduct/:bPPrimaryId',checkToken,function(req,res){
});
});
//===================
//8.myrequest Page for buyer
app.get('/myRequest/:userId',checkToken,function(req,res){
let sql = "SELECT bp.*,bsc.name as categoryname,bspm.name as productname,bspm.image,m.name as unitname,p.region as areaname FROM buyer_products as bp left join buysell_category as bsc on bsc.id=bp.cat_id left join buysell_product_master as bspm on bspm.id=bp.product left join measurement as m on m.id=bp.unit left join pincodes as p on p.id=bp.area WHERE bp.status!=0 and bp.buyer="+req.params.userId;
let query = db.query(sql,(err, results) => {
if (err) throw err;
if(results.length>0)
{
var finalresult=[];
async.eachSeries(results,(finres,callback)=>
{
var unitname=finres.unitname;
var uniprice_per_unittname=finres.price_per_unit;
var pro_status=finres.status;
if(pro_status=="1"){ var productStatus="Requested";}
if(pro_status=="2"){ var productStatus="Completed";}
if(pro_status=="3"){ var productStatus="Expired";}
var singleprice=uniprice_per_unittname+"/"+unitname;
finres.singleprice=singleprice;
finres.productStatus=productStatus;
let resultupdated=finres;
finalresult.push(resultupdated);
callback(null,resultupdated);
},
(err)=>{
if(err) throw err;
res.send(JSON.stringify({"code":"1","message":"success","data": finalresult}));
}
);
}
else
{
res.send(JSON.stringify({"code":"0","message":"No data"}));
}
});
});
//=================
//9.change completed and deleted
app.put('/changeRequest/:bPPrimaryId',checkToken,function(req,res){
let data = { status:req.body.status}
let sql = "UPDATE buyer_products SET ? WHERE id="+req.params.bPPrimaryId+"";
let query = db.query(sql,data, (err, results) => {
if(err) throw err;
if(req.body.status=="0")
{
var message="Deleted successfully";
}
if(req.body.status=="2")
{
var message="Updated successfully";
}
res.send(JSON.stringify({ "code":"1","message":message}));
});
});
//=================
//10.edit myrequest
app.put('/editRequest/:bPPrimaryId',checkToken,function(req,res){
let data = {
qty:req.body.qty,
unit:req.body.unitId,
price_per_unit:req.body.pricePerUnit,
area:req.body.area,
about_product:req.body.about
}
let sql = "UPDATE buyer_products SET ? WHERE id="+req.params.bPPrimaryId+"";
let query = db.query(sql,data, (err, results) => {
if(err) throw err;
res.send(JSON.stringify({ "code":"1","message":"Updated successfully"}));
});
});
//=====================
//=========SELL========================
//1.list all buyer products to seller screeen
app.get('/sellProducts',checkToken,function(req,res){
let sql = "SELECT bp.*,bsc.name as categoryname,bspm.name as productname,bspm.image,m.name as unitname,p.region as areaname FROM buyer_products as bp left join buysell_category as bsc on bsc.id=bp.cat_id left join buysell_product_master as bspm on bspm.id=bp.product left join measurement as m on m.id=bp.unit left join pincodes as p on p.id=bp.area WHERE bp.status=1";
let query = db.query(sql,(err, results) => {
if (err) throw err;
if(results.length>0)
{
var finalresult=[];
async.eachSeries(results,(finres,callback)=>
{
var unitname=finres.unitname;
var uniprice_per_unittname=finres.price_per_unit;
var singleprice=uniprice_per_unittname+"/"+unitname;
finres.singleprice=singleprice;
let resultupdated=finres;
finalresult.push(resultupdated);
callback(null,resultupdated);
},
(err)=>{
if(err) throw err;
res.send(JSON.stringify({"code":"1","message":"success","data": finalresult}));
}
);
}
else
{
res.send(JSON.stringify({"code":"0","message":"No data"}));
}
});
});
//========================
//2.get particular buyer products to seller screeen
app.get('/sellProducts/:categoryId',checkToken,function(req,res){
let sql = "SELECT bp.*,bsc.name as categoryname,bspm.name as productname,bspm.image,m.name as unitname,p.region as areaname FROM buyer_products as bp left join buysell_category as bsc on bsc.id=bp.cat_id left join buysell_product_master as bspm on bspm.id=bp.product left join measurement as m on m.id=bp.unit left join pincodes as p on p.id=bp.area WHERE bp.status=1 and bp.cat_id="+req.params.categoryId;
let query = db.query(sql,(err, results) => {
if (err) throw err;
if(results.length>0)
{
var finalresult=[];
async.eachSeries(results,(finres,callback)=>
{
var unitname=finres.unitname;
var uniprice_per_unittname=finres.price_per_unit;
var singleprice=uniprice_per_unittname+"/"+unitname;
finres.singleprice=singleprice;
let resultupdated=finres;
finalresult.push(resultupdated);
callback(null,resultupdated);
},
(err)=>{
if(err) throw err;
res.send(JSON.stringify({"code":"1","message":"success","data": finalresult}));
}
);
}
else
{
res.send(JSON.stringify({"code":"0","message":"No data"}));
}
});
});
//==================
//3.sell filters
app.get('/sellFilter',checkToken,function(req,res){
let sql = "SELECT bp.*,bsc.name as categoryname,bspm.name as productname,bspm.image,m.name as unitname,p.region as areaname FROM buyer_products as bp left join buysell_category as bsc on bsc.id=bp.cat_id left join buysell_product_master as bspm on bspm.id=bp.product left join measurement as m on m.id=bp.unit left join pincodes as p on p.id=bp.area WHERE bp.status=1 and bp.product="+req.body.productId+" and bp.area="+req.body.area+" and bp.qty >= "+req.body.qtyFrom+" AND bp.qty <= "+req.body.qtyTo+" and bp.price_per_unit >= "+req.body.priceFrom+" AND bp.price_per_unit <= "+req.body.priceTo;
let query = db.query(sql,(err, results) => {
if (err) throw err;
if(results.length>0)
{
var finalresult=[];
async.eachSeries(results,(finres,callback)=>
{
var unitname=finres.unitname;
var uniprice_per_unittname=finres.price_per_unit;
var singleprice=uniprice_per_unittname+"/"+unitname;
finres.singleprice=singleprice;
let resultupdated=finres;
finalresult.push(resultupdated);
callback(null,resultupdated);
},
(err)=>{
if(err) throw err;
res.send(JSON.stringify({"code":"1","message":"success","data": finalresult}));
}
);
}
else
{
res.send(JSON.stringify({"code":"0","message":"No data"}));
}
});
});
//========================
//4.view particular product to seller
app.get('/viewsellProduct/:bPPrimaryId',checkToken,function(req,res){
let sql = "SELECT bp.*,p.region as location,bspm.name as productname,bspm.image,m.name as unitname,r.name as sellername FROM buyer_products as bp left join buysell_product_master as bspm on bspm.id=bp.product left join measurement as m on m.id=bp.unit left join register as r on r.id=bp.buyer left join pincodes as p on p.id=bp.area WHERE bp.status=1 and bp.id="+req.params.bPPrimaryId;
let query = db.query(sql,(err, resultss) => {
console.log(sql);
if(resultss.length > 0 ){
var response_code="1";
var response_msg="Success";
}
else
{
var response_code="0";
var response_msg="No Data";
}
res.send(JSON.stringify({ "code":response_code,"message":response_msg,"data": resultss}));
});
});
//=================
//5.add seller products
app.post('/sellerRequestProduct',checkToken,function(req,res){
let data=
{
seller:req.body.sessionid,
cat_id: req.body.categoryId,
product:req.body.productId,
qty:req.body.qty,
unit:req.body.unitId,
price_per_unit:req.body.pricePerUnit,
area:req.body.area,
valid_date:req.body.validDate,
about_product:req.body.about,
status:1,
created_by:req.body.sessionid
}
let sql = "INSERT INTO seller_products SET ?";
let query = db.query(sql,data,(err, results) => {
if(err) throw err
res.send(JSON.stringify({ "code":"1","message":"success","data": results}));
});
});
const filestorageengines=multer.diskStorage({
destination:(req,file,cb)=>{
cb(null,"./uploads");
},
filename: (req,file,cb)=>
{
cb(null,"pr-"+Date.now()+ path.extname(file.originalname));
}
});
const uploaded=multer({
storage:filestorageengines
});
app.post('/insertImages/:primaryId',uploaded.array('productImages'),function(req,res){
req.files.forEach(function(value, key) {
let data=
{
seller_product_primary_id:req.params.primaryId,
status: 1,
created_by: req.body.sessionid,
image: value.filename
}
let sql = "INSERT INTO seller_product_images SET ?";
let query = db.query(sql,data,(err, results) => {
if(err) throw err
res.send(JSON.stringify({ "code":"1","message":"success","data": results}));
});
})
});
//======================
//6.myrequest Page for seller
app.get('/myRequestSeller/:userId',checkToken,function(req,res){
let sql = "SELECT sp.*,bsc.name as categoryname,bspm.name as productname,bspm.image,m.name as unitname,p.region as areaname FROM seller_products as sp left join buysell_category as bsc on bsc.id=sp.cat_id left join buysell_product_master as bspm on bspm.id=sp.product left join measurement as m on m.id=sp.unit left join pincodes as p on p.id=sp.area WHERE sp.status!=0 and sp.seller="+req.params.userId;
let query = db.query(sql,(err, results) => {
if (err) throw err;
if(results.length>0)
{
var finalresult=[];
async.eachSeries(results,(finres,callback)=>
{
var unitname=finres.unitname;
var uniprice_per_unittname=finres.price_per_unit;
var pro_status=finres.status;
if(pro_status=="1"){ var productStatus="Requested";}
if(pro_status=="2"){ var productStatus="Completed";}
if(pro_status=="3"){ var productStatus="Expired";}
var singleprice=uniprice_per_unittname+"/"+unitname;
finres.singleprice=singleprice;
finres.productStatus=productStatus;
let resultupdated=finres;
finalresult.push(resultupdated);
callback(null,resultupdated);
},
(err)=>{
if(err) throw err;
res.send(JSON.stringify({"code":"1","message":"success","data": finalresult}));
}
);
}
else
{
res.send(JSON.stringify({"code":"0","message":"No data"}));
}
});
});
//=================
//7.change completed and deleted for seller
app.put('/changeRequestSeller/:bPPrimaryId',checkToken,function(req,res){
let data = { status:req.body.status}
let sql = "UPDATE seller_products SET ? WHERE id="+req.params.bPPrimaryId+"";
let query = db.query(sql,data, (err, results) => {
if(err) throw err;
if(req.body.status=="0")
{
var message="Deleted successfully";
}
if(req.body.status=="2")
{
var message="Updated successfully";
}
res.send(JSON.stringify({ "code":"1","message":message}));
});
});
//=================
//8.edit myrequest
app.put('/editRequestSeller/:bPPrimaryId',checkToken,function(req,res){
let data = {
qty:req.body.qty,
unit:req.body.unitId,
price_per_unit:req.body.pricePerUnit,
area:req.body.area,
about_product:req.body.about
}
let sql = "UPDATE seller_products SET ? WHERE id="+req.params.bPPrimaryId+"";
let query = db.query(sql,data, (err, results) => {
if(err) throw err;
res.send(JSON.stringify({ "code":"1","message":"Updated successfully"}));
});
});
//=====================
@ -1128,24 +1571,12 @@ app.get('/viewProduct/:bPPrimaryId',checkToken,function(req,res){
//==================================================================================================
//| |
//| API CRUD FOR CATEGORY |
//| |
//==================================================================================================
//======================================

Binary file not shown.

Before

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB