import { Collection as Collection$1 } from "@h3ravel/collect.js"; import Knex$1, { Knex } from "knex"; //#region src/browser/collection.d.ts declare class Collection extends Collection$1 { mapThen(callback: TFunction): Promise; modelKeys(): any[]; contains(key: keyof I | K | TFunction, value?: V): boolean; diff(items: Collection$1 | T[]): any; except(...keys: K[]): any; intersect(items: I[]): any; unique(key?: TFunction | keyof I, _strict?: boolean): any; find(key: any, defaultValue?: null): any; makeVisible(attributes: any): this; makeHidden(attributes: any): this; append(attributes: any): this; only(...keys: K[]): any; getDictionary(items?: Collection$1 | any[]): TGeneric; toData(): Record[]; toJSON(): I[]; toJson(...args: any[]): string; [Symbol.iterator]: () => Iterator; } //#endregion //#region types/modeling.d.ts interface Attribute$1 { make(config: { get?: TFunction | null; set?: TFunction | null; }): Attribute$1; get: TFunction | null; set: TFunction | null; withCaching?: boolean; withObjectCaching?: boolean; } type Relation$1 = IBuilder & {}; interface HasOneOrMany extends Relation$1 { save(model: M): Promise; saveMany(models: M[] | ICollection): Promise>; create(attributes?: any): Promise; createMany(records: any[]): Promise>; } interface HasOne extends HasOneOrMany { getResults(): Promise; withDefault(callback?: TFunction | object): this; } interface HasMany extends HasOneOrMany { getResults(): Promise>; } interface BelongsTo extends Relation$1 { getResults(): Promise; withDefault(callback?: TFunction | object): this; } interface BelongsToMany extends Relation$1 { getResults(): Promise>; withTimestamps(): this; wherePivot(column: any, operator?: any, value?: any, boolean?: string, ...args: any[]): this; wherePivotBetween(column: any, values: any, boolean?: string, not?: boolean): this; orWherePivotBetween(column: any, values: any): this; wherePivotNotBetween(column: any, values: any, boolean?: string): this; orWherePivotNotBetween(column: any, values: any): this; wherePivotIn(column: any, values: any, boolean?: string, not?: boolean): this; orWherePivot(column: any, operator?: any, value?: any): this; orWherePivotIn(column: any, values: any): this; wherePivotNotIn(column: any, values: any, boolean?: string): this; orWherePivotNotIn(column: any, values: any): this; wherePivotNull(column: any, boolean?: string, not?: boolean): this; wherePivotNotNull(column: any, boolean?: string): this; orWherePivotNull(column: any, not?: boolean): this; orWherePivotNotNull(column: any): this; orderByPivot(column: any, direction?: string): this; } interface IModel { [value: string]: any; attributes: any; relations: any; exists: boolean; connection?: TBaseConfig['client'] | null; perPage: number; with: string | string[] | TGeneric<(...args: any[]) => IBuilder>; trx: AnyQueryBuilder | null; timestamps: boolean; dateFormat: string; visible: string[]; hidden: string[]; query(this: T, client?: AnyQueryBuilder | null): IBuilder; on(this: T, connection: string | null): IBuilder; boot(): void; make(this: new () => T, attributes?: TGeneric): T; addHook(hook: Hook, callback: TFunction): void; creating(callback: TFunction): void; created(callback: TFunction): void; updating(callback: TFunction): void; updated(callback: TFunction): void; deleting(callback: TFunction): void; deleted(callback: TFunction): void; saving(callback: TFunction): void; saved(callback: TFunction): void; restoring(callback: TFunction): void; restored(callback: TFunction): void; trashed(callback: TFunction): void; forceDeleted(callback: TFunction): void; bootIfNotBooted(): void; initialize(): void; initializePlugins(): void; addPluginInitializer(method: any): void; newInstance(attributes?: TGeneric, exists?: boolean): any; getKey(): string | number | null | undefined; getKeyName(): string; getConnectionName(): string; getConnection(): any; setConnection(connection: TBaseConfig['client'] | null): this; usesUniqueIds(): boolean; uniqueIds(): string[]; setUniqueIds(): void; getKeyType(): string; getIncrementing(): boolean; setIncrementing(value: boolean): this; getTable(): string; setTable(table: string): this; getDates(): string[]; getDateFormat(): string; getAttributes(): object; getAttribute(key: string): any; setAttribute(key: string, value: any): this; fill(attributes: any): this; setAppends(appends: string[]): this; append(key: string | string[]): this; getRelation(relation: string): T | ICollection | null | undefined; getRelation(relation: string): IsCollection extends true ? ICollection | undefined : T | null | undefined; setRelation(relation: string, value: T | ICollection | null): this; unsetRelation(relation: string): this; relationLoaded(relation: string): boolean; makeVisible(attributes: string | string[]): this; makeHidden(attributes: string | string[]): this; newCollection(models?: any[]): ICollection; load(relations: WithRelationType): Promise; load(...relations: WithRelationType[]): Promise; loadAggregate(relations: WithRelationType, column: any, callback?: any): Promise; loadCount(...relations: WithRelationType[]): Promise; loadMax(relations: WithRelationType, column: string): Promise; loadMin(relations: WithRelationType, column: string): Promise; loadSum(relations: WithRelationType, column: string): Promise; usesTimestamps(): boolean; updateTimestamps(): this; getCreatedAtColumn(): string; getUpdatedAtColumn(): string; getDeletedAtColumn(): string; setCreatedAt(value: string): this; setUpdatedAt(value: string): this; freshTimestamp(): Date; freshTimestampString(): string; fromDateTime(value: Date | number | null): string; useSoftDeletes(): boolean; toData(): any; attributesToData(): any; relationsToData(): any; toJSON(): any; toJson(): string; toString(): string; isDirty(attributes?: string | string[]): boolean; getDirty(): string[]; save(options?: any): Promise; update(attributes?: any, options?: any): Promise; increment(column: string, amount?: number, extra?: any): Promise; decrement(column: string, amount?: number, extra?: any): Promise; serializeDate(date: any): string; delete(options?: any): Promise; softDelete(options?: any): Promise; forceDelete(options?: any): Promise; restore(options?: any): Promise; trashed(): boolean; fresh(): Promise; refresh(): Promise; push(): Promise; is(model: this): boolean; isNot(model: this): boolean; related>(relation: T): ReturnTypeOfMethod>}`>; getRelated>(relation: T): ReturnTypeOfMethod>}`>, any>; hasOne(model: new () => T, foreignKey?: string, localKey?: string): HasOne; hasMany(model: new () => T, foreignKey?: string, localKey?: string): HasMany; belongsTo(model: new () => T, foreignKey?: string, ownerKey?: string, relation?: string): BelongsTo; belongsToMany(model: new () => T, table?: string, foreignPivotKey?: string, relatedPivotKey?: string, parentKey?: string, relatedKey?: string): BelongsToMany; } //#endregion //#region src/collection.d.ts declare class Collection$2 extends Collection$1 { private newConstructor; getConstructor>(this: InstanceType): T; load(...relations: (string[] | I[] | string | I)[]): Promise>; loadAggregate(relations: I, column: string, action?: string | null | TFunction): Promise; loadCount(relations: I): Promise; loadMax(relation: I, column: string): Promise; loadMin(relation: I, column: string): Promise; loadSum(relation: I, column: string): Promise; loadAvg(relation: I, column: string): Promise; mapThen(callback: () => void): Promise; modelKeys(): any[]; contains(key: keyof I | K | TFunction, value?: V): boolean; diff(items: Collection$1 | T[]): any; except(...keys: K[]): any; intersect(items: I[]): any; unique(key?: TFunction | keyof I, _strict?: boolean): any; find(key: any, defaultValue?: null): any; fresh(...args: any[]): Promise; makeVisible(attributes: any): this; makeHidden(attributes: any): this; append(attributes: any): this; only(...keys: K[]): any; getDictionary(items?: Collection$1 | any[]): TGeneric; toQuery(): any; toData(): any[]; toJSON(): I[]; toJson(...args: any[]): string; [Symbol.iterator]: () => Iterator; } //#endregion //#region src/paginator.d.ts declare class Paginator$1 implements IPaginator { static formatter: (paginator: IPaginator) => any | null; _items: Collection$2; _total: number; _perPage: number; _lastPage: number; _currentPage: number; hasMore: boolean; options: TGeneric; static setFormatter(formatter?: ((paginator: IPaginator | null) => any) | null): void; constructor(items: T[], total: number, perPage: number, currentPage?: number, options?: TGeneric); setItems(items: T[]): void; firstItem(): number | null; lastItem(): number | null; hasMorePages(): boolean; get(index: number): T | null; count(): number; items(): Collection$2; map(callback: (value: T, index: number) => T): Collection$2; currentPage(): number; onFirstPage(): boolean; perPage(): number; lastPage(): number; total(): number; toData(): any; toJSON(): any; toJson(...args: any[]): string; } //#endregion //#region src/scope.d.ts declare class Scope implements IScope { constructor(); apply(_builder: Builder, _model: M): void; } //#endregion //#region src/builder.d.ts declare const Inference$1: { new (): IBuilder; }; declare class Builder> extends Inference$1 { query: IBuilder; connection: any; model: M; actions: any[]; localMacros: TGeneric<(...args: any[]) => any, keyof Omit, number>>; eagerLoad: TGeneric<(...args: any[]) => any>; globalScopes: TGeneric | ((arg: Builder) => Builder)>; onDeleteCallback?: (builder: Builder) => Promise; constructor(query: IBuilder); asProxy(): Builder; orWhere(...args: any[]): this; chunk(count: number, callback: C): Promise; enforceOrderBy(this: any): void; clone(this: any): any; forPage(this: any, page: number, perPage?: number): any; insert(...args: Parameters): Promise; update(values: T): Promise; increment(column: string, amount?: number, extra?: {}): Promise; decrement(column: string, amount?: number, extra?: {}): Promise; addUpdatedAtColumn(values: TGeneric): TGeneric; delete(): Promise; onDelete>>(callback: C): void; forceDelete(): Promise; create(attributes?: {}): Promise; newModelInstance(attributes?: {}): any; getQuery(): IBuilder; getModel(): M; setModel(model: MO): this; qualifyColumn(column: string): string; setTable(table: string): this; applyScopes(): this; hasNamedScope(name: string): boolean; callNamedScope(scope: string, parameters: any[]): any; callScope(scope: (builder: this, ...args: any[]) => this, parameters?: never[]): this; scopes(scopes: string[]): this; withGlobalScope(identifier: string, scope: any): this; withoutGlobalScope(scope: Scope | string): this; macro(name: N, callback: (builder: TGeneric & IBuilder, attrs: any, vals: any) => any): this; hasMacro(name: string): boolean; getMacro(name: string): (...args: any[]) => any; with(...args: any[]): this; has(relation: any, operator?: string, count?: number, boolean?: string, callback?: TFunction | null): any; orHas(relation: any, operator?: string, count?: number): any; doesntHave(relation: any, boolean?: string, callback?: TFunction | null): any; orDoesntHave(relation: any): any; whereHas(relation: any, callback?: TFunction | null, operator?: string, count?: number): any; orWhereHas(relation: any, callback?: TFunction | null, operator?: string, count?: number): any; whereRelation(relation: any, ...args: any[]): any; orWhereRelation(relation: any, ...args: any[]): any; hasNested(relations: any, operator?: string, count?: number, boolean?: string, callback?: TFunction | null): any; canUseExistsForExistenceCheck(operator: string, count: number): boolean; addHasWhere(hasQuery: any, relation: any, operator: string, count: number, boolean: string): any; addWhereExistsQuery(this: any, query: any, boolean?: string, not?: boolean): any; addWhereCountQuery(this: any, query: any, operator?: string, count?: number, boolean?: string): any; withAggregate(relations: any, column: string, action?: string | null): this; toSql(): any; mergeConstraintsFrom(_from: any): this; selectSub(query: Builder, as: string): any; createSub(query: any): any[]; parseSub(query: any): any[]; prependDatabaseNameIfCrossDatabaseQuery(query: any): any; getRelationWithoutConstraints(relation: string): any; withCount(...args: any[]): this; withMax(relation: any, column: string): this; withMin(relation: any, column: string): this; withAvg(relation: any, column: string): this; withSum(relation: any, column: string): this; withExists(relation: any): this; parseWithRelations(relations: TGeneric): TGeneric | never[]; addNestedWiths(name: string, results: TGeneric): TGeneric; prepareNestedWithRelationships(relations: TGeneric, prefix?: string): TGeneric; combineConstraints(constraints: TFunction[]): (builder: Builder) => Builder>; parseNameAndAttributeSelectionConstraint(name: string, value: string): (string | ((query: any) => void))[]; createSelectWithConstraint(name: string): (string | ((query: any) => void))[]; related(relation: string): any; take(this: any, ...args: any[]): any; skip(this: any, ...args: any[]): any; first(this: any, ...columns: any[]): Promise; firstOrFail(...columns: any[]): Promise; findOrFail(this: any, ...args: any[]): Promise; findOrNew(id: string, columns?: string[]): Promise; firstOrNew(this: any, attributes?: {}, values?: {}): Promise; firstOrCreate(this: any, attributes?: TGeneric, values?: {}): Promise; updateOrCreate(attributes: TGeneric, values?: {}): Promise; latest(column?: string): this; oldest(column?: string): this; find(this: any, id: string | number | Collection$2, columns?: string[]): Promise; findMany(this: any, ids: string[] | number[] | ICollection, columns?: string[]): Promise; pluck(column: string): Promise; destroy(this: any, ids?: string | number | string[] | number[] | TFunction | Collection$2): Promise; get(columns?: string | string[]): Promise>; all(columns?: string[]): Promise; paginate(this: any, page?: number, perPage?: number): Promise>; getModels(...columns: any[]): Promise; getRelation(name: string): any; relationsNestedUnder(relation: string): TGeneric; isNestedUnder(relation: string, name: string): boolean; eagerLoadRelation(models: M[], name: string, constraints: any): Promise; eagerLoadRelations(models: M[]): Promise; hydrate(items: any[] | ICollection): Collection$2; } //#endregion //#region src/inspector/types/column.d.ts interface Column { name: string; table: string; data_type: string; default_value: string | null; max_length: number | null; numeric_precision: number | null; numeric_scale: number | null; is_nullable: boolean; is_unique: boolean; is_primary_key: boolean; is_generated: boolean; generation_expression?: string | null; has_auto_increment: boolean; foreign_key_table: string | null; foreign_key_column: string | null; comment?: string | null; schema?: string; foreign_key_schema?: string | null; collation?: string | null; } //#endregion //#region src/inspector/types/foreign-key.d.ts type ForeignKey = { table: string; column: string; foreign_key_table: string; foreign_key_column: string; foreign_key_schema?: string; constraint_name: null | string; on_update: null | 'NO ACTION' | 'RESTRICT' | 'CASCADE' | 'SET NULL' | 'SET DEFAULT'; on_delete: null | 'NO ACTION' | 'RESTRICT' | 'CASCADE' | 'SET NULL' | 'SET DEFAULT'; }; //#endregion //#region src/inspector/types/table.d.ts interface Table { name: string; comment?: string | null; schema?: string; collation?: string; engine?: string; owner?: string; sql?: string; catalog?: string; } //#endregion //#region types/query-builder.d.ts interface SchemaBuilder extends Knex.SchemaBuilder { [k: string]: any; /** * Retrieve all tables in the current database. */ tables(): Promise; /** * Retrieve the table info for the given table, or all tables if no table is specified. * * @param table */ tableInfo(table?: string): Promise; /** * Retrieve all columns in a given table, or all columns if no table is specified. * * @param table */ columns(table?: string): Promise<{ table: string; column: string; }[]>; /** * Retrieve all columns from a given table. Returns all columns if table parameter is undefined. * * @param table * @param column */ columnInfo(table?: string, column?: string): Promise; /** * Retrieve the primary key column for a given table. * * @param table */ primary(table: string): Promise; /** * Retrieve all configured foreign key constraints */ foreignKeys(): Promise; } interface AsMethod { (alias: string): QB; } interface IStatement { grouping: string; direction: string; type: string; value: () => any; not: boolean; nulls: boolean; bool: 'and' | 'or' | 'not'; } interface IQueryBuilder { query: IBuilder; schema: SchemaBuilder; _statements: IStatement[]; table(name: string): IQueryBuilder; select: SelectMethod; addSelect: AddSelectMethod; columns: SelectMethod; column: SelectMethod; distinct: SelectMethod; returning: ReturningMethod; distinctOn: SelectMethod; as: AsMethod; asProxy(): IQueryBuilder; where: WhereMethod; firstOrFail: FirstOrFailMethod; forceDelete: ForceDeleteMethod; andWhere: WhereMethod; orWhere(...args: any[]): this; whereNot: WhereMethod; andWhereNot: WhereMethod; orWhereNot: WhereMethod; whereRaw: WhereRawMethod; orWhereRaw: WhereRawMethod; andWhereRaw: WhereRawMethod; whereWrapped: WhereWrappedMethod; havingWrapped: WhereWrappedMethod; whereExists: WhereExistsMethod; orWhereExists: WhereExistsMethod; whereNotExists: WhereExistsMethod; orWhereNotExists: WhereExistsMethod; restore: RestoreMethod; whereIn: WhereInMethod; orWhereIn: WhereInMethod; whereNotIn: WhereInMethod; orWhereNotIn: WhereInMethod; whereBetween: WhereBetweenMethod; orWhereBetween: WhereBetweenMethod; andWhereBetween: WhereBetweenMethod; whereNotBetween: WhereBetweenMethod; orWhereNotBetween: WhereBetweenMethod; andWhereNotBetween: WhereBetweenMethod; whereNull: WhereNullMethod; orWhereNull: WhereNullMethod; whereNotNull: WhereNullMethod; orWhereNotNull: WhereNullMethod; whereColumn: WhereColumnMethod; orWhereColumn: WhereColumnMethod; andWhereColumn: WhereColumnMethod; whereNotColumn: WhereColumnMethod; orWhereNotColumn: WhereColumnMethod; andWhereNotColumn: WhereColumnMethod; whereJsonIsArray: WhereFieldExpressionMethod; orWhereJsonIsArray: WhereFieldExpressionMethod; whereJsonNotArray: WhereFieldExpressionMethod; orWhereJsonNotArray: WhereFieldExpressionMethod; whereJsonIsObject: WhereFieldExpressionMethod; orWhereJsonIsObject: WhereFieldExpressionMethod; whereJsonNotObject: WhereFieldExpressionMethod; orWhereJsonNotObject: WhereFieldExpressionMethod; whereJsonHasAny: WhereJsonExpressionMethod; orWhereJsonHasAny: WhereJsonExpressionMethod; whereJsonHasAll: WhereJsonExpressionMethod; orWhereJsonHasAll: WhereJsonExpressionMethod; having: WhereMethod; andHaving: WhereMethod; orHaving: WhereMethod; havingRaw: WhereRawMethod; orHavingRaw: WhereRawMethod; havingIn: WhereInMethod; orHavingIn: WhereInMethod; havingNotIn: WhereInMethod; orHavingNotIn: WhereInMethod; havingNull: WhereNullMethod; orHavingNull: WhereNullMethod; havingNotNull: WhereNullMethod; orHavingNotNull: WhereNullMethod; havingExists: WhereExistsMethod; orHavingExists: WhereExistsMethod; havingNotExists: WhereExistsMethod; orHavingNotExists: WhereExistsMethod; havingBetween: WhereBetweenMethod; orHavingBetween: WhereBetweenMethod; havingNotBetween: WhereBetweenMethod; orHavingNotBetween: WhereBetweenMethod; union: UnionMethod; unionAll: UnionMethod; intersect: SetOperationsMethod; join: JoinMethod; joinRaw: JoinRawMethod; innerJoin: JoinMethod; leftJoin: JoinMethod; leftOuterJoin: JoinMethod; rightJoin: JoinMethod; rightOuterJoin: JoinMethod; outerJoin: JoinMethod; fullOuterJoin: JoinMethod; crossJoin: JoinMethod; orderBy: OrderByMethod; orderByRaw: OrderByRawMethod; groupBy: GroupByMethod; groupByRaw: RawInterface; transaction(callback?: TFunction): Promise | null | undefined; destroy(callback: TFunction): Promise; destroy(): Promise; clone(): IQueryBuilder; raw: Knex.RawQueryBuilder; get(columns?: string[]): Promise; first(columns?: string[]): Promise; find(key: string | number, columns?: string[]): Promise; insert(attributes: any): Promise; update(...attributes: any[]): Promise; delete(): Promise; exists(): Promise; count(column?: string): Promise; min(column: string): Promise; max(column: string): Promise; sum(column: string): Promise; avg(column: string): Promise; skip(count: number): this; take(count: number): this; limit(count: number): this; offset(count: number): this; pluck(column: string): Promise>; chunk(count: number, callback: (rows: M[]) => any): Promise; forPage(page: number, perPage?: number): this; paginate(page?: number, perPage?: number): Promise>; } //#endregion //#region src/query-builder.d.ts declare const Inference: { new (): IQueryBuilder; }; declare class QueryBuilder extends Inference { model: M; schema: SchemaBuilder; connector: IQueryBuilder & Knex.QueryBuilder & { _statements: any[]; _single: any; } & Knex; constructor(config: TConfig | null, connector: TFunction); asProxy(): any; beginTransaction(): Promise>; table(table: string): IQueryBuilder; transaction(callback?: TFunction): Promise | undefined | null; find(id: string | number, columns?: string[]): Promise; get(_columns?: string[]): Promise; exists(): Promise; skip(this: any, ...args: any[]): any; take(this: any, ...args: any[]): any; chunk(count: number, callback: TFunction): Promise; paginate(this: any, page?: number, perPage?: number, _pageName?: string, _page?: number): Promise>; forPage(this: any, page?: number, perPage?: number): any; toSQL(...args: any[]): Knex.Sql; count(column: string): Promise; min(column: string): Promise; max(column: string): Promise; sum(column: string): Promise; avg(column: string): Promise; clone(): IQueryBuilder; delete(): Promise; insert(...args: Parameters): Promise; update(...args: Parameters): Promise; destroy(...args: Parameters): Promise; get _statements(): IStatement[] & any[]; get _single(): any; get from(): Knex.Table & Knex.Table; } //#endregion //#region src/relations/relation.d.ts declare class Relation { query: QueryBuilder; parent: any; related: any; eagerKeysWereEmpty: boolean; static constraints: boolean; static selfJoinCount: number; constructor(query: any, parent: any); static extend(trait: Record): void; static noConstraints(callback: () => any): any; asProxy(): any; getRelated(): any; getKeys(models: any[], key?: string | null): any[]; getRelationQuery(): any; whereInEager(whereIn: string, key: string, modelKeys: any[], query?: any): void; whereInMethod(model: any, key: string): string; getEager(): any; get(columns?: string | string[]): Promise; first(columns?: string[]): Promise; paginate(...args: any[]): Promise; count(...args: any[]): Promise; toSql(): string; addConstraints(): void; getRelationCountHash(incrementJoinCount?: boolean): string; getRelationExistenceQuery(query: any, parentQuery: any, columns?: string[]): any; getRelationExistenceCountQuery(query: any, parentQuery: any): any; getQualifiedParentKeyName(): string; getExistenceCompareKey(this: any): string; } //#endregion //#region src/casts/attribute.d.ts interface IAttribute { get?: null | ((value: string, attr: A) => string); set?: null | ((value: string, attr: A) => string | TGeneric); } declare class Attribute { get: IAttribute['get']; set: IAttribute['set']; withCaching: boolean; withObjectCaching: boolean; constructor({ get, set }: IAttribute); static make({ get, set }: IAttribute): Attribute; static get(get: IAttribute['get']): Attribute; static set(set: IAttribute['set']): Attribute; withoutObjectCaching(): this; shouldCache(): this; } //#endregion //#region src/casts-attributes.d.ts interface ICastsAttributes { get?(model: Model$2, key: string, value: string, attributes: TGeneric): string | null | undefined; set?(model: Model$2, key: string, value: string, attributes: TGeneric): string | null | undefined; } declare class CastsAttributes implements ICastsAttributes { constructor(); static get(_model: Model$2, _key: string, _value: string, _attributes: TGeneric): string | null | undefined; static set(_model: Model$2, _key: string, _value: string, _attributes: TGeneric): string | null | undefined; } //#endregion //#region src/concerns/has-unique-ids.d.ts declare const HasUniqueIds: (Model: TBase) => { new (...args: any[]): { [x: string]: any; useUniqueIds: boolean; uniqueIds(): any[]; getKeyType(): any; getIncrementing(): any; }; } & TBase; //#endregion //#region types/database.d.ts type DatabaseSchema = object; type TableName = Extract; type TableRow> = Database[Table]; type TableColumn> = Extract, string>; interface TableBuilder> { where>(column: Column, value: TableRow[Column] | Knex.Raw): this; where>(column: Column, operator: string, value: TableRow[Column] | Knex.Raw): this; where(attributes: Partial>): this; orWhere>(column: Column, value: TableRow[Column] | Knex.Raw): this; whereIn>(column: Column, values: TableRow[Column][]): this; whereNull(column: TableColumn): this; whereNotNull(column: TableColumn): this; select(...columns: (TableColumn | '*')[]): this; orderBy(column: TableColumn, direction?: 'asc' | 'desc' | 'ASC' | 'DESC'): this; limit(count: number): this; offset(count: number): this; first(columns?: TableColumn[]): Promise | undefined>; get(columns?: TableColumn[]): Promise[]>; insert(rows: Partial> | Partial>[]): Promise; update(values: Partial>): Promise; delete(): Promise; count(column?: TableColumn | '*'): Promise; min(column: TableColumn): Promise; max(column: TableColumn): Promise; sum(column: TableColumn): Promise; avg(column: TableColumn): Promise; pluck>(column: Column): Promise[Column]>>; clone(): TableBuilder; } interface TypedArquebus { table
>(name: Table, connection?: string | null): TableBuilder; } //#endregion //#region types/schema.d.ts type ModelRecord = object; type RelationRecord = object; type ModelAttributesOf = M extends { readonly $attributes: infer Attributes; } ? Attributes : never; type ModelRelationsOf = M extends { readonly $relations: infer Relations; } ? Relations : never; type ModelTableOf = M extends { readonly $table: infer Table extends string; } ? Table : string; type ModelColumn = [keyof ModelAttributesOf] extends [never] ? string : Extract, string>; type QualifiedModelColumn = ModelColumn | `${ModelTableOf}.${ModelColumn}`; type ModelColumnValue = Column extends `${string}.${infer Name}` ? Name extends keyof ModelAttributesOf ? ModelAttributesOf[Name] : never : Column extends keyof ModelAttributesOf ? ModelAttributesOf[Column] : never; type ModelInput = Partial>; type ModelRelation = Extract, string>; type ModelRelationPath = [ModelRelation] extends [never] ? string : ModelRelation | `${ModelRelation}.${string}`; type DeclaredModelKey = 'id' extends keyof ModelAttributesOf ? Extract['id'], string | number> : never; type ModelKey = [DeclaredModelKey] extends [never] ? string | number : DeclaredModelKey; type HydratedModel = Model$2 & Attributes & Partial; type DefinedModel = { new (attributes?: Partial): HydratedModel; query>(this: ModelConstructor): ModelBuilder; on>(this: ModelConstructor, connection?: string | null): ModelBuilder; init>(this: ModelConstructor, attributes?: ModelInput): M; make>(this: ModelConstructor, attributes?: ModelInput): M; booting(): void; boot(): void; booted(): void; setConnectionResolver(resolver: unknown): void; extend(plugin: (...args: any[]) => any, options: object): void; }; type ModelConstructor = Model$2> = { new (attributes?: ModelInput): M; }; //#endregion //#region types/model-builder.d.ts type QueryOperator = '=' | '!=' | '<>' | '<' | '<=' | '>' | '>=' | 'like' | 'ilike' | 'in' | 'not in' | (string & {}); type QueryValue = Value | Knex.Raw | ModelBuilder; interface ModelBuilder { query: IBuilder; [method: string]: any; where>(column: Column, value: QueryValue>): this; where>(column: Column, operator: QueryOperator, value: QueryValue>): this; where(attributes: ModelInput): this; where(callback: (query: ModelBuilder) => unknown): this; orWhere>(column: Column, value: QueryValue>): this; orWhere>(column: Column, operator: QueryOperator, value: QueryValue>): this; orWhere(callback: (query: ModelBuilder) => unknown): this; whereIn>(column: Column, values: ModelColumnValue[]): this; whereNotIn>(column: Column, values: ModelColumnValue[]): this; whereNull(column: ModelColumn): this; whereNotNull(column: ModelColumn): this; whereBetween>(column: Column, values: [ModelColumnValue, ModelColumnValue]): this; whereColumn(first: QualifiedModelColumn, operator: QueryOperator, second: QualifiedModelColumn): this; select(...columns: (ModelColumn | '*' | readonly (ModelColumn | '*')[])[]): this; orderBy(column: ModelColumn, direction?: 'asc' | 'desc' | 'ASC' | 'DESC'): this; latest(column?: ModelColumn): this; oldest(column?: ModelColumn): this; limit(count: number): this; take(count: number): this; offset(count: number): this; skip(count: number): this; with(...relations: (ModelRelationPath | readonly ModelRelationPath[] | Partial, (query: ModelBuilder) => unknown>>)[]): this; withCount(...relations: (ModelRelationPath | readonly ModelRelationPath[])[]): this; first(columns?: ModelColumn[]): Promise; firstOrFail(columns?: ModelColumn[]): Promise; find(key: ModelKey, columns?: ModelColumn[]): Promise; findOrFail(key: ModelKey, columns?: ModelColumn[]): Promise; findMany(keys: ModelKey[], columns?: ModelColumn[]): Promise>; get(columns?: ModelColumn[]): Promise>; all(columns?: ModelColumn[]): Promise>; create(attributes?: ModelInput): Promise; firstOrNew(attributes?: ModelInput, values?: ModelInput): Promise; firstOrCreate(attributes?: ModelInput, values?: ModelInput): Promise; updateOrCreate(attributes: ModelInput, values?: ModelInput): Promise; update(attributes: ModelInput): Promise; increment(column: ModelColumn, amount?: number, extra?: ModelInput): Promise; decrement(column: ModelColumn, amount?: number, extra?: ModelInput): Promise; delete(): Promise; forceDelete(): Promise; count(column?: ModelColumn | '*'): Promise; min(column: ModelColumn): Promise; max(column: ModelColumn): Promise; sum(column: ModelColumn): Promise; avg(column: ModelColumn): Promise; pluck>(column: Column): Promise>>; paginate(page?: number, perPage?: number): Promise>; clone(): ModelBuilder; getModel(): M; toSql(): object; } //#endregion //#region src/arquebus.d.ts declare class arquebus { static connectorFactory: typeof Knex$1 | null; static instance: arquebus | null; manager: Record>; connections: Record; models: Record; constructor(); getConstructor(this: InstanceType): T; static getInstance(): arquebus>; static withSchema(): TypedArquebus; /** * Initialize a new database connection * * @returns */ static fire(connection?: C | null): QueryBuilder; /** * Initialize a new database connection * * This is an alias of `arquebus.fire()` and will be removed in the future * * @deprecated since version 0.3.0 * @alias fire * * @returns */ static connection(connection?: C | null): QueryBuilder, Model$2 | Model$2[]>; static setConnectorFactory(connectorFactory: typeof Knex$1): void; static getConnectorFactory(): typeof Knex$1; static addConnection(config: TConfig | TBaseConfig, name?: string): void; static beginTransaction(connection?: null): Promise>; static transaction(callback: TFunction, connection?: null): Promise> | null | undefined; static table(name: string, connection?: null): IQueryBuilder, Model$2 | Model$2[]>; static schema(connection?: null): SchemaBuilder; static destroyAll(): Promise; static createModel(name: string, options: X): typeof Model$2; connection(connection?: string | null): QueryBuilder; getConnection(name?: string | null): QueryBuilder; addConnection(config: TConfig | TBaseConfig, name?: string): void; /** * Autoload the config file * * @param addConnection * @default true * If set to `false` we will no attempt add the connection, we * will just go ahead and return the config * * @returns */ static autoLoad(addConnection?: boolean): Promise; beginTransaction(connection?: null): Promise>; transaction(callback: TFunction, connection?: null): Promise> | null | undefined; table(name: string, connection?: null): IQueryBuilder; schema(connection?: null): SchemaBuilder; destroyAll(): Promise; createModel(name: string, options?: ModelOptions): typeof Model$2; } //#endregion //#region src/errors.d.ts declare class BaseError extends Error { constructor(message: string, _entity?: any); } declare class ModelNotFoundError extends BaseError { model?: IModel; ids: (string | number)[] | string | number; constructor(); setModel(model: IModel, ids?: (string | number)[] | string | number): this; getModel(): IModel | undefined; getIds(): string | number | (string | number)[]; } declare class RelationNotFoundError extends BaseError {} declare class InvalidArgumentError extends BaseError {} //#endregion //#region src/mixin.d.ts /** * Helper type to extract instance type from constructor or mixin function */ type Constructor = MixinConstructor; type Mixin = (Base: TBase) => Constructor; /** * Helper type to convert union to intersection */ type UnionToIntersection = (U extends any ? (k: U) => void : never) extends ((k: infer I) => void) ? I : never; /** * Helper type to get static side of a constructor */ type Static = { [K in keyof T]: T[K]; }; /** * Compose function that merges multiple classes and mixins * * @example * const SomePlugin = TGeneric> (Base: TBase) => { * return class extends Base { * pluginAttribtue = 'plugin' * pluginMethod () { * return this.pluginAttribtue * } * } * } * * // Base class * class Model { * make () { * console.log('make') * } * pluginMethod (id: string) { * } * } * * class User extends compose( * Model, * SomePlugin, * ) { * relationPosts () { * return 'hasMany Posts' * } * } * * const user = new User() * user.make() // from Model * user.pluginMethod() // from SomePlugin * user.relationPosts() // from User * * console.log(user.pluginMethod('w')) // "plugin" * console.log(user.pluginMethod()) // "plugin" * console.log(user.relationPosts()) // "hasMany Posts" * * @param Base * @param mixins * @returns */ declare function compose$1 | Constructor> = any>(Base: TBase, ...mixins: TMixins): Constructor & TBase & UnionToIntersection<{ [K in keyof TMixins]: TMixins[K] extends Mixin ? InstanceType> : TMixins[K] extends Constructor ? InstanceType : never; }[number]>> & UnionToIntersection<{ [K in keyof TMixins]: TMixins[K] extends Mixin ? Static> : TMixins[K] extends Constructor ? Static : never; }[number]> & Static; //#endregion //#region src/utils.d.ts declare const now: (format?: string) => string; declare const getRelationName: (relationMethod: string) => string; declare const getScopeName: (scopeMethod: string) => string; declare const getRelationMethod: (relation: string) => string; declare const getScopeMethod: (scope: string) => string; declare const getAttrMethod: (attr: string) => string; declare const getGetterMethod: (attr: string) => string; declare const getSetterMethod: (attr: string) => string; declare const getAttrName: (attrMethod: string) => string; /** * Tap into a model a collection instance * * @param instance * @param callback * @returns */ declare const tap: (instance: I, callback: (ins: I) => Promise | I) => Promise | I; declare const compose: typeof compose$1; declare const flatten: (arr: A[]) => (A extends readonly (infer InnerArr)[] ? InnerArr : A)[]; declare const flattenDeep: (arr: any) => any; declare const kebabCase: (str: string) => string; declare const snakeCase: (str: string) => string; declare const defineConfig: (config: TConfig) => XGeneric; //#endregion //#region types/container.d.ts interface TBaseConfig { client: 'mysql' | 'mysql2' | 'sqlite3' | 'oracle' | 'mariadb' | 'pg'; connection: { typeCast?(field: TField, next: TFunction): any; dateStrings?: boolean; }; pool?: { afterCreate: (connection: TConfig, callback: (val: any, con: any) => void) => Promise; } | undefined; connections?: arquebus['connections']; migrations?: { table: string; path: string; }; factories?: { path: string; }; seeders?: { path: string; }; models?: { path: string; }; } type TConfig = TBaseConfig & ({ client: 'pg'; connection: Knex.PgConnectionConfig; } | { client: 'oracle'; connection: Knex.OracleDbConnectionConfig; } | { client: 'mysql2'; connection: Knex.MySql2ConnectionConfig; } | { client: 'mysql'; connection: Knex.MySqlConnectionConfig; } | { client: 'sqlite3'; connection: Knex.Sqlite3ConnectionConfig; useNullAsDefault?: boolean; } | { client: 'mariadb'; connection: Knex.MariaSqlConnectionConfig; useNullAsDefault?: boolean; }); interface ModelOptions { table?: string; scopes?: TGeneric<(...args: any[]) => Builder>; plugins?: (>(Model: X) => MixinConstructor)[]; relations?: TGeneric<(...args: any[]) => Relation>; attributes?: TGeneric; CREATED_AT?: string; UPDATED_AT?: string; DELETED_AT?: string; connection?: TBaseConfig['client']; timestamps?: boolean; primaryKey?: string; incrementing?: boolean; keyType?: 'int' | 'string'; with?: Model$2['with']; casts?: Model$2['casts']; } interface TField { type: 'VAR_STRING' | 'BLOB' | 'DATETIME' | 'TIMESTAMP' | 'LONG' | 'JSON'; length: number; db: string; table: string; name: string; string: TFunction; buffer: TFunction; geometry: TFunction; } //#endregion //#region src/browser/model.d.ts declare const BaseModel$1: (new (...args: any[]) => any) & { [x: string]: any; }; declare class Model$1 extends BaseModel$1 { protected primaryKey: string; protected perPage: number; static globalScopes: {}; static pluginInitializers: {}; static _booted: {}; static resolver: arquebus; static browser: boolean; connection: TBaseConfig['client'] | null; constructor(attributes?: {}); static init(attributes?: {}): Model$1; static extend(plugin: TFunction, options: TGeneric): void; static make(attributes?: TGeneric): Model$1; buildRelationships(attributes?: TGeneric): void; bootIfNotBooted(this: any): void; static booting(): void; static boot(): void; static booted(): void; static setConnectionResolver(resolver: arquebus): void; initialize(): void; initializePlugins(this: any): null | undefined; addPluginInitializer(this: any, method: any): void; newInstance(this: any, attributes?: TGeneric, exists?: boolean): any; asProxy(): this; getKey(): any; getKeyName(): string; getForeignKey(): string; getConnectionName(): "mysql" | "mysql2" | "sqlite3" | "oracle" | "mariadb" | "pg" | null; getTable(): any; setConnection(connection: TBaseConfig['client']): this; getKeyType(): any; hasNamedScope(name: string): boolean; callNamedScope(scope: string, parameters: any): any; setTable(table: string): this; newCollection(models?: never[]): Collection; getIncrementing(): any; setIncrementing(value: boolean): this; toData(): Record; toJSON(): Record; toJson(...args: any[]): string; toString(): string; fill(attributes: TGeneric): this; transacting(trx: any): this; trashed(): boolean; newPivot(parent: E, attributes: TGeneric, table: string, exists: boolean, using?: typeof Pivot | null): Pivot; qualifyColumn(column: string): string; getQualifiedKeyName(): string; is(model: any): any; isNot(model: any): boolean; } declare class Pivot extends Model$1 { incrementing: boolean; guarded: never[]; pivotParent: Model$1 | null; foreignKey: string | null; relatedKey: string | null; setPivotKeys(foreignKey: string, relatedKey: string): this; static fromRawAttributes(parent: E, attributes: TGeneric, table: string, exists?: boolean): Pivot; static fromAttributes(parent: E, attributes: TGeneric, table: string, exists?: boolean): Pivot; hasTimestampAttributes(this: any, attributes?: TGeneric | null): boolean; } //#endregion //#region types/utils.d.ts type ICollection = Collection$2; interface IPaginatorParams { current_page?: number; data?: any[]; per_page?: number; total?: number; last_page?: number; count?: number; paginated?: boolean; } interface IPaginator { formatter?(paginator: IPaginator): any | null; setFormatter?(formatter: (paginator: IPaginator) => any | null): void; setItems(items: T[] | Collection$2): void; hasMorePages(): boolean; get(index: number): T | null; count(): number; items(): Collection$2; map(callback: (value: T, index: number) => T): Collection$2; currentPage(): number; perPage(): number; lastPage(): number; firstItem(): number | null; lastItem(): number | null; total(): number; toData(): U; toJSON(): U; toJson(): string; [Symbol.iterator]?(): { next: () => { value: T; done: boolean; }; }; } //#endregion //#region types/builder.d.ts type BaseBuilder | IModel> = Omit, 'destroy' | 'clone' | 'get' | 'skip' | 'limit' | 'take' | 'offset' | 'chunk' | 'forPage' | 'orWhere' | 'pluck'>; interface IScope { apply(builder: Builder, model: Model$2): void; } interface IBuilder | IModel> extends BaseBuilder { connector: IQueryBuilder & Knex.QueryBuilder & { _statements: any[]; _single: any; } & Knex; asProxy(): IBuilder; chunk(count: number, callback: (rows: ICollection) => any): Promise; enforceOrderBy(): void; idOf(id: string | number): this; clone(): IBuilder; forPage(page: number, perPage?: number): this; insert(...attributes: any[]): Promise; update(attributes: any): Promise; increment(column: string, amount?: number, extra?: any): Promise; decrement(column: string, amount?: number, extra?: any): Promise; addUpdatedAtColumn(values: any): any; delete(): Promise; softDelete(): boolean | Promise; forceDelete(): boolean | Promise; restore(): boolean | Promise; withTrashed(): this; withoutTrashed(): this; onlyTrashed(): this; getDeletedAtColumn(): string; create(attributes?: any): Promise; newModelInstance(attributes?: any): M; count(columns?: string): Promise; getQuery(): AnyQueryBuilder; getModel(): M; setModel(model: M): this; setTable(table: string): this; applyScopes(): this; scopes(scopes: string[]): this; withGlobalScope(identifier: string | number, scope: string | (() => void)): this; withoutGlobalScope(scope: IScope | string): this; with(relation: WithRelationType): this; with(...relations: WithRelationType[]): this; has(relation: string, operator?: any, count?: number, boolean?: any, callback?: (builder: IBuilder) => void | null): this; orHas(relation: string, operator?: any, count?: number): this; doesntHave(relation: string, boolean?: any, callback?: (builder: IBuilder) => void | null): this; orDoesntHave(relation: string): this; whereHas(relation: string, callback?: (builder: IBuilder) => void | IBuilder | null, operator?: any, count?: number): this; orWhere(...args: any[]): this; orWhereHas(relation: string, callback?: (builder: IBuilder) => void | IBuilder | null, operator?: any, count?: number): this; whereRelation(relation: string, column: string, operator?: any, value?: any): this; hasNested(relation: string, operator?: any, count?: number, boolean?: any, callback?: (builder: IBuilder) => void | null): this; canUseExistsForExistenceCheck(operator: string, count: number): boolean; addHasWhere(hasQuery: IBuilder, relation: string, operator?: string, count?: number, boolean?: string): this; withAggregate(relations: string | string[] | object, column: string, action?: string | null): this; toSql(): object; withCount(...relations: WithRelationType[]): this; withMax(relation: WithRelationType, column: string): this; withMin(relation: WithRelationType, column: string): this; withAvg(relation: WithRelationType, column: string): this; withSum(relation: WithRelationType, column: string): this; withExists(relation: WithRelationType): this; related(relation: string): this; take(count: number): this; skip(count: number): this; limit(count: number): this; offset(count: number): this; first(column?: string | string[]): Promise; firstOrFail(column?: string | string[]): Promise; findOrFail(key: string | number, columns?: string[]): Promise; findOrFail(key: string[] | number[] | ICollection, columns?: string[]): Promise; findOrFail(key: string | number | string[] | number[] | ICollection, columns?: string[]): Promise; findOrNew(id: string | number, columns?: string[]): Promise; firstOrNew(attributes?: object, values?: object): Promise; firstOrCreate(attributes?: object, values?: object): Promise; updateOrCreate(attributes: object, values?: object): Promise; latest(column?: string): this; oldest(column?: string): this; find(key: string | number, columns?: string[]): Promise; findMany(keys: string[] | number[] | ICollection, columns?: string[]): Promise>; pluck(column: string): Promise>; destroy(ids?: string | number | string[] | number[] | TFunction | ICollection): Promise; get(columns?: string[]): Promise>; all(columns?: string[]): Promise>; paginate(page?: number, perPage?: number): Promise>; [value: string]: any; } //#endregion //#region types/query-methods.d.ts type Operator = string; type ColumnRef = string | Raw; type FieldExpression = string; type TableRef = ColumnRef | AnyQueryBuilder | CallbackVoid; type Selection = ColumnRef | AnyQueryBuilder | CallbackVoid; type QBOrCallback = AnyQueryBuilder | CallbackVoid; interface CallbackVoid { (this: T, arg: T): void; } type Raw = Knex.Raw; type OrderByDirection = 'asc' | 'desc' | 'ASC' | 'DESC'; interface OrderByDescriptor { column: ColumnRef; order?: OrderByDirection; } type AnyQueryBuilder = IQueryBuilder | IBuilder; type Expression = T | Raw | AnyQueryBuilder; type ColumnRefOrOrderByDescriptor = ColumnRef | OrderByDescriptor; interface RawInterface { (sql: string, ...bindings: any[]): R; } interface BaseSetOperations { (callbackOrBuilder: QBOrCallback, wrap?: boolean): QB; (callbacksOrBuilders: QBOrCallback[], wrap?: boolean): QB; } type JoinRawMethod = RawInterface & {}; type OrderByRawMethod = RawInterface & {}; type WhereRawMethod = RawInterface & {}; interface GroupByMethod { (...columns: ColumnRef[]): QB; (columns: ColumnRef[]): QB; } type WithRelationType = { [key: string]: >(builder: T) => T | void; } | string | string[]; interface SetOperationsMethod extends BaseSetOperations { (...callbacksOrBuilders: QBOrCallback[]): QB; } interface SelectMethod { (...columns: Selection[]): QB; (columns: Selection[]): QB; } interface WhereMethod { (col: ColumnRef, op: Operator, expr: Expression): QB; (col: ColumnRef, expr: Expression): QB; (condition: boolean): QB; (cb: CallbackVoid): QB; (raw: Raw): QB; (qb: QBA): QB; (obj: object): QB; } interface WhereWrappedMethod { (cb: CallbackVoid): QB; } interface WhereFieldExpressionMethod { (fieldExpression: FieldExpression): QB; } interface WhereExistsMethod { (cb: CallbackVoid): QB; (raw: Raw): QB; (qb: QBA): QB; } interface WhereInMethod { (col: ColumnRef | ColumnRef[], expr: Expression[]): QB; (col: ColumnRef | ColumnRef[], cb: CallbackVoid): QB; (col: ColumnRef | ColumnRef[], qb: AnyQueryBuilder): QB; } interface WhereBetweenMethod { (column: ColumnRef, range: [Expression, Expression]): QB; } interface WhereNullMethod { (column: ColumnRef): QB; } interface OrderByMethod { (column: ColumnRef, order?: OrderByDirection): QB; (columns: ColumnRefOrOrderByDescriptor[]): QB; } interface WhereJsonExpressionMethod { (fieldExpression: FieldExpression, keys: string | string[]): QB; } interface ReturningMethod { (key: FieldExpression | FieldExpression[], options?: { [key: string]: any; }): QB; } interface FirstOrFailMethod { (): Promise; } interface AddSelectMethod { (params: string[]): QB; } interface ForceDeleteMethod { (): Promise; } interface RestoreMethod { (): Promise; } interface WhereColumnMethod { (col1: ColumnRef, op: Operator, col2: ColumnRef): QB; (col1: ColumnRef, col2: ColumnRef): QB; } interface JoinMethod { (table: TableRef, leftCol: ColumnRef, op: Operator, rightCol: ColumnRef): QB; (table: TableRef, leftCol: ColumnRef, rightCol: ColumnRef): QB; (table: TableRef, cb: CallbackVoid): QB; (table: TableRef, raw: Raw): QB; (raw: Raw): QB; } interface UnionMethod extends BaseSetOperations { (arg1: QBOrCallback, wrap?: boolean): QB; (arg1: QBOrCallback, arg2: QBOrCallback, wrap?: boolean): QB; (arg1: QBOrCallback, arg2: QBOrCallback, arg3: QBOrCallback, wrap?: boolean): QB; (arg1: QBOrCallback, arg2: QBOrCallback, arg3: QBOrCallback, arg4: QBOrCallback, wrap?: boolean): QB; (arg1: QBOrCallback, arg2: QBOrCallback, arg3: QBOrCallback, arg4: QBOrCallback, arg5: QBOrCallback, wrap?: boolean): QB; (arg1: QBOrCallback, arg2: QBOrCallback, arg3: QBOrCallback, arg4: QBOrCallback, arg5: QBOrCallback, arg6: QBOrCallback, wrap?: boolean): QB; (arg1: QBOrCallback, arg2: QBOrCallback, arg3: QBOrCallback, arg4: QBOrCallback, arg5: QBOrCallback, arg6: QBOrCallback, arg7: QBOrCallback, wrap?: boolean): QB; } interface JoinMethod { (table: TableRef, leftCol: ColumnRef, op: Operator, rightCol: ColumnRef): QB; (table: TableRef, leftCol: ColumnRef, rightCol: ColumnRef): QB; (table: TableRef, cb: CallbackVoid): QB; (table: TableRef, raw: Raw): QB; (raw: Raw): QB; } //#endregion //#region src/model.d.ts declare const BaseModel: (new (...args: any[]) => any) & { [x: string]: any; } & { [x: string]: any; attributes: any; relations: any; exists: boolean; connection?: (TBaseConfig["client"] | null) | undefined; perPage: number; with: string | string[] | TGeneric<(...args: any[]) => IBuilder>; trx: AnyQueryBuilder | null; timestamps: boolean; dateFormat: string; visible: string[] & any[]; hidden: string[] & any[]; query: (this: T, client?: AnyQueryBuilder | null) => IBuilder; on: (this: T, connection: string | null) => IBuilder; boot: () => void; make: (this: new () => T, attributes?: TGeneric) => T; addHook: (hook: Hook, callback: TFunction) => void; creating: (callback: TFunction) => void; created: (callback: TFunction) => void; updating: (callback: TFunction) => void; updated: (callback: TFunction) => void; deleting: (callback: TFunction) => void; deleted: (callback: TFunction) => void; saving: (callback: TFunction) => void; saved: (callback: TFunction) => void; restoring: (callback: TFunction) => void; restored: (callback: TFunction) => void; trashed: { (callback: TFunction): void; (): boolean; }; forceDeleted: (callback: TFunction) => void; bootIfNotBooted: () => void; initialize: () => void; initializePlugins: () => void; addPluginInitializer: (method: any) => void; newInstance: (attributes?: TGeneric, exists?: boolean) => any; getKey: () => string | number | null | undefined; getKeyName: () => string; getConnectionName: () => string; getConnection: () => any; setConnection: (connection: TBaseConfig["client"] | null) => (new () => IModel) & IModel & { [x: string]: any; timestamps: boolean; dateFormat: string; usesTimestamps(): boolean; updateTimestamps(): /*elided*/ any; getCreatedAtColumn(): any; getUpdatedAtColumn(): any; setCreatedAt(value: any): /*elided*/ any; setUpdatedAt(value: any): /*elided*/ any; freshTimestamp(): Date; freshTimestampString(): any; } & TGeneric & { [x: string]: any; attributes: TGeneric; original: TGeneric; casts: TGeneric; changes: TGeneric; appends: any[]; setAppends(appends: any[]): /*elided*/ any; append(...keys: any[]): /*elided*/ any; normalizeCastClassResponse(key: string, value: string): TGeneric; syncOriginal(): /*elided*/ any; syncChanges(): /*elided*/ any; syncOriginalAttribute(attribute: string): void; syncOriginalAttributes(...attributes: string[]): /*elided*/ any; isDirty(...attributes: string[]): boolean; getDirty(): TGeneric; originalIsEquivalent(key: string): boolean; setAttributes(attributes: TGeneric): void; setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/ any; getAttributes(): { [x: string]: any; }; setAttribute(key: string, value: string): /*elided*/ any; getAttribute(key: string): any; castAttribute(key: string, value: string): any; attributesToData(): { [x: string]: any; }; mutateAttribute(key: string, value: string | null): any; mutateAttributeForArray(_key: string, _value: string): void; isDateAttribute(key: string): boolean; serializeDate(date?: Date | string | null): string | null; getDates(): any[]; getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">; getCastType(key: string): any; hasCast(key: string, types?: readonly string[]): boolean; withDayjs(date: string): import("dayjs").Dayjs; isCustomCast(cast: any): boolean; isCustomDateTimeCast(cast: any): boolean; isDecimalCast(cast: any): boolean; isDateCastable(key: string): boolean; fromDateTime(value: string): string; getDateFormat(): any; asDecimal(value: string, decimals: number): string; asDateTime(value: any): Date | null; asDate(value: string): Date; } & { [x: string]: any; hidden: any[]; visible: any[]; makeVisible(...keys: string[]): /*elided*/ any; makeHidden(key: string[], ...keys: string[]): /*elided*/ any; getHidden(): any[]; getVisible(): any[]; setHidden(hidden: any[]): /*elided*/ any; setVisible(visible: any[]): /*elided*/ any; } & { [x: string]: any; execHooks(hook: any, options: TGeneric): Promise; } & { [x: string]: any; getGlobalScopes(): any; } & { [x: string]: any; useUniqueIds: boolean; usesUniqueIds(): boolean; uniqueIds(): never[]; setUniqueIds(): void; }; usesUniqueIds: (() => boolean) & (() => boolean); uniqueIds: (() => string[]) & (() => never[]); setUniqueIds: (() => void) & (() => void); getKeyType: () => string; getIncrementing: () => boolean; setIncrementing: (value: boolean) => (new () => IModel) & IModel & { [x: string]: any; timestamps: boolean; dateFormat: string; usesTimestamps(): boolean; updateTimestamps(): /*elided*/ any; getCreatedAtColumn(): any; getUpdatedAtColumn(): any; setCreatedAt(value: any): /*elided*/ any; setUpdatedAt(value: any): /*elided*/ any; freshTimestamp(): Date; freshTimestampString(): any; } & TGeneric & { [x: string]: any; attributes: TGeneric; original: TGeneric; casts: TGeneric; changes: TGeneric; appends: any[]; setAppends(appends: any[]): /*elided*/ any; append(...keys: any[]): /*elided*/ any; normalizeCastClassResponse(key: string, value: string): TGeneric; syncOriginal(): /*elided*/ any; syncChanges(): /*elided*/ any; syncOriginalAttribute(attribute: string): void; syncOriginalAttributes(...attributes: string[]): /*elided*/ any; isDirty(...attributes: string[]): boolean; getDirty(): TGeneric; originalIsEquivalent(key: string): boolean; setAttributes(attributes: TGeneric): void; setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/ any; getAttributes(): { [x: string]: any; }; setAttribute(key: string, value: string): /*elided*/ any; getAttribute(key: string): any; castAttribute(key: string, value: string): any; attributesToData(): { [x: string]: any; }; mutateAttribute(key: string, value: string | null): any; mutateAttributeForArray(_key: string, _value: string): void; isDateAttribute(key: string): boolean; serializeDate(date?: Date | string | null): string | null; getDates(): any[]; getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">; getCastType(key: string): any; hasCast(key: string, types?: readonly string[]): boolean; withDayjs(date: string): import("dayjs").Dayjs; isCustomCast(cast: any): boolean; isCustomDateTimeCast(cast: any): boolean; isDecimalCast(cast: any): boolean; isDateCastable(key: string): boolean; fromDateTime(value: string): string; getDateFormat(): any; asDecimal(value: string, decimals: number): string; asDateTime(value: any): Date | null; asDate(value: string): Date; } & { [x: string]: any; hidden: any[]; visible: any[]; makeVisible(...keys: string[]): /*elided*/ any; makeHidden(key: string[], ...keys: string[]): /*elided*/ any; getHidden(): any[]; getVisible(): any[]; setHidden(hidden: any[]): /*elided*/ any; setVisible(visible: any[]): /*elided*/ any; } & { [x: string]: any; execHooks(hook: any, options: TGeneric): Promise; } & { [x: string]: any; getGlobalScopes(): any; } & { [x: string]: any; useUniqueIds: boolean; usesUniqueIds(): boolean; uniqueIds(): never[]; setUniqueIds(): void; }; getTable: () => string; setTable: (table: string) => (new () => IModel) & IModel & { [x: string]: any; timestamps: boolean; dateFormat: string; usesTimestamps(): boolean; updateTimestamps(): /*elided*/ any; getCreatedAtColumn(): any; getUpdatedAtColumn(): any; setCreatedAt(value: any): /*elided*/ any; setUpdatedAt(value: any): /*elided*/ any; freshTimestamp(): Date; freshTimestampString(): any; } & TGeneric & { [x: string]: any; attributes: TGeneric; original: TGeneric; casts: TGeneric; changes: TGeneric; appends: any[]; setAppends(appends: any[]): /*elided*/ any; append(...keys: any[]): /*elided*/ any; normalizeCastClassResponse(key: string, value: string): TGeneric; syncOriginal(): /*elided*/ any; syncChanges(): /*elided*/ any; syncOriginalAttribute(attribute: string): void; syncOriginalAttributes(...attributes: string[]): /*elided*/ any; isDirty(...attributes: string[]): boolean; getDirty(): TGeneric; originalIsEquivalent(key: string): boolean; setAttributes(attributes: TGeneric): void; setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/ any; getAttributes(): { [x: string]: any; }; setAttribute(key: string, value: string): /*elided*/ any; getAttribute(key: string): any; castAttribute(key: string, value: string): any; attributesToData(): { [x: string]: any; }; mutateAttribute(key: string, value: string | null): any; mutateAttributeForArray(_key: string, _value: string): void; isDateAttribute(key: string): boolean; serializeDate(date?: Date | string | null): string | null; getDates(): any[]; getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">; getCastType(key: string): any; hasCast(key: string, types?: readonly string[]): boolean; withDayjs(date: string): import("dayjs").Dayjs; isCustomCast(cast: any): boolean; isCustomDateTimeCast(cast: any): boolean; isDecimalCast(cast: any): boolean; isDateCastable(key: string): boolean; fromDateTime(value: string): string; getDateFormat(): any; asDecimal(value: string, decimals: number): string; asDateTime(value: any): Date | null; asDate(value: string): Date; } & { [x: string]: any; hidden: any[]; visible: any[]; makeVisible(...keys: string[]): /*elided*/ any; makeHidden(key: string[], ...keys: string[]): /*elided*/ any; getHidden(): any[]; getVisible(): any[]; setHidden(hidden: any[]): /*elided*/ any; setVisible(visible: any[]): /*elided*/ any; } & { [x: string]: any; execHooks(hook: any, options: TGeneric): Promise; } & { [x: string]: any; getGlobalScopes(): any; } & { [x: string]: any; useUniqueIds: boolean; usesUniqueIds(): boolean; uniqueIds(): never[]; setUniqueIds(): void; }; getDates: (() => string[]) & (() => any[]); getDateFormat: (() => string) & (() => any); getAttributes: (() => object) & (() => { [x: string]: any; }); getAttribute: ((key: string) => any) & ((key: string) => any); setAttribute: ((key: string, value: any) => (new () => IModel) & IModel & { [x: string]: any; timestamps: boolean; dateFormat: string; usesTimestamps(): boolean; updateTimestamps(): /*elided*/ any; getCreatedAtColumn(): any; getUpdatedAtColumn(): any; setCreatedAt(value: any): /*elided*/ any; setUpdatedAt(value: any): /*elided*/ any; freshTimestamp(): Date; freshTimestampString(): any; } & TGeneric & { [x: string]: any; attributes: TGeneric; original: TGeneric; casts: TGeneric; changes: TGeneric; appends: any[]; setAppends(appends: any[]): /*elided*/ any; append(...keys: any[]): /*elided*/ any; normalizeCastClassResponse(key: string, value: string): TGeneric; syncOriginal(): /*elided*/ any; syncChanges(): /*elided*/ any; syncOriginalAttribute(attribute: string): void; syncOriginalAttributes(...attributes: string[]): /*elided*/ any; isDirty(...attributes: string[]): boolean; getDirty(): TGeneric; originalIsEquivalent(key: string): boolean; setAttributes(attributes: TGeneric): void; setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/ any; getAttributes(): { [x: string]: any; }; setAttribute(key: string, value: string): /*elided*/ any; getAttribute(key: string): any; castAttribute(key: string, value: string): any; attributesToData(): { [x: string]: any; }; mutateAttribute(key: string, value: string | null): any; mutateAttributeForArray(_key: string, _value: string): void; isDateAttribute(key: string): boolean; serializeDate(date?: Date | string | null): string | null; getDates(): any[]; getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">; getCastType(key: string): any; hasCast(key: string, types?: readonly string[]): boolean; withDayjs(date: string): import("dayjs").Dayjs; isCustomCast(cast: any): boolean; isCustomDateTimeCast(cast: any): boolean; isDecimalCast(cast: any): boolean; isDateCastable(key: string): boolean; fromDateTime(value: string): string; getDateFormat(): any; asDecimal(value: string, decimals: number): string; asDateTime(value: any): Date | null; asDate(value: string): Date; } & { [x: string]: any; hidden: any[]; visible: any[]; makeVisible(...keys: string[]): /*elided*/ any; makeHidden(key: string[], ...keys: string[]): /*elided*/ any; getHidden(): any[]; getVisible(): any[]; setHidden(hidden: any[]): /*elided*/ any; setVisible(visible: any[]): /*elided*/ any; } & { [x: string]: any; execHooks(hook: any, options: TGeneric): Promise; } & { [x: string]: any; getGlobalScopes(): any; } & { [x: string]: any; useUniqueIds: boolean; usesUniqueIds(): boolean; uniqueIds(): never[]; setUniqueIds(): void; }) & ((key: string, value: string) => (new () => IModel) & IModel & { [x: string]: any; timestamps: boolean; dateFormat: string; usesTimestamps(): boolean; updateTimestamps(): /*elided*/ any; getCreatedAtColumn(): any; getUpdatedAtColumn(): any; setCreatedAt(value: any): /*elided*/ any; setUpdatedAt(value: any): /*elided*/ any; freshTimestamp(): Date; freshTimestampString(): any; } & TGeneric & { [x: string]: any; attributes: TGeneric; original: TGeneric; casts: TGeneric; changes: TGeneric; appends: any[]; setAppends(appends: any[]): /*elided*/ any; append(...keys: any[]): /*elided*/ any; normalizeCastClassResponse(key: string, value: string): TGeneric; syncOriginal(): /*elided*/ any; syncChanges(): /*elided*/ any; syncOriginalAttribute(attribute: string): void; syncOriginalAttributes(...attributes: string[]): /*elided*/ any; isDirty(...attributes: string[]): boolean; getDirty(): TGeneric; originalIsEquivalent(key: string): boolean; setAttributes(attributes: TGeneric): void; setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/ any; getAttributes(): { [x: string]: any; }; setAttribute(key: string, value: string): /*elided*/ any; getAttribute(key: string): any; castAttribute(key: string, value: string): any; attributesToData(): { [x: string]: any; }; mutateAttribute(key: string, value: string | null): any; mutateAttributeForArray(_key: string, _value: string): void; isDateAttribute(key: string): boolean; serializeDate(date?: Date | string | null): string | null; getDates(): any[]; getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">; getCastType(key: string): any; hasCast(key: string, types?: readonly string[]): boolean; withDayjs(date: string): import("dayjs").Dayjs; isCustomCast(cast: any): boolean; isCustomDateTimeCast(cast: any): boolean; isDecimalCast(cast: any): boolean; isDateCastable(key: string): boolean; fromDateTime(value: string): string; getDateFormat(): any; asDecimal(value: string, decimals: number): string; asDateTime(value: any): Date | null; asDate(value: string): Date; } & { [x: string]: any; hidden: any[]; visible: any[]; makeVisible(...keys: string[]): /*elided*/ any; makeHidden(key: string[], ...keys: string[]): /*elided*/ any; getHidden(): any[]; getVisible(): any[]; setHidden(hidden: any[]): /*elided*/ any; setVisible(visible: any[]): /*elided*/ any; } & { [x: string]: any; execHooks(hook: any, options: TGeneric): Promise; } & { [x: string]: any; getGlobalScopes(): any; } & { [x: string]: any; useUniqueIds: boolean; usesUniqueIds(): boolean; uniqueIds(): never[]; setUniqueIds(): void; }); fill: (attributes: any) => (new () => IModel) & IModel & { [x: string]: any; timestamps: boolean; dateFormat: string; usesTimestamps(): boolean; updateTimestamps(): /*elided*/ any; getCreatedAtColumn(): any; getUpdatedAtColumn(): any; setCreatedAt(value: any): /*elided*/ any; setUpdatedAt(value: any): /*elided*/ any; freshTimestamp(): Date; freshTimestampString(): any; } & TGeneric & { [x: string]: any; attributes: TGeneric; original: TGeneric; casts: TGeneric; changes: TGeneric; appends: any[]; setAppends(appends: any[]): /*elided*/ any; append(...keys: any[]): /*elided*/ any; normalizeCastClassResponse(key: string, value: string): TGeneric; syncOriginal(): /*elided*/ any; syncChanges(): /*elided*/ any; syncOriginalAttribute(attribute: string): void; syncOriginalAttributes(...attributes: string[]): /*elided*/ any; isDirty(...attributes: string[]): boolean; getDirty(): TGeneric; originalIsEquivalent(key: string): boolean; setAttributes(attributes: TGeneric): void; setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/ any; getAttributes(): { [x: string]: any; }; setAttribute(key: string, value: string): /*elided*/ any; getAttribute(key: string): any; castAttribute(key: string, value: string): any; attributesToData(): { [x: string]: any; }; mutateAttribute(key: string, value: string | null): any; mutateAttributeForArray(_key: string, _value: string): void; isDateAttribute(key: string): boolean; serializeDate(date?: Date | string | null): string | null; getDates(): any[]; getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">; getCastType(key: string): any; hasCast(key: string, types?: readonly string[]): boolean; withDayjs(date: string): import("dayjs").Dayjs; isCustomCast(cast: any): boolean; isCustomDateTimeCast(cast: any): boolean; isDecimalCast(cast: any): boolean; isDateCastable(key: string): boolean; fromDateTime(value: string): string; getDateFormat(): any; asDecimal(value: string, decimals: number): string; asDateTime(value: any): Date | null; asDate(value: string): Date; } & { [x: string]: any; hidden: any[]; visible: any[]; makeVisible(...keys: string[]): /*elided*/ any; makeHidden(key: string[], ...keys: string[]): /*elided*/ any; getHidden(): any[]; getVisible(): any[]; setHidden(hidden: any[]): /*elided*/ any; setVisible(visible: any[]): /*elided*/ any; } & { [x: string]: any; execHooks(hook: any, options: TGeneric): Promise; } & { [x: string]: any; getGlobalScopes(): any; } & { [x: string]: any; useUniqueIds: boolean; usesUniqueIds(): boolean; uniqueIds(): never[]; setUniqueIds(): void; }; setAppends: ((appends: string[]) => (new () => IModel) & IModel & { [x: string]: any; timestamps: boolean; dateFormat: string; usesTimestamps(): boolean; updateTimestamps(): /*elided*/ any; getCreatedAtColumn(): any; getUpdatedAtColumn(): any; setCreatedAt(value: any): /*elided*/ any; setUpdatedAt(value: any): /*elided*/ any; freshTimestamp(): Date; freshTimestampString(): any; } & TGeneric & { [x: string]: any; attributes: TGeneric; original: TGeneric; casts: TGeneric; changes: TGeneric; appends: any[]; setAppends(appends: any[]): /*elided*/ any; append(...keys: any[]): /*elided*/ any; normalizeCastClassResponse(key: string, value: string): TGeneric; syncOriginal(): /*elided*/ any; syncChanges(): /*elided*/ any; syncOriginalAttribute(attribute: string): void; syncOriginalAttributes(...attributes: string[]): /*elided*/ any; isDirty(...attributes: string[]): boolean; getDirty(): TGeneric; originalIsEquivalent(key: string): boolean; setAttributes(attributes: TGeneric): void; setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/ any; getAttributes(): { [x: string]: any; }; setAttribute(key: string, value: string): /*elided*/ any; getAttribute(key: string): any; castAttribute(key: string, value: string): any; attributesToData(): { [x: string]: any; }; mutateAttribute(key: string, value: string | null): any; mutateAttributeForArray(_key: string, _value: string): void; isDateAttribute(key: string): boolean; serializeDate(date?: Date | string | null): string | null; getDates(): any[]; getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">; getCastType(key: string): any; hasCast(key: string, types?: readonly string[]): boolean; withDayjs(date: string): import("dayjs").Dayjs; isCustomCast(cast: any): boolean; isCustomDateTimeCast(cast: any): boolean; isDecimalCast(cast: any): boolean; isDateCastable(key: string): boolean; fromDateTime(value: string): string; getDateFormat(): any; asDecimal(value: string, decimals: number): string; asDateTime(value: any): Date | null; asDate(value: string): Date; } & { [x: string]: any; hidden: any[]; visible: any[]; makeVisible(...keys: string[]): /*elided*/ any; makeHidden(key: string[], ...keys: string[]): /*elided*/ any; getHidden(): any[]; getVisible(): any[]; setHidden(hidden: any[]): /*elided*/ any; setVisible(visible: any[]): /*elided*/ any; } & { [x: string]: any; execHooks(hook: any, options: TGeneric): Promise; } & { [x: string]: any; getGlobalScopes(): any; } & { [x: string]: any; useUniqueIds: boolean; usesUniqueIds(): boolean; uniqueIds(): never[]; setUniqueIds(): void; }) & ((appends: any[]) => (new () => IModel) & IModel & { [x: string]: any; timestamps: boolean; dateFormat: string; usesTimestamps(): boolean; updateTimestamps(): /*elided*/ any; getCreatedAtColumn(): any; getUpdatedAtColumn(): any; setCreatedAt(value: any): /*elided*/ any; setUpdatedAt(value: any): /*elided*/ any; freshTimestamp(): Date; freshTimestampString(): any; } & TGeneric & { [x: string]: any; attributes: TGeneric; original: TGeneric; casts: TGeneric; changes: TGeneric; appends: any[]; setAppends(appends: any[]): /*elided*/ any; append(...keys: any[]): /*elided*/ any; normalizeCastClassResponse(key: string, value: string): TGeneric; syncOriginal(): /*elided*/ any; syncChanges(): /*elided*/ any; syncOriginalAttribute(attribute: string): void; syncOriginalAttributes(...attributes: string[]): /*elided*/ any; isDirty(...attributes: string[]): boolean; getDirty(): TGeneric; originalIsEquivalent(key: string): boolean; setAttributes(attributes: TGeneric): void; setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/ any; getAttributes(): { [x: string]: any; }; setAttribute(key: string, value: string): /*elided*/ any; getAttribute(key: string): any; castAttribute(key: string, value: string): any; attributesToData(): { [x: string]: any; }; mutateAttribute(key: string, value: string | null): any; mutateAttributeForArray(_key: string, _value: string): void; isDateAttribute(key: string): boolean; serializeDate(date?: Date | string | null): string | null; getDates(): any[]; getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">; getCastType(key: string): any; hasCast(key: string, types?: readonly string[]): boolean; withDayjs(date: string): import("dayjs").Dayjs; isCustomCast(cast: any): boolean; isCustomDateTimeCast(cast: any): boolean; isDecimalCast(cast: any): boolean; isDateCastable(key: string): boolean; fromDateTime(value: string): string; getDateFormat(): any; asDecimal(value: string, decimals: number): string; asDateTime(value: any): Date | null; asDate(value: string): Date; } & { [x: string]: any; hidden: any[]; visible: any[]; makeVisible(...keys: string[]): /*elided*/ any; makeHidden(key: string[], ...keys: string[]): /*elided*/ any; getHidden(): any[]; getVisible(): any[]; setHidden(hidden: any[]): /*elided*/ any; setVisible(visible: any[]): /*elided*/ any; } & { [x: string]: any; execHooks(hook: any, options: TGeneric): Promise; } & { [x: string]: any; getGlobalScopes(): any; } & { [x: string]: any; useUniqueIds: boolean; usesUniqueIds(): boolean; uniqueIds(): never[]; setUniqueIds(): void; }); append: ((key: string | string[]) => (new () => IModel) & IModel & { [x: string]: any; timestamps: boolean; dateFormat: string; usesTimestamps(): boolean; updateTimestamps(): /*elided*/ any; getCreatedAtColumn(): any; getUpdatedAtColumn(): any; setCreatedAt(value: any): /*elided*/ any; setUpdatedAt(value: any): /*elided*/ any; freshTimestamp(): Date; freshTimestampString(): any; } & TGeneric & { [x: string]: any; attributes: TGeneric; original: TGeneric; casts: TGeneric; changes: TGeneric; appends: any[]; setAppends(appends: any[]): /*elided*/ any; append(...keys: any[]): /*elided*/ any; normalizeCastClassResponse(key: string, value: string): TGeneric; syncOriginal(): /*elided*/ any; syncChanges(): /*elided*/ any; syncOriginalAttribute(attribute: string): void; syncOriginalAttributes(...attributes: string[]): /*elided*/ any; isDirty(...attributes: string[]): boolean; getDirty(): TGeneric; originalIsEquivalent(key: string): boolean; setAttributes(attributes: TGeneric): void; setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/ any; getAttributes(): { [x: string]: any; }; setAttribute(key: string, value: string): /*elided*/ any; getAttribute(key: string): any; castAttribute(key: string, value: string): any; attributesToData(): { [x: string]: any; }; mutateAttribute(key: string, value: string | null): any; mutateAttributeForArray(_key: string, _value: string): void; isDateAttribute(key: string): boolean; serializeDate(date?: Date | string | null): string | null; getDates(): any[]; getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">; getCastType(key: string): any; hasCast(key: string, types?: readonly string[]): boolean; withDayjs(date: string): import("dayjs").Dayjs; isCustomCast(cast: any): boolean; isCustomDateTimeCast(cast: any): boolean; isDecimalCast(cast: any): boolean; isDateCastable(key: string): boolean; fromDateTime(value: string): string; getDateFormat(): any; asDecimal(value: string, decimals: number): string; asDateTime(value: any): Date | null; asDate(value: string): Date; } & { [x: string]: any; hidden: any[]; visible: any[]; makeVisible(...keys: string[]): /*elided*/ any; makeHidden(key: string[], ...keys: string[]): /*elided*/ any; getHidden(): any[]; getVisible(): any[]; setHidden(hidden: any[]): /*elided*/ any; setVisible(visible: any[]): /*elided*/ any; } & { [x: string]: any; execHooks(hook: any, options: TGeneric): Promise; } & { [x: string]: any; getGlobalScopes(): any; } & { [x: string]: any; useUniqueIds: boolean; usesUniqueIds(): boolean; uniqueIds(): never[]; setUniqueIds(): void; }) & ((...keys: any[]) => (new () => IModel) & IModel & { [x: string]: any; timestamps: boolean; dateFormat: string; usesTimestamps(): boolean; updateTimestamps(): /*elided*/ any; getCreatedAtColumn(): any; getUpdatedAtColumn(): any; setCreatedAt(value: any): /*elided*/ any; setUpdatedAt(value: any): /*elided*/ any; freshTimestamp(): Date; freshTimestampString(): any; } & TGeneric & { [x: string]: any; attributes: TGeneric; original: TGeneric; casts: TGeneric; changes: TGeneric; appends: any[]; setAppends(appends: any[]): /*elided*/ any; append(...keys: any[]): /*elided*/ any; normalizeCastClassResponse(key: string, value: string): TGeneric; syncOriginal(): /*elided*/ any; syncChanges(): /*elided*/ any; syncOriginalAttribute(attribute: string): void; syncOriginalAttributes(...attributes: string[]): /*elided*/ any; isDirty(...attributes: string[]): boolean; getDirty(): TGeneric; originalIsEquivalent(key: string): boolean; setAttributes(attributes: TGeneric): void; setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/ any; getAttributes(): { [x: string]: any; }; setAttribute(key: string, value: string): /*elided*/ any; getAttribute(key: string): any; castAttribute(key: string, value: string): any; attributesToData(): { [x: string]: any; }; mutateAttribute(key: string, value: string | null): any; mutateAttributeForArray(_key: string, _value: string): void; isDateAttribute(key: string): boolean; serializeDate(date?: Date | string | null): string | null; getDates(): any[]; getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">; getCastType(key: string): any; hasCast(key: string, types?: readonly string[]): boolean; withDayjs(date: string): import("dayjs").Dayjs; isCustomCast(cast: any): boolean; isCustomDateTimeCast(cast: any): boolean; isDecimalCast(cast: any): boolean; isDateCastable(key: string): boolean; fromDateTime(value: string): string; getDateFormat(): any; asDecimal(value: string, decimals: number): string; asDateTime(value: any): Date | null; asDate(value: string): Date; } & { [x: string]: any; hidden: any[]; visible: any[]; makeVisible(...keys: string[]): /*elided*/ any; makeHidden(key: string[], ...keys: string[]): /*elided*/ any; getHidden(): any[]; getVisible(): any[]; setHidden(hidden: any[]): /*elided*/ any; setVisible(visible: any[]): /*elided*/ any; } & { [x: string]: any; execHooks(hook: any, options: TGeneric): Promise; } & { [x: string]: any; getGlobalScopes(): any; } & { [x: string]: any; useUniqueIds: boolean; usesUniqueIds(): boolean; uniqueIds(): never[]; setUniqueIds(): void; }); getRelation: { (relation: string): T | ICollection | null | undefined; (relation: string): IsCollection extends true ? ICollection | undefined : T | null | undefined; }; setRelation: (relation: string, value: T | ICollection | null) => (new () => IModel) & IModel & { [x: string]: any; timestamps: boolean; dateFormat: string; usesTimestamps(): boolean; updateTimestamps(): /*elided*/ any; getCreatedAtColumn(): any; getUpdatedAtColumn(): any; setCreatedAt(value: any): /*elided*/ any; setUpdatedAt(value: any): /*elided*/ any; freshTimestamp(): Date; freshTimestampString(): any; } & TGeneric & { [x: string]: any; attributes: TGeneric; original: TGeneric; casts: TGeneric; changes: TGeneric; appends: any[]; setAppends(appends: any[]): /*elided*/ any; append(...keys: any[]): /*elided*/ any; normalizeCastClassResponse(key: string, value: string): TGeneric; syncOriginal(): /*elided*/ any; syncChanges(): /*elided*/ any; syncOriginalAttribute(attribute: string): void; syncOriginalAttributes(...attributes: string[]): /*elided*/ any; isDirty(...attributes: string[]): boolean; getDirty(): TGeneric; originalIsEquivalent(key: string): boolean; setAttributes(attributes: TGeneric): void; setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/ any; getAttributes(): { [x: string]: any; }; setAttribute(key: string, value: string): /*elided*/ any; getAttribute(key: string): any; castAttribute(key: string, value: string): any; attributesToData(): { [x: string]: any; }; mutateAttribute(key: string, value: string | null): any; mutateAttributeForArray(_key: string, _value: string): void; isDateAttribute(key: string): boolean; serializeDate(date?: Date | string | null): string | null; getDates(): any[]; getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">; getCastType(key: string): any; hasCast(key: string, types?: readonly string[]): boolean; withDayjs(date: string): import("dayjs").Dayjs; isCustomCast(cast: any): boolean; isCustomDateTimeCast(cast: any): boolean; isDecimalCast(cast: any): boolean; isDateCastable(key: string): boolean; fromDateTime(value: string): string; getDateFormat(): any; asDecimal(value: string, decimals: number): string; asDateTime(value: any): Date | null; asDate(value: string): Date; } & { [x: string]: any; hidden: any[]; visible: any[]; makeVisible(...keys: string[]): /*elided*/ any; makeHidden(key: string[], ...keys: string[]): /*elided*/ any; getHidden(): any[]; getVisible(): any[]; setHidden(hidden: any[]): /*elided*/ any; setVisible(visible: any[]): /*elided*/ any; } & { [x: string]: any; execHooks(hook: any, options: TGeneric): Promise; } & { [x: string]: any; getGlobalScopes(): any; } & { [x: string]: any; useUniqueIds: boolean; usesUniqueIds(): boolean; uniqueIds(): never[]; setUniqueIds(): void; }; unsetRelation: (relation: string) => (new () => IModel) & IModel & { [x: string]: any; timestamps: boolean; dateFormat: string; usesTimestamps(): boolean; updateTimestamps(): /*elided*/ any; getCreatedAtColumn(): any; getUpdatedAtColumn(): any; setCreatedAt(value: any): /*elided*/ any; setUpdatedAt(value: any): /*elided*/ any; freshTimestamp(): Date; freshTimestampString(): any; } & TGeneric & { [x: string]: any; attributes: TGeneric; original: TGeneric; casts: TGeneric; changes: TGeneric; appends: any[]; setAppends(appends: any[]): /*elided*/ any; append(...keys: any[]): /*elided*/ any; normalizeCastClassResponse(key: string, value: string): TGeneric; syncOriginal(): /*elided*/ any; syncChanges(): /*elided*/ any; syncOriginalAttribute(attribute: string): void; syncOriginalAttributes(...attributes: string[]): /*elided*/ any; isDirty(...attributes: string[]): boolean; getDirty(): TGeneric; originalIsEquivalent(key: string): boolean; setAttributes(attributes: TGeneric): void; setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/ any; getAttributes(): { [x: string]: any; }; setAttribute(key: string, value: string): /*elided*/ any; getAttribute(key: string): any; castAttribute(key: string, value: string): any; attributesToData(): { [x: string]: any; }; mutateAttribute(key: string, value: string | null): any; mutateAttributeForArray(_key: string, _value: string): void; isDateAttribute(key: string): boolean; serializeDate(date?: Date | string | null): string | null; getDates(): any[]; getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">; getCastType(key: string): any; hasCast(key: string, types?: readonly string[]): boolean; withDayjs(date: string): import("dayjs").Dayjs; isCustomCast(cast: any): boolean; isCustomDateTimeCast(cast: any): boolean; isDecimalCast(cast: any): boolean; isDateCastable(key: string): boolean; fromDateTime(value: string): string; getDateFormat(): any; asDecimal(value: string, decimals: number): string; asDateTime(value: any): Date | null; asDate(value: string): Date; } & { [x: string]: any; hidden: any[]; visible: any[]; makeVisible(...keys: string[]): /*elided*/ any; makeHidden(key: string[], ...keys: string[]): /*elided*/ any; getHidden(): any[]; getVisible(): any[]; setHidden(hidden: any[]): /*elided*/ any; setVisible(visible: any[]): /*elided*/ any; } & { [x: string]: any; execHooks(hook: any, options: TGeneric): Promise; } & { [x: string]: any; getGlobalScopes(): any; } & { [x: string]: any; useUniqueIds: boolean; usesUniqueIds(): boolean; uniqueIds(): never[]; setUniqueIds(): void; }; relationLoaded: (relation: string) => boolean; makeVisible: ((attributes: string | string[]) => (new () => IModel) & IModel & { [x: string]: any; timestamps: boolean; dateFormat: string; usesTimestamps(): boolean; updateTimestamps(): /*elided*/ any; getCreatedAtColumn(): any; getUpdatedAtColumn(): any; setCreatedAt(value: any): /*elided*/ any; setUpdatedAt(value: any): /*elided*/ any; freshTimestamp(): Date; freshTimestampString(): any; } & TGeneric & { [x: string]: any; attributes: TGeneric; original: TGeneric; casts: TGeneric; changes: TGeneric; appends: any[]; setAppends(appends: any[]): /*elided*/ any; append(...keys: any[]): /*elided*/ any; normalizeCastClassResponse(key: string, value: string): TGeneric; syncOriginal(): /*elided*/ any; syncChanges(): /*elided*/ any; syncOriginalAttribute(attribute: string): void; syncOriginalAttributes(...attributes: string[]): /*elided*/ any; isDirty(...attributes: string[]): boolean; getDirty(): TGeneric; originalIsEquivalent(key: string): boolean; setAttributes(attributes: TGeneric): void; setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/ any; getAttributes(): { [x: string]: any; }; setAttribute(key: string, value: string): /*elided*/ any; getAttribute(key: string): any; castAttribute(key: string, value: string): any; attributesToData(): { [x: string]: any; }; mutateAttribute(key: string, value: string | null): any; mutateAttributeForArray(_key: string, _value: string): void; isDateAttribute(key: string): boolean; serializeDate(date?: Date | string | null): string | null; getDates(): any[]; getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">; getCastType(key: string): any; hasCast(key: string, types?: readonly string[]): boolean; withDayjs(date: string): import("dayjs").Dayjs; isCustomCast(cast: any): boolean; isCustomDateTimeCast(cast: any): boolean; isDecimalCast(cast: any): boolean; isDateCastable(key: string): boolean; fromDateTime(value: string): string; getDateFormat(): any; asDecimal(value: string, decimals: number): string; asDateTime(value: any): Date | null; asDate(value: string): Date; } & { [x: string]: any; hidden: any[]; visible: any[]; makeVisible(...keys: string[]): /*elided*/ any; makeHidden(key: string[], ...keys: string[]): /*elided*/ any; getHidden(): any[]; getVisible(): any[]; setHidden(hidden: any[]): /*elided*/ any; setVisible(visible: any[]): /*elided*/ any; } & { [x: string]: any; execHooks(hook: any, options: TGeneric): Promise; } & { [x: string]: any; getGlobalScopes(): any; } & { [x: string]: any; useUniqueIds: boolean; usesUniqueIds(): boolean; uniqueIds(): never[]; setUniqueIds(): void; }) & ((...keys: string[]) => (new () => IModel) & IModel & { [x: string]: any; timestamps: boolean; dateFormat: string; usesTimestamps(): boolean; updateTimestamps(): /*elided*/ any; getCreatedAtColumn(): any; getUpdatedAtColumn(): any; setCreatedAt(value: any): /*elided*/ any; setUpdatedAt(value: any): /*elided*/ any; freshTimestamp(): Date; freshTimestampString(): any; } & TGeneric & { [x: string]: any; attributes: TGeneric; original: TGeneric; casts: TGeneric; changes: TGeneric; appends: any[]; setAppends(appends: any[]): /*elided*/ any; append(...keys: any[]): /*elided*/ any; normalizeCastClassResponse(key: string, value: string): TGeneric; syncOriginal(): /*elided*/ any; syncChanges(): /*elided*/ any; syncOriginalAttribute(attribute: string): void; syncOriginalAttributes(...attributes: string[]): /*elided*/ any; isDirty(...attributes: string[]): boolean; getDirty(): TGeneric; originalIsEquivalent(key: string): boolean; setAttributes(attributes: TGeneric): void; setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/ any; getAttributes(): { [x: string]: any; }; setAttribute(key: string, value: string): /*elided*/ any; getAttribute(key: string): any; castAttribute(key: string, value: string): any; attributesToData(): { [x: string]: any; }; mutateAttribute(key: string, value: string | null): any; mutateAttributeForArray(_key: string, _value: string): void; isDateAttribute(key: string): boolean; serializeDate(date?: Date | string | null): string | null; getDates(): any[]; getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">; getCastType(key: string): any; hasCast(key: string, types?: readonly string[]): boolean; withDayjs(date: string): import("dayjs").Dayjs; isCustomCast(cast: any): boolean; isCustomDateTimeCast(cast: any): boolean; isDecimalCast(cast: any): boolean; isDateCastable(key: string): boolean; fromDateTime(value: string): string; getDateFormat(): any; asDecimal(value: string, decimals: number): string; asDateTime(value: any): Date | null; asDate(value: string): Date; } & { [x: string]: any; hidden: any[]; visible: any[]; makeVisible(...keys: string[]): /*elided*/ any; makeHidden(key: string[], ...keys: string[]): /*elided*/ any; getHidden(): any[]; getVisible(): any[]; setHidden(hidden: any[]): /*elided*/ any; setVisible(visible: any[]): /*elided*/ any; } & { [x: string]: any; execHooks(hook: any, options: TGeneric): Promise; } & { [x: string]: any; getGlobalScopes(): any; } & { [x: string]: any; useUniqueIds: boolean; usesUniqueIds(): boolean; uniqueIds(): never[]; setUniqueIds(): void; }); makeHidden: ((attributes: string | string[]) => (new () => IModel) & IModel & { [x: string]: any; timestamps: boolean; dateFormat: string; usesTimestamps(): boolean; updateTimestamps(): /*elided*/ any; getCreatedAtColumn(): any; getUpdatedAtColumn(): any; setCreatedAt(value: any): /*elided*/ any; setUpdatedAt(value: any): /*elided*/ any; freshTimestamp(): Date; freshTimestampString(): any; } & TGeneric & { [x: string]: any; attributes: TGeneric; original: TGeneric; casts: TGeneric; changes: TGeneric; appends: any[]; setAppends(appends: any[]): /*elided*/ any; append(...keys: any[]): /*elided*/ any; normalizeCastClassResponse(key: string, value: string): TGeneric; syncOriginal(): /*elided*/ any; syncChanges(): /*elided*/ any; syncOriginalAttribute(attribute: string): void; syncOriginalAttributes(...attributes: string[]): /*elided*/ any; isDirty(...attributes: string[]): boolean; getDirty(): TGeneric; originalIsEquivalent(key: string): boolean; setAttributes(attributes: TGeneric): void; setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/ any; getAttributes(): { [x: string]: any; }; setAttribute(key: string, value: string): /*elided*/ any; getAttribute(key: string): any; castAttribute(key: string, value: string): any; attributesToData(): { [x: string]: any; }; mutateAttribute(key: string, value: string | null): any; mutateAttributeForArray(_key: string, _value: string): void; isDateAttribute(key: string): boolean; serializeDate(date?: Date | string | null): string | null; getDates(): any[]; getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">; getCastType(key: string): any; hasCast(key: string, types?: readonly string[]): boolean; withDayjs(date: string): import("dayjs").Dayjs; isCustomCast(cast: any): boolean; isCustomDateTimeCast(cast: any): boolean; isDecimalCast(cast: any): boolean; isDateCastable(key: string): boolean; fromDateTime(value: string): string; getDateFormat(): any; asDecimal(value: string, decimals: number): string; asDateTime(value: any): Date | null; asDate(value: string): Date; } & { [x: string]: any; hidden: any[]; visible: any[]; makeVisible(...keys: string[]): /*elided*/ any; makeHidden(key: string[], ...keys: string[]): /*elided*/ any; getHidden(): any[]; getVisible(): any[]; setHidden(hidden: any[]): /*elided*/ any; setVisible(visible: any[]): /*elided*/ any; } & { [x: string]: any; execHooks(hook: any, options: TGeneric): Promise; } & { [x: string]: any; getGlobalScopes(): any; } & { [x: string]: any; useUniqueIds: boolean; usesUniqueIds(): boolean; uniqueIds(): never[]; setUniqueIds(): void; }) & ((key: string[], ...keys: string[]) => (new () => IModel) & IModel & { [x: string]: any; timestamps: boolean; dateFormat: string; usesTimestamps(): boolean; updateTimestamps(): /*elided*/ any; getCreatedAtColumn(): any; getUpdatedAtColumn(): any; setCreatedAt(value: any): /*elided*/ any; setUpdatedAt(value: any): /*elided*/ any; freshTimestamp(): Date; freshTimestampString(): any; } & TGeneric & { [x: string]: any; attributes: TGeneric; original: TGeneric; casts: TGeneric; changes: TGeneric; appends: any[]; setAppends(appends: any[]): /*elided*/ any; append(...keys: any[]): /*elided*/ any; normalizeCastClassResponse(key: string, value: string): TGeneric; syncOriginal(): /*elided*/ any; syncChanges(): /*elided*/ any; syncOriginalAttribute(attribute: string): void; syncOriginalAttributes(...attributes: string[]): /*elided*/ any; isDirty(...attributes: string[]): boolean; getDirty(): TGeneric; originalIsEquivalent(key: string): boolean; setAttributes(attributes: TGeneric): void; setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/ any; getAttributes(): { [x: string]: any; }; setAttribute(key: string, value: string): /*elided*/ any; getAttribute(key: string): any; castAttribute(key: string, value: string): any; attributesToData(): { [x: string]: any; }; mutateAttribute(key: string, value: string | null): any; mutateAttributeForArray(_key: string, _value: string): void; isDateAttribute(key: string): boolean; serializeDate(date?: Date | string | null): string | null; getDates(): any[]; getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">; getCastType(key: string): any; hasCast(key: string, types?: readonly string[]): boolean; withDayjs(date: string): import("dayjs").Dayjs; isCustomCast(cast: any): boolean; isCustomDateTimeCast(cast: any): boolean; isDecimalCast(cast: any): boolean; isDateCastable(key: string): boolean; fromDateTime(value: string): string; getDateFormat(): any; asDecimal(value: string, decimals: number): string; asDateTime(value: any): Date | null; asDate(value: string): Date; } & { [x: string]: any; hidden: any[]; visible: any[]; makeVisible(...keys: string[]): /*elided*/ any; makeHidden(key: string[], ...keys: string[]): /*elided*/ any; getHidden(): any[]; getVisible(): any[]; setHidden(hidden: any[]): /*elided*/ any; setVisible(visible: any[]): /*elided*/ any; } & { [x: string]: any; execHooks(hook: any, options: TGeneric): Promise; } & { [x: string]: any; getGlobalScopes(): any; } & { [x: string]: any; useUniqueIds: boolean; usesUniqueIds(): boolean; uniqueIds(): never[]; setUniqueIds(): void; }); newCollection: (models?: any[]) => ICollection; load: { (relations: WithRelationType): Promise<(new () => IModel) & IModel & { [x: string]: any; timestamps: boolean; dateFormat: string; usesTimestamps(): boolean; updateTimestamps(): /*elided*/ any; getCreatedAtColumn(): any; getUpdatedAtColumn(): any; setCreatedAt(value: any): /*elided*/ any; setUpdatedAt(value: any): /*elided*/ any; freshTimestamp(): Date; freshTimestampString(): any; } & TGeneric & { [x: string]: any; attributes: TGeneric; original: TGeneric; casts: TGeneric; changes: TGeneric; appends: any[]; setAppends(appends: any[]): /*elided*/ any; append(...keys: any[]): /*elided*/ any; normalizeCastClassResponse(key: string, value: string): TGeneric; syncOriginal(): /*elided*/ any; syncChanges(): /*elided*/ any; syncOriginalAttribute(attribute: string): void; syncOriginalAttributes(...attributes: string[]): /*elided*/ any; isDirty(...attributes: string[]): boolean; getDirty(): TGeneric; originalIsEquivalent(key: string): boolean; setAttributes(attributes: TGeneric): void; setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/ any; getAttributes(): { [x: string]: any; }; setAttribute(key: string, value: string): /*elided*/ any; getAttribute(key: string): any; castAttribute(key: string, value: string): any; attributesToData(): { [x: string]: any; }; mutateAttribute(key: string, value: string | null): any; mutateAttributeForArray(_key: string, _value: string): void; isDateAttribute(key: string): boolean; serializeDate(date?: Date | string | null): string | null; getDates(): any[]; getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">; getCastType(key: string): any; hasCast(key: string, types?: readonly string[]): boolean; withDayjs(date: string): import("dayjs").Dayjs; isCustomCast(cast: any): boolean; isCustomDateTimeCast(cast: any): boolean; isDecimalCast(cast: any): boolean; isDateCastable(key: string): boolean; fromDateTime(value: string): string; getDateFormat(): any; asDecimal(value: string, decimals: number): string; asDateTime(value: any): Date | null; asDate(value: string): Date; } & { [x: string]: any; hidden: any[]; visible: any[]; makeVisible(...keys: string[]): /*elided*/ any; makeHidden(key: string[], ...keys: string[]): /*elided*/ any; getHidden(): any[]; getVisible(): any[]; setHidden(hidden: any[]): /*elided*/ any; setVisible(visible: any[]): /*elided*/ any; } & { [x: string]: any; execHooks(hook: any, options: TGeneric): Promise; } & { [x: string]: any; getGlobalScopes(): any; } & { [x: string]: any; useUniqueIds: boolean; usesUniqueIds(): boolean; uniqueIds(): never[]; setUniqueIds(): void; }>; (...relations: WithRelationType[]): Promise<(new () => IModel) & IModel & { [x: string]: any; timestamps: boolean; dateFormat: string; usesTimestamps(): boolean; updateTimestamps(): /*elided*/ any; getCreatedAtColumn(): any; getUpdatedAtColumn(): any; setCreatedAt(value: any): /*elided*/ any; setUpdatedAt(value: any): /*elided*/ any; freshTimestamp(): Date; freshTimestampString(): any; } & TGeneric & { [x: string]: any; attributes: TGeneric; original: TGeneric; casts: TGeneric; changes: TGeneric; appends: any[]; setAppends(appends: any[]): /*elided*/ any; append(...keys: any[]): /*elided*/ any; normalizeCastClassResponse(key: string, value: string): TGeneric; syncOriginal(): /*elided*/ any; syncChanges(): /*elided*/ any; syncOriginalAttribute(attribute: string): void; syncOriginalAttributes(...attributes: string[]): /*elided*/ any; isDirty(...attributes: string[]): boolean; getDirty(): TGeneric; originalIsEquivalent(key: string): boolean; setAttributes(attributes: TGeneric): void; setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/ any; getAttributes(): { [x: string]: any; }; setAttribute(key: string, value: string): /*elided*/ any; getAttribute(key: string): any; castAttribute(key: string, value: string): any; attributesToData(): { [x: string]: any; }; mutateAttribute(key: string, value: string | null): any; mutateAttributeForArray(_key: string, _value: string): void; isDateAttribute(key: string): boolean; serializeDate(date?: Date | string | null): string | null; getDates(): any[]; getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">; getCastType(key: string): any; hasCast(key: string, types?: readonly string[]): boolean; withDayjs(date: string): import("dayjs").Dayjs; isCustomCast(cast: any): boolean; isCustomDateTimeCast(cast: any): boolean; isDecimalCast(cast: any): boolean; isDateCastable(key: string): boolean; fromDateTime(value: string): string; getDateFormat(): any; asDecimal(value: string, decimals: number): string; asDateTime(value: any): Date | null; asDate(value: string): Date; } & { [x: string]: any; hidden: any[]; visible: any[]; makeVisible(...keys: string[]): /*elided*/ any; makeHidden(key: string[], ...keys: string[]): /*elided*/ any; getHidden(): any[]; getVisible(): any[]; setHidden(hidden: any[]): /*elided*/ any; setVisible(visible: any[]): /*elided*/ any; } & { [x: string]: any; execHooks(hook: any, options: TGeneric): Promise; } & { [x: string]: any; getGlobalScopes(): any; } & { [x: string]: any; useUniqueIds: boolean; usesUniqueIds(): boolean; uniqueIds(): never[]; setUniqueIds(): void; }>; }; loadAggregate: (relations: WithRelationType, column: any, callback?: any) => Promise<(new () => IModel) & IModel & { [x: string]: any; timestamps: boolean; dateFormat: string; usesTimestamps(): boolean; updateTimestamps(): /*elided*/ any; getCreatedAtColumn(): any; getUpdatedAtColumn(): any; setCreatedAt(value: any): /*elided*/ any; setUpdatedAt(value: any): /*elided*/ any; freshTimestamp(): Date; freshTimestampString(): any; } & TGeneric & { [x: string]: any; attributes: TGeneric; original: TGeneric; casts: TGeneric; changes: TGeneric; appends: any[]; setAppends(appends: any[]): /*elided*/ any; append(...keys: any[]): /*elided*/ any; normalizeCastClassResponse(key: string, value: string): TGeneric; syncOriginal(): /*elided*/ any; syncChanges(): /*elided*/ any; syncOriginalAttribute(attribute: string): void; syncOriginalAttributes(...attributes: string[]): /*elided*/ any; isDirty(...attributes: string[]): boolean; getDirty(): TGeneric; originalIsEquivalent(key: string): boolean; setAttributes(attributes: TGeneric): void; setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/ any; getAttributes(): { [x: string]: any; }; setAttribute(key: string, value: string): /*elided*/ any; getAttribute(key: string): any; castAttribute(key: string, value: string): any; attributesToData(): { [x: string]: any; }; mutateAttribute(key: string, value: string | null): any; mutateAttributeForArray(_key: string, _value: string): void; isDateAttribute(key: string): boolean; serializeDate(date?: Date | string | null): string | null; getDates(): any[]; getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">; getCastType(key: string): any; hasCast(key: string, types?: readonly string[]): boolean; withDayjs(date: string): import("dayjs").Dayjs; isCustomCast(cast: any): boolean; isCustomDateTimeCast(cast: any): boolean; isDecimalCast(cast: any): boolean; isDateCastable(key: string): boolean; fromDateTime(value: string): string; getDateFormat(): any; asDecimal(value: string, decimals: number): string; asDateTime(value: any): Date | null; asDate(value: string): Date; } & { [x: string]: any; hidden: any[]; visible: any[]; makeVisible(...keys: string[]): /*elided*/ any; makeHidden(key: string[], ...keys: string[]): /*elided*/ any; getHidden(): any[]; getVisible(): any[]; setHidden(hidden: any[]): /*elided*/ any; setVisible(visible: any[]): /*elided*/ any; } & { [x: string]: any; execHooks(hook: any, options: TGeneric): Promise; } & { [x: string]: any; getGlobalScopes(): any; } & { [x: string]: any; useUniqueIds: boolean; usesUniqueIds(): boolean; uniqueIds(): never[]; setUniqueIds(): void; }>; loadCount: (...relations: WithRelationType[]) => Promise<(new () => IModel) & IModel & { [x: string]: any; timestamps: boolean; dateFormat: string; usesTimestamps(): boolean; updateTimestamps(): /*elided*/ any; getCreatedAtColumn(): any; getUpdatedAtColumn(): any; setCreatedAt(value: any): /*elided*/ any; setUpdatedAt(value: any): /*elided*/ any; freshTimestamp(): Date; freshTimestampString(): any; } & TGeneric & { [x: string]: any; attributes: TGeneric; original: TGeneric; casts: TGeneric; changes: TGeneric; appends: any[]; setAppends(appends: any[]): /*elided*/ any; append(...keys: any[]): /*elided*/ any; normalizeCastClassResponse(key: string, value: string): TGeneric; syncOriginal(): /*elided*/ any; syncChanges(): /*elided*/ any; syncOriginalAttribute(attribute: string): void; syncOriginalAttributes(...attributes: string[]): /*elided*/ any; isDirty(...attributes: string[]): boolean; getDirty(): TGeneric; originalIsEquivalent(key: string): boolean; setAttributes(attributes: TGeneric): void; setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/ any; getAttributes(): { [x: string]: any; }; setAttribute(key: string, value: string): /*elided*/ any; getAttribute(key: string): any; castAttribute(key: string, value: string): any; attributesToData(): { [x: string]: any; }; mutateAttribute(key: string, value: string | null): any; mutateAttributeForArray(_key: string, _value: string): void; isDateAttribute(key: string): boolean; serializeDate(date?: Date | string | null): string | null; getDates(): any[]; getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">; getCastType(key: string): any; hasCast(key: string, types?: readonly string[]): boolean; withDayjs(date: string): import("dayjs").Dayjs; isCustomCast(cast: any): boolean; isCustomDateTimeCast(cast: any): boolean; isDecimalCast(cast: any): boolean; isDateCastable(key: string): boolean; fromDateTime(value: string): string; getDateFormat(): any; asDecimal(value: string, decimals: number): string; asDateTime(value: any): Date | null; asDate(value: string): Date; } & { [x: string]: any; hidden: any[]; visible: any[]; makeVisible(...keys: string[]): /*elided*/ any; makeHidden(key: string[], ...keys: string[]): /*elided*/ any; getHidden(): any[]; getVisible(): any[]; setHidden(hidden: any[]): /*elided*/ any; setVisible(visible: any[]): /*elided*/ any; } & { [x: string]: any; execHooks(hook: any, options: TGeneric): Promise; } & { [x: string]: any; getGlobalScopes(): any; } & { [x: string]: any; useUniqueIds: boolean; usesUniqueIds(): boolean; uniqueIds(): never[]; setUniqueIds(): void; }>; loadMax: (relations: WithRelationType, column: string) => Promise<(new () => IModel) & IModel & { [x: string]: any; timestamps: boolean; dateFormat: string; usesTimestamps(): boolean; updateTimestamps(): /*elided*/ any; getCreatedAtColumn(): any; getUpdatedAtColumn(): any; setCreatedAt(value: any): /*elided*/ any; setUpdatedAt(value: any): /*elided*/ any; freshTimestamp(): Date; freshTimestampString(): any; } & TGeneric & { [x: string]: any; attributes: TGeneric; original: TGeneric; casts: TGeneric; changes: TGeneric; appends: any[]; setAppends(appends: any[]): /*elided*/ any; append(...keys: any[]): /*elided*/ any; normalizeCastClassResponse(key: string, value: string): TGeneric; syncOriginal(): /*elided*/ any; syncChanges(): /*elided*/ any; syncOriginalAttribute(attribute: string): void; syncOriginalAttributes(...attributes: string[]): /*elided*/ any; isDirty(...attributes: string[]): boolean; getDirty(): TGeneric; originalIsEquivalent(key: string): boolean; setAttributes(attributes: TGeneric): void; setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/ any; getAttributes(): { [x: string]: any; }; setAttribute(key: string, value: string): /*elided*/ any; getAttribute(key: string): any; castAttribute(key: string, value: string): any; attributesToData(): { [x: string]: any; }; mutateAttribute(key: string, value: string | null): any; mutateAttributeForArray(_key: string, _value: string): void; isDateAttribute(key: string): boolean; serializeDate(date?: Date | string | null): string | null; getDates(): any[]; getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">; getCastType(key: string): any; hasCast(key: string, types?: readonly string[]): boolean; withDayjs(date: string): import("dayjs").Dayjs; isCustomCast(cast: any): boolean; isCustomDateTimeCast(cast: any): boolean; isDecimalCast(cast: any): boolean; isDateCastable(key: string): boolean; fromDateTime(value: string): string; getDateFormat(): any; asDecimal(value: string, decimals: number): string; asDateTime(value: any): Date | null; asDate(value: string): Date; } & { [x: string]: any; hidden: any[]; visible: any[]; makeVisible(...keys: string[]): /*elided*/ any; makeHidden(key: string[], ...keys: string[]): /*elided*/ any; getHidden(): any[]; getVisible(): any[]; setHidden(hidden: any[]): /*elided*/ any; setVisible(visible: any[]): /*elided*/ any; } & { [x: string]: any; execHooks(hook: any, options: TGeneric): Promise; } & { [x: string]: any; getGlobalScopes(): any; } & { [x: string]: any; useUniqueIds: boolean; usesUniqueIds(): boolean; uniqueIds(): never[]; setUniqueIds(): void; }>; loadMin: (relations: WithRelationType, column: string) => Promise<(new () => IModel) & IModel & { [x: string]: any; timestamps: boolean; dateFormat: string; usesTimestamps(): boolean; updateTimestamps(): /*elided*/ any; getCreatedAtColumn(): any; getUpdatedAtColumn(): any; setCreatedAt(value: any): /*elided*/ any; setUpdatedAt(value: any): /*elided*/ any; freshTimestamp(): Date; freshTimestampString(): any; } & TGeneric & { [x: string]: any; attributes: TGeneric; original: TGeneric; casts: TGeneric; changes: TGeneric; appends: any[]; setAppends(appends: any[]): /*elided*/ any; append(...keys: any[]): /*elided*/ any; normalizeCastClassResponse(key: string, value: string): TGeneric; syncOriginal(): /*elided*/ any; syncChanges(): /*elided*/ any; syncOriginalAttribute(attribute: string): void; syncOriginalAttributes(...attributes: string[]): /*elided*/ any; isDirty(...attributes: string[]): boolean; getDirty(): TGeneric; originalIsEquivalent(key: string): boolean; setAttributes(attributes: TGeneric): void; setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/ any; getAttributes(): { [x: string]: any; }; setAttribute(key: string, value: string): /*elided*/ any; getAttribute(key: string): any; castAttribute(key: string, value: string): any; attributesToData(): { [x: string]: any; }; mutateAttribute(key: string, value: string | null): any; mutateAttributeForArray(_key: string, _value: string): void; isDateAttribute(key: string): boolean; serializeDate(date?: Date | string | null): string | null; getDates(): any[]; getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">; getCastType(key: string): any; hasCast(key: string, types?: readonly string[]): boolean; withDayjs(date: string): import("dayjs").Dayjs; isCustomCast(cast: any): boolean; isCustomDateTimeCast(cast: any): boolean; isDecimalCast(cast: any): boolean; isDateCastable(key: string): boolean; fromDateTime(value: string): string; getDateFormat(): any; asDecimal(value: string, decimals: number): string; asDateTime(value: any): Date | null; asDate(value: string): Date; } & { [x: string]: any; hidden: any[]; visible: any[]; makeVisible(...keys: string[]): /*elided*/ any; makeHidden(key: string[], ...keys: string[]): /*elided*/ any; getHidden(): any[]; getVisible(): any[]; setHidden(hidden: any[]): /*elided*/ any; setVisible(visible: any[]): /*elided*/ any; } & { [x: string]: any; execHooks(hook: any, options: TGeneric): Promise; } & { [x: string]: any; getGlobalScopes(): any; } & { [x: string]: any; useUniqueIds: boolean; usesUniqueIds(): boolean; uniqueIds(): never[]; setUniqueIds(): void; }>; loadSum: (relations: WithRelationType, column: string) => Promise<(new () => IModel) & IModel & { [x: string]: any; timestamps: boolean; dateFormat: string; usesTimestamps(): boolean; updateTimestamps(): /*elided*/ any; getCreatedAtColumn(): any; getUpdatedAtColumn(): any; setCreatedAt(value: any): /*elided*/ any; setUpdatedAt(value: any): /*elided*/ any; freshTimestamp(): Date; freshTimestampString(): any; } & TGeneric & { [x: string]: any; attributes: TGeneric; original: TGeneric; casts: TGeneric; changes: TGeneric; appends: any[]; setAppends(appends: any[]): /*elided*/ any; append(...keys: any[]): /*elided*/ any; normalizeCastClassResponse(key: string, value: string): TGeneric; syncOriginal(): /*elided*/ any; syncChanges(): /*elided*/ any; syncOriginalAttribute(attribute: string): void; syncOriginalAttributes(...attributes: string[]): /*elided*/ any; isDirty(...attributes: string[]): boolean; getDirty(): TGeneric; originalIsEquivalent(key: string): boolean; setAttributes(attributes: TGeneric): void; setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/ any; getAttributes(): { [x: string]: any; }; setAttribute(key: string, value: string): /*elided*/ any; getAttribute(key: string): any; castAttribute(key: string, value: string): any; attributesToData(): { [x: string]: any; }; mutateAttribute(key: string, value: string | null): any; mutateAttributeForArray(_key: string, _value: string): void; isDateAttribute(key: string): boolean; serializeDate(date?: Date | string | null): string | null; getDates(): any[]; getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">; getCastType(key: string): any; hasCast(key: string, types?: readonly string[]): boolean; withDayjs(date: string): import("dayjs").Dayjs; isCustomCast(cast: any): boolean; isCustomDateTimeCast(cast: any): boolean; isDecimalCast(cast: any): boolean; isDateCastable(key: string): boolean; fromDateTime(value: string): string; getDateFormat(): any; asDecimal(value: string, decimals: number): string; asDateTime(value: any): Date | null; asDate(value: string): Date; } & { [x: string]: any; hidden: any[]; visible: any[]; makeVisible(...keys: string[]): /*elided*/ any; makeHidden(key: string[], ...keys: string[]): /*elided*/ any; getHidden(): any[]; getVisible(): any[]; setHidden(hidden: any[]): /*elided*/ any; setVisible(visible: any[]): /*elided*/ any; } & { [x: string]: any; execHooks(hook: any, options: TGeneric): Promise; } & { [x: string]: any; getGlobalScopes(): any; } & { [x: string]: any; useUniqueIds: boolean; usesUniqueIds(): boolean; uniqueIds(): never[]; setUniqueIds(): void; }>; usesTimestamps: (() => boolean) & (() => boolean); updateTimestamps: (() => (new () => IModel) & IModel & { [x: string]: any; timestamps: boolean; dateFormat: string; usesTimestamps(): boolean; updateTimestamps(): /*elided*/ any; getCreatedAtColumn(): any; getUpdatedAtColumn(): any; setCreatedAt(value: any): /*elided*/ any; setUpdatedAt(value: any): /*elided*/ any; freshTimestamp(): Date; freshTimestampString(): any; } & TGeneric & { [x: string]: any; attributes: TGeneric; original: TGeneric; casts: TGeneric; changes: TGeneric; appends: any[]; setAppends(appends: any[]): /*elided*/ any; append(...keys: any[]): /*elided*/ any; normalizeCastClassResponse(key: string, value: string): TGeneric; syncOriginal(): /*elided*/ any; syncChanges(): /*elided*/ any; syncOriginalAttribute(attribute: string): void; syncOriginalAttributes(...attributes: string[]): /*elided*/ any; isDirty(...attributes: string[]): boolean; getDirty(): TGeneric; originalIsEquivalent(key: string): boolean; setAttributes(attributes: TGeneric): void; setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/ any; getAttributes(): { [x: string]: any; }; setAttribute(key: string, value: string): /*elided*/ any; getAttribute(key: string): any; castAttribute(key: string, value: string): any; attributesToData(): { [x: string]: any; }; mutateAttribute(key: string, value: string | null): any; mutateAttributeForArray(_key: string, _value: string): void; isDateAttribute(key: string): boolean; serializeDate(date?: Date | string | null): string | null; getDates(): any[]; getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">; getCastType(key: string): any; hasCast(key: string, types?: readonly string[]): boolean; withDayjs(date: string): import("dayjs").Dayjs; isCustomCast(cast: any): boolean; isCustomDateTimeCast(cast: any): boolean; isDecimalCast(cast: any): boolean; isDateCastable(key: string): boolean; fromDateTime(value: string): string; getDateFormat(): any; asDecimal(value: string, decimals: number): string; asDateTime(value: any): Date | null; asDate(value: string): Date; } & { [x: string]: any; hidden: any[]; visible: any[]; makeVisible(...keys: string[]): /*elided*/ any; makeHidden(key: string[], ...keys: string[]): /*elided*/ any; getHidden(): any[]; getVisible(): any[]; setHidden(hidden: any[]): /*elided*/ any; setVisible(visible: any[]): /*elided*/ any; } & { [x: string]: any; execHooks(hook: any, options: TGeneric): Promise; } & { [x: string]: any; getGlobalScopes(): any; } & { [x: string]: any; useUniqueIds: boolean; usesUniqueIds(): boolean; uniqueIds(): never[]; setUniqueIds(): void; }) & (() => (new () => IModel) & IModel & { [x: string]: any; timestamps: boolean; dateFormat: string; usesTimestamps(): boolean; updateTimestamps(): /*elided*/ any; getCreatedAtColumn(): any; getUpdatedAtColumn(): any; setCreatedAt(value: any): /*elided*/ any; setUpdatedAt(value: any): /*elided*/ any; freshTimestamp(): Date; freshTimestampString(): any; } & TGeneric & { [x: string]: any; attributes: TGeneric; original: TGeneric; casts: TGeneric; changes: TGeneric; appends: any[]; setAppends(appends: any[]): /*elided*/ any; append(...keys: any[]): /*elided*/ any; normalizeCastClassResponse(key: string, value: string): TGeneric; syncOriginal(): /*elided*/ any; syncChanges(): /*elided*/ any; syncOriginalAttribute(attribute: string): void; syncOriginalAttributes(...attributes: string[]): /*elided*/ any; isDirty(...attributes: string[]): boolean; getDirty(): TGeneric; originalIsEquivalent(key: string): boolean; setAttributes(attributes: TGeneric): void; setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/ any; getAttributes(): { [x: string]: any; }; setAttribute(key: string, value: string): /*elided*/ any; getAttribute(key: string): any; castAttribute(key: string, value: string): any; attributesToData(): { [x: string]: any; }; mutateAttribute(key: string, value: string | null): any; mutateAttributeForArray(_key: string, _value: string): void; isDateAttribute(key: string): boolean; serializeDate(date?: Date | string | null): string | null; getDates(): any[]; getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">; getCastType(key: string): any; hasCast(key: string, types?: readonly string[]): boolean; withDayjs(date: string): import("dayjs").Dayjs; isCustomCast(cast: any): boolean; isCustomDateTimeCast(cast: any): boolean; isDecimalCast(cast: any): boolean; isDateCastable(key: string): boolean; fromDateTime(value: string): string; getDateFormat(): any; asDecimal(value: string, decimals: number): string; asDateTime(value: any): Date | null; asDate(value: string): Date; } & { [x: string]: any; hidden: any[]; visible: any[]; makeVisible(...keys: string[]): /*elided*/ any; makeHidden(key: string[], ...keys: string[]): /*elided*/ any; getHidden(): any[]; getVisible(): any[]; setHidden(hidden: any[]): /*elided*/ any; setVisible(visible: any[]): /*elided*/ any; } & { [x: string]: any; execHooks(hook: any, options: TGeneric): Promise; } & { [x: string]: any; getGlobalScopes(): any; } & { [x: string]: any; useUniqueIds: boolean; usesUniqueIds(): boolean; uniqueIds(): never[]; setUniqueIds(): void; }); getCreatedAtColumn: (() => string) & (() => any); getUpdatedAtColumn: (() => string) & (() => any); getDeletedAtColumn: () => string; setCreatedAt: ((value: string) => (new () => IModel) & IModel & { [x: string]: any; timestamps: boolean; dateFormat: string; usesTimestamps(): boolean; updateTimestamps(): /*elided*/ any; getCreatedAtColumn(): any; getUpdatedAtColumn(): any; setCreatedAt(value: any): /*elided*/ any; setUpdatedAt(value: any): /*elided*/ any; freshTimestamp(): Date; freshTimestampString(): any; } & TGeneric & { [x: string]: any; attributes: TGeneric; original: TGeneric; casts: TGeneric; changes: TGeneric; appends: any[]; setAppends(appends: any[]): /*elided*/ any; append(...keys: any[]): /*elided*/ any; normalizeCastClassResponse(key: string, value: string): TGeneric; syncOriginal(): /*elided*/ any; syncChanges(): /*elided*/ any; syncOriginalAttribute(attribute: string): void; syncOriginalAttributes(...attributes: string[]): /*elided*/ any; isDirty(...attributes: string[]): boolean; getDirty(): TGeneric; originalIsEquivalent(key: string): boolean; setAttributes(attributes: TGeneric): void; setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/ any; getAttributes(): { [x: string]: any; }; setAttribute(key: string, value: string): /*elided*/ any; getAttribute(key: string): any; castAttribute(key: string, value: string): any; attributesToData(): { [x: string]: any; }; mutateAttribute(key: string, value: string | null): any; mutateAttributeForArray(_key: string, _value: string): void; isDateAttribute(key: string): boolean; serializeDate(date?: Date | string | null): string | null; getDates(): any[]; getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">; getCastType(key: string): any; hasCast(key: string, types?: readonly string[]): boolean; withDayjs(date: string): import("dayjs").Dayjs; isCustomCast(cast: any): boolean; isCustomDateTimeCast(cast: any): boolean; isDecimalCast(cast: any): boolean; isDateCastable(key: string): boolean; fromDateTime(value: string): string; getDateFormat(): any; asDecimal(value: string, decimals: number): string; asDateTime(value: any): Date | null; asDate(value: string): Date; } & { [x: string]: any; hidden: any[]; visible: any[]; makeVisible(...keys: string[]): /*elided*/ any; makeHidden(key: string[], ...keys: string[]): /*elided*/ any; getHidden(): any[]; getVisible(): any[]; setHidden(hidden: any[]): /*elided*/ any; setVisible(visible: any[]): /*elided*/ any; } & { [x: string]: any; execHooks(hook: any, options: TGeneric): Promise; } & { [x: string]: any; getGlobalScopes(): any; } & { [x: string]: any; useUniqueIds: boolean; usesUniqueIds(): boolean; uniqueIds(): never[]; setUniqueIds(): void; }) & ((value: any) => (new () => IModel) & IModel & { [x: string]: any; timestamps: boolean; dateFormat: string; usesTimestamps(): boolean; updateTimestamps(): /*elided*/ any; getCreatedAtColumn(): any; getUpdatedAtColumn(): any; setCreatedAt(value: any): /*elided*/ any; setUpdatedAt(value: any): /*elided*/ any; freshTimestamp(): Date; freshTimestampString(): any; } & TGeneric & { [x: string]: any; attributes: TGeneric; original: TGeneric; casts: TGeneric; changes: TGeneric; appends: any[]; setAppends(appends: any[]): /*elided*/ any; append(...keys: any[]): /*elided*/ any; normalizeCastClassResponse(key: string, value: string): TGeneric; syncOriginal(): /*elided*/ any; syncChanges(): /*elided*/ any; syncOriginalAttribute(attribute: string): void; syncOriginalAttributes(...attributes: string[]): /*elided*/ any; isDirty(...attributes: string[]): boolean; getDirty(): TGeneric; originalIsEquivalent(key: string): boolean; setAttributes(attributes: TGeneric): void; setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/ any; getAttributes(): { [x: string]: any; }; setAttribute(key: string, value: string): /*elided*/ any; getAttribute(key: string): any; castAttribute(key: string, value: string): any; attributesToData(): { [x: string]: any; }; mutateAttribute(key: string, value: string | null): any; mutateAttributeForArray(_key: string, _value: string): void; isDateAttribute(key: string): boolean; serializeDate(date?: Date | string | null): string | null; getDates(): any[]; getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">; getCastType(key: string): any; hasCast(key: string, types?: readonly string[]): boolean; withDayjs(date: string): import("dayjs").Dayjs; isCustomCast(cast: any): boolean; isCustomDateTimeCast(cast: any): boolean; isDecimalCast(cast: any): boolean; isDateCastable(key: string): boolean; fromDateTime(value: string): string; getDateFormat(): any; asDecimal(value: string, decimals: number): string; asDateTime(value: any): Date | null; asDate(value: string): Date; } & { [x: string]: any; hidden: any[]; visible: any[]; makeVisible(...keys: string[]): /*elided*/ any; makeHidden(key: string[], ...keys: string[]): /*elided*/ any; getHidden(): any[]; getVisible(): any[]; setHidden(hidden: any[]): /*elided*/ any; setVisible(visible: any[]): /*elided*/ any; } & { [x: string]: any; execHooks(hook: any, options: TGeneric): Promise; } & { [x: string]: any; getGlobalScopes(): any; } & { [x: string]: any; useUniqueIds: boolean; usesUniqueIds(): boolean; uniqueIds(): never[]; setUniqueIds(): void; }); setUpdatedAt: ((value: string) => (new () => IModel) & IModel & { [x: string]: any; timestamps: boolean; dateFormat: string; usesTimestamps(): boolean; updateTimestamps(): /*elided*/ any; getCreatedAtColumn(): any; getUpdatedAtColumn(): any; setCreatedAt(value: any): /*elided*/ any; setUpdatedAt(value: any): /*elided*/ any; freshTimestamp(): Date; freshTimestampString(): any; } & TGeneric & { [x: string]: any; attributes: TGeneric; original: TGeneric; casts: TGeneric; changes: TGeneric; appends: any[]; setAppends(appends: any[]): /*elided*/ any; append(...keys: any[]): /*elided*/ any; normalizeCastClassResponse(key: string, value: string): TGeneric; syncOriginal(): /*elided*/ any; syncChanges(): /*elided*/ any; syncOriginalAttribute(attribute: string): void; syncOriginalAttributes(...attributes: string[]): /*elided*/ any; isDirty(...attributes: string[]): boolean; getDirty(): TGeneric; originalIsEquivalent(key: string): boolean; setAttributes(attributes: TGeneric): void; setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/ any; getAttributes(): { [x: string]: any; }; setAttribute(key: string, value: string): /*elided*/ any; getAttribute(key: string): any; castAttribute(key: string, value: string): any; attributesToData(): { [x: string]: any; }; mutateAttribute(key: string, value: string | null): any; mutateAttributeForArray(_key: string, _value: string): void; isDateAttribute(key: string): boolean; serializeDate(date?: Date | string | null): string | null; getDates(): any[]; getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">; getCastType(key: string): any; hasCast(key: string, types?: readonly string[]): boolean; withDayjs(date: string): import("dayjs").Dayjs; isCustomCast(cast: any): boolean; isCustomDateTimeCast(cast: any): boolean; isDecimalCast(cast: any): boolean; isDateCastable(key: string): boolean; fromDateTime(value: string): string; getDateFormat(): any; asDecimal(value: string, decimals: number): string; asDateTime(value: any): Date | null; asDate(value: string): Date; } & { [x: string]: any; hidden: any[]; visible: any[]; makeVisible(...keys: string[]): /*elided*/ any; makeHidden(key: string[], ...keys: string[]): /*elided*/ any; getHidden(): any[]; getVisible(): any[]; setHidden(hidden: any[]): /*elided*/ any; setVisible(visible: any[]): /*elided*/ any; } & { [x: string]: any; execHooks(hook: any, options: TGeneric): Promise; } & { [x: string]: any; getGlobalScopes(): any; } & { [x: string]: any; useUniqueIds: boolean; usesUniqueIds(): boolean; uniqueIds(): never[]; setUniqueIds(): void; }) & ((value: any) => (new () => IModel) & IModel & { [x: string]: any; timestamps: boolean; dateFormat: string; usesTimestamps(): boolean; updateTimestamps(): /*elided*/ any; getCreatedAtColumn(): any; getUpdatedAtColumn(): any; setCreatedAt(value: any): /*elided*/ any; setUpdatedAt(value: any): /*elided*/ any; freshTimestamp(): Date; freshTimestampString(): any; } & TGeneric & { [x: string]: any; attributes: TGeneric; original: TGeneric; casts: TGeneric; changes: TGeneric; appends: any[]; setAppends(appends: any[]): /*elided*/ any; append(...keys: any[]): /*elided*/ any; normalizeCastClassResponse(key: string, value: string): TGeneric; syncOriginal(): /*elided*/ any; syncChanges(): /*elided*/ any; syncOriginalAttribute(attribute: string): void; syncOriginalAttributes(...attributes: string[]): /*elided*/ any; isDirty(...attributes: string[]): boolean; getDirty(): TGeneric; originalIsEquivalent(key: string): boolean; setAttributes(attributes: TGeneric): void; setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/ any; getAttributes(): { [x: string]: any; }; setAttribute(key: string, value: string): /*elided*/ any; getAttribute(key: string): any; castAttribute(key: string, value: string): any; attributesToData(): { [x: string]: any; }; mutateAttribute(key: string, value: string | null): any; mutateAttributeForArray(_key: string, _value: string): void; isDateAttribute(key: string): boolean; serializeDate(date?: Date | string | null): string | null; getDates(): any[]; getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">; getCastType(key: string): any; hasCast(key: string, types?: readonly string[]): boolean; withDayjs(date: string): import("dayjs").Dayjs; isCustomCast(cast: any): boolean; isCustomDateTimeCast(cast: any): boolean; isDecimalCast(cast: any): boolean; isDateCastable(key: string): boolean; fromDateTime(value: string): string; getDateFormat(): any; asDecimal(value: string, decimals: number): string; asDateTime(value: any): Date | null; asDate(value: string): Date; } & { [x: string]: any; hidden: any[]; visible: any[]; makeVisible(...keys: string[]): /*elided*/ any; makeHidden(key: string[], ...keys: string[]): /*elided*/ any; getHidden(): any[]; getVisible(): any[]; setHidden(hidden: any[]): /*elided*/ any; setVisible(visible: any[]): /*elided*/ any; } & { [x: string]: any; execHooks(hook: any, options: TGeneric): Promise; } & { [x: string]: any; getGlobalScopes(): any; } & { [x: string]: any; useUniqueIds: boolean; usesUniqueIds(): boolean; uniqueIds(): never[]; setUniqueIds(): void; }); freshTimestamp: (() => Date) & (() => Date); freshTimestampString: (() => string) & (() => any); fromDateTime: ((value: Date | number | null) => string) & ((value: string) => string); useSoftDeletes: () => boolean; toData: () => any; attributesToData: (() => any) & (() => { [x: string]: any; }); relationsToData: () => any; toJSON: () => any; toJson: () => string; toString: () => string; isDirty: ((attributes?: string | string[]) => boolean) & ((...attributes: string[]) => boolean); getDirty: (() => string[]) & (() => TGeneric); save: (options?: any) => Promise; update: (attributes?: any, options?: any) => Promise; increment: (column: string, amount?: number, extra?: any) => Promise; decrement: (column: string, amount?: number, extra?: any) => Promise; serializeDate: ((date: any) => string) & ((date?: Date | string | null) => string | null); delete: (options?: any) => Promise; softDelete: (options?: any) => Promise; forceDelete: (options?: any) => Promise; restore: (options?: any) => Promise; fresh: () => Promise<(new () => IModel) & IModel & { [x: string]: any; timestamps: boolean; dateFormat: string; usesTimestamps(): boolean; updateTimestamps(): /*elided*/ any; getCreatedAtColumn(): any; getUpdatedAtColumn(): any; setCreatedAt(value: any): /*elided*/ any; setUpdatedAt(value: any): /*elided*/ any; freshTimestamp(): Date; freshTimestampString(): any; } & TGeneric & { [x: string]: any; attributes: TGeneric; original: TGeneric; casts: TGeneric; changes: TGeneric; appends: any[]; setAppends(appends: any[]): /*elided*/ any; append(...keys: any[]): /*elided*/ any; normalizeCastClassResponse(key: string, value: string): TGeneric; syncOriginal(): /*elided*/ any; syncChanges(): /*elided*/ any; syncOriginalAttribute(attribute: string): void; syncOriginalAttributes(...attributes: string[]): /*elided*/ any; isDirty(...attributes: string[]): boolean; getDirty(): TGeneric; originalIsEquivalent(key: string): boolean; setAttributes(attributes: TGeneric): void; setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/ any; getAttributes(): { [x: string]: any; }; setAttribute(key: string, value: string): /*elided*/ any; getAttribute(key: string): any; castAttribute(key: string, value: string): any; attributesToData(): { [x: string]: any; }; mutateAttribute(key: string, value: string | null): any; mutateAttributeForArray(_key: string, _value: string): void; isDateAttribute(key: string): boolean; serializeDate(date?: Date | string | null): string | null; getDates(): any[]; getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">; getCastType(key: string): any; hasCast(key: string, types?: readonly string[]): boolean; withDayjs(date: string): import("dayjs").Dayjs; isCustomCast(cast: any): boolean; isCustomDateTimeCast(cast: any): boolean; isDecimalCast(cast: any): boolean; isDateCastable(key: string): boolean; fromDateTime(value: string): string; getDateFormat(): any; asDecimal(value: string, decimals: number): string; asDateTime(value: any): Date | null; asDate(value: string): Date; } & { [x: string]: any; hidden: any[]; visible: any[]; makeVisible(...keys: string[]): /*elided*/ any; makeHidden(key: string[], ...keys: string[]): /*elided*/ any; getHidden(): any[]; getVisible(): any[]; setHidden(hidden: any[]): /*elided*/ any; setVisible(visible: any[]): /*elided*/ any; } & { [x: string]: any; execHooks(hook: any, options: TGeneric): Promise; } & { [x: string]: any; getGlobalScopes(): any; } & { [x: string]: any; useUniqueIds: boolean; usesUniqueIds(): boolean; uniqueIds(): never[]; setUniqueIds(): void; }>; refresh: () => Promise<((new () => IModel) & IModel & { [x: string]: any; timestamps: boolean; dateFormat: string; usesTimestamps(): boolean; updateTimestamps(): /*elided*/ any; getCreatedAtColumn(): any; getUpdatedAtColumn(): any; setCreatedAt(value: any): /*elided*/ any; setUpdatedAt(value: any): /*elided*/ any; freshTimestamp(): Date; freshTimestampString(): any; } & TGeneric & { [x: string]: any; attributes: TGeneric; original: TGeneric; casts: TGeneric; changes: TGeneric; appends: any[]; setAppends(appends: any[]): /*elided*/ any; append(...keys: any[]): /*elided*/ any; normalizeCastClassResponse(key: string, value: string): TGeneric; syncOriginal(): /*elided*/ any; syncChanges(): /*elided*/ any; syncOriginalAttribute(attribute: string): void; syncOriginalAttributes(...attributes: string[]): /*elided*/ any; isDirty(...attributes: string[]): boolean; getDirty(): TGeneric; originalIsEquivalent(key: string): boolean; setAttributes(attributes: TGeneric): void; setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/ any; getAttributes(): { [x: string]: any; }; setAttribute(key: string, value: string): /*elided*/ any; getAttribute(key: string): any; castAttribute(key: string, value: string): any; attributesToData(): { [x: string]: any; }; mutateAttribute(key: string, value: string | null): any; mutateAttributeForArray(_key: string, _value: string): void; isDateAttribute(key: string): boolean; serializeDate(date?: Date | string | null): string | null; getDates(): any[]; getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">; getCastType(key: string): any; hasCast(key: string, types?: readonly string[]): boolean; withDayjs(date: string): import("dayjs").Dayjs; isCustomCast(cast: any): boolean; isCustomDateTimeCast(cast: any): boolean; isDecimalCast(cast: any): boolean; isDateCastable(key: string): boolean; fromDateTime(value: string): string; getDateFormat(): any; asDecimal(value: string, decimals: number): string; asDateTime(value: any): Date | null; asDate(value: string): Date; } & { [x: string]: any; hidden: any[]; visible: any[]; makeVisible(...keys: string[]): /*elided*/ any; makeHidden(key: string[], ...keys: string[]): /*elided*/ any; getHidden(): any[]; getVisible(): any[]; setHidden(hidden: any[]): /*elided*/ any; setVisible(visible: any[]): /*elided*/ any; } & { [x: string]: any; execHooks(hook: any, options: TGeneric): Promise; } & { [x: string]: any; getGlobalScopes(): any; } & { [x: string]: any; useUniqueIds: boolean; usesUniqueIds(): boolean; uniqueIds(): never[]; setUniqueIds(): void; }) | null | undefined>; push: () => Promise; is: (model: (new () => IModel) & IModel & { [x: string]: any; timestamps: boolean; dateFormat: string; usesTimestamps(): boolean; updateTimestamps(): /*elided*/ any; getCreatedAtColumn(): any; getUpdatedAtColumn(): any; setCreatedAt(value: any): /*elided*/ any; setUpdatedAt(value: any): /*elided*/ any; freshTimestamp(): Date; freshTimestampString(): any; } & TGeneric & { [x: string]: any; attributes: TGeneric; original: TGeneric; casts: TGeneric; changes: TGeneric; appends: any[]; setAppends(appends: any[]): /*elided*/ any; append(...keys: any[]): /*elided*/ any; normalizeCastClassResponse(key: string, value: string): TGeneric; syncOriginal(): /*elided*/ any; syncChanges(): /*elided*/ any; syncOriginalAttribute(attribute: string): void; syncOriginalAttributes(...attributes: string[]): /*elided*/ any; isDirty(...attributes: string[]): boolean; getDirty(): TGeneric; originalIsEquivalent(key: string): boolean; setAttributes(attributes: TGeneric): void; setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/ any; getAttributes(): { [x: string]: any; }; setAttribute(key: string, value: string): /*elided*/ any; getAttribute(key: string): any; castAttribute(key: string, value: string): any; attributesToData(): { [x: string]: any; }; mutateAttribute(key: string, value: string | null): any; mutateAttributeForArray(_key: string, _value: string): void; isDateAttribute(key: string): boolean; serializeDate(date?: Date | string | null): string | null; getDates(): any[]; getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">; getCastType(key: string): any; hasCast(key: string, types?: readonly string[]): boolean; withDayjs(date: string): import("dayjs").Dayjs; isCustomCast(cast: any): boolean; isCustomDateTimeCast(cast: any): boolean; isDecimalCast(cast: any): boolean; isDateCastable(key: string): boolean; fromDateTime(value: string): string; getDateFormat(): any; asDecimal(value: string, decimals: number): string; asDateTime(value: any): Date | null; asDate(value: string): Date; } & { [x: string]: any; hidden: any[]; visible: any[]; makeVisible(...keys: string[]): /*elided*/ any; makeHidden(key: string[], ...keys: string[]): /*elided*/ any; getHidden(): any[]; getVisible(): any[]; setHidden(hidden: any[]): /*elided*/ any; setVisible(visible: any[]): /*elided*/ any; } & { [x: string]: any; execHooks(hook: any, options: TGeneric): Promise; } & { [x: string]: any; getGlobalScopes(): any; } & { [x: string]: any; useUniqueIds: boolean; usesUniqueIds(): boolean; uniqueIds(): never[]; setUniqueIds(): void; }) => boolean; isNot: (model: (new () => IModel) & IModel & { [x: string]: any; timestamps: boolean; dateFormat: string; usesTimestamps(): boolean; updateTimestamps(): /*elided*/ any; getCreatedAtColumn(): any; getUpdatedAtColumn(): any; setCreatedAt(value: any): /*elided*/ any; setUpdatedAt(value: any): /*elided*/ any; freshTimestamp(): Date; freshTimestampString(): any; } & TGeneric & { [x: string]: any; attributes: TGeneric; original: TGeneric; casts: TGeneric; changes: TGeneric; appends: any[]; setAppends(appends: any[]): /*elided*/ any; append(...keys: any[]): /*elided*/ any; normalizeCastClassResponse(key: string, value: string): TGeneric; syncOriginal(): /*elided*/ any; syncChanges(): /*elided*/ any; syncOriginalAttribute(attribute: string): void; syncOriginalAttributes(...attributes: string[]): /*elided*/ any; isDirty(...attributes: string[]): boolean; getDirty(): TGeneric; originalIsEquivalent(key: string): boolean; setAttributes(attributes: TGeneric): void; setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/ any; getAttributes(): { [x: string]: any; }; setAttribute(key: string, value: string): /*elided*/ any; getAttribute(key: string): any; castAttribute(key: string, value: string): any; attributesToData(): { [x: string]: any; }; mutateAttribute(key: string, value: string | null): any; mutateAttributeForArray(_key: string, _value: string): void; isDateAttribute(key: string): boolean; serializeDate(date?: Date | string | null): string | null; getDates(): any[]; getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">; getCastType(key: string): any; hasCast(key: string, types?: readonly string[]): boolean; withDayjs(date: string): import("dayjs").Dayjs; isCustomCast(cast: any): boolean; isCustomDateTimeCast(cast: any): boolean; isDecimalCast(cast: any): boolean; isDateCastable(key: string): boolean; fromDateTime(value: string): string; getDateFormat(): any; asDecimal(value: string, decimals: number): string; asDateTime(value: any): Date | null; asDate(value: string): Date; } & { [x: string]: any; hidden: any[]; visible: any[]; makeVisible(...keys: string[]): /*elided*/ any; makeHidden(key: string[], ...keys: string[]): /*elided*/ any; getHidden(): any[]; getVisible(): any[]; setHidden(hidden: any[]): /*elided*/ any; setVisible(visible: any[]): /*elided*/ any; } & { [x: string]: any; execHooks(hook: any, options: TGeneric): Promise; } & { [x: string]: any; getGlobalScopes(): any; } & { [x: string]: any; useUniqueIds: boolean; usesUniqueIds(): boolean; uniqueIds(): never[]; setUniqueIds(): void; }) => boolean; related: (relation: T) => ReturnTypeOfMethod<(new () => IModel) & IModel & { [x: string]: any; timestamps: boolean; dateFormat: string; usesTimestamps(): boolean; updateTimestamps(): /*elided*/ any; getCreatedAtColumn(): any; getUpdatedAtColumn(): any; setCreatedAt(value: any): /*elided*/ any; setUpdatedAt(value: any): /*elided*/ any; freshTimestamp(): Date; freshTimestampString(): any; } & TGeneric & { [x: string]: any; attributes: TGeneric; original: TGeneric; casts: TGeneric; changes: TGeneric; appends: any[]; setAppends(appends: any[]): /*elided*/ any; append(...keys: any[]): /*elided*/ any; normalizeCastClassResponse(key: string, value: string): TGeneric; syncOriginal(): /*elided*/ any; syncChanges(): /*elided*/ any; syncOriginalAttribute(attribute: string): void; syncOriginalAttributes(...attributes: string[]): /*elided*/ any; isDirty(...attributes: string[]): boolean; getDirty(): TGeneric; originalIsEquivalent(key: string): boolean; setAttributes(attributes: TGeneric): void; setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/ any; getAttributes(): { [x: string]: any; }; setAttribute(key: string, value: string): /*elided*/ any; getAttribute(key: string): any; castAttribute(key: string, value: string): any; attributesToData(): { [x: string]: any; }; mutateAttribute(key: string, value: string | null): any; mutateAttributeForArray(_key: string, _value: string): void; isDateAttribute(key: string): boolean; serializeDate(date?: Date | string | null): string | null; getDates(): any[]; getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">; getCastType(key: string): any; hasCast(key: string, types?: readonly string[]): boolean; withDayjs(date: string): import("dayjs").Dayjs; isCustomCast(cast: any): boolean; isCustomDateTimeCast(cast: any): boolean; isDecimalCast(cast: any): boolean; isDateCastable(key: string): boolean; fromDateTime(value: string): string; getDateFormat(): any; asDecimal(value: string, decimals: number): string; asDateTime(value: any): Date | null; asDate(value: string): Date; } & { [x: string]: any; hidden: any[]; visible: any[]; makeVisible(...keys: string[]): /*elided*/ any; makeHidden(key: string[], ...keys: string[]): /*elided*/ any; getHidden(): any[]; getVisible(): any[]; setHidden(hidden: any[]): /*elided*/ any; setVisible(visible: any[]): /*elided*/ any; } & { [x: string]: any; execHooks(hook: any, options: TGeneric): Promise; } & { [x: string]: any; getGlobalScopes(): any; } & { [x: string]: any; useUniqueIds: boolean; usesUniqueIds(): boolean; uniqueIds(): never[]; setUniqueIds(): void; }, `relation${Capitalize>}`>; getRelated: (relation: T) => ReturnTypeOfMethod IModel) & IModel & { [x: string]: any; timestamps: boolean; dateFormat: string; usesTimestamps(): boolean; updateTimestamps(): /*elided*/ any; getCreatedAtColumn(): any; getUpdatedAtColumn(): any; setCreatedAt(value: any): /*elided*/ any; setUpdatedAt(value: any): /*elided*/ any; freshTimestamp(): Date; freshTimestampString(): any; } & TGeneric & { [x: string]: any; attributes: TGeneric; original: TGeneric; casts: TGeneric; changes: TGeneric; appends: any[]; setAppends(appends: any[]): /*elided*/ any; append(...keys: any[]): /*elided*/ any; normalizeCastClassResponse(key: string, value: string): TGeneric; syncOriginal(): /*elided*/ any; syncChanges(): /*elided*/ any; syncOriginalAttribute(attribute: string): void; syncOriginalAttributes(...attributes: string[]): /*elided*/ any; isDirty(...attributes: string[]): boolean; getDirty(): TGeneric; originalIsEquivalent(key: string): boolean; setAttributes(attributes: TGeneric): void; setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/ any; getAttributes(): { [x: string]: any; }; setAttribute(key: string, value: string): /*elided*/ any; getAttribute(key: string): any; castAttribute(key: string, value: string): any; attributesToData(): { [x: string]: any; }; mutateAttribute(key: string, value: string | null): any; mutateAttributeForArray(_key: string, _value: string): void; isDateAttribute(key: string): boolean; serializeDate(date?: Date | string | null): string | null; getDates(): any[]; getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">; getCastType(key: string): any; hasCast(key: string, types?: readonly string[]): boolean; withDayjs(date: string): import("dayjs").Dayjs; isCustomCast(cast: any): boolean; isCustomDateTimeCast(cast: any): boolean; isDecimalCast(cast: any): boolean; isDateCastable(key: string): boolean; fromDateTime(value: string): string; getDateFormat(): any; asDecimal(value: string, decimals: number): string; asDateTime(value: any): Date | null; asDate(value: string): Date; } & { [x: string]: any; hidden: any[]; visible: any[]; makeVisible(...keys: string[]): /*elided*/ any; makeHidden(key: string[], ...keys: string[]): /*elided*/ any; getHidden(): any[]; getVisible(): any[]; setHidden(hidden: any[]): /*elided*/ any; setVisible(visible: any[]): /*elided*/ any; } & { [x: string]: any; execHooks(hook: any, options: TGeneric): Promise; } & { [x: string]: any; getGlobalScopes(): any; } & { [x: string]: any; useUniqueIds: boolean; usesUniqueIds(): boolean; uniqueIds(): never[]; setUniqueIds(): void; }, `relation${Capitalize>}`>, any>; hasOne: (model: new () => T, foreignKey?: string, localKey?: string) => HasOne; hasMany: (model: new () => T, foreignKey?: string, localKey?: string) => HasMany; belongsTo: (model: new () => T, foreignKey?: string, ownerKey?: string, relation?: string) => BelongsTo; belongsToMany: (model: new () => T, table?: string, foreignPivotKey?: string, relatedPivotKey?: string, parentKey?: string, relatedKey?: string) => BelongsToMany; original: TGeneric; casts: TGeneric; changes: TGeneric; appends: any[]; normalizeCastClassResponse: (key: string, value: string) => TGeneric; syncOriginal: () => (new () => IModel) & IModel & { [x: string]: any; timestamps: boolean; dateFormat: string; usesTimestamps(): boolean; updateTimestamps(): /*elided*/ any; getCreatedAtColumn(): any; getUpdatedAtColumn(): any; setCreatedAt(value: any): /*elided*/ any; setUpdatedAt(value: any): /*elided*/ any; freshTimestamp(): Date; freshTimestampString(): any; } & TGeneric & { [x: string]: any; attributes: TGeneric; original: TGeneric; casts: TGeneric; changes: TGeneric; appends: any[]; setAppends(appends: any[]): /*elided*/ any; append(...keys: any[]): /*elided*/ any; normalizeCastClassResponse(key: string, value: string): TGeneric; syncOriginal(): /*elided*/ any; syncChanges(): /*elided*/ any; syncOriginalAttribute(attribute: string): void; syncOriginalAttributes(...attributes: string[]): /*elided*/ any; isDirty(...attributes: string[]): boolean; getDirty(): TGeneric; originalIsEquivalent(key: string): boolean; setAttributes(attributes: TGeneric): void; setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/ any; getAttributes(): { [x: string]: any; }; setAttribute(key: string, value: string): /*elided*/ any; getAttribute(key: string): any; castAttribute(key: string, value: string): any; attributesToData(): { [x: string]: any; }; mutateAttribute(key: string, value: string | null): any; mutateAttributeForArray(_key: string, _value: string): void; isDateAttribute(key: string): boolean; serializeDate(date?: Date | string | null): string | null; getDates(): any[]; getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">; getCastType(key: string): any; hasCast(key: string, types?: readonly string[]): boolean; withDayjs(date: string): import("dayjs").Dayjs; isCustomCast(cast: any): boolean; isCustomDateTimeCast(cast: any): boolean; isDecimalCast(cast: any): boolean; isDateCastable(key: string): boolean; fromDateTime(value: string): string; getDateFormat(): any; asDecimal(value: string, decimals: number): string; asDateTime(value: any): Date | null; asDate(value: string): Date; } & { [x: string]: any; hidden: any[]; visible: any[]; makeVisible(...keys: string[]): /*elided*/ any; makeHidden(key: string[], ...keys: string[]): /*elided*/ any; getHidden(): any[]; getVisible(): any[]; setHidden(hidden: any[]): /*elided*/ any; setVisible(visible: any[]): /*elided*/ any; } & { [x: string]: any; execHooks(hook: any, options: TGeneric): Promise; } & { [x: string]: any; getGlobalScopes(): any; } & { [x: string]: any; useUniqueIds: boolean; usesUniqueIds(): boolean; uniqueIds(): never[]; setUniqueIds(): void; }; syncChanges: () => (new () => IModel) & IModel & { [x: string]: any; timestamps: boolean; dateFormat: string; usesTimestamps(): boolean; updateTimestamps(): /*elided*/ any; getCreatedAtColumn(): any; getUpdatedAtColumn(): any; setCreatedAt(value: any): /*elided*/ any; setUpdatedAt(value: any): /*elided*/ any; freshTimestamp(): Date; freshTimestampString(): any; } & TGeneric & { [x: string]: any; attributes: TGeneric; original: TGeneric; casts: TGeneric; changes: TGeneric; appends: any[]; setAppends(appends: any[]): /*elided*/ any; append(...keys: any[]): /*elided*/ any; normalizeCastClassResponse(key: string, value: string): TGeneric; syncOriginal(): /*elided*/ any; syncChanges(): /*elided*/ any; syncOriginalAttribute(attribute: string): void; syncOriginalAttributes(...attributes: string[]): /*elided*/ any; isDirty(...attributes: string[]): boolean; getDirty(): TGeneric; originalIsEquivalent(key: string): boolean; setAttributes(attributes: TGeneric): void; setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/ any; getAttributes(): { [x: string]: any; }; setAttribute(key: string, value: string): /*elided*/ any; getAttribute(key: string): any; castAttribute(key: string, value: string): any; attributesToData(): { [x: string]: any; }; mutateAttribute(key: string, value: string | null): any; mutateAttributeForArray(_key: string, _value: string): void; isDateAttribute(key: string): boolean; serializeDate(date?: Date | string | null): string | null; getDates(): any[]; getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">; getCastType(key: string): any; hasCast(key: string, types?: readonly string[]): boolean; withDayjs(date: string): import("dayjs").Dayjs; isCustomCast(cast: any): boolean; isCustomDateTimeCast(cast: any): boolean; isDecimalCast(cast: any): boolean; isDateCastable(key: string): boolean; fromDateTime(value: string): string; getDateFormat(): any; asDecimal(value: string, decimals: number): string; asDateTime(value: any): Date | null; asDate(value: string): Date; } & { [x: string]: any; hidden: any[]; visible: any[]; makeVisible(...keys: string[]): /*elided*/ any; makeHidden(key: string[], ...keys: string[]): /*elided*/ any; getHidden(): any[]; getVisible(): any[]; setHidden(hidden: any[]): /*elided*/ any; setVisible(visible: any[]): /*elided*/ any; } & { [x: string]: any; execHooks(hook: any, options: TGeneric): Promise; } & { [x: string]: any; getGlobalScopes(): any; } & { [x: string]: any; useUniqueIds: boolean; usesUniqueIds(): boolean; uniqueIds(): never[]; setUniqueIds(): void; }; syncOriginalAttribute: (attribute: string) => void; syncOriginalAttributes: (...attributes: string[]) => (new () => IModel) & IModel & { [x: string]: any; timestamps: boolean; dateFormat: string; usesTimestamps(): boolean; updateTimestamps(): /*elided*/ any; getCreatedAtColumn(): any; getUpdatedAtColumn(): any; setCreatedAt(value: any): /*elided*/ any; setUpdatedAt(value: any): /*elided*/ any; freshTimestamp(): Date; freshTimestampString(): any; } & TGeneric & { [x: string]: any; attributes: TGeneric; original: TGeneric; casts: TGeneric; changes: TGeneric; appends: any[]; setAppends(appends: any[]): /*elided*/ any; append(...keys: any[]): /*elided*/ any; normalizeCastClassResponse(key: string, value: string): TGeneric; syncOriginal(): /*elided*/ any; syncChanges(): /*elided*/ any; syncOriginalAttribute(attribute: string): void; syncOriginalAttributes(...attributes: string[]): /*elided*/ any; isDirty(...attributes: string[]): boolean; getDirty(): TGeneric; originalIsEquivalent(key: string): boolean; setAttributes(attributes: TGeneric): void; setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/ any; getAttributes(): { [x: string]: any; }; setAttribute(key: string, value: string): /*elided*/ any; getAttribute(key: string): any; castAttribute(key: string, value: string): any; attributesToData(): { [x: string]: any; }; mutateAttribute(key: string, value: string | null): any; mutateAttributeForArray(_key: string, _value: string): void; isDateAttribute(key: string): boolean; serializeDate(date?: Date | string | null): string | null; getDates(): any[]; getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">; getCastType(key: string): any; hasCast(key: string, types?: readonly string[]): boolean; withDayjs(date: string): import("dayjs").Dayjs; isCustomCast(cast: any): boolean; isCustomDateTimeCast(cast: any): boolean; isDecimalCast(cast: any): boolean; isDateCastable(key: string): boolean; fromDateTime(value: string): string; getDateFormat(): any; asDecimal(value: string, decimals: number): string; asDateTime(value: any): Date | null; asDate(value: string): Date; } & { [x: string]: any; hidden: any[]; visible: any[]; makeVisible(...keys: string[]): /*elided*/ any; makeHidden(key: string[], ...keys: string[]): /*elided*/ any; getHidden(): any[]; getVisible(): any[]; setHidden(hidden: any[]): /*elided*/ any; setVisible(visible: any[]): /*elided*/ any; } & { [x: string]: any; execHooks(hook: any, options: TGeneric): Promise; } & { [x: string]: any; getGlobalScopes(): any; } & { [x: string]: any; useUniqueIds: boolean; usesUniqueIds(): boolean; uniqueIds(): never[]; setUniqueIds(): void; }; originalIsEquivalent: (key: string) => boolean; setAttributes: (attributes: TGeneric) => void; setRawAttributes: (attributes: TGeneric, sync?: boolean) => (new () => IModel) & IModel & { [x: string]: any; timestamps: boolean; dateFormat: string; usesTimestamps(): boolean; updateTimestamps(): /*elided*/ any; getCreatedAtColumn(): any; getUpdatedAtColumn(): any; setCreatedAt(value: any): /*elided*/ any; setUpdatedAt(value: any): /*elided*/ any; freshTimestamp(): Date; freshTimestampString(): any; } & TGeneric & { [x: string]: any; attributes: TGeneric; original: TGeneric; casts: TGeneric; changes: TGeneric; appends: any[]; setAppends(appends: any[]): /*elided*/ any; append(...keys: any[]): /*elided*/ any; normalizeCastClassResponse(key: string, value: string): TGeneric; syncOriginal(): /*elided*/ any; syncChanges(): /*elided*/ any; syncOriginalAttribute(attribute: string): void; syncOriginalAttributes(...attributes: string[]): /*elided*/ any; isDirty(...attributes: string[]): boolean; getDirty(): TGeneric; originalIsEquivalent(key: string): boolean; setAttributes(attributes: TGeneric): void; setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/ any; getAttributes(): { [x: string]: any; }; setAttribute(key: string, value: string): /*elided*/ any; getAttribute(key: string): any; castAttribute(key: string, value: string): any; attributesToData(): { [x: string]: any; }; mutateAttribute(key: string, value: string | null): any; mutateAttributeForArray(_key: string, _value: string): void; isDateAttribute(key: string): boolean; serializeDate(date?: Date | string | null): string | null; getDates(): any[]; getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">; getCastType(key: string): any; hasCast(key: string, types?: readonly string[]): boolean; withDayjs(date: string): import("dayjs").Dayjs; isCustomCast(cast: any): boolean; isCustomDateTimeCast(cast: any): boolean; isDecimalCast(cast: any): boolean; isDateCastable(key: string): boolean; fromDateTime(value: string): string; getDateFormat(): any; asDecimal(value: string, decimals: number): string; asDateTime(value: any): Date | null; asDate(value: string): Date; } & { [x: string]: any; hidden: any[]; visible: any[]; makeVisible(...keys: string[]): /*elided*/ any; makeHidden(key: string[], ...keys: string[]): /*elided*/ any; getHidden(): any[]; getVisible(): any[]; setHidden(hidden: any[]): /*elided*/ any; setVisible(visible: any[]): /*elided*/ any; } & { [x: string]: any; execHooks(hook: any, options: TGeneric): Promise; } & { [x: string]: any; getGlobalScopes(): any; } & { [x: string]: any; useUniqueIds: boolean; usesUniqueIds(): boolean; uniqueIds(): never[]; setUniqueIds(): void; }; castAttribute: (key: string, value: string) => any; mutateAttribute: (key: string, value: string | null) => any; mutateAttributeForArray: (_key: string, _value: string) => void; isDateAttribute: (key: string) => boolean; getCasts: () => TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">; getCastType: (key: string) => any; hasCast: (key: string, types?: readonly string[]) => boolean; withDayjs: (date: string) => import("dayjs").Dayjs; isCustomCast: (cast: any) => boolean; isCustomDateTimeCast: (cast: any) => boolean; isDecimalCast: (cast: any) => boolean; isDateCastable: (key: string) => boolean; asDecimal: (value: string, decimals: number) => string; asDateTime: (value: any) => Date | null; asDate: (value: string) => Date; getHidden: () => any[]; getVisible: () => any[]; setHidden: (hidden: any[]) => (new () => IModel) & IModel & { [x: string]: any; timestamps: boolean; dateFormat: string; usesTimestamps(): boolean; updateTimestamps(): /*elided*/ any; getCreatedAtColumn(): any; getUpdatedAtColumn(): any; setCreatedAt(value: any): /*elided*/ any; setUpdatedAt(value: any): /*elided*/ any; freshTimestamp(): Date; freshTimestampString(): any; } & TGeneric & { [x: string]: any; attributes: TGeneric; original: TGeneric; casts: TGeneric; changes: TGeneric; appends: any[]; setAppends(appends: any[]): /*elided*/ any; append(...keys: any[]): /*elided*/ any; normalizeCastClassResponse(key: string, value: string): TGeneric; syncOriginal(): /*elided*/ any; syncChanges(): /*elided*/ any; syncOriginalAttribute(attribute: string): void; syncOriginalAttributes(...attributes: string[]): /*elided*/ any; isDirty(...attributes: string[]): boolean; getDirty(): TGeneric; originalIsEquivalent(key: string): boolean; setAttributes(attributes: TGeneric): void; setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/ any; getAttributes(): { [x: string]: any; }; setAttribute(key: string, value: string): /*elided*/ any; getAttribute(key: string): any; castAttribute(key: string, value: string): any; attributesToData(): { [x: string]: any; }; mutateAttribute(key: string, value: string | null): any; mutateAttributeForArray(_key: string, _value: string): void; isDateAttribute(key: string): boolean; serializeDate(date?: Date | string | null): string | null; getDates(): any[]; getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">; getCastType(key: string): any; hasCast(key: string, types?: readonly string[]): boolean; withDayjs(date: string): import("dayjs").Dayjs; isCustomCast(cast: any): boolean; isCustomDateTimeCast(cast: any): boolean; isDecimalCast(cast: any): boolean; isDateCastable(key: string): boolean; fromDateTime(value: string): string; getDateFormat(): any; asDecimal(value: string, decimals: number): string; asDateTime(value: any): Date | null; asDate(value: string): Date; } & { [x: string]: any; hidden: any[]; visible: any[]; makeVisible(...keys: string[]): /*elided*/ any; makeHidden(key: string[], ...keys: string[]): /*elided*/ any; getHidden(): any[]; getVisible(): any[]; setHidden(hidden: any[]): /*elided*/ any; setVisible(visible: any[]): /*elided*/ any; } & { [x: string]: any; execHooks(hook: any, options: TGeneric): Promise; } & { [x: string]: any; getGlobalScopes(): any; } & { [x: string]: any; useUniqueIds: boolean; usesUniqueIds(): boolean; uniqueIds(): never[]; setUniqueIds(): void; }; setVisible: (visible: any[]) => (new () => IModel) & IModel & { [x: string]: any; timestamps: boolean; dateFormat: string; usesTimestamps(): boolean; updateTimestamps(): /*elided*/ any; getCreatedAtColumn(): any; getUpdatedAtColumn(): any; setCreatedAt(value: any): /*elided*/ any; setUpdatedAt(value: any): /*elided*/ any; freshTimestamp(): Date; freshTimestampString(): any; } & TGeneric & { [x: string]: any; attributes: TGeneric; original: TGeneric; casts: TGeneric; changes: TGeneric; appends: any[]; setAppends(appends: any[]): /*elided*/ any; append(...keys: any[]): /*elided*/ any; normalizeCastClassResponse(key: string, value: string): TGeneric; syncOriginal(): /*elided*/ any; syncChanges(): /*elided*/ any; syncOriginalAttribute(attribute: string): void; syncOriginalAttributes(...attributes: string[]): /*elided*/ any; isDirty(...attributes: string[]): boolean; getDirty(): TGeneric; originalIsEquivalent(key: string): boolean; setAttributes(attributes: TGeneric): void; setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/ any; getAttributes(): { [x: string]: any; }; setAttribute(key: string, value: string): /*elided*/ any; getAttribute(key: string): any; castAttribute(key: string, value: string): any; attributesToData(): { [x: string]: any; }; mutateAttribute(key: string, value: string | null): any; mutateAttributeForArray(_key: string, _value: string): void; isDateAttribute(key: string): boolean; serializeDate(date?: Date | string | null): string | null; getDates(): any[]; getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">; getCastType(key: string): any; hasCast(key: string, types?: readonly string[]): boolean; withDayjs(date: string): import("dayjs").Dayjs; isCustomCast(cast: any): boolean; isCustomDateTimeCast(cast: any): boolean; isDecimalCast(cast: any): boolean; isDateCastable(key: string): boolean; fromDateTime(value: string): string; getDateFormat(): any; asDecimal(value: string, decimals: number): string; asDateTime(value: any): Date | null; asDate(value: string): Date; } & { [x: string]: any; hidden: any[]; visible: any[]; makeVisible(...keys: string[]): /*elided*/ any; makeHidden(key: string[], ...keys: string[]): /*elided*/ any; getHidden(): any[]; getVisible(): any[]; setHidden(hidden: any[]): /*elided*/ any; setVisible(visible: any[]): /*elided*/ any; } & { [x: string]: any; execHooks(hook: any, options: TGeneric): Promise; } & { [x: string]: any; getGlobalScopes(): any; } & { [x: string]: any; useUniqueIds: boolean; usesUniqueIds(): boolean; uniqueIds(): never[]; setUniqueIds(): void; }; execHooks: (hook: any, options: TGeneric) => Promise; getGlobalScopes: () => any; useUniqueIds: boolean; }; declare class Model$2 extends BaseModel { [key: string]: any; readonly $attributes: Attributes; readonly $relations: Relations; readonly $table: Table; protected builder: IBuilder | null; protected table: Table | null; protected keyType: string; protected incrementing: boolean; protected withCount: never[]; protected primaryKey: string; perPage: number; static globalScopes: {}; static pluginInitializers: {}; static _booted: {}; static resolver: arquebus; connection: TBaseConfig['client'] | null; eagerLoad: {}; exists: boolean; with: string | string[] | TGeneric<(...args: any[]) => IBuilder>; name: any; trx: null; constructor(attributes?: Partial); static define(): DefinedModel; static query(this: ModelConstructor, trx?: null): ModelBuilder; static on(this: ModelConstructor, connection?: TBaseConfig['client'] | null): ModelBuilder; static init(this: ModelConstructor, attributes?: ModelInput): M; static extend(plugin: TFunction, options: TGeneric): void; static make(this: ModelConstructor, attributes?: ModelInput): M; buildRelationships(attributes?: TGeneric): void; getConstructor(this: InstanceType): T; bootIfNotBooted(this: any): void; static booting(): void; static boot(): void; static booted(): void; static setConnectionResolver(resolver: arquebus): void; initialize(): void; initializePlugins(this: any): void; addPluginInitializer(this: any, method: any): void; newInstance(this: any, attributes?: TGeneric, exists?: boolean): any; newFromBuilder(attributes?: TGeneric, connection?: null): any; asProxy(): this; getKey(): string | number | null | undefined; getKeyName(): string; getForeignKey(): string; getConnectionName(): "mysql" | "mysql2" | "sqlite3" | "oracle" | "mariadb" | "pg"; getTable(): Table; getConnection(this: any): any; setConnection(connection: TBaseConfig['client'] | null): this; getKeyType(): string; newQuery(trx?: null): Builder, IModel | ICollection>>; newQueryWithoutScopes(trx?: null): Builder, IModel | ICollection>>; newModelQuery(trx?: null): Builder, IModel | ICollection>>; addGlobalScopes(this: any, builder: Builder): Builder, IModel | ICollection>>; hasNamedScope(name: string): boolean; callNamedScope(scope: string, parameters: any[]): any; setTable(table: Table): this; newCollection(this: any, models?: never[]): Collection$2>; load(this: any, ...relations: R[]): Promise; loadAggregate(relations: R[], column: string, callback?: TFunction | string | null): Promise; loadCount(...relations: R[]): Promise; loadMax(relations: R[], column: string): Promise; loadMin(relations: R[], column: string): Promise; loadSum(relations: R[], column: string): Promise; increment(column: string, amount?: number, extra?: TGeneric, options?: TGeneric): Promise; decrement(column: string, amount?: number, extra?: TGeneric, options?: TGeneric): Promise; incrementOrDecrement(column: string, amount: number, extra: TGeneric, method: string, options: TGeneric): Promise; toData(): Attributes & Partial; toJSON(): Attributes & Partial; toJson(...args: any[]): string; toString(): string; getAttributes(): Attributes; getAttribute(key: Key): Key extends keyof Attributes ? Attributes[Key] : unknown; setAttribute(key: Key, value: Key extends keyof Attributes ? Attributes[Key] : unknown): this; fill(attributes: Partial): this; transacting(trx: any): this; trashed(): boolean; getIncrementing(): boolean; setIncrementing(value: boolean): this; save(options?: TGeneric): Promise; update(attributes?: Partial, options?: TGeneric): Promise; delete(options?: {}): Promise; performDeleteOnModel(options?: TGeneric): Promise; setKeysForSaveQuery(query: any): any; forceDelete(options?: {}): Promise; fresh(this: any): any; refresh(this: any): Promise; newPivot(parent: E, attributes: TGeneric, table: string, exists: boolean, using?: typeof Pivot$1 | null): Pivot$1; qualifyColumn(column: ModelColumn | string): string; getQualifiedKeyName(): string; push(options?: {}): Promise; is(model: any): any; isNot(model: any): boolean; } declare class Pivot$1 extends Model$2 { incrementing: boolean; guarded: never[]; pivotParent: Model$2 | null; foreignKey: string | null; relatedKey: string | null; setPivotKeys(foreignKey: string, relatedKey: string): this; static fromRawAttributes(parent: E, attributes: TGeneric, table: string, exists?: boolean): Pivot$1; static fromAttributes(parent: E, attributes: TGeneric, table: string, exists?: boolean): Pivot$1; hasTimestampAttributes(this: any, attributes?: TGeneric | null): boolean; } //#endregion //#region types/generics.d.ts type TGeneric = Record; type XGeneric = { [key: string]: T; } & V; type Hook = 'creating' | 'created' | 'updating' | 'updated' | 'saving' | 'saved' | 'deleting' | 'deleted' | 'restoring' | 'restored' | 'trashed' | 'forceDeleted'; type TFunction = (...args: TArgs) => TReturn; type PrimitiveValue = string | number | boolean | Date | string[] | number[] | boolean[] | Date[] | null | Buffer; type ReturnTypeOfMethod = T[K] extends ((...args: any[]) => infer R) ? R : never; type SnakeToCamelCase = S extends `${infer T}_${infer U}` ? `${T}${Capitalize>}` : S; type CamelToSnakeCase = S extends `${infer T}${infer U}` ? U extends Uncapitalize ? `${Uncapitalize}${CamelToSnakeCase}` : `${Uncapitalize}_${CamelToSnakeCase}` : S; type FunctionPropertyNames = { [K in keyof T]: T[K] extends ((...args: any[]) => any) ? K : never; }[keyof T]; type RelationNames = FunctionPropertyNames extends (infer R) ? R extends `relation${infer P}` ? P extends 'sToData' | 'loaded' ? never : CamelToSnakeCase

