@memori.ai/memori-react
Version:
[](https://www.npmjs.com/package/@memori.ai/memori-react)  ;
exports.getCredits = void 0;
const getCredits = async ({ operation = 'session_creation', baseUrl, userID, userName, tenant, }) => {
if (!userID && !userName) {
throw new Error('Either userID or userName must be provided');
}
const resp = await fetch(`${baseUrl}/api/verify-tokens`, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({
operation,
userID,
userName,
tenant,
}),
});
if (!resp.ok) {
throw new Error('Failed to fetch credits');
}
return resp.json();
};
exports.getCredits = getCredits;
//# sourceMappingURL=credits.js.map