orchid-orm 1.72.9 → 1.72.10

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 CHANGED
@@ -20,7 +20,7 @@ interface RelationHasOneThroughOptions<Through extends string, Source extends st
20
20
  required?: boolean;
21
21
  }
22
22
  type HasOneOptions<Columns extends Column.Shape.QueryInit = Column.Shape.QueryInit, Related extends ORMTableInput = ORMTableInput, Through extends string = string, Source extends string = string> = RelationRefsOptions<keyof Columns, Related['columns']['shape']> | RelationHasOneThroughOptions<Through, Source>;
23
- type HasOneParams<T extends RelationConfigSelf, Options> = Options extends RelationRefsOptions ? { [Name in Options['columns'][number]]: T['columns']['shape'][Name]['type'] } : Options extends RelationThroughOptions ? RelationConfigParams<T, T['relations'][Options['through']]> : never;
23
+ type HasOneParams<T extends RelationConfigSelf, Options> = Options extends RelationRefsOptions ? { [Name in Options['columns'][number]]: T['columns']['shape'][Name]['__type'] } : Options extends RelationThroughOptions ? RelationConfigParams<T, T['relations'][Options['through']]> : never;
24
24
  type HasOneQueryThrough<Name extends string, TableQuery extends Query> = { [K in keyof TableQuery]: K extends '__selectable' ? SelectableFromShape<TableQuery['shape'], Name> : K extends '__as' ? Name : K extends CreateMethodsNames ? never : TableQuery[K] } & QueryHasWhere & HasRelJoin;
25
25
  type HasOneQuery<T extends RelationConfigSelf, Name extends string, TableQuery extends Query> = T['relations'][Name]['options'] extends RelationRefsOptions ? { [K in keyof TableQuery]: K extends '__defaults' ? { [K in keyof TableQuery['__defaults'] | T['relations'][Name]['options']['references'][number]]: true } : K extends '__selectable' ? SelectableFromShape<TableQuery['shape'], Name> : K extends '__as' ? Name : K extends CreateManyMethodsNames ? never : TableQuery[K] } & QueryHasWhere & HasRelJoin : HasOneQueryThrough<Name, TableQuery>;
26
26
  interface HasOneInfo<T extends RelationConfigSelf, Name extends string, Rel extends HasOne, Q extends Query> extends RelationConfigBase {
@@ -117,7 +117,7 @@ interface BelongsToOptions<Columns extends Column.Shape.QueryInit = Column.Shape
117
117
  foreignKey?: boolean | TableData.References.Options;
118
118
  on?: ColumnsShape.InputPartial<Related['columns']['shape']>;
119
119
  }
120
- type BelongsToParams<T extends RelationConfigSelf, FK extends string> = { [Name in FK]: T['columns']['shape'][Name]['type'] };
120
+ type BelongsToParams<T extends RelationConfigSelf, FK extends string> = { [Name in FK]: T['columns']['shape'][Name]['__type'] };
121
121
  type BelongsToQuery<T extends Query, Name extends string> = { [P in keyof T]: P extends '__selectable' ? SelectableFromShape<T['shape'], Name> : P extends '__as' ? Name : P extends CreateMethodsNames | DeleteMethodsNames ? never : T[P] } & QueryHasWhere & HasRelJoin;
122
122
  interface BelongsToInfo<T extends RelationConfigSelf, Name extends string, FK extends string, Required, Q extends Query> extends RelationConfigBase {
123
123
  returnsOne: true;
@@ -175,7 +175,7 @@ interface HasAndBelongsToManyOptions<Columns extends Column.Shape.QueryInit = Co
175
175
  };
176
176
  on?: ColumnsShape.InputPartial<Related['columns']['shape']>;
177
177
  }
178
- type HasAndBelongsToManyParams<T extends RelationConfigSelf, FK extends string> = { [Name in FK]: T['columns']['shape'][Name]['type'] };
178
+ type HasAndBelongsToManyParams<T extends RelationConfigSelf, FK extends string> = { [Name in FK]: T['columns']['shape'][Name]['__type'] };
179
179
  type HasAndBelongsToManyQuery<Name extends string, TableQuery extends Query> = { [K in keyof TableQuery]: K extends '__selectable' ? SelectableFromShape<TableQuery['shape'], Name> : K extends '__as' ? Name : TableQuery[K] } & QueryHasWhere & HasRelJoin;
180
180
  interface HasAndBelongsToManyInfo<T extends RelationConfigSelf, Name extends string, FK extends string, Q extends Query> extends RelationConfigBase {
181
181
  returnsOne: false;
@@ -578,17 +578,17 @@ interface ORMTableInput extends PickORMTableInputColumnsAndComputed {
578
578
  securityInvoker?: boolean;
579
579
  withData?: boolean;
580
580
  }
581
- type Queryable<T extends PickORMTableInputColumns> = ShallowSimplify<{ [K in keyof T['columns']['shape']]?: T['columns']['shape'][K]['queryType'] }>;
581
+ type Queryable<T extends PickORMTableInputColumns> = ShallowSimplify<{ [K in keyof T['columns']['shape']]?: T['columns']['shape'][K]['__queryType'] }>;
582
582
  type DefaultSelect<T extends PickORMTableInputColumns> = ShallowSimplify<ColumnsShape.DefaultOutput<T['columns']['shape']>>;
583
583
  type Selectable<T extends PickORMTableInputColumnsAndComputed> = T['computed'] extends ((t: never) => infer R extends ComputedOptionsConfig) ? ShallowSimplify<ColumnsShape.Output<T['columns']['shape']> & { [K in keyof R]: R[K] extends {
584
584
  result: {
585
585
  value: infer Value extends Column.Pick.QueryColumn;
586
586
  };
587
- } ? Value['outputType'] : R[K] extends (() => {
587
+ } ? Value['__outputType'] : R[K] extends (() => {
588
588
  result: {
589
589
  value: infer Value extends Column.Pick.QueryColumn;
590
590
  };
591
- }) ? Value['outputType'] : never }> : ShallowSimplify<ColumnsShape.Output<T['columns']['shape']>>;
591
+ }) ? Value['__outputType'] : never }> : ShallowSimplify<ColumnsShape.Output<T['columns']['shape']>>;
592
592
  type Insertable<T extends PickORMTableInputColumns> = ShallowSimplify<ColumnsShape.Input<T['columns']['shape']>>;
593
593
  type Updatable<T extends PickORMTableInputColumns> = ShallowSimplify<ColumnsShape.InputPartial<T['columns']['shape']>>;
594
594
  type BeforeHookMethod = (cb: QueryBeforeHook) => void;