n8n
Version:
n8n Workflow Automation Tool
15 lines • 637 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.maskCreditsForDisplay = maskCreditsForDisplay;
const api_types_1 = require("@n8n/api-types");
function maskCreditsForDisplay(credits, activationCapped, creditsPerThread) {
if (activationCapped) {
return {
creditsQuota: api_types_1.UNLIMITED_CREDITS,
creditsClaimed: 0,
...(credits.quotaLocked !== undefined ? { quotaLocked: credits.quotaLocked } : {}),
};
}
return { ...credits, ...(creditsPerThread ? { creditsPerThread } : {}) };
}
//# sourceMappingURL=instance-ai-credit-display.js.map