export interface TemplateEmail { subject: string; content: string; } export interface Config { subscriptionPlans: string[]; staff: { [email: string]: string; }; interactions: { kinds: string[]; tags: string[]; }; templates?: TemplateEmail[]; } /** * A Company in the CRM database */ export interface Company { createdAt?: string; updatedAt?: string; name: string; address?: string; url?: string; contacts: Contact[]; apps: App[]; interactions: Interaction[]; noFollowUp?: boolean; } /** * A contact in a company */ export interface Contact { firstName?: string; lastName?: string; role?: string; email: string; linkedin?: string; github?: string; url?: string; twitter?: string; createdAt?: string; updatedAt?: string; } /** * One of the apps (project) with a company */ export interface App { appName: string; plan: string; email: string; createdAt: string; updatedAt: string; upgradedAt?: string; churnedAt?: string; } /** * An interaction with the company */ export interface Interaction { kind: string; from: string; to?: string; summary: string; date: string; updatedAt?: string; tag?: string; followUpDate?: string; } /** * Fills up required fields for a company */ export declare function newCompany(data: Partial): Company; export declare function hasInteraction(company: Company, summary: string): boolean; export declare function companyEmail(company: Company): string; export interface Printable { printAsText: () => Promise; } export interface PrintableArray { content: T[]; printAsText: () => Promise; } export interface Choice { message: string; value: string; } /** * Full content of the CRM database */ export interface Database { companies: Company[]; config: Config; }