orchid-orm 1.55.0 → 1.55.1
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.ts +7 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs.map +1 -1
- package/dist/migrations.js +12 -12
- package/dist/migrations.js.map +1 -1
- package/dist/migrations.mjs +4 -4
- package/dist/migrations.mjs.map +1 -1
- package/package.json +5 -5
package/dist/index.d.ts
CHANGED
|
@@ -130,7 +130,13 @@ interface BelongsTo extends RelationThunkBase {
|
|
|
130
130
|
type: 'belongsTo';
|
|
131
131
|
options: BelongsToOptions;
|
|
132
132
|
}
|
|
133
|
-
|
|
133
|
+
interface BelongsToOptions<Columns extends ColumnsShapeBase = ColumnsShapeBase, Related extends TableClass = TableClass> {
|
|
134
|
+
required?: boolean;
|
|
135
|
+
columns: (keyof Columns)[];
|
|
136
|
+
references: (keyof InstanceType<Related>['columns']['shape'])[];
|
|
137
|
+
foreignKey?: boolean | TableData.References.Options;
|
|
138
|
+
on?: ColumnShapeInputPartial<InstanceType<Related>['columns']['shape']>;
|
|
139
|
+
}
|
|
134
140
|
type BelongsToFKey<Relation extends RelationThunkBase> = Relation['options'] extends RelationRefsOptions ? Relation['options']['columns'][number] : never;
|
|
135
141
|
type BelongsToParams<T extends RelationConfigSelf, Relation extends BelongsTo> = {
|
|
136
142
|
[Name in BelongsToFKey<Relation>]: T['columns']['shape'][Name]['type'];
|