Skip to content

Commit b2b056d

Browse files
committed
feat: add recordArray as a possible measure value in zod schema
1 parent 99bb79b commit b2b056d

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

packages/runtime-core/src/types/instrument.base.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import type { RecordArrayFieldValue } from '@douglasneuroinformatics/libui-form-types';
12
import type { LicenseIdentifier } from '@opendatacapture/licenses';
23
import type { ConditionalKeys, Merge, SetRequired } from 'type-fest';
34
import type { z as z3 } from 'zod/v3';
@@ -104,7 +105,7 @@ type UnilingualClientInstrumentDetails = ClientInstrumentDetails<Language>;
104105
type MultilingualClientInstrumentDetails = ClientInstrumentDetails<Language[]>;
105106

106107
/** @public */
107-
type InstrumentMeasureValue = boolean | Date | number | string | undefined;
108+
type InstrumentMeasureValue = boolean | Date | number | RecordArrayFieldValue[] | string | undefined;
108109

109110
/** @public */
110111
type InstrumentMeasureVisibility = 'hidden' | 'visible';

packages/schemas/src/instrument/instrument.base.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ const $InstrumentMeasureValue: z.ZodType<InstrumentMeasureValue> = z.union([
9797
z.boolean(),
9898
z.number(),
9999
z.date(),
100+
z.array(z.any()),
100101
z.undefined()
101102
]);
102103

0 commit comments

Comments
 (0)