---
url: /docs/api/core/variables/dayEnergyBalanceSchema.md
---
[**@kaiord/core**](../README.md)

***

[@kaiord/core](../README.md) / dayEnergyBalanceSchema

# Variable: dayEnergyBalanceSchema

> `const` **dayEnergyBalanceSchema**: `ZodObject`<{ `activity_kcal`: `ZodNumber`; `basal_kcal`: `ZodNumber`; `date`: `ZodISODate`; `expenditure_kcal`: `ZodNumber`; `intake_kcal`: `ZodNullable`<`ZodNumber`>; `macro_actuals`: `ZodOptional`<`ZodObject`<{ `carb_g`: `ZodNumber`; `fat_g`: `ZodNumber`; `kcal`: `ZodNumber`; `protein_g`: `ZodNumber`; }, `$strip`>>; `macro_targets`: `ZodOptional`<`ZodObject`<{ `carb_g`: `ZodNumber`; `fat_g`: `ZodNumber`; `kcal`: `ZodNumber`; `protein_g`: `ZodNumber`; }, `$strip`>>; `net_kcal`: `ZodNullable`<`ZodNumber`>; `source`: `ZodEnum`<{ `measured`: `"measured"`; `mixed`: `"mixed"`; `predicted`: `"predicted"`; }>; `target_kcal`: `ZodNullable`<`ZodNumber`>; }, `$strip`>

Defined in: [packages/core/src/domain/schemas/health/energy-balance.ts:28](https://github.com/pablo-albaladejo/kaiord/blob/3eacbe62ef72342d970523967cc5155b5935bb85/packages/core/src/domain/schemas/health/energy-balance.ts#L28)

Computed per-day energy-balance view-model — not a persisted payload but the
shape the SPA/chatbot read.

`intake_kcal` is nullable: `null` means the day is untracked (never a silent
zero). `net_kcal` is correspondingly nullable — without a tracked intake
there is no net (never a misleading zero or full-surplus). `target_kcal` is
nullable when no goal is active. Macro targets and actuals are optional
because they only exist once a goal / intake is present.
