skedyul 1.0.5 → 1.0.6
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/.build-stamp +1 -1
- package/dist/config/types/model.d.ts +9 -1
- package/dist/schemas.d.ts +70 -0
- package/dist/schemas.js +1 -0
- package/package.json +1 -1
package/dist/.build-stamp
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
1772514228755
|
|
@@ -32,6 +32,7 @@ export type FieldType = 'string' | 'long_string' | 'text' | 'number' | 'boolean'
|
|
|
32
32
|
export type OnDelete = 'none' | 'cascade' | 'restrict';
|
|
33
33
|
/**
|
|
34
34
|
* Inline field definition for constraints and options.
|
|
35
|
+
* @deprecated Use InlineFieldDefinition instead
|
|
35
36
|
*/
|
|
36
37
|
export interface FieldConstraints {
|
|
37
38
|
/** Limit number of selections for select fields */
|
|
@@ -51,6 +52,11 @@ export interface FieldConstraints {
|
|
|
51
52
|
/** Regex pattern for validation */
|
|
52
53
|
pattern?: string;
|
|
53
54
|
}
|
|
55
|
+
/**
|
|
56
|
+
* Inline field definition for options and validation constraints.
|
|
57
|
+
* This is the preferred name - aligns with Zod schema and skedyul-core.
|
|
58
|
+
*/
|
|
59
|
+
export type InlineFieldDefinition = FieldConstraints;
|
|
54
60
|
/**
|
|
55
61
|
* Field visibility settings in the UI.
|
|
56
62
|
*/
|
|
@@ -74,7 +80,9 @@ export interface FieldDefinition {
|
|
|
74
80
|
type?: FieldType;
|
|
75
81
|
/** Reference to a shared field definition by handle */
|
|
76
82
|
definitionHandle?: string;
|
|
77
|
-
/** Inline
|
|
83
|
+
/** Inline definition with options and constraints (preferred name) */
|
|
84
|
+
definition?: InlineFieldDefinition;
|
|
85
|
+
/** @deprecated Use 'definition' instead. Inline constraints and options */
|
|
78
86
|
constraints?: FieldConstraints;
|
|
79
87
|
/** Whether this field is required */
|
|
80
88
|
required?: boolean;
|
package/dist/schemas.d.ts
CHANGED
|
@@ -123,6 +123,20 @@ export declare const ModelFieldDefinitionSchema: z.ZodObject<{
|
|
|
123
123
|
relatedModel: z.ZodOptional<z.ZodString>;
|
|
124
124
|
pattern: z.ZodOptional<z.ZodString>;
|
|
125
125
|
}, z.core.$strip>>;
|
|
126
|
+
constraints: z.ZodOptional<z.ZodObject<{
|
|
127
|
+
limitChoices: z.ZodOptional<z.ZodNumber>;
|
|
128
|
+
options: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
129
|
+
label: z.ZodString;
|
|
130
|
+
value: z.ZodString;
|
|
131
|
+
color: z.ZodOptional<z.ZodString>;
|
|
132
|
+
}, z.core.$strip>>>;
|
|
133
|
+
minLength: z.ZodOptional<z.ZodNumber>;
|
|
134
|
+
maxLength: z.ZodOptional<z.ZodNumber>;
|
|
135
|
+
min: z.ZodOptional<z.ZodNumber>;
|
|
136
|
+
max: z.ZodOptional<z.ZodNumber>;
|
|
137
|
+
relatedModel: z.ZodOptional<z.ZodString>;
|
|
138
|
+
pattern: z.ZodOptional<z.ZodString>;
|
|
139
|
+
}, z.core.$strip>>;
|
|
126
140
|
required: z.ZodOptional<z.ZodBoolean>;
|
|
127
141
|
unique: z.ZodOptional<z.ZodBoolean>;
|
|
128
142
|
system: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -179,6 +193,20 @@ export declare const ModelDefinitionSchema: z.ZodObject<{
|
|
|
179
193
|
relatedModel: z.ZodOptional<z.ZodString>;
|
|
180
194
|
pattern: z.ZodOptional<z.ZodString>;
|
|
181
195
|
}, z.core.$strip>>;
|
|
196
|
+
constraints: z.ZodOptional<z.ZodObject<{
|
|
197
|
+
limitChoices: z.ZodOptional<z.ZodNumber>;
|
|
198
|
+
options: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
199
|
+
label: z.ZodString;
|
|
200
|
+
value: z.ZodString;
|
|
201
|
+
color: z.ZodOptional<z.ZodString>;
|
|
202
|
+
}, z.core.$strip>>>;
|
|
203
|
+
minLength: z.ZodOptional<z.ZodNumber>;
|
|
204
|
+
maxLength: z.ZodOptional<z.ZodNumber>;
|
|
205
|
+
min: z.ZodOptional<z.ZodNumber>;
|
|
206
|
+
max: z.ZodOptional<z.ZodNumber>;
|
|
207
|
+
relatedModel: z.ZodOptional<z.ZodString>;
|
|
208
|
+
pattern: z.ZodOptional<z.ZodString>;
|
|
209
|
+
}, z.core.$strip>>;
|
|
182
210
|
required: z.ZodOptional<z.ZodBoolean>;
|
|
183
211
|
unique: z.ZodOptional<z.ZodBoolean>;
|
|
184
212
|
system: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -2823,6 +2851,20 @@ export declare const InstallConfigSchema: z.ZodObject<{
|
|
|
2823
2851
|
relatedModel: z.ZodOptional<z.ZodString>;
|
|
2824
2852
|
pattern: z.ZodOptional<z.ZodString>;
|
|
2825
2853
|
}, z.core.$strip>>;
|
|
2854
|
+
constraints: z.ZodOptional<z.ZodObject<{
|
|
2855
|
+
limitChoices: z.ZodOptional<z.ZodNumber>;
|
|
2856
|
+
options: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2857
|
+
label: z.ZodString;
|
|
2858
|
+
value: z.ZodString;
|
|
2859
|
+
color: z.ZodOptional<z.ZodString>;
|
|
2860
|
+
}, z.core.$strip>>>;
|
|
2861
|
+
minLength: z.ZodOptional<z.ZodNumber>;
|
|
2862
|
+
maxLength: z.ZodOptional<z.ZodNumber>;
|
|
2863
|
+
min: z.ZodOptional<z.ZodNumber>;
|
|
2864
|
+
max: z.ZodOptional<z.ZodNumber>;
|
|
2865
|
+
relatedModel: z.ZodOptional<z.ZodString>;
|
|
2866
|
+
pattern: z.ZodOptional<z.ZodString>;
|
|
2867
|
+
}, z.core.$strip>>;
|
|
2826
2868
|
required: z.ZodOptional<z.ZodBoolean>;
|
|
2827
2869
|
unique: z.ZodOptional<z.ZodBoolean>;
|
|
2828
2870
|
system: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -2925,6 +2967,20 @@ export declare const ProvisionConfigSchema: z.ZodObject<{
|
|
|
2925
2967
|
relatedModel: z.ZodOptional<z.ZodString>;
|
|
2926
2968
|
pattern: z.ZodOptional<z.ZodString>;
|
|
2927
2969
|
}, z.core.$strip>>;
|
|
2970
|
+
constraints: z.ZodOptional<z.ZodObject<{
|
|
2971
|
+
limitChoices: z.ZodOptional<z.ZodNumber>;
|
|
2972
|
+
options: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2973
|
+
label: z.ZodString;
|
|
2974
|
+
value: z.ZodString;
|
|
2975
|
+
color: z.ZodOptional<z.ZodString>;
|
|
2976
|
+
}, z.core.$strip>>>;
|
|
2977
|
+
minLength: z.ZodOptional<z.ZodNumber>;
|
|
2978
|
+
maxLength: z.ZodOptional<z.ZodNumber>;
|
|
2979
|
+
min: z.ZodOptional<z.ZodNumber>;
|
|
2980
|
+
max: z.ZodOptional<z.ZodNumber>;
|
|
2981
|
+
relatedModel: z.ZodOptional<z.ZodString>;
|
|
2982
|
+
pattern: z.ZodOptional<z.ZodString>;
|
|
2983
|
+
}, z.core.$strip>>;
|
|
2928
2984
|
required: z.ZodOptional<z.ZodBoolean>;
|
|
2929
2985
|
unique: z.ZodOptional<z.ZodBoolean>;
|
|
2930
2986
|
system: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -3552,6 +3608,20 @@ export declare const SkedyulConfigSchema: z.ZodObject<{
|
|
|
3552
3608
|
relatedModel: z.ZodOptional<z.ZodString>;
|
|
3553
3609
|
pattern: z.ZodOptional<z.ZodString>;
|
|
3554
3610
|
}, z.core.$strip>>;
|
|
3611
|
+
constraints: z.ZodOptional<z.ZodObject<{
|
|
3612
|
+
limitChoices: z.ZodOptional<z.ZodNumber>;
|
|
3613
|
+
options: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
3614
|
+
label: z.ZodString;
|
|
3615
|
+
value: z.ZodString;
|
|
3616
|
+
color: z.ZodOptional<z.ZodString>;
|
|
3617
|
+
}, z.core.$strip>>>;
|
|
3618
|
+
minLength: z.ZodOptional<z.ZodNumber>;
|
|
3619
|
+
maxLength: z.ZodOptional<z.ZodNumber>;
|
|
3620
|
+
min: z.ZodOptional<z.ZodNumber>;
|
|
3621
|
+
max: z.ZodOptional<z.ZodNumber>;
|
|
3622
|
+
relatedModel: z.ZodOptional<z.ZodString>;
|
|
3623
|
+
pattern: z.ZodOptional<z.ZodString>;
|
|
3624
|
+
}, z.core.$strip>>;
|
|
3555
3625
|
required: z.ZodOptional<z.ZodBoolean>;
|
|
3556
3626
|
unique: z.ZodOptional<z.ZodBoolean>;
|
|
3557
3627
|
system: z.ZodOptional<z.ZodBoolean>;
|
package/dist/schemas.js
CHANGED
|
@@ -88,6 +88,7 @@ exports.ModelFieldDefinitionSchema = v4_1.z.object({
|
|
|
88
88
|
type: exports.FieldDataTypeSchema.optional(),
|
|
89
89
|
definitionHandle: v4_1.z.string().optional(),
|
|
90
90
|
definition: exports.InlineFieldDefinitionSchema.optional(),
|
|
91
|
+
constraints: exports.InlineFieldDefinitionSchema.optional(), // Legacy alias for definition
|
|
91
92
|
required: v4_1.z.boolean().optional(),
|
|
92
93
|
unique: v4_1.z.boolean().optional(),
|
|
93
94
|
system: v4_1.z.boolean().optional(),
|