@adrekic/zod-fieldsjson 0.0.1-schemas.2 → 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +1 -1
- package/dist/index.js +349 -70
- package/package.json +5 -4
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,ee=Object.getOwnPropertyNames,r=Object.getPrototypeOf,te=Object.prototype.hasOwnProperty,ne=(e,r,ne,i)=>{if(r&&typeof r==`object`||typeof r==`function`)for(var a=ee(r),o=0,s=a.length,c;o<s;o++)c=a[o],!te.call(e,c)&&c!==ne&&t(e,c,{get:(e=>r[e]).bind(null,c),enumerable:!(i=n(r,c))||i.enumerable});return e},i=(n,ee,i)=>(i=n==null?{}:e(r(n)),ne(ee||!n||!n.__esModule||!te.call(n,`default`)?t(i,`default`,{value:n,enumerable:!0}):i,n));let a=require("zod/v4");a=i(a,1);var o=(e,t,n)=>a.object({id:a.string(),type:e,fieldId:a.string(),conditionValue:t,conditionModifier:n}),s=a.literal(`boolean`),c=a.literal([`equals`,`notEquals`]),re=o(s,a.boolean(),c),l=a.literal(`checkbox-list`),ie=a.literal([`equals`,`notEquals`,`every`,`some`,`none`]),ae=o(l,a.array(a.string()),ie),oe=a.object({value:a.string(),label:a.string()}),u=a.object({from:a.number().nullable(),to:a.number().nullable()}),se=a.literal([`+`,`-`]),d=a.templateLiteral([a.string(),`:`,a.string()]),ce=a.templateLiteral([se,d]),f=a.templateLiteral([`T`,d,`:00`,ce]),le=a.object({from:f.nullable(),to:f.nullable()}),ue=a.object({from:a.string().nullable(),to:a.string().nullable()}),p=a.literal(`date`),de=a.literal([`equals`,`notEquals`,`before`,`after`,`in`,`notIn`]),fe=o(p,a.union([a.string(),ue]),de),m=a.literal(`multi-select`),pe=a.literal([`equals`,`notEquals`,`every`,`some`,`none`]),me=o(m,a.array(a.string()),pe),h=a.literal(`multi-string`),he=a.literal([`equals`,`notEquals`,`every`,`some`,`none`]),ge=o(h,a.array(a.string()),he),g=a.literal(`number`),_e=a.literal([`equals`,`notEquals`,`lessThan`,`lessThanOrEquals`,`greaterThan`,`greaterThanOrEquals`,`inRange`,`notInRange`]),ve=o(g,a.union([a.number(),u]),_e),_=a.literal(`otp`),ye=a.literal([`equals`,`notEquals`,`includes`,`excludes`]),be=o(_,a.string(),ye),v=e=>a.object({identifier:a.string(),type:e}),y=e=>a.object({...v(e).shape,label:a.string(),description:a.string().nullable().optional(),required:a.boolean()}),b=e=>a.object({...y(e).shape,options:a.array(oe)}),x=e=>a.object({...y(e).shape,minimum_length:a.number().optional(),maximum_length:a.number().optional(),placeholder:a.string().optional()}),S=a.literal([`pass`,`fail`,`na`]),C=a.literal(`pass-fail`),xe=a.object({...y(C).shape,showNotesAndFilesOn:a.array(S)}),Se=a.object({status:S.nullable(),notes:a.string(),files:a.tuple([])}),w=a.literal(`pass-fail`),Ce=a.literal([`equals`,`notEquals`,`includes`,`excludes`]),we=o(w,a.union([S,a.array(S)]),Ce),T=a.literal(`radio`),Te=a.literal([`equals`,`notEquals`,`includes`,`excludes`]),Ee=o(T,a.union([a.string(),a.array(a.string())]),Te),E=a.literal(`rating`),De=a.literal([`equals`,`notEquals`,`lessThan`,`lessThanOrEquals`,`greaterThan`,`greaterThanOrEquals`,`inRange`,`notInRange`]),Oe=o(E,a.union([a.number(),u]),De),D=a.literal(`qr`),ke=a.literal([`equals`,`notEquals`,`includes`,`excludes`]),Ae=o(D,a.string(),ke),O=a.literal(`select`),je=a.literal([`equals`,`notEquals`,`includes`,`excludes`]),Me=o(O,a.union([a.string(),a.array(a.string())]),je),k=a.literal(`string`),Ne=a.literal([`equals`,`notEquals`,`includes`,`excludes`]),Pe=o(k,a.string(),Ne),A=a.literal(`text`),Fe=a.literal([`equals`,`notEquals`,`includes`,`excludes`]),Ie=o(A,a.string(),Fe),j=a.literal(`time`),Le=a.literal([`equals`,`notEquals`,`before`,`after`,`in`,`notIn`]),Re=o(j,a.union([f,le]),Le),M=a.literal(`upload`),ze=a.literal([`equals`,`notEquals`]),Be=o(M,a.boolean(),ze),N=a.literal(`url`),Ve=a.literal([`equals`,`notEquals`,`includes`,`excludes`]),He=o(N,a.string(),Ve),Ue=a.union([s,l,p,m,h,g,_,w,T,E,D,O,k,A,j,M,N]),We=a.discriminatedUnion(`type`,[re,ae,fe,me,ge,ve,be,we,Ee,Oe,Ae,Me,Pe,Ie,Re,Be,He]),P=a.literal(`boolean`),Ge=y(P),Ke=a.boolean(),F=a.literal(`checkbox-list`),qe=b(F),Je=a.array(a.string()),I=a.literal(`date`),Ye=y(I),Xe=a.string().nullable(),L=a.literal(`multi-select`),Ze=a.object({...b(L).shape,placeholder:a.string().optional()}),Qe=a.array(a.string()),R=a.literal(`multi-string`),$e=a.object({...y(R).shape,minimum_length:a.number().optional(),maximum_length:a.number().optional(),placeholder:a.string().optional()}),et=a.array(a.string()),z=a.literal(`number`),tt=a.object({...y(z).shape,minimum:a.number().optional(),maximum:a.number().optional(),integers:a.boolean().optional(),placeholder:a.string().optional()}),nt=a.number().nullable(),B=a.literal([`alpha`,`numeric`,`alphanumeric`,`none`]),V=a.literal(`otp`),rt=a.object({...y(V).shape,length:a.number(),validationType:B}),it=a.string(),H=a.literal(`radio`),at=b(H),ot=a.string().nullable(),U=a.literal(`rating`),st=a.object({...y(U).shape,maxRating:a.number()}),ct=a.number().nullable(),W=a.literal(`qr`),lt=y(W),ut=a.string(),G=a.literal(`select`),dt=a.object({...b(G).shape,placeholder:a.string().optional()}),ft=a.string().nullable(),K=a.literal(`string`),pt=x(K),mt=a.string(),q=a.literal(`text`),ht=x(q),gt=a.string(),J=a.literal(`time`),_t=y(J),vt=f.nullable(),Y=a.literal(`upload`),yt=a.object({...y(Y).shape,extensions:a.array(a.string()).optional(),maximum_size:a.number().optional(),maximum_files:a.number().optional()}),bt=a.tuple([]),X=a.literal(`url`),xt=a.object({...y(X).shape,placeholder:a.string().optional()}),St=a.string().nullable(),Ct=a.union([P,F,I,L,R,z,V,C,H,U,W,G,K,q,J,Y,X]),Z=a.discriminatedUnion(`type`,[Ge,qe,Ye,Ze,$e,tt,rt,xe,at,st,lt,dt,pt,ht,_t,yt,xt]),wt=a.union([Ke,Je,Xe,Qe,et,nt,it,Se,ot,ct,ut,ft,mt,gt,vt,bt,St]),Tt=a.record(a.string(),wt),Q=a.literal(`section`),Et=a.record(a.string(),a.array(We)),$=a.object({...v(Q).shape,label:a.string().nullable(),description:a.string().nullable().optional(),conditions:Et,fields:a.array(Z)}),Dt=a.union([Ct,Q]),Ot=a.discriminatedUnion(`type`,[$,Z]),kt=a.array($);exports.BaseJSONConditionSchema=o,exports.BaseJSONFieldElementSchema=v,exports.BaseJSONFieldSchema=y,exports.BaseJSONOptionsFieldSchema=b,exports.BaseJSONStringFieldSchema=x,exports.JSONBooleanConditionModifierSchema=c,exports.JSONBooleanConditionSchema=re,exports.JSONBooleanConditionTypeSchema=s,exports.JSONBooleanFieldSchema=Ge,exports.JSONBooleanFieldTypeSchema=P,exports.JSONBooleanFieldValueSchema=Ke,exports.JSONCheckboxListConditionModifierSchema=ie,exports.JSONCheckboxListConditionSchema=ae,exports.JSONCheckboxListConditionTypeSchema=l,exports.JSONCheckboxListFieldSchema=qe,exports.JSONCheckboxListFieldTypeSchema=F,exports.JSONCheckboxListFieldValueSchema=Je,exports.JSONConditionSchema=We,exports.JSONConditionTypeSchema=Ue,exports.JSONDateConditionModifierSchema=de,exports.JSONDateConditionSchema=fe,exports.JSONDateConditionTypeSchema=p,exports.JSONDateFieldSchema=Ye,exports.JSONDateFieldTypeSchema=I,exports.JSONDateFieldValueSchema=Xe,exports.JSONDateRangeSchema=ue,exports.JSONFieldElementSchema=Ot,exports.JSONFieldElementTypeSchema=Dt,exports.JSONFieldSchema=Z,exports.JSONFieldSchemaSchema=kt,exports.JSONFieldSectionConditionsSchema=Et,exports.JSONFieldSectionSchema=$,exports.JSONFieldSectionTypeSchema=Q,exports.JSONFieldTypeSchema=Ct,exports.JSONFieldValueSchema=wt,exports.JSONFieldValuesSchema=Tt,exports.JSONMultiSelectConditionModifierSchema=pe,exports.JSONMultiSelectConditionSchema=me,exports.JSONMultiSelectConditionTypeSchema=m,exports.JSONMultiSelectFieldSchema=Ze,exports.JSONMultiSelectFieldTypeSchema=L,exports.JSONMultiSelectFieldValueSchema=Qe,exports.JSONMultiStringConditionModifierSchema=he,exports.JSONMultiStringConditionSchema=ge,exports.JSONMultiStringConditionTypeSchema=h,exports.JSONMultiStringFieldSchema=$e,exports.JSONMultiStringFieldTypeSchema=R,exports.JSONMultiStringFieldValueSchema=et,exports.JSONNumberConditionModifierSchema=_e,exports.JSONNumberConditionSchema=ve,exports.JSONNumberConditionTypeSchema=g,exports.JSONNumberFieldSchema=tt,exports.JSONNumberFieldTypeSchema=z,exports.JSONNumberFieldValueSchema=nt,exports.JSONOTPConditionModifierSchema=ye,exports.JSONOTPConditionSchema=be,exports.JSONOTPConditionTypeSchema=_,exports.JSONOTPFieldSchema=rt,exports.JSONOTPFieldTypeSchema=V,exports.JSONOTPFieldValueSchema=it,exports.JSONPassFailConditionTypeSchema=w,exports.JSONPassFailFieldConditionModifierSchema=Ce,exports.JSONPassFailFieldConditionSchema=we,exports.JSONPassFailFieldSchema=xe,exports.JSONPassFailFieldTypeSchema=C,exports.JSONPassFailFieldValueSchema=Se,exports.JSONRadioConditionModifierSchema=Te,exports.JSONRadioConditionSchema=Ee,exports.JSONRadioConditionTypeSchema=T,exports.JSONRadioFieldSchema=at,exports.JSONRadioFieldTypeSchema=H,exports.JSONRadioFieldValueSchema=ot,exports.JSONRatingConditionModifierSchema=De,exports.JSONRatingConditionSchema=Oe,exports.JSONRatingConditionTypeSchema=E,exports.JSONRatingFieldSchema=st,exports.JSONRatingFieldTypeSchema=U,exports.JSONRatingFieldValueSchema=ct,exports.JSONScanConditionModifierSchema=ke,exports.JSONScanConditionSchema=Ae,exports.JSONScanConditionTypeSchema=D,exports.JSONScanFieldSchema=lt,exports.JSONScanFieldTypeSchema=W,exports.JSONScanFieldValueSchema=ut,exports.JSONSelectConditionModifierSchema=je,exports.JSONSelectConditionSchema=Me,exports.JSONSelectConditionTypeSchema=O,exports.JSONSelectFieldSchema=dt,exports.JSONSelectFieldTypeSchema=G,exports.JSONSelectFieldValueSchema=ft,exports.JSONStringConditionModifierSchema=Ne,exports.JSONStringConditionSchema=Pe,exports.JSONStringConditionTypeSchema=k,exports.JSONStringFieldSchema=pt,exports.JSONStringFieldTypeSchema=K,exports.JSONStringFieldValueSchema=mt,exports.JSONTextConditionModifierSchema=Fe,exports.JSONTextConditionSchema=Ie,exports.JSONTextConditionTypeSchema=A,exports.JSONTextFieldSchema=ht,exports.JSONTextFieldTypeSchema=q,exports.JSONTextFieldValueSchema=gt,exports.JSONTimeConditionModifierSchema=Le,exports.JSONTimeConditionSchema=Re,exports.JSONTimeConditionTypeSchema=j,exports.JSONTimeFieldSchema=_t,exports.JSONTimeFieldTypeSchema=J,exports.JSONTimeFieldValueSchema=vt,exports.JSONURLConditionModifierSchema=Ve,exports.JSONURLConditionSchema=He,exports.JSONURLConditionTypeSchema=N,exports.JSONURLFieldSchema=xt,exports.JSONURLFieldTypeSchema=X,exports.JSONURLFieldValueSchema=St,exports.JSONUploadConditionModifierSchema=ze,exports.JSONUploadConditionSchema=Be,exports.JSONUploadConditionTypeSchema=M,exports.JSONUploadFieldSchema=yt,exports.JSONUploadFieldTypeSchema=Y,exports.JSONUploadFieldValueSchema=bt,exports.NumberRangeSchema=u,exports.OTPFieldValidationTypeSchema=B,exports.PassFailFieldStatusSchema=S,exports.SelectFieldOptionSchema=oe,exports.TimeRangeSchema=le,exports.TimeSchema=f,exports.UTCOffsetSchema=ce,exports.UTCOffsetSignSchema=se,exports.UTCOffsetTimeSchema=d;
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,ee=Object.getOwnPropertyNames,r=Object.getPrototypeOf,te=Object.prototype.hasOwnProperty,ne=(e,r,ne,i)=>{if(r&&typeof r==`object`||typeof r==`function`)for(var a=ee(r),o=0,s=a.length,c;o<s;o++)c=a[o],!te.call(e,c)&&c!==ne&&t(e,c,{get:(e=>r[e]).bind(null,c),enumerable:!(i=n(r,c))||i.enumerable});return e},i=(n,ee,i)=>(i=n==null?{}:e(r(n)),ne(ee||!n||!n.__esModule||!te.call(n,`default`)?t(i,`default`,{value:n,enumerable:!0}):i,n));let a=require("zod/v4");a=i(a,1);var o=(e,t,n)=>a.object({id:a.string().meta({title:`Condition identifier`,description:`Identifier for this condition.`}),type:e.meta({title:`Condition type`,description:`Discriminator identifying the field type this condition applies to.`}),fieldId:a.string().meta({title:`Field identifier`,description:`Identifier of the field whose value is evaluated.`}),conditionValue:t.meta({title:`Comparison value`,description:`Value or range to compare against the referenced field value.`}),conditionModifier:n.meta({title:`Comparison operator`,description:`Operator used to compare the referenced field value with the comparison value.`})}),s=a.literal(`boolean`),c=a.literal([`equals`,`notEquals`]),re=o(s,a.boolean(),c).meta({title:`Boolean condition`,description:`A condition comparing the value of a boolean field with a configured comparison value.`}),l=a.literal(`checkbox-list`),ie=a.literal([`equals`,`notEquals`,`every`,`some`,`none`]),ae=o(l,a.array(a.string()),ie).meta({title:`Checkbox list condition`,description:`A condition comparing the value of a checkbox list field with a configured comparison value.`}),oe=a.object({value:a.string().meta({title:`Option value`,description:`Stored value identifying the option in field values and conditions.`}),label:a.string().meta({title:`Option label`,description:`Display text for the option.`})}).meta({title:`Selection option`,description:`A selectable option pairing a stored value with a display label.`}),u=a.object({from:a.number().nullable().meta({title:`Range start`,description:`Starting numeric bound, or null when unspecified.`}),to:a.number().nullable().meta({title:`Range end`,description:`Ending numeric bound, or null when unspecified.`})}).meta({title:`Number range`,description:`Numeric comparison bounds; either bound may be null.`}),se=a.literal([`+`,`-`]).meta({title:`UTC offset sign`,description:`Plus or minus sign preceding a UTC offset.`}),d=a.templateLiteral([a.string(),`:`,a.string()]).meta({title:`UTC offset components`,description:`Colon-separated components used for hours and minutes in a time or UTC offset.`}),ce=a.templateLiteral([se,d]).meta({title:`UTC offset`,description:`Signed, colon-separated UTC offset, such as +05:30 or -04:00.`}),f=a.templateLiteral([`T`,d,`:00`,ce]).meta({title:`Time with UTC offset`,description:`Time representation beginning with T, followed by hours and minutes, literal :00 seconds, and a signed UTC offset; for example T09:30:00+05:30.`}),le=a.object({from:f.nullable().meta({title:`Range start`,description:`Starting time bound, or null when unspecified.`}),to:f.nullable().meta({title:`Range end`,description:`Ending time bound, or null when unspecified.`})}).meta({title:`Time range`,description:`Time comparison bounds with UTC offsets; either bound may be null.`}),ue=a.object({from:a.string().nullable().meta({title:`Range start`,description:`Starting date bound, or null when unspecified.`}),to:a.string().nullable().meta({title:`Range end`,description:`Ending date bound, or null when unspecified.`})}).meta({title:`Date range`,description:`Date-string comparison bounds; either bound may be null.`}),p=a.literal(`date`),de=a.literal([`equals`,`notEquals`,`before`,`after`,`in`,`notIn`]),fe=o(p,a.union([a.string(),ue]),de).meta({title:`Date condition`,description:`A condition comparing the value of a date field with a configured comparison value.`}),m=a.literal(`multi-select`),pe=a.literal([`equals`,`notEquals`,`every`,`some`,`none`]),me=o(m,a.array(a.string()),pe).meta({title:`Multi-select condition`,description:`A condition comparing the value of a multi-select field with a configured comparison value.`}),h=a.literal(`multi-string`),he=a.literal([`equals`,`notEquals`,`every`,`some`,`none`]),ge=o(h,a.array(a.string()),he).meta({title:`Multi-string condition`,description:`A condition comparing the value of a multi-string field with a configured comparison value.`}),g=a.literal(`number`),_e=a.literal([`equals`,`notEquals`,`lessThan`,`lessThanOrEquals`,`greaterThan`,`greaterThanOrEquals`,`inRange`,`notInRange`]),ve=o(g,a.union([a.number(),u]),_e).meta({title:`Number condition`,description:`A condition comparing the value of a number field with a configured comparison value.`}),_=a.literal(`otp`),ye=a.literal([`equals`,`notEquals`,`includes`,`excludes`]),be=o(_,a.string(),ye).meta({title:`One-time password condition`,description:`A condition comparing the value of a one-time password field with a configured comparison value.`}),v=e=>a.object({identifier:a.string().meta({title:`Element identifier`,description:`Identifier used to reference this field or section.`}),type:e.meta({title:`Element type`,description:`Discriminator identifying the kind of field or section.`})}),y=e=>a.object({...v(e).shape,label:a.string().meta({title:`Field label`,description:`Display label for the field.`}),description:a.string().nullable().optional().meta({title:`Field description`,description:`Optional help text for the field; may be null.`}),required:a.boolean().meta({title:`Required`,description:`Whether the form requires a value for this field.`})}),b=e=>a.object({...y(e).shape,options:a.array(oe).meta({title:`Options`,description:`Available choices, each with a stored value and a display label.`})}),x=e=>a.object({...y(e).shape,minimum_length:a.number().optional().meta({title:`Minimum length`,description:`Minimum number of characters allowed in the field value.`}),maximum_length:a.number().optional().meta({title:`Maximum length`,description:`Maximum number of characters allowed in the field value.`}),placeholder:a.string().optional().meta({title:`Placeholder`,description:`Hint displayed when the field has no value.`})}),S=a.literal([`pass`,`fail`,`na`]).meta({title:`Assessment status`,description:`Assessment outcome: pass, fail, or na for not applicable.`}),C=a.literal(`pass-fail`),xe=a.object({...y(C).shape,showNotesAndFilesOn:a.array(S).meta({title:`Notes and files statuses`,description:`Statuses for which the notes and file inputs are displayed.`})}).meta({title:`Pass/fail field`,description:`An assessment input with pass, fail, and not-applicable statuses and configurable notes and files.`}),Se=a.object({status:S.nullable(),notes:a.string(),files:a.tuple([])}),w=a.literal(`pass-fail`),Ce=a.literal([`equals`,`notEquals`,`includes`,`excludes`]),we=o(w,a.union([S,a.array(S)]),Ce).meta({title:`Pass/fail condition`,description:`A condition comparing the value of a pass/fail field with a configured comparison value.`}),T=a.literal(`radio`),Te=a.literal([`equals`,`notEquals`,`includes`,`excludes`]),Ee=o(T,a.union([a.string(),a.array(a.string())]),Te).meta({title:`Radio condition`,description:`A condition comparing the value of a radio field with a configured comparison value.`}),E=a.literal(`rating`),De=a.literal([`equals`,`notEquals`,`lessThan`,`lessThanOrEquals`,`greaterThan`,`greaterThanOrEquals`,`inRange`,`notInRange`]),Oe=o(E,a.union([a.number(),u]),De).meta({title:`Rating condition`,description:`A condition comparing the value of a rating field with a configured comparison value.`}),D=a.literal(`qr`),ke=a.literal([`equals`,`notEquals`,`includes`,`excludes`]),Ae=o(D,a.string(),ke).meta({title:`QR scan condition`,description:`A condition comparing the value of a qr scan field with a configured comparison value.`}),O=a.literal(`select`),je=a.literal([`equals`,`notEquals`,`includes`,`excludes`]),Me=o(O,a.union([a.string(),a.array(a.string())]),je).meta({title:`Select condition`,description:`A condition comparing the value of a select field with a configured comparison value.`}),k=a.literal(`string`),Ne=a.literal([`equals`,`notEquals`,`includes`,`excludes`]),Pe=o(k,a.string(),Ne).meta({title:`String condition`,description:`A condition comparing the value of a string field with a configured comparison value.`}),A=a.literal(`text`),Fe=a.literal([`equals`,`notEquals`,`includes`,`excludes`]),Ie=o(A,a.string(),Fe).meta({title:`Text condition`,description:`A condition comparing the value of a text field with a configured comparison value.`}),j=a.literal(`time`),Le=a.literal([`equals`,`notEquals`,`before`,`after`,`in`,`notIn`]),Re=o(j,a.union([f,le]),Le).meta({title:`Time condition`,description:`A condition comparing the value of a time field with a configured comparison value.`}),M=a.literal(`upload`),ze=a.literal([`equals`,`notEquals`]),Be=o(M,a.boolean(),ze).meta({title:`Upload condition`,description:`A condition comparing the value of a upload field with a configured comparison value.`}),N=a.literal(`url`),Ve=a.literal([`equals`,`notEquals`,`includes`,`excludes`]),He=o(N,a.string(),Ve).meta({title:`URL condition`,description:`A condition comparing the value of a url field with a configured comparison value.`}),Ue=a.union([s,l,p,m,h,g,_,w,T,E,D,O,k,A,j,M,N]).meta({title:`Condition type`,description:`Field types supported by conditions.`}),We=a.discriminatedUnion(`type`,[re,ae,fe,me,ge,ve,be,we,Ee,Oe,Ae,Me,Pe,Ie,Re,Be,He]).meta({title:`Condition`,description:`A comparison against a referenced field, selected by its type discriminator.`}),P=a.literal(`boolean`),Ge=y(P).meta({title:`Boolean field`,description:`A true-or-false input.`}),Ke=a.boolean(),F=a.literal(`checkbox-list`),qe=b(F).meta({title:`Checkbox list field`,description:`A list of checkboxes allowing multiple options to be selected.`}),Je=a.array(a.string()),I=a.literal(`date`),Ye=y(I).meta({title:`Date field`,description:`An input for a date value.`}),Xe=a.string().nullable(),L=a.literal(`multi-select`),Ze=a.object({...b(L).shape,placeholder:a.string().optional().meta({title:`Placeholder`,description:`Hint displayed when the field has no value.`})}).meta({title:`Multi-select field`,description:`A selection input allowing multiple options to be selected.`}),Qe=a.array(a.string()),R=a.literal(`multi-string`),$e=a.object({...y(R).shape,minimum_length:a.number().optional().meta({title:`Minimum entries`,description:`Minimum number of strings allowed in the list.`}),maximum_length:a.number().optional().meta({title:`Maximum entries`,description:`Maximum number of strings allowed in the list.`}),placeholder:a.string().optional().meta({title:`Placeholder`,description:`Hint displayed when the field has no value.`})}).meta({title:`Multi-string field`,description:`An input for a list of strings, with optional limits on the number of entries.`}),et=a.array(a.string()),z=a.literal(`number`),tt=a.object({...y(z).shape,minimum:a.number().optional().meta({title:`Minimum value`,description:`Lower bound configured for the numeric input.`}),maximum:a.number().optional().meta({title:`Maximum value`,description:`Upper bound configured for the numeric input.`}),integers:a.boolean().optional().meta({title:`Integers only`,description:`Whether the input should allow only whole numbers.`}),placeholder:a.string().optional().meta({title:`Placeholder`,description:`Hint displayed when the field has no value.`})}).meta({title:`Number field`,description:`A numeric input with optional bounds and an integer-only setting.`}),nt=a.number().nullable(),B=a.literal([`alpha`,`numeric`,`alphanumeric`,`none`]).meta({title:`Code validation mode`,description:`Allowed characters: alpha for letters, numeric for digits, alphanumeric for letters and digits, or none for no character restriction.`}),V=a.literal(`otp`),rt=a.object({...y(V).shape,length:a.number().meta({title:`Code length`,description:`Number of characters in the code.`}),validationType:B}).meta({title:`One-time password field`,description:`A code input with a configured length and character validation mode.`}),it=a.string(),H=a.literal(`radio`),at=b(H).meta({title:`Radio field`,description:`A group of radio options allowing one option to be selected.`}),ot=a.string().nullable(),U=a.literal(`rating`),st=a.object({...y(U).shape,maxRating:a.number().meta({title:`Maximum rating`,description:`Highest rating available in the input.`})}).meta({title:`Rating field`,description:`A rating input with a configured maximum rating.`}),ct=a.number().nullable(),W=a.literal(`qr`),lt=y(W).meta({title:`QR scan field`,description:`An input for a value read from a QR code.`}),ut=a.string(),G=a.literal(`select`),dt=a.object({...b(G).shape,placeholder:a.string().optional().meta({title:`Placeholder`,description:`Hint displayed when the field has no value.`})}).meta({title:`Select field`,description:`A selection input allowing one option to be selected.`}),ft=a.string().nullable(),K=a.literal(`string`),pt=x(K).meta({title:`String field`,description:`A single-line text input with optional character limits and a placeholder.`}),mt=a.string(),q=a.literal(`text`),ht=x(q).meta({title:`Text field`,description:`A multiline text input with optional character limits and a placeholder.`}),gt=a.string(),J=a.literal(`time`),_t=y(J).meta({title:`Time field`,description:`An input for a time value with a UTC offset.`}),vt=f.nullable(),Y=a.literal(`upload`),yt=a.object({...y(Y).shape,extensions:a.array(a.string()).optional().meta({title:`Allowed extensions`,description:`File extensions accepted by the upload input.`}),maximum_size:a.number().optional().meta({title:`Maximum file size`,description:`Configured size limit for uploaded files.`}),maximum_files:a.number().optional().meta({title:`Maximum files`,description:`Maximum number of files allowed in the upload input.`})}).meta({title:`Upload field`,description:`A file upload input with optional extension, size, and file-count limits.`}),bt=a.tuple([]),X=a.literal(`url`),xt=a.object({...y(X).shape,placeholder:a.string().optional().meta({title:`Placeholder`,description:`Hint displayed when the field has no value.`})}).meta({title:`URL field`,description:`An input for a URL string with an optional placeholder.`}),St=a.string().nullable(),Ct=a.union([P,F,I,L,R,z,V,C,H,U,W,G,K,q,J,Y,X]),Z=a.discriminatedUnion(`type`,[Ge,qe,Ye,Ze,$e,tt,rt,xe,at,st,lt,dt,pt,ht,_t,yt,xt]).meta({title:`Field`,description:`Configuration for an input field, selected by its type discriminator.`}),wt=a.union([Ke,Je,Xe,Qe,et,nt,it,Se,ot,ct,ut,ft,mt,gt,vt,bt,St]),Tt=a.record(a.string(),wt),Q=a.literal(`section`),Et=a.record(a.string(),a.array(We)).meta({title:`Section conditions`,description:`Conditions stored on the source section for target sections that depend on it. Each key is the identifier of another section (the target section), and each value is a list of conditions based on fields contained in the source section.`}),$=a.object({...v(Q).shape,label:a.string().nullable().meta({title:`Section label`,description:`Display label for the section, or null for an unlabeled section.`}),description:a.string().nullable().optional().meta({title:`Section description`,description:`Optional help text for the section; may be null.`}),conditions:Et,fields:a.array(Z).meta({title:`Fields`,description:`Fields in this section, in display order.`})}).meta({title:`Section`,description:`A labeled group of fields with optional help text and associated conditions.`}),Dt=a.union([Ct,Q]).meta({title:`Element type`,description:`Supported field and section types.`}),Ot=a.discriminatedUnion(`type`,[$,Z]).meta({title:`Element`,description:`A field or section, selected by its type discriminator.`}),kt=a.array($).meta({title:`Field schema`,description:`An ordered collection of sections defining a form, its fields, and its conditions.`});exports.BaseJSONConditionSchema=o,exports.BaseJSONFieldElementSchema=v,exports.BaseJSONFieldSchema=y,exports.BaseJSONOptionsFieldSchema=b,exports.BaseJSONStringFieldSchema=x,exports.JSONBooleanConditionModifierSchema=c,exports.JSONBooleanConditionSchema=re,exports.JSONBooleanConditionTypeSchema=s,exports.JSONBooleanFieldSchema=Ge,exports.JSONBooleanFieldTypeSchema=P,exports.JSONBooleanFieldValueSchema=Ke,exports.JSONCheckboxListConditionModifierSchema=ie,exports.JSONCheckboxListConditionSchema=ae,exports.JSONCheckboxListConditionTypeSchema=l,exports.JSONCheckboxListFieldSchema=qe,exports.JSONCheckboxListFieldTypeSchema=F,exports.JSONCheckboxListFieldValueSchema=Je,exports.JSONConditionSchema=We,exports.JSONConditionTypeSchema=Ue,exports.JSONDateConditionModifierSchema=de,exports.JSONDateConditionSchema=fe,exports.JSONDateConditionTypeSchema=p,exports.JSONDateFieldSchema=Ye,exports.JSONDateFieldTypeSchema=I,exports.JSONDateFieldValueSchema=Xe,exports.JSONDateRangeSchema=ue,exports.JSONFieldElementSchema=Ot,exports.JSONFieldElementTypeSchema=Dt,exports.JSONFieldSchema=Z,exports.JSONFieldSchemaSchema=kt,exports.JSONFieldSectionConditionsSchema=Et,exports.JSONFieldSectionSchema=$,exports.JSONFieldSectionTypeSchema=Q,exports.JSONFieldTypeSchema=Ct,exports.JSONFieldValueSchema=wt,exports.JSONFieldValuesSchema=Tt,exports.JSONMultiSelectConditionModifierSchema=pe,exports.JSONMultiSelectConditionSchema=me,exports.JSONMultiSelectConditionTypeSchema=m,exports.JSONMultiSelectFieldSchema=Ze,exports.JSONMultiSelectFieldTypeSchema=L,exports.JSONMultiSelectFieldValueSchema=Qe,exports.JSONMultiStringConditionModifierSchema=he,exports.JSONMultiStringConditionSchema=ge,exports.JSONMultiStringConditionTypeSchema=h,exports.JSONMultiStringFieldSchema=$e,exports.JSONMultiStringFieldTypeSchema=R,exports.JSONMultiStringFieldValueSchema=et,exports.JSONNumberConditionModifierSchema=_e,exports.JSONNumberConditionSchema=ve,exports.JSONNumberConditionTypeSchema=g,exports.JSONNumberFieldSchema=tt,exports.JSONNumberFieldTypeSchema=z,exports.JSONNumberFieldValueSchema=nt,exports.JSONOTPConditionModifierSchema=ye,exports.JSONOTPConditionSchema=be,exports.JSONOTPConditionTypeSchema=_,exports.JSONOTPFieldSchema=rt,exports.JSONOTPFieldTypeSchema=V,exports.JSONOTPFieldValueSchema=it,exports.JSONPassFailConditionTypeSchema=w,exports.JSONPassFailFieldConditionModifierSchema=Ce,exports.JSONPassFailFieldConditionSchema=we,exports.JSONPassFailFieldSchema=xe,exports.JSONPassFailFieldTypeSchema=C,exports.JSONPassFailFieldValueSchema=Se,exports.JSONRadioConditionModifierSchema=Te,exports.JSONRadioConditionSchema=Ee,exports.JSONRadioConditionTypeSchema=T,exports.JSONRadioFieldSchema=at,exports.JSONRadioFieldTypeSchema=H,exports.JSONRadioFieldValueSchema=ot,exports.JSONRatingConditionModifierSchema=De,exports.JSONRatingConditionSchema=Oe,exports.JSONRatingConditionTypeSchema=E,exports.JSONRatingFieldSchema=st,exports.JSONRatingFieldTypeSchema=U,exports.JSONRatingFieldValueSchema=ct,exports.JSONScanConditionModifierSchema=ke,exports.JSONScanConditionSchema=Ae,exports.JSONScanConditionTypeSchema=D,exports.JSONScanFieldSchema=lt,exports.JSONScanFieldTypeSchema=W,exports.JSONScanFieldValueSchema=ut,exports.JSONSelectConditionModifierSchema=je,exports.JSONSelectConditionSchema=Me,exports.JSONSelectConditionTypeSchema=O,exports.JSONSelectFieldSchema=dt,exports.JSONSelectFieldTypeSchema=G,exports.JSONSelectFieldValueSchema=ft,exports.JSONStringConditionModifierSchema=Ne,exports.JSONStringConditionSchema=Pe,exports.JSONStringConditionTypeSchema=k,exports.JSONStringFieldSchema=pt,exports.JSONStringFieldTypeSchema=K,exports.JSONStringFieldValueSchema=mt,exports.JSONTextConditionModifierSchema=Fe,exports.JSONTextConditionSchema=Ie,exports.JSONTextConditionTypeSchema=A,exports.JSONTextFieldSchema=ht,exports.JSONTextFieldTypeSchema=q,exports.JSONTextFieldValueSchema=gt,exports.JSONTimeConditionModifierSchema=Le,exports.JSONTimeConditionSchema=Re,exports.JSONTimeConditionTypeSchema=j,exports.JSONTimeFieldSchema=_t,exports.JSONTimeFieldTypeSchema=J,exports.JSONTimeFieldValueSchema=vt,exports.JSONURLConditionModifierSchema=Ve,exports.JSONURLConditionSchema=He,exports.JSONURLConditionTypeSchema=N,exports.JSONURLFieldSchema=xt,exports.JSONURLFieldTypeSchema=X,exports.JSONURLFieldValueSchema=St,exports.JSONUploadConditionModifierSchema=ze,exports.JSONUploadConditionSchema=Be,exports.JSONUploadConditionTypeSchema=M,exports.JSONUploadFieldSchema=yt,exports.JSONUploadFieldTypeSchema=Y,exports.JSONUploadFieldValueSchema=bt,exports.NumberRangeSchema=u,exports.OTPFieldValidationTypeSchema=B,exports.PassFailFieldStatusSchema=S,exports.SelectFieldOptionSchema=oe,exports.TimeRangeSchema=le,exports.TimeSchema=f,exports.UTCOffsetSchema=ce,exports.UTCOffsetSignSchema=se,exports.UTCOffsetTimeSchema=d;
|
package/dist/index.js
CHANGED
|
@@ -1,38 +1,107 @@
|
|
|
1
1
|
import * as e from "zod/v4";
|
|
2
2
|
//#region src/conditions/base.ts
|
|
3
3
|
var t = (t, n, r) => e.object({
|
|
4
|
-
id: e.string()
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
4
|
+
id: e.string().meta({
|
|
5
|
+
title: "Condition identifier",
|
|
6
|
+
description: "Identifier for this condition."
|
|
7
|
+
}),
|
|
8
|
+
type: t.meta({
|
|
9
|
+
title: "Condition type",
|
|
10
|
+
description: "Discriminator identifying the field type this condition applies to."
|
|
11
|
+
}),
|
|
12
|
+
fieldId: e.string().meta({
|
|
13
|
+
title: "Field identifier",
|
|
14
|
+
description: "Identifier of the field whose value is evaluated."
|
|
15
|
+
}),
|
|
16
|
+
conditionValue: n.meta({
|
|
17
|
+
title: "Comparison value",
|
|
18
|
+
description: "Value or range to compare against the referenced field value."
|
|
19
|
+
}),
|
|
20
|
+
conditionModifier: r.meta({
|
|
21
|
+
title: "Comparison operator",
|
|
22
|
+
description: "Operator used to compare the referenced field value with the comparison value."
|
|
23
|
+
})
|
|
24
|
+
}), n = e.literal("boolean"), r = e.literal(["equals", "notEquals"]), ee = t(n, e.boolean(), r).meta({
|
|
25
|
+
title: "Boolean condition",
|
|
26
|
+
description: "A condition comparing the value of a boolean field with a configured comparison value."
|
|
27
|
+
}), i = e.literal("checkbox-list"), te = e.literal([
|
|
10
28
|
"equals",
|
|
11
29
|
"notEquals",
|
|
12
30
|
"every",
|
|
13
31
|
"some",
|
|
14
32
|
"none"
|
|
15
|
-
]), ne = t(i, e.array(e.string()), te)
|
|
16
|
-
|
|
17
|
-
|
|
33
|
+
]), ne = t(i, e.array(e.string()), te).meta({
|
|
34
|
+
title: "Checkbox list condition",
|
|
35
|
+
description: "A condition comparing the value of a checkbox list field with a configured comparison value."
|
|
36
|
+
}), re = e.object({
|
|
37
|
+
value: e.string().meta({
|
|
38
|
+
title: "Option value",
|
|
39
|
+
description: "Stored value identifying the option in field values and conditions."
|
|
40
|
+
}),
|
|
41
|
+
label: e.string().meta({
|
|
42
|
+
title: "Option label",
|
|
43
|
+
description: "Display text for the option."
|
|
44
|
+
})
|
|
45
|
+
}).meta({
|
|
46
|
+
title: "Selection option",
|
|
47
|
+
description: "A selectable option pairing a stored value with a display label."
|
|
18
48
|
}), a = e.object({
|
|
19
|
-
from: e.number().nullable()
|
|
20
|
-
|
|
21
|
-
|
|
49
|
+
from: e.number().nullable().meta({
|
|
50
|
+
title: "Range start",
|
|
51
|
+
description: "Starting numeric bound, or null when unspecified."
|
|
52
|
+
}),
|
|
53
|
+
to: e.number().nullable().meta({
|
|
54
|
+
title: "Range end",
|
|
55
|
+
description: "Ending numeric bound, or null when unspecified."
|
|
56
|
+
})
|
|
57
|
+
}).meta({
|
|
58
|
+
title: "Number range",
|
|
59
|
+
description: "Numeric comparison bounds; either bound may be null."
|
|
60
|
+
}), ie = e.literal(["+", "-"]).meta({
|
|
61
|
+
title: "UTC offset sign",
|
|
62
|
+
description: "Plus or minus sign preceding a UTC offset."
|
|
63
|
+
}), o = e.templateLiteral([
|
|
22
64
|
e.string(),
|
|
23
65
|
":",
|
|
24
66
|
e.string()
|
|
25
|
-
])
|
|
67
|
+
]).meta({
|
|
68
|
+
title: "UTC offset components",
|
|
69
|
+
description: "Colon-separated components used for hours and minutes in a time or UTC offset."
|
|
70
|
+
}), ae = e.templateLiteral([ie, o]).meta({
|
|
71
|
+
title: "UTC offset",
|
|
72
|
+
description: "Signed, colon-separated UTC offset, such as +05:30 or -04:00."
|
|
73
|
+
}), s = e.templateLiteral([
|
|
26
74
|
"T",
|
|
27
75
|
o,
|
|
28
76
|
":00",
|
|
29
77
|
ae
|
|
30
|
-
])
|
|
31
|
-
|
|
32
|
-
|
|
78
|
+
]).meta({
|
|
79
|
+
title: "Time with UTC offset",
|
|
80
|
+
description: "Time representation beginning with T, followed by hours and minutes, literal :00 seconds, and a signed UTC offset; for example T09:30:00+05:30."
|
|
81
|
+
}), oe = e.object({
|
|
82
|
+
from: s.nullable().meta({
|
|
83
|
+
title: "Range start",
|
|
84
|
+
description: "Starting time bound, or null when unspecified."
|
|
85
|
+
}),
|
|
86
|
+
to: s.nullable().meta({
|
|
87
|
+
title: "Range end",
|
|
88
|
+
description: "Ending time bound, or null when unspecified."
|
|
89
|
+
})
|
|
90
|
+
}).meta({
|
|
91
|
+
title: "Time range",
|
|
92
|
+
description: "Time comparison bounds with UTC offsets; either bound may be null."
|
|
33
93
|
}), se = e.object({
|
|
34
|
-
from: e.string().nullable()
|
|
35
|
-
|
|
94
|
+
from: e.string().nullable().meta({
|
|
95
|
+
title: "Range start",
|
|
96
|
+
description: "Starting date bound, or null when unspecified."
|
|
97
|
+
}),
|
|
98
|
+
to: e.string().nullable().meta({
|
|
99
|
+
title: "Range end",
|
|
100
|
+
description: "Ending date bound, or null when unspecified."
|
|
101
|
+
})
|
|
102
|
+
}).meta({
|
|
103
|
+
title: "Date range",
|
|
104
|
+
description: "Date-string comparison bounds; either bound may be null."
|
|
36
105
|
}), c = e.literal("date"), ce = e.literal([
|
|
37
106
|
"equals",
|
|
38
107
|
"notEquals",
|
|
@@ -40,19 +109,28 @@ var t = (t, n, r) => e.object({
|
|
|
40
109
|
"after",
|
|
41
110
|
"in",
|
|
42
111
|
"notIn"
|
|
43
|
-
]), le = t(c, e.union([e.string(), se]), ce)
|
|
112
|
+
]), le = t(c, e.union([e.string(), se]), ce).meta({
|
|
113
|
+
title: "Date condition",
|
|
114
|
+
description: "A condition comparing the value of a date field with a configured comparison value."
|
|
115
|
+
}), l = e.literal("multi-select"), ue = e.literal([
|
|
44
116
|
"equals",
|
|
45
117
|
"notEquals",
|
|
46
118
|
"every",
|
|
47
119
|
"some",
|
|
48
120
|
"none"
|
|
49
|
-
]), de = t(l, e.array(e.string()), ue)
|
|
121
|
+
]), de = t(l, e.array(e.string()), ue).meta({
|
|
122
|
+
title: "Multi-select condition",
|
|
123
|
+
description: "A condition comparing the value of a multi-select field with a configured comparison value."
|
|
124
|
+
}), u = e.literal("multi-string"), d = e.literal([
|
|
50
125
|
"equals",
|
|
51
126
|
"notEquals",
|
|
52
127
|
"every",
|
|
53
128
|
"some",
|
|
54
129
|
"none"
|
|
55
|
-
]), f = t(u, e.array(e.string()), d)
|
|
130
|
+
]), f = t(u, e.array(e.string()), d).meta({
|
|
131
|
+
title: "Multi-string condition",
|
|
132
|
+
description: "A condition comparing the value of a multi-string field with a configured comparison value."
|
|
133
|
+
}), p = e.literal("number"), fe = e.literal([
|
|
56
134
|
"equals",
|
|
57
135
|
"notEquals",
|
|
58
136
|
"lessThan",
|
|
@@ -61,34 +139,76 @@ var t = (t, n, r) => e.object({
|
|
|
61
139
|
"greaterThanOrEquals",
|
|
62
140
|
"inRange",
|
|
63
141
|
"notInRange"
|
|
64
|
-
]), pe = t(p, e.union([e.number(), a]), fe)
|
|
142
|
+
]), pe = t(p, e.union([e.number(), a]), fe).meta({
|
|
143
|
+
title: "Number condition",
|
|
144
|
+
description: "A condition comparing the value of a number field with a configured comparison value."
|
|
145
|
+
}), m = e.literal("otp"), me = e.literal([
|
|
65
146
|
"equals",
|
|
66
147
|
"notEquals",
|
|
67
148
|
"includes",
|
|
68
149
|
"excludes"
|
|
69
|
-
]), he = t(m, e.string(), me)
|
|
70
|
-
|
|
71
|
-
|
|
150
|
+
]), he = t(m, e.string(), me).meta({
|
|
151
|
+
title: "One-time password condition",
|
|
152
|
+
description: "A condition comparing the value of a one-time password field with a configured comparison value."
|
|
153
|
+
}), h = (t) => e.object({
|
|
154
|
+
identifier: e.string().meta({
|
|
155
|
+
title: "Element identifier",
|
|
156
|
+
description: "Identifier used to reference this field or section."
|
|
157
|
+
}),
|
|
158
|
+
type: t.meta({
|
|
159
|
+
title: "Element type",
|
|
160
|
+
description: "Discriminator identifying the kind of field or section."
|
|
161
|
+
})
|
|
72
162
|
}), g = (t) => e.object({
|
|
73
163
|
...h(t).shape,
|
|
74
|
-
label: e.string()
|
|
75
|
-
|
|
76
|
-
|
|
164
|
+
label: e.string().meta({
|
|
165
|
+
title: "Field label",
|
|
166
|
+
description: "Display label for the field."
|
|
167
|
+
}),
|
|
168
|
+
description: e.string().nullable().optional().meta({
|
|
169
|
+
title: "Field description",
|
|
170
|
+
description: "Optional help text for the field; may be null."
|
|
171
|
+
}),
|
|
172
|
+
required: e.boolean().meta({
|
|
173
|
+
title: "Required",
|
|
174
|
+
description: "Whether the form requires a value for this field."
|
|
175
|
+
})
|
|
77
176
|
}), _ = (t) => e.object({
|
|
78
177
|
...g(t).shape,
|
|
79
|
-
options: e.array(re)
|
|
178
|
+
options: e.array(re).meta({
|
|
179
|
+
title: "Options",
|
|
180
|
+
description: "Available choices, each with a stored value and a display label."
|
|
181
|
+
})
|
|
80
182
|
}), v = (t) => e.object({
|
|
81
183
|
...g(t).shape,
|
|
82
|
-
minimum_length: e.number().optional()
|
|
83
|
-
|
|
84
|
-
|
|
184
|
+
minimum_length: e.number().optional().meta({
|
|
185
|
+
title: "Minimum length",
|
|
186
|
+
description: "Minimum number of characters allowed in the field value."
|
|
187
|
+
}),
|
|
188
|
+
maximum_length: e.number().optional().meta({
|
|
189
|
+
title: "Maximum length",
|
|
190
|
+
description: "Maximum number of characters allowed in the field value."
|
|
191
|
+
}),
|
|
192
|
+
placeholder: e.string().optional().meta({
|
|
193
|
+
title: "Placeholder",
|
|
194
|
+
description: "Hint displayed when the field has no value."
|
|
195
|
+
})
|
|
85
196
|
}), y = e.literal([
|
|
86
197
|
"pass",
|
|
87
198
|
"fail",
|
|
88
199
|
"na"
|
|
89
|
-
])
|
|
200
|
+
]).meta({
|
|
201
|
+
title: "Assessment status",
|
|
202
|
+
description: "Assessment outcome: pass, fail, or na for not applicable."
|
|
203
|
+
}), b = e.literal("pass-fail"), ge = e.object({
|
|
90
204
|
...g(b).shape,
|
|
91
|
-
showNotesAndFilesOn: e.array(y)
|
|
205
|
+
showNotesAndFilesOn: e.array(y).meta({
|
|
206
|
+
title: "Notes and files statuses",
|
|
207
|
+
description: "Statuses for which the notes and file inputs are displayed."
|
|
208
|
+
})
|
|
209
|
+
}).meta({
|
|
210
|
+
title: "Pass/fail field",
|
|
211
|
+
description: "An assessment input with pass, fail, and not-applicable statuses and configurable notes and files."
|
|
92
212
|
}), _e = e.object({
|
|
93
213
|
status: y.nullable(),
|
|
94
214
|
notes: e.string(),
|
|
@@ -98,12 +218,18 @@ var t = (t, n, r) => e.object({
|
|
|
98
218
|
"notEquals",
|
|
99
219
|
"includes",
|
|
100
220
|
"excludes"
|
|
101
|
-
]), ye = t(x, e.union([y, e.array(y)]), ve)
|
|
221
|
+
]), ye = t(x, e.union([y, e.array(y)]), ve).meta({
|
|
222
|
+
title: "Pass/fail condition",
|
|
223
|
+
description: "A condition comparing the value of a pass/fail field with a configured comparison value."
|
|
224
|
+
}), S = e.literal("radio"), be = e.literal([
|
|
102
225
|
"equals",
|
|
103
226
|
"notEquals",
|
|
104
227
|
"includes",
|
|
105
228
|
"excludes"
|
|
106
|
-
]), xe = t(S, e.union([e.string(), e.array(e.string())]), be)
|
|
229
|
+
]), xe = t(S, e.union([e.string(), e.array(e.string())]), be).meta({
|
|
230
|
+
title: "Radio condition",
|
|
231
|
+
description: "A condition comparing the value of a radio field with a configured comparison value."
|
|
232
|
+
}), C = e.literal("rating"), Se = e.literal([
|
|
107
233
|
"equals",
|
|
108
234
|
"notEquals",
|
|
109
235
|
"lessThan",
|
|
@@ -112,39 +238,63 @@ var t = (t, n, r) => e.object({
|
|
|
112
238
|
"greaterThanOrEquals",
|
|
113
239
|
"inRange",
|
|
114
240
|
"notInRange"
|
|
115
|
-
]), Ce = t(C, e.union([e.number(), a]), Se)
|
|
241
|
+
]), Ce = t(C, e.union([e.number(), a]), Se).meta({
|
|
242
|
+
title: "Rating condition",
|
|
243
|
+
description: "A condition comparing the value of a rating field with a configured comparison value."
|
|
244
|
+
}), w = e.literal("qr"), we = e.literal([
|
|
116
245
|
"equals",
|
|
117
246
|
"notEquals",
|
|
118
247
|
"includes",
|
|
119
248
|
"excludes"
|
|
120
|
-
]), T = t(w, e.string(), we)
|
|
249
|
+
]), T = t(w, e.string(), we).meta({
|
|
250
|
+
title: "QR scan condition",
|
|
251
|
+
description: "A condition comparing the value of a qr scan field with a configured comparison value."
|
|
252
|
+
}), E = e.literal("select"), D = e.literal([
|
|
121
253
|
"equals",
|
|
122
254
|
"notEquals",
|
|
123
255
|
"includes",
|
|
124
256
|
"excludes"
|
|
125
|
-
]), O = t(E, e.union([e.string(), e.array(e.string())]), D)
|
|
257
|
+
]), O = t(E, e.union([e.string(), e.array(e.string())]), D).meta({
|
|
258
|
+
title: "Select condition",
|
|
259
|
+
description: "A condition comparing the value of a select field with a configured comparison value."
|
|
260
|
+
}), k = e.literal("string"), Te = e.literal([
|
|
126
261
|
"equals",
|
|
127
262
|
"notEquals",
|
|
128
263
|
"includes",
|
|
129
264
|
"excludes"
|
|
130
|
-
]), Ee = t(k, e.string(), Te)
|
|
265
|
+
]), Ee = t(k, e.string(), Te).meta({
|
|
266
|
+
title: "String condition",
|
|
267
|
+
description: "A condition comparing the value of a string field with a configured comparison value."
|
|
268
|
+
}), A = e.literal("text"), De = e.literal([
|
|
131
269
|
"equals",
|
|
132
270
|
"notEquals",
|
|
133
271
|
"includes",
|
|
134
272
|
"excludes"
|
|
135
|
-
]), Oe = t(A, e.string(), De)
|
|
273
|
+
]), Oe = t(A, e.string(), De).meta({
|
|
274
|
+
title: "Text condition",
|
|
275
|
+
description: "A condition comparing the value of a text field with a configured comparison value."
|
|
276
|
+
}), j = e.literal("time"), ke = e.literal([
|
|
136
277
|
"equals",
|
|
137
278
|
"notEquals",
|
|
138
279
|
"before",
|
|
139
280
|
"after",
|
|
140
281
|
"in",
|
|
141
282
|
"notIn"
|
|
142
|
-
]), Ae = t(j, e.union([s, oe]), ke)
|
|
283
|
+
]), Ae = t(j, e.union([s, oe]), ke).meta({
|
|
284
|
+
title: "Time condition",
|
|
285
|
+
description: "A condition comparing the value of a time field with a configured comparison value."
|
|
286
|
+
}), M = e.literal("upload"), je = e.literal(["equals", "notEquals"]), Me = t(M, e.boolean(), je).meta({
|
|
287
|
+
title: "Upload condition",
|
|
288
|
+
description: "A condition comparing the value of a upload field with a configured comparison value."
|
|
289
|
+
}), N = e.literal("url"), Ne = e.literal([
|
|
143
290
|
"equals",
|
|
144
291
|
"notEquals",
|
|
145
292
|
"includes",
|
|
146
293
|
"excludes"
|
|
147
|
-
]), Pe = t(N, e.string(), Ne)
|
|
294
|
+
]), Pe = t(N, e.string(), Ne).meta({
|
|
295
|
+
title: "URL condition",
|
|
296
|
+
description: "A condition comparing the value of a url field with a configured comparison value."
|
|
297
|
+
}), Fe = e.union([
|
|
148
298
|
n,
|
|
149
299
|
i,
|
|
150
300
|
c,
|
|
@@ -162,7 +312,10 @@ var t = (t, n, r) => e.object({
|
|
|
162
312
|
j,
|
|
163
313
|
M,
|
|
164
314
|
N
|
|
165
|
-
])
|
|
315
|
+
]).meta({
|
|
316
|
+
title: "Condition type",
|
|
317
|
+
description: "Field types supported by conditions."
|
|
318
|
+
}), Ie = e.discriminatedUnion("type", [
|
|
166
319
|
ee,
|
|
167
320
|
ne,
|
|
168
321
|
le,
|
|
@@ -180,43 +333,142 @@ var t = (t, n, r) => e.object({
|
|
|
180
333
|
Ae,
|
|
181
334
|
Me,
|
|
182
335
|
Pe
|
|
183
|
-
])
|
|
336
|
+
]).meta({
|
|
337
|
+
title: "Condition",
|
|
338
|
+
description: "A comparison against a referenced field, selected by its type discriminator."
|
|
339
|
+
}), P = e.literal("boolean"), F = g(P).meta({
|
|
340
|
+
title: "Boolean field",
|
|
341
|
+
description: "A true-or-false input."
|
|
342
|
+
}), Le = e.boolean(), I = e.literal("checkbox-list"), Re = _(I).meta({
|
|
343
|
+
title: "Checkbox list field",
|
|
344
|
+
description: "A list of checkboxes allowing multiple options to be selected."
|
|
345
|
+
}), ze = e.array(e.string()), L = e.literal("date"), Be = g(L).meta({
|
|
346
|
+
title: "Date field",
|
|
347
|
+
description: "An input for a date value."
|
|
348
|
+
}), Ve = e.string().nullable(), R = e.literal("multi-select"), He = e.object({
|
|
184
349
|
..._(R).shape,
|
|
185
|
-
placeholder: e.string().optional()
|
|
350
|
+
placeholder: e.string().optional().meta({
|
|
351
|
+
title: "Placeholder",
|
|
352
|
+
description: "Hint displayed when the field has no value."
|
|
353
|
+
})
|
|
354
|
+
}).meta({
|
|
355
|
+
title: "Multi-select field",
|
|
356
|
+
description: "A selection input allowing multiple options to be selected."
|
|
186
357
|
}), Ue = e.array(e.string()), z = e.literal("multi-string"), We = e.object({
|
|
187
358
|
...g(z).shape,
|
|
188
|
-
minimum_length: e.number().optional()
|
|
189
|
-
|
|
190
|
-
|
|
359
|
+
minimum_length: e.number().optional().meta({
|
|
360
|
+
title: "Minimum entries",
|
|
361
|
+
description: "Minimum number of strings allowed in the list."
|
|
362
|
+
}),
|
|
363
|
+
maximum_length: e.number().optional().meta({
|
|
364
|
+
title: "Maximum entries",
|
|
365
|
+
description: "Maximum number of strings allowed in the list."
|
|
366
|
+
}),
|
|
367
|
+
placeholder: e.string().optional().meta({
|
|
368
|
+
title: "Placeholder",
|
|
369
|
+
description: "Hint displayed when the field has no value."
|
|
370
|
+
})
|
|
371
|
+
}).meta({
|
|
372
|
+
title: "Multi-string field",
|
|
373
|
+
description: "An input for a list of strings, with optional limits on the number of entries."
|
|
191
374
|
}), Ge = e.array(e.string()), B = e.literal("number"), Ke = e.object({
|
|
192
375
|
...g(B).shape,
|
|
193
|
-
minimum: e.number().optional()
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
376
|
+
minimum: e.number().optional().meta({
|
|
377
|
+
title: "Minimum value",
|
|
378
|
+
description: "Lower bound configured for the numeric input."
|
|
379
|
+
}),
|
|
380
|
+
maximum: e.number().optional().meta({
|
|
381
|
+
title: "Maximum value",
|
|
382
|
+
description: "Upper bound configured for the numeric input."
|
|
383
|
+
}),
|
|
384
|
+
integers: e.boolean().optional().meta({
|
|
385
|
+
title: "Integers only",
|
|
386
|
+
description: "Whether the input should allow only whole numbers."
|
|
387
|
+
}),
|
|
388
|
+
placeholder: e.string().optional().meta({
|
|
389
|
+
title: "Placeholder",
|
|
390
|
+
description: "Hint displayed when the field has no value."
|
|
391
|
+
})
|
|
392
|
+
}).meta({
|
|
393
|
+
title: "Number field",
|
|
394
|
+
description: "A numeric input with optional bounds and an integer-only setting."
|
|
197
395
|
}), qe = e.number().nullable(), Je = e.literal([
|
|
198
396
|
"alpha",
|
|
199
397
|
"numeric",
|
|
200
398
|
"alphanumeric",
|
|
201
399
|
"none"
|
|
202
|
-
])
|
|
400
|
+
]).meta({
|
|
401
|
+
title: "Code validation mode",
|
|
402
|
+
description: "Allowed characters: alpha for letters, numeric for digits, alphanumeric for letters and digits, or none for no character restriction."
|
|
403
|
+
}), V = e.literal("otp"), Ye = e.object({
|
|
203
404
|
...g(V).shape,
|
|
204
|
-
length: e.number()
|
|
405
|
+
length: e.number().meta({
|
|
406
|
+
title: "Code length",
|
|
407
|
+
description: "Number of characters in the code."
|
|
408
|
+
}),
|
|
205
409
|
validationType: Je
|
|
206
|
-
})
|
|
410
|
+
}).meta({
|
|
411
|
+
title: "One-time password field",
|
|
412
|
+
description: "A code input with a configured length and character validation mode."
|
|
413
|
+
}), Xe = e.string(), H = e.literal("radio"), Ze = _(H).meta({
|
|
414
|
+
title: "Radio field",
|
|
415
|
+
description: "A group of radio options allowing one option to be selected."
|
|
416
|
+
}), Qe = e.string().nullable(), U = e.literal("rating"), $e = e.object({
|
|
207
417
|
...g(U).shape,
|
|
208
|
-
maxRating: e.number()
|
|
209
|
-
|
|
418
|
+
maxRating: e.number().meta({
|
|
419
|
+
title: "Maximum rating",
|
|
420
|
+
description: "Highest rating available in the input."
|
|
421
|
+
})
|
|
422
|
+
}).meta({
|
|
423
|
+
title: "Rating field",
|
|
424
|
+
description: "A rating input with a configured maximum rating."
|
|
425
|
+
}), et = e.number().nullable(), W = e.literal("qr"), tt = g(W).meta({
|
|
426
|
+
title: "QR scan field",
|
|
427
|
+
description: "An input for a value read from a QR code."
|
|
428
|
+
}), nt = e.string(), G = e.literal("select"), rt = e.object({
|
|
210
429
|
..._(G).shape,
|
|
211
|
-
placeholder: e.string().optional()
|
|
212
|
-
|
|
430
|
+
placeholder: e.string().optional().meta({
|
|
431
|
+
title: "Placeholder",
|
|
432
|
+
description: "Hint displayed when the field has no value."
|
|
433
|
+
})
|
|
434
|
+
}).meta({
|
|
435
|
+
title: "Select field",
|
|
436
|
+
description: "A selection input allowing one option to be selected."
|
|
437
|
+
}), it = e.string().nullable(), K = e.literal("string"), at = v(K).meta({
|
|
438
|
+
title: "String field",
|
|
439
|
+
description: "A single-line text input with optional character limits and a placeholder."
|
|
440
|
+
}), ot = e.string(), q = e.literal("text"), st = v(q).meta({
|
|
441
|
+
title: "Text field",
|
|
442
|
+
description: "A multiline text input with optional character limits and a placeholder."
|
|
443
|
+
}), ct = e.string(), J = e.literal("time"), lt = g(J).meta({
|
|
444
|
+
title: "Time field",
|
|
445
|
+
description: "An input for a time value with a UTC offset."
|
|
446
|
+
}), ut = s.nullable(), Y = e.literal("upload"), dt = e.object({
|
|
213
447
|
...g(Y).shape,
|
|
214
|
-
extensions: e.array(e.string()).optional()
|
|
215
|
-
|
|
216
|
-
|
|
448
|
+
extensions: e.array(e.string()).optional().meta({
|
|
449
|
+
title: "Allowed extensions",
|
|
450
|
+
description: "File extensions accepted by the upload input."
|
|
451
|
+
}),
|
|
452
|
+
maximum_size: e.number().optional().meta({
|
|
453
|
+
title: "Maximum file size",
|
|
454
|
+
description: "Configured size limit for uploaded files."
|
|
455
|
+
}),
|
|
456
|
+
maximum_files: e.number().optional().meta({
|
|
457
|
+
title: "Maximum files",
|
|
458
|
+
description: "Maximum number of files allowed in the upload input."
|
|
459
|
+
})
|
|
460
|
+
}).meta({
|
|
461
|
+
title: "Upload field",
|
|
462
|
+
description: "A file upload input with optional extension, size, and file-count limits."
|
|
217
463
|
}), ft = e.tuple([]), X = e.literal("url"), pt = e.object({
|
|
218
464
|
...g(X).shape,
|
|
219
|
-
placeholder: e.string().optional()
|
|
465
|
+
placeholder: e.string().optional().meta({
|
|
466
|
+
title: "Placeholder",
|
|
467
|
+
description: "Hint displayed when the field has no value."
|
|
468
|
+
})
|
|
469
|
+
}).meta({
|
|
470
|
+
title: "URL field",
|
|
471
|
+
description: "An input for a URL string with an optional placeholder."
|
|
220
472
|
}), mt = e.string().nullable(), ht = e.union([
|
|
221
473
|
P,
|
|
222
474
|
I,
|
|
@@ -253,7 +505,10 @@ var t = (t, n, r) => e.object({
|
|
|
253
505
|
lt,
|
|
254
506
|
dt,
|
|
255
507
|
pt
|
|
256
|
-
])
|
|
508
|
+
]).meta({
|
|
509
|
+
title: "Field",
|
|
510
|
+
description: "Configuration for an input field, selected by its type discriminator."
|
|
511
|
+
}), gt = e.union([
|
|
257
512
|
Le,
|
|
258
513
|
ze,
|
|
259
514
|
Ve,
|
|
@@ -271,12 +526,36 @@ var t = (t, n, r) => e.object({
|
|
|
271
526
|
ut,
|
|
272
527
|
ft,
|
|
273
528
|
mt
|
|
274
|
-
]), _t = e.record(e.string(), gt), Q = e.literal("section"), vt = e.record(e.string(), e.array(Ie))
|
|
529
|
+
]), _t = e.record(e.string(), gt), Q = e.literal("section"), vt = e.record(e.string(), e.array(Ie)).meta({
|
|
530
|
+
title: "Section conditions",
|
|
531
|
+
description: "Conditions stored on the source section for target sections that depend on it. Each key is the identifier of another section (the target section), and each value is a list of conditions based on fields contained in the source section."
|
|
532
|
+
}), $ = e.object({
|
|
275
533
|
...h(Q).shape,
|
|
276
|
-
label: e.string().nullable()
|
|
277
|
-
|
|
534
|
+
label: e.string().nullable().meta({
|
|
535
|
+
title: "Section label",
|
|
536
|
+
description: "Display label for the section, or null for an unlabeled section."
|
|
537
|
+
}),
|
|
538
|
+
description: e.string().nullable().optional().meta({
|
|
539
|
+
title: "Section description",
|
|
540
|
+
description: "Optional help text for the section; may be null."
|
|
541
|
+
}),
|
|
278
542
|
conditions: vt,
|
|
279
|
-
fields: e.array(Z)
|
|
280
|
-
|
|
543
|
+
fields: e.array(Z).meta({
|
|
544
|
+
title: "Fields",
|
|
545
|
+
description: "Fields in this section, in display order."
|
|
546
|
+
})
|
|
547
|
+
}).meta({
|
|
548
|
+
title: "Section",
|
|
549
|
+
description: "A labeled group of fields with optional help text and associated conditions."
|
|
550
|
+
}), yt = e.union([ht, Q]).meta({
|
|
551
|
+
title: "Element type",
|
|
552
|
+
description: "Supported field and section types."
|
|
553
|
+
}), bt = e.discriminatedUnion("type", [$, Z]).meta({
|
|
554
|
+
title: "Element",
|
|
555
|
+
description: "A field or section, selected by its type discriminator."
|
|
556
|
+
}), xt = e.array($).meta({
|
|
557
|
+
title: "Field schema",
|
|
558
|
+
description: "An ordered collection of sections defining a form, its fields, and its conditions."
|
|
559
|
+
});
|
|
281
560
|
//#endregion
|
|
282
561
|
export { t as BaseJSONConditionSchema, h as BaseJSONFieldElementSchema, g as BaseJSONFieldSchema, _ as BaseJSONOptionsFieldSchema, v as BaseJSONStringFieldSchema, r as JSONBooleanConditionModifierSchema, ee as JSONBooleanConditionSchema, n as JSONBooleanConditionTypeSchema, F as JSONBooleanFieldSchema, P as JSONBooleanFieldTypeSchema, Le as JSONBooleanFieldValueSchema, te as JSONCheckboxListConditionModifierSchema, ne as JSONCheckboxListConditionSchema, i as JSONCheckboxListConditionTypeSchema, Re as JSONCheckboxListFieldSchema, I as JSONCheckboxListFieldTypeSchema, ze as JSONCheckboxListFieldValueSchema, Ie as JSONConditionSchema, Fe as JSONConditionTypeSchema, ce as JSONDateConditionModifierSchema, le as JSONDateConditionSchema, c as JSONDateConditionTypeSchema, Be as JSONDateFieldSchema, L as JSONDateFieldTypeSchema, Ve as JSONDateFieldValueSchema, se as JSONDateRangeSchema, bt as JSONFieldElementSchema, yt as JSONFieldElementTypeSchema, Z as JSONFieldSchema, xt as JSONFieldSchemaSchema, vt as JSONFieldSectionConditionsSchema, $ as JSONFieldSectionSchema, Q as JSONFieldSectionTypeSchema, ht as JSONFieldTypeSchema, gt as JSONFieldValueSchema, _t as JSONFieldValuesSchema, ue as JSONMultiSelectConditionModifierSchema, de as JSONMultiSelectConditionSchema, l as JSONMultiSelectConditionTypeSchema, He as JSONMultiSelectFieldSchema, R as JSONMultiSelectFieldTypeSchema, Ue as JSONMultiSelectFieldValueSchema, d as JSONMultiStringConditionModifierSchema, f as JSONMultiStringConditionSchema, u as JSONMultiStringConditionTypeSchema, We as JSONMultiStringFieldSchema, z as JSONMultiStringFieldTypeSchema, Ge as JSONMultiStringFieldValueSchema, fe as JSONNumberConditionModifierSchema, pe as JSONNumberConditionSchema, p as JSONNumberConditionTypeSchema, Ke as JSONNumberFieldSchema, B as JSONNumberFieldTypeSchema, qe as JSONNumberFieldValueSchema, me as JSONOTPConditionModifierSchema, he as JSONOTPConditionSchema, m as JSONOTPConditionTypeSchema, Ye as JSONOTPFieldSchema, V as JSONOTPFieldTypeSchema, Xe as JSONOTPFieldValueSchema, x as JSONPassFailConditionTypeSchema, ve as JSONPassFailFieldConditionModifierSchema, ye as JSONPassFailFieldConditionSchema, ge as JSONPassFailFieldSchema, b as JSONPassFailFieldTypeSchema, _e as JSONPassFailFieldValueSchema, be as JSONRadioConditionModifierSchema, xe as JSONRadioConditionSchema, S as JSONRadioConditionTypeSchema, Ze as JSONRadioFieldSchema, H as JSONRadioFieldTypeSchema, Qe as JSONRadioFieldValueSchema, Se as JSONRatingConditionModifierSchema, Ce as JSONRatingConditionSchema, C as JSONRatingConditionTypeSchema, $e as JSONRatingFieldSchema, U as JSONRatingFieldTypeSchema, et as JSONRatingFieldValueSchema, we as JSONScanConditionModifierSchema, T as JSONScanConditionSchema, w as JSONScanConditionTypeSchema, tt as JSONScanFieldSchema, W as JSONScanFieldTypeSchema, nt as JSONScanFieldValueSchema, D as JSONSelectConditionModifierSchema, O as JSONSelectConditionSchema, E as JSONSelectConditionTypeSchema, rt as JSONSelectFieldSchema, G as JSONSelectFieldTypeSchema, it as JSONSelectFieldValueSchema, Te as JSONStringConditionModifierSchema, Ee as JSONStringConditionSchema, k as JSONStringConditionTypeSchema, at as JSONStringFieldSchema, K as JSONStringFieldTypeSchema, ot as JSONStringFieldValueSchema, De as JSONTextConditionModifierSchema, Oe as JSONTextConditionSchema, A as JSONTextConditionTypeSchema, st as JSONTextFieldSchema, q as JSONTextFieldTypeSchema, ct as JSONTextFieldValueSchema, ke as JSONTimeConditionModifierSchema, Ae as JSONTimeConditionSchema, j as JSONTimeConditionTypeSchema, lt as JSONTimeFieldSchema, J as JSONTimeFieldTypeSchema, ut as JSONTimeFieldValueSchema, Ne as JSONURLConditionModifierSchema, Pe as JSONURLConditionSchema, N as JSONURLConditionTypeSchema, pt as JSONURLFieldSchema, X as JSONURLFieldTypeSchema, mt as JSONURLFieldValueSchema, je as JSONUploadConditionModifierSchema, Me as JSONUploadConditionSchema, M as JSONUploadConditionTypeSchema, dt as JSONUploadFieldSchema, Y as JSONUploadFieldTypeSchema, ft as JSONUploadFieldValueSchema, a as NumberRangeSchema, Je as OTPFieldValidationTypeSchema, y as PassFailFieldStatusSchema, re as SelectFieldOptionSchema, oe as TimeRangeSchema, s as TimeSchema, ae as UTCOffsetSchema, ie as UTCOffsetSignSchema, o as UTCOffsetTimeSchema };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adrekic/zod-fieldsjson",
|
|
3
|
-
"version": "0.0.1
|
|
3
|
+
"version": "0.0.1",
|
|
4
4
|
"license": "UNLICENSED",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist"
|
|
@@ -23,15 +23,16 @@
|
|
|
23
23
|
"dev": "vite",
|
|
24
24
|
"preview": "vite preview",
|
|
25
25
|
"build": "vite build",
|
|
26
|
-
"type-check": "tsc --noEmit",
|
|
26
|
+
"type-check": "tsc --noEmit -p tsconfig.lib.json && tsc --noEmit -p tsconfig.node.json",
|
|
27
27
|
"lint": "oxlint --deny-warnings",
|
|
28
28
|
"lint:fix": "yarn lint --fix",
|
|
29
29
|
"format": "oxfmt",
|
|
30
30
|
"format:check": "yarn format --check",
|
|
31
|
-
"test": "vitest --typecheck --config ./vitest.config.ts"
|
|
31
|
+
"test": "vitest --typecheck --config ./vitest.config.ts",
|
|
32
|
+
"generate-schema": "npx tsx scripts/generate-json-field-schema.ts"
|
|
32
33
|
},
|
|
33
34
|
"devDependencies": {
|
|
34
|
-
"@adrekic/fieldsjson": "0.0.2
|
|
35
|
+
"@adrekic/fieldsjson": "^0.0.2",
|
|
35
36
|
"@types/node": "24.1.0",
|
|
36
37
|
"oxfmt": "0.61.0",
|
|
37
38
|
"oxlint": "1.76.0",
|