functional-models 3.9.5 → 3.11.0
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/cjs/errors.cjs +38 -0
- package/cjs/errors.cjs.map +7 -0
- package/cjs/index.cjs +2426 -0
- package/cjs/index.cjs.map +7 -0
- package/cjs/lib.cjs +431 -0
- package/cjs/lib.cjs.map +7 -0
- package/cjs/models.cjs +571 -0
- package/cjs/models.cjs.map +7 -0
- package/cjs/orm/index.cjs +1765 -0
- package/cjs/orm/index.cjs.map +7 -0
- package/cjs/orm/internal-libs.cjs +136 -0
- package/cjs/orm/internal-libs.cjs.map +7 -0
- package/cjs/orm/libs.cjs +88 -0
- package/cjs/orm/libs.cjs.map +7 -0
- package/cjs/orm/models.cjs +1027 -0
- package/cjs/orm/models.cjs.map +7 -0
- package/cjs/orm/properties.cjs +989 -0
- package/cjs/orm/properties.cjs.map +7 -0
- package/cjs/orm/query.cjs +376 -0
- package/cjs/orm/query.cjs.map +7 -0
- package/cjs/orm/types.cjs +59 -0
- package/cjs/orm/types.cjs.map +7 -0
- package/cjs/orm/validation.cjs +301 -0
- package/cjs/orm/validation.cjs.map +7 -0
- package/cjs/properties.cjs +998 -0
- package/cjs/properties.cjs.map +7 -0
- package/cjs/serialization.cjs +75 -0
- package/cjs/serialization.cjs.map +7 -0
- package/cjs/types.cjs +65 -0
- package/cjs/types.cjs.map +7 -0
- package/cjs/utils.cjs +187 -0
- package/cjs/utils.cjs.map +7 -0
- package/cjs/validation.cjs +431 -0
- package/cjs/validation.cjs.map +7 -0
- package/errors.js +3 -4
- package/errors.js.map +1 -1
- package/index.d.ts +13 -13
- package/index.js +13 -52
- package/index.js.map +1 -1
- package/lib.d.ts +5 -5
- package/lib.js +45 -65
- package/lib.js.map +1 -1
- package/models.d.ts +1 -1
- package/models.js +22 -30
- package/models.js.map +1 -1
- package/orm/index.d.ts +9 -9
- package/orm/index.js +9 -48
- package/orm/index.js.map +1 -1
- package/orm/internal-libs.js +7 -11
- package/orm/internal-libs.js.map +1 -1
- package/orm/libs.d.ts +1 -1
- package/orm/libs.js +8 -16
- package/orm/libs.js.map +1 -1
- package/orm/models.d.ts +2 -2
- package/orm/models.js +20 -26
- package/orm/models.js.map +1 -1
- package/orm/properties.d.ts +28 -28
- package/orm/properties.js +28 -36
- package/orm/properties.js.map +1 -1
- package/orm/query.d.ts +1 -1
- package/orm/query.js +31 -52
- package/orm/query.js.map +1 -1
- package/orm/types.d.ts +2 -2
- package/orm/types.js +7 -10
- package/orm/types.js.map +1 -1
- package/orm/validation.d.ts +2 -2
- package/orm/validation.js +5 -13
- package/orm/validation.js.map +1 -1
- package/package.json +50 -65
- package/properties.d.ts +133 -133
- package/properties.js +66 -94
- package/properties.js.map +1 -1
- package/serialization.d.ts +1 -1
- package/serialization.js +3 -9
- package/serialization.js.map +1 -1
- package/types.d.ts +6 -1
- package/types.js +4 -6
- package/types.js.map +1 -1
- package/utils.d.ts +2 -1
- package/utils.js +8 -23
- package/utils.js.map +1 -1
- package/validation.d.ts +1 -1
- package/validation.js +19 -50
- package/validation.js.map +1 -1
package/properties.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ZodType } from 'zod';
|
|
2
|
-
import { ModelReferenceType, ModelInstance, ModelType, PropertyInstance, DataValue, PropertyConfig, ValueGetter, MaybeFunction, Arrayable, PropertyValidator, ModelReferencePropertyInstance, DataDescription, JsonAble, CalculateDenormalization, PropertyType, DateValueType, PrimitiveValueType } from './types';
|
|
2
|
+
import { ModelReferenceType, ModelInstance, ModelType, PropertyInstance, DataValue, PropertyConfig, ValueGetter, MaybeFunction, Arrayable, PropertyValidator, ModelReferencePropertyInstance, DataDescription, JsonAble, CalculateDenormalization, PropertyType, DateValueType, PrimitiveValueType, CanBeNullableType } from './types.js';
|
|
3
3
|
/**
|
|
4
4
|
* The base function that creates a fully loaded instance of a property. All standard issue properties use this function.
|
|
5
5
|
* @param propertyType - The property's value type.
|
|
@@ -36,21 +36,21 @@ type DatePropertyConfig<T extends Arrayable<DataValue>> = {
|
|
|
36
36
|
* @param config - A configuration that enables overriding of date formatting
|
|
37
37
|
* @param additionalMetadata
|
|
38
38
|
*/
|
|
39
|
-
export declare const DateProperty: (config?: DatePropertyConfig<
|
|
39
|
+
export declare const DateProperty: <T extends CanBeNullableType<DateValueType> = DateValueType>(config?: DatePropertyConfig<T>, additionalMetadata?: {}) => Readonly<{
|
|
40
40
|
getConfig: () => object;
|
|
41
|
-
getChoices: () => readonly import("./types").ChoiceTypes[];
|
|
42
|
-
getDefaultValue: () =>
|
|
43
|
-
getConstantValue: () =>
|
|
41
|
+
getChoices: () => readonly import("./types.js").ChoiceTypes[];
|
|
42
|
+
getDefaultValue: () => T | undefined;
|
|
43
|
+
getConstantValue: () => T | undefined;
|
|
44
44
|
getPropertyType: () => PropertyType | string;
|
|
45
|
-
createGetter: (value:
|
|
45
|
+
createGetter: (value: T, modelData: Readonly<{
|
|
46
46
|
[s: string]: any;
|
|
47
47
|
}>, modelInstance: ModelInstance<Readonly<{
|
|
48
48
|
[s: string]: any;
|
|
49
|
-
}>, object, object>) => ValueGetter<
|
|
49
|
+
}>, object, object>) => ValueGetter<T, Readonly<{
|
|
50
50
|
[s: string]: any;
|
|
51
51
|
}>, object, object>;
|
|
52
|
-
getZod: () => ZodType<
|
|
53
|
-
getValidator: (valueGetter: ValueGetter<
|
|
52
|
+
getZod: () => ZodType<T, unknown, import("zod/v4/core").$ZodTypeInternals<T, unknown>>;
|
|
53
|
+
getValidator: (valueGetter: ValueGetter<T, Readonly<{
|
|
54
54
|
[s: string]: any;
|
|
55
55
|
}>, object, object>) => PropertyValidator<Readonly<{
|
|
56
56
|
[s: string]: any;
|
|
@@ -61,21 +61,21 @@ export declare const DateProperty: (config?: DatePropertyConfig<DateValueType>,
|
|
|
61
61
|
* @param config - A configuration that enables overriding of date and time formatting
|
|
62
62
|
* @param additionalMetadata
|
|
63
63
|
*/
|
|
64
|
-
export declare const DatetimeProperty: (config?: DatePropertyConfig<
|
|
64
|
+
export declare const DatetimeProperty: <T extends CanBeNullableType<DateValueType> = DateValueType>(config?: DatePropertyConfig<T>, additionalMetadata?: {}) => Readonly<{
|
|
65
65
|
getConfig: () => object;
|
|
66
|
-
getChoices: () => readonly import("./types").ChoiceTypes[];
|
|
67
|
-
getDefaultValue: () =>
|
|
68
|
-
getConstantValue: () =>
|
|
66
|
+
getChoices: () => readonly import("./types.js").ChoiceTypes[];
|
|
67
|
+
getDefaultValue: () => T | undefined;
|
|
68
|
+
getConstantValue: () => T | undefined;
|
|
69
69
|
getPropertyType: () => PropertyType | string;
|
|
70
|
-
createGetter: (value:
|
|
70
|
+
createGetter: (value: T, modelData: Readonly<{
|
|
71
71
|
[s: string]: any;
|
|
72
72
|
}>, modelInstance: ModelInstance<Readonly<{
|
|
73
73
|
[s: string]: any;
|
|
74
|
-
}>, object, object>) => ValueGetter<
|
|
74
|
+
}>, object, object>) => ValueGetter<T, Readonly<{
|
|
75
75
|
[s: string]: any;
|
|
76
76
|
}>, object, object>;
|
|
77
|
-
getZod: () => ZodType<
|
|
78
|
-
getValidator: (valueGetter: ValueGetter<
|
|
77
|
+
getZod: () => ZodType<T, unknown, import("zod/v4/core").$ZodTypeInternals<T, unknown>>;
|
|
78
|
+
getValidator: (valueGetter: ValueGetter<T, Readonly<{
|
|
79
79
|
[s: string]: any;
|
|
80
80
|
}>, object, object>) => PropertyValidator<Readonly<{
|
|
81
81
|
[s: string]: any;
|
|
@@ -86,9 +86,9 @@ export declare const DatetimeProperty: (config?: DatePropertyConfig<DateValueTyp
|
|
|
86
86
|
* @param config
|
|
87
87
|
* @param additionalMetadata
|
|
88
88
|
*/
|
|
89
|
-
export declare const ArrayProperty: <T extends DataValue>(config?: {}, additionalMetadata?: {}) => Readonly<{
|
|
89
|
+
export declare const ArrayProperty: <T extends CanBeNullableType<DataValue> = DataValue>(config?: {}, additionalMetadata?: {}) => Readonly<{
|
|
90
90
|
getConfig: () => object;
|
|
91
|
-
getChoices: () => readonly import("./types").ChoiceTypes[];
|
|
91
|
+
getChoices: () => readonly import("./types.js").ChoiceTypes[];
|
|
92
92
|
getDefaultValue: () => readonly T[] | undefined;
|
|
93
93
|
getConstantValue: () => readonly T[] | undefined;
|
|
94
94
|
getPropertyType: () => PropertyType | string;
|
|
@@ -114,7 +114,7 @@ export declare const ArrayProperty: <T extends DataValue>(config?: {}, additiona
|
|
|
114
114
|
*/
|
|
115
115
|
export declare const SingleTypeArrayProperty: <TValue extends Omit<PrimitiveValueType, "object">>(valueType: TValue, config?: {}, additionalMetadata?: {}) => Readonly<{
|
|
116
116
|
getConfig: () => object;
|
|
117
|
-
getChoices: () => readonly import("./types").ChoiceTypes[];
|
|
117
|
+
getChoices: () => readonly import("./types.js").ChoiceTypes[];
|
|
118
118
|
getDefaultValue: () => readonly TValue[] | undefined;
|
|
119
119
|
getConstantValue: () => readonly TValue[] | undefined;
|
|
120
120
|
getPropertyType: () => PropertyType | string;
|
|
@@ -137,9 +137,9 @@ export declare const SingleTypeArrayProperty: <TValue extends Omit<PrimitiveValu
|
|
|
137
137
|
* @param config
|
|
138
138
|
* @param additionalMetadata
|
|
139
139
|
*/
|
|
140
|
-
export declare const ObjectProperty: <TObject extends Readonly<Record<string, JsonAble>>>(config?: {}, additionalMetadata?: {}) => Readonly<{
|
|
140
|
+
export declare const ObjectProperty: <TObject extends CanBeNullableType<Readonly<Record<string, JsonAble>>> = Readonly<Record<string, JsonAble>>>(config?: {}, additionalMetadata?: {}) => Readonly<{
|
|
141
141
|
getConfig: () => object;
|
|
142
|
-
getChoices: () => readonly import("./types").ChoiceTypes[];
|
|
142
|
+
getChoices: () => readonly import("./types.js").ChoiceTypes[];
|
|
143
143
|
getDefaultValue: () => TObject | undefined;
|
|
144
144
|
getConstantValue: () => TObject | undefined;
|
|
145
145
|
getPropertyType: () => PropertyType | string;
|
|
@@ -162,21 +162,21 @@ export declare const ObjectProperty: <TObject extends Readonly<Record<string, Js
|
|
|
162
162
|
* @param config - Additional Configurations
|
|
163
163
|
* @param additionalMetadata - Additional Metadata
|
|
164
164
|
*/
|
|
165
|
-
export declare const TextProperty: (config?: PropertyConfig<
|
|
165
|
+
export declare const TextProperty: <T extends CanBeNullableType<string> = string>(config?: PropertyConfig<T>, additionalMetadata?: {}) => Readonly<{
|
|
166
166
|
getConfig: () => object;
|
|
167
|
-
getChoices: () => readonly import("./types").ChoiceTypes[];
|
|
168
|
-
getDefaultValue: () =>
|
|
169
|
-
getConstantValue: () =>
|
|
167
|
+
getChoices: () => readonly import("./types.js").ChoiceTypes[];
|
|
168
|
+
getDefaultValue: () => T | undefined;
|
|
169
|
+
getConstantValue: () => T | undefined;
|
|
170
170
|
getPropertyType: () => PropertyType | string;
|
|
171
|
-
createGetter: (value:
|
|
171
|
+
createGetter: (value: T, modelData: Readonly<{
|
|
172
172
|
[s: string]: any;
|
|
173
173
|
}>, modelInstance: ModelInstance<Readonly<{
|
|
174
174
|
[s: string]: any;
|
|
175
|
-
}>, object, object>) => ValueGetter<
|
|
175
|
+
}>, object, object>) => ValueGetter<T, Readonly<{
|
|
176
176
|
[s: string]: any;
|
|
177
177
|
}>, object, object>;
|
|
178
|
-
getZod: () => ZodType<
|
|
179
|
-
getValidator: (valueGetter: ValueGetter<
|
|
178
|
+
getZod: () => ZodType<T, unknown, import("zod/v4/core").$ZodTypeInternals<T, unknown>>;
|
|
179
|
+
getValidator: (valueGetter: ValueGetter<T, Readonly<{
|
|
180
180
|
[s: string]: any;
|
|
181
181
|
}>, object, object>) => PropertyValidator<Readonly<{
|
|
182
182
|
[s: string]: any;
|
|
@@ -187,21 +187,21 @@ export declare const TextProperty: (config?: PropertyConfig<string>, additionalM
|
|
|
187
187
|
* @param config - Additional configurations
|
|
188
188
|
* @param additionalMetadata - Additional metadata
|
|
189
189
|
*/
|
|
190
|
-
export declare const BigTextProperty: (config?: PropertyConfig<
|
|
190
|
+
export declare const BigTextProperty: <T extends CanBeNullableType<string> = string>(config?: PropertyConfig<T>, additionalMetadata?: {}) => Readonly<{
|
|
191
191
|
getConfig: () => object;
|
|
192
|
-
getChoices: () => readonly import("./types").ChoiceTypes[];
|
|
193
|
-
getDefaultValue: () =>
|
|
194
|
-
getConstantValue: () =>
|
|
192
|
+
getChoices: () => readonly import("./types.js").ChoiceTypes[];
|
|
193
|
+
getDefaultValue: () => T | undefined;
|
|
194
|
+
getConstantValue: () => T | undefined;
|
|
195
195
|
getPropertyType: () => PropertyType | string;
|
|
196
|
-
createGetter: (value:
|
|
196
|
+
createGetter: (value: T, modelData: Readonly<{
|
|
197
197
|
[s: string]: any;
|
|
198
198
|
}>, modelInstance: ModelInstance<Readonly<{
|
|
199
199
|
[s: string]: any;
|
|
200
|
-
}>, object, object>) => ValueGetter<
|
|
200
|
+
}>, object, object>) => ValueGetter<T, Readonly<{
|
|
201
201
|
[s: string]: any;
|
|
202
202
|
}>, object, object>;
|
|
203
|
-
getZod: () => ZodType<
|
|
204
|
-
getValidator: (valueGetter: ValueGetter<
|
|
203
|
+
getZod: () => ZodType<T, unknown, import("zod/v4/core").$ZodTypeInternals<T, unknown>>;
|
|
204
|
+
getValidator: (valueGetter: ValueGetter<T, Readonly<{
|
|
205
205
|
[s: string]: any;
|
|
206
206
|
}>, object, object>) => PropertyValidator<Readonly<{
|
|
207
207
|
[s: string]: any;
|
|
@@ -212,21 +212,21 @@ export declare const BigTextProperty: (config?: PropertyConfig<string>, addition
|
|
|
212
212
|
* @param config
|
|
213
213
|
* @param additionalMetadata
|
|
214
214
|
*/
|
|
215
|
-
export declare const IntegerProperty: (config?: PropertyConfig<
|
|
215
|
+
export declare const IntegerProperty: <T extends CanBeNullableType<number> = number>(config?: PropertyConfig<T>, additionalMetadata?: {}) => Readonly<{
|
|
216
216
|
getConfig: () => object;
|
|
217
|
-
getChoices: () => readonly import("./types").ChoiceTypes[];
|
|
218
|
-
getDefaultValue: () =>
|
|
219
|
-
getConstantValue: () =>
|
|
217
|
+
getChoices: () => readonly import("./types.js").ChoiceTypes[];
|
|
218
|
+
getDefaultValue: () => T | undefined;
|
|
219
|
+
getConstantValue: () => T | undefined;
|
|
220
220
|
getPropertyType: () => PropertyType | string;
|
|
221
|
-
createGetter: (value:
|
|
221
|
+
createGetter: (value: T, modelData: Readonly<{
|
|
222
222
|
[s: string]: any;
|
|
223
223
|
}>, modelInstance: ModelInstance<Readonly<{
|
|
224
224
|
[s: string]: any;
|
|
225
|
-
}>, object, object>) => ValueGetter<
|
|
225
|
+
}>, object, object>) => ValueGetter<T, Readonly<{
|
|
226
226
|
[s: string]: any;
|
|
227
227
|
}>, object, object>;
|
|
228
|
-
getZod: () => ZodType<
|
|
229
|
-
getValidator: (valueGetter: ValueGetter<
|
|
228
|
+
getZod: () => ZodType<T, unknown, import("zod/v4/core").$ZodTypeInternals<T, unknown>>;
|
|
229
|
+
getValidator: (valueGetter: ValueGetter<T, Readonly<{
|
|
230
230
|
[s: string]: any;
|
|
231
231
|
}>, object, object>) => PropertyValidator<Readonly<{
|
|
232
232
|
[s: string]: any;
|
|
@@ -238,21 +238,21 @@ export declare const IntegerProperty: (config?: PropertyConfig<number>, addition
|
|
|
238
238
|
* @param config
|
|
239
239
|
* @param additionalMetadata
|
|
240
240
|
*/
|
|
241
|
-
export declare const YearProperty: (config?: PropertyConfig<
|
|
241
|
+
export declare const YearProperty: <T extends CanBeNullableType<number> = number>(config?: PropertyConfig<T>, additionalMetadata?: {}) => Readonly<{
|
|
242
242
|
getConfig: () => object;
|
|
243
|
-
getChoices: () => readonly import("./types").ChoiceTypes[];
|
|
244
|
-
getDefaultValue: () =>
|
|
245
|
-
getConstantValue: () =>
|
|
243
|
+
getChoices: () => readonly import("./types.js").ChoiceTypes[];
|
|
244
|
+
getDefaultValue: () => T | undefined;
|
|
245
|
+
getConstantValue: () => T | undefined;
|
|
246
246
|
getPropertyType: () => PropertyType | string;
|
|
247
|
-
createGetter: (value:
|
|
247
|
+
createGetter: (value: T, modelData: Readonly<{
|
|
248
248
|
[s: string]: any;
|
|
249
249
|
}>, modelInstance: ModelInstance<Readonly<{
|
|
250
250
|
[s: string]: any;
|
|
251
|
-
}>, object, object>) => ValueGetter<
|
|
251
|
+
}>, object, object>) => ValueGetter<T, Readonly<{
|
|
252
252
|
[s: string]: any;
|
|
253
253
|
}>, object, object>;
|
|
254
|
-
getZod: () => ZodType<
|
|
255
|
-
getValidator: (valueGetter: ValueGetter<
|
|
254
|
+
getZod: () => ZodType<T, unknown, import("zod/v4/core").$ZodTypeInternals<T, unknown>>;
|
|
255
|
+
getValidator: (valueGetter: ValueGetter<T, Readonly<{
|
|
256
256
|
[s: string]: any;
|
|
257
257
|
}>, object, object>) => PropertyValidator<Readonly<{
|
|
258
258
|
[s: string]: any;
|
|
@@ -263,21 +263,21 @@ export declare const YearProperty: (config?: PropertyConfig<number>, additionalM
|
|
|
263
263
|
* @param config
|
|
264
264
|
* @param additionalMetadata
|
|
265
265
|
*/
|
|
266
|
-
export declare const NumberProperty: (config?: PropertyConfig<
|
|
266
|
+
export declare const NumberProperty: <T extends CanBeNullableType<number> = number>(config?: PropertyConfig<T>, additionalMetadata?: {}) => Readonly<{
|
|
267
267
|
getConfig: () => object;
|
|
268
|
-
getChoices: () => readonly import("./types").ChoiceTypes[];
|
|
269
|
-
getDefaultValue: () =>
|
|
270
|
-
getConstantValue: () =>
|
|
268
|
+
getChoices: () => readonly import("./types.js").ChoiceTypes[];
|
|
269
|
+
getDefaultValue: () => T | undefined;
|
|
270
|
+
getConstantValue: () => T | undefined;
|
|
271
271
|
getPropertyType: () => PropertyType | string;
|
|
272
|
-
createGetter: (value:
|
|
272
|
+
createGetter: (value: T, modelData: Readonly<{
|
|
273
273
|
[s: string]: any;
|
|
274
274
|
}>, modelInstance: ModelInstance<Readonly<{
|
|
275
275
|
[s: string]: any;
|
|
276
|
-
}>, object, object>) => ValueGetter<
|
|
276
|
+
}>, object, object>) => ValueGetter<T, Readonly<{
|
|
277
277
|
[s: string]: any;
|
|
278
278
|
}>, object, object>;
|
|
279
|
-
getZod: () => ZodType<
|
|
280
|
-
getValidator: (valueGetter: ValueGetter<
|
|
279
|
+
getZod: () => ZodType<T, unknown, import("zod/v4/core").$ZodTypeInternals<T, unknown>>;
|
|
280
|
+
getValidator: (valueGetter: ValueGetter<T, Readonly<{
|
|
281
281
|
[s: string]: any;
|
|
282
282
|
}>, object, object>) => PropertyValidator<Readonly<{
|
|
283
283
|
[s: string]: any;
|
|
@@ -290,9 +290,9 @@ export declare const NumberProperty: (config?: PropertyConfig<number>, additiona
|
|
|
290
290
|
* @param config
|
|
291
291
|
* @param additionalMetadata
|
|
292
292
|
*/
|
|
293
|
-
export declare const ConstantValueProperty: <TDataValue extends Arrayable<DataValue>>(valueType: PropertyType | string, value: TDataValue, config?: PropertyConfig<TDataValue>, additionalMetadata?: {}) => Readonly<{
|
|
293
|
+
export declare const ConstantValueProperty: <TDataValue extends CanBeNullableType<Arrayable<DataValue>> = Arrayable<DataValue>>(valueType: PropertyType | string, value: TDataValue, config?: PropertyConfig<TDataValue>, additionalMetadata?: {}) => Readonly<{
|
|
294
294
|
getConfig: () => object;
|
|
295
|
-
getChoices: () => readonly import("./types").ChoiceTypes[];
|
|
295
|
+
getChoices: () => readonly import("./types.js").ChoiceTypes[];
|
|
296
296
|
getDefaultValue: () => TDataValue | undefined;
|
|
297
297
|
getConstantValue: () => TDataValue | undefined;
|
|
298
298
|
getPropertyType: () => PropertyType | string;
|
|
@@ -315,21 +315,21 @@ export declare const ConstantValueProperty: <TDataValue extends Arrayable<DataVa
|
|
|
315
315
|
* @param config
|
|
316
316
|
* @param additionalMetadata
|
|
317
317
|
*/
|
|
318
|
-
export declare const EmailProperty: (config?: PropertyConfig<
|
|
318
|
+
export declare const EmailProperty: <T extends CanBeNullableType<string> = string>(config?: PropertyConfig<T>, additionalMetadata?: {}) => Readonly<{
|
|
319
319
|
getConfig: () => object;
|
|
320
|
-
getChoices: () => readonly import("./types").ChoiceTypes[];
|
|
321
|
-
getDefaultValue: () =>
|
|
322
|
-
getConstantValue: () =>
|
|
320
|
+
getChoices: () => readonly import("./types.js").ChoiceTypes[];
|
|
321
|
+
getDefaultValue: () => T | undefined;
|
|
322
|
+
getConstantValue: () => T | undefined;
|
|
323
323
|
getPropertyType: () => PropertyType | string;
|
|
324
|
-
createGetter: (value:
|
|
324
|
+
createGetter: (value: T, modelData: Readonly<{
|
|
325
325
|
[s: string]: any;
|
|
326
326
|
}>, modelInstance: ModelInstance<Readonly<{
|
|
327
327
|
[s: string]: any;
|
|
328
|
-
}>, object, object>) => ValueGetter<
|
|
328
|
+
}>, object, object>) => ValueGetter<T, Readonly<{
|
|
329
329
|
[s: string]: any;
|
|
330
330
|
}>, object, object>;
|
|
331
|
-
getZod: () => ZodType<
|
|
332
|
-
getValidator: (valueGetter: ValueGetter<
|
|
331
|
+
getZod: () => ZodType<T, unknown, import("zod/v4/core").$ZodTypeInternals<T, unknown>>;
|
|
332
|
+
getValidator: (valueGetter: ValueGetter<T, Readonly<{
|
|
333
333
|
[s: string]: any;
|
|
334
334
|
}>, object, object>) => PropertyValidator<Readonly<{
|
|
335
335
|
[s: string]: any;
|
|
@@ -340,21 +340,21 @@ export declare const EmailProperty: (config?: PropertyConfig<string>, additional
|
|
|
340
340
|
* @param config
|
|
341
341
|
* @param additionalMetadata
|
|
342
342
|
*/
|
|
343
|
-
export declare const BooleanProperty: (config?: PropertyConfig<
|
|
343
|
+
export declare const BooleanProperty: <T extends CanBeNullableType<boolean> = boolean>(config?: PropertyConfig<T>, additionalMetadata?: {}) => Readonly<{
|
|
344
344
|
getConfig: () => object;
|
|
345
|
-
getChoices: () => readonly import("./types").ChoiceTypes[];
|
|
346
|
-
getDefaultValue: () =>
|
|
347
|
-
getConstantValue: () =>
|
|
345
|
+
getChoices: () => readonly import("./types.js").ChoiceTypes[];
|
|
346
|
+
getDefaultValue: () => T | undefined;
|
|
347
|
+
getConstantValue: () => T | undefined;
|
|
348
348
|
getPropertyType: () => PropertyType | string;
|
|
349
|
-
createGetter: (value:
|
|
349
|
+
createGetter: (value: T, modelData: Readonly<{
|
|
350
350
|
[s: string]: any;
|
|
351
351
|
}>, modelInstance: ModelInstance<Readonly<{
|
|
352
352
|
[s: string]: any;
|
|
353
|
-
}>, object, object>) => ValueGetter<
|
|
353
|
+
}>, object, object>) => ValueGetter<T, Readonly<{
|
|
354
354
|
[s: string]: any;
|
|
355
355
|
}>, object, object>;
|
|
356
|
-
getZod: () => ZodType<
|
|
357
|
-
getValidator: (valueGetter: ValueGetter<
|
|
356
|
+
getZod: () => ZodType<T, unknown, import("zod/v4/core").$ZodTypeInternals<T, unknown>>;
|
|
357
|
+
getValidator: (valueGetter: ValueGetter<T, Readonly<{
|
|
358
358
|
[s: string]: any;
|
|
359
359
|
}>, object, object>) => PropertyValidator<Readonly<{
|
|
360
360
|
[s: string]: any;
|
|
@@ -366,21 +366,21 @@ export declare const BooleanProperty: (config?: PropertyConfig<boolean>, additio
|
|
|
366
366
|
* @param config - Additional configurations. NOTE: required is ALWAYS true.
|
|
367
367
|
* @param additionalMetadata - Any additional metadata.
|
|
368
368
|
*/
|
|
369
|
-
export declare const PrimaryKeyUuidProperty: (config?: PropertyConfig<
|
|
369
|
+
export declare const PrimaryKeyUuidProperty: <T extends CanBeNullableType<string> = string>(config?: PropertyConfig<T>, additionalMetadata?: {}) => Readonly<{
|
|
370
370
|
getConfig: () => object;
|
|
371
|
-
getChoices: () => readonly import("./types").ChoiceTypes[];
|
|
372
|
-
getDefaultValue: () =>
|
|
373
|
-
getConstantValue: () =>
|
|
371
|
+
getChoices: () => readonly import("./types.js").ChoiceTypes[];
|
|
372
|
+
getDefaultValue: () => T | undefined;
|
|
373
|
+
getConstantValue: () => T | undefined;
|
|
374
374
|
getPropertyType: () => PropertyType | string;
|
|
375
|
-
createGetter: (value:
|
|
375
|
+
createGetter: (value: T, modelData: Readonly<{
|
|
376
376
|
[s: string]: any;
|
|
377
377
|
}>, modelInstance: ModelInstance<Readonly<{
|
|
378
378
|
[s: string]: any;
|
|
379
|
-
}>, object, object>) => ValueGetter<
|
|
379
|
+
}>, object, object>) => ValueGetter<T, Readonly<{
|
|
380
380
|
[s: string]: any;
|
|
381
381
|
}>, object, object>;
|
|
382
|
-
getZod: () => ZodType<
|
|
383
|
-
getValidator: (valueGetter: ValueGetter<
|
|
382
|
+
getZod: () => ZodType<T, unknown, import("zod/v4/core").$ZodTypeInternals<T, unknown>>;
|
|
383
|
+
getValidator: (valueGetter: ValueGetter<T, Readonly<{
|
|
384
384
|
[s: string]: any;
|
|
385
385
|
}>, object, object>) => PropertyValidator<Readonly<{
|
|
386
386
|
[s: string]: any;
|
|
@@ -393,21 +393,21 @@ export declare const PrimaryKeyUuidProperty: (config?: PropertyConfig<string>, a
|
|
|
393
393
|
* @param config - Additional configurations.
|
|
394
394
|
* @param additionalMetadata - Any additional metadata.
|
|
395
395
|
*/
|
|
396
|
-
export declare const UuidProperty: (config?: PropertyConfig<
|
|
396
|
+
export declare const UuidProperty: <T extends CanBeNullableType<string> = string>(config?: PropertyConfig<T>, additionalMetadata?: {}) => Readonly<{
|
|
397
397
|
getConfig: () => object;
|
|
398
|
-
getChoices: () => readonly import("./types").ChoiceTypes[];
|
|
399
|
-
getDefaultValue: () =>
|
|
400
|
-
getConstantValue: () =>
|
|
398
|
+
getChoices: () => readonly import("./types.js").ChoiceTypes[];
|
|
399
|
+
getDefaultValue: () => T | undefined;
|
|
400
|
+
getConstantValue: () => T | undefined;
|
|
401
401
|
getPropertyType: () => PropertyType | string;
|
|
402
|
-
createGetter: (value:
|
|
402
|
+
createGetter: (value: T, modelData: Readonly<{
|
|
403
403
|
[s: string]: any;
|
|
404
404
|
}>, modelInstance: ModelInstance<Readonly<{
|
|
405
405
|
[s: string]: any;
|
|
406
|
-
}>, object, object>) => ValueGetter<
|
|
406
|
+
}>, object, object>) => ValueGetter<T, Readonly<{
|
|
407
407
|
[s: string]: any;
|
|
408
408
|
}>, object, object>;
|
|
409
|
-
getZod: () => ZodType<
|
|
410
|
-
getValidator: (valueGetter: ValueGetter<
|
|
409
|
+
getZod: () => ZodType<T, unknown, import("zod/v4/core").$ZodTypeInternals<T, unknown>>;
|
|
410
|
+
getValidator: (valueGetter: ValueGetter<T, Readonly<{
|
|
411
411
|
[s: string]: any;
|
|
412
412
|
}>, object, object>) => PropertyValidator<Readonly<{
|
|
413
413
|
[s: string]: any;
|
|
@@ -452,9 +452,9 @@ export declare const AdvancedModelReferenceProperty: <T extends DataDescription,
|
|
|
452
452
|
* @param config - A Config
|
|
453
453
|
* @param additionalMetadata _ Any additional metadata.
|
|
454
454
|
*/
|
|
455
|
-
export declare const DenormalizedProperty: <TValue extends DataValue
|
|
455
|
+
export declare const DenormalizedProperty: <TValue extends CanBeNullableType<DataValue>, T extends DataDescription>(propertyType: string, calculate: CalculateDenormalization<TValue, T>, config?: PropertyConfig<TValue>, additionalMetadata?: {}) => Readonly<{
|
|
456
456
|
getConfig: () => object;
|
|
457
|
-
getChoices: () => readonly import("./types").ChoiceTypes[];
|
|
457
|
+
getChoices: () => readonly import("./types.js").ChoiceTypes[];
|
|
458
458
|
getDefaultValue: () => TValue | undefined;
|
|
459
459
|
getConstantValue: () => TValue | undefined;
|
|
460
460
|
getPropertyType: () => PropertyType | string;
|
|
@@ -480,27 +480,27 @@ export declare const DenormalizedProperty: <TValue extends DataValue, T extends
|
|
|
480
480
|
* @param config - Any configs
|
|
481
481
|
* @param additionalMetadata - Optional Metadata
|
|
482
482
|
*/
|
|
483
|
-
export declare const DenormalizedTextProperty: <T extends DataDescription>(calculate: CalculateDenormalization<
|
|
483
|
+
export declare const DenormalizedTextProperty: <T extends DataDescription, TData extends CanBeNullableType<string> = string>(calculate: CalculateDenormalization<TData, T>, config?: PropertyConfig<TData>, additionalMetadata?: {}) => Readonly<{
|
|
484
484
|
getConfig: () => object;
|
|
485
|
-
getChoices: () => readonly import("./types").ChoiceTypes[];
|
|
486
|
-
getDefaultValue: () =>
|
|
487
|
-
getConstantValue: () =>
|
|
485
|
+
getChoices: () => readonly import("./types.js").ChoiceTypes[];
|
|
486
|
+
getDefaultValue: () => TData | undefined;
|
|
487
|
+
getConstantValue: () => TData | undefined;
|
|
488
488
|
getPropertyType: () => PropertyType | string;
|
|
489
|
-
createGetter: (value:
|
|
489
|
+
createGetter: (value: TData, modelData: Readonly<{
|
|
490
490
|
[s: string]: any;
|
|
491
491
|
}>, modelInstance: ModelInstance<Readonly<{
|
|
492
492
|
[s: string]: any;
|
|
493
|
-
}>, object, object>) => ValueGetter<
|
|
493
|
+
}>, object, object>) => ValueGetter<TData, Readonly<{
|
|
494
494
|
[s: string]: any;
|
|
495
495
|
}>, object, object>;
|
|
496
|
-
getZod: () => ZodType<
|
|
497
|
-
getValidator: (valueGetter: ValueGetter<
|
|
496
|
+
getZod: () => ZodType<TData, unknown, import("zod/v4/core").$ZodTypeInternals<TData, unknown>>;
|
|
497
|
+
getValidator: (valueGetter: ValueGetter<TData, Readonly<{
|
|
498
498
|
[s: string]: any;
|
|
499
499
|
}>, object, object>) => PropertyValidator<Readonly<{
|
|
500
500
|
[s: string]: any;
|
|
501
501
|
}>>;
|
|
502
502
|
}> & {
|
|
503
|
-
calculate: CalculateDenormalization<
|
|
503
|
+
calculate: CalculateDenormalization<TData, T>;
|
|
504
504
|
};
|
|
505
505
|
/**
|
|
506
506
|
* A Denormalized Property that is for numbers.
|
|
@@ -508,27 +508,27 @@ export declare const DenormalizedTextProperty: <T extends DataDescription>(calcu
|
|
|
508
508
|
* @param config - Any configs
|
|
509
509
|
* @param additionalMetadata - Optional Metadata
|
|
510
510
|
*/
|
|
511
|
-
export declare const DenormalizedNumberProperty: <T extends DataDescription>(calculate: CalculateDenormalization<
|
|
511
|
+
export declare const DenormalizedNumberProperty: <T extends DataDescription, TData extends CanBeNullableType<number> = number>(calculate: CalculateDenormalization<TData, T>, config?: PropertyConfig<TData>, additionalMetadata?: {}) => Readonly<{
|
|
512
512
|
getConfig: () => object;
|
|
513
|
-
getChoices: () => readonly import("./types").ChoiceTypes[];
|
|
514
|
-
getDefaultValue: () =>
|
|
515
|
-
getConstantValue: () =>
|
|
513
|
+
getChoices: () => readonly import("./types.js").ChoiceTypes[];
|
|
514
|
+
getDefaultValue: () => TData | undefined;
|
|
515
|
+
getConstantValue: () => TData | undefined;
|
|
516
516
|
getPropertyType: () => PropertyType | string;
|
|
517
|
-
createGetter: (value:
|
|
517
|
+
createGetter: (value: TData, modelData: Readonly<{
|
|
518
518
|
[s: string]: any;
|
|
519
519
|
}>, modelInstance: ModelInstance<Readonly<{
|
|
520
520
|
[s: string]: any;
|
|
521
|
-
}>, object, object>) => ValueGetter<
|
|
521
|
+
}>, object, object>) => ValueGetter<TData, Readonly<{
|
|
522
522
|
[s: string]: any;
|
|
523
523
|
}>, object, object>;
|
|
524
|
-
getZod: () => ZodType<
|
|
525
|
-
getValidator: (valueGetter: ValueGetter<
|
|
524
|
+
getZod: () => ZodType<TData, unknown, import("zod/v4/core").$ZodTypeInternals<TData, unknown>>;
|
|
525
|
+
getValidator: (valueGetter: ValueGetter<TData, Readonly<{
|
|
526
526
|
[s: string]: any;
|
|
527
527
|
}>, object, object>) => PropertyValidator<Readonly<{
|
|
528
528
|
[s: string]: any;
|
|
529
529
|
}>>;
|
|
530
530
|
}> & {
|
|
531
|
-
calculate: CalculateDenormalization<
|
|
531
|
+
calculate: CalculateDenormalization<TData, T>;
|
|
532
532
|
};
|
|
533
533
|
/**
|
|
534
534
|
* A Denormalized Property that is for integers.
|
|
@@ -536,27 +536,27 @@ export declare const DenormalizedNumberProperty: <T extends DataDescription>(cal
|
|
|
536
536
|
* @param config - Any configs
|
|
537
537
|
* @param additionalMetadata - Optional Metadata
|
|
538
538
|
*/
|
|
539
|
-
export declare const DenormalizedIntegerProperty: <T extends DataDescription>(calculate: CalculateDenormalization<
|
|
539
|
+
export declare const DenormalizedIntegerProperty: <T extends DataDescription, TData extends CanBeNullableType<number> = number>(calculate: CalculateDenormalization<TData, T>, config?: PropertyConfig<TData>, additionalMetadata?: {}) => Readonly<{
|
|
540
540
|
getConfig: () => object;
|
|
541
|
-
getChoices: () => readonly import("./types").ChoiceTypes[];
|
|
542
|
-
getDefaultValue: () =>
|
|
543
|
-
getConstantValue: () =>
|
|
541
|
+
getChoices: () => readonly import("./types.js").ChoiceTypes[];
|
|
542
|
+
getDefaultValue: () => TData | undefined;
|
|
543
|
+
getConstantValue: () => TData | undefined;
|
|
544
544
|
getPropertyType: () => PropertyType | string;
|
|
545
|
-
createGetter: (value:
|
|
545
|
+
createGetter: (value: TData, modelData: Readonly<{
|
|
546
546
|
[s: string]: any;
|
|
547
547
|
}>, modelInstance: ModelInstance<Readonly<{
|
|
548
548
|
[s: string]: any;
|
|
549
|
-
}>, object, object>) => ValueGetter<
|
|
549
|
+
}>, object, object>) => ValueGetter<TData, Readonly<{
|
|
550
550
|
[s: string]: any;
|
|
551
551
|
}>, object, object>;
|
|
552
|
-
getZod: () => ZodType<
|
|
553
|
-
getValidator: (valueGetter: ValueGetter<
|
|
552
|
+
getZod: () => ZodType<TData, unknown, import("zod/v4/core").$ZodTypeInternals<TData, unknown>>;
|
|
553
|
+
getValidator: (valueGetter: ValueGetter<TData, Readonly<{
|
|
554
554
|
[s: string]: any;
|
|
555
555
|
}>, object, object>) => PropertyValidator<Readonly<{
|
|
556
556
|
[s: string]: any;
|
|
557
557
|
}>>;
|
|
558
558
|
}> & {
|
|
559
|
-
calculate: CalculateDenormalization<
|
|
559
|
+
calculate: CalculateDenormalization<TData, T>;
|
|
560
560
|
};
|
|
561
561
|
/**
|
|
562
562
|
* An id that is naturally formed by other properties within a model.
|
|
@@ -572,21 +572,21 @@ export declare const DenormalizedIntegerProperty: <T extends DataDescription>(ca
|
|
|
572
572
|
* @param config
|
|
573
573
|
* @param additionalMetadata
|
|
574
574
|
*/
|
|
575
|
-
export declare const NaturalIdProperty: (propertyKeys: readonly string[], joiner: string, config?: PropertyConfig<
|
|
575
|
+
export declare const NaturalIdProperty: <T extends CanBeNullableType<string> = string>(propertyKeys: readonly string[], joiner: string, config?: PropertyConfig<T>, additionalMetadata?: {}) => Readonly<{
|
|
576
576
|
getConfig: () => object;
|
|
577
|
-
getChoices: () => readonly import("./types").ChoiceTypes[];
|
|
578
|
-
getDefaultValue: () =>
|
|
579
|
-
getConstantValue: () =>
|
|
577
|
+
getChoices: () => readonly import("./types.js").ChoiceTypes[];
|
|
578
|
+
getDefaultValue: () => T | undefined;
|
|
579
|
+
getConstantValue: () => T | undefined;
|
|
580
580
|
getPropertyType: () => PropertyType | string;
|
|
581
|
-
createGetter: (value:
|
|
581
|
+
createGetter: (value: T, modelData: Readonly<{
|
|
582
582
|
[s: string]: any;
|
|
583
583
|
}>, modelInstance: ModelInstance<Readonly<{
|
|
584
584
|
[s: string]: any;
|
|
585
|
-
}>, object, object>) => ValueGetter<
|
|
585
|
+
}>, object, object>) => ValueGetter<T, Readonly<{
|
|
586
586
|
[s: string]: any;
|
|
587
587
|
}>, object, object>;
|
|
588
|
-
getZod: () => ZodType<
|
|
589
|
-
getValidator: (valueGetter: ValueGetter<
|
|
588
|
+
getZod: () => ZodType<T, unknown, import("zod/v4/core").$ZodTypeInternals<T, unknown>>;
|
|
589
|
+
getValidator: (valueGetter: ValueGetter<T, Readonly<{
|
|
590
590
|
[s: string]: any;
|
|
591
591
|
}>, object, object>) => PropertyValidator<Readonly<{
|
|
592
592
|
[s: string]: any;
|