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.
Files changed (84) hide show
  1. package/cjs/errors.cjs +38 -0
  2. package/cjs/errors.cjs.map +7 -0
  3. package/cjs/index.cjs +2426 -0
  4. package/cjs/index.cjs.map +7 -0
  5. package/cjs/lib.cjs +431 -0
  6. package/cjs/lib.cjs.map +7 -0
  7. package/cjs/models.cjs +571 -0
  8. package/cjs/models.cjs.map +7 -0
  9. package/cjs/orm/index.cjs +1765 -0
  10. package/cjs/orm/index.cjs.map +7 -0
  11. package/cjs/orm/internal-libs.cjs +136 -0
  12. package/cjs/orm/internal-libs.cjs.map +7 -0
  13. package/cjs/orm/libs.cjs +88 -0
  14. package/cjs/orm/libs.cjs.map +7 -0
  15. package/cjs/orm/models.cjs +1027 -0
  16. package/cjs/orm/models.cjs.map +7 -0
  17. package/cjs/orm/properties.cjs +989 -0
  18. package/cjs/orm/properties.cjs.map +7 -0
  19. package/cjs/orm/query.cjs +376 -0
  20. package/cjs/orm/query.cjs.map +7 -0
  21. package/cjs/orm/types.cjs +59 -0
  22. package/cjs/orm/types.cjs.map +7 -0
  23. package/cjs/orm/validation.cjs +301 -0
  24. package/cjs/orm/validation.cjs.map +7 -0
  25. package/cjs/properties.cjs +998 -0
  26. package/cjs/properties.cjs.map +7 -0
  27. package/cjs/serialization.cjs +75 -0
  28. package/cjs/serialization.cjs.map +7 -0
  29. package/cjs/types.cjs +65 -0
  30. package/cjs/types.cjs.map +7 -0
  31. package/cjs/utils.cjs +187 -0
  32. package/cjs/utils.cjs.map +7 -0
  33. package/cjs/validation.cjs +431 -0
  34. package/cjs/validation.cjs.map +7 -0
  35. package/errors.js +3 -4
  36. package/errors.js.map +1 -1
  37. package/index.d.ts +13 -13
  38. package/index.js +13 -52
  39. package/index.js.map +1 -1
  40. package/lib.d.ts +5 -5
  41. package/lib.js +45 -65
  42. package/lib.js.map +1 -1
  43. package/models.d.ts +1 -1
  44. package/models.js +22 -30
  45. package/models.js.map +1 -1
  46. package/orm/index.d.ts +9 -9
  47. package/orm/index.js +9 -48
  48. package/orm/index.js.map +1 -1
  49. package/orm/internal-libs.js +7 -11
  50. package/orm/internal-libs.js.map +1 -1
  51. package/orm/libs.d.ts +1 -1
  52. package/orm/libs.js +8 -16
  53. package/orm/libs.js.map +1 -1
  54. package/orm/models.d.ts +2 -2
  55. package/orm/models.js +20 -26
  56. package/orm/models.js.map +1 -1
  57. package/orm/properties.d.ts +28 -28
  58. package/orm/properties.js +28 -36
  59. package/orm/properties.js.map +1 -1
  60. package/orm/query.d.ts +1 -1
  61. package/orm/query.js +31 -52
  62. package/orm/query.js.map +1 -1
  63. package/orm/types.d.ts +2 -2
  64. package/orm/types.js +7 -10
  65. package/orm/types.js.map +1 -1
  66. package/orm/validation.d.ts +2 -2
  67. package/orm/validation.js +5 -13
  68. package/orm/validation.js.map +1 -1
  69. package/package.json +50 -65
  70. package/properties.d.ts +133 -133
  71. package/properties.js +66 -94
  72. package/properties.js.map +1 -1
  73. package/serialization.d.ts +1 -1
  74. package/serialization.js +3 -9
  75. package/serialization.js.map +1 -1
  76. package/types.d.ts +6 -1
  77. package/types.js +4 -6
  78. package/types.js.map +1 -1
  79. package/utils.d.ts +2 -1
  80. package/utils.js +8 -23
  81. package/utils.js.map +1 -1
  82. package/validation.d.ts +1 -1
  83. package/validation.js +19 -50
  84. 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<DateValueType>, additionalMetadata?: {}) => Readonly<{
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: () => DateValueType | undefined;
43
- getConstantValue: () => DateValueType | undefined;
41
+ getChoices: () => readonly import("./types.js").ChoiceTypes[];
42
+ getDefaultValue: () => T | undefined;
43
+ getConstantValue: () => T | undefined;
44
44
  getPropertyType: () => PropertyType | string;
45
- createGetter: (value: DateValueType, modelData: Readonly<{
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<DateValueType, Readonly<{
49
+ }>, object, object>) => ValueGetter<T, Readonly<{
50
50
  [s: string]: any;
51
51
  }>, object, object>;
52
- getZod: () => ZodType<DateValueType, unknown, import("zod/v4/core").$ZodTypeInternals<DateValueType, unknown>>;
53
- getValidator: (valueGetter: ValueGetter<DateValueType, Readonly<{
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<DateValueType>, additionalMetadata?: {}) => Readonly<{
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: () => DateValueType | undefined;
68
- getConstantValue: () => DateValueType | undefined;
66
+ getChoices: () => readonly import("./types.js").ChoiceTypes[];
67
+ getDefaultValue: () => T | undefined;
68
+ getConstantValue: () => T | undefined;
69
69
  getPropertyType: () => PropertyType | string;
70
- createGetter: (value: DateValueType, modelData: Readonly<{
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<DateValueType, Readonly<{
74
+ }>, object, object>) => ValueGetter<T, Readonly<{
75
75
  [s: string]: any;
76
76
  }>, object, object>;
77
- getZod: () => ZodType<DateValueType, unknown, import("zod/v4/core").$ZodTypeInternals<DateValueType, unknown>>;
78
- getValidator: (valueGetter: ValueGetter<DateValueType, Readonly<{
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<string>, additionalMetadata?: {}) => Readonly<{
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: () => string | undefined;
169
- getConstantValue: () => string | undefined;
167
+ getChoices: () => readonly import("./types.js").ChoiceTypes[];
168
+ getDefaultValue: () => T | undefined;
169
+ getConstantValue: () => T | undefined;
170
170
  getPropertyType: () => PropertyType | string;
171
- createGetter: (value: string, modelData: Readonly<{
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<string, Readonly<{
175
+ }>, object, object>) => ValueGetter<T, Readonly<{
176
176
  [s: string]: any;
177
177
  }>, object, object>;
178
- getZod: () => ZodType<string, unknown, import("zod/v4/core").$ZodTypeInternals<string, unknown>>;
179
- getValidator: (valueGetter: ValueGetter<string, Readonly<{
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<string>, additionalMetadata?: {}) => Readonly<{
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: () => string | undefined;
194
- getConstantValue: () => string | undefined;
192
+ getChoices: () => readonly import("./types.js").ChoiceTypes[];
193
+ getDefaultValue: () => T | undefined;
194
+ getConstantValue: () => T | undefined;
195
195
  getPropertyType: () => PropertyType | string;
196
- createGetter: (value: string, modelData: Readonly<{
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<string, Readonly<{
200
+ }>, object, object>) => ValueGetter<T, Readonly<{
201
201
  [s: string]: any;
202
202
  }>, object, object>;
203
- getZod: () => ZodType<string, unknown, import("zod/v4/core").$ZodTypeInternals<string, unknown>>;
204
- getValidator: (valueGetter: ValueGetter<string, Readonly<{
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<number>, additionalMetadata?: {}) => Readonly<{
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: () => number | undefined;
219
- getConstantValue: () => number | undefined;
217
+ getChoices: () => readonly import("./types.js").ChoiceTypes[];
218
+ getDefaultValue: () => T | undefined;
219
+ getConstantValue: () => T | undefined;
220
220
  getPropertyType: () => PropertyType | string;
221
- createGetter: (value: number, modelData: Readonly<{
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<number, Readonly<{
225
+ }>, object, object>) => ValueGetter<T, Readonly<{
226
226
  [s: string]: any;
227
227
  }>, object, object>;
228
- getZod: () => ZodType<number, unknown, import("zod/v4/core").$ZodTypeInternals<number, unknown>>;
229
- getValidator: (valueGetter: ValueGetter<number, Readonly<{
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<number>, additionalMetadata?: {}) => Readonly<{
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: () => number | undefined;
245
- getConstantValue: () => number | undefined;
243
+ getChoices: () => readonly import("./types.js").ChoiceTypes[];
244
+ getDefaultValue: () => T | undefined;
245
+ getConstantValue: () => T | undefined;
246
246
  getPropertyType: () => PropertyType | string;
247
- createGetter: (value: number, modelData: Readonly<{
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<number, Readonly<{
251
+ }>, object, object>) => ValueGetter<T, Readonly<{
252
252
  [s: string]: any;
253
253
  }>, object, object>;
254
- getZod: () => ZodType<number, unknown, import("zod/v4/core").$ZodTypeInternals<number, unknown>>;
255
- getValidator: (valueGetter: ValueGetter<number, Readonly<{
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<number>, additionalMetadata?: {}) => Readonly<{
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: () => number | undefined;
270
- getConstantValue: () => number | undefined;
268
+ getChoices: () => readonly import("./types.js").ChoiceTypes[];
269
+ getDefaultValue: () => T | undefined;
270
+ getConstantValue: () => T | undefined;
271
271
  getPropertyType: () => PropertyType | string;
272
- createGetter: (value: number, modelData: Readonly<{
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<number, Readonly<{
276
+ }>, object, object>) => ValueGetter<T, Readonly<{
277
277
  [s: string]: any;
278
278
  }>, object, object>;
279
- getZod: () => ZodType<number, unknown, import("zod/v4/core").$ZodTypeInternals<number, unknown>>;
280
- getValidator: (valueGetter: ValueGetter<number, Readonly<{
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<string>, additionalMetadata?: {}) => Readonly<{
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: () => string | undefined;
322
- getConstantValue: () => string | undefined;
320
+ getChoices: () => readonly import("./types.js").ChoiceTypes[];
321
+ getDefaultValue: () => T | undefined;
322
+ getConstantValue: () => T | undefined;
323
323
  getPropertyType: () => PropertyType | string;
324
- createGetter: (value: string, modelData: Readonly<{
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<string, Readonly<{
328
+ }>, object, object>) => ValueGetter<T, Readonly<{
329
329
  [s: string]: any;
330
330
  }>, object, object>;
331
- getZod: () => ZodType<string, unknown, import("zod/v4/core").$ZodTypeInternals<string, unknown>>;
332
- getValidator: (valueGetter: ValueGetter<string, Readonly<{
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<boolean>, additionalMetadata?: {}) => Readonly<{
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: () => boolean | undefined;
347
- getConstantValue: () => boolean | undefined;
345
+ getChoices: () => readonly import("./types.js").ChoiceTypes[];
346
+ getDefaultValue: () => T | undefined;
347
+ getConstantValue: () => T | undefined;
348
348
  getPropertyType: () => PropertyType | string;
349
- createGetter: (value: boolean, modelData: Readonly<{
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<boolean, Readonly<{
353
+ }>, object, object>) => ValueGetter<T, Readonly<{
354
354
  [s: string]: any;
355
355
  }>, object, object>;
356
- getZod: () => ZodType<boolean, unknown, import("zod/v4/core").$ZodTypeInternals<boolean, unknown>>;
357
- getValidator: (valueGetter: ValueGetter<boolean, Readonly<{
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<string>, additionalMetadata?: {}) => Readonly<{
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: () => string | undefined;
373
- getConstantValue: () => string | undefined;
371
+ getChoices: () => readonly import("./types.js").ChoiceTypes[];
372
+ getDefaultValue: () => T | undefined;
373
+ getConstantValue: () => T | undefined;
374
374
  getPropertyType: () => PropertyType | string;
375
- createGetter: (value: string, modelData: Readonly<{
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<string, Readonly<{
379
+ }>, object, object>) => ValueGetter<T, Readonly<{
380
380
  [s: string]: any;
381
381
  }>, object, object>;
382
- getZod: () => ZodType<string, unknown, import("zod/v4/core").$ZodTypeInternals<string, unknown>>;
383
- getValidator: (valueGetter: ValueGetter<string, Readonly<{
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<string>, additionalMetadata?: {}) => Readonly<{
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: () => string | undefined;
400
- getConstantValue: () => string | undefined;
398
+ getChoices: () => readonly import("./types.js").ChoiceTypes[];
399
+ getDefaultValue: () => T | undefined;
400
+ getConstantValue: () => T | undefined;
401
401
  getPropertyType: () => PropertyType | string;
402
- createGetter: (value: string, modelData: Readonly<{
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<string, Readonly<{
406
+ }>, object, object>) => ValueGetter<T, Readonly<{
407
407
  [s: string]: any;
408
408
  }>, object, object>;
409
- getZod: () => ZodType<string, unknown, import("zod/v4/core").$ZodTypeInternals<string, unknown>>;
410
- getValidator: (valueGetter: ValueGetter<string, Readonly<{
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, T extends DataDescription>(propertyType: string, calculate: CalculateDenormalization<TValue, T>, config?: PropertyConfig<TValue>, additionalMetadata?: {}) => Readonly<{
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<string, T>, config?: PropertyConfig<string>, additionalMetadata?: {}) => Readonly<{
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: () => string | undefined;
487
- getConstantValue: () => string | undefined;
485
+ getChoices: () => readonly import("./types.js").ChoiceTypes[];
486
+ getDefaultValue: () => TData | undefined;
487
+ getConstantValue: () => TData | undefined;
488
488
  getPropertyType: () => PropertyType | string;
489
- createGetter: (value: string, modelData: Readonly<{
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<string, Readonly<{
493
+ }>, object, object>) => ValueGetter<TData, Readonly<{
494
494
  [s: string]: any;
495
495
  }>, object, object>;
496
- getZod: () => ZodType<string, unknown, import("zod/v4/core").$ZodTypeInternals<string, unknown>>;
497
- getValidator: (valueGetter: ValueGetter<string, Readonly<{
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<string, T>;
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<number, T>, config?: PropertyConfig<number>, additionalMetadata?: {}) => Readonly<{
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: () => number | undefined;
515
- getConstantValue: () => number | undefined;
513
+ getChoices: () => readonly import("./types.js").ChoiceTypes[];
514
+ getDefaultValue: () => TData | undefined;
515
+ getConstantValue: () => TData | undefined;
516
516
  getPropertyType: () => PropertyType | string;
517
- createGetter: (value: number, modelData: Readonly<{
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<number, Readonly<{
521
+ }>, object, object>) => ValueGetter<TData, Readonly<{
522
522
  [s: string]: any;
523
523
  }>, object, object>;
524
- getZod: () => ZodType<number, unknown, import("zod/v4/core").$ZodTypeInternals<number, unknown>>;
525
- getValidator: (valueGetter: ValueGetter<number, Readonly<{
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<number, T>;
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<number, T>, config?: PropertyConfig<number>, additionalMetadata?: {}) => Readonly<{
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: () => number | undefined;
543
- getConstantValue: () => number | undefined;
541
+ getChoices: () => readonly import("./types.js").ChoiceTypes[];
542
+ getDefaultValue: () => TData | undefined;
543
+ getConstantValue: () => TData | undefined;
544
544
  getPropertyType: () => PropertyType | string;
545
- createGetter: (value: number, modelData: Readonly<{
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<number, Readonly<{
549
+ }>, object, object>) => ValueGetter<TData, Readonly<{
550
550
  [s: string]: any;
551
551
  }>, object, object>;
552
- getZod: () => ZodType<number, unknown, import("zod/v4/core").$ZodTypeInternals<number, unknown>>;
553
- getValidator: (valueGetter: ValueGetter<number, Readonly<{
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<number, T>;
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<string>, additionalMetadata?: {}) => Readonly<{
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: () => string | undefined;
579
- getConstantValue: () => string | undefined;
577
+ getChoices: () => readonly import("./types.js").ChoiceTypes[];
578
+ getDefaultValue: () => T | undefined;
579
+ getConstantValue: () => T | undefined;
580
580
  getPropertyType: () => PropertyType | string;
581
- createGetter: (value: string, modelData: Readonly<{
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<string, Readonly<{
585
+ }>, object, object>) => ValueGetter<T, Readonly<{
586
586
  [s: string]: any;
587
587
  }>, object, object>;
588
- getZod: () => ZodType<string, unknown, import("zod/v4/core").$ZodTypeInternals<string, unknown>>;
589
- getValidator: (valueGetter: ValueGetter<string, Readonly<{
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;