@famgia/omnify-types 0.0.5 → 0.0.7
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.d.cts +6 -4
- package/dist/index.d.ts +6 -4
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* Built-in property types supported by omnify-schema.
|
|
8
8
|
* Custom types can be added via plugins.
|
|
9
9
|
*/
|
|
10
|
-
type BuiltInPropertyType = 'String' | 'Int' | 'BigInt' | 'Float' | 'Boolean' | 'Text' | 'LongText' | 'Date' | 'Time' | 'Timestamp' | 'Json' | 'Email' | 'Password' | 'File' | 'MultiFile' | 'Enum' | 'Select' | 'Lookup' | 'Association' | 'Polymorphic';
|
|
10
|
+
type BuiltInPropertyType = 'String' | 'Int' | 'BigInt' | 'Float' | 'Decimal' | 'Boolean' | 'Text' | 'LongText' | 'Date' | 'Time' | 'Timestamp' | 'Json' | 'Email' | 'Password' | 'File' | 'MultiFile' | 'Enum' | 'Select' | 'Lookup' | 'Association' | 'Polymorphic';
|
|
11
11
|
/**
|
|
12
12
|
* Property type - can be a built-in type or a custom plugin type (string).
|
|
13
13
|
*/
|
|
@@ -61,6 +61,8 @@ interface BasePropertyDefinition {
|
|
|
61
61
|
readonly unique?: boolean;
|
|
62
62
|
/** Field description/comment */
|
|
63
63
|
readonly description?: string;
|
|
64
|
+
/** Previous field name for rename migrations (remove after migration runs) */
|
|
65
|
+
readonly renamedFrom?: string;
|
|
64
66
|
}
|
|
65
67
|
/**
|
|
66
68
|
* String property with length constraint.
|
|
@@ -74,12 +76,12 @@ interface StringPropertyDefinition extends BasePropertyDefinition {
|
|
|
74
76
|
* Numeric property definition.
|
|
75
77
|
*/
|
|
76
78
|
interface NumericPropertyDefinition extends BasePropertyDefinition {
|
|
77
|
-
readonly type: 'Int' | 'BigInt' | 'Float';
|
|
79
|
+
readonly type: 'Int' | 'BigInt' | 'Float' | 'Decimal';
|
|
78
80
|
/** Whether the number is unsigned (positive only) */
|
|
79
81
|
readonly unsigned?: boolean;
|
|
80
|
-
/**
|
|
82
|
+
/** Total number of digits for Decimal (default: 8) */
|
|
81
83
|
readonly precision?: number;
|
|
82
|
-
/**
|
|
84
|
+
/** Number of decimal places for Decimal (default: 2) */
|
|
83
85
|
readonly scale?: number;
|
|
84
86
|
}
|
|
85
87
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* Built-in property types supported by omnify-schema.
|
|
8
8
|
* Custom types can be added via plugins.
|
|
9
9
|
*/
|
|
10
|
-
type BuiltInPropertyType = 'String' | 'Int' | 'BigInt' | 'Float' | 'Boolean' | 'Text' | 'LongText' | 'Date' | 'Time' | 'Timestamp' | 'Json' | 'Email' | 'Password' | 'File' | 'MultiFile' | 'Enum' | 'Select' | 'Lookup' | 'Association' | 'Polymorphic';
|
|
10
|
+
type BuiltInPropertyType = 'String' | 'Int' | 'BigInt' | 'Float' | 'Decimal' | 'Boolean' | 'Text' | 'LongText' | 'Date' | 'Time' | 'Timestamp' | 'Json' | 'Email' | 'Password' | 'File' | 'MultiFile' | 'Enum' | 'Select' | 'Lookup' | 'Association' | 'Polymorphic';
|
|
11
11
|
/**
|
|
12
12
|
* Property type - can be a built-in type or a custom plugin type (string).
|
|
13
13
|
*/
|
|
@@ -61,6 +61,8 @@ interface BasePropertyDefinition {
|
|
|
61
61
|
readonly unique?: boolean;
|
|
62
62
|
/** Field description/comment */
|
|
63
63
|
readonly description?: string;
|
|
64
|
+
/** Previous field name for rename migrations (remove after migration runs) */
|
|
65
|
+
readonly renamedFrom?: string;
|
|
64
66
|
}
|
|
65
67
|
/**
|
|
66
68
|
* String property with length constraint.
|
|
@@ -74,12 +76,12 @@ interface StringPropertyDefinition extends BasePropertyDefinition {
|
|
|
74
76
|
* Numeric property definition.
|
|
75
77
|
*/
|
|
76
78
|
interface NumericPropertyDefinition extends BasePropertyDefinition {
|
|
77
|
-
readonly type: 'Int' | 'BigInt' | 'Float';
|
|
79
|
+
readonly type: 'Int' | 'BigInt' | 'Float' | 'Decimal';
|
|
78
80
|
/** Whether the number is unsigned (positive only) */
|
|
79
81
|
readonly unsigned?: boolean;
|
|
80
|
-
/**
|
|
82
|
+
/** Total number of digits for Decimal (default: 8) */
|
|
81
83
|
readonly precision?: number;
|
|
82
|
-
/**
|
|
84
|
+
/** Number of decimal places for Decimal (default: 2) */
|
|
83
85
|
readonly scale?: number;
|
|
84
86
|
}
|
|
85
87
|
/**
|