feature/IO-3357-Reynolds-and-Reynolds-DMS-API-Integration - Checkpoint - Remove old attempt at Reynolds Integration in favor of new library.

This commit is contained in:
Dave
2025-10-29 10:42:32 -04:00
parent 319f3220ed
commit e06f0f9918
36 changed files with 2468 additions and 3736 deletions

25
server/rr/rr-client.js Normal file
View File

@@ -0,0 +1,25 @@
const { RRClient } = require("./lib/index.cjs");
/**
* Build an RR client using env credentials.
* @param {{logger?: {debug?:Function,info?:Function,warn?:Function,error?:Function}}} opts
*/
function makeRRClient({ logger } = {}) {
const baseUrl = process.env.RR_BASE_URL;
const username = process.env.RR_USERNAME;
const password = process.env.RR_PASSWORD;
if (!baseUrl || !username || !password) {
throw new Error("RR creds missing (RR_BASE_URL, RR_USERNAME, RR_PASSWORD).");
}
return new RRClient({
baseUrl,
username,
password,
logger
// retries: { max: 3 }, // optional: override retry policy
});
}
module.exports = { makeRRClient };