Skip to content
Visibility internal Owner _ Approver _ Created _ Updated _

AnalyzeConvoSchema.ts



FieldValue
TypeTypeScript
SourceProduct/Projects/Analyze_Convo/Schemas/AnalyzeConvoSchema.ts
ParentProduct
GitHubProduct/Projects/Analyze_Convo/Schemas/AnalyzeConvoSchema.ts

This page is auto-generated. Edit the source to change the content.



import { z } from 'zod';
import { LifeDomainIdSchema } from '@dakoda/database/zod/enums/LifeDomainId.schema';
import {
  ProfileFieldFromAnalysisSchema,
  FactoidFromAnalysisSchema,
} from '@dakoda/memory/shared/MemoryAnalysisSchemas';

export const AnalyzeConvoSchema = z.object({
  structuredSummary: z.object({
    oneLiner: z.string(),
    whatWeCovered: z.array(z.string()),
    decisionsAndCommitments: z.array(z.string()).nullable(),
    openQuestions: z.array(z.string()).nullable(),
    risksOrConcerns: z.array(z.string()).nullable(),
    followUpRecommended: z.array(z.string()).nullable(),
    nextSteps: z.array(z.string()).nullable(),
    userMoodAndEnergy: z.object({
      mood: z
        .number()
        .min(0)
        .max(10)
        .nullable()
        .describe('Integer between 0 (worst possible) and 10 (best possible) mood of the user'),
      energy: z
        .number()
        .min(0)
        .max(10)
        .nullable()
        .describe(
          'Integer between 0 (worst possible) and 10 (best possible) energy level of the user',
        ),
      stress: z
        .number()
        .min(0)
        .max(10)
        .nullable()
        .describe(
          'Integer between 0 (worst possible) and 10 (best possible) stress level of the user',
        ),
      confidence: z
        .number()
        .min(0)
        .max(10)
        .nullable()
        .describe(
          'Integer between 0 (worst possible) and 10 (best possible) confidence level of the user',
        ),
      feelings: z
        .array(z.string())
        .nullable()
        .describe('An array of strings representing the feelings of the user'),
    }),
    planning: z
      .object({
        primaryGoal: z.string().nullable(),
        secondaryGoals: z.array(z.string()).nullable(),
        obstacles: z.array(z.string()).nullable(),
        strategiesDiscussed: z.array(z.string()).nullable(),
        habitsMentioned: z
          .array(
            z.object({
              id: z.string(),
              name: z.string(),
              statusOrChange: z.string(),
              scheduleOrFrequency: z.string(),
              notes: z.string(),
            }),
          )
          .nullable(),
        metricsMentioned: z
          .array(
            z.object({
              id: z.string(),
              name: z.string(),
              currentValue: z.string(),
              targetOrDirection: z.string(),
              notes: z.string(),
            }),
          )
          .nullable(),
        resourcesMentioned: z
          .array(
            z.object({
              id: z.string(),
              title: z.string(),
              type: z.string(),
              authorOrSource: z.string(),
              notes: z.string(),
            }),
          )
          .nullable(),
      })
      .nullable(),
    uviloTags: z
      .object({
        lifeDomains: z.array(LifeDomainIdSchema).nullable(),
        issues: z.array(z.string()).nullable(),
        aspirations: z.array(z.string()).nullable(),
        practices: z.array(z.string()).nullable(),
      })
      .nullable(),
  }),
  profileFields: z.array(ProfileFieldFromAnalysisSchema),
  factoids: z.array(FactoidFromAnalysisSchema),
});

export type AnalyzeConvoType = z.infer<typeof AnalyzeConvoSchema>;