@mazaventures/valentine
Version:
Toolkit for Venture Capital firms to run their back office efficiently and openly
74 lines • 2.59 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.NAVCalculationSchema = exports.ValuationMethodSchema = exports.FundSchema = exports.UpdateSchema = exports.MetricSchema = exports.InvestmentSchema = exports.CompanySchema = void 0;
const zod_1 = require("zod");
// Company Types
exports.CompanySchema = zod_1.z.object({
id: zod_1.z.string(),
name: zod_1.z.string(),
description: zod_1.z.string().optional(),
sector: zod_1.z.string(),
stage: zod_1.z.enum(['SEED', 'SERIES_A', 'SERIES_B', 'SERIES_C', 'SERIES_D', 'GROWTH', 'PRE_IPO']),
founded: zod_1.z.date(),
website: zod_1.z.string().url().optional(),
});
// Investment Types
exports.InvestmentSchema = zod_1.z.object({
id: zod_1.z.string(),
companyId: zod_1.z.string(),
amount: zod_1.z.number(),
currency: zod_1.z.string(),
date: zod_1.z.date(),
round: zod_1.z.string(),
ownership: zod_1.z.number(),
valuation: zod_1.z.number(),
type: zod_1.z.enum(['PRIMARY', 'SECONDARY', 'CONVERTIBLE_NOTE', 'SAFE']),
terms: zod_1.z.record(zod_1.z.string()).optional(),
});
// Portfolio Update Types
exports.MetricSchema = zod_1.z.object({
name: zod_1.z.string(),
value: zod_1.z.union([zod_1.z.string(), zod_1.z.number()]),
date: zod_1.z.date(),
});
exports.UpdateSchema = zod_1.z.object({
id: zod_1.z.string(),
companyId: zod_1.z.string(),
date: zod_1.z.date(),
type: zod_1.z.enum(['MONTHLY', 'QUARTERLY', 'ANNUAL', 'ADHOC']),
metrics: zod_1.z.array(exports.MetricSchema),
notes: zod_1.z.string().optional(),
attachments: zod_1.z.array(zod_1.z.string()).optional(),
});
// Fund Types
exports.FundSchema = zod_1.z.object({
id: zod_1.z.string(),
name: zod_1.z.string(),
vintage: zod_1.z.number(),
size: zod_1.z.number(),
currency: zod_1.z.string(),
status: zod_1.z.enum(['RAISING', 'INVESTING', 'FULLY_INVESTED', 'HARVESTING']),
strategy: zod_1.z.string().optional(),
});
// NAV Types
exports.ValuationMethodSchema = zod_1.z.enum([
'LAST_ROUND',
'MARK_TO_MARKET',
'COMPARABLE_COMPANIES',
'DCF',
'WRITE_OFF',
]);
exports.NAVCalculationSchema = zod_1.z.object({
id: zod_1.z.string(),
fundId: zod_1.z.string(),
date: zod_1.z.date(),
totalValue: zod_1.z.number(),
currency: zod_1.z.string(),
holdings: zod_1.z.array(zod_1.z.object({
companyId: zod_1.z.string(),
value: zod_1.z.number(),
method: exports.ValuationMethodSchema,
notes: zod_1.z.string().optional(),
})),
});
//# sourceMappingURL=types.js.map