: never : never; type MixinConstructor = new (...args: any[]) => T; //#endregion //#region src/browser/paginator.d.ts declare class Paginator implements IPaginator { static formatter: (paginator: IPaginator) => any | null; _items: Collection; _total: number; _perPage: number; _lastPage: number; _currentPage: number; hasMore: boolean; options: TGeneric; constructor(items: T[], total: number, perPage: number, currentPage?: number, options?: TGeneric); static setFormatter(formatter: (paginator: IPaginator) => any | null): void; setItems(items: T[]): void; firstItem(): number | null; lastItem(): number | null; hasMorePages(): boolean; get(index: number): T | null; count(): number; items(): any; map(callback: (value: T, index: number) => T): any; currentPage(): number; onFirstPage(): boolean; perPage(): number; lastPage(): number; total(): number; toData(): any; toJSON(): any; toJson(...args: any[]): string; } //#endregion //#region src/browser/index.d.ts interface IMake { (model: T, data: TGeneric): T; (model: T, data: Array): Collection; (model: T, data: TGeneric, options: { paginated?: IPaginatorParams; }): Paginator; } declare const make: IMake; declare const makeCollection: (model: T, data: TGeneric) => Collection; declare const isBrowser = true; declare const _default: { isBrowser: boolean; Paginator: typeof Paginator; Collection: typeof Collection; Model: typeof Model$1; Pivot: typeof Pivot; Attribute: typeof Attribute; CastsAttributes: typeof CastsAttributes; HasUniqueIds: (Model: TBase) => { new (...args: any[]): { [x: string]: any; useUniqueIds: boolean; uniqueIds(): any[]; getKeyType(): any; getIncrementing(): any; }; } & TBase; make: IMake; makeCollection: (model: T, data: TGeneric) => Collection; makePaginator: (model: T, data: TGeneric) => Paginator; }; //#endregion export { Attribute, CastsAttributes, Collection, HasUniqueIds, InvalidArgumentError, Model$1 as Model, ModelNotFoundError, Paginator, Pivot, RelationNotFoundError, compose, _default as default, defineConfig, flatten, flattenDeep, getAttrMethod, getAttrName, getGetterMethod, getRelationMethod, getRelationName, getScopeMethod, getScopeName, getSetterMethod, isBrowser, kebabCase, make, makeCollection, now, snakeCase, tap };