diff --git a/.changeset/curly-crews-flash.md b/.changeset/curly-crews-flash.md new file mode 100644 index 0000000..0ad9e05 --- /dev/null +++ b/.changeset/curly-crews-flash.md @@ -0,0 +1,5 @@ +--- +'@elek-io/shared': patch +--- + +Exporting some type definitions for specific Value definitions diff --git a/src/valueSchema.ts b/src/valueSchema.ts index 19d2b86..201b502 100644 --- a/src/valueSchema.ts +++ b/src/valueSchema.ts @@ -66,11 +66,15 @@ export const textValueDefinitionSchema = StringValueDefinitionBaseSchema.extend( inputType: z.literal(ValueInputTypeSchema.Enum.text), } ); +export type TextValueDefinition = z.infer; export const textareaValueDefinitionSchema = StringValueDefinitionBaseSchema.extend({ inputType: z.literal(ValueInputTypeSchema.Enum.textarea), }); +export type TextareaValueDefinition = z.infer< + typeof textareaValueDefinitionSchema +>; export const emailValueDefinitionSchema = StringValueDefinitionBaseSchema.extend({ @@ -150,6 +154,7 @@ export const numberValueDefinitionSchema = NumberValueDefinitionBaseSchema.extend({ inputType: z.literal(ValueInputTypeSchema.Enum.number), }); +export type NumberValueDefinition = z.infer; export const rangeValueDefinitionSchema = NumberValueDefinitionBaseSchema.extend({ @@ -158,6 +163,7 @@ export const rangeValueDefinitionSchema = min: z.number(), max: z.number(), }); +export type RangeValueDefinition = z.infer; /** * Boolean based Values @@ -173,6 +179,7 @@ export const toggleValueDefinitionSchema = BooleanValueDefinitionBaseSchema.extend({ inputType: z.literal(ValueInputTypeSchema.Enum.toggle), }); +export type ToggleValueDefinition = z.infer; /** * Reference based Values