mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-11 22:02:16 +00:00
docs(api): regenerate the contract for the backup's medication composition
This commit is contained in:
1 parent
fe687b0870
commit
8ac19e422a
2 files changed
+48
-1
No files matched your search
@@ -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
|
||||
|
||||
@@ -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,
|
||||
);
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user