Index

prisma/seed.ts

actionData
Type : []
Default value : [ { name: "*" }, { name: "iam:CreatePolicy" }, { name: "iam:DeletePolicy" }, { name: "iam:CreateRole" }, { name: "iam:ReadRole" }, { name: "iam:UpdateRole" }, { name: "iam:DeleteRole" }, { name: "project:ReadProject" }, { name: "project:CreateProject" }, { name: "project:DeleteProject" }, { name: "project:CreateKey" }, { name: "model:PushMetrics" }, { name: "model:CreateModel" }, { name: "model:ReadModel" }, { name: "model:UpdateModel" }, { name: "model:DeleteModel" }, { name: "compliance:SubmitCompliance" }, { name: "compliance:ReadCompliance" }, { name: "compliance:ReadRisk" }, { name: "compliance:SubmitRisk" }, { name: "compliance:UpdateRisk" }, { name: "compliance:ReadEvidence" }, { name: "compliance:SubmitEvidence" }, { name: "compliance:ReadSettings" }, { name: "compliance:CreateRule" }, { name: "compliance:ReadRule" }, { name: "compliance:UpdateRule" }, { name: "compliance:DeleteRule" }, { name: "compliance:CreatePolicy" }, { name: "compliance:ReadPolicy" }, { name: "compliance:UpdatePolicy" }, { name: "compliance:DeletePolicy" }, ]
businessUnitData
Type : []
Default value : [ { name: "Marketing & Sales", approvers: [ "mohamed_abusaid@mckinsey.com", "maria_olivia_lihn@mckinsey.com", "mohammed_elnabawy@mckinsey.com", "pallavi_khatri@mckinsey.com", // added for testing will remove it later ], }, { name: "Legal", approvers: [ "mohamed_abusaid@mckinsey.com", "maria_olivia_lihn@mckinsey.com", "mohammed_elnabawy@mckinsey.com", "pallavi_khatri@mckinsey.com", // added for testing will remove it later ], }, { name: "Distribution", approvers: [ "mohamed_abusaid@mckinsey.com", "maria_olivia_lihn@mckinsey.com", "mohammed_elnabawy@mckinsey.com", "pallavi_khatri@mckinsey.com", // added for testing will remove it later ], }, { name: "Finance", approvers: [ "mohamed_abusaid@mckinsey.com", "maria_olivia_lihn@mckinsey.com", "mohammed_elnabawy@mckinsey.com", "pallavi_khatri@mckinsey.com", // added for testing will remove it later ], }, { name: "Information Technology", approvers: [ "mohamed_abusaid@mckinsey.com", "maria_olivia_lihn@mckinsey.com", "mohammed_elnabawy@mckinsey.com", "pallavi_khatri@mckinsey.com", // added for testing will remove it later ], }, { name: "Store operations", approvers: [ "mohamed_abusaid@mckinsey.com", "maria_olivia_lihn@mckinsey.com", "mohammed_elnabawy@mckinsey.com", "pallavi_khatri@mckinsey.com", // added for testing will remove it later ], }, { name: "Research and Development", approvers: [ "mohamed_abusaid@mckinsey.com", "maria_olivia_lihn@mckinsey.com", "mohammed_elnabawy@mckinsey.com", "pallavi_khatri@mckinsey.com", // added for testing will remove it later ], }, ]

approvers should be lowercase email ids since prisma scaler list filters do not support case sensitive text

chatData
Type : Prisma.ChatUncheckedCreateInput[]
Default value : [ { id: 1, title: "ChatA", userId: "test@me.com", status: "ACTIVE", summary: "User started chat", }, { id: 2, title: "ChatB", userId: "test@me.com", status: "ACTIVE", summary: "User started chat", }, { id: 3, title: "ChatC", userId: "test@me.com", status: "ACTIVE", summary: "User started chat", }, ]
modelData
Type : []
Default value : [ // GenAI Customer Chatbot { name: "Response Generation", slug: "response-generation", projectSlug: "genaicustomer-chatbot", provider: "OPENTELEMETRY", lastSeenAt: new Date(), lastSyncedAt: new Date(), metricType: "MODEL_PERFORMANCE", }, // GenAI Financial Forecasts { name: "AI Generated Forecasts", slug: "ai-generated-forecasts", projectSlug: "genai-financial-forecast", provider: "OPENTELEMETRY", lastSeenAt: new Date(), lastSyncedAt: new Date(), metricType: "MODEL_PERFORMANCE", }, // { name: "Anomaly Detection", slug: "anomaly-detection", projectSlug: "genai-financial-forecast", provider: "OPENTELEMETRY", lastSeenAt: new Date(), lastSyncedAt: new Date() }, // Next Best Action { name: "Recommendation System", slug: "recommendation-system", projectSlug: "next-best-action", provider: "OPENTELEMETRY", lastSeenAt: new Date(), lastSyncedAt: new Date(), metricType: "BUSINESS", }, { name: "Business Metrics", slug: "business-metrics", projectSlug: "next-best-action", provider: "OPENTELEMETRY", lastSeenAt: new Date(), lastSyncedAt: new Date(), metricType: "MODEL_PERFORMANCE", }, // Document Summarization LLM { name: "Text Summarization", slug: "text-summarization", projectSlug: "doc-summary-llm", provider: "OPENTELEMETRY", lastSeenAt: new Date(), lastSyncedAt: new Date(), metricType: "MODEL_PERFORMANCE", }, // { name: "Named Entity Recognition", slug: "named-entity-recognition", projectSlug: "doc-summary-llm", provider: "OPENTELEMETRY", lastSeenAt: new Date(), lastSyncedAt: new Date() }, // Fraud Detection { name: "Fraud Detection", slug: "fraud-detection", projectSlug: "fraud-detection", provider: "OPENTELEMETRY", lastSeenAt: new Date(), lastSyncedAt: new Date(), metricType: "BUSINESS", }, // { name: "Anomaly Detection", slug: "anomaly-detection", projectSlug: "fraud-detection", provider: "OPENTELEMETRY", lastSeenAt: new Date(), lastSyncedAt: new Date() }, // Claims Network Optimization { name: "Network Optimization", slug: "network-optimization", projectSlug: "claims-network-optimization", provider: "OPENTELEMETRY", lastSeenAt: new Date(), lastSyncedAt: new Date(), metricType: "BUSINESS", }, // { name: "Claims Processing", slug: "claims-processing", projectSlug: "claims-network-optimization", provider: "OPENTELEMETRY", lastSeenAt: new Date(), lastSyncedAt: new Date() }, // GenAI Executive Reports { name: "Executive Reports", slug: "executive-reports", projectSlug: "genaiex-reports", provider: "OPENTELEMETRY", lastSeenAt: new Date(), lastSyncedAt: new Date(), metricType: "BUSINESS", }, // { name: "Named Entity Recognition", slug: "named-entity-recognition", projectSlug: "genaiex-reports", provider: "OPENTELEMETRY", lastSeenAt: new Date(), lastSyncedAt: new Date() }, // Retention/Winback { name: "Churn Prediction", slug: "churn-prediction", projectSlug: "retention-winback", provider: "OPENTELEMETRY", lastSeenAt: new Date(), lastSyncedAt: new Date(), metricType: "BUSINESS", }, // { name: "Winback Campaign Optimization", slug: "winback-campaign-optimization", projectSlug: "retention-winback", provider: "OPENTELEMETRY", lastSeenAt: new Date(), lastSyncedAt: new Date() }, // Recommendation Engine { name: "Collaborative Filtering", slug: "collaborative-filtering", projectSlug: "recommendation-engine", provider: "OPENTELEMETRY", lastSeenAt: new Date(), lastSyncedAt: new Date(), metricType: "BUSINESS", }, // { name: "Content-Based Filtering", slug: "content-based-filtering", projectSlug: "recommendation-engine", provider: "OPENTELEMETRY", lastSeenAt: new Date(), lastSyncedAt: new Date() }, // Customer Segmentation { name: "Clustering", slug: "clustering", projectSlug: "customer-segmentation", provider: "OPENTELEMETRY", lastSeenAt: new Date(), lastSyncedAt: new Date(), metricType: "BUSINESS", }, // { name: "Demographic Analysis", slug: "demographic-analysis", projectSlug: "customer-segmentation", provider: "OPENTELEMETRY", lastSeenAt: new Date(), lastSyncedAt: new Date() }, // Cyberthreat Detection { name: "Intrusion Detection", slug: "intrusion-detection", projectSlug: "cyberthreat-detection", provider: "OPENTELEMETRY", lastSeenAt: new Date(), lastSyncedAt: new Date(), metricType: "BUSINESS", }, // { name: "Malware Detection", slug: "malware-detection", projectSlug: "cyberthreat-detection", provider: "OPENTELEMETRY", lastSeenAt: new Date(), lastSyncedAt: new Date() }, // Predict Delivery Time { name: "Delivery Time Estimation", slug: "delivery-time-estimation", projectSlug: "predict-delivery-time", provider: "OPENTELEMETRY", lastSeenAt: new Date(), lastSyncedAt: new Date(), metricType: "BUSINESS", }, // { name: "Route Optimization", slug: "route-optimization", projectSlug: "predict-delivery-time", provider: "OPENTELEMETRY", lastSeenAt: new Date(), lastSyncedAt: new Date() }, // Investment Portfolio Optimization { name: "Portfolio Optimization", slug: "portfolio-optimization", projectSlug: "investment-portfolio-optimization", provider: "OPENTELEMETRY", lastSeenAt: new Date(), lastSyncedAt: new Date(), metricType: "BUSINESS", }, // { name: "Risk Assessment", slug: "risk-assessment", projectSlug: "investment-portfolio-optimization", provider: "OPENTELEMETRY", lastSeenAt: new Date(), lastSyncedAt: new Date() }, // Loan Approval Automation // { name: "Credit Scoring", slug: "credit-scoring", projectSlug: "loan-approval-automation", provider: "OPENTELEMETRY", lastSeenAt: new Date(), lastSyncedAt: new Date() }, { name: "Loan Approval Prediction", slug: "loan-approval-prediction", projectSlug: "loan-approval-automation", provider: "OPENTELEMETRY", lastSeenAt: new Date(), lastSyncedAt: new Date(), metricType: "BUSINESS", }, // IT Support Chatbot // { name: "Intent Recognition", slug: "intent-recognition", projectSlug: "it-support-chatbot", provider: "OPENTELEMETRY", lastSeenAt: new Date(), lastSyncedAt: new Date() }, { name: "Response Generation", slug: "response-generation-it", projectSlug: "it-support-chatbot", provider: "OPENTELEMETRY", lastSeenAt: new Date(), lastSyncedAt: new Date(), metricType: "BUSINESS", }, // Automated IT Report Generation { name: "Report Generation", slug: "report-generation", projectSlug: "automated-it-report-generation", provider: "OPENTELEMETRY", lastSeenAt: new Date(), lastSyncedAt: new Date(), metricType: "BUSINESS", }, // { name: "Data Aggregation", slug: "data-aggregation", projectSlug: "automated-it-report-generation", provider: "OPENTELEMETRY", lastSeenAt: new Date(), lastSyncedAt: new Date() }, // Risk Assessment { name: "Risk Scoring", slug: "risk-scoring", projectSlug: "risk-assessment", provider: "OPENTELEMETRY", lastSeenAt: new Date(), lastSyncedAt: new Date(), metricType: "BUSINESS", }, // { name: "Risk Mitigation", slug: "risk-mitigation", projectSlug: "risk-assessment", provider: "OPENTELEMETRY", lastSeenAt: new Date(), lastSyncedAt: new Date() }, // Legal Document Generation Assistant { name: "Document Generation", slug: "document-generation", projectSlug: "legal-document-generation-assistant", provider: "OPENTELEMETRY", lastSeenAt: new Date(), lastSyncedAt: new Date(), metricType: "BUSINESS", }, // { name: "Legal Compliance Checking", slug: "legal-compliance-checking", projectSlug: "legal-document-generation-assistant", provider: "OPENTELEMETRY", lastSeenAt: new Date(), lastSyncedAt: new Date() }, // Predictive Maintenance for ATMs { name: "Failure Prediction", slug: "failure-prediction", projectSlug: "predictive-maintenance-for-atms", provider: "OPENTELEMETRY", lastSeenAt: new Date(), lastSyncedAt: new Date(), metricType: "BUSINESS", }, // { name: "Maintenance Scheduling", slug: "maintenance-scheduling", projectSlug: "predictive-maintenance-for-atms", provider: "OPENTELEMETRY", lastSeenAt: new Date(), lastSyncedAt: new Date() }, // Dispatch and Routing Engine // { name: "Route Optimization", slug: "route-optimization", projectSlug: "dispatch-and-routing-engine", provider: "OPENTELEMETRY", lastSeenAt: new Date(), lastSyncedAt: new Date() }, { name: "Dispatch Scheduling", slug: "dispatch-scheduling", projectSlug: "dispatch-and-routing-engine", provider: "OPENTELEMETRY", lastSeenAt: new Date(), lastSyncedAt: new Date(), metricType: "MODEL_PERFORMANCE", }, // Capacity Planning // { name: "Demand Forecasting", slug: "demand-forecasting", projectSlug: "capacity-planning", provider: "OPENTELEMETRY", lastSeenAt: new Date(), lastSyncedAt: new Date() }, { name: "Resource Allocation", slug: "resource-allocation", projectSlug: "capacity-planning", provider: "OPENTELEMETRY", lastSeenAt: new Date(), lastSyncedAt: new Date(), metricType: "MODEL_PERFORMANCE", }, // // Acquisition // { name: "Customer Acquisition Prediction", slug: "customer-acquisition-prediction", projectSlug: "acquisition", provider: "OPENTELEMETRY", lastSeenAt: new Date(), lastSyncedAt: new Date() }, // { name: "Marketing Campaign Optimization", slug: "marketing-campaign-optimization", projectSlug: "acquisition", provider: "OPENTELEMETRY", lastSeenAt: new Date(), lastSyncedAt: new Date() }, // // Estimated Net Worth // { name: "Liquidity Estimation", slug: "liquidity-estimation", projectSlug: "estimated-net-worth", provider: "OPENTELEMETRY", lastSeenAt: new Date(), lastSyncedAt: new Date() }, // { name: "Financial Health Analysis", slug: "financial-health-analysis", projectSlug: "estimated-net-worth", provider: "OPENTELEMETRY", lastSeenAt: new Date(), lastSyncedAt: new Date() }, ]
prisma
Default value : new PrismaClient()
projectData
Type : []
Default value : [ { name: "GenAI Customer Chatbot", isPublic: true, slug: "genaicustomer-chatbot", description: "Implement a conversational AI chatbot to handle common customer queries and issues post-purchase to improve customer satisfaction and loyalty.", businessObjective: "Reduce customer support costs by automating routine inquiries while increasing customer satisfaction.", businessUnit: "Marketing & Sales", estimatedRevenue: 800000, budget: 200000, targetVariable: "Customer repurchases", teamMembers: "mo@me.com", stage: "PILOT", ownerId: "mohammed_elnabawy@mckinsey.com", }, { name: "GenAI Financial Forecasts", isPublic: true, slug: "genai-financial-forecast", description: "Identify financial trends in market and create personalized forecasts using generative AI to improve customer interactions.", businessObjective: "Increase customer loyalty by providing personalized financial forecasts.", businessUnit: "Information Technology", estimatedRevenue: 700000, budget: 120000, targetVariable: "Interactions", teamMembers: "olivia@me.com, pallavi@me.com, nab@me.com, mo@me.com", stage: "PILOT", ownerId: "mohammed_elnabawy@mckinsey.com", }, { name: "Next Best Action", slug: "next-best-action", description: "Leverage customer, transaction, and product data to provide personalized, optimized recommendations for promotions, pricing, inventory, cross-selling and staffing stores, adapting continuously to maximize outcomes based on customer behaviors.", businessObjective: "Increase revenue by providing personalized recommendations to customers.", businessUnit: "Marketing & Sales", estimatedRevenue: 950000, budget: 250000, targetVariable: "Uplift", teamMembers: "veerain@me.com, pallavi@me.com, test@me.com", stage: "ASSESS", ownerId: "mohammed_elnabawy@mckinsey.com", }, { name: "Document Summarization LLM", slug: "doc-summary-llm", description: "Summarize and synthesize large documents using generative AI, improving requests throughput.", businessObjective: "Lower time-to-insights and response-time by automatically summarizing large and complex documents.", businessUnit: "Legal", estimatedRevenue: 600000, budget: 100000, targetVariable: "Time-to-insights", teamMembers: "veerain@me.com, pallavi@me.com", stage: "BUILD", ownerId: "mohammed_elnabawy@mckinsey.com", }, { name: "Fraud Detection", isPublic: true, slug: "fraud-detection", description: "Detect and prevent fraud in real-time by analyzing customer, transaction, and product data to identify suspicious activity and alert the appropriate teams.", businessUnit: "Legal", businessObjective: "Reduce fraud losses by detecting and preventing fraudulent transactions.", estimatedRevenue: 500000, budget: 100000, targetVariable: "Identified fraudulent transactions", stage: "SCALE", teamMembers: "nab@me.com, hamza@me.com", ownerId: "mohammed_elnabawy@mckinsey.com", }, { name: "Claims Network Optimization", slug: "claims-network-optimization", description: "Optimize the claims network by analyzing historical claims data to identify the best providers for each claim, reducing costs and improving customer satisfaction.", businessUnit: "Distribution", businessObjective: "Reduce claims costs by optimizing the claims network.", estimatedRevenue: 450000, budget: 200000, targetVariable: "Claims cost", stage: "BUILD", teamMembers: "nab@me.com, hamza@me.com", ownerId: "mohammed_elnabawy@mckinsey.com", }, { name: "GenAI Executive Reports", slug: "genaiex-reports", description: "Improve visibility and reduce time destined to reporting, by creating daily/monthly automatic and reliable executive summaries and reports.", businessUnit: "Distribution", businessObjective: "Reduce waste-time in reporting for monthly meeting preparations.", estimatedRevenue: 300000, budget: 80000, targetVariable: "Time-to-insights", stage: "ASSESS", teamMembers: "nab@me.com, hamza@me.com", ownerId: "mohammed_elnabawy@mckinsey.com", }, { name: "Retention/Winback", slug: "retention-winback", description: "Identify customers with high likelihood of ending their relationship with the company and take proactive steps to retain them.", businessUnit: "Distribution", businessObjective: "Reduce customer churn by identifying customers at risk of leaving and taking proactive steps to retain them.", estimatedRevenue: 500000, budget: 100000, targetVariable: "Customer churn", stage: "PILOT", teamMembers: "nab@me.com, hamza@me.com", ownerId: "mohammed_elnabawy@mckinsey.com", }, { name: "Recommendation engine", isPublic: true, slug: "recommendation-engine", description: "Provide personalized recommendations to customers based on their past purchases and preferences.", businessUnit: "Marketing & Sales", businessObjective: "Increase revenue by providing personalized recommendations to customers.", estimatedRevenue: 800000, budget: 400000, targetVariable: "Revenue", stage: "SCALE", teamMembers: "nab@me.com, hamza@me.com", ownerId: "mohammed_elnabawy@mckinsey.com", }, { name: "Customer Segmentation", slug: "customer-segmentation", description: "Segment customers based on their past purchases and preferences to improve marketing and sales efforts.", businessUnit: "Marketing & Sales", businessObjective: "Identify similar customers to improve marketing and sales efforts.", estimatedRevenue: 500000, budget: 300000, targetVariable: "Customer segments", stage: "SCALE", teamMembers: "nab@me.com, hamza@me.com", ownerId: "mohammed_elnabawy@mckinsey.com", }, { name: "Cyberthreat Detection", slug: "cyberthreat-detection", description: "Detect and prevent cyberthreats in real-time by analyzing network, endpoint, and user data to identify suspicious activity and alert the appropriate teams.", businessUnit: "Information Technology", businessObjective: "Reduce cyberthreats by detecting and preventing suspicious activity.", estimatedRevenue: 500000, budget: 100000, targetVariable: "Identified threads", stage: "ASSESS", teamMembers: "nab@me.com, hamza@me.com", ownerId: "mohammed_elnabawy@mckinsey.com", }, { name: "Predict delivery time", slug: "predict-delivery-time", description: "Predict delivery time based on historical delivery data to improve customer satisfaction.", businessUnit: "Store operations", businessObjective: "Enhance customer satisfaction by leveraging historical delivery data to accurately predict delivery times.", estimatedRevenue: 450000, budget: 60000, targetVariable: "Delivery time", stage: "BUILD", teamMembers: "nab@me.com, hamza@me.com", ownerId: "mohammed_elnabawy@mckinsey.com", }, { name: "Investment Portfolio Optimization", slug: "investment-portfolio-optimization", description: "Optimize investment portfolios by analyzing market data and historical performance to recommend asset allocations that maximize returns while minimizing risk.", businessUnit: "Distribution", businessObjective: "Maximize investment returns while maintaining a balanced risk profile.", estimatedRevenue: 500000, budget: 100000, targetVariable: "Portfolio Return Rate", stage: "SCALE", teamMembers: "", ownerId: "mohammed_elnabawy@mckinsey.com", }, { name: "Loan Approval Automation", slug: "loan-approval-automation", description: "Automate the loan approval process by using machine learning models to assess credit risk and approve or reject loan applications.", businessUnit: "Distribution", businessObjective: "Increase the efficiency and accuracy of the loan approval process.", estimatedRevenue: 600000, budget: 100000, targetVariable: "Approved loans", stage: "PILOT", teamMembers: "", ownerId: "mohammed_elnabawy@mckinsey.com", }, { name: "IT support chatbot", slug: "it-support-chatbot", description: "Implement an AI chatbot to handle routine IT support queries, reducing the workload on human support staff.", businessUnit: "Information Technology", businessObjective: "Improve the efficiency of IT support services.", estimatedRevenue: 200000, budget: 120000, targetVariable: "Issue Resolution Rate", stage: "SCALE", teamMembers: "", ownerId: "mohammed_elnabawy@mckinsey.com", }, { name: "Automated IT report generation", slug: "automated-it-report-generation", description: "Automate the generation of IT reports by analyzing system logs and performance metrics to provide actionable insights.", businessUnit: "Information Technology", businessObjective: "Increase the speed and accuracy of IT report generation.", estimatedRevenue: 260000, budget: 120000, targetVariable: "Report Accuracy", stage: "ASSESS", teamMembers: "", ownerId: "mohammed_elnabawy@mckinsey.com", }, { name: "Risk Assessment", slug: "risk-assessment", description: "Use machine learning models to assess legal risks associated with various business decisions, helping to mitigate potential legal issues.", businessUnit: "Legal", businessObjective: "Minimize legal risks and ensure compliance with regulations.", estimatedRevenue: 750000, budget: 100000, targetVariable: "Risk Score", stage: "PILOT", teamMembers: "", ownerId: "mohammed_elnabawy@mckinsey.com", }, { name: "Legal document generation Assistant", slug: "legal-document-generation-assistant", description: "Develop an AI assistant to automate the creation of legal documents, ensuring accuracy and compliance with legal standards.", businessUnit: "Legal", businessObjective: "Increase the efficiency and accuracy of legal document creation.", estimatedRevenue: 820000, budget: 100000, targetVariable: "Document Accuracy", stage: "ASSESS", teamMembers: "", ownerId: "mohammed_elnabawy@mckinsey.com", }, { name: "Predictive Maintenance for ATMs", slug: "predictive-maintenance-for-atms", description: "Implement predictive maintenance models to forecast ATM failures and schedule maintenance proactively, reducing downtime.", businessUnit: "Store operations", businessObjective: "Minimize ATM downtime and maintenance costs.", estimatedRevenue: 860000, budget: 60000, targetVariable: "Time to Failure", stage: "PILOT", teamMembers: "", ownerId: "mohammed_elnabawy@mckinsey.com", }, { name: "Dispatch and Routing Engine", slug: "dispatch-and-routing-engine", description: "Optimize the dispatch and routing of delivery vehicles using machine learning to reduce delivery times and costs.", businessUnit: "Store operations", businessObjective: "Improve delivery efficiency and reduce operational costs.", estimatedRevenue: 520000, budget: 120000, targetVariable: "Delivery Time", stage: "BUILD", teamMembers: "", ownerId: "mohammed_elnabawy@mckinsey.com", }, { name: "Capacity Planning", slug: "capacity-planning", description: "Use machine learning models to forecast demand and optimize inventory levels, ensuring that stores are adequately stocked.", businessUnit: "Store operations", businessObjective: "Improve inventory management and reduce stockouts or overstock situations.", estimatedRevenue: 790000, budget: 50000, targetVariable: "Inventory Level Accuracy", stage: "SCALE", teamMembers: "", ownerId: "mohammed_elnabawy@mckinsey.com", }, { name: "Acquisition", slug: "acquisition", description: "Optimize add campaigns to ensure the generation of relevant leads and increase the conversion rate.", businessUnit: "Marketing & Sales", businessObjective: "Acquire more clients via marketing channels.", estimatedRevenue: 900000, budget: 40000, targetVariable: "Conversion Rate", stage: "SCALE", teamMembers: "", ownerId: "mohammed_elnabawy@mckinsey.com", }, { name: "Estimated Net Worth", slug: "estimated-net-worth", description: "Estimate liquidity across other investment platforms or banks for a given client, to provide a holistic view of their financial health and potential investment opportunities.", businessUnit: "Distribution", businessObjective: "Increase assets under management for clients and migrate funds to platform.", estimatedRevenue: 750000, budget: 70000, targetVariable: "Migration Rate", stage: "ASSESS", teamMembers: "", ownerId: "mohammed_elnabawy@mckinsey.com", }, { name: "Drug Discovery Optimization", slug: "drug-discovery-optimization", description: "AI algorithms analyze vast biological datasets to identify potential drug candidates quickly, significantly reducing the time and resources needed for traditional methods. This approach utilizes machine learning to model interactions and predict outcomes effectively.", businessUnit: "Research and Development", businessObjective: "Aim to reduce R&D time and costs while increasing the success rate of drug candidates progressing to trials. KPIs include the number of candidates progressing and time-to-market for successful drugs.", estimatedRevenue: 50000000, budget: 2000000, targetVariable: "Time to market for new drugs", stage: "BUILD", teamMembers: "", ownerId: "mohammed_elnabawy@mckinsey.com", }, { name: "Clinical Trial Patient Recruitment", slug: "clinical-trial-patient-recruitment", description: "AI technologies streamline the recruitment process for clinical trials by identifying suitable candidates through analysis of electronic health records and demographic data, thus increasing trial participation and retention.", businessUnit: "Store operations", businessObjective: "Enhance trial efficiency by significantly increasing recruitment speed and participant retention rates. KPIs include recruitment timelines and participant dropout rates.", estimatedRevenue: 10000000, budget: 500000, targetVariable: "Recruitment speed", stage: "PILOT", teamMembers: "", ownerId: "mohammed_elnabawy@mckinsey.com", }, { name: "Predictive Analytics for Drug Efficacy", slug: "predictive-analytics-for-drug-efficacy", description: "Utilizing advanced predictive analytics, AI evaluates patient data to forecast demographic responses to various drug treatments, thereby enabling more personalized medicine and targeted therapies.", businessUnit: "Marketing & Sales", businessObjective: "Enhance drug effectiveness by tailoring treatments to specific demographics. KPIs include the success rate of personalized treatment plans and patient outcomes.", estimatedRevenue: 20000000, budget: 750000, targetVariable: "Drug effectiveness", stage: "ASSESS", teamMembers: "", ownerId: "mohammed_elnabawy@mckinsey.com", }, { name: "Adverse Event Prediction", slug: "adverse-event-prediction", description: "Machine learning models analyze historical data and patient feedback to predict potential adverse effects from drug usage, thus proactively enhancing patient safety and regulatory compliance.", businessUnit: "Legal", businessObjective: "Improve drug safety by predicting and mitigating adverse effects before they occur. KPIs include reduction in reported adverse events and compliance with safety regulations.", estimatedRevenue: 15000000, budget: 600000, targetVariable: "Number of reported adverse events", stage: "BUILD", teamMembers: "", ownerId: "mohammed_elnabawy@mckinsey.com", }, { name: "Supply Chain Optimization", slug: "supply-chain-optimization", description: "AI-driven models enhance inventory management by forecasting demand and optimizing stock levels, leading to reduced costs and improved efficiency in pharmaceutical supply chains.", businessUnit: "Distribution", businessObjective: "Minimize operational costs and improve service levels through better inventory turnover and stock availability. KPIs include stockout rates and inventory holding costs.", estimatedRevenue: 30000000, budget: 1000000, targetVariable: "Inventory turnover", stage: "SCALE", teamMembers: "", ownerId: "mohammed_elnabawy@mckinsey.com", }, { name: "Virtual Drug Trials", slug: "virtual-drug-trials", description: "AI technologies facilitate virtual clinical trials, reducing the need for physical participant interactions while still providing reliable data on drug efficacy and safety through digital platforms.", businessUnit: "Research and Development", businessObjective: "Accelerate research timelines and reduce costs associated with traditional trials. KPIs focus on trial completion rates and quality of data collected.", estimatedRevenue: 25000000, budget: 1500000, targetVariable: "Trial completion time", stage: "PILOT", teamMembers: "", ownerId: "mohammed_elnabawy@mckinsey.com", }, { name: "Regulatory Compliance Automation", slug: "regulatory-compliance-automation", description: "AI automates the documentation and monitoring processes necessary for compliance with regulatory standards, thereby enhancing efficiency and reducing the risk of human error.", businessUnit: "Legal", businessObjective: "Minimize legal risks and compliance-related fines through accurate and timely reporting. KPIs include the number of compliance issues and documentation accuracy rates.", estimatedRevenue: 10000000, budget: 700000, targetVariable: "Compliance issues", stage: "ASSESS", teamMembers: "", ownerId: "mohammed_elnabawy@mckinsey.com", }, { name: "Market Access Strategy", slug: "market-access-strategy", description: "AI analyzes market trends and competitor data to optimize pricing strategies and access plans for new drugs, ensuring maximum market penetration and profitability.", businessUnit: "Marketing & Sales", businessObjective: "Enhance market share and revenue generation through effective pricing and access strategies. KPIs include market share growth and revenue impact from pricing changes.", estimatedRevenue: 18000000, budget: 800000, targetVariable: "Market share", stage: "BUILD", teamMembers: "", ownerId: "mohammed_elnabawy@mckinsey.com", }, { name: "Patient Adherence Monitoring", slug: "patient-adherence-monitoring", description: "AI-driven platforms monitor patient adherence to prescribed therapies using wearables and mobile apps, facilitating timely interventions and improved health outcomes.", businessUnit: "Store operations", businessObjective: "Enhance patient outcomes through improved adherence and engagement strategies. KPIs include adherence rates and health improvement metrics.", estimatedRevenue: 5000000, budget: 300000, targetVariable: "Adherence rates", stage: "PILOT", teamMembers: "", ownerId: "mohammed_elnabawy@mckinsey.com", }, { name: "Pharmacovigilance Enhancement", slug: "pharmacovigilance-enhancement", description: "Natural language processing (NLP) technologies are employed to analyze patient feedback and adverse event reports, allowing for quicker identification of safety signals.", businessUnit: "Legal", businessObjective: "Enhance drug safety monitoring capabilities and reduce time to detect safety signals. KPIs include speed of detection and number of signals identified.", estimatedRevenue: 12000000, budget: 900000, targetVariable: "Safety signal detection speed", stage: "ASSESS", teamMembers: "", ownerId: "mohammed_elnabawy@mckinsey.com", }, { name: "Fraud Detection Systems", slug: "fraud-detection-systems", description: "Machine learning systems continuously analyze transaction data to identify patterns indicative of fraud, enabling real-time alerts and investigations.", businessUnit: "Finance", businessObjective: "Reduce financial losses due to fraudulent activities by implementing proactive fraud detection measures. KPIs include fraud detection rates and total losses from fraud.", estimatedRevenue: 30000000, budget: 1000000, targetVariable: "Fraudulent transaction detection rate", stage: "SCALE", teamMembers: "", ownerId: "mohammed_elnabawy@mckinsey.com", }, { name: "Credit Scoring Optimization", slug: "credit-scoring-optimization", description: "AI enhances traditional credit scoring models by incorporating alternative data sources, providing a more holistic view of borrower risk and improving access to credit.", businessUnit: "Finance", businessObjective: "Expand credit access while maintaining low default rates. KPIs focus on approval rates and default ratios among new borrowers.", estimatedRevenue: 20000000, budget: 500000, targetVariable: "Loan approval rates", stage: "BUILD", teamMembers: "", ownerId: "mohammed_elnabawy@mckinsey.com", }, { name: "Customer Service Chatbots", slug: "customer-service-chatbots", description: "AI-driven chatbots provide instant responses to customer inquiries, streamlining service processes and improving customer satisfaction through 24/7 availability.", businessUnit: "Marketing & Sales", businessObjective: "Enhance customer experience and reduce response times for inquiries. KPIs include customer satisfaction scores and average response time.", estimatedRevenue: 5000000, budget: 300000, targetVariable: "Customer satisfaction score", stage: "PILOT", teamMembers: "", ownerId: "mohammed_elnabawy@mckinsey.com", }, { name: "Risk Assessment and Management", slug: "risk-assessment-and-management", description: "AI analyzes a variety of data sources to improve risk assessment and management processes in underwriting, leading to more informed decision-making.", businessUnit: "Finance", businessObjective: "Minimize risk exposure in underwriting processes while maximizing profitability. KPIs include underwriting accuracy and loss ratios.", estimatedRevenue: 15000000, budget: 800000, targetVariable: "Underwriting accuracy", stage: "ASSESS", teamMembers: "", ownerId: "mohammed_elnabawy@mckinsey.com", }, { name: "Personalized Financial Advisory", slug: "personalized-financial-advisory", description: "AI analyzes customer financial data and preferences to provide tailored investment advice, enhancing client relationships and satisfaction through personalized services.", businessUnit: "Finance", businessObjective: "Increase customer retention and satisfaction by offering customized financial solutions. KPIs include customer retention rates and feedback scores.", estimatedRevenue: 10000000, budget: 500000, targetVariable: "Customer satisfaction score", stage: "PILOT", teamMembers: "", ownerId: "mohammed_elnabawy@mckinsey.com", }, { name: "Automated Claims Processing", slug: "automated-claims-processing", description: "AI automates the claims adjudication process by evaluating claims against policy terms and fraud detection algorithms, speeding up the approval and payment cycles.", businessUnit: "Finance", businessObjective: "Reduce operational costs and improve customer satisfaction by speeding up claims processing. KPIs include claims processing time and accuracy rates.", estimatedRevenue: 12000000, budget: 700000, targetVariable: "Claims processing time", stage: "SCALE", teamMembers: "", ownerId: "mohammed_elnabawy@mckinsey.com", }, { name: "Churn Prediction Model", slug: "churn-prediction-model", description: "AI algorithms analyze customer behavior and engagement metrics to predict churn, enabling proactive retention strategies and targeted marketing campaigns.", businessUnit: "Marketing & Sales", businessObjective: "Minimize customer churn rates and enhance retention efforts through timely interventions. KPIs include churn rate and effectiveness of retention strategies.", estimatedRevenue: 8000000, budget: 400000, targetVariable: "Churn rate", stage: "BUILD", teamMembers: "", ownerId: "mohammed_elnabawy@mckinsey.com", }, { name: "Network Performance Monitoring", slug: "network-performance-monitoring", description: "AI monitors and analyzes network performance in real time, predicting outages and performance issues, leading to proactive maintenance and reduced downtime.", businessUnit: "Information Technology", businessObjective: "Enhance network reliability and user experience through timely issue detection and resolution. KPIs include network uptime and average resolution time.", estimatedRevenue: 5000000, budget: 600000, targetVariable: "Network uptime", stage: "SCALE", teamMembers: "", ownerId: "mohammed_elnabawy@mckinsey.com", }, { name: "Sentiment Analysis for Customer Feedback", slug: "sentiment-analysis-for-customer-feedback", description: "Using NLP, AI analyzes customer feedback across various platforms to gauge sentiment and identify areas for improvement, driving better customer satisfaction.", businessUnit: "Marketing & Sales", businessObjective: "Enhance customer satisfaction and loyalty by addressing feedback effectively. KPIs include sentiment scores and feedback resolution rates.", estimatedRevenue: 6000000, budget: 350000, targetVariable: "Customer sentiment score", stage: "PILOT", teamMembers: "", ownerId: "mohammed_elnabawy@mckinsey.com", }, { name: "Predictive Maintenance in Manufacturing", slug: "predictive-maintenance-in-manufacturing", description: "AI models analyze machine data to predict failures before they occur, reducing downtime and maintenance costs in manufacturing operations.", businessUnit: "Distribution", businessObjective: "Increase operational efficiency and reduce maintenance costs through proactive maintenance strategies. KPIs include downtime hours and maintenance cost reductions.", estimatedRevenue: 9000000, budget: 500000, targetVariable: "Downtime hours", stage: "SCALE", teamMembers: "", ownerId: "mohammed_elnabawy@mckinsey.com", }, { name: "Personalized Marketing Campaigns", slug: "personalized-marketing-campaigns", description: "AI analyzes customer data to create personalized marketing messages and campaigns, increasing engagement and conversion rates.", businessUnit: "Marketing & Sales", businessObjective: "Enhance customer engagement and conversion rates through targeted marketing strategies. KPIs include campaign ROI and engagement metrics.", estimatedRevenue: 7000000, budget: 400000, targetVariable: "Conversion rate", stage: "BUILD", teamMembers: "", ownerId: "mohammed_elnabawy@mckinsey.com", }, { name: "Supply Chain Risk Management", slug: "supply-chain-risk-management", description: "AI models assess and predict risks within the supply chain, allowing organizations to develop strategies for mitigating disruptions and enhancing resilience.", businessUnit: "Distribution", businessObjective: "Enhance supply chain resilience by proactively identifying and mitigating risks. KPIs include risk mitigation success rates and supply chain disruptions.", estimatedRevenue: 11000000, budget: 600000, targetVariable: "Disruption frequency", stage: "ASSESS", teamMembers: "", ownerId: "mohammed_elnabawy@mckinsey.com", }, { name: "Employee Turnover Prediction", slug: "employee-turnover-prediction", description: "AI analyzes employee data to predict turnover risks, enabling HR to implement retention strategies tailored to at-risk employees.", businessUnit: "Human Resources", businessObjective: "Reduce employee turnover rates through early intervention strategies. KPIs include turnover rate and effectiveness of retention programs.", estimatedRevenue: 4000000, budget: 300000, targetVariable: "Turnover rate", stage: "PILOT", teamMembers: "", ownerId: "mohammed_elnabawy@mckinsey.com", }, { name: "Data Privacy Compliance Monitoring", slug: "data-privacy-compliance-monitoring", description: "AI tools monitor data usage and access patterns to ensure compliance with privacy regulations, automating reporting and risk assessments.", businessUnit: "Legal", businessObjective: "Enhance compliance with data privacy regulations and minimize legal risks. KPIs include compliance audit success rates and risk mitigation effectiveness.", estimatedRevenue: 8000000, budget: 500000, targetVariable: "Compliance audit success rate", stage: "ASSESS", teamMembers: "", ownerId: "mohammed_elnabawy@mckinsey.com", }, { name: "Smart Customer Segmentation", slug: "smart-customer-segmentation", description: "AI-driven customer segmentation analyzes purchasing behavior and preferences to create targeted marketing segments, leading to improved engagement.", businessUnit: "Marketing & Sales", businessObjective: "Increase marketing efficiency by targeting the right customer segments. KPIs include response rates and overall campaign success.", estimatedRevenue: 5000000, budget: 250000, targetVariable: "Response rate", stage: "BUILD", teamMembers: "", ownerId: "mohammed_elnabawy@mckinsey.com", }, { name: "Voice of the Customer Analysis", slug: "voice-of-the-customer-analysis", description: "AI analyzes customer interactions and feedback across multiple channels to gain insights into customer preferences and areas for improvement.", businessUnit: "Marketing & Sales", businessObjective: "Enhance products and services based on direct customer feedback. KPIs include customer satisfaction scores and actionable insights generated.", estimatedRevenue: 6000000, budget: 400000, targetVariable: "Customer satisfaction score", stage: "ASSESS", teamMembers: "", ownerId: "mohammed_elnabawy@mckinsey.com", }, { name: "IoT Data Analytics for Smart Factories", slug: "iot-data-analytics-for-smart-factories", description: "AI analyzes IoT data from manufacturing equipment to optimize production processes, improve efficiency, and reduce waste.", businessUnit: "Distribution", businessObjective: "Increase production efficiency and reduce operational costs through data-driven insights. KPIs include production output and waste reduction metrics.", estimatedRevenue: 10000000, budget: 750000, targetVariable: "Production efficiency", stage: "SCALE", teamMembers: "", ownerId: "mohammed_elnabawy@mckinsey.com", }, { name: "Social Media Trend Analysis", slug: "social-media-trend-analysis", description: "AI analyzes social media data to identify emerging trends and customer sentiments, guiding product development and marketing strategies.", businessUnit: "Marketing & Sales", businessObjective: "Adapt to market trends quickly and effectively through data-driven decision-making. KPIs include trend identification speed and influence on product development.", estimatedRevenue: 7000000, budget: 300000, targetVariable: "Trend identification speed", stage: "ASSESS", teamMembers: "", ownerId: "mohammed_elnabawy@mckinsey.com", }, { name: "Dynamic Pricing Models", slug: "dynamic-pricing-models", description: "AI-driven dynamic pricing models adjust product prices in real time based on demand, competition, and other factors, optimizing revenue.", businessUnit: "Marketing & Sales", businessObjective: "Maximize revenue through strategic pricing adjustments based on market conditions. KPIs include revenue growth and price elasticity metrics.", estimatedRevenue: 12000000, budget: 500000, targetVariable: "Revenue growth", stage: "BUILD", teamMembers: "", ownerId: "mohammed_elnabawy@mckinsey.com", }, { name: "Behavioral Targeting in Advertising", slug: "behavioral-targeting-in-advertising", description: "AI analyzes user behavior to optimize online advertising campaigns by targeting specific audience segments, improving ad relevance and ROI.", businessUnit: "Marketing & Sales", businessObjective: "Enhance advertising effectiveness and return on investment through targeted campaigns. KPIs include click-through rates and conversion rates.", estimatedRevenue: 9000000, budget: 600000, targetVariable: "Ad conversion rate", stage: "SCALE", teamMembers: "", ownerId: "mohammed_elnabawy@mckinsey.com", }, { name: "Energy Consumption Forecasting", slug: "energy-consumption-forecasting", description: "AI models predict energy consumption patterns based on historical data and trends, aiding in efficient energy distribution and management.", businessUnit: "Distribution", businessObjective: "Optimize energy distribution and reduce costs through accurate forecasting. KPIs include forecast accuracy and energy cost savings.", estimatedRevenue: 10000000, budget: 700000, targetVariable: "Forecast accuracy", stage: "ASSESS", teamMembers: "", ownerId: "mohammed_elnabawy@mckinsey.com", }, { name: "Environmental Impact Assessment", slug: "environmental-impact-assessment", description: "AI tools assess and predict the environmental impacts of projects and operations, helping companies comply with regulations and improve sustainability efforts.", businessUnit: "Legal", businessObjective: "Ensure compliance with environmental regulations and improve sustainability practices. KPIs include compliance rates and environmental impact scores.", estimatedRevenue: 8000000, budget: 500000, targetVariable: "Environmental impact score", stage: "ASSESS", teamMembers: "", ownerId: "mohammed_elnabawy@mckinsey.com", }, { name: "Smart Asset Management", slug: "smart-asset-management", description: "AI analyzes asset data to optimize maintenance schedules and lifecycle management, reducing costs and improving asset performance.", businessUnit: "Finance", businessObjective: "Enhance asset utilization and reduce costs through informed maintenance strategies. KPIs include asset uptime and maintenance cost reductions.", estimatedRevenue: 7000000, budget: 600000, targetVariable: "Asset uptime", stage: "SCALE", teamMembers: "", ownerId: "mohammed_elnabawy@mckinsey.com", }, { name: "Telecom Network Optimization", slug: "telecom-network-optimization", description: "AI analyzes telecom network data to optimize performance and reduce congestion, improving service quality and customer satisfaction.", businessUnit: "Information Technology", businessObjective: "Enhance network performance and customer experience through proactive optimization. KPIs include network latency and customer satisfaction scores.", estimatedRevenue: 8000000, budget: 500000, targetVariable: "Network latency", stage: "BUILD", teamMembers: "", ownerId: "mohammed_elnabawy@mckinsey.com", }, { name: "AI-Driven Customer Retention Strategies", slug: "ai-driven-customer-retention-strategies", description: "Using predictive analytics, AI identifies customers at risk of churn and recommends targeted retention strategies to improve loyalty.", businessUnit: "Marketing & Sales", businessObjective: "Minimize churn rates and improve customer loyalty through tailored engagement strategies. KPIs include retention rates and customer feedback scores.", estimatedRevenue: 5000000, budget: 400000, targetVariable: "Churn rate", stage: "ASSESS", teamMembers: "", ownerId: "mohammed_elnabawy@mckinsey.com", }, ]
resourceData
Type : []
Default value : [ { name: "*" }, { name: "turo:iam" }, { name: "turo:project" }, { name: "turo:model" }, { name: "turo:cost" }, { name: "turo:metrics" }, { name: "turo:compliance" }, ]
roleData
Type : []
Default value : [ { name: "Turo Admin", }, { name: "Project Admin", }, { name: "Project User", }, { name: "Project Readonly", }, { name: "Turo Readonly", }, { name: "BU Admin", }, ]
rolePolicyMapData
Type : []
Default value : [ { role: "Turo Admin", policy: "Turo Admin Policy", }, { role: "Project Admin", policy: "Project Admin Policy", }, { role: "Project User", policy: "Project User Policy", }, { role: "Project Readonly", policy: "Project Readonly Policy", }, { role: "Turo Readonly", policy: "Turo Readonly Policy", }, { role: "BU Admin", policy: "BU Admin Policy", }, ]
userData
Type : Prisma.UserCreateInput[]
Default value : [ { id: process.env.TURO_ADMIN_EMAIL, }, { id: "pallavi@me.com", }, { id: "veerain@me.com", }, { id: "testreadonly@me.com", }, { id: "mohammed_elnabawy@mckinsey.com", }, { id: "maria_olivia_lihn@mckinsey.com", }, { id: "vladimir_nikolic@external.mckinsey.com", }, ]
userProjectRoleMapData
Type : []
Default value : [ // Create a for where for each project id from 1 to 60, assign to user the role Project Admin ...Array.from({ length: 57 }, (_, i) => ({ userId: "mohammed_elnabawy@mckinsey.com", projectId: i + 1, role: "Project Admin", })), ]
userTuroRoleMapData
Type : []
Default value : [ { userId: process.env.TURO_ADMIN_EMAIL, role: "Turo Admin", }, { userId: "matt_fitzpatrick@mckinsey.com", role: "Turo Readonly", }, { userId: "mohammed_elnabawy@mckinsey.com", role: "Turo Admin", }, { userId: "maria_olivia_lihn@mckinsey.com", role: "Turo Admin", }, { userId: "fabiana_ferrara@mckinsey.com", role: "Turo Admin", }, { userId: "andrew_mackay@mckinsey.com", role: "Turo Admin", }, { userId: "vladimir_nikolic@external.mckinsey.com", role: "Turo Admin", }, ]

src/alert/workflows/alert-monitor.workflow.ts

activities
Default value : wf.proxyActivities<typeof _activities>({ startToCloseTimeout: "1 minute", retry: { maximumAttempts: 3, nonRetryableErrorTypes: [], }, })
commonActivities
Default value : wf.proxyActivities<typeof _commonActivities>({ startToCloseTimeout: "1 minute", retry: { maximumAttempts: 3, nonRetryableErrorTypes: [], }, })

src/compliance/workflows/compliance-policy-update.workflow.ts

activities
Default value : wf.proxyActivities<typeof complianceActivities>({ startToCloseTimeout: "5 minutes", retry: { maximumAttempts: 3, nonRetryableErrorTypes: [], }, })

src/compliance/workflows/compliance-risk-submission.workflow.ts

activities
Default value : wf.proxyActivities<typeof complianceActivities>({ startToCloseTimeout: "5 minutes", retry: { maximumAttempts: 3, nonRetryableErrorTypes: [], }, })
approvedRiskSubmissionSignal
Default value : wf.defineSignal<[SignalArgs]>( "approvedRiskSubmission", )
rejectedRiskSubmissionSignal
Default value : wf.defineSignal<[SignalArgs]>( "rejectedRiskSubmission", )

src/compliance/workflows/compliance-rule-update.workflow.ts

activities
Default value : wf.proxyActivities<typeof complianceActivities>({ startToCloseTimeout: "5 minutes", retry: { maximumAttempts: 3, nonRetryableErrorTypes: [], }, })

src/compliance/workflows/compliance-submission.workflow.ts

activities
Default value : proxyActivities<typeof complianceActivities>({ startToCloseTimeout: "5 minutes", retry: { maximumAttempts: 3, nonRetryableErrorTypes: [], }, })

src/models/workflows/fetch-mlflow-metrics.workflow.ts

activities
Default value : proxyActivities<typeof modelActivities>({ startToCloseTimeout: "10 minutes", })

src/models/workflows/fetch-mlflow-model-metrics.workflow.ts

activities
Default value : proxyActivities<typeof modelActivities>({ startToCloseTimeout: "1 minute", retry: { maximumAttempts: 3, nonRetryableErrorTypes: [], }, })
commonActivities
Default value : proxyActivities<typeof _commonActivities>({ startToCloseTimeout: "1 minute", retry: { maximumAttempts: 3, nonRetryableErrorTypes: [], }, })

src/models/workflows/metric-trend.workflow.ts

activities
Default value : wf.proxyActivities<typeof _activities>({ startToCloseTimeout: "1 minute", retry: { maximumAttempts: 3, nonRetryableErrorTypes: ["METRIC_NOT_FOUND"], }, })

src/models/workflows/sync-metrics.workflow.ts

activities
Default value : proxyActivities<typeof modelActivities>({ startToCloseTimeout: "10 minutes", retry: { maximumAttempts: 3, nonRetryableErrorTypes: [], }, })

src/notification/workflows/notification-delivery.workflow.ts

activities
Default value : proxyActivities<typeof notificationActivities>({ startToCloseTimeout: "5 minutes", retry: { maximumAttempts: 3, nonRetryableErrorTypes: [], }, })

src/project/workflows/create-project.workflow.ts

activities
Default value : wf.proxyActivities<typeof projectActivities>({ startToCloseTimeout: "1 minute", retry: { maximumAttempts: 3, nonRetryableErrorTypes: [], // can add the email errors here as well }, })
approvedProjectCreateSignal
Default value : wf.defineSignal<[SignalArgs]>( "approvedProjectCreate", )
rejectedProjectCreateSignal
Default value : wf.defineSignal<[SignalArgs]>( "rejectedProjectCreate", )

src/project/workflows/request-project.workflow.ts

activities
Default value : wf.proxyActivities<typeof projectActivities>({ startToCloseTimeout: "1 minute", retry: { maximumAttempts: 3, nonRetryableErrorTypes: [], // can add the email errors here as well }, })
approvedProjectAccessSignal
Default value : wf.defineSignal<[SignalArgs]>( "approvedProjectAccess", )
rejectedProjectAccessSignal
Default value : wf.defineSignal<[SignalArgs]>( "rejectedProjectAccess", )

src/common/prisma/workflows/seedMetrics.workflow.ts

activities
Default value : proxyActivities<typeof prismaActivities>({ startToCloseTimeout: '10 minutes', retry: { maximumAttempts: 3, nonRetryableErrorTypes: [], }, })

src/cost/workflows/aws/aws.workflow.ts

activities
Default value : wf.proxyActivities<typeof _activities>({ startToCloseTimeout: "1 minute", retry: { maximumAttempts: 3, nonRetryableErrorTypes: [], }, })

src/cost/workflows/azure/azure.workflow.ts

activities
Default value : wf.proxyActivities<typeof _activities>({ startToCloseTimeout: "3 minute", retry: { maximumAttempts: 3, nonRetryableErrorTypes: [], }, })

src/cost/workflows/kubecost/kubecost.workflow.ts

activities
Default value : wf.proxyActivities<typeof _activities>({ startToCloseTimeout: "60 minute", retry: { maximumAttempts: 3, nonRetryableErrorTypes: [], }, })

src/cost/workflows/opentelemetry/opentelemetry.workflow.ts

activities
Default value : wf.proxyActivities<typeof _activities>({ startToCloseTimeout: "10 minutes", retry: { maximumAttempts: 3, nonRetryableErrorTypes: [], }, })

src/cost/workflows/turo/turo.workflow.ts

activities
Default value : wf.proxyActivities<typeof _activities>({ startToCloseTimeout: "10 minute", retry: { maximumAttempts: 3, nonRetryableErrorTypes: [], }, })

src/alert/templates/alert-app.templates.ts

ALERT_SET_APP_TEMPLATE
Type : object
Default value : { subject: "{{ project.name }} - Alert Set for Metric: {{ metric.name }}", body: `An alert has been set for the following metric: <strong>{{ metric.name }}</strong>`, }
METRIC_BREACH_MAX_APP_TEMPLATE
Type : object
Default value : { subject: '"{{ metric.name }}" has increased', body: `{{ metric.name }} for {{ project.name }} has increased by {{ diff }} - Detected Value: {{alertTrigger.targetValue}}`, }
METRIC_BREACH_MIN_APP_TEMPLATE
Type : object
Default value : { subject: '"{{ metric.name }}" has decreased', body: `{{ metric.name }} for {{ project.name }} has decreased by {{ diff }} - Detected Value: {{alertTrigger.targetValue}}`, }
METRIC_PCC_BREACH_MAX_APP_TEMPLATE
Type : object
Default value : { subject: '"{{ metric.name }}" has increased', body: `{{ metric.name }} for {{ project.name }} has increased by {{ diff }}% - Detected Value: {{alertTrigger.targetValue}}`, }
METRIC_PCC_BREACH_MIN_APP_TEMPLATE
Type : object
Default value : { subject: '"{{ metric.name }}" has decreased', body: `{{ metric.name }} for {{ project.name }} has decreased by {{ diff }}% - Detected Value: {{alertTrigger.targetValue}}`, }

src/alert/templates/alert-email.templates.ts

ALERT_SET_EMAIL_TEMPLATE
Type : object
Default value : { subject: "{{ project.name }} - Alert Set for Metric: {{ metric.name }}", body: ` ${EMAIL_HEADER} <div class="content"> <div class="paragraph"> Hi {{ sendToName }}, <br><br> An alert has been set for the following metric: <strong>{{ metric.name }}</strong> <br><br> <table> <tr> <td>Project</td> <td>{{project.name}}</td> </tr> <tr> <td>Model</td> <td>{{model.name}}</td> </tr> <tr> <td>Metric</td> <td>{{metric.name}}</td> </tr> </table> If you have any questions or need further assistance, please contact our support team. <br><br><br> <a class="button" href="{{ metricsURL }}">View metrics</a> </div> </div> ${EMAIL_FOOTER} `, }
METRIC_BREACH_MAX_EMAIL_TEMPLATE
Type : object
Default value : { subject: "{{ project.name }} - Maximum Threshold Breach Detected for Metric: {{ metric.name }}", body: ` ${EMAIL_HEADER} <div class="content"> <div class="paragraph"> Hi {{ sendToName }}, <br><br> We have detected a breach of the maximum threshold for the following metric: <strong>{{ metric.name }}</strong> <br><br> <table> <tr> <td>Project</td> <td>{{project.name}}</td> </tr> <tr> <td>Model</td> <td>{{model.name}}</td> </tr> <tr> <td>Metric</td> <td>{{metric.name}}</td> </tr> <tr> <td>Timestamp</td> <td>{{alertTrigger.timestamp}}</td> </tr> <tr> <td>Detected Value</td> <td>{{alertTrigger.targetValue}}</td> </tr> <tr> <td>Maximum Threshold</td> <td>{{alertParams.max}}</td> </tr> </table> Please take the necessary actions to address this issue. If you have any questions or need further assistance, please contact our support team. <br><br><br> <a class="button" href="{{ metricsURL }}">View metrics</a> </div> </div> ${EMAIL_FOOTER} `, }
METRIC_BREACH_MIN_EMAIL_TEMPLATE
Type : object
Default value : { subject: "{{ project.name }} - Minimum Threshold Breach Detected for Metric: {{ metric.name }}", body: ` ${EMAIL_HEADER} <div class="content"> <div class="paragraph"> Hi {{ sendToName }}, <br><br> We have detected a breach of the minimum threshold for the following metric: <strong>{{ metric.name }}</strong> <br><br> <table> <tr> <td>Project</td> <td>{{project.name}}</td> </tr> <tr> <td>Model</td> <td>{{model.name}}</td> </tr> <tr> <td>Metric</td> <td>{{metric.name}}</td> </tr> <tr> <td>Timestamp</td> <td>{{alertTrigger.timestamp}}</td> </tr> <tr> <td>Detected Value</td> <td>{{alertTrigger.targetValue}}</td> </tr> <tr> <td>Minimum Threshold</td> <td>{{alertParams.min}}</td> </tr> </table> Please take the necessary actions to address this issue. If you have any questions or need further assistance, please contact our support team. <br><br><br> <a class="button" href="{{ metricsURL }}">View metrics</a> </div> </div> ${EMAIL_FOOTER} `, }
METRIC_PCC_BREACH_MAX_EMAIL_TEMPLATE
Type : object
Default value : { subject: "{{ project.name }} - Maximum Percentage Change Threshold Breach Detected for Metric: {{ metric.name }}", body: ` ${EMAIL_HEADER} <div class="content"> <div class="paragraph"> Hi {{ sendToName }}, <br><br> We have detected a breach of the maximum percentage change threshold for the following metric: <strong>{{ metric.name }}</strong> <br><br> <table> <tr> <td>Project</td> <td>{{project.name}}</td> </tr> <tr> <td>Model</td> <td>{{model.name}}</td> </tr> <tr> <td>Metric</td> <td>{{metric.name}}</td> </tr> <tr> <td>Timestamp</td> <td>{{alertTrigger.timestamp}}</td> </tr> <tr> <td>Detected Value</td> <td>{{alertTrigger.targetValue}}</td> </tr> <tr> <td>Maximum Percentage Change Threshold</td> <td>{{alertParams.pcc}}%</td> </tr> </table> Please take the necessary actions to address this issue. If you have any questions or need further assistance, please contact our support team. <br><br><br> <a class="button" href="{{ metricsURL }}">View metrics</a> </div> </div> ${EMAIL_FOOTER} `, }
METRIC_PCC_BREACH_MIN_EMAIL_TEMPLATE
Type : object
Default value : { subject: "{{ project.name }} - Minimum Percentage Change Threshold Breach Detected for Metric: {{ metric.name }}", body: ` ${EMAIL_HEADER} <div class="content"> <div class="paragraph"> Hi {{ sendToName }}, <br><br> We have detected a breach of the minimum percentage change threshold for the following metric: <strong>{{ metric.name }}</strong> <br><br> <table> <tr> <td>Project</td> <td>{{project.name}}</td> </tr> <tr> <td>Model</td> <td>{{model.name}}</td> </tr> <tr> <td>Metric</td> <td>{{metric.name}}</td> </tr> <tr> <td>Timestamp</td> <td>{{alertTrigger.timestamp}}</td> </tr> <tr> <td>Detected Value</td> <td>{{alertTrigger.targetValue}}</td> </tr> <tr> <td>Minimum Percentage Change Threshold</td> <td>{{alertParams.pcc}}%</td> </tr> </table> Please take the necessary actions to address this issue. If you have any questions or need further assistance, please contact our support team. <br><br><br> <a class="button" href="{{ metricsURL }}">View metrics</a> </div> </div> ${EMAIL_FOOTER} `, }

src/alert/alert.events.ts

alertEventsConfig
Type : object
Default value : { [AlertEvents.METRIC_BREACH_MAX]: { entityTable: "metricsData", severity: NotificationSeverity.WARNING, channelConfig: { [NotificationChannel.APP]: METRIC_BREACH_MAX_APP_TEMPLATE, [NotificationChannel.EMAIL]: METRIC_BREACH_MAX_EMAIL_TEMPLATE, }, }, [AlertEvents.METRIC_BREACH_MIN]: { entityTable: "metricsData", severity: NotificationSeverity.WARNING, channelConfig: { [NotificationChannel.APP]: METRIC_BREACH_MIN_APP_TEMPLATE, [NotificationChannel.EMAIL]: METRIC_BREACH_MIN_EMAIL_TEMPLATE, }, }, [AlertEvents.METRIC_PCC_BREACH_MAX]: { entityTable: "metricsData", severity: NotificationSeverity.WARNING, channelConfig: { [NotificationChannel.APP]: METRIC_PCC_BREACH_MAX_APP_TEMPLATE, [NotificationChannel.EMAIL]: METRIC_PCC_BREACH_MAX_EMAIL_TEMPLATE, }, }, [AlertEvents.METRIC_PCC_BREACH_MIN]: { entityTable: "metricsData", severity: NotificationSeverity.WARNING, channelConfig: { [NotificationChannel.APP]: METRIC_PCC_BREACH_MIN_APP_TEMPLATE, [NotificationChannel.EMAIL]: METRIC_PCC_BREACH_MIN_EMAIL_TEMPLATE, }, }, [AlertEvents.ALERT_SET]: { entityTable: "alerts", severity: NotificationSeverity.INFO, channelConfig: { [NotificationChannel.APP]: ALERT_SET_APP_TEMPLATE, [NotificationChannel.EMAIL]: ALERT_SET_EMAIL_TEMPLATE, }, }, }
metricEvents
Type : []
Default value : [ AlertEvents.METRIC_BREACH_MAX, AlertEvents.METRIC_BREACH_MIN, AlertEvents.METRIC_PCC_BREACH_MAX, AlertEvents.METRIC_PCC_BREACH_MIN, ]

src/alert/alert.activity.ts

alertsService
Default value : new AlertService(prisma)
metricsService
Default value : new MetricsService( prisma, projectService, modelService, null, )
modelService
Default value : new ModelService( prisma, projectService, null, null, null, null, )
notificationService
Default value : new NotificationService(prisma, null, null)
prisma
Default value : new PrismaService()
projectService
Default value : new ProjectService(prisma, null, null)

src/project/project-email.templates.ts

APPROVED_EMAIL_TEMPLATE
Type : object
Default value : { subject: "Project Approved: {{ project.name }}", html: ` ${EMAIL_HEADER} <div class="content"> <div class="paragraph"> Hi {{ sendToName }},<br><br> Your <b>{{ project.name }}</b> project proposal has been thoroughly reviewed and approved by {{ approvedBy }}. We are excited to move forward with the development of your analytics use case and are enthusiastic about the positive impact it can have on our goals and objectives.<br><br> To kick off the development phase, please consider the following:<br> <ol> <li> <b>Kick-off Meeting</b>: Schedule a kick-off meeting to discuss the project timeline, milestones, and any specific requirements you may have with your team. </li> <li> <b>Development Resources</b>: If you require any additional resources or support during the development process, please let {{ approvedBy }} know. We are here to ensure you have everything you need for a successful implementation. </li> <li> <b>Regular Updates</b> : We encourage regular updates on your progress and any challenges you may encounter. Open communication is key to addressing issues promptly and ensuring the project stays on track. </li> </ol> Congratulations on reaching this milestone, and we appreciate your dedication to advancing this initiative. If you have any questions or need clarification on any aspect of the project, feel free to reach out to {{ approvedBy }}.<br><br> Thank you for your commitment, and we look forward to witnessing the success of your analytics use case. <br><br> </div> <a class="button" href="{{ projectURL }}">View Project</a> </div> ${EMAIL_FOOTER} `, }
APPROVER_EMAIL_TEMPLATE
Type : object
Default value : { subject: "Project Pending approval: {{ project.name }} ", html: ` ${EMAIL_HEADER} <div class="content"> <div class="paragraph"> Hi {{ sendToName }}, <br><br> {{ requestedBy }} has requested your approval for project <b>{{ project.name }}</b>. <br><br> Please find below, project details:<br><br> <table> <tr> <td>Project</td> <td>{{project.name}}</td> </tr> <tr> <td>Description</td> <td>{{project.description}}</td> </tr> <tr> <td>Business Objective</td> <td>{{project.businessObjective}}</td> </tr> <tr> <td>Estimated Revenue</td> <td>{{project.estimatedRevenue}}</td> </tr> <tr> <td>Budget</td> <td>{{project.budget}}</td> </tr> <tr> <td>Target Variable</td> <td>{{project.targetVariable}}</td> </tr> </table> <br><br> </div> <a class="button" href="{{ requestsURL }}">View Requests</a> </div> ${EMAIL_FOOTER} `, }
DECLINED_EMAIL_TEMPLATE
Type : object
Default value : { subject: "Project Declined: {{ project.name }} ", html: ` ${EMAIL_HEADER} <div class="content"> <div class="paragraph"> Hi {{ sendToName }}, <br><br> After careful consideration, {{ rejectedBy }} has decided to reject your project proposal. While we understand that this news may be disappointing, please know that the decision was made after a thorough evaluation of various factors, including alignment with our current priorities, resource availability, and project objectives. <br><br> We appreciate the time and effort you dedicated to preparing and submitting your proposal. Your commitment to advancing our goals is commendable, and we value your contributions to our team.<br><br> If you have any questions or would like feedback on the decision, {{ rejectedBy }} is available to discuss the specifics. Additionally, we encourage you to consider resubmitting your proposal in the future, as priorities and circumstances within the organisation may evolve.<br><br> We are here to support you in finding new opportunities or exploring alternative projects. Feel free to reach out if you would like to discuss potential next steps or if there's anything else we can assist you with.<br><br> </div> </div> ${EMAIL_FOOTER} `, }
REQUESTER_EMAIL_TEMPLATE
Type : object
Default value : { subject: "Project Submitted for approval: {{ project.name }} ", html: ` ${EMAIL_HEADER} <div class="content"> <div class="paragraph"> Hi {{ sendToName }}, <br><br> Thanks for submitting a new project to Turo <br><br> Please find below, project details:<br><br> <table> <tr> <td>Project</td> <td>{{project.name}}</td> </tr> <tr> <td>Description</td> <td>{{project.description}}</td> </tr> <tr> <td>Business Objective</td> <td>{{project.businessObjective}}</td> </tr> <tr> <td>Estimated Revenue</td> <td>{{project.estimatedRevenue}}</td> </tr> <tr> <td>Budget</td> <td>{{project.budget}}</td> </tr> <tr> <td>Target Variable</td> <td>{{project.targetVariable}}</td> </tr> </table> </div> </div> ${EMAIL_FOOTER} `, }

src/project/settings/templates/settings-app.templates.ts

APPROVED_USER_PROJECT_ACCESS_APP_TEMPLATE
Type : object
Default value : { subject: "{{project.name}} project access approved ", body: `Your access request has been approved by {{ approvedBy }}`, }
ASSIGN_USER_PROJECT_ROLE_APP_TEMPLATE
Type : object
Default value : { subject: "{{ project.name }} project collaboration", body: `You've been added as {{ role.article }} {{ role.roleText }} by {{ assigner }}`, }
DECLINED_USER_PROJECT_ACCESS_APP_TEMPLATE
Type : object
Default value : { subject: "{{project.name}} project access declined ", body: `Your access request has been declined by {{ rejectedBy }}`, }
REQUEST_USER_PROJECT_ACCESS_APP_TEMPLATE
Type : object
Default value : { subject: "{{ project.name }} project access request ", body: `{{ requestedBy }} has requested access to the {{ project.name }} project.`, }
UPDATE_USER_PROJECT_ROLE_APP_TEMPLATE
Type : object
Default value : { subject: "{{ project.name }} project role change", body: `You've been added as {{ role.article }} {{ role.roleText }} by {{ assigner }}`, }

src/project/settings/templates/settings-email.templates.ts

APPROVED_USER_PROJECT_ACCESS_EMAIL_TEMPLATE
Type : object
Default value : { subject: "Access request approved: {{ project.name }}", body: ` ${EMAIL_HEADER} <div class="content"> <div class="paragraph"> Hi {{ sendToName }}, <br><br> Your <strong>{{project.name}}</strong> project access request has been approved by {{ approvedBy }}. <br><br> <a class="button" href="{{ projectURL }}">Open project</a> </div> </div> ${EMAIL_FOOTER} `, }
ASSIGN_USER_PROJECT_ROLE_EMAIL_TEMPLATE
Type : object
Default value : { subject: "{{assigner}} has invited you to {{role.verbText}} the {{ project.name }}", body: ` ${EMAIL_HEADER} <div class="content"> <div class="paragraph"> Hi {{ sendToName }}, <br><br> You have been invited as {{role.article}} <strong>{{ role.roleText }}</strong> to the <strong>{{project.name}}</strong> project by {{assigner}}. <br><br> <a class="button" href="{{ projectURL }}">View project</a> </div> </div> ${EMAIL_FOOTER} `, }
DECLINED_USER_PROJECT_ACCESS_EMAIL_TEMPLATE
Type : object
Default value : { subject: "Access request declined: {{ project.name }}", body: ` ${EMAIL_HEADER} <div class="content"> <div class="paragraph"> Hi {{ sendToName }}, <br><br> {{ rejectedBy }} has declined your access request to project <strong>{{project.name}}</strong>. Please reach out to the project team for further explanation. <br><br> <a class="button" href="{{ projectURL }}">Open project</a> </div> </div> ${EMAIL_FOOTER} `, }
REQUEST_USER_PROJECT_ACCESS_EMAIL_TEMPLATE
Type : object
Default value : { subject: "Project access request: {{ project.name }}", body: ` ${EMAIL_HEADER} <div class="content"> <div class="paragraph"> Hi {{ sendToName }}, <br><br> We wanted to inform you that {{ requestedBy }} has requested access to the <strong>{{project.name}}</strong> project. <br><br> <div class="description" >"{{ description }}"</div> <br><br> <a class="button" href="{{ requestURL }}">View request</a> </div> </div> ${EMAIL_FOOTER} `, }
UPDATE_USER_PROJECT_ROLE_EMAIL_TEMPLATE
Type : object
Default value : { subject: "Project role change: {{project.name}}", body: ` ${EMAIL_HEADER} <div class="content"> <div class="paragraph"> Hi {{ sendToName }}, <br><br> You have been invited as {{role.article}} <strong>{{ role.roleText }}</strong> to the <strong>{{project.name}}</strong> project by {{assigner}}. <br><br> <a class="button" href="{{ projectURL }}">View project</a> </div> </div> ${EMAIL_FOOTER} `, }

src/businessUnit/templates/business-unit-app.templates.ts

ASSIGN_USER_BU_ROLE_APP_TEMPLATE
Type : object
Default value : { subject: "Turo {{ role.name }} collaboration", body: `You've been added as {{ role.name }} on {{{ bu.name }}} by {{ assigner }}`, }
DELETE_USER_BU_ROLE_APP_TEMPLATE
Type : object
Default value : { subject: "Turo {{ role.name }} update", body: `You've been removed as {{ role.name }} on {{{ bu.name }}} by {{ removedBy }}`, }

src/businessUnit/templates/business-unit-email.templates.ts

ASSIGN_USER_BU_ROLE_EMAIL_TEMPLATE
Type : object
Default value : { subject: "{{assigner}} has added you as {{{ bu.name }}} {{ role.name}}", body: ` ${EMAIL_HEADER} <div class="content"> <div class="paragraph"> Hi {{ sendToName }}, <br><br> {{assigner}} has added you as a {{{ bu.name }}} {{ role.name}}. You will now have an overview of all Projects in {{{ bu.name}}}. You will automatically be added as an admin to all new and existing projects, allowing you to manage collaborators at the project level. <br><br> <a class="button" href="{{ overviewURL }}">See projects overview</a> </div> </div> ${EMAIL_FOOTER} `, }
DELETE_USER_BU_ROLE_EMAIL_TEMPLATE
Type : object
Default value : { subject: "Business Unit role change", body: ` ${EMAIL_HEADER} <div class="content"> <div class="paragraph"> Hi {{ sendToName }}, <br><br> {{removedBy}} has removed you as {{{ bu.name }}} {{ role.name}}. You will no longer have access to the organisation overview of all Projects in {{ bu.name}}. You will still be admin of any business units that are still active for you. This removal does not affect admin rights on any projects you have been added to as admin. <br><br> </div> </div> ${EMAIL_FOOTER} `, }

src/settings/templates/settings-app.templates.ts

ASSIGN_USER_TURO_ROLE_APP_TEMPLATE
Type : object
Default value : { subject: "Turo {{ role.name }} collaboration", body: `You've been added as {{ role.name }} on Turo by {{ assigner }}`, }
DELETE_USER_TURO_ROLE_APP_TEMPLATE
Type : object
Default value : { subject: "Turo {{ role.name }} update", body: `You've been removed as {{ role.name }} on Turo by {{ removedBy }}`, }

src/settings/templates/settings-email.templates.ts

ASSIGN_USER_TURO_ROLE_EMAIL_TEMPLATE
Type : object
Default value : { subject: "{{assigner}} has added you as {{role.name}} on Turo", body: ` ${EMAIL_HEADER} <div class="content"> <div class="paragraph"> Hi {{ sendToName }}, <br><br> {{assigner}} has added you as {{ role.name }} on Turo. You will now have an overview of all Projects across all Business Units. In the settings section on Turo, you will be able to select other Turo admins as well as admins for each of the Business Units. <br><br> <a class="button" href="{{ overviewURL }}">See projects overview</a> </div> </div> ${EMAIL_FOOTER} `, }
DELETE_USER_TURO_ROLE_EMAIL_TEMPLATE
Type : object
Default value : { subject: "Turo role change", body: ` ${EMAIL_HEADER} <div class="content"> <div class="paragraph"> Hi {{ sendToName }}, <br><br> {{removedBy}} has removed you as {{ role.name }} on Turo. You will no longer have access to the organisation overview of all Projects. You will still be admin of any business units that are still active for you. This removal does not affect admin rights on any projects you have been added to as admin. <br><br> </div> </div> ${EMAIL_FOOTER} `, }

src/cost/workflows/aws/aws.constants.ts

AWS_COST_TYPE_MAP
Type : literal type
Default value : { "AWS CloudTrail": COST_CATEGORIES.MONITORING, "AmazonCloudWatch": COST_CATEGORIES.MONITORING, "AWS Config": COST_CATEGORIES.MONITORING, "AWS Cost Explorer": COST_CATEGORIES.COST_MANAGEMENT, "AWS Glue": COST_CATEGORIES.ANALYTICS, "AWS Key Management Service": COST_CATEGORIES.SECURITY, "AWS Lambda": COST_CATEGORIES.COMPUTE, "AWS Secrets Manager": COST_CATEGORIES.SECURITY, "AWS Security Hub": COST_CATEGORIES.SECURITY, "AWS Step Functions": COST_CATEGORIES.MESSAGING, "Amazon EC2 Container Registry (ECR)": COST_CATEGORIES.COMPUTE, "EC2 - Other": COST_CATEGORIES.COMPUTE, "Amazon Elastic Compute Cloud - Compute": COST_CATEGORIES.COMPUTE, "Amazon Elastic Container Service for Kubernetes": COST_CATEGORIES.COMPUTE, "Amazon Elastic File System": COST_CATEGORIES.STORAGE, "Amazon Elastic Load Balancing": COST_CATEGORIES.COMPUTE, "Amazon Glacier": COST_CATEGORIES.STORAGE, "Amazon GuardDuty": COST_CATEGORIES.SECURITY, "Amazon Location Service": "Location", "Amazon Macie": COST_CATEGORIES.SECURITY, "Amazon OpenSearch Service": COST_CATEGORIES.ANALYTICS, "Amazon Relational Database Service": COST_CATEGORIES.STORAGE, "Amazon Route 53": COST_CATEGORIES.NETWORKING, "Amazon Simple Notification Service": COST_CATEGORIES.MESSAGING, "Amazon Simple Queue Service": COST_CATEGORIES.MESSAGING, "Amazon Simple Storage Service": COST_CATEGORIES.STORAGE, "Amazon Virtual Private Cloud": COST_CATEGORIES.NETWORKING, "Amazon CloudWatch": COST_CATEGORIES.MONITORING, }

src/cost/workflows/aws/aws.activity.ts

awsProvider
Default value : costProvider.getCostProvider(provider.aws)
costProvider
Default value : new CostProvider()
costService
Default value : new CostService(prisma, null, costProvider)
prisma
Default value : new PrismaService()

src/cost/workflows/azure/azure.activity.ts

azureProvider
Default value : costProvider.getCostProvider(provider.azure)
costProvider
Default value : new CostProvider()
costService
Default value : new CostService(prisma, null, costProvider)
prisma
Default value : new PrismaService()

src/repl.ts

bootstrap
Default value : async () => { const replServer = await repl(AppModule); replServer.setupHistory(".nestjs.repl.history", (err) => { if (err) { console.error(err); } }); }

Function responsible for providing a REPL (Read-Eval-Print Loop) interface for interacting with the application. This allows developers to execute commands and test functionality in a live environment.

src/worker.ts

bootstrap
Default value : async () => { ConfigModule.forRoot(); // Step 1: Register Workflows and Activities with the Worker and connect to // the Temporal server. const connection = await NativeConnection.connect({ address: process.env.WORKFLOW_SERVER_URL, }); const worker = await Worker.create({ connection: connection, workflowsPath: require.resolve("./common/temporal/workflows"), activities, taskQueue: process.env.QUEUE_NAME || "turo", }); await worker.run(); }

Function to bootstrap turo worker server creates a worker which connects to temporal server and poll for Tasks in Task Queues via synchronous RPC and executes tasks from queues

prisma/seedData/policy.data.ts

BU_ADMIN_POLICY
Type : object
Default value : { name: "BU Admin Policy", statements: [ ...PROJECT_ADMIN_POLICY.statements, { resource: "turo:compliance", action: "compliance:ReadSettings" }, { resource: "turo:compliance", action: "compliance:ReadRule" }, { resource: "turo:compliance", action: "compliance:ReadPolicy" }, ], }
POLICY_DATA
Type : []
Default value : [ TURO_ADMIN_POLICY, PROJECT_ADMIN_POLICY, BU_ADMIN_POLICY, PROJECT_USER_POLICY, PROJECT_READONLY_POLICY, TURO_READONLY_POLICY, TURO_SECURITY_MANAGER_POLICY, ]
PROJECT_ADMIN_POLICY
Type : object
Default value : { name: "Project Admin Policy", statements: [ { resource: "turo:project", action: "project:ReadProject", }, { resource: "turo:project", action: "project:UpdateProject", }, { resource: "turo:project", action: "project:ArchiveProject", }, { resource: "turo:project", action: "project:CreateKey", }, { resource: "turo:model", action: "*", }, { resource: "turo:cost", action: "*", }, { resource: "turo:metrics", action: "*", }, ...PROJECT_COMPLIANCE_USER_ACTIONS, ], }
PROJECT_COMPLIANCE_READ_ACTIONS
Type : []
Default value : [ { resource: "turo:compliance", action: "compliance:ReadCompliance", }, { resource: "turo:compliance", action: "compliance:ReadRisk", }, { resource: "turo:compliance", action: "compliance:ReadEvidence", }, ]
PROJECT_COMPLIANCE_USER_ACTIONS
Type : []
Default value : [ { resource: "turo:compliance", action: "compliance:SubmitCompliance" }, { resource: "turo:compliance", action: "compliance:ReadCompliance" }, { resource: "turo:compliance", action: "compliance:ReadRisk" }, { resource: "turo:compliance", action: "compliance:SubmitRisk" }, { resource: "turo:compliance", action: "compliance:UpdateRisk" }, { resource: "turo:compliance", action: "compliance:ReadEvidence" }, { resource: "turo:compliance", action: "compliance:SubmitEvidence" }, ]
PROJECT_READONLY_POLICY
Type : object
Default value : { name: "Project Readonly Policy", statements: [ { resource: "turo:project", action: "project:ReadProject", }, { resource: "turo:model", action: "model:ReadModel", }, { resource: "turo:cost", action: "cost:ReadCost", }, { resource: "turo:metrics", action: "metrics:ReadMetrics", }, ...PROJECT_COMPLIANCE_READ_ACTIONS ], }
PROJECT_USER_POLICY
Type : object
Default value : { name: "Project User Policy", statements: [ { resource: "turo:project", action: "project:ReadProject", }, { resource: "turo:project", action: "project:CreateKey" }, { resource: "turo:model", action: "*", }, { resource: "turo:cost", action: "*", }, { resource: "turo:metrics", action: "*", }, ...PROJECT_COMPLIANCE_USER_ACTIONS ], }
TURO_ADMIN_POLICY
Type : object
Default value : { name: "Turo Admin Policy", statements: [ { resource: "*", action: "*", }, ], }
TURO_READONLY_POLICY
Type : object
Default value : { name: "Turo Readonly Policy", statements: [ { resource: "turo:project", action: "project:ReadProject", }, { resource: "turo:model", action: "model:ReadModel", }, { resource: "turo:cost", action: "cost:ReadCost", }, { resource: "turo:compliance", action: "compliance:ReadCompliance", }, { resource: "turo:compliance", action: "compliance:ReadRisk", }, { resource: "turo:compliance", action: "compliance:ReadEvidence", }, { resource: "turo:compliance", action: "compliance:ReadSettings" }, { resource: "turo:compliance", action: "compliance:ReadRule" }, { resource: "turo:compliance", action: "compliance:ReadPolicy" }, ], }
TURO_SECURITY_MANAGER_POLICY
Type : object
Default value : { name: "Turo Security Manager Policy", statements: [ ...PROJECT_COMPLIANCE_READ_ACTIONS, { resource: "turo:compliance", action: "compliance:ReadSettings" }, { resource: "turo:compliance", action: "compliance:CreateRule" }, { resource: "turo:compliance", action: "compliance:ReadRule" }, { resource: "turo:compliance", action: "compliance:UpdateRule" }, { resource: "turo:compliance", action: "compliance:DeleteRule" }, { resource: "turo:compliance", action: "compliance:CreatePolicy" }, { resource: "turo:compliance", action: "compliance:ReadPolicy" }, { resource: "turo:compliance", action: "compliance:UpdatePolicy" }, { resource: "turo:compliance", action: "compliance:DeletePolicy" }, ] }

src/businessUnit/business-unit.constants.ts

BUSINESS_UNIT_CREATE_ACTION
Type : string
Default value : "businessUnit:CreateBusinessUnit"
BUSINESS_UNIT_DELETE_ACTION
Type : string
Default value : "businessUnit:DeleteBusinessUnit"
BUSINESS_UNIT_READ_ACTION
Type : string
Default value : "businessUnit:ReadBusinessUnit"
BUSINESS_UNIT_RESOURCE_NAME
Type : string
Default value : "turo:businessUnit"
BUSINESS_UNIT_UPDATE_ACTION
Type : string
Default value : "businessUnit:UpdateBusinessUnit"

src/compliance/compliance.activity.ts

businessUnitService
Default value : new BusinessUnitService( prisma, userService, roleService, notificationService, )
complianceRiskService
Default value : new ComplianceRiskService( prisma, temporalProvider, notificationService, requestService, )
complianceRuleService
Default value : new ComplianceRuleService( prisma, userService, temporalProvider, )
complianceService
Default value : new ComplianceService( prisma, temporalProvider, complianceRiskService, projectSettingsService, policyService, )
emailProvider
Default value : new EmailProvider()
keycloakProvider
Default value : new KeycloakProvider()
notificationService
Default value : new NotificationService( prisma, temporalProvider, emailProvider, )
policyService
Default value : new PolicyService(prisma, keycloakProvider)
prisma
Default value : new PrismaService()
projectSettingsService
Default value : new SettingsService( prisma, roleService, requestService, notificationService, temporalProvider, userService, businessUnitService, )
requestService
Default value : new RequestService( prisma, temporalProvider, notificationService, )
roleService
Default value : new RoleService(prisma)
temporalProvider
Default value : new TemporalProvider()
userService
Default value : new UserService(prisma, keycloakProvider)

src/project/project.activity.ts

businessUnitService
Default value : new BusinessUnitService( prisma, userService, roleService, notificationService, )
emailProvider
Default value : new EmailProvider()
httpService
Default value : new HttpService()
influxDbProvider
Default value : new InfluxDbProvider()
keycloakProvider
Default value : new KeycloakProvider()
mlflowProvider
Default value : new MLflowProvider(httpService, influxDbProvider)
modelService
Default value : new ModelService( prisma, projectService, mlflowProvider, opentelemetryProvider, temporalProvider, notificationService, )
notificationService
Default value : new NotificationService( prisma, temporalProvider, emailProvider, )
opentelemetryProvider
Default value : new OpentelemetryProvider(influxDbProvider)
policyService
Default value : new PolicyService(prisma, keycloakProvider)
prisma
Default value : new PrismaService()
projectService
Default value : new ProjectService( prisma, requestService, policyService, projectSettingsService, )
projectSettingsService
Default value : new SettingsService( prisma, roleService, requestService, notificationService, temporalProvider, userService, businessUnitService, )
requestService
Default value : new RequestService( prisma, temporalProvider, notificationService, )
roleService
Default value : new RoleService(prisma)
temporalProvider
Default value : new TemporalProvider()
userService
Default value : new UserService(prisma, keycloakProvider)

src/cost/workflows/cost.activity.ts

businessUnitService
Default value : new BusinessUnitService( prisma, userService, roleService, notificationService, )
costProvider
Default value : new CostProvider()
costService
Default value : new CostService(prisma, null, costProvider)
emailProvider
Default value : new EmailProvider()
keycloakProvider
Default value : new KeycloakProvider()
notificationService
Default value : new NotificationService( prisma, temporalProvider, emailProvider, )
prisma
Default value : new PrismaService()
projectService
Default value : new ProjectService(prisma, null, null, null)
roleService
Default value : new RoleService(prisma)
settingsService
Default value : new SettingsService( prisma, roleService, null, notificationService, temporalProvider, userService, businessUnitService, turoSettingsService, )
temporalProvider
Default value : new TemporalProvider()
turoSettingsService
Default value : new TuroSettingsService( prisma, userService, roleService, notificationService, )
userService
Default value : new UserService(prisma, keycloakProvider)

src/businessUnit/business-unit.events.ts

businessUnitSettingsEventsConfig
Type : object
Default value : { [BusinessUnitSettingsEvents.ASSIGN_USER_BU_ROLE]: { entityTable: "userBURole", severity: NotificationSeverity.INFO, channelConfig: { [NotificationChannel.APP]: ASSIGN_USER_BU_ROLE_APP_TEMPLATE, [NotificationChannel.EMAIL]: ASSIGN_USER_BU_ROLE_EMAIL_TEMPLATE, }, }, [BusinessUnitSettingsEvents.DELETE_USER_BU_ROLE]: { entityTable: "userBURole", severity: NotificationSeverity.INFO, channelConfig: { [NotificationChannel.APP]: DELETE_USER_BU_ROLE_APP_TEMPLATE, [NotificationChannel.EMAIL]: DELETE_USER_BU_ROLE_EMAIL_TEMPLATE, }, }, }

src/request/templates/request-app.templates.ts

COMMENT_APP_TEMPLATE
Type : object
Default value : { subject: "New comment on request - {{ request.name }}", body: `There's a new comment by {{ commenter }} on {{ requestType }} request titled {{ request.name }}.`, }

src/request/templates/request-email.templates.ts

COMMENT_EMAIL_TEMPLATE
Type : object
Default value : { subject: "New comment: {{ request.name }} {{ requestType }} request", body: ` ${EMAIL_HEADER} <div class="content"> <div class="paragraph"> Hi {{ sendToName }}, <br><br> You have received a new comment on the <strong>{{ request.name }}</strong> {{ requestType }} request by {{ commenter }}. <br><br> <a class="button" href="{{ requestURL }}">View comment</a> </div> </div> ${EMAIL_FOOTER} `, }

src/compliance/templates/compliance-app.templates.ts

COMPLIANCE_APPROVE_RISK_APP_TEMPLATE
Type : object
Default value : { subject: "{{{ project.name }}} - Compliance Risk Approved", body: `A compliance risk has been approved: {{{ rule.name }}}`, }
COMPLIANCE_ASSIGN_RISK_APP_TEMPLATE
Type : object
Default value : { subject: "{{{ project.name }}} - Compliance Risk Assigned", body: `A compliance risk has been assigned to you: {{{ rule.name }}}`, }
COMPLIANCE_REJECT_RISK_APP_TEMPLATE
Type : object
Default value : { subject: "{{{ project.name }}} - Compliance Risk Rejected", body: `A compliance risk has been rejected: {{{ rule.name }}}`, }
COMPLIANCE_SUBMIT_RISK_APP_TEMPLATE
Type : object
Default value : { subject: "{{{ project.name }}} - Compliance Risk Submitted", body: `A compliance risk has been submitted: {{{ rule.name }}}`, }
COMPLIANCE_UPDATE_INTERNAL_POLICY_APP_TEMPLATE
Type : object
Default value : { subject: "{{{ policy.name }}}: Policy has been edited", body: `Internal policy has been edited by {{ updatedBy }}`, }
COMPLIANCE_UPDATE_RULE_APP_TEMPLATE
Type : object
Default value : { subject: "{{{ rule.name }}} has been edited", body: `Control has been edited by {{ updatedBy }}`, }

src/compliance/templates/compliance-email.templates.ts

COMPLIANCE_APPROVE_RISK_EMAIL_TEMPLATE
Type : object
Default value : { subject: "{{{ project.name }}} - Compliance Risk Approved: {{{ rule.name }}}", body: ` ${EMAIL_HEADER} <div class="content"> <div class="paragraph"> Hi {{ sendToName }}, <br><br> Your compliance risk submission has been approved: <strong>{{{ rule.name }}}</strong> by {{ approver }}. <br><br> <table> <tr> <td>Project</td> <td>{{project.name}}</td> </tr> <tr> <td>Risk</td> <td>{{rule.name}}</td> </tr> <tr> <td>Severity</td> <td>{{rule.severity}}</td> </tr> <tr> <td>Category</td> <td>{{rule.category}}</td> </tr> <tr> <td>Description</td> <td>{{rule.description}}</td> </tr> </table> <br><br> If you have any questions or need further assistance, please contact our support team. <br><br> <a class="button" href="{{ formattedRequestUrl }}">View Request</a> </div> </div> ${EMAIL_FOOTER} `, }
COMPLIANCE_ASSIGN_RISK_EMAIL_TEMPLATE
Type : object
Default value : { subject: "{{{ project.name }}} - Compliance Risk Assigned: {{{ rule.name }}}", body: ` ${EMAIL_HEADER} <div class="content"> <div class="paragraph"> Hi {{ sendToName }}, <br><br> A compliance risk has been assigned to you: <strong>{{{ rule.name }}}</strong> by {{ assigner }}. <br><br> <table> <tr> <td>Project</td> <td>{{project.name}}</td> </tr> <tr> <td>Risk</td> <td>{{rule.name}}</td> </tr> <tr> <td>Severity</td> <td>{{rule.severity}}</td> </tr> <tr> <td>Category</td> <td>{{rule.category}}</td> </tr> <tr> <td>Description</td> <td>{{rule.description}}</td> </tr> </table> <br><br> If you have any questions or need further assistance, please contact our support team. <br><br> <a class="button" href="{{ complianceUrl }}">View Risks</a> </div> </div> ${EMAIL_FOOTER} `, }
COMPLIANCE_REJECT_RISK_EMAIL_TEMPLATE
Type : object
Default value : { subject: "{{{ project.name }}} - Compliance Risk Rejected: {{{ rule.name }}}", body: ` ${EMAIL_HEADER} <div class="content"> <div class="paragraph"> Hi {{ sendToName }}, <br><br> Your compliance risk submission has been rejected: <strong>{{{ rule.name }}}</strong> by {{ approver }}. <br><br> <table> <tr> <td>Project</td> <td>{{project.name}}</td> </tr> <tr> <td>Risk</td> <td>{{rule.name}}</td> </tr> <tr> <td>Severity</td> <td>{{rule.severity}}</td> </tr> <tr> <td>Category</td> <td>{{rule.category}}</td> </tr> <tr> <td>Description</td> <td>{{rule.description}}</td> </tr> </table> <br><br> If you have any questions or need further assistance, please contact our support team. <br><br> <a class="button" href="{{ formattedRequestUrl }}">View Request</a> </div> </div> ${EMAIL_FOOTER} `, }
COMPLIANCE_SUBMIT_RISK_EMAIL_TEMPLATE
Type : object
Default value : { subject: "{{{ project.name }}} - Compliance Risk Submitted: {{{ rule.name }}}", body: ` ${EMAIL_HEADER} <div class="content"> <div class="paragraph"> Hi {{ sendToName }}, <br><br> New compliance risk submission for compliance risk: <strong>{{{ rule.name }}}</strong> has been submitted by {{ submittedBy }}. <br><br> <table> <tr> <td>Project</td> <td>{{project.name}}</td> </tr> <tr> <td>Risk</td> <td>{{rule.name}}</td> </tr> <tr> <td>Severity</td> <td>{{rule.severity}}</td> </tr> <tr> <td>Category</td> <td>{{rule.category}}</td> </tr> <tr> <td>Description</td> <td>{{rule.description}}</td> </tr> </table> <br><br> If you have any questions or need further assistance, please contact our support team. <br><br> <a class="button" href="{{ complianceUrl }}">View Risks</a> </div> </div> ${EMAIL_FOOTER} `, }
COMPLIANCE_UPDATE_INTERNAL_POLICY_EMAIL_TEMPLATE
Type : object
Default value : { subject: "Policy updates: {{{ policy.name }}}", body: ` ${EMAIL_HEADER} <div class="content"> <div class="paragraph"> Hi {{ sendToName }}, <br><br> The internal policy <strong>{{{ policy.name }}}</strong> has been edited by {{ updatedBy }}. <br><br> Please find the changes below: <table> <tr> <td>Policy name</td> <td>{{policy.name}}</td> </tr> </table> <br><br> <a class="button" href="{{ policyUrl }}">View Changes</a> </div> </div> ${EMAIL_FOOTER} `, }
COMPLIANCE_UPDATE_RULE_EMAIL_TEMPLATE
Type : object
Default value : { subject: "Control updates: {{{ rule.name }}}", body: ` ${EMAIL_HEADER} <div class="content"> <div class="paragraph"> Hi {{ sendToName }}, <br><br> The control <strong>{{{ rule.name }}}</strong> has been edited by {{ updatedBy }}. <br><br> Please find the changes below: <table> <tr> <td>Control category</td> <td>{{rule.category}}</td> </tr> </table> <br><br> <a class="button" href="{{ ruleUrl }}">View Changes</a> </div> </div> ${EMAIL_FOOTER} `, }

src/cost/templates/cost-email.templates.ts

COMPLIANCE_CONNECTION_ERROR_EMAIL_TEMPLATE
Type : object
Default value : { subject: "Connection interrupted: {{{ endpoint.name }}}", body: ` ${EMAIL_HEADER} <div class="content"> <div class="paragraph"> Hi {{ sendToName }}, <br><br> Your API key doesn't work anymore. Please check it to restore your <strong>{{{ endpoint.name }}}</strong> connection. <br><br> <a class="button" href="{{ connectionEditUrl }}">Edit connection</a> </div> </div> ${EMAIL_FOOTER} `, }

src/compliance/compliance.constants.ts

COMPLIANCE_EVIDENCE_READ_ACTION
Type : string
Default value : "compliance:ReadEvidence"
COMPLIANCE_EVIDENCE_SUBMIT_ACTION
Type : string
Default value : "compliance:SubmitEvidence"
COMPLIANCE_JURISDICTIONS
Type : object
Default value : { [Jurisdiction.INTERNATIONAL]: { key: Jurisdiction.INTERNATIONAL, name: "International", description: "Applies to multiple countries or regions", }, [Jurisdiction.US]: { key: Jurisdiction.US, name: "United States", description: "Applies to the United States", }, [Jurisdiction.EU]: { key: Jurisdiction.EU, name: "European Union", description: "Applies to the European Union", }, [Jurisdiction.UK]: { key: Jurisdiction.UK, name: "United Kingdom", description: "Applies to the United Kingdom", }, }
COMPLIANCE_POLICY_CREATE_ACTION
Type : string
Default value : "compliance:CreatePolicy"
COMPLIANCE_POLICY_DELETE_ACTION
Type : string
Default value : "compliance:DeletePolicy"
COMPLIANCE_POLICY_READ_ACTION
Type : string
Default value : "compliance:ReadPolicy"
COMPLIANCE_POLICY_UPDATE_ACTION
Type : string
Default value : "compliance:UpdatePolicy"
COMPLIANCE_READ_ACTION
Type : string
Default value : "compliance:ReadCompliance"
COMPLIANCE_RESOURCE_NAME
Type : string
Default value : "turo:compliance"
COMPLIANCE_RISK_READ_ACTION
Type : string
Default value : "compliance:ReadRisk"
COMPLIANCE_RISK_SUBMIT_ACTION
Type : string
Default value : "compliance:SubmitRisk"
COMPLIANCE_RISK_UPDATE_ACTION
Type : string
Default value : "compliance:UpdateRisk"
COMPLIANCE_RULE_CREATE_ACTION
Type : string
Default value : "compliance:CreateRule"
COMPLIANCE_RULE_DELETE_ACTION
Type : string
Default value : "compliance:DeleteRule"
COMPLIANCE_RULE_READ_ACTION
Type : string
Default value : "compliance:ReadRule"
COMPLIANCE_RULE_UPDATE_ACTION
Type : string
Default value : "compliance:UpdateRule"
COMPLIANCE_SETTINGS_READ_ACTION
Type : string
Default value : "compliance:ReadSettings"
COMPLIANCE_SUBMIT_ACTION
Type : string
Default value : "compliance:SubmitCompliance"

prisma/seedData/compliance.data.ts

COMPLIANCE_POLICY_DATA
Type : []
Default value : [ { name: "Data Privacy Compliance Policy", description: "This policy ensures compliance with data privacy regulations.", jurisdiction: Jurisdiction.INTERNATIONAL, source: CompliancePolicySource.INTERNAL, }, { name: "Security Compliance Policy", description: "This policy ensures compliance with security regulations.", jurisdiction: Jurisdiction.INTERNATIONAL, source: CompliancePolicySource.INTERNAL, }, { name: "Transparency Compliance Policy", description: "This policy ensures transparency and explainability in decision-making.", jurisdiction: Jurisdiction.INTERNATIONAL, source: CompliancePolicySource.INTERNAL, }, { name: "International Organization for Standardization (ISO) 27001", jurisdiction: Jurisdiction.INTERNATIONAL, description: "Information security management system (ISMS) standard that specifies the requirements for establishing, implementing, maintaining, and continually improving an information security management system.", source: CompliancePolicySource.EXTERNAL, }, { name: "National Institute of Standards and Technology (NIST) Cybersecurity Framework", jurisdiction: Jurisdiction.US, description: "Framework that helps organizations manage and reduce cybersecurity risks.", source: CompliancePolicySource.EXTERNAL, }, { name: "General Data Protection Regulation (GDPR)", jurisdiction: Jurisdiction.EU, description: "Regulation that protects the personal data and privacy of individuals in the European Union.", source: CompliancePolicySource.EXTERNAL, }, { name: "Health Insurance Portability and Accountability Act (HIPAA)", jurisdiction: Jurisdiction.US, description: "Regulation that protects the privacy and security of health information.", source: CompliancePolicySource.EXTERNAL, }, { name: "Payment Card Industry Data Security Standard (PCI DSS)", jurisdiction: Jurisdiction.INTERNATIONAL, description: "Standard that ensures the secure handling of credit card information.", source: CompliancePolicySource.EXTERNAL, }, { name: "California Consumer Privacy Act (CCPA)", jurisdiction: Jurisdiction.US, description: "Regulation that enhances privacy rights and consumer protection for residents of California.", source: CompliancePolicySource.EXTERNAL, }, ]
COMPLIANCE_RISK_DATA
Type : []
Default value : [ { status: ComplianceRiskStatus.TODO, ruleId: 1, projectId: 1, complianceSubmissionId: 1, }, { status: ComplianceRiskStatus.TODO, ruleId: 2, projectId: 1, complianceSubmissionId: 1, }, { status: ComplianceRiskStatus.TODO, ruleId: 3, projectId: 2, complianceSubmissionId: 2, }, { status: ComplianceRiskStatus.TODO, ruleId: 4, projectId: 2, complianceSubmissionId: 2, }, { status: ComplianceRiskStatus.TODO, ruleId: 5, projectId: 2, complianceSubmissionId: 2, }, { status: ComplianceRiskStatus.TODO, ruleId: 6, projectId: 3, complianceSubmissionId: 3, }, { status: ComplianceRiskStatus.TODO, ruleId: 7, projectId: 3, complianceSubmissionId: 3, }, ]
COMPLIANCE_RULE_DATA
Type : []
Default value : [ { name: "Data Privacy Compliance Rule", description: "This rule ensures compliance with data privacy regulations.", countermeasure: "Implement data privacy controls and policies.", severity: ComplianceRiskSeverity.HIGH, category: ComplianceRiskCategory.SECURITY, status: ComplianceStatus.ACTIVE, policies: ["Data Privacy Compliance Policy"], }, { name: "Data Retention Compliance Rule", description: "This rule ensures compliance with data retention regulations.", countermeasure: "Implement data retention controls and policies.", severity: ComplianceRiskSeverity.MEDIUM, category: ComplianceRiskCategory.SECURITY, status: ComplianceStatus.ACTIVE, policies: [ "Data Privacy Compliance Policy", "General Data Protection Regulation (GDPR)", ], }, { name: "Security Compliance Rule", description: "This rule ensures compliance with security regulations.", countermeasure: "Implement security controls and policies.", severity: ComplianceRiskSeverity.MEDIUM, category: ComplianceRiskCategory.SECURITY, status: ComplianceStatus.ACTIVE, policies: ["Security Compliance Policy"], }, { name: "Transparency Compliance Rule", description: "This rule ensures transparency and explainability in decision-making.", countermeasure: "Implement transparency controls and policies.", severity: ComplianceRiskSeverity.LOW, category: ComplianceRiskCategory.TRANSPARENCY_AND_EXPLAINIBILITY, status: ComplianceStatus.ACTIVE, policies: ["Transparency Compliance Policy"], }, { name: "Vendor Oversight Compliance Rule", description: "This rule ensures oversight and control over vendors and their activities.", countermeasure: "Implement vendor oversight controls and policies.", severity: ComplianceRiskSeverity.HIGH, category: ComplianceRiskCategory.THIRD_PARTY_RISKS, status: ComplianceStatus.ACTIVE, policies: ["General Data Protection Regulation (GDPR)"], }, { name: "Dependency Management Compliance Rule", description: "This rule ensures proper management of dependencies on third-party tools.", countermeasure: "Implement dependency management controls and policies.", severity: ComplianceRiskSeverity.MEDIUM, category: ComplianceRiskCategory.THIRD_PARTY_RISKS, status: ComplianceStatus.ACTIVE, policies: ["General Data Protection Regulation (GDPR)"], }, { name: "Vendor Lock-in Compliance Rule", description: "This rule ensures mitigation of risks associated with vendor lock-in.", countermeasure: "Implement vendor lock-in controls and policies.", severity: ComplianceRiskSeverity.LOW, category: ComplianceRiskCategory.THIRD_PARTY_RISKS, status: ComplianceStatus.ACTIVE, policies: ["General Data Protection Regulation (GDPR)"], }, ]
COMPLIANCE_SUBMISSION_DATA
Type : []
Default value : [ { submittedBy: "test@me.com", status: ComplianceSubmissionStatus.OPEN, jurisdictions: [Jurisdiction.INTERNATIONAL], project: { connect: { id: 1 }, }, policies: { connect: { id: 1 }, }, }, { submittedBy: "test@me.com", status: ComplianceSubmissionStatus.OPEN, jurisdictions: [Jurisdiction.INTERNATIONAL], project: { connect: { id: 2 }, }, policies: { connect: { id: 2 }, }, }, { submittedBy: "test@me.com", status: ComplianceSubmissionStatus.OPEN, jurisdictions: [Jurisdiction.INTERNATIONAL], project: { connect: { id: 3 }, }, policies: { connect: { id: 3 }, }, }, ]

src/compliance/templates/compliance-ping.templates.ts

COMPLIANCE_UPDATE_INTERNAL_POLICY_PING_TEMPLATE
Type : object
Default value : { subject: "Policy edited", body: `{{{ policy.name }}} has been edited in the Policy Centre.`, }
COMPLIANCE_UPDATE_RULE_PING_TEMPLATE
Type : object
Default value : { subject: "Control edited", body: `{{{ rule.name }}} has been edited in the Policy Centre.`, }

src/compliance/compliance.events.ts

complianceEventsConfig
Type : object
Default value : { [ComplianceEvents.COMPLIANCE_ASSIGN_RISK]: { entityTable: "complianceRisk", severity: NotificationSeverity.INFO, channelConfig: { [NotificationChannel.APP]: COMPLIANCE_ASSIGN_RISK_APP_TEMPLATE, [NotificationChannel.EMAIL]: COMPLIANCE_ASSIGN_RISK_EMAIL_TEMPLATE, }, }, [ComplianceEvents.COMPLIANCE_SUBMIT_RISK]: { entityTable: "complianceRisk", severity: NotificationSeverity.INFO, channelConfig: { [NotificationChannel.APP]: COMPLIANCE_SUBMIT_RISK_APP_TEMPLATE, [NotificationChannel.EMAIL]: COMPLIANCE_SUBMIT_RISK_EMAIL_TEMPLATE, }, }, [ComplianceEvents.COMPLIANCE_APPROVE_RISK]: { entityTable: "complianceRisk", severity: NotificationSeverity.SUCCESS, channelConfig: { [NotificationChannel.APP]: COMPLIANCE_APPROVE_RISK_APP_TEMPLATE, [NotificationChannel.EMAIL]: COMPLIANCE_APPROVE_RISK_EMAIL_TEMPLATE, }, }, [ComplianceEvents.COMPLIANCE_REJECT_RISK]: { entityTable: "complianceRisk", severity: NotificationSeverity.ERROR, channelConfig: { [NotificationChannel.APP]: COMPLIANCE_REJECT_RISK_APP_TEMPLATE, [NotificationChannel.EMAIL]: COMPLIANCE_REJECT_RISK_EMAIL_TEMPLATE, }, }, [ComplianceEvents.COMPLIANCE_UPDATE_RULE]: { entityTable: "complianceRule", severity: NotificationSeverity.INFO, channelConfig: { [NotificationChannel.APP]: COMPLIANCE_UPDATE_RULE_APP_TEMPLATE, [NotificationChannel.EMAIL]: COMPLIANCE_UPDATE_RULE_EMAIL_TEMPLATE, [NotificationChannel.PING]: COMPLIANCE_UPDATE_RULE_PING_TEMPLATE, }, }, [ComplianceEvents.COMPLIANCE_UPDATE_POLICY]: { entityTable: "compliancePolicy", severity: NotificationSeverity.INFO, channelConfig: { [NotificationChannel.APP]: COMPLIANCE_UPDATE_INTERNAL_POLICY_APP_TEMPLATE, [NotificationChannel.EMAIL]: COMPLIANCE_UPDATE_INTERNAL_POLICY_EMAIL_TEMPLATE, [NotificationChannel.PING]: COMPLIANCE_UPDATE_INTERNAL_POLICY_PING_TEMPLATE, }, }, }

src/models/templates/connect-model-app.templates.ts

CONNECT_MODEL_APP_TEMPLATE
Type : object
Default value : { subject: "Model connection request", body: `{{requestedByName}} has requested to connect a model to {{projectName}}. \n\n {{description}}`, }

src/models/templates/connect-model-email.templates.ts

CONNECT_MODEL_EMAIL_TEMPLATE
Type : object
Default value : { subject: "{{ projectName }} - request for connecting a model", body: ` ${EMAIL_HEADER} <div class="content"> <div class="paragraph"> Hello {{ sendToName }}, <br><br> <strong>{{ requestedByName }}</strong> has submitted a request to register a model for {{ projectName }}. <br><br> <blockquote> "{{ description }}" </blockquote> <br><br> <a class="button" href="{{ requestURL }}">Connect model</a> </div> </div> ${EMAIL_FOOTER} `, }

src/cost/cost.constants.ts

COST_CATEGORIES
Type : object
Default value : { SECURITY: "Security", COST_MANAGEMENT: "Cost Management", ANALYTICS: "Analytics", COMPUTE: "Compute", STORAGE: "Storage", NETWORKING: "Networking", MESSAGING: "Messaging", TAX: "Tax", MONITORING: "Monitoring", }
COST_CREATE_ACTION
Type : string
Default value : "cost:CreateCost"
COST_DELETE_ACTION
Type : string
Default value : "cost:DeleteCost"
COST_PUSH_METRICS_ACTION
Type : string
Default value : "cost:PushMetrics"
COST_READ_ACTION
Type : string
Default value : "cost:ReadCost"
COST_RESOURCE_NAME
Type : string
Default value : "turo:cost"
COST_UPDATE_ACTION
Type : string
Default value : "cost:UpdateCost"

src/cost/cost.errors.ts

COST_CONNECTION_ERROR_MESSAGE
Type : string
Default value : "Failed to connect to the cost provider."
COST_CONNECTION_ERROR_TYPE
Type : string
Default value : "CostConnectionError"

src/cost/workflows/opentelemetry/opentelemetry.constants.ts

COST_PUSH_METRICS_PROVIDERS
Type : []
Default value : [ CostProvider.openai, CostProvider.anthropic, ]

src/cost/cost.events.ts

costEventsConfig
Type : object
Default value : { [CostEvents.COST_CONNECTION_ERROR]: { entityTable: "costEndpoint", severity: NotificationSeverity.ERROR, channelConfig: { [NotificationChannel.APP]: null, [NotificationChannel.EMAIL]: COMPLIANCE_CONNECTION_ERROR_EMAIL_TEMPLATE, }, }, }

src/cost/workflows/kubecost/kubecost.activity.ts

costProvider
Default value : new CostProvider()
costService
Default value : new CostService(prisma, null, costProvider)
kubecostProvider
Default value : costProvider.getCostProvider(provider.kubecost)
prisma
Default value : new PrismaService()

src/cost/workflows/opentelemetry/opentelemetry.activity.ts

costProvider
Default value : new CostProvider()
costService
Default value : new CostService(prisma, null, costProvider)
prisma
Default value : new PrismaService()

prisma/seedData/cost.data.ts

costTypes
Type : object
Default value : { "cpuCost": "Compute", "gpuCost": "Compute", "ramCost": "Compute", "pvCost": "Storage", "networkCost": "Networking", "loadBalancerCost": "Compute", "sharedCost": "Compute", }
dates
Type : []
Default value : [ new Date(2024, 4, 14, 6,30,0,0).toISOString(), new Date(2024, 4, 14, 7,30,0,0).toISOString(), new Date(2024, 4, 14, 8,30,0,0).toISOString(), new Date(2024, 4, 13, 6,30,0,0).toISOString(), new Date(2024, 4, 13, 7,30,0,0).toISOString(), new Date(2024, 4, 13, 8,30,0,0).toISOString(), new Date(2024, 3, 14, 6,30,0,0).toISOString(), new Date(2024, 3, 14, 7,30,0,0).toISOString(), new Date(2024, 3, 14, 8,30,0,0).toISOString(), new Date(2024, 2, 14, 6,30,0,0).toISOString(), new Date(2024, 2, 14, 7,30,0,0).toISOString(), new Date(2024, 2, 14, 8,30,0,0).toISOString(), new Date(2023, 4, 14, 6,30,0,0).toISOString(), new Date(2023, 4, 14, 7,30,0,0).toISOString(), new Date(2023, 4, 14, 8,30,0,0).toISOString(), ]

src/common/helper.ts

CRYPTO_ALGO
Default value : process.env.CRYPTO_ALGO
CRYPTO_ENCRYPTION_KEY
Default value : process.env.CRYPTO_ENCRYPTION_KEY

prisma/seedData/metrics.data.ts

days
Type : number
Default value : 90
decreasePeriod
Type : object
Default value : { start: 30, end: 40 }
floatData
Default value : generateRandomData(METRICS_DATA_START_DATE, days, 0.25, 20, decreasePeriod)
integerData
Default value : generateRandomData(METRICS_DATA_START_DATE, days, 10, 1000, decreasePeriod, true)
METRICS_DATA_START_DATE
Default value : new Date()
METRICS_INPUT
Type : []
Default value : [ { name: 'Number of inquiries handled by chatbot', type: 'gauge', sourceId: 1, sourceType: 'MODEL', modelSlug: "response-generation", trendData: { trend: "INCREASE_POSITIVE", deviation: 0.15, }, data: integerData.map((data, index) => ({ value: data.value, timestamp: data.timestamp })) }, { name: 'Increase in customer satisfaction scores (%)', type: 'gauge', sourceId: 1, sourceType: 'MODEL', modelSlug: "response-generation", trendData: { trend: "DECREASE_POSITIVE", deviation: 0.15, }, data: percentageData.map((data, index) => ({ value: data.value, timestamp: data.timestamp })) }, { name: 'Open rate of AI generated forecasts (%)', type: 'gauge', sourceId: 2, sourceType: 'MODEL', modelSlug: "ai-generated-forecasts", trendData: { trend: "INCREASE_POSITIVE", deviation: -0.25, }, data: percentageData.map((data, index) => ({ value: data.value, timestamp: data.timestamp })) }, { name: 'Accuracy of financial forecasts (%)', type: 'gauge', sourceId: 2, sourceType: 'MODEL', modelSlug: "ai-generated-forecasts", trendData: { trend: "INCREASE_POSITIVE", deviation: 0.15, }, data: percentageData.map((data, index) => ({ value: data.value, timestamp: data.timestamp })) }, { name: 'Number of accepted next-best-action recommendations', type: 'gauge', sourceId: 4, sourceType: 'MODEL', modelSlug: "recommendation-engine", trendData: { trend: null, deviation: 0.25, }, data: integerData.map((data, index) => ({ value: data.value, timestamp: data.timestamp })) }, { name: 'Improvement in Customer Lifetime Value (CLV) (%)', type: 'gauge', sourceId: 5, sourceType: 'MODEL', modelSlug: "business-metrics", trendData: { trend: "INCREASE_POSITIVE", deviation: 0.15, }, data: percentageData.map((data, index) => ({ value: data.value, timestamp: data.timestamp })) }, { name: 'Repeated users', type: 'gauge', sourceId: 6, sourceType: 'MODEL', modelSlug: "text-summarization", trendData: { trend: "INCREASE_POSITIVE", deviation: -0.25, }, data: integerData.map((data, index) => ({ value: data.value, timestamp: data.timestamp })) }, { name: 'Increase in throughput of document requests (%)', type: 'gauge', sourceId: 6, sourceType: 'MODEL', modelSlug: "text-summarization", trendData: { trend: null, deviation: -0.15, }, data: percentageData.map((data, index) => ({ value: data.value, timestamp: data.timestamp })) }, { name: 'Number of flagged suspicious transactions', type: 'gauge', sourceId: 8, sourceType: 'MODEL', modelSlug: "fraud-detection", trendData: { trend: "INCREASE_POSITIVE", deviation: 0.15, }, data: integerData.map((data, index) => ({ value: data.value, timestamp: data.timestamp })) }, { name: 'Decrease in financial losses due to fraud (%)', type: 'gauge', sourceId: 8, sourceType: 'MODEL', modelSlug: "fraud-detection", trendData: { trend: "DECREASE_POSITIVE", deviation: 0.25, }, data: percentageData.map((data, index) => ({ value: data.value, timestamp: data.timestamp })) }, { name: 'Cost reduction over baseline (%)', type: 'gauge', sourceId: 10, sourceType: 'MODEL', modelSlug: "network-optimization", trendData: { trend: null, deviation: 0.25, }, data: percentageData.map((data, index) => ({ value: data.value, timestamp: data.timestamp })) }, { name: 'Number of network optimizations created', type: 'gauge', sourceId: 10, sourceType: 'MODEL', modelSlug: "network-optimization", trendData: { trend: "INCREASE_POSITIVE", deviation: -0.25, }, data: integerData.map((data, index) => ({ value: data.value, timestamp: data.timestamp })) }, { name: 'Number of generated documents', type: 'gauge', sourceId: 12, sourceType: 'MODEL', modelSlug: "executive-reports", trendData: { trend: "INCREASE_POSITIVE", deviation: 0.15, }, data: integerData.map((data, index) => ({ value: data.value, timestamp: data.timestamp })) }, { name: 'Reduction in time required to draft reports (hours)', type: 'gauge', sourceId: 12, sourceType: 'MODEL', modelSlug: "executive-reports", trendData: { trend: "DECREASE_POSITIVE", deviation: -0.15, }, data: floatData.map((data, index) => ({ value: data.value, timestamp: data.timestamp })) }, { name: 'Number of high risk identified clients', type: 'gauge', sourceId: 14, sourceType: 'MODEL', modelSlug: "churn-prediction", trendData: { trend: null, deviation: 0.15, }, data: integerData.map((data, index) => ({ value: data.value, timestamp: data.timestamp })) }, { name: 'Increase in customer retention rate (%)', type: 'gauge', sourceId: 14, sourceType: 'MODEL', modelSlug: "churn-prediction", trendData: { trend: "INCREASE_POSITIVE", deviation: -0.25, }, data: percentageData.map((data, index) => ({ value: data.value, timestamp: data.timestamp })) }, { name: 'Click-through rate (CTR) of personalized recommendations (%)', type: 'gauge', sourceId: 16, sourceType: 'MODEL', modelSlug: "collaborative-filtering", trendData: { trend: null, deviation: 0.15, }, data: percentageData.map((data, index) => ({ value: data.value, timestamp: data.timestamp })) }, { name: 'Increase in average order value (AOV) (%)', type: 'gauge', sourceId: 16, sourceType: 'MODEL', modelSlug: "collaborative-filtering", trendData: { trend: "INCREASE_POSITIVE", deviation: 0.25, }, data: percentageData.map((data, index) => ({ value: data.value, timestamp: data.timestamp })) }, { projectId: 10, name: 'Increase in campaign effectiveness (%)', type: 'gauge', sourceId: 18, sourceType: 'MODEL', modelSlug: "clustering", trendData: { trend: null, deviation: -0.15, }, data: percentageData.map((data, index) => ({ value: data.value, timestamp: data.timestamp })) }, { projectId: 10, name: 'Accuracy of customer segmentation (%)', type: 'gauge', sourceId: 18, sourceType: 'MODEL', modelSlug: "clustering", trendData: { trend: "INCREASE_POSITIVE", deviation: 0.15, }, data: percentageData.map((data, index) => ({ value: data.value, timestamp: data.timestamp })) }, { projectId: 11, name: 'Number of identified threats', type: 'gauge', sourceId: 20, sourceType: 'MODEL', modelSlug: "intrusion-detection", trendData: { trend: "INCREASE_POSITIVE", deviation: -0.25, }, data: integerData.map((data, index) => ({ value: data.value, timestamp: data.timestamp })) }, { projectId: 11, name: 'Accuracy of threat detection (%)', type: 'gauge', sourceId: 20, sourceType: 'MODEL', modelSlug: "intrusion-detection", trendData: { trend: null, deviation: 0.15, }, data: percentageData.map((data, index) => ({ value: data.value, timestamp: data.timestamp })) }, { projectId: 12, name: 'On-time delivery rate (%)', type: 'gauge', sourceId: 22, sourceType: 'MODEL', modelSlug: "delivery-time-estimation", trendData: { trend: null, deviation: -0.15, }, data: percentageData.map((data, index) => ({ value: data.value, timestamp: data.timestamp })) }, { projectId: 12, name: 'Increase in customer satisfaction scores (%)', type: 'gauge', sourceId: 22, sourceType: 'MODEL', modelSlug: "delivery-time-estimation", trendData: { trend: "INCREASE_POSITIVE", deviation: 0.25, }, data: percentageData.map((data, index) => ({ value: data.value, timestamp: data.timestamp })) }, { projectId: 13, name: 'Increase in average portfolio return over baseline (%)', type: 'gauge', sourceId: 24, sourceType: 'MODEL', modelSlug: "portfolio-optimization", trendData: { trend: "INCREASE_POSITIVE", deviation: 0.15, }, data: percentageData.map((data, index) => ({ value: data.value, timestamp: data.timestamp })) }, { projectId: 13, name: 'Accepted recommendations by advisors', type: 'gauge', sourceId: 24, sourceType: 'MODEL', modelSlug: "portfolio-optimization", trendData: { trend: null, deviation: 0.15, }, data: integerData.map((data, index) => ({ value: data.value, timestamp: data.timestamp })) }, { projectId: 14, name: 'Accuracy of loan approval predictions (%)', type: 'gauge', sourceId: 27, sourceType: 'MODEL', modelSlug: "loan-approval-prediction", trendData: { trend: "INCREASE_POSITIVE", deviation: -0.15, }, data: percentageData.map((data, index) => ({ value: data.value, timestamp: data.timestamp })) }, { projectId: 14, name: 'Time taken to approve or reject loan applications', type: 'gauge', sourceId: 27, sourceType: 'MODEL', modelSlug: "loan-approval-prediction", trendData: { trend: "DECREASE_POSITIVE", deviation: 0.25, }, data: integerData.map((data, index) => ({ value: data.value, timestamp: data.timestamp })) }, { projectId: 15, name: 'Number of issues handled by chatbot', type: 'gauge', sourceId: 29, sourceType: 'MODEL', modelSlug: "response-generation-it", trendData: { trend: "INCREASE_POSITIVE", deviation: 0.15, }, data: integerData.map((data, index) => ({ value: data.value, timestamp: data.timestamp })) }, { projectId: 15, name: 'Reduction in average response time for IT support queries (hours)', type: 'gauge', sourceId: 29, sourceType: 'MODEL', modelSlug: "response-generation-it", trendData: { trend: "DECREASE_POSITIVE", deviation: 0.25, }, data: floatData.map((data, index) => ({ value: data.value, timestamp: data.timestamp })) }, { projectId: 16, name: 'Number of generated reports', type: 'gauge', sourceId: 30, sourceType: 'MODEL', modelSlug: "report-generation", trendData: { trend: "INCREASE_POSITIVE", deviation: -0.25, }, data: integerData.map((data, index) => ({ value: data.value, timestamp: data.timestamp })) }, { projectId: 16, name: 'Reduction in time required to generate IT reports (hours)', type: 'gauge', sourceId: 30, sourceType: 'MODEL', modelSlug: "report-generation", trendData: { trend: "DECREASE_POSITIVE", deviation: 0.15, }, data: floatData.map((data, index) => ({ value: data.value, timestamp: data.timestamp })) }, { projectId: 17, name: 'Mean credit score of loan applicants', type: 'gauge', sourceId: 32, sourceType: 'MODEL', modelSlug: "risk-scoring", trendData: { trend: "INCREASE_POSITIVE", deviation: -0.15, }, data: integerData.map((data, index) => ({ value: data.value, timestamp: data.timestamp })) }, { projectId: 17, name: 'Default rate on loans issued (%)', type: 'gauge', sourceId: 32, sourceType: 'MODEL', modelSlug: "risk-scoring", trendData: { trend: "DECREASE_POSITIVE", deviation: 0.25, }, data: floatData.map((data, index) => ({ value: data.value, timestamp: data.timestamp })) }, { projectId: 18, name: 'Number of generated documents', type: 'gauge', sourceId: 34, sourceType: 'MODEL', modelSlug: "document-generation", trendData: { trend: "INCREASE_POSITIVE", deviation: 0.15, }, data: integerData.map((data, index) => ({ value: data.value, timestamp: data.timestamp })) }, { projectId: 18, name: 'Reduction in time required to draft legal documents (hours)', type: 'gauge', sourceId: 34, sourceType: 'MODEL', modelSlug: "document-generation", trendData: { trend: "DECREASE_POSITIVE", deviation: 0.15, }, data: floatData.map((data, index) => ({ value: data.value, timestamp: data.timestamp })) }, { projectId: 19, name: 'Number of predicted maintenance issues', type: 'gauge', sourceId: 36, sourceType: 'MODEL', modelSlug: "failure-prediction", trendData: { trend: null, deviation: 0.25, }, data: integerData.map((data, index) => ({ value: data.value, timestamp: data.timestamp })) }, { projectId: 19, name: 'Reduction in ATM downtime (hours)', type: 'gauge', sourceId: 36, sourceType: 'MODEL', modelSlug: "failure-prediction", trendData: { trend: "DECREASE_POSITIVE", deviation: -0.25, }, data: floatData.map((data, index) => ({ value: data.value, timestamp: data.timestamp })) }, { projectId: 20, name: 'Reduction in average delivery time (minutes)', type: 'gauge', sourceId: 39, sourceType: 'MODEL', modelSlug: "dispatch-scheduling", trendData: { trend: "DECREASE_POSITIVE", deviation: -0.15, }, data: floatData.map((data, index) => ({ value: data.value, timestamp: data.timestamp })) }, { projectId: 20, name: 'Number of recommended accepted routes', type: 'gauge', sourceId: 39, sourceType: 'MODEL', modelSlug: "dispatch-scheduling", trendData: { trend: "INCREASE_POSITIVE", deviation: 0.25, }, data: integerData.map((data, index) => ({ value: data.value, timestamp: data.timestamp })) }, { projectId: 21, name: 'Accuracy of demand forecasting (%)', type: 'gauge', sourceId: 41, sourceType: 'MODEL', modelSlug: "resource-allocation", trendData: { trend: "INCREASE_POSITIVE", deviation: 0.15, }, data: percentageData.map((data, index) => ({ value: data.value, timestamp: data.timestamp })) }, { projectId: 21, name: 'Reduction in stockout incidents (%)', type: 'gauge', sourceId: 41, sourceType: 'MODEL', modelSlug: "resource-allocation", trendData: { trend: "DECREASE_POSITIVE", deviation: -0.15, }, data: percentageData.map((data, index) => ({ value: data.value, timestamp: data.timestamp })) } ]
METRICS_INPUT_BY_MODEL
Type : literal type
Default value : METRICS_INPUT.reduce((acc, metric) => { if (!acc[metric.modelSlug]) { acc[metric.modelSlug] = []; } acc[metric.modelSlug].push(metric); return acc; }, {} as { [key: string]: typeof METRICS_INPUT })
percentageData
Default value : generateRandomData(METRICS_DATA_START_DATE, days, 0.25, 0.7, decreasePeriod)

src/common/emailTemplates/footer.ts

EMAIL_FOOTER
Default value : ` <div class="footer"> <div class="subscribe"> <div class="footnote"> This email was sent to <span class="link">{{ sendToEmail }}</span>. If you would rather not receive this type of email, you can <span class="link">manage your preferences</span>. </div> <div class="qb"> <img width="121" height="24" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHkAAAAYCAYAAADeUlK2AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAasSURBVHgB7VrLcRtHEG2weHSVoAi4joBwBFpFQPDoE1cREIyAqwgIRcDlVT4AjgBABAAjwDoCQmWdXGWN+2HfcBvDXQALEiJlsaumFvPpz3z6Mz1oSQU459r66UgDaLVaY2kIyicmnyMtf2kZKp1c/gfANexWdOV+rXQM5n6uJda2X2UHUBrgcSbLLWhV8ZPDGtwrLRPZHmJltvVGcwEG5JGxOdKSat+d0rmQHxx0Dgudy0x/jrTcaknZlWj7tX7fa8m1fJFi7rsCeJw3wlABIgrRBKetZdBg/EhLr6Yv03Il3wGoBfvmMQrXU+tT3wZr5qAhj+MB5RjV9R9UtGGBP0oDwKnVzy3N7yaBsLAYl9UMQXuPpmxvwEU+kecBrFck3wlWzLVOPNHP7Y5+sa9lABPFTa8DLGxeNwYmnwc75kbD39xoe2Z8WKTlgxSLhfpbor+R4oDCHVyy/4JjEi1j1mFFcNhybjbMac5xE+WV0qVckdcFv+i/kcJEXpEP6kPWId9wnbuBpZTikJ/W9F+a+SBWufD7QQXpkO8x1iDcK+7hGauZ9t+EDGpVfhug6Uk3jIH5mm8Y44w5m1qa3rzRrcRWZv3d1zLk7y78O01Zm+XOuwm6hVHAd2BNK3k4b6GIM+VCWh490o9Yj4P5Ls0z6d9ZN2HNNWlMTV/Pywie1o2RrpcjDdZhamU4NB04Qau73hCohecQdo02L2Q7+FIzPg/4tQPab8xvyJH6TgZCbdnM09PP3aq7zLUcwaoEPPq+ruOrTDGs2wfKgD5s9olvM/yAfxHMx9OCdtq+GyPHPVAhTq2GHxrGv2lHI19cA5+kMJV1JgtXpbgO2WzaTLaDhdH0d/LCgQcH64yNrlKqnPPBOhyZdpjphaGThYi0QrEE8Y4PvLApldFuU+A1quXqg7BMS3tNYLX0lVL4zyq410SvFVL4nlSaXfueEyqtGecDc435YD/+DHC6wXhrlYD7ieMGtu+AhOWJkxCp1NzdlA80FCf52vP2wPrSChh5libRDLMTjdFP7fDByDpzHEI4dsXUep+3B4DFyeWhtYqMHAAb/UPrz018ANlT059zbU9Jp7yGMhiI5ImBwUC8pj9h8HDNsT4w6QTjfKA1YEDRYf2av+csAwYqjgHY1IyD5bhkfc6AKWF95MpgrMPAaBDQH1DGuSsDrQ7bLY9rwwNyX5l6yvqAPCOOsXJGZj5Tymnpe36OcsQcM2dbynms4MGswjy833Dt2WWTE3yrfEcwzl8JIilOH07jytXAFYewzZPq6wAvc1TRdw/UdNu+YJAT+d8hL+E1zxUaU2UdVixMFY8KvJBXO6TB9k44H9vH4ZXymXElntvi2rMLuB2uY0a75m4P1uWnBvfEJpvmLJEdgLijxx48mtOOvEIBbod89QZ6TYKfJnTDHHCHvmtuN9T4r1S2BOL0aUnioM9bmG4Fnk+I9Emj50q/7+XYy3o0BgoZywsFLvRdxQakVZvJ8ak0AFcGPmEmbOTWZOmIExu+kZVDnhls7jrVAk0Zy8uESIprBLRpvC2SK/O9mZRJGJ/5ikAruD4ukzmOWTtu3kQeXq2APwwCxJ5tMxsfkfeYeJApY7AWk/ZCynl1Wc+lfNcfS5m3HjYJlO9foYg0edTJ+/x1JIO7JzdNXKRcioeAswbmD/fRBfEGpHHFyBXlXUV+AOORhOixHos5VLQOQ7ZdGryToO4TQ5eGrn/UQLt3PV3eQCIpNrFn6PtHjzPK6dOojW5CB4FQfWm2iCV8/prIv6ppp2+f9CpGSPiNpJjotgHVBAvNTc1ZZtQeaEtdGjeTIvEQicmVc12OuMhot6lbpGthBepiG+AsKM9YSstwzFjDyxhTtphtKcaSd8fkybeGqvdkTLwnzeFMfv8lk/3BmAVadinNwd8nP3r8uiwfNwEL3Avu+d7ELy1foFEzplYRbDX50wMeKeAOsNGJFgeeWpZPluQBN9WT7fP5K/Dg7z/mJSk2zfnKgvzxd7yC9K11stTiPQDdx8z4uUw/iKgjtuHVqVWD3iFOhK9JMGCTxxXjrQXDYTq2nf5VivgT0h9KeYAAp5Rv9uAtt5yT5XOOzXTFE2lq5LP0ob3LnLbsAK0aISIpTSRg6Bdo6XP/OVzV9G+62HvQYiMHTnPGQAi821IGKt0HMpa4GONlzcxBScJMHBc+IW1vEj0f3+59OWjicME8g08nkNEHe7mULsbTy6QwxRFpReyzgdc9fXMw05Z5Nn2FNcBrUiI/EITXslfYAK7mD4QvGdwjs3//ASxX61xCifOZAAAAAElFTkSuQmCC" alt=""> </div> </div> </div> </body> </html>`

src/common/emailTemplates/header.ts

EMAIL_HEADER
Default value : ` <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title> </head> <style> /* @import url('https://fonts.googleapis.com/css2?family=Inter:slnt,wght@-10..0,100..900&display=swap'); */ body { background: #1B1E2A; padding: 32px; } .content { padding: 32px; gap: 24px; opacity: 0px; background: #232632; } .paragraph { font-family: Arial, Helvetica, sans-serif; font-size: 16px; font-weight: 400; line-height: 24px; letter-spacing: -0.002em; text-align: left; color: #FFFFFFE0; } .description { font-size: 14px; font-weight: 400; line-height: 20px; letter-spacing: -0.002em; text-align: left; color: #FFFFFF99; } .button { gap: 0px; background: #FFFFFFE0; box-shadow: 0px 1px 1px 0px #141721E0; box-shadow: 0px 0px 1px 0px #141721E0; padding: 8px 12px 8px 12px; color: #141721; font-weight: 600; font-family: Arial, Helvetica, sans-serif; font-size: 16px; line-height: 20px; text-decoration: none; } .logo { padding: 24px 32px 24px 32px; gap: 24px; } .subscribe { padding: 32px; gap: 32px; border-radius: 0px 0px 4px 4px; } .footnote { font-family: Arial, Helvetica, sans-serif; font-size: 14px; font-weight: 400; line-height: 20px; letter-spacing: -0.002em; text-align: left; color: #ffffff; } .link { color: #780AE9; } .qb { padding: 24px 32px 24px 0px; } td { padding: 8px; gap: 12px; } </style> <body> <div class="logo"> <img width="99" height="28" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGMAAAAcCAYAAAB1TwGBAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAR0SURBVHgB7VlNVttIEP66wQMDWTiLmQk7cYKEG4gTJDkB5gTAzjMbxGbi3SQniOcEmZzAmhPADdy7vJBFnPcCIeThTpXcIu22fh1JgeDvvbKl7upWqeunq1qiu/ZWo0H0zv8QWCARkkihIZAWRlggFZIW6AQNQQvR2LNuIyS0/h+N4epfLJAKubKy0hcQzYSPFsKirFprz6I27gBkMLo/0mJcv8UK0e+NNlSJEcdEQ0OvcAfAGzhWWysB6t3IFVpXR0WZjSfcCW+wESmDvQNyvIuaIIV4WtIrPNxByPii93EjhKhBITTn32e/l82ibrRXmH3ML8pn6FEe/0wB9tf66aOx1hyjPXwfFHtEUUWw4PQ3MLdJYUrZN0KITWssy2u/7AH1/4fk5/j099JqCol31+EZJvVT+x797WOyNsqWwRrLcsd8Se8QEh3RWOWOXXYbePG6q2+2IWVAtzuYB0K/WG19CoLRZtkszZuzr+3053mWl3Kd1ObzDy0yK7CDDBjrzzJkz8zBnvJUOHWXTBrRu9hQdGzRwXjMmudMSyEHk/R4fLT6y/n93tmD/TkUcVPRpoU7RL4iPEw820M+mOfYDV3LWSNYKbEQHL60pBh4henYx+7WugqfxRv0OeYFKy/OuB4SPbH6FCZG8SPAXhYU4Btg1iP7RFxU87vx+7iR5hUpZIs85OYaLgnY0dMY5PAPHP5OBq+fN7dOxpBo3y5GM+RNlIE9gei9wxfE/RILFIEi2iYLfs4bb0xWv2vxfervu5OYPeKF0/w4vsgMUza67Tceviz5sCwiesASTsRYqDnS19uExOzHgpu2ZoXUPtGhPZYzMA5VmcoI2sP2xeW9PQFyz0tO2WY/fdAeQq0a9F1EkepDrrRLFni3AamGlnJaoNL4Wak0xm3m8aPEMMVK+HP99J+Ly7X3lCEFtNhFijAPHCcv5bC7fvoy8qSfB1kbbGUF6owyOGsiJXDatY95MVHKgOdCMyiTjVQqU0r48tL4dXIlHsk/pQzyhh2qvo9RzdmQx3PxnKgfH5z7rAV/iOoROvd+Bq8rm4pT22tlRHWE1n1UDJ6ze++dj3JwLT3Pmt2YvqMTvoEYq+ygergf6Pa0k+iY53PbodMcxhfR2RQdf3h0/FG0epwHiirzraJVuRF66DTzgr821yNOMy1+H9/Ota6fSbSLb5spe2jSeRGfPW07z3d32M2sbMoofujMze/aNzLz9eOE5ytMUuZo7oky1k7p3CW9UKoCQsjnz85+OyjKb4oxP6V75pAuh39qLKaN7ruVYcb4mDWIPOza9YiMvKJmRUTQ4w5naSVGsOJUCX72gjzPU0TbqAGC0/piMsDwHLiFocQSFXINgEyt/fnzr52i/KZa5YXjAiq3oDSWuwWkfmfn9jgkKNQAs7gsQ1bRFzKPHWavx1NNMECBDyXVQL/unT94gpph9hzerKNiCpNQ1OhhnNlHWAbPNCmikyw5loWmchxNQdSRVs4+pUbrLyFDZARlxsiC1XVV8LBAKr4C8uNVr/edEAQAAAAASUVORK5CYII=" alt=""> </div>`

src/models/model.activity.ts

emailProvider
Default value : new EmailProvider()
httpService
Default value : new HttpService()
influxDbProvider
Default value : new InfluxDbProvider()
metricsService
Default value : new MetricsService( prisma, projectService, modelService, temporalProvider, )
mlflowProvider
Default value : new MLflowProvider(httpService, influxDbProvider)
modelService
Default value : new ModelService( prisma, projectService, mlflowProvider, opentelemetryProvider, temporalProvider, notificationService, )
notificationService
Default value : new NotificationService( prisma, temporalProvider, emailProvider, )
opentelemetryProvider
Default value : new OpentelemetryProvider(influxDbProvider)
prisma
Default value : new PrismaService()
projectService
Default value : new ProjectService(prisma)
temporalProvider
Default value : new TemporalProvider()

src/notification/notification.activity.ts

emailProvider
Default value : new EmailProvider()
notificationService
Default value : new NotificationService( prisma, null, emailProvider, )
prisma
Default value : new PrismaService()

src/common/events/index.ts

EventIdentifierConfigs
Type : object
Default value : { ...alertEventsConfig, ...projectEventsConfig, ...projectSettingsEventsConfig, ...requestEventsConfig, ...complianceEventsConfig, ...turoSettingsEventsConfig, ...costEventsConfig, }
EventIdentifiers
Type : object
Default value : { ...AlertEvents, ...ProjectEvents, ...ProjectSettingsEvents, ...RequestEvents, ...ComplianceEvents, ...TuroSettingsEvents, ...CostEvents, }

src/common/prisma/helper.ts

getPrismaFormattedError
Default value : (error) => { switch (error.code) { case "P1000": return new HttpException("Correct Authentication Required", 511, { description: "Authentication failed against database server, the provided database credentials are not valid. Please make sure to provide valid database credentials for the database server.", }); case "P1001": return new HttpException("Database Timeout", 504, { description: "Can't reach database server. Please make sure your database server is running.", }); case "P1002": return new HttpException("Database Timeout", 504, { description: "The database server was reached but timed out. Please try again. Please make sure your database server is running.", }); case "P1003": return new HttpException("Not Found", 404, { description: "Database name, file, or column does not exist.", }); case "P1008": return new HttpException("Operations Timeout", 504, { description: "Operations timed out.", }); case "P1009": return new HttpException("Duplicated Database", 500, { description: "Database already exists on the database server.", }); case "P1010": return new HttpException("Database User Error", 511, { description: "User was denied access on the database.", }); case "P1011": return new HttpException("Security Implementation Error", 500, { description: "Error opening a TLS connection.", }); case "P1012": return new HttpException("Update Error", 500, { description: "Invalid version after update.", }); case "P1013": return new HttpException("Database Error", 500, { description: "The provided database string is invalid.", }); case "P1014": return new HttpException("Not Found", 404, { description: "This model does not exist.", }); case "P1015": return new HttpException("Feature Not Allowed", 405, { description: "Your schema is using features that are not supported for the version of the database.", }); case "P1016": return new HttpException("Expect Correct Parameters", 416, { description: "Your raw query had an incorrect number of parameters.", }); case "P1017": return new HttpException("Server Timeout", 408, { description: "Server has closed the connection.", }); case "P2000": return new HttpException("Value Too Large", 413, { description: "The provided value for the column is too long for the column's type.", }); case "P2001": return new HttpException("Not Found", 404, { description: "The record searched does not exist.", }); case "P2002": return new HttpException("Save failed", 422, { description: `A record with the same ${error.meta.target.join( ", ", )} already exists.`, }); case "P2003": return new HttpException("Bad Foreing Key", 500, { description: "Foreign key constraint failed.", }); case "P2004": return new HttpException("Database Error", 500, { description: "A constraint failed on the database.", }); case "P2005": return new HttpException("Bad Type", 400, { description: "The value stored in the database for the field is invalid for the field's type", }); case "P2006": return new HttpException("Invalid Value", 400, { description: "The provided value for field is not valid", }); case "P2007": return new HttpException("Data Validation Error", 500, { description: "Data validation error", }); case "P2008": return new HttpException("Bad Query", 400, { description: "Failed to parse the query", }); case "P2009": return new HttpException("Bad Query", 500, { description: "Failed to validate the query", }); case "P2010": return new HttpException("Bad Query", 400, { description: "Raw query failed.", }); case "P2011": return new HttpException("Constraint Violation", 400, { description: "Null constraint violation.", }); case "P2012": return new HttpException("Missing Value", 400, { description: "Missing a required value.", }); case "P2013": return new HttpException("Missing Argument", 400, { description: "Missing the required argument.", }); case "P2014": return new HttpException("Bad Change", 400, { description: "The change you are trying to make would violate the required relation.", }); case "P2015": return new HttpException("Record Not Found", 404, { description: "A related record could not be found.", }); case "P2016": return new HttpException("Interpretation Error", 500, { description: "Query interpretation error.", }); case "P2017": return new HttpException("Bad Change", 400, { description: "The records for the relation models are not connected.", }); case "P2018": return new HttpException("Record Not Found", 404, { description: "The required connected records were not found.", }); case "P2019": return new HttpException("Input Error", 400, { description: "Input error.", }); case "P2020": return new HttpException("Value Out Of Range", 413, { description: "Value out of range for the type.", }); case "P2021": return new HttpException("Table Not Found", 404, { description: "The table does not exist in the current database.", }); case "P2022": return new HttpException("Column Not Found", 404, { description: "The column does not exist in the current database.", }); case "P2023": return new HttpException("Inconsistent Data", 400, { description: "Inconsistent column data.", }); case "P2024": return new HttpException("Request Timeout", 408, { description: "Timed out fetching a new connection from the connection pool.", }); case "P2025": return new HttpException("Record Not Found", 404, { description: "An operation failed because it depends on one or more records that were required but not found.", }); case "P2026": return new HttpException("Feature Not Allowed", 405, { description: "The current database provider doesn't support a feature that the query used.", }); case "P2027": return new HttpException("Error", 500, { description: "Multiple errors occurred on the database during query execution.", }); case "P2028": return new HttpException("Transaction Error", 400, { description: "Transaction API error.", }); case "P2030": return new HttpException("Schema Error", 500, { description: "Cannot find a fulltext index to use for the search, try adding a @@fulltext([Fields...]) to your schema.", }); case "P2031": return new HttpException("MongoDB Error", 500, { description: "Prisma needs to perform transactions, which requires your MongoDB server to be run as a replica set. See details: https://pris.ly/d/mongodb-replica-set", }); case "P2033": return new HttpException("Bad Type", 400, { description: "A number used in the query does not fit into a 64 bit signed integer. Consider using BigInt as field type if you're trying to store large integers", }); case "P2034": return new HttpException("Transaction Failed", 500, { description: "Transaction failed due to a write conflict or a deadlock. Please retry your transaction", }); case "P3000": return new HttpException("Error", 500, { description: "Failed to create database", }); case "P3001": return new HttpException("Error", 500, { description: "Migration possible with destructive changes and possible data loss", }); case "P3002": return new HttpException("Error", 500, { description: "The attempted migration was rolled back", }); case "P3003": return new HttpException("Error", 500, { description: "The format of migrations changed, the saved migrations are no longer valid. To solve this problem, please follow the steps at: https://pris.ly/d/migrate", }); case "P3004": return new HttpException("Error", 500, { description: "This database is a system database, it should not be altered with prisma migrate. Please connect to another database.", }); case "P3005": return new HttpException("Error", 500, { description: "The database schema is not empty. Read more about how to baseline an existing production database: https://pris.ly/d/migrate-baseline", }); case "P3006": return new HttpException("Migration Failed", 500, { description: "Migration failed to apply cleanly to the shadow database.", }); case "P3007": return new HttpException("Error", 500, { description: "Some of the requested preview features are not yet allowed in migration engine. Please remove them from your data model before using migrations.", }); case "P3008": return new HttpException("Error", 500, { description: "The migration is already recorded as applied in the database.", }); case "P3009": return new HttpException("Error", 500, { description: "Migrate found failed migrations in the target database, new migrations will not be applied. Read more about how to resolve migration issues in a production database: https://pris.ly/d/migrate-resolve", }); case "P3010": return new HttpException("Migration Failed", 500, { description: "The name of the migration is too long. It must not be longer than 200 characters", }); case "P3011": return new HttpException("Error", 500, { description: 'Migration cannot be rolled back because it was never applied to the database. Hint: did you pass in the whole migration name? (example: "20201207184859_initial_migration")', }); case "P3012": return new HttpException("Error", 500, { description: "Migration cannot be rolled back because it is not in a failed state.", }); case "P3013": return new HttpException("Error", 500, { description: "Datasource provider arrays are no longer supported in migrate. Please change your datasource to use a single provider. Read more at https://pris.ly/multi-provider-deprecation", }); case "P3014": return new HttpException("Error", 500, { description: "Prisma Migrate could not create the shadow database. Please make sure the database user has permission to create databases. More info: https://pris.ly/d/migrate-shadow.", }); case "P3015": return new HttpException("Missing File", 500, { description: "Could not find the migration file. Please delete the directory or restore the migration file.", }); case "P3016": return new HttpException("Error", 500, { description: "The fallback method for database resets failed, meaning Migrate could not clean up the database entirely.", }); case "P3017": return new HttpException("Missing Migration", 500, { description: 'The migration could not be found. Please make sure that the migration exists, and that you included the whole name of the directory. (example: "20201207184859_initial_migration")', }); case "P3018": return new HttpException("Error", 500, { description: "A migration failed to apply. New migrations can not be applied before the error is recovered from. Read more about how to resolve migration issues in a production database: https://pris.ly/d/migrate-resolve", }); case "P3019": return new HttpException("Error", 500, { description: "The datasource provider specified in your schema does not match the one specified in the migration_lock.toml. Please remove your current migration directory and start a new migration history with prisma migrate dev. Read more: https://pris.ly/d/migrate-provider-switch", }); case "P3020": return new HttpException("Error", 500, { description: "The automatic creation of shadow databases is disabled on Azure SQL. Please set up a shadow database using the shadowDatabaseUrl datasource attribute. Read the docs page for more details: https://pris.ly/d/migrate-shadow", }); case "P3021": return new HttpException("Error", 500, { description: "Foreign keys cannot be created on this database. Learn more how to handle this: https://pris.ly/d/migrate-no-foreign-keys", }); case "P3022": return new HttpException("Error", 500, { description: "Direct execution of DDL (Data Definition Language) SQL statements is disabled on this database. Please read more here about how to handle this: https://pris.ly/d/migrate-no-direct-ddl", }); case "P4000": return new HttpException("Error", 500, { description: "Introspection operation failed to produce a schema file", }); case "P4001": return new HttpException("Error", 500, { description: "The introspected database was empty", }); case "P4002": return new HttpException("Error", 500, { description: "The schema of the introspected database was inconsistent", }); default: return new HttpException("Error", 500); } }

src/iam/iam.constants.ts

IAM_CREATE_POLICY_ACTION
Type : string
Default value : "iam:CreatePolicy"
IAM_CREATE_ROLE_ACTION
Type : string
Default value : "iam:CreateRole"
IAM_DELETE_POLICY_ACTION
Type : string
Default value : "iam:DeletePolicy"
IAM_DELETE_ROLE_ACTION
Type : string
Default value : "iam:DeleteRole"
IAM_READ_ROLE_ACTION
Type : string
Default value : "iam:ReadRole"
IAM_RESOURCE_NAME
Type : string
Default value : "turo:iam"
IAM_UPDATE_ROLE_ACTION
Type : string
Default value : "iam:UpdateRole"

src/cost/workflows/kubecost/kubecost.constants.ts

KUBECOST_COST_TYPE_MAP
Type : object
Default value : { cpuCost: COST_CATEGORIES.COMPUTE, gpuCost: COST_CATEGORIES.COMPUTE, ramCost: COST_CATEGORIES.STORAGE, pvCost: COST_CATEGORIES.STORAGE, networkCost: COST_CATEGORIES.NETWORKING, loadBalancerCost: COST_CATEGORIES.COMPUTE, sharedCost: COST_CATEGORIES.COMPUTE, }

src/metrics/metrics.activity.ts

metricsService
Default value : new MetricsService( prisma, projectService, modelService, null, )
modelService
Default value : new ModelService( prisma, projectService, null, null, null, null, )
prisma
Default value : new PrismaService()
projectService
Default value : new ProjectService(prisma)

src/common/prisma/prisma.activities.ts

metricsService
Default value : new MetricsService(prisma, projectService, modelService, null)
modelService
Default value : new ModelService(prisma, projectService, null, null, null, null)
prisma
Default value : new PrismaService()
projectService
Default value : new ProjectService(prisma)

src/providers/anthropic/anthropic.constants.ts

MODEL_COST_PER_1K_COMPLETION_TOKENS
Type : object
Default value : { "claude-instant-v1": 0.0024, "claude-v2": 0.024, "claude-v2:1": 0.024, "claude-3-sonnet-20240229-v1:0": 0.015, "claude-3-5-sonnet-20240620-v1:0": 0.015, "claude-3-5-sonnet-20241022-v2:0": 0.015, "claude-3-haiku-20240307-v1:0": 0.00125, }
MODEL_COST_PER_1K_PROMPT_TOKENS
Type : object
Default value : { "claude-instant-v1": 0.0008, "claude-v2": 0.008, "claude-v2:1": 0.008, "claude-3-sonnet-20240229-v1:0": 0.003, "claude-3-5-sonnet-20240620-v1:0": 0.003, "claude-3-5-sonnet-20241022-v2:0": 0.003, "claude-3-haiku-20240307-v1:0": 0.00025, }

src/providers/openai/openai.constants.ts

MODEL_COST_PER_1K_COMPLETION_TOKENS
Type : object
Default value : { // OpenAI o1-preview output "o1-preview": 0.06, "o1-preview-2024-09-12": 0.06, // OpenAI o1-mini output "o1-mini": 0.012, "o1-mini-2024-09-12": 0.012, // GPT-4o-mini output "gpt-4o-mini": 0.0006, "gpt-4o-mini-2024-07-18": 0.0006, // GPT-4o output "gpt-4o": 0.01, "gpt-4o-2024-05-13": 0.015, "gpt-4o-2024-08-06": 0.01, // GPT-4 output "gpt-4": 0.06, "gpt-4-0314": 0.06, "gpt-4-0613": 0.06, "gpt-4-32k": 0.12, "gpt-4-32k-0314": 0.12, "gpt-4-32k-0613": 0.12, "gpt-4-vision-preview": 0.03, "gpt-4-1106-preview": 0.03, "gpt-4-0125-preview": 0.03, "gpt-4-turbo-preview": 0.03, "gpt-4-turbo": 0.03, "gpt-4-turbo-2024-04-09": 0.03, // # GPT-3.5 output // # gpt-3.5-turbo points at gpt-3.5-turbo-0613 until Feb 16, 2024. // # Switches to gpt-3.5-turbo-0125 after. "gpt-3.5-turbo": 0.002, "gpt-3.5-turbo-0125": 0.0015, "gpt-3.5-turbo-0301": 0.002, "gpt-3.5-turbo-0613": 0.002, "gpt-3.5-turbo-1106": 0.002, "gpt-3.5-turbo-instruct": 0.002, "gpt-3.5-turbo-16k": 0.004, "gpt-3.5-turbo-16k-0613": 0.004, // # Azure GPT-35 output "gpt-35-turbo": 0.002, // Azure OpenAI version of ChatGPT "gpt-35-turbo-0125": 0.0015, "gpt-35-turbo-0301": 0.002, // Azure OpenAI version of ChatGPT "gpt-35-turbo-0613": 0.002, "gpt-35-turbo-instruct": 0.002, "gpt-35-turbo-16k": 0.004, "gpt-35-turbo-16k-0613": 0.004, // # Others "text-ada-001": 0.0004, ada: 0.0004, "text-babbage-001": 0.0005, babbage: 0.0005, "text-curie-001": 0.002, curie: 0.002, "text-davinci-003": 0.02, "text-davinci-002": 0.02, "code-davinci-002": 0.02, // # Fine Tuned output "babbage-002-finetuned": 0.0016, "davinci-002-finetuned": 0.012, "gpt-3.5-turbo-0613-finetuned": 0.006, "gpt-3.5-turbo-1106-finetuned": 0.006, "gpt-3.5-turbo-0125-finetuned": 0.006, "gpt-4o-mini-2024-07-18-finetuned": 0.0012, // # Azure Fine Tuned output "babbage-002-azure-finetuned": 0.0004, "davinci-002-azure-finetuned": 0.002, "gpt-35-turbo-0613-azure-finetuned": 0.002, // # Legacy fine-tuned models "ada-finetuned-legacy": 0.0016, "babbage-finetuned-legacy": 0.0024, "curie-finetuned-legacy": 0.012, "davinci-finetuned-legacy": 0.12, }
MODEL_COST_PER_1K_PROMPT_TOKENS
Type : object
Default value : { // OpenAI o1-preview input "o1-preview": 0.015, "o1-preview-2024-09-12": 0.015, // OpenAI o1-mini input "o1-mini": 0.003, "o1-mini-2024-09-12": 0.003, // GPT-4o-mini input "gpt-4o-mini": 0.00015, "gpt-4o-mini-2024-07-18": 0.00015, // GPT-4o input "gpt-4o": 0.0025, "gpt-4o-2024-05-13": 0.005, "gpt-4o-2024-08-06": 0.0025, // GPT-4 input "gpt-4": 0.03, "gpt-4-0314": 0.03, "gpt-4-0613": 0.03, "gpt-4-32k": 0.06, "gpt-4-32k-0314": 0.06, "gpt-4-32k-0613": 0.06, "gpt-4-vision-preview": 0.01, "gpt-4-1106-preview": 0.01, "gpt-4-0125-preview": 0.01, "gpt-4-turbo-preview": 0.01, "gpt-4-turbo": 0.01, "gpt-4-turbo-2024-04-09": 0.01, // GPT-3.5 input // gpt-3.5-turbo points at gpt-3.5-turbo-0613 until Feb 16, 2024. // Switches to gpt-3.5-turbo-0125 after. "gpt-3.5-turbo": 0.0015, "gpt-3.5-turbo-0125": 0.0005, "gpt-3.5-turbo-0301": 0.0015, "gpt-3.5-turbo-0613": 0.0015, "gpt-3.5-turbo-1106": 0.001, "gpt-3.5-turbo-instruct": 0.0015, "gpt-3.5-turbo-16k": 0.003, "gpt-3.5-turbo-16k-0613": 0.003, // # Azure GPT-35 input "gpt-35-turbo": 0.0015, // Azure OpenAI version of ChatGPT "gpt-35-turbo-0125": 0.0005, "gpt-35-turbo-0301": 0.002, // Azure OpenAI version of ChatGPT "gpt-35-turbo-0613": 0.0015, "gpt-35-turbo-instruct": 0.0015, "gpt-35-turbo-16k": 0.003, "gpt-35-turbo-16k-0613": 0.003, // # Others "text-ada-001": 0.0004, ada: 0.0004, "text-babbage-001": 0.0005, babbage: 0.0005, "text-curie-001": 0.002, curie: 0.002, "text-davinci-003": 0.02, "text-davinci-002": 0.02, "code-davinci-002": 0.02, // # Fine Tuned input "babbage-002-finetuned": 0.0016, "davinci-002-finetuned": 0.012, "gpt-3.5-turbo-0613-finetuned": 0.003, "gpt-3.5-turbo-1106-finetuned": 0.003, "gpt-3.5-turbo-0125-finetuned": 0.003, "gpt-4o-mini-2024-07-18-finetuned": 0.0003, // # Azure Fine Tuned input "babbage-002-azure-finetuned": 0.0004, "davinci-002-azure-finetuned": 0.002, "gpt-35-turbo-0613-azure-finetuned": 0.0015, // # Legacy fine-tuned models "ada-finetuned-legacy": 0.0016, "babbage-finetuned-legacy": 0.0024, "curie-finetuned-legacy": 0.012, "davinci-finetuned-legacy": 0.12, }

src/models/model.constants.ts

MODEL_CREATE_ACTION
Type : string
Default value : "model:CreateModel"
MODEL_DELETE_ACTION
Type : string
Default value : "model:DeleteModel"
MODEL_PUSH_METRICS_ACTION
Type : string
Default value : "model:PushMetrics"
MODEL_READ_ACTION
Type : string
Default value : "model:ReadModel"
MODEL_RESOURCE_NAME
Type : string
Default value : "turo:model"
MODEL_UPDATE_ACTION
Type : string
Default value : "model:UpdateModel"

src/models/model.events.ts

modelEventsConfig
Type : object
Default value : { [ModelEvents.MODEL_CONNECTION_REQUEST]: { entityTable: "models", severity: NotificationSeverity.INFO, channelConfig: { [NotificationChannel.APP]: CONNECT_MODEL_APP_TEMPLATE, [NotificationChannel.EMAIL]: CONNECT_MODEL_EMAIL_TEMPLATE, }, }, }

src/cost/workflows/turo/turo.activity.ts

prisma
Default value : new PrismaService()

src/project/project.constants.ts

PROJECT_CREATE_ACTION
Type : string
Default value : "project:CreateProject"
PROJECT_CREATE_KEY_ACTION
Type : string
Default value : "project:CreateKey"
PROJECT_DELETE_ACTION
Type : string
Default value : "project:DeleteProject"
PROJECT_READ_ACTION
Type : string
Default value : "project:ReadProject"
PROJECT_RESOURCE_NAME
Type : string
Default value : "turo:project"
PROJECT_UPDATE_ACTION
Type : string
Default value : "project:UpdateProject"

src/project/project.events.ts

projectEventsConfig
Type : object
Default value : { [ProjectEvents.PROJECT_BUDGET_BREACH_MAX]: { entityTable: "project", }, [ProjectEvents.PROJECT_BUDGET_BREACH_MIN]: { entityTable: "project", }, [ProjectEvents.PROJECT_BUDGET_PCC_BREACH_HIGH]: { entityTable: "project", }, [ProjectEvents.PROJECT_BUDGET_PCC_BREACH_LOW]: { entityTable: "project", }, }

src/project/settings/settings.events.ts

projectSettingsEventsConfig
Type : object
Default value : { [ProjectSettingsEvents.ASSIGN_USER_PROJECT_ROLE]: { entityTable: "userProjectRole", severity: NotificationSeverity.INFO, channelConfig: { [NotificationChannel.APP]: ASSIGN_USER_PROJECT_ROLE_APP_TEMPLATE, [NotificationChannel.EMAIL]: ASSIGN_USER_PROJECT_ROLE_EMAIL_TEMPLATE, }, }, [ProjectSettingsEvents.UPDATE_USER_PROJECT_ROLE]: { entityTable: "userProjectRole", severity: NotificationSeverity.INFO, channelConfig: { [NotificationChannel.APP]: UPDATE_USER_PROJECT_ROLE_APP_TEMPLATE, [NotificationChannel.EMAIL]: UPDATE_USER_PROJECT_ROLE_EMAIL_TEMPLATE, }, }, [ProjectSettingsEvents.REQUEST_USER_PROJECT_ACCESS]: { entityTable: "userProjectRole", severity: NotificationSeverity.INFO, channelConfig: { [NotificationChannel.APP]: REQUEST_USER_PROJECT_ACCESS_APP_TEMPLATE, [NotificationChannel.EMAIL]: REQUEST_USER_PROJECT_ACCESS_EMAIL_TEMPLATE, }, }, [ProjectSettingsEvents.APPROVED_USER_PROJECT_ACCESS]: { entityTable: "userProjectRole", severity: NotificationSeverity.INFO, channelConfig: { [NotificationChannel.APP]: APPROVED_USER_PROJECT_ACCESS_APP_TEMPLATE, [NotificationChannel.EMAIL]: APPROVED_USER_PROJECT_ACCESS_EMAIL_TEMPLATE, }, }, [ProjectSettingsEvents.DECLINED_USER_PROJECT_ACCESS]: { entityTable: "userProjectRole", severity: NotificationSeverity.INFO, channelConfig: { [NotificationChannel.APP]: DECLINED_USER_PROJECT_ACCESS_APP_TEMPLATE, [NotificationChannel.EMAIL]: DECLINED_USER_PROJECT_ACCESS_EMAIL_TEMPLATE, }, }, }

src/request/request.events.ts

requestEventsConfig
Type : object
Default value : { [RequestEvents.COMMENT]: { entityTable: "request", severity: NotificationSeverity.INFO, channelConfig: { [NotificationChannel.APP]: COMMENT_APP_TEMPLATE, [NotificationChannel.EMAIL]: COMMENT_EMAIL_TEMPLATE, }, }, }

src/request/templates/request-type.templates.ts

requestTypeTemplates
Type : object
Default value : { [RequestType.PROJECT]: { requestText: "project", }, [RequestType.PROJECT_ACCESS]: { requestText: "project access", }, [RequestType.INFRA]: { requestText: "infrastructure", }, [RequestType.USER]: { requestText: "user", }, [RequestType.MODEL]: { requestText: "model", }, [RequestType.COMPLIANCE_RISK]: { requestText: "compliance risk", }, }

src/iam/role/role.templates.ts

roleTemplates
Type : object
Default value : { [Roles.PROJECT_ADMIN]: { verbText: "administer", roleText: "Administrator", article: "an", }, [Roles.PROJECT_READONLY]: { verbText: "view", roleText: "Viewer", article: "a", }, [Roles.PROJECT_USER]: { verbText: "edit", roleText: "Editor", article: "an", }, }

src/common/temporal/schedule.ts

schedules
Type : []
Default value : [ { workflowType: "normalizeCostRawDataForKubecost", taskQueue: process.env.QUEUE_NAME || "turo", scheduleId: "normalizeCostRawDataForKubecost", spec: { intervals: [{ every: "20m" }], }, }, { workflowType: "syncKubecostCostsHourlyWorkflow", taskQueue: process.env.QUEUE_NAME || "turo", scheduleId: "syncKubecostCostsHourlyWorkflow", spec: { intervals: [{ every: "1h" }], }, }, { workflowType: "normalizeCostRawDataForAWS", taskQueue: process.env.QUEUE_NAME || "turo", scheduleId: "normalizeCostRawDataForAWS", spec: { calendars: [ { comment: "runs everyday once after daily sync", hour: 1, minute: 0, second: 0, }, ], }, }, { workflowType: "syncAWSCostsDailyWorkflow", taskQueue: process.env.QUEUE_NAME || "turo", scheduleId: "syncAWSCostsDailyWorkflow", spec: { calendars: [ { comment: "runs everyday once", hour: 0, minute: 1, second: 0, }, ], }, }, { workflowType: "normalizeCostRawDataForAzure", taskQueue: process.env.QUEUE_NAME || "turo", scheduleId: "normalizeCostRawDataForAzure", spec: { calendars: [ { comment: "runs everyday once after daily sync", hour: 1, minute: 0, second: 0, }, ], }, }, { workflowType: "syncAzureCostsDailyWorkflow", taskQueue: process.env.QUEUE_NAME || "turo", scheduleId: "syncAzureCostsDailyWorkflow", spec: { calendars: [ { comment: "runs everyday once", hour: 0, minute: 1, second: 0, }, ], }, }, { workflowType: "SyncMetrics", taskQueue: process.env.QUEUE_NAME || "turo", scheduleId: "syncMetricsWorkflow", spec: { intervals: [{ every: "1h" }], }, }, { workflowType: "SyncPushedCost", taskQueue: process.env.QUEUE_NAME || "turo", scheduleId: "syncPushedCostsWorkflow", spec: { intervals: [{ every: "1h" }], }, }, { workflowType: "alertMonitorWorkflow", taskQueue: process.env.QUEUE_NAME || "turo", scheduleId: "alertMonitorWorkflow", spec: { intervals: [{ every: "1m" }], }, }, { workflowType: "refreshAggregateCostDailyWorkflow", taskQueue: process.env.QUEUE_NAME || "turo", scheduleId: "refreshAggregateCostDailyWorkflow", spec: { calendars: [ { comment: "runs everyday once after aws sync", hour: 2, minute: 0, second: 0, }, ], }, }, { workflowType: "seedMetricsTrendWorkflow", taskQueue: process.env.QUEUE_NAME || "turo", scheduleId: "seedMetricsTrendWorkflow", spec: { intervals: [{ every: "1Day" }], }, }, { workflowType: "MetricTrendWorfklow", taskQueue: process.env.QUEUE_NAME || "turo", scheduleId: "MetricTrendWorfklow", spec: { calendars: [ { comment: "runs everyday once at 1AM", hour: 1, minute: 0, second: 0, }, ], }, }, { workflowType: "FetchMlflowMetrics", taskQueue: process.env.QUEUE_NAME || "turo", scheduleId: "FetchMlflowMetrics", spec: { intervals: [{ every: "1Day" }], }, }, ]
temporalProvider
Default value : new TemporalProvider()

src/settings/settings.constants.ts

SETTINGS_DELETE_ACTION
Type : string
Default value : "settings:DeleteSettings"
SETTINGS_READ_ACTION
Type : string
Default value : "settings:ReadSettings"
SETTINGS_RESOURCE_NAME
Type : string
Default value : "turo:settings"
SETTINGS_UPDATE_ACTION
Type : string
Default value : "settings:UpdateSettings"

src/common/temporal/temporal.activity.ts

temporalProvider
Default value : new TemporalProvider()

src/settings/settings.events.ts

turoSettingsEventsConfig
Type : object
Default value : { [TuroSettingsEvents.ASSIGN_USER_TURO_ROLE]: { entityTable: "userTuroRole", severity: NotificationSeverity.INFO, channelConfig: { [NotificationChannel.APP]: ASSIGN_USER_TURO_ROLE_APP_TEMPLATE, [NotificationChannel.EMAIL]: ASSIGN_USER_TURO_ROLE_EMAIL_TEMPLATE, }, }, [TuroSettingsEvents.DELETE_USER_TURO_ROLE]: { entityTable: "userTuroRole", severity: NotificationSeverity.INFO, channelConfig: { [NotificationChannel.APP]: DELETE_USER_TURO_ROLE_APP_TEMPLATE, [NotificationChannel.EMAIL]: DELETE_USER_TURO_ROLE_EMAIL_TEMPLATE, }, }, }

src/alert/alert.controller.ts

validationPipe
Default value : new ValidationPipe({ whitelist: true, forbidNonWhitelisted: true, })

src/metrics/metrics.controller.ts

validationPipe
Default value : new ValidationPipe({ whitelist: true, forbidNonWhitelisted: true, })

src/models/model.controller.ts

validationPipe
Default value : new ValidationPipe({ whitelist: true, forbidNonWhitelisted: true, })

src/notification/notification.controller.ts

validationPipe
Default value : new ValidationPipe({ whitelist: true, forbidNonWhitelisted: true, })

results matching ""

    No results matching ""