@zenstackhq/orm 3.5.0-beta.4 → 3.5.0-beta.5

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 CHANGED
@@ -1487,12 +1487,9 @@ type SelectIncludeOmit<Schema extends SchemaDef, Model extends GetModels<Schema>
1487
1487
  * Explicitly omit fields from the query result.
1488
1488
  */
1489
1489
  omit?: (OmitInput<Schema, Model> & ExtResultSelectOmitFields<ExtResult, Model & string>) | null;
1490
- } & (AllowRelation extends true ? {
1491
- /**
1492
- * Specifies relations to be included in the query result. All scalar fields are included.
1493
- */
1494
- include?: IncludeInput<Schema, Model, Options, AllowCount, ExtResult> | null;
1495
- } : {});
1490
+ } & {
1491
+ [K in AllowRelation extends true ? RelationFields<Schema, Model> extends never ? never : 'include' : never]?: IncludeInput<Schema, Model, Options, AllowCount, ExtResult> | null;
1492
+ };
1496
1493
  type SelectInput<Schema extends SchemaDef, Model extends GetModels<Schema>, Options extends QueryOptions<Schema> = QueryOptions<Schema>, AllowCount extends boolean = true, AllowRelation extends boolean = true, ExtResult extends ExtResultBase<Schema> = {}> = {
1497
1494
  [Key in NonRelationFields<Schema, Model>]?: boolean;
1498
1495
  } & (AllowRelation extends true ? IncludeInput<Schema, Model, Options, AllowCount, ExtResult> : {});
package/dist/index.d.ts CHANGED
@@ -1487,12 +1487,9 @@ type SelectIncludeOmit<Schema extends SchemaDef, Model extends GetModels<Schema>
1487
1487
  * Explicitly omit fields from the query result.
1488
1488
  */
1489
1489
  omit?: (OmitInput<Schema, Model> & ExtResultSelectOmitFields<ExtResult, Model & string>) | null;
1490
- } & (AllowRelation extends true ? {
1491
- /**
1492
- * Specifies relations to be included in the query result. All scalar fields are included.
1493
- */
1494
- include?: IncludeInput<Schema, Model, Options, AllowCount, ExtResult> | null;
1495
- } : {});
1490
+ } & {
1491
+ [K in AllowRelation extends true ? RelationFields<Schema, Model> extends never ? never : 'include' : never]?: IncludeInput<Schema, Model, Options, AllowCount, ExtResult> | null;
1492
+ };
1496
1493
  type SelectInput<Schema extends SchemaDef, Model extends GetModels<Schema>, Options extends QueryOptions<Schema> = QueryOptions<Schema>, AllowCount extends boolean = true, AllowRelation extends boolean = true, ExtResult extends ExtResultBase<Schema> = {}> = {
1497
1494
  [Key in NonRelationFields<Schema, Model>]?: boolean;
1498
1495
  } & (AllowRelation extends true ? IncludeInput<Schema, Model, Options, AllowCount, ExtResult> : {});