Files
zeekay 32969de598 fork: rename internal workspace packages to @hanzochat scope
librechat-data-provider  → @hanzochat/data-provider
@librechat/data-schemas  → @hanzochat/data-schemas
@librechat/client        → @hanzochat/client
(@hanzochat/api already forked; external @librechat/agents fork follows)

All imports, package.json names/deps, tsconfig path aliases, jest
moduleNameMapper, and rollup/vite build aliases updated. The data-provider
react-query subpath resolves via the exports map. Lockfiles regenerated in a
follow-on once the canonical package manager is confirmed.
2026-07-14 05:55:49 -07:00

22 lines
703 B
JavaScript

const { getRetentionExpiry: getRetentionExpiryWithDeps } = require('@hanzochat/api');
const { logger, createTempChatExpirationDate } = require('@hanzochat/data-schemas');
const db = require('~/models');
/**
* Returns `{ expiredAt }` when the request indicates data retention applies, otherwise `{}`.
* Spread into file data objects before calling createFile.
* @param {ServerRequest} req
* @returns {Promise<{ expiredAt?: Date | null }>}
*/
async function getRetentionExpiry(req) {
return getRetentionExpiryWithDeps(req, {
getConvo: db.getConvoRetention ?? db.getConvo,
createExpirationDate: createTempChatExpirationDate,
logger,
});
}
module.exports = {
getRetentionExpiry,
};