hysteria-orm 10.1.9 → 10.2.0

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/lib/index.d.cts CHANGED
@@ -1237,11 +1237,11 @@ declare class AlterTableBuilder extends BaseBuilder {
1237
1237
  */
1238
1238
  dropDefault(columnName: string): void;
1239
1239
  /**
1240
- * @description Adds a primary key to a column
1240
+ * @description Adds a primary key constraint to a column
1241
+ * @param columnName is the column name to add the primary key to
1241
1242
  * @sqlite not supported and will throw error
1242
- * @private Used internally by alterColumn
1243
1243
  */
1244
- private addPrimaryKey;
1244
+ addPrimaryKey(columnName: string): void;
1245
1245
  /**
1246
1246
  * @description Raw non type safe way builder to add a constraint
1247
1247
  * @sqlite not supported and will throw error
@@ -1249,23 +1249,21 @@ declare class AlterTableBuilder extends BaseBuilder {
1249
1249
  addConstraint(...options: ConstructorParameters<typeof ConstraintNode>): void;
1250
1250
  /**
1251
1251
  * @description Adds a foreign key constraint to a column
1252
+ * @param columnName is the column name in the current table
1253
+ * @param foreignTable is the referenced table name
1254
+ * @param foreignColumn is the referenced column name
1255
+ * @param options optional foreign key options (constraintName, onDelete, onUpdate)
1252
1256
  * @sqlite not supported and will throw error
1253
- * @private Used internally by alterColumn
1254
1257
  */
1255
- private addForeignKey;
1258
+ foreignKey(columnName: string, foreignTable: string, foreignColumn: string, options?: ForeignKeyOptions): void;
1256
1259
  /**
1257
1260
  * @description Adds a unique constraint to a column
1258
1261
  * @description By default generates a constraint name using standard pattern: uq_${table}_${column}
1262
+ * @param columnName is the column name in the current table
1263
+ * @param options optional constraint options (constraintName)
1259
1264
  * @sqlite not supported and will throw error
1260
- * @private Used internally by alterColumn
1261
1265
  */
1262
- private unique;
1263
- /**
1264
- * @description Sets a default value for a column
1265
- * @sqlite not supported and will throw error
1266
- * @private Used internally by alterColumn
1267
- */
1268
- private setDefault;
1266
+ unique(columnName: string, options?: CommonConstraintOptions): void;
1269
1267
  /**
1270
1268
  * @description Drops a foreign key by column name and referenced column, generates constraint name using standard pattern: fk_${table}_${leftColumn}_${rightColumn}
1271
1269
  * @description If a custom constraint name was used to generate the foreign key, use `dropConstraint` instead
@@ -1818,6 +1816,10 @@ type ManyToManyOptions<T extends typeof Model, TM extends ThroughModel<T>> = {
1818
1816
  */
1819
1817
  rightForeignKey?: TM extends ThroughModelString ? string : ModelKey<InstanceType<ExtractModelFromTM<TM>>>;
1820
1818
  };
