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

MemoryAnalysisSchemas.ts



FieldValue
TypeTypeScript
SourceProduct/Projects/Onboarding_Quiz/Schemas/MemoryAnalysisSchemas.ts
ParentProduct
GitHubProduct/Projects/Onboarding_Quiz/Schemas/MemoryAnalysisSchemas.ts

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



import { FactoidCategorySchema } from '@dakoda/database/zod/enums/FactoidCategory.schema';
import { LifeDomainIdSchema } from '@dakoda/database/zod/enums/LifeDomainId.schema';
import { z } from 'zod';

export const ProfileFieldFromAnalysisSchema = z.object({
  ownerId: z.string(),
  convoId: z.string(),
  messageId: z.string().nullable(),
  text: z.string(),
  profileField: z
    .string()
    .describe('The name of the User Profile field where this fact should be stored'),
  currentValue: z
    .string()
    .nullable()
    .describe('The current value of the given profile field, if it exists, otherwise use null'),
  newValue: z
    .string()
    .describe(
      'The new value that should be stored in the given profile field, formatted to conform to the field type',
    ),
});

export const FactoidFromAnalysisSchema = z.object({
  ownerId: z.string(),
  convoId: z.string(),
  messageId: z.string().nullable(),
  category: FactoidCategorySchema,
  domain: LifeDomainIdSchema,
  text: z.string(),
  date: z.string().date(),
});