diff --git a/index.js b/index.js
index 1eb97ca..3a7305b 100644
--- a/index.js
+++ b/index.js
@@ -57,6 +57,27 @@ const {
} = require("./lib/taavon-send-data");
const { getAllCities } = require("./lib/getAllCities");
const { getAllProvinces } = require("./lib/getAllProvinces");
+const { MongoClient, ObjectId } = require("mongodb");
+
+// MongoDB for SEP pay requests (use MONGODB_URI env to override)
+const MONGODB_URI =
+ process.env.MONGODB_URI ||
+ "mongodb://root:2pCCFs4wrsLDsO1pjQVA9jORT2WCjLNO5uauS6FUUaGLXCcfjw28IJmAO8RxlEJN@31.7.78.133:14365/?authSource=admin";
+const SEP_DB_NAME = "rasadyar";
+const SEP_COLLECTION = "sepPayRequests";
+
+let mongoClient = null;
+async function getMongoClient() {
+ if (!mongoClient) {
+ mongoClient = new MongoClient(MONGODB_URI);
+ await mongoClient.connect();
+ }
+ return mongoClient;
+}
+async function getSepPayCollection() {
+ const client = await getMongoClient();
+ return client.db(SEP_DB_NAME).collection(SEP_COLLECTION);
+}
// var _soap2 = _interopRequireDefault(_soap);
@@ -98,7 +119,7 @@ app.post("/cumulative-dynamic-pay-request", async (req, res) => {
parseInt(orderId),
amount,
additionalData,
- "https://rasadyar.net/verify-payment"
+ "https://rasadyar.net/verify-payment",
);
const payRequestRes = payRequestResult.return.split(",");
const responseCode = payRequestRes[0];
@@ -168,7 +189,7 @@ async function reversePay(orderId, saleOrderId, saleReferenceId) {
let resultReversePay = await bpReversalRequest(
orderId,
saleOrderId,
- saleReferenceId
+ saleReferenceId,
);
resultReversePay = resultReversePay.return;
console.log(resultReversePay);
@@ -329,7 +350,7 @@ app.post("/verify-payment", async (req, res) => {
resultCode_bpVerifyRequest = await bpVerifyRequest(
saleOrderId,
saleOrderId,
- saleReferenceId
+ saleReferenceId,
);
resultCode_bpVerifyRequest = resultCode_bpVerifyRequest.return;
console.log("bpVerifyRequest:" + resultCode_bpVerifyRequest);
@@ -342,10 +363,10 @@ app.post("/verify-payment", async (req, res) => {
resultCode_bpinquiryRequest = await bpInquiryRequest(
saleOrderId,
saleOrderId,
- saleReferenceId
+ saleReferenceId,
);
resultCode_bpinquiryRequest = parseInt(
- resultCode_bpinquiryRequest.return
+ resultCode_bpinquiryRequest.return,
);
console.log("bpinquiryRequest" + resultCode_bpinquiryRequest);
@@ -366,7 +387,7 @@ app.post("/verify-payment", async (req, res) => {
resultCode_bpSettleRequest = await bpSettleRequest(
saleOrderId,
saleOrderId,
- saleReferenceId
+ saleReferenceId,
);
resultCode_bpSettleRequest = parseInt(resultCode_bpSettleRequest.return);
@@ -492,7 +513,7 @@ app.post("/zarinpay", async (req, res) => {
"Content-Type": "application/json",
accept: "application/json",
},
- }
+ },
);
if (response.data.data.authority) {
return res.status(201).json(response.data.data);
@@ -530,7 +551,7 @@ app.get("/zarinverify", async (req, res) => {
"Content-Type": "application/json",
accept: "application/json",
},
- }
+ },
);
console.log("Verification response in verify: ", response.data);
@@ -634,7 +655,7 @@ app.post("/sadad-get-token", async (req, res) => {
"Content-Type": "application/json",
Referer: "https://rasadyar.net/",
},
- }
+ },
);
res.status(201).send(response.data);
@@ -691,7 +712,7 @@ app.post("/sadad-request-payment", async (req, res) => {
"Content-Type": "application/json",
Referer: "https://rasadyar.net/",
},
- }
+ },
);
const responseData = response.data;
@@ -750,7 +771,7 @@ app.post("/asanverify", async (req, res) => {
}
const encryptedCredintials = await encryptWS(
- `${config.username},${config.password}`
+ `${config.username},${config.password}`,
);
const soapClient = await soap.createClientAsync(config.WebServiceUrl);
const verifyArgs = {
@@ -764,7 +785,7 @@ app.post("/asanverify", async (req, res) => {
return res
.status(500)
.send(
- `خطای شماره: ${verifyResult.RequestVerificationResult} در هنگام Verify`
+ `خطای شماره: ${verifyResult.RequestVerificationResult} در هنگام Verify`,
);
}
@@ -773,11 +794,11 @@ app.post("/asanverify", async (req, res) => {
return res
.status(500)
.send(
- `خطای شماره: ${settlementResult.RequestReconciliationResult} در هنگام Settlement`
+ `خطای شماره: ${settlementResult.RequestReconciliationResult} در هنگام Settlement`,
);
}
res.send(
- '
تراکنش با موفقیت انجام پذیرفت.
'
+ 'تراکنش با موفقیت انجام پذیرفت.
',
);
});
});
@@ -824,6 +845,9 @@ app.post("/sep-pay-request", async (req, res) => {
return res.status(400).send("Invalid amount");
}
+ const resNum = generateRandomString();
+ const redirectUrl = `https://pay.rasadyar.net/sepverify/?Amount=${amount}&province=${provincecode}&isLink=${isLink}`;
+
try {
const response = await axios.post(
SEP_API,
@@ -831,8 +855,8 @@ app.post("/sep-pay-request", async (req, res) => {
action: "token",
TerminalId: SEP_TERMINAL_ID,
Amount: parsedAmount,
- ResNum: generateRandomString(),
- RedirectUrl: `https://pay.rasadyar.net/sepverify/?Amount=${amount}&province=${provincecode}&isLink=${isLink}`,
+ ResNum,
+ RedirectUrl: redirectUrl,
CellNumber: phone,
SettlementIBANInfo: wages,
// TranType: "Government",
@@ -842,8 +866,35 @@ app.post("/sep-pay-request", async (req, res) => {
"Content-Type": "application/json",
accept: "application/json",
},
- }
+ },
);
+
+ // Save to MongoDB before returning
+ try {
+ const coll = await getSepPayCollection();
+ const token = response.data?.Token ?? response.data?.token ?? null;
+ await coll.insertOne({
+ amount: parsedAmount,
+ amountRaw: amount,
+ phone: phone || null,
+ provincecode: provincecode || null,
+ isLink: isLink || null,
+ wages: wages || null,
+ resNum,
+ redirectUrl,
+ token,
+ rawResponse: response.data,
+ verified: false,
+ refNum: null,
+ traceNo: null,
+ securePan: null,
+ createdAt: new Date(),
+ updatedAt: new Date(),
+ });
+ } catch (dbErr) {
+ console.error("SEP pay request: failed to save to DB", dbErr);
+ }
+
return res.status(201).json(response.data);
} catch (error) {
return res
@@ -870,12 +921,31 @@ app.post("/sepverify", async (req, res) => {
"Content-Type": "application/json",
accept: "application/json",
},
- }
+ },
);
if (response.data.ResultCode === 0) {
let redirectUrl = `https://rasadyar.net/payment?finalAmount=${Amount}&cardHolderPan=${SecurePan}&date=${new Date()}&saleReferenceId=${TraceNo}`;
- let subDomain = "";
+
+ // Update DB with verify result for manual submit in GUI
+ try {
+ const coll = await getSepPayCollection();
+ await coll.updateOne(
+ { token: Token },
+ {
+ $set: {
+ verified: true,
+ refNum: RefNum,
+ traceNo: TraceNo,
+ securePan: SecurePan,
+ verifyAmount: Amount,
+ updatedAt: new Date(),
+ },
+ },
+ );
+ } catch (dbErr) {
+ console.error("sepverify: failed to update DB", dbErr);
+ }
if (isLink) {
await taavonSendDataZarinPalLink(province, {
@@ -911,6 +981,149 @@ app.post("/sepverify", async (req, res) => {
}
});
+app.get("/sep-pay-requests/gui", async (req, res) => {
+ const basePath =
+ (req.baseUrl || "").replace(/\/sep-pay-requests\/gui$/, "") || "";
+ const listPath = basePath
+ ? basePath + "/sep-pay-requests"
+ : "/sep-pay-requests";
+ const submitPathPrefix = basePath
+ ? basePath + "/sep-pay-request/"
+ : "/sep-pay-request/";
+ const html = `
+
+
+
+
+ SEP Pay Requests
+
+
+
+ درخواستهای پرداخت SEP
+ API لیست (JSON)
+ در حال بارگذاری...
+
+
+`;
+ res.setHeader("Content-Type", "text/html; charset=utf-8");
+ res.send(html);
+});
+
+// List all SEP pay requests (API)
+app.get("/sep-pay-requests", async (req, res) => {
+ try {
+ const coll = await getSepPayCollection();
+ const list = await coll
+ .find({})
+ .sort({ createdAt: -1 })
+ .limit(500)
+ .toArray();
+ // Ensure _id is string for GUI
+ const listWithIds = list.map((doc) => ({
+ ...doc,
+ _id: doc._id ? doc._id.toString() : doc._id,
+ }));
+ return res.json(listWithIds);
+ } catch (err) {
+ console.error("sep-pay-requests list error", err);
+ return res.status(500).json({ error: err.message });
+ }
+});
+
+// Manual submit to Taavon (like sepverify does) - use stored or body: authority, refId, cardHolderPan
+app.post("/sep-pay-request/:id/submit", async (req, res) => {
+ const id = req.params.id;
+ const { authority, refId, cardHolderPan } = req.body;
+ try {
+ const coll = await getSepPayCollection();
+ const doc = await coll.findOne({ _id: new ObjectId(id) });
+ if (!doc) {
+ return res.status(404).json({ error: "Record not found" });
+ }
+ const province = (doc.provincecode || "").toString().substring(0, 2);
+ const isLink =
+ doc.isLink === true || doc.isLink === "true" || doc.isLink === "1";
+ const data = {
+ authority: authority ?? doc.token,
+ refId: refId ?? doc.traceNo,
+ cardHolderPan: cardHolderPan ?? doc.securePan,
+ };
+ if (isLink) {
+ await taavonSendDataZarinPalLink(province, data);
+ } else {
+ await taavonSendDataZarinPal(province, data);
+ }
+ return res.json({ ok: true, message: "Submitted to Taavon" });
+ } catch (err) {
+ console.error("sep-pay-request submit error", err);
+ return res.status(500).json({ error: err.message });
+ }
+});
+
//end sep ---------------------------------------------------------------------------------------------
// samasat crack
@@ -922,12 +1135,12 @@ const getPersianDate = (daysOffset = 0) => {
const jalaaliDate = toJalaali(
currentDate.getFullYear(),
currentDate.getMonth() + 1,
- currentDate.getDate()
+ currentDate.getDate(),
);
const { jy, jm, jd } = jalaaliDate;
const formattedDate = `${jy}/${String(jm).padStart(2, "0")}/${String(
- jd
+ jd,
).padStart(2, "0")}`;
return formattedDate;
@@ -940,13 +1153,13 @@ const getPersianDateForHatching = (daysOffset = 0) => {
const jalaaliDate = toJalaali(
currentDate.getFullYear(),
currentDate.getMonth() + 1,
- currentDate.getDate()
+ currentDate.getDate(),
);
const { jy, jm, jd } = jalaaliDate;
const formattedDate = `${String(jd).padStart(2, "0")}/${String(jm).padStart(
2,
- "0"
+ "0",
)}/${jy}`;
return formattedDate;
@@ -1265,14 +1478,14 @@ app.post("/samasat-users", async (req, res) => {
...updatedUnit,
PId: Id,
Province: getAllProvinces().find(
- (p) => parseInt(p.id) === parseInt(province)
+ (p) => parseInt(p.id) === parseInt(province),
)?.name,
City: getAllCities().find(
(city) =>
- parseInt(city.id) === parseInt(updatedUnit?.LocationIdCity)
+ parseInt(city.id) === parseInt(updatedUnit?.LocationIdCity),
)?.name,
};
- }
+ },
);
res.json(transformedUsers);
@@ -1586,8 +1799,8 @@ app.post("/samasat-good-sum", async (req, res) => {
const jsonData = JSON.parse(data);
res.json(
jsonData.Data?.filter(
- (option) => option?.TrackingStatus === 2
- )?.reduce((acc, item) => acc + Number(item?.GoodAmount || 0), 0)
+ (option) => option?.TrackingStatus === 2,
+ )?.reduce((acc, item) => acc + Number(item?.GoodAmount || 0), 0),
);
} catch (error) {
console.error("Error parsing JSON:", error.message);
@@ -1660,7 +1873,7 @@ app.post("/samasat-evacuation", async (req, res) => {
// jsonData.SumLosses +
jsonData.SumIllness +
jsonData.SumNaturalOccurrence +
- jsonData.SumFire
+ jsonData.SumFire,
);
}
} else {
@@ -1877,7 +2090,7 @@ async function performLogin() {
response.on("end", () => {
const csrfMatch = data.match(
- /=16.20.1"
+ }
+ },
"node_modules/bytes": {
"version": "3.1.2",
"resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz",
@@ -821,6 +855,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==",
+ "license": "MIT"
+ },
"node_modules/merge-descriptors": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz",
@@ -872,6 +912,62 @@
"node": "*"
}
},
+ "node_modules/mongodb": {
+ "version": "6.21.0",
+ "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-6.21.0.tgz",
+ "integrity": "sha512-URyb/VXMjJ4da46OeSXg+puO39XH9DeQpWCslifrRn9JWugy0D+DvvBvkm2WxmHe61O/H19JM66p1z7RHVkZ6A==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@mongodb-js/saslprep": "^1.3.0",
+ "bson": "^6.10.4",
+ "mongodb-connection-string-url": "^3.0.2"
+ },
+ "engines": {
+ "node": ">=16.20.1"
+ },
+ "peerDependencies": {
+ "@aws-sdk/credential-providers": "^3.188.0",
+ "@mongodb-js/zstd": "^1.1.0 || ^2.0.0",
+ "gcp-metadata": "^5.2.0",
+ "kerberos": "^2.0.1",
+ "mongodb-client-encryption": ">=6.0.0 <7",
+ "snappy": "^7.3.2",
+ "socks": "^2.7.1"
+ },
+ "peerDependenciesMeta": {
+ "@aws-sdk/credential-providers": {
+ "optional": true
+ },
+ "@mongodb-js/zstd": {
+ "optional": true
+ },
+ "gcp-metadata": {
+ "optional": true
+ },
+ "kerberos": {
+ "optional": true
+ },
+ "mongodb-client-encryption": {
+ "optional": true
+ },
+ "snappy": {
+ "optional": true
+ },
+ "socks": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/mongodb-connection-string-url": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/mongodb-connection-string-url/-/mongodb-connection-string-url-3.0.2.tgz",
+ "integrity": "sha512-rMO7CGo/9BFwyZABcKAWL8UJwH/Kc2x0g72uhDWzG48URRax5TCIcJ7Rc3RZqffZzO/Gwff/jyKwCU9TN8gehA==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@types/whatwg-url": "^11.0.2",
+ "whatwg-url": "^14.1.0 || ^13.0.0"
+ }
+ },
"node_modules/ms": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
@@ -981,9 +1077,10 @@
"integrity": "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag=="
},
"node_modules/punycode": {
- "version": "2.3.0",
- "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz",
- "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==",
+ "version": "2.3.1",
+ "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz",
+ "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==",
+ "license": "MIT",
"engines": {
"node": ">=6"
}
@@ -1175,6 +1272,15 @@
"node": "*"
}
},
+ "node_modules/sparse-bitfield": {
+ "version": "3.0.3",
+ "resolved": "https://registry.npmjs.org/sparse-bitfield/-/sparse-bitfield-3.0.3.tgz",
+ "integrity": "sha512-kvzhi7vqKTfkh0PZU+2D2PIllw2ymqJKujUcyPMd9Y75Nv4nPbGJZXNhxsgdQab2BmlDct1YnfQCguEvHr7VsQ==",
+ "license": "MIT",
+ "dependencies": {
+ "memory-pager": "^1.0.2"
+ }
+ },
"node_modules/sshpk": {
"version": "1.18.0",
"resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.18.0.tgz",
@@ -1242,6 +1348,18 @@
"node": ">=0.8"
}
},
+ "node_modules/tr46": {
+ "version": "5.1.1",
+ "resolved": "https://registry.npmjs.org/tr46/-/tr46-5.1.1.tgz",
+ "integrity": "sha512-hdF5ZgjTqgAntKkklYw0R03MG2x/bSzTtkxmIRw/sTNV8YXsCJ1tfLAX23lhxhHJlEf3CRCOCGGWw3vI3GaSPw==",
+ "license": "MIT",
+ "dependencies": {
+ "punycode": "^2.3.1"
+ },
+ "engines": {
+ "node": ">=18"
+ }
+ },
"node_modules/tunnel-agent": {
"version": "0.6.0",
"resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz",
@@ -1343,6 +1461,28 @@
"resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
"integrity": "sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ=="
},
+ "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==",
+ "license": "BSD-2-Clause",
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/whatwg-url": {
+ "version": "14.2.0",
+ "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-14.2.0.tgz",
+ "integrity": "sha512-De72GdQZzNTUBBChsXueQUnPKDkg/5A5zp7pFDuQAj5UFoENpiACU0wlCvzpAGnTkj++ihpKwKyYewn/XNUbKw==",
+ "license": "MIT",
+ "dependencies": {
+ "tr46": "^5.1.0",
+ "webidl-conversions": "^7.0.0"
+ },
+ "engines": {
+ "node": ">=18"
+ }
+ },
"node_modules/xml-crypto": {
"version": "0.8.5",
"resolved": "https://registry.npmjs.org/xml-crypto/-/xml-crypto-0.8.5.tgz",
@@ -1374,6 +1514,27 @@
}
},
"dependencies": {
+ "@mongodb-js/saslprep": {
+ "version": "1.4.5",
+ "resolved": "https://registry.npmjs.org/@mongodb-js/saslprep/-/saslprep-1.4.5.tgz",
+ "integrity": "sha512-k64Lbyb7ycCSXHSLzxVdb2xsKGPMvYZfCICXvDsI8Z65CeWQzTEKS4YmGbnqw+U9RBvLPTsB6UCmwkgsDTGWIw==",
+ "requires": {
+ "sparse-bitfield": "^3.0.3"
+ }
+ },
+ "@types/webidl-conversions": {
+ "version": "7.0.3",
+ "resolved": "https://registry.npmjs.org/@types/webidl-conversions/-/webidl-conversions-7.0.3.tgz",
+ "integrity": "sha512-CiJJvcRtIgzadHCYXw7dqEnMNRjhGZlYK05Mj9OyktqV8uVT8fD2BFOB7S1uwBE3Kj2Z+4UyPmFw/Ixgw/LAlA=="
+ },
+ "@types/whatwg-url": {
+ "version": "11.0.5",
+ "resolved": "https://registry.npmjs.org/@types/whatwg-url/-/whatwg-url-11.0.5.tgz",
+ "integrity": "sha512-coYR071JRaHa+xoEvvYqvnIHaVqaYrLPbsufM9BF63HkwI5Lgmy2QR8Q5K/lYDYo5AK82wOvSOS0UsLTpTG7uQ==",
+ "requires": {
+ "@types/webidl-conversions": "*"
+ }
+ },
"accepts": {
"version": "1.3.8",
"resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz",
@@ -1495,6 +1656,11 @@
}
}
},
+ "bson": {
+ "version": "6.10.4",
+ "resolved": "https://registry.npmjs.org/bson/-/bson-6.10.4.tgz",
+ "integrity": "sha512-WIsKqkSC0ABoBJuT1LEX+2HEvNmNKKgnTAyd0fL8qzK4SH2i9NXg+t08YtdZp/V9IZ33cxe3iV4yM0qg8lMQng=="
+ },
"bytes": {
"version": "3.1.2",
"resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz",
@@ -1978,6 +2144,11 @@
"resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz",
"integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ=="
},
+ "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=="
+ },
"merge-descriptors": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz",
@@ -2011,6 +2182,25 @@
"resolved": "https://registry.npmjs.org/moment/-/moment-2.29.4.tgz",
"integrity": "sha512-5LC9SOxjSc2HF6vO2CyuTDNivEdoz2IvyJJGj6X8DJ0eFyfszE0QiEd+iXmBvUP3WHxSjFH/vIsA0EN00cgr8w=="
},
+ "mongodb": {
+ "version": "6.21.0",
+ "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-6.21.0.tgz",
+ "integrity": "sha512-URyb/VXMjJ4da46OeSXg+puO39XH9DeQpWCslifrRn9JWugy0D+DvvBvkm2WxmHe61O/H19JM66p1z7RHVkZ6A==",
+ "requires": {
+ "@mongodb-js/saslprep": "^1.3.0",
+ "bson": "^6.10.4",
+ "mongodb-connection-string-url": "^3.0.2"
+ }
+ },
+ "mongodb-connection-string-url": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/mongodb-connection-string-url/-/mongodb-connection-string-url-3.0.2.tgz",
+ "integrity": "sha512-rMO7CGo/9BFwyZABcKAWL8UJwH/Kc2x0g72uhDWzG48URRax5TCIcJ7Rc3RZqffZzO/Gwff/jyKwCU9TN8gehA==",
+ "requires": {
+ "@types/whatwg-url": "^11.0.2",
+ "whatwg-url": "^14.1.0 || ^13.0.0"
+ }
+ },
"ms": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
@@ -2095,9 +2285,9 @@
"integrity": "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag=="
},
"punycode": {
- "version": "2.3.0",
- "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz",
- "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA=="
+ "version": "2.3.1",
+ "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz",
+ "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg=="
},
"qs": {
"version": "6.5.3",
@@ -2257,6 +2447,14 @@
}
}
},
+ "sparse-bitfield": {
+ "version": "3.0.3",
+ "resolved": "https://registry.npmjs.org/sparse-bitfield/-/sparse-bitfield-3.0.3.tgz",
+ "integrity": "sha512-kvzhi7vqKTfkh0PZU+2D2PIllw2ymqJKujUcyPMd9Y75Nv4nPbGJZXNhxsgdQab2BmlDct1YnfQCguEvHr7VsQ==",
+ "requires": {
+ "memory-pager": "^1.0.2"
+ }
+ },
"sshpk": {
"version": "1.18.0",
"resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.18.0.tgz",
@@ -2301,6 +2499,14 @@
"punycode": "^2.1.1"
}
},
+ "tr46": {
+ "version": "5.1.1",
+ "resolved": "https://registry.npmjs.org/tr46/-/tr46-5.1.1.tgz",
+ "integrity": "sha512-hdF5ZgjTqgAntKkklYw0R03MG2x/bSzTtkxmIRw/sTNV8YXsCJ1tfLAX23lhxhHJlEf3CRCOCGGWw3vI3GaSPw==",
+ "requires": {
+ "punycode": "^2.3.1"
+ }
+ },
"tunnel-agent": {
"version": "0.6.0",
"resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz",
@@ -2378,6 +2584,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": "14.2.0",
+ "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-14.2.0.tgz",
+ "integrity": "sha512-De72GdQZzNTUBBChsXueQUnPKDkg/5A5zp7pFDuQAj5UFoENpiACU0wlCvzpAGnTkj++ihpKwKyYewn/XNUbKw==",
+ "requires": {
+ "tr46": "^5.1.0",
+ "webidl-conversions": "^7.0.0"
+ }
+ },
"xml-crypto": {
"version": "0.8.5",
"resolved": "https://registry.npmjs.org/xml-crypto/-/xml-crypto-0.8.5.tgz",
diff --git a/package.json b/package.json
index 8da66bd..74b79ee 100644
--- a/package.json
+++ b/package.json
@@ -12,6 +12,7 @@
"license": "ISC",
"dependencies": {
"axios": "^1.7.2",
+ "mongodb": "^6.10.0",
"body-parser": "^1.20.2",
"cors": "^2.8.5",
"crypto-js": "^4.2.0",