@famgia/omnify-types 0.0.127 → 0.0.129
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 +20 -1
- package/dist/index.d.ts +20 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -522,8 +522,9 @@ interface SchemaOptions {
|
|
|
522
522
|
* - 'object': Regular schema that generates a database table
|
|
523
523
|
* - 'enum': Enum schema that generates enum types
|
|
524
524
|
* - 'partial': Partial schema that extends an existing schema
|
|
525
|
+
* - 'pivot': Pivot table schema for ManyToMany relationships (generates table + model)
|
|
525
526
|
*/
|
|
526
|
-
type SchemaKind = 'object' | 'enum' | 'partial';
|
|
527
|
+
type SchemaKind = 'object' | 'enum' | 'partial' | 'pivot';
|
|
527
528
|
/**
|
|
528
529
|
* Complete schema definition representing a database entity.
|
|
529
530
|
*/
|
|
@@ -537,6 +538,24 @@ interface SchemaDefinition {
|
|
|
537
538
|
* Target schema properties take priority over partial properties.
|
|
538
539
|
*/
|
|
539
540
|
readonly target?: string;
|
|
541
|
+
/**
|
|
542
|
+
* Priority for partial schema merging (1-100).
|
|
543
|
+
* Only used when kind is 'partial'.
|
|
544
|
+
* Lower numbers are merged first (higher priority).
|
|
545
|
+
* Default is 50. Use 1-49 for high priority, 51-100 for low priority.
|
|
546
|
+
*/
|
|
547
|
+
readonly priority?: number;
|
|
548
|
+
/**
|
|
549
|
+
* Source schemas for pivot tables.
|
|
550
|
+
* Only used when kind is 'pivot'.
|
|
551
|
+
* Defines the two schemas that this pivot table connects.
|
|
552
|
+
* @example
|
|
553
|
+
* ```yaml
|
|
554
|
+
* kind: pivot
|
|
555
|
+
* pivotFor: [User, Role] # Creates user_id and role_id columns
|
|
556
|
+
* ```
|
|
557
|
+
*/
|
|
558
|
+
readonly pivotFor?: readonly [string, string];
|
|
540
559
|
/** Human-readable display name (supports multi-language) */
|
|
541
560
|
readonly displayName?: LocalizedString;
|
|
542
561
|
/** Property to use as the title/label for records */
|
package/dist/index.d.ts
CHANGED
|
@@ -522,8 +522,9 @@ interface SchemaOptions {
|
|
|
522
522
|
* - 'object': Regular schema that generates a database table
|
|
523
523
|
* - 'enum': Enum schema that generates enum types
|
|
524
524
|
* - 'partial': Partial schema that extends an existing schema
|
|
525
|
+
* - 'pivot': Pivot table schema for ManyToMany relationships (generates table + model)
|
|
525
526
|
*/
|
|
526
|
-
type SchemaKind = 'object' | 'enum' | 'partial';
|
|
527
|
+
type SchemaKind = 'object' | 'enum' | 'partial' | 'pivot';
|
|
527
528
|
/**
|
|
528
529
|
* Complete schema definition representing a database entity.
|
|
529
530
|
*/
|
|
@@ -537,6 +538,24 @@ interface SchemaDefinition {
|
|
|
537
538
|
* Target schema properties take priority over partial properties.
|
|
538
539
|
*/
|
|
539
540
|
readonly target?: string;
|
|
541
|
+
/**
|
|
542
|
+
* Priority for partial schema merging (1-100).
|
|
543
|
+
* Only used when kind is 'partial'.
|
|
544
|
+
* Lower numbers are merged first (higher priority).
|
|
545
|
+
* Default is 50. Use 1-49 for high priority, 51-100 for low priority.
|
|
546
|
+
*/
|
|
547
|
+
readonly priority?: number;
|
|
548
|
+
/**
|
|
549
|
+
* Source schemas for pivot tables.
|
|
550
|
+
* Only used when kind is 'pivot'.
|
|
551
|
+
* Defines the two schemas that this pivot table connects.
|
|
552
|
+
* @example
|
|
553
|
+
* ```yaml
|
|
554
|
+
* kind: pivot
|
|
555
|
+
* pivotFor: [User, Role] # Creates user_id and role_id columns
|
|
556
|
+
* ```
|
|
557
|
+
*/
|
|
558
|
+
readonly pivotFor?: readonly [string, string];
|
|
540
559
|
/** Human-readable display name (supports multi-language) */
|
|
541
560
|
readonly displayName?: LocalizedString;
|
|
542
561
|
/** Property to use as the title/label for records */
|