1819
+ type ManyToManyStringOptions = {
1820
+ leftForeignKey?: string;
1821
+ rightForeignKey?: string;
1822
+ };
1821
1823
  type IndexType = {
1822
1824
  columns: string[];
1823
1825
  name: string;
@@ -3944,7 +3946,7 @@ type AnnotatedModel<T extends Model, A extends object = {}, R extends object = {
3944
3946
  $annotations: A;
3945
3947
  } & R;
3946
3948
  type CommonSqlMethodReturnType<T extends SqlMethod> = T extends "count" | "sum" | "avg" | "min" | "max" ? number : T extends "upper" | "lower" | "trim" ? string : T extends "length" ? number : T extends "cast" | "convert" ? any : T extends "abs" | "round" | "floor" | "ceil" ? number : any;
3947
- type RelatedInstance<M extends Model, K extends ModelRelation<M>> = M[K] extends (infer R)[] ? R extends Model ? R : never : M[K] extends Model ? M[K] : never;
3949
+ type RelatedInstance<M extends Model, K extends ModelRelation<M>> = NonNullable<M[K]> extends (infer R)[] ? R extends Model ? R : never : NonNullable<M[K]> extends Model ? NonNullable<M[K]> : never;
3948
3950
 
3949
3951
  type NullableAndUndefinable<T> = T | (T | null) | (T | undefined) | (T | null | undefined);
3950
3952
  type UpsertOptions<T extends Model> = {
@@ -4280,6 +4282,10 @@ declare abstract class Model extends Entity {
4280
4282
  * @description Gives the correct model manager with the correct connection based on the options provided
4281
4283
  */
4282
4284
  private static dispatchModelManager;
4285
+ /**
4286
+ * @description Merges the provided data with the model instance
4287
+ */
4288
+ mergeProps<T extends Model = this>(this: T, data: Partial<ModelWithoutRelations<T>>): void;
4283
4289
  /**
4284
4290
  * @description inserts or updates the model to the database, must have a primary key in order to work
4285
4291
  * @throws {HysteriaError} If the model has no primary key
@@ -4441,18 +4447,21 @@ declare function getModelColumns(target: typeof Model): ColumnType[];
4441
4447
  * ```
4442
4448
  */
4443
4449
  declare function belongsTo<M extends typeof Model = any, R extends typeof Model = any>(model: () => R, foreignKey?: ModelKey<InstanceType<M>>, options?: BaseModelRelationType): PropertyDecorator;
4450
+ declare function belongsTo<R extends typeof Model = any>(model: () => R, foreignKey?: string, options?: BaseModelRelationType): PropertyDecorator;
4444
4451
  /**
4445
4452
  * @description Establishes a has one relation with the given model
4446
4453
  * @default foreignKey by default will be the singular of the model name plus "_id"
4447
4454
  * @example User will have foreignKey "user_id" on the Post model
4448
4455
  */
4449
4456
  declare function hasOne<T extends typeof Model>(model: () => T, foreignKey?: ModelKey<InstanceType<T>>): PropertyDecorator;
4457
+ declare function hasOne<T extends typeof Model>(model: () => T, foreignKey?: string): PropertyDecorator;
4450
4458
  /**
4451
4459
  * @description Establishes a has many relation with the given model
4452
4460
  * @default foreignKey by default will be the singular of the model name plus "_id"
4453
4461
  * @example User will have foreignKey "user_id" on the Post model
4454
4462
  */
4455
4463
  declare function hasMany<T extends typeof Model>(model: () => T, foreignKey?: ModelKey<InstanceType<T>>): PropertyDecorator;
4464
+ declare function hasMany<T extends typeof Model>(model: () => T, foreignKey?: string): PropertyDecorator;
4456
4465
  /**
4457
4466
  * @description Establishes a many to many relation with the given model
4458
4467
  * @default foreignKey by default will be the singular of the model that establishes the relation name plus "_id"
@@ -4464,6 +4473,7 @@ declare function hasMany<T extends typeof Model>(model: () => T, foreignKey?: Mo
4464
4473
  * @example User will have foreignKey "user_id" on the Join table by default
4465
4474
  */
4466
4475
  declare function manyToMany<R extends typeof Model, T extends typeof Model, TM extends ThroughModel<T>>(model: () => R, throughModel: TM, throughModelKeys?: ManyToManyOptions<T, TM>, options?: BaseModelRelationType): PropertyDecorator;
4476
+ declare function manyToMany<R extends typeof Model>(model: () => R, throughModel: string | (() => typeof Model), throughModelKeys?: ManyToManyStringOptions, options?: BaseModelRelationType): PropertyDecorator;
4467
4477
  declare function getRelationsMetadata(target: typeof Model): LazyRelationType[];
4468
4478
  /**
4469
4479
  * @description Returns the relations of the model
@@ -5378,4 +5388,4 @@ declare const generateOpenApiModelWithMetadata: <T extends new () => Model>(mode
5378
5388
  $id?: string;
5379
5389
  }>;
5380
5390
 
5381
- export { type AnnotatedModel, type AsymmetricEncryptionOptions, type AugmentedSqlDataSource, AutogeneratedModel, type BaseModelMethodOptions, type BaseModelRelationType, type CacheAdapter, type CacheKeys, ClientMigrator, Collection, type ColumnDataTypeOption, type ColumnDataTypeOptionSimple, type ColumnDataTypeOptionWithBinary, type ColumnDataTypeOptionWithDatePrecision, type ColumnDataTypeOptionWithEnum, type ColumnDataTypeOptionWithLength, type ColumnDataTypeOptionWithPrecision, type ColumnDataTypeOptionWithScaleAndPrecision, type ColumnDataTypeOptionWithText, type ColumnOptions, type ColumnType, type CommonDataSourceInput, type CommonSqlMethodReturnType, type ConnectionPolicies, type DataSourceInput, type DataSourceType, type DateColumnOptions, DryModelQueryBuilder, DryQueryBuilder, type FetchHooks, type GetConnectionReturnType, HysteriaError, InMemoryAdapter, type IndexType, type LazyRelationType, type ManyOptions, type ManyToManyOptions, Migration, Model, type ModelInstanceType, ModelQueryBuilder, type ModelWithoutRelations, MongoDataSource, type MongoDataSourceInput, type MysqlConnectionInstance, type MysqlSqlDataSourceInput, type NotNullableMysqlSqlDataSourceInput, type NotNullablePostgresSqlDataSourceInput, type NotNullableSqliteDataSourceInput, type NumberModelKey, type OneOptions, type PgPoolClientInstance, type PostgresSqlDataSourceInput, QueryBuilder, type RawModelOptions, RedisCacheAdapter, type RedisFetchable, type RedisStorable, type RelatedInstance, type RelationQueryBuilderType, type SqlCloneOptions, type SqlDataSourceInput, type SqlDataSourceModel, type SqlDataSourceType, type SqlDataSourceWithoutTransaction, type SqlDriverSpecificOptions, type SqlPoolType, type SqliteConnectionInstance, type SqliteDataSourceInput, type StartTransactionOptions, type SymmetricEncryptionOptions, type TableFormat, type ThroughModel, TimestampedModel, Transaction, type TransactionExecutionOptions, type UniqueType, type UseCacheReturnType, type UseConnectionInput, UserMixin, UuidModel, belongsTo, column, createModelFactory, defineMigrator, generateOpenApiModel, generateOpenApiModelSchema, generateOpenApiModelWithMetadata, getCollectionProperties, getIndexes, getModelColumns, type getPoolReturnType, getPrimaryKey, getRelations, getRelationsMetadata, getUniques, hasMany, hasOne, index, HysteriaLogger as logger, manyToMany, MongoDataSource as mongo, property, RedisDataSource as redis, SqlDataSource as sql, unique, view, withPerformance };
5391
+ export { type AnnotatedModel, type AsymmetricEncryptionOptions, type AugmentedSqlDataSource, AutogeneratedModel, type BaseModelMethodOptions, type BaseModelRelationType, type CacheAdapter, type CacheKeys, ClientMigrator, Collection, type ColumnDataTypeOption, type ColumnDataTypeOptionSimple, type ColumnDataTypeOptionWithBinary, type ColumnDataTypeOptionWithDatePrecision, type ColumnDataTypeOptionWithEnum, type ColumnDataTypeOptionWithLength, type ColumnDataTypeOptionWithPrecision, type ColumnDataTypeOptionWithScaleAndPrecision, type ColumnDataTypeOptionWithText, type ColumnOptions, type ColumnType, type CommonDataSourceInput, type CommonSqlMethodReturnType, type ConnectionPolicies, type DataSourceInput, type DataSourceType, type DateColumnOptions, DryModelQueryBuilder, DryQueryBuilder, type FetchHooks, type GetConnectionReturnType, HysteriaError, InMemoryAdapter, type IndexType, type LazyRelationType, type ManyOptions, type ManyToManyOptions, type ManyToManyStringOptions, Migration, Model, type ModelInstanceType, ModelQueryBuilder, type ModelWithoutRelations, MongoDataSource, type MongoDataSourceInput, type MysqlConnectionInstance, type MysqlSqlDataSourceInput, type NotNullableMysqlSqlDataSourceInput, type NotNullablePostgresSqlDataSourceInput, type NotNullableSqliteDataSourceInput, type NumberModelKey, type OneOptions, type PgPoolClientInstance, type PostgresSqlDataSourceInput, QueryBuilder, type RawModelOptions, RedisCacheAdapter, type RedisFetchable, type RedisStorable, type RelatedInstance, type RelationQueryBuilderType, type SqlCloneOptions, type SqlDataSourceInput, type SqlDataSourceModel, type SqlDataSourceType, type SqlDataSourceWithoutTransaction, type SqlDriverSpecificOptions, type SqlPoolType, type SqliteConnectionInstance, type SqliteDataSourceInput, type StartTransactionOptions, type SymmetricEncryptionOptions, type TableFormat, type ThroughModel, TimestampedModel, Transaction, type TransactionExecutionOptions, type UniqueType, type UseCacheReturnType, type UseConnectionInput, UserMixin, UuidModel, belongsTo, column, createModelFactory, defineMigrator, generateOpenApiModel, generateOpenApiModelSchema, generateOpenApiModelWithMetadata, getCollectionProperties, getIndexes, getModelColumns, type getPoolReturnType, getPrimaryKey, getRelations, getRelationsMetadata, getUniques, hasMany, hasOne, index, HysteriaLogger as logger, manyToMany, MongoDataSource as mongo, property, RedisDataSource as redis, SqlDataSource as sql, unique, view, withPerformance };
package/lib/index.d.ts CHANGED
@@ -1237,11 +1237,11 @@ declare class AlterTableBuilder extends BaseBuilder {
1237
1237
  */
1238
1238
  dropDefault(columnName: string): void;
1239
1239
  /**
1240
- * @description Adds a primary key to a column
1240
+ * @description Adds a primary key constraint to a column
1241
+ * @param columnName is the column name to add the primary key to
1241
1242
  * @sqlite not supported and will throw error
1242
- * @private Used internally by alterColumn
1243
1243
  */
1244
- private addPrimaryKey;
1244
+ addPrimaryKey(columnName: string): void;
1245
1245
  /**
1246
1246
  * @description Raw non type safe way builder to add a constraint
1247
1247
  * @sqlite not supported and will throw error
@@ -1249,23 +1249,21 @@ declare class AlterTableBuilder extends BaseBuilder {
1249
1249
  addConstraint(...options: ConstructorParameters<typeof ConstraintNode>): void;
1250
1250
  /**
1251
1251
  * @description Adds a foreign key constraint to a column
1252
+ * @param columnName is the column name in the current table
1253
+ * @param foreignTable is the referenced table name
1254
+ * @param foreignColumn is the referenced column name
1255
+ * @param options optional foreign key options (constraintName, onDelete, onUpdate)
1252
1256
  * @sqlite not supported and will throw error
1253
- * @private Used internally by alterColumn
1254
1257
  */
1255
- private addForeignKey;
1258
+ foreignKey(columnName: string, foreignTable: string, foreignColumn: string, options?: ForeignKeyOptions): void;
1256
1259
  /**
1257
1260
  * @description Adds a unique constraint to a column
1258
1261
  * @description By default generates a constraint name using standard pattern: uq_${table}_${column}
1262
+ * @param columnName is the column name in the current table
1263
+ * @param options optional constraint options (constraintName)
1259
1264
  * @sqlite not supported and will throw error
1260
- * @private Used internally by alterColumn
1261
1265
  */
1262
- private unique;
1263
- /**
1264
- * @description Sets a default value for a column
1265
- * @sqlite not supported and will throw error
1266
- * @private Used internally by alterColumn
1267
- */
1268
- private setDefault;
1266
+ unique(columnName: string, options?: CommonConstraintOptions): void;
1269
1267
  /**
1270
1268
  * @description Drops a foreign key by column name and referenced column, generates constraint name using standard pattern: fk_${table}_${leftColumn}_${rightColumn}
1271
1269
  * @description If a custom constraint name was used to generate the foreign key, use `dropConstraint` instead
@@ -1818,6 +1816,10 @@ type ManyToManyOptions<T extends typeof Model, TM extends ThroughModel<T>> = {
1818
1816
  */
1819
1817
  rightForeignKey?: TM extends ThroughModelString ? string : ModelKey<InstanceType<ExtractModelFromTM<TM>>>;
1820
1818
  };
1819
+ type ManyToManyStringOptions = {
1820
+ leftForeignKey?: string;
1821
+ rightForeignKey?: string;
1822
+ };
1821
1823
  type IndexType = {
1822
1824
  columns: string[];
1823
1825
  name: string;
@@ -3944,7 +3946,7 @@ type AnnotatedModel<T extends Model, A extends object = {}, R extends object = {
3944
3946
  $annotations: A;
3945
3947
  } & R;
3946
3948
  type CommonSqlMethodReturnType<T extends SqlMethod> = T extends "count" | "sum" | "avg" | "min" | "max" ? number : T extends "upper" | "lower" | "trim" ? string : T extends "length" ? number : T extends "cast" | "convert" ? any : T extends "abs" | "round" | "floor" | "ceil" ? number : any;
3947
- type RelatedInstance<M extends Model, K extends ModelRelation<M>> = M[K] extends (infer R)[] ? R extends Model ? R : never : M[K] extends Model ? M[K] : never;
3949
+ type RelatedInstance<M extends Model, K extends ModelRelation<M>> = NonNullable<M[K]> extends (infer R)[] ? R extends Model ? R : never : NonNullable<M[K]> extends Model ? NonNullable<M[K]> : never;
3948
3950
 
3949
3951
  type NullableAndUndefinable<T> = T | (T | null) | (T | undefined) | (T | null | undefined);
3950
3952
  type UpsertOptions<T extends Model> = {
@@ -4280,6 +4282,10 @@ declare abstract class Model extends Entity {
4280
4282
  * @description Gives the correct model manager with the correct connection based on the options provided
4281
4283
  */
4282
4284
  private static dispatchModelManager;
4285
+ /**
4286
+ * @description Merges the provided data with the model instance
4287
+ */
4288
+ mergeProps<T extends Model = this>(this: T, data: Partial<ModelWithoutRelations<T>>): void;
4283
4289
  /**
4284
4290
  * @description inserts or updates the model to the database, must have a primary key in order to work
4285
4291
  * @throws {HysteriaError} If the model has no primary key
@@ -4441,18 +4447,21 @@ declare function getModelColumns(target: typeof Model): ColumnType[];
4441
4447
  * ```
4442
4448
  */
4443
4449
  declare function belongsTo<M extends typeof Model = any, R extends typeof Model = any>(model: () => R, foreignKey?: ModelKey<InstanceType<M>>, options?: BaseModelRelationType): PropertyDecorator;
4450
+ declare function belongsTo<R extends typeof Model = any>(model: () => R, foreignKey?: string, options?: BaseModelRelationType): PropertyDecorator;
4444
4451
  /**
4445
4452
  * @description Establishes a has one relation with the given model
4446
4453
  * @default foreignKey by default will be the singular of the model name plus "_id"
4447
4454
  * @example User will have foreignKey "user_id" on the Post model
4448
4455
  */
4449
4456
  declare function hasOne<T extends typeof Model>(model: () => T, foreignKey?: ModelKey<InstanceType<T>>): PropertyDecorator;
4457
+ declare function hasOne<T extends typeof Model>(model: () => T, foreignKey?: string): PropertyDecorator;
4450
4458
  /**
4451
4459
  * @description Establishes a has many relation with the given model
4452
4460
  * @default foreignKey by default will be the singular of the model name plus "_id"
4453
4461
  * @example User will have foreignKey "user_id" on the Post model
4454
4462
  */
4455
4463
  declare function hasMany<T extends typeof Model>(model: () => T, foreignKey?: ModelKey<InstanceType<T>>): PropertyDecorator;
4464
+ declare function hasMany<T extends typeof Model>(model: () => T, foreignKey?: string): PropertyDecorator;
4456
4465
  /**
4457
4466
  * @description Establishes a many to many relation with the given model
4458
4467
  * @default foreignKey by default will be the singular of the model that establishes the relation name plus "_id"
@@ -4464,6 +4473,7 @@ declare function hasMany<T extends typeof Model>(model: () => T, foreignKey?: Mo
4464
4473
  * @example User will have foreignKey "user_id" on the Join table by default
4465
4474
  */
4466
4475
  declare function manyToMany<R extends typeof Model, T extends typeof Model, TM extends ThroughModel<T>>(model: () => R, throughModel: TM, throughModelKeys?: ManyToManyOptions<T, TM>, options?: BaseModelRelationType): PropertyDecorator;
4476
+ declare function manyToMany<R extends typeof Model>(model: () => R, throughModel: string | (() => typeof Model), throughModelKeys?: ManyToManyStringOptions, options?: BaseModelRelationType): PropertyDecorator;
4467
4477
  declare function getRelationsMetadata(target: typeof Model): LazyRelationType[];
4468
4478
  /**
4469
4479
  * @description Returns the relations of the model
@@ -5378,4 +5388,4 @@ declare const generateOpenApiModelWithMetadata: <T extends new () => Model>(mode
5378
5388
  $id?: string;
5379
5389
  }>;
5380
5390
 
5381
- export { type AnnotatedModel, type AsymmetricEncryptionOptions, type AugmentedSqlDataSource, AutogeneratedModel, type BaseModelMethodOptions, type BaseModelRelationType, type CacheAdapter, type CacheKeys, ClientMigrator, Collection, type ColumnDataTypeOption, type ColumnDataTypeOptionSimple, type ColumnDataTypeOptionWithBinary, type ColumnDataTypeOptionWithDatePrecision, type ColumnDataTypeOptionWithEnum, type ColumnDataTypeOptionWithLength, type ColumnDataTypeOptionWithPrecision, type ColumnDataTypeOptionWithScaleAndPrecision, type ColumnDataTypeOptionWithText, type ColumnOptions, type ColumnType, type CommonDataSourceInput, type CommonSqlMethodReturnType, type ConnectionPolicies, type DataSourceInput, type DataSourceType, type DateColumnOptions, DryModelQueryBuilder, DryQueryBuilder, type FetchHooks, type GetConnectionReturnType, HysteriaError, InMemoryAdapter, type IndexType, type LazyRelationType, type ManyOptions, type ManyToManyOptions, Migration, Model, type ModelInstanceType, ModelQueryBuilder, type ModelWithoutRelations, MongoDataSource, type MongoDataSourceInput, type MysqlConnectionInstance, type MysqlSqlDataSourceInput, type NotNullableMysqlSqlDataSourceInput, type NotNullablePostgresSqlDataSourceInput, type NotNullableSqliteDataSourceInput, type NumberModelKey, type OneOptions, type PgPoolClientInstance, type PostgresSqlDataSourceInput, QueryBuilder, type RawModelOptions, RedisCacheAdapter, type RedisFetchable, type RedisStorable, type RelatedInstance, type RelationQueryBuilderType, type SqlCloneOptions, type SqlDataSourceInput, type SqlDataSourceModel, type SqlDataSourceType, type SqlDataSourceWithoutTransaction, type SqlDriverSpecificOptions, type SqlPoolType, type SqliteConnectionInstance, type SqliteDataSourceInput, type StartTransactionOptions, type SymmetricEncryptionOptions, type TableFormat, type ThroughModel, TimestampedModel, Transaction, type TransactionExecutionOptions, type UniqueType, type UseCacheReturnType, type UseConnectionInput, UserMixin, UuidModel, belongsTo, column, createModelFactory, defineMigrator, generateOpenApiModel, generateOpenApiModelSchema, generateOpenApiModelWithMetadata, getCollectionProperties, getIndexes, getModelColumns, type getPoolReturnType, getPrimaryKey, getRelations, getRelationsMetadata, getUniques, hasMany, hasOne, index, HysteriaLogger as logger, manyToMany, MongoDataSource as mongo, property, RedisDataSource as redis, SqlDataSource as sql, unique, view, withPerformance };
5391
+ export { type AnnotatedModel, type AsymmetricEncryptionOptions, type AugmentedSqlDataSource, AutogeneratedModel, type BaseModelMethodOptions, type BaseModelRelationType, type CacheAdapter, type CacheKeys, ClientMigrator, Collection, type ColumnDataTypeOption, type ColumnDataTypeOptionSimple, type ColumnDataTypeOptionWithBinary, type ColumnDataTypeOptionWithDatePrecision, type ColumnDataTypeOptionWithEnum, type ColumnDataTypeOptionWithLength, type ColumnDataTypeOptionWithPrecision, type ColumnDataTypeOptionWithScaleAndPrecision, type ColumnDataTypeOptionWithText, type ColumnOptions, type ColumnType, type CommonDataSourceInput, type CommonSqlMethodReturnType, type ConnectionPolicies, type DataSourceInput, type DataSourceType, type DateColumnOptions, DryModelQueryBuilder, DryQueryBuilder, type FetchHooks, type GetConnectionReturnType, HysteriaError, InMemoryAdapter, type IndexType, type LazyRelationType, type ManyOptions, type ManyToManyOptions, type ManyToManyStringOptions, Migration, Model, type ModelInstanceType, ModelQueryBuilder, type ModelWithoutRelations, MongoDataSource, type MongoDataSourceInput, type MysqlConnectionInstance, type MysqlSqlDataSourceInput, type NotNullableMysqlSqlDataSourceInput, type NotNullablePostgresSqlDataSourceInput, type NotNullableSqliteDataSourceInput, type NumberModelKey, type OneOptions, type PgPoolClientInstance, type PostgresSqlDataSourceInput, QueryBuilder, type RawModelOptions, RedisCacheAdapter, type RedisFetchable, type RedisStorable, type RelatedInstance, type RelationQueryBuilderType, type SqlCloneOptions, type SqlDataSourceInput, type SqlDataSourceModel, type SqlDataSourceType, type SqlDataSourceWithoutTransaction, type SqlDriverSpecificOptions, type SqlPoolType, type SqliteConnectionInstance, type SqliteDataSourceInput, type StartTransactionOptions, type SymmetricEncryptionOptions, type TableFormat, type ThroughModel, TimestampedModel, Transaction, type TransactionExecutionOptions, type UniqueType, type UseCacheReturnType, type UseConnectionInput, UserMixin, UuidModel, belongsTo, column, createModelFactory, defineMigrator, generateOpenApiModel, generateOpenApiModelSchema, generateOpenApiModelWithMetadata, getCollectionProperties, getIndexes, getModelColumns, type getPoolReturnType, getPrimaryKey, getRelations, getRelationsMetadata, getUniques, hasMany, hasOne, index, HysteriaLogger as logger, manyToMany, MongoDataSource as mongo, property, RedisDataSource as redis, SqlDataSource as sql, unique, view, withPerformance };