docs(api): regenerate the contract for the backup's medication composition

This commit is contained in:
Marc-André Bombeck committed 2026-10-15 23:54:09 +02:00
1 parent fe687b0870
commit 8ac19e422a
2 files changed
+48 -1

No files matched your search

+45
View File
@@ -38740,6 +38740,50 @@ components:
- pausedAt
- resumedAt
additionalProperties: {}
ingredients:
default: []
type: array
items:
type: object
properties:
id:
type: string
minLength: 1
nutrient:
type: string
minLength: 1
maxLength: 40
amountPerUnit:
type: number
exclusiveMinimum: 0
unit:
type: string
minLength: 1
maxLength: 8
enteredAmount:
anyOf:
- type: number
- type: "null"
enteredUnit:
anyOf:
- type: string
maxLength: 8
- type: "null"
source:
default: MANUAL
type: string
enum:
- MANUAL
- LABEL_AI
createdAt:
type: string
minLength: 1
required:
- nutrient
- amountPerUnit
- unit
- source
additionalProperties: {}
doseChanges:
default: []
type: array
@@ -39092,6 +39136,7 @@ components:
- schedules
- sideEffects
- pauseEras
- ingredients
- doseChanges
- inventoryItems
- inventoryEvents
+3 -1
View File
@@ -309,6 +309,8 @@ describe("the batch contract stays the syncable codes (v1.43)", () => {
});
expect(nutrientBatchSchema.safeParse(entry("dha")).success).toBe(false);
expect(nutrientBatchSchema.safeParse(entry("epa")).success).toBe(false);
expect(nutrientBatchSchema.safeParse(entry("magnesium")).success).toBe(true);
expect(nutrientBatchSchema.safeParse(entry("magnesium")).success).toBe(
true,
);
});
});