@h3ravel/arquebus 0.4.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,5 @@
1
1
  import { Collection as Collection$1 } from "collect.js";
2
+ import * as dayjs0 from "dayjs";
2
3
  import Knex$1, { Knex } from "knex";
3
4
 
4
5
  //#region src/browser/collection.d.ts
@@ -30,11 +31,175 @@ declare class Collection<I extends Model> extends Collection$1<I> {
30
31
  [Symbol.iterator]: () => Iterator<I>;
31
32
  }
32
33
  //#endregion
34
+ //#region types/modeling.d.ts
35
+ interface Attribute$1 {
36
+ make(config: {
37
+ get?: TFunction | null;
38
+ set?: TFunction | null;
39
+ }): Attribute$1;
40
+ get: TFunction | null;
41
+ set: TFunction | null;
42
+ withCaching?: boolean;
43
+ withObjectCaching?: boolean;
44
+ }
45
+ type Relation$1<M extends Model$1> = IBuilder<M, any> & {};
46
+ interface HasOneOrMany<M extends Model$1> extends Relation$1<M> {
47
+ save(model: M): Promise<M>;
48
+ saveMany(models: M[] | ICollection<M>): Promise<ICollection<M>>;
49
+ create(attributes?: any): Promise<M>;
50
+ createMany(records: any[]): Promise<ICollection<M>>;
51
+ }
52
+ interface HasOne<M extends Model$1> extends HasOneOrMany<M> {
53
+ getResults(): Promise<M | null>;
54
+ withDefault(callback?: TFunction | object): this;
55
+ }
56
+ interface HasMany<M extends Model$1> extends HasOneOrMany<M> {
57
+ getResults(): Promise<ICollection<M>>;
58
+ }
59
+ interface BelongsTo<M extends Model$1> extends Relation$1<M> {
60
+ getResults(): Promise<M | null>;
61
+ withDefault(callback?: TFunction | object): this;
62
+ }
63
+ interface BelongsToMany<M extends Model$1> extends Relation$1<M> {
64
+ getResults(): Promise<ICollection<M>>;
65
+ withTimestamps(): this;
66
+ wherePivot(column: any, operator?: any, value?: any, boolean?: string, ...args: any[]): this;
67
+ wherePivotBetween(column: any, values: any, boolean?: string, not?: boolean): this;
68
+ orWherePivotBetween(column: any, values: any): this;
69
+ wherePivotNotBetween(column: any, values: any, boolean?: string): this;
70
+ orWherePivotNotBetween(column: any, values: any): this;
71
+ wherePivotIn(column: any, values: any, boolean?: string, not?: boolean): this;
72
+ orWherePivot(column: any, operator?: any, value?: any): this;
73
+ orWherePivotIn(column: any, values: any): this;
74
+ wherePivotNotIn(column: any, values: any, boolean?: string): this;
75
+ orWherePivotNotIn(column: any, values: any): this;
76
+ wherePivotNull(column: any, boolean?: string, not?: boolean): this;
77
+ wherePivotNotNull(column: any, boolean?: string): this;
78
+ orWherePivotNull(column: any, not?: boolean): this;
79
+ orWherePivotNotNull(column: any): this;
80
+ orderByPivot(column: any, direction?: string): this;
81
+ }
82
+ interface IModel {
83
+ [value: string]: any;
84
+ attributes: any;
85
+ relations: any;
86
+ exists: boolean;
87
+ connection?: TBaseConfig['client'] | null;
88
+ perPage: number;
89
+ with: string | string[] | TGeneric<(...args: any[]) => IBuilder<Model$1>>;
90
+ trx: AnyQueryBuilder | null;
91
+ timestamps: boolean;
92
+ dateFormat: string;
93
+ visible: string[];
94
+ hidden: string[];
95
+ query<T extends {
96
+ prototype: unknown;
97
+ }>(this: T, client?: AnyQueryBuilder | null): IBuilder<Model$1>;
98
+ on<T extends {
99
+ prototype: unknown;
100
+ }>(this: T, connection: string | null): IBuilder<Model$1>;
101
+ boot(): void;
102
+ make<T extends IModel>(this: new () => T, attributes?: TGeneric): T;
103
+ addHook(hook: Hook, callback: TFunction): void;
104
+ creating(callback: TFunction): void;
105
+ created(callback: TFunction): void;
106
+ updating(callback: TFunction): void;
107
+ updated(callback: TFunction): void;
108
+ deleting(callback: TFunction): void;
109
+ deleted(callback: TFunction): void;
110
+ saving(callback: TFunction): void;
111
+ saved(callback: TFunction): void;
112
+ restoring(callback: TFunction): void;
113
+ restored(callback: TFunction): void;
114
+ trashed(callback: TFunction): void;
115
+ forceDeleted(callback: TFunction): void;
116
+ bootIfNotBooted(): void;
117
+ initialize(): void;
118
+ initializePlugins(): void;
119
+ addPluginInitializer(method: any): void;
120
+ newInstance(attributes?: TGeneric, exists?: boolean): any;
121
+ getKey(): string | number | null | undefined;
122
+ getKeyName(): string;
123
+ getConnectionName(): string;
124
+ getConnection(): any;
125
+ setConnection(connection: TBaseConfig['client'] | null): this;
126
+ usesUniqueIds(): boolean;
127
+ uniqueIds(): string[];
128
+ setUniqueIds(): void;
129
+ getKeyType(): string;
130
+ getIncrementing(): boolean;
131
+ setIncrementing(value: boolean): this;
132
+ getTable(): string;
133
+ setTable(table: string): this;
134
+ getDates(): string[];
135
+ getDateFormat(): string;
136
+ getAttributes(): object;
137
+ getAttribute(key: string): any;
138
+ setAttribute(key: string, value: any): this;
139
+ fill(attributes: any): this;
140
+ setAppends(appends: string[]): this;
141
+ append(key: string | string[]): this;
142
+ getRelation<T extends Model$1>(relation: string): T | ICollection<T> | null | undefined;
143
+ setRelation<T extends Model$1>(relation: string, value: T | ICollection<T> | null): this;
144
+ unsetRelation(relation: string): this;
145
+ relationLoaded(relation: string): boolean;
146
+ makeVisible(attributes: string | string[]): this;
147
+ makeHidden(attributes: string | string[]): this;
148
+ newCollection(models?: any[]): ICollection<Model$1>;
149
+ load(relations: WithRelationType): Promise<this>;
150
+ load(...relations: WithRelationType[]): Promise<this>;
151
+ loadAggregate(relations: WithRelationType, column: any, callback?: any): Promise<this>;
152
+ loadCount(...relations: WithRelationType[]): Promise<this>;
153
+ loadMax(relations: WithRelationType, column: string): Promise<this>;
154
+ loadMin(relations: WithRelationType, column: string): Promise<this>;
155
+ loadSum(relations: WithRelationType, column: string): Promise<this>;
156
+ usesTimestamps(): boolean;
157
+ updateTimestamps(): this;
158
+ getCreatedAtColumn(): string;
159
+ getUpdatedAtColumn(): string;
160
+ getDeletedAtColumn(): string;
161
+ setCreatedAt(value: string): this;
162
+ setUpdatedAt(value: string): this;
163
+ freshTimestamp(): Date;
164
+ freshTimestampString(): string;
165
+ fromDateTime(value: Date | number | null): string;
166
+ useSoftDeletes(): boolean;
167
+ toData(): any;
168
+ attributesToData(): any;
169
+ relationsToData(): any;
170
+ toJSON(): any;
171
+ toJson(): string;
172
+ toString(): string;
173
+ isDirty(attributes?: string | string[]): boolean;
174
+ getDirty(): string[];
175
+ save(options?: any): Promise<boolean>;
176
+ update(attributes?: any, options?: any): Promise<boolean>;
177
+ increment(column: string, amount?: number, extra?: any): Promise<boolean>;
178
+ decrement(column: string, amount?: number, extra?: any): Promise<boolean>;
179
+ serializeDate(date: any): string;
180
+ delete(options?: any): Promise<boolean>;
181
+ softDelete(options?: any): Promise<boolean>;
182
+ forceDelete(options?: any): Promise<boolean>;
183
+ restore(options?: any): Promise<boolean>;
184
+ trashed(): boolean;
185
+ fresh(): Promise<this>;
186
+ refresh(): Promise<this | undefined>;
187
+ push(): Promise<boolean>;
188
+ is(model: this): boolean;
189
+ isNot(model: this): boolean;
190
+ related<T extends RelationNames<this>>(relation: T): ReturnTypeOfMethod<this, `relation${Capitalize<SnakeToCamelCase<T>>}`>;
191
+ getRelated<T extends RelationNames<this>>(relation: T): ReturnTypeOfMethod<ReturnTypeOfMethod<this, `relation${Capitalize<SnakeToCamelCase<T>>}`>, any>;
192
+ hasOne<T extends Model$1>(model: new () => T, foreignKey?: string, localKey?: string): HasOne<T>;
193
+ hasMany<T extends Model$1>(model: new () => T, foreignKey?: string, localKey?: string): HasMany<T>;
194
+ belongsTo<T extends Model$1>(model: new () => T, foreignKey?: string, ownerKey?: string, relation?: string): BelongsTo<T>;
195
+ belongsToMany<T extends Model$1>(model: new () => T, table?: string, foreignPivotKey?: string, relatedPivotKey?: string, parentKey?: string, relatedKey?: string): BelongsToMany<T>;
196
+ }
197
+ //#endregion
33
198
  //#region src/collection.d.ts
34
199
  declare class Collection$2<I extends Model$1 | Model> extends Collection$1<I> implements ICollection<I> {
35
200
  private newConstructor;
36
201
  getConstructor<T extends typeof Collection$2<I>>(this: InstanceType<T>): T;
37
- load(...relations: I[]): Promise<Collection$2<I>>;
202
+ load(...relations: (string[] | I[] | string | I)[]): Promise<Collection$2<I>>;
38
203
  loadAggregate<I>(relations: I, column: string, action?: string | null | TFunction): Promise<this>;
39
204
  loadCount(relations: I): Promise<this>;
40
205
  loadMax(relation: I, column: string): Promise<this>;
@@ -80,7 +245,7 @@ declare class Paginator$1<T extends Model$1, K extends IPaginatorParams = IPagin
80
245
  _currentPage: number;
81
246
  hasMore: boolean;
82
247
  options: TGeneric;
83
- static setFormatter(formatter: (paginator: IPaginator<any>) => any | null): void;
248
+ static setFormatter(formatter?: ((paginator: IPaginator<any> | null) => any) | null): void;
84
249
  constructor(items: T[], total: number, perPage: number, currentPage?: number, options?: TGeneric);
85
250
  setItems(items: T[]): void;
86
251
  firstItem(): number | null;
@@ -108,7 +273,7 @@ declare class Scope<M extends Model$1 = Model$1> implements IScope {
108
273
  //#endregion
109
274
  //#region src/builder.d.ts
110
275
  declare const Inference$1: {
111
- new <M extends Model$1 = Model$1, R = IModel | ICollection<M>>(): IBuilder<M, R>;
276
+ new <M extends Model$1 | Model = Model$1, R = IModel | ICollection<M>>(): IBuilder<M, R>;
112
277
  };
113
278
  declare class Builder<M extends Model$1 = Model$1, R = IModel | ICollection<M>> extends Inference$1 {
114
279
  query: IBuilder<M, R>;
@@ -200,7 +365,7 @@ declare class Builder<M extends Model$1 = Model$1, R = IModel | ICollection<M>>
200
365
  find(this: any, id: string | number | Collection$2<M>, columns?: string[]): Promise<any>;
201
366
  findMany(this: any, ids: string[] | number[] | ICollection<any>, columns?: string[]): Promise<any>;
202
367
  pluck(column: string): Promise<any>;
203
- destroy(this: any, ids?: (string | number)[] | TFunction | Collection$2<M>): Promise<number>;
368
+ destroy(this: any, ids?: string | number | string[] | number[] | TFunction | Collection$2<M>): Promise<number>;
204
369
  get<M extends Model$1>(columns?: string | string[]): Promise<Collection$2<M>>;
205
370
  all(columns?: string[]): Promise<any>;
206
371
  paginate(this: any, page?: number, perPage?: number): Promise<Paginator$1<any, IPaginatorParams>>;
@@ -210,7 +375,7 @@ declare class Builder<M extends Model$1 = Model$1, R = IModel | ICollection<M>>
210
375
  isNestedUnder(relation: string, name: string): boolean;
211
376
  eagerLoadRelation<M extends Model$1>(models: M[], name: string, constraints: any): Promise<any>;
212
377
  eagerLoadRelations<M extends Model$1>(models: M[]): Promise<M[]>;
213
- hydrate(items: any[]): Collection$2<any>;
378
+ hydrate(items: any[] | ICollection<any>): Collection$2<any>;
214
379
  }
215
380
  //#endregion
216
381
  //#region src/inspector/types/column.d.ts
@@ -313,17 +478,22 @@ interface IStatement {
313
478
  bool: 'and' | 'or' | 'not';
314
479
  }
315
480
  interface IQueryBuilder<M extends Model$1 | Model = Model$1, R = M[] | M> {
481
+ query: IBuilder<M, R>;
316
482
  schema: SchemaBuilder;
317
483
  _statements: IStatement[];
318
484
  table(name: string): IQueryBuilder<M, R>;
319
485
  select: SelectMethod<this>;
486
+ addSelect: AddSelectMethod<this>;
320
487
  columns: SelectMethod<this>;
321
488
  column: SelectMethod<this>;
322
489
  distinct: SelectMethod<this>;
490
+ returning: ReturningMethod<this>;
323
491
  distinctOn: SelectMethod<this>;
324
492
  as: AsMethod<this>;
325
493
  asProxy(): IQueryBuilder<M, R>;
326
494
  where: WhereMethod<this>;
495
+ firstOrFail: FirstOrFailMethod<this>;
496
+ forceDelete: ForceDeleteMethod;
327
497
  andWhere: WhereMethod<this>;
328
498
  orWhere(...args: any[]): this;
329
499
  whereNot: WhereMethod<this>;
@@ -338,6 +508,7 @@ interface IQueryBuilder<M extends Model$1 | Model = Model$1, R = M[] | M> {
338
508
  orWhereExists: WhereExistsMethod<this>;
339
509
  whereNotExists: WhereExistsMethod<this>;
340
510
  orWhereNotExists: WhereExistsMethod<this>;
511
+ restore: RestoreMethod;
341
512
  whereIn: WhereInMethod<this>;
342
513
  orWhereIn: WhereInMethod<this>;
343
514
  whereNotIn: WhereInMethod<this>;
@@ -457,7 +628,7 @@ declare class QueryBuilder<M extends Model$1 = Model$1, R = M[] | M> extends Inf
457
628
  skip(this: any, ...args: any[]): any;
458
629
  take(this: any, ...args: any[]): any;
459
630
  chunk(count: number, callback: TFunction): Promise<boolean>;
460
- paginate<F extends IPaginatorParams>(this: any, page?: number, perPage?: number): Promise<IPaginator<M, F>>;
631
+ paginate<F extends IPaginatorParams>(this: any, page: number | undefined, perPage: number | undefined, _pageName: string, _page: number): Promise<IPaginator<M, F>>;
461
632
  forPage(this: any, page?: number, perPage?: number): any;
462
633
  toSQL(...args: Parameters<typeof (void 0).connector.toSQL>): Knex.Sql;
463
634
  count(column: string): Promise<number>;
@@ -476,7 +647,7 @@ declare class QueryBuilder<M extends Model$1 = Model$1, R = M[] | M> extends Inf
476
647
  }
477
648
  //#endregion
478
649
  //#region src/relations/relation.d.ts
479
- declare class Relation$1 {
650
+ declare class Relation {
480
651
  query: QueryBuilder;
481
652
  parent: any;
482
653
  related: any;
@@ -683,7 +854,7 @@ type Static<T> = { [K in keyof T]: T[K] };
683
854
  * @param mixins
684
855
  * @returns
685
856
  */
686
- declare function compose$1<TBase extends Constructor, TMixins extends Array<Mixin<any> | Constructor>>(Base: TBase, ...mixins: TMixins): Constructor<InstanceType<TBase> & UnionToIntersection<{ [K in keyof TMixins]: TMixins[K] extends Mixin<any> ? InstanceType<ReturnType<TMixins[K]>> : TMixins[K] extends Constructor ? InstanceType<TMixins[K]> : never }[number]>> & UnionToIntersection<{ [K in keyof TMixins]: TMixins[K] extends Mixin<any> ? Static<ReturnType<TMixins[K]>> : TMixins[K] extends Constructor ? Static<TMixins[K]> : never }[number]> & Static<TBase>;
857
+ declare function compose$1<TBase extends Constructor, TMixins extends Array<Mixin<any> | Constructor> = any>(Base: TBase, ...mixins: TMixins): Constructor<InstanceType<TBase> & TBase & UnionToIntersection<{ [K in keyof TMixins]: TMixins[K] extends Mixin<any> ? InstanceType<ReturnType<TMixins[K]>> : TMixins[K] extends Constructor ? InstanceType<TMixins[K]> : never }[number]>> & UnionToIntersection<{ [K in keyof TMixins]: TMixins[K] extends Mixin<any> ? Static<ReturnType<TMixins[K]>> : TMixins[K] extends Constructor ? Static<TMixins[K]> : never }[number]> & Static<TBase>;
687
858
  //#endregion
688
859
  //#region src/utils.d.ts
689
860
  declare const now: (format?: string) => string;
@@ -760,7 +931,7 @@ interface ModelOptions<M extends Model$1 = Model$1> {
760
931
  table?: string;
761
932
  scopes?: TGeneric<(...args: any[]) => Builder<M>>;
762
933
  plugins?: (<X extends MixinConstructor<M>>(Model: X) => MixinConstructor<M>)[];
763
- relations?: TGeneric<(...args: any[]) => Relation$1>;
934
+ relations?: TGeneric<(...args: any[]) => Relation>;
764
935
  attributes?: TGeneric<Attribute$1>;
765
936
  CREATED_AT?: string;
766
937
  UPDATED_AT?: string;
@@ -896,6 +1067,7 @@ interface IPaginatorParams {
896
1067
  total: number;
897
1068
  last_page: number;
898
1069
  count: number;
1070
+ paginated?: boolean;
899
1071
  }
900
1072
  interface IPaginator<T extends Model$1 | Model, K extends IPaginatorParams = IPaginatorParams> {
901
1073
  formatter?(paginator: IPaginator<any>): any | null;
@@ -924,13 +1096,22 @@ interface IPaginator<T extends Model$1 | Model, K extends IPaginatorParams = IPa
924
1096
  }
925
1097
  //#endregion
926
1098
  //#region types/builder.d.ts
1099
+ type BaseBuilder<M extends Model$1 | Model, R = ICollection<M> | IModel> = Omit<IQueryBuilder<M, R>, 'destroy' | 'clone' | 'get' | 'skip' | 'limit' | 'take' | 'offset' | 'chunk' | 'forPage' | 'orWhere' | 'pluck'>;
927
1100
  interface IScope {
928
1101
  apply(builder: Builder<any>, model: Model$1): void;
929
1102
  }
930
- interface IBuilder<M extends Model$1 | Model, R = ICollection<M> | IModel> extends IQueryBuilder<M, R> {
1103
+ interface IBuilder<M extends Model$1 | Model, R = ICollection<M> | IModel> extends BaseBuilder<M, R> {
1104
+ connector: IQueryBuilder<M, R> & Knex.QueryBuilder & {
1105
+ _statements: any[];
1106
+ _single: any;
1107
+ } & Knex;
931
1108
  asProxy(): IQueryBuilder<M, R>;
1109
+ chunk(count: number, callback: (rows: ICollection<M>) => any): Promise<boolean>;
932
1110
  enforceOrderBy(): void;
933
- insert(attributes: any): Promise<any>;
1111
+ idOf(id: string | number): this;
1112
+ clone(): IBuilder<M, R>;
1113
+ forPage(page: number, perPage?: number): this;
1114
+ insert(...attributes: any[]): Promise<any>;
934
1115
  update(attributes: any): Promise<any>;
935
1116
  increment(column: string, amount?: number, extra?: any): Promise<any>;
936
1117
  decrement(column: string, amount?: number, extra?: any): Promise<any>;
@@ -961,6 +1142,7 @@ interface IBuilder<M extends Model$1 | Model, R = ICollection<M> | IModel> exten
961
1142
  doesntHave(relation: string, boolean?: any, callback?: (builder: IBuilder<any>) => void | null): this;
962
1143
  orDoesntHave(relation: string): this;
963
1144
  whereHas(relation: string, callback?: (builder: IBuilder<any>) => void | IBuilder<any> | null, operator?: any, count?: number): this;
1145
+ orWhere(...args: any[]): this;
964
1146
  orWhereHas(relation: string, callback?: (builder: IBuilder<any>) => void | IBuilder<any> | null, operator?: any, count?: number): this;
965
1147
  whereRelation(relation: string, column: string, operator?: any, value?: any): this;
966
1148
  hasNested(relation: string, operator?: any, count?: number, boolean?: any, callback?: (builder: IBuilder<any>) => void | null): this;
@@ -975,6 +1157,10 @@ interface IBuilder<M extends Model$1 | Model, R = ICollection<M> | IModel> exten
975
1157
  withSum(relation: WithRelationType, column: string): this;
976
1158
  withExists(relation: WithRelationType): this;
977
1159
  related(relation: string): this;
1160
+ take(count: number): this;
1161
+ skip(count: number): this;
1162
+ limit(count: number): this;
1163
+ offset(count: number): this;
978
1164
  first(column?: string | string[]): Promise<M | null | undefined>;
979
1165
  firstOrFail(column?: string | string[]): Promise<M>;
980
1166
  findOrFail(key: string | number, columns?: string[]): Promise<M>;
@@ -989,6 +1175,8 @@ interface IBuilder<M extends Model$1 | Model, R = ICollection<M> | IModel> exten
989
1175
  find(key: string | number, columns?: string[]): Promise<M | null | undefined>;
990
1176
  findMany(keys: string[] | number[] | ICollection<any>, columns?: string[]): Promise<ICollection<M>>;
991
1177
  pluck<X extends Model$1 = any | M>(column: string): Promise<ICollection<X>>;
1178
+ destroy(ids?: string | number | string[] | number[] | TFunction | ICollection<any>): Promise<number>;
1179
+ get(columns?: string[]): Promise<ICollection<M>>;
992
1180
  all(columns?: string[]): Promise<ICollection<M>>;
993
1181
  paginate<F extends IPaginatorParams>(page?: number, perPage?: number): Promise<IPaginator<M, F>>;
994
1182
  [value: string]: any;
@@ -1075,6 +1263,23 @@ interface OrderByMethod<QB extends AnyQueryBuilder> {
1075
1263
  interface WhereJsonExpressionMethod<QB extends AnyQueryBuilder> {
1076
1264
  (fieldExpression: FieldExpression, keys: string | string[]): QB;
1077
1265
  }
1266
+ interface ReturningMethod<QB extends AnyQueryBuilder> {
1267
+ (key: FieldExpression | FieldExpression[], options?: {
1268
+ [key: string]: any;
1269
+ }): QB;
1270
+ }
1271
+ interface FirstOrFailMethod<QB extends AnyQueryBuilder> {
1272
+ (): Promise<QB>;
1273
+ }
1274
+ interface AddSelectMethod<QB extends AnyQueryBuilder> {
1275
+ (params: string[]): QB;
1276
+ }
1277
+ interface ForceDeleteMethod {
1278
+ (): Promise<boolean | number>;
1279
+ }
1280
+ interface RestoreMethod {
1281
+ (): Promise<number>;
1282
+ }
1078
1283
  interface WhereColumnMethod<QB extends AnyQueryBuilder> {
1079
1284
  (col1: ColumnRef, op: Operator, col2: ColumnRef): QB;
1080
1285
  (col1: ColumnRef, col2: ColumnRef): QB;
@@ -1103,188 +1308,3454 @@ interface JoinMethod<QB extends AnyQueryBuilder> {
1103
1308
  (raw: Raw): QB;
1104
1309
  }
1105
1310
  //#endregion
1106
- //#region types/modeling.d.ts
1107
- interface Attribute$1 {
1108
- make(config: {
1109
- get?: TFunction | null;
1110
- set?: TFunction | null;
1111
- }): Attribute$1;
1112
- get: TFunction | null;
1113
- set: TFunction | null;
1114
- withCaching?: boolean;
1115
- withObjectCaching?: boolean;
1116
- }
1117
- type Relation<M extends Model$1> = IBuilder<M, any> & {};
1118
- interface HasOneOrMany<M extends Model$1> extends Relation<M> {
1119
- save(model: M): Promise<M>;
1120
- saveMany(models: M[] | ICollection<M>): Promise<ICollection<M>>;
1121
- create(attributes?: any): Promise<M>;
1122
- createMany(records: any[]): Promise<ICollection<M>>;
1123
- }
1124
- interface HasOne<M extends Model$1> extends HasOneOrMany<M> {
1125
- getResults(): Promise<M | null>;
1126
- withDefault(callback?: TFunction | object): this;
1127
- }
1128
- interface HasMany<M extends Model$1> extends HasOneOrMany<M> {
1129
- getResults(): Promise<ICollection<M>>;
1130
- }
1131
- interface BelongsTo<M extends Model$1> extends Relation<M> {
1132
- getResults(): Promise<M | null>;
1133
- withDefault(callback?: TFunction | object): this;
1134
- }
1135
- interface BelongsToMany<M extends Model$1> extends Relation<M> {
1136
- getResults(): Promise<ICollection<M>>;
1137
- withTimestamps(): this;
1138
- wherePivot(column: any, operator?: any, value?: any, boolean?: string, ...args: any[]): this;
1139
- wherePivotBetween(column: any, values: any, boolean?: string, not?: boolean): this;
1140
- orWherePivotBetween(column: any, values: any): this;
1141
- wherePivotNotBetween(column: any, values: any, boolean?: string): this;
1142
- orWherePivotNotBetween(column: any, values: any): this;
1143
- wherePivotIn(column: any, values: any, boolean?: string, not?: boolean): this;
1144
- orWherePivot(column: any, operator?: any, value?: any): this;
1145
- orWherePivotIn(column: any, values: any): this;
1146
- wherePivotNotIn(column: any, values: any, boolean?: string): this;
1147
- orWherePivotNotIn(column: any, values: any): this;
1148
- wherePivotNull(column: any, boolean?: string, not?: boolean): this;
1149
- wherePivotNotNull(column: any, boolean?: string): this;
1150
- orWherePivotNull(column: any, not?: boolean): this;
1151
- orWherePivotNotNull(column: any): this;
1152
- orderByPivot(column: any, direction?: string): this;
1153
- }
1154
- interface IModel {
1155
- [value: string]: any;
1311
+ //#region src/model.d.ts
1312
+ declare const BaseModel: (new (...args: any[]) => any) & {
1313
+ [x: string]: any;
1314
+ } & {
1315
+ [x: string]: any;
1156
1316
  attributes: any;
1157
1317
  relations: any;
1158
1318
  exists: boolean;
1159
- primaryKey: string;
1160
- builder?: IBuilder<any, any> | null;
1161
- table: string | null;
1162
- connection?: TBaseConfig['client'] | null;
1163
- keyType: string;
1164
- incrementing: boolean;
1319
+ connection?: (TBaseConfig["client"] | null) | undefined;
1165
1320
  perPage: number;
1166
1321
  with: string | string[] | TGeneric<(...args: any[]) => IBuilder<Model$1>>;
1167
- withCount: string[];
1168
1322
  trx: AnyQueryBuilder | null;
1169
1323
  timestamps: boolean;
1170
1324
  dateFormat: string;
1171
- visible: string[];
1172
- hidden: string[];
1173
- query<T extends {
1325
+ visible: string[] & any[];
1326
+ hidden: string[] & any[];
1327
+ query: <T extends {
1174
1328
  prototype: unknown;
1175
- }>(this: T, client?: AnyQueryBuilder | null): IBuilder<Model$1>;
1176
- on<T extends {
1329
+ }>(this: T, client?: AnyQueryBuilder | null) => IBuilder<Model$1>;
1330
+ on: <T extends {
1177
1331
  prototype: unknown;
1178
- }>(this: T, connection: string | null): IBuilder<Model$1>;
1179
- boot(): void;
1180
- make<T extends IModel>(this: new () => T, attributes?: TGeneric): T;
1181
- addHook(hook: Hook, callback: TFunction): void;
1182
- creating(callback: TFunction): void;
1183
- created(callback: TFunction): void;
1184
- updating(callback: TFunction): void;
1185
- updated(callback: TFunction): void;
1186
- deleting(callback: TFunction): void;
1187
- deleted(callback: TFunction): void;
1188
- saving(callback: TFunction): void;
1189
- saved(callback: TFunction): void;
1190
- restoring(callback: TFunction): void;
1191
- restored(callback: TFunction): void;
1192
- trashed(callback: TFunction): void;
1193
- forceDeleted(callback: TFunction): void;
1194
- bootIfNotBooted(): void;
1195
- initialize(): void;
1196
- initializePlugins(): void;
1197
- addPluginInitializer(method: any): void;
1198
- newInstance(attributes?: TGeneric, exists?: boolean): any;
1199
- getKey(): string | number | null | undefined;
1200
- getKeyName(): string;
1201
- getConnectionName(): string;
1202
- getConnection(): any;
1203
- setConnection(connection: TBaseConfig['client'] | null): this;
1204
- usesUniqueIds(): boolean;
1205
- uniqueIds(): string[];
1206
- newUniqueId(): string;
1207
- setUniqueIds(): void;
1208
- getKeyType(): string;
1209
- getIncrementing(): boolean;
1210
- setIncrementing(value: boolean): this;
1211
- getTable(): string;
1212
- setTable(table: string): this;
1213
- getDates(): string[];
1214
- getDateFormat(): string;
1215
- getAttributes(): object;
1216
- getAttribute(key: string): any;
1217
- setAttribute(key: string, value: any): this;
1218
- fill(attributes: any): this;
1219
- setAppends(appends: string[]): this;
1220
- append(key: string | string[]): this;
1221
- getRelation<T extends Model$1>(relation: string): T | ICollection<T> | null | undefined;
1222
- setRelation<T extends Model$1>(relation: string, value: T | ICollection<T> | null): this;
1223
- unsetRelation(relation: string): this;
1224
- relationLoaded(relation: string): boolean;
1225
- makeVisible(attributes: string | string[]): this;
1226
- makeHidden(attributes: string | string[]): this;
1227
- newCollection(models?: any[]): ICollection<Model$1>;
1228
- load(relations: WithRelationType): Promise<this>;
1229
- load(...relations: WithRelationType[]): Promise<this>;
1230
- loadAggregate(relations: WithRelationType, column: any, callback?: any): Promise<this>;
1231
- loadCount(...relations: WithRelationType[]): Promise<this>;
1232
- loadMax(relations: WithRelationType, column: string): Promise<this>;
1233
- loadMin(relations: WithRelationType, column: string): Promise<this>;
1234
- loadSum(relations: WithRelationType, column: string): Promise<this>;
1235
- usesTimestamps(): boolean;
1236
- updateTimestamps(): this;
1237
- getCreatedAtColumn(): string;
1238
- getUpdatedAtColumn(): string;
1239
- getDeletedAtColumn(): string;
1240
- setCreatedAt(value: string): this;
1241
- setUpdatedAt(value: string): this;
1242
- freshTimestamp(): Date;
1243
- freshTimestampString(): string;
1244
- fromDateTime(value: Date | number | null): string;
1245
- useSoftDeletes(): boolean;
1246
- toData(): any;
1247
- attributesToData(): any;
1248
- relationsToData(): any;
1249
- toJSON(): any;
1250
- toJson(): string;
1251
- toString(): string;
1252
- isDirty(attributes?: string | string[]): boolean;
1253
- getDirty(): string[];
1254
- save(options?: any): Promise<boolean>;
1255
- update(attributes?: any, options?: any): Promise<boolean>;
1256
- increment(column: string, amount?: number, extra?: any): Promise<boolean>;
1257
- decrement(column: string, amount?: number, extra?: any): Promise<boolean>;
1258
- serializeDate(date: any): string;
1259
- delete(options?: any): Promise<boolean>;
1260
- softDelete(options?: any): Promise<boolean>;
1261
- forceDelete(options?: any): Promise<boolean>;
1262
- restore(options?: any): Promise<boolean>;
1263
- trashed(): boolean;
1264
- fresh(): Promise<this>;
1265
- refresh(): Promise<this | undefined>;
1266
- push(): Promise<boolean>;
1267
- is(model: this): boolean;
1268
- isNot(model: this): boolean;
1269
- related<T extends RelationNames<this>>(relation: T): ReturnTypeOfMethod<this, `relation${Capitalize<SnakeToCamelCase<T>>}`>;
1270
- getRelated<T extends RelationNames<this>>(relation: T): ReturnTypeOfMethod<ReturnTypeOfMethod<this, `relation${Capitalize<SnakeToCamelCase<T>>}`>, any>;
1271
- hasOne<T extends Model$1>(model: new () => T, foreignKey?: string, localKey?: string): HasOne<T>;
1272
- hasMany<T extends Model$1>(model: new () => T, foreignKey?: string, localKey?: string): HasMany<T>;
1273
- belongsTo<T extends Model$1>(model: new () => T, foreignKey?: string, ownerKey?: string, relation?: string): BelongsTo<T>;
1274
- belongsToMany<T extends Model$1>(model: new () => T, table?: string, foreignPivotKey?: string, relatedPivotKey?: string, parentKey?: string, relatedKey?: string): BelongsToMany<T>;
1275
- }
1276
- //#endregion
1277
- //#region src/model.d.ts
1278
- declare const BaseModel: (new (...args: any[]) => any) & {
1279
- [x: string]: any;
1332
+ }>(this: T, connection: string | null) => IBuilder<Model$1>;
1333
+ boot: () => void;
1334
+ make: <T extends IModel>(this: new () => T, attributes?: TGeneric) => T;
1335
+ addHook: (hook: Hook, callback: TFunction) => void;
1336
+ creating: (callback: TFunction) => void;
1337
+ created: (callback: TFunction) => void;
1338
+ updating: (callback: TFunction) => void;
1339
+ updated: (callback: TFunction) => void;
1340
+ deleting: (callback: TFunction) => void;
1341
+ deleted: (callback: TFunction) => void;
1342
+ saving: (callback: TFunction) => void;
1343
+ saved: (callback: TFunction) => void;
1344
+ restoring: (callback: TFunction) => void;
1345
+ restored: (callback: TFunction) => void;
1346
+ trashed: {
1347
+ (callback: TFunction): void;
1348
+ (): boolean;
1349
+ };
1350
+ forceDeleted: (callback: TFunction) => void;
1351
+ bootIfNotBooted: () => void;
1352
+ initialize: () => void;
1353
+ initializePlugins: () => void;
1354
+ addPluginInitializer: (method: any) => void;
1355
+ newInstance: (attributes?: TGeneric, exists?: boolean) => any;
1356
+ getKey: () => string | number | null | undefined;
1357
+ getKeyName: () => string;
1358
+ getConnectionName: () => string;
1359
+ getConnection: () => any;
1360
+ setConnection: (connection: TBaseConfig["client"] | null) => (new () => IModel) & IModel & {
1361
+ [x: string]: any;
1362
+ timestamps: boolean;
1363
+ dateFormat: string;
1364
+ usesTimestamps(): boolean;
1365
+ updateTimestamps(): /*elided*/any;
1366
+ getCreatedAtColumn(): any;
1367
+ getUpdatedAtColumn(): any;
1368
+ setCreatedAt(value: any): /*elided*/any;
1369
+ setUpdatedAt(value: any): /*elided*/any;
1370
+ freshTimestamp(): Date;
1371
+ freshTimestampString(): any;
1372
+ } & TGeneric<any, string> & {
1373
+ [x: string]: any;
1374
+ attributes: TGeneric;
1375
+ original: TGeneric;
1376
+ casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
1377
+ changes: TGeneric;
1378
+ appends: any[];
1379
+ setAppends(appends: any[]): /*elided*/any;
1380
+ append(...keys: any[]): /*elided*/any;
1381
+ normalizeCastClassResponse(key: string, value: string): TGeneric;
1382
+ syncOriginal(): /*elided*/any;
1383
+ syncChanges(): /*elided*/any;
1384
+ syncOriginalAttribute(attribute: string): void;
1385
+ syncOriginalAttributes(...attributes: string[]): /*elided*/any;
1386
+ isDirty(...attributes: string[]): boolean;
1387
+ getDirty(): TGeneric;
1388
+ originalIsEquivalent(key: string): boolean;
1389
+ setAttributes(attributes: TGeneric): void;
1390
+ setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
1391
+ getAttributes(): {
1392
+ [x: string]: any;
1393
+ };
1394
+ setAttribute(key: string, value: string): /*elided*/any;
1395
+ getAttribute(key: string): any;
1396
+ castAttribute(key: string, value: string): any;
1397
+ attributesToData(): {
1398
+ [x: string]: any;
1399
+ };
1400
+ mutateAttribute(key: string, value: string | null): any;
1401
+ mutateAttributeForArray(_key: string, _value: string): void;
1402
+ isDateAttribute(key: string): boolean;
1403
+ serializeDate(date?: Date | string | null): string | null;
1404
+ getDates(): any[];
1405
+ getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
1406
+ getCastType(key: string): any;
1407
+ hasCast(key: string, types?: readonly string[]): boolean;
1408
+ withDayjs(date: string): dayjs0.Dayjs;
1409
+ isCustomCast(cast: any): boolean;
1410
+ isCustomDateTimeCast(cast: any): boolean;
1411
+ isDecimalCast(cast: any): boolean;
1412
+ isDateCastable(key: string): boolean;
1413
+ fromDateTime(value: string): string;
1414
+ getDateFormat(): any;
1415
+ asDecimal(value: string, decimals: number): string;
1416
+ asDateTime(value: any): Date | null;
1417
+ asDate(value: string): Date;
1418
+ } & {
1419
+ [x: string]: any;
1420
+ hidden: any[];
1421
+ visible: any[];
1422
+ makeVisible(...keys: string[]): /*elided*/any;
1423
+ makeHidden(key: string[], ...keys: string[]): /*elided*/any;
1424
+ getHidden(): any[];
1425
+ getVisible(): any[];
1426
+ setHidden(hidden: any[]): /*elided*/any;
1427
+ setVisible(visible: any[]): /*elided*/any;
1428
+ } & {
1429
+ [x: string]: any;
1430
+ execHooks(hook: any, options: TGeneric): Promise<any>;
1431
+ } & {
1432
+ [x: string]: any;
1433
+ getGlobalScopes(): {};
1434
+ } & {
1435
+ [x: string]: any;
1436
+ useUniqueIds: boolean;
1437
+ usesUniqueIds(): boolean;
1438
+ uniqueIds(): never[];
1439
+ setUniqueIds(): void;
1440
+ };
1441
+ usesUniqueIds: (() => boolean) & (() => boolean);
1442
+ uniqueIds: (() => string[]) & (() => never[]);
1443
+ setUniqueIds: (() => void) & (() => void);
1444
+ getKeyType: () => string;
1445
+ getIncrementing: () => boolean;
1446
+ setIncrementing: (value: boolean) => (new () => IModel) & IModel & {
1447
+ [x: string]: any;
1448
+ timestamps: boolean;
1449
+ dateFormat: string;
1450
+ usesTimestamps(): boolean;
1451
+ updateTimestamps(): /*elided*/any;
1452
+ getCreatedAtColumn(): any;
1453
+ getUpdatedAtColumn(): any;
1454
+ setCreatedAt(value: any): /*elided*/any;
1455
+ setUpdatedAt(value: any): /*elided*/any;
1456
+ freshTimestamp(): Date;
1457
+ freshTimestampString(): any;
1458
+ } & TGeneric<any, string> & {
1459
+ [x: string]: any;
1460
+ attributes: TGeneric;
1461
+ original: TGeneric;
1462
+ casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
1463
+ changes: TGeneric;
1464
+ appends: any[];
1465
+ setAppends(appends: any[]): /*elided*/any;
1466
+ append(...keys: any[]): /*elided*/any;
1467
+ normalizeCastClassResponse(key: string, value: string): TGeneric;
1468
+ syncOriginal(): /*elided*/any;
1469
+ syncChanges(): /*elided*/any;
1470
+ syncOriginalAttribute(attribute: string): void;
1471
+ syncOriginalAttributes(...attributes: string[]): /*elided*/any;
1472
+ isDirty(...attributes: string[]): boolean;
1473
+ getDirty(): TGeneric;
1474
+ originalIsEquivalent(key: string): boolean;
1475
+ setAttributes(attributes: TGeneric): void;
1476
+ setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
1477
+ getAttributes(): {
1478
+ [x: string]: any;
1479
+ };
1480
+ setAttribute(key: string, value: string): /*elided*/any;
1481
+ getAttribute(key: string): any;
1482
+ castAttribute(key: string, value: string): any;
1483
+ attributesToData(): {
1484
+ [x: string]: any;
1485
+ };
1486
+ mutateAttribute(key: string, value: string | null): any;
1487
+ mutateAttributeForArray(_key: string, _value: string): void;
1488
+ isDateAttribute(key: string): boolean;
1489
+ serializeDate(date?: Date | string | null): string | null;
1490
+ getDates(): any[];
1491
+ getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
1492
+ getCastType(key: string): any;
1493
+ hasCast(key: string, types?: readonly string[]): boolean;
1494
+ withDayjs(date: string): dayjs0.Dayjs;
1495
+ isCustomCast(cast: any): boolean;
1496
+ isCustomDateTimeCast(cast: any): boolean;
1497
+ isDecimalCast(cast: any): boolean;
1498
+ isDateCastable(key: string): boolean;
1499
+ fromDateTime(value: string): string;
1500
+ getDateFormat(): any;
1501
+ asDecimal(value: string, decimals: number): string;
1502
+ asDateTime(value: any): Date | null;
1503
+ asDate(value: string): Date;
1504
+ } & {
1505
+ [x: string]: any;
1506
+ hidden: any[];
1507
+ visible: any[];
1508
+ makeVisible(...keys: string[]): /*elided*/any;
1509
+ makeHidden(key: string[], ...keys: string[]): /*elided*/any;
1510
+ getHidden(): any[];
1511
+ getVisible(): any[];
1512
+ setHidden(hidden: any[]): /*elided*/any;
1513
+ setVisible(visible: any[]): /*elided*/any;
1514
+ } & {
1515
+ [x: string]: any;
1516
+ execHooks(hook: any, options: TGeneric): Promise<any>;
1517
+ } & {
1518
+ [x: string]: any;
1519
+ getGlobalScopes(): {};
1520
+ } & {
1521
+ [x: string]: any;
1522
+ useUniqueIds: boolean;
1523
+ usesUniqueIds(): boolean;
1524
+ uniqueIds(): never[];
1525
+ setUniqueIds(): void;
1526
+ };
1527
+ getTable: () => string;
1528
+ setTable: (table: string) => (new () => IModel) & IModel & {
1529
+ [x: string]: any;
1530
+ timestamps: boolean;
1531
+ dateFormat: string;
1532
+ usesTimestamps(): boolean;
1533
+ updateTimestamps(): /*elided*/any;
1534
+ getCreatedAtColumn(): any;
1535
+ getUpdatedAtColumn(): any;
1536
+ setCreatedAt(value: any): /*elided*/any;
1537
+ setUpdatedAt(value: any): /*elided*/any;
1538
+ freshTimestamp(): Date;
1539
+ freshTimestampString(): any;
1540
+ } & TGeneric<any, string> & {
1541
+ [x: string]: any;
1542
+ attributes: TGeneric;
1543
+ original: TGeneric;
1544
+ casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
1545
+ changes: TGeneric;
1546
+ appends: any[];
1547
+ setAppends(appends: any[]): /*elided*/any;
1548
+ append(...keys: any[]): /*elided*/any;
1549
+ normalizeCastClassResponse(key: string, value: string): TGeneric;
1550
+ syncOriginal(): /*elided*/any;
1551
+ syncChanges(): /*elided*/any;
1552
+ syncOriginalAttribute(attribute: string): void;
1553
+ syncOriginalAttributes(...attributes: string[]): /*elided*/any;
1554
+ isDirty(...attributes: string[]): boolean;
1555
+ getDirty(): TGeneric;
1556
+ originalIsEquivalent(key: string): boolean;
1557
+ setAttributes(attributes: TGeneric): void;
1558
+ setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
1559
+ getAttributes(): {
1560
+ [x: string]: any;
1561
+ };
1562
+ setAttribute(key: string, value: string): /*elided*/any;
1563
+ getAttribute(key: string): any;
1564
+ castAttribute(key: string, value: string): any;
1565
+ attributesToData(): {
1566
+ [x: string]: any;
1567
+ };
1568
+ mutateAttribute(key: string, value: string | null): any;
1569
+ mutateAttributeForArray(_key: string, _value: string): void;
1570
+ isDateAttribute(key: string): boolean;
1571
+ serializeDate(date?: Date | string | null): string | null;
1572
+ getDates(): any[];
1573
+ getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
1574
+ getCastType(key: string): any;
1575
+ hasCast(key: string, types?: readonly string[]): boolean;
1576
+ withDayjs(date: string): dayjs0.Dayjs;
1577
+ isCustomCast(cast: any): boolean;
1578
+ isCustomDateTimeCast(cast: any): boolean;
1579
+ isDecimalCast(cast: any): boolean;
1580
+ isDateCastable(key: string): boolean;
1581
+ fromDateTime(value: string): string;
1582
+ getDateFormat(): any;
1583
+ asDecimal(value: string, decimals: number): string;
1584
+ asDateTime(value: any): Date | null;
1585
+ asDate(value: string): Date;
1586
+ } & {
1587
+ [x: string]: any;
1588
+ hidden: any[];
1589
+ visible: any[];
1590
+ makeVisible(...keys: string[]): /*elided*/any;
1591
+ makeHidden(key: string[], ...keys: string[]): /*elided*/any;
1592
+ getHidden(): any[];
1593
+ getVisible(): any[];
1594
+ setHidden(hidden: any[]): /*elided*/any;
1595
+ setVisible(visible: any[]): /*elided*/any;
1596
+ } & {
1597
+ [x: string]: any;
1598
+ execHooks(hook: any, options: TGeneric): Promise<any>;
1599
+ } & {
1600
+ [x: string]: any;
1601
+ getGlobalScopes(): {};
1602
+ } & {
1603
+ [x: string]: any;
1604
+ useUniqueIds: boolean;
1605
+ usesUniqueIds(): boolean;
1606
+ uniqueIds(): never[];
1607
+ setUniqueIds(): void;
1608
+ };
1609
+ getDates: (() => string[]) & (() => any[]);
1610
+ getDateFormat: (() => string) & (() => any);
1611
+ getAttributes: (() => object) & (() => {
1612
+ [x: string]: any;
1613
+ });
1614
+ getAttribute: ((key: string) => any) & ((key: string) => any);
1615
+ setAttribute: ((key: string, value: any) => (new () => IModel) & IModel & {
1616
+ [x: string]: any;
1617
+ timestamps: boolean;
1618
+ dateFormat: string;
1619
+ usesTimestamps(): boolean;
1620
+ updateTimestamps(): /*elided*/any;
1621
+ getCreatedAtColumn(): any;
1622
+ getUpdatedAtColumn(): any;
1623
+ setCreatedAt(value: any): /*elided*/any;
1624
+ setUpdatedAt(value: any): /*elided*/any;
1625
+ freshTimestamp(): Date;
1626
+ freshTimestampString(): any;
1627
+ } & TGeneric<any, string> & {
1628
+ [x: string]: any;
1629
+ attributes: TGeneric;
1630
+ original: TGeneric;
1631
+ casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
1632
+ changes: TGeneric;
1633
+ appends: any[];
1634
+ setAppends(appends: any[]): /*elided*/any;
1635
+ append(...keys: any[]): /*elided*/any;
1636
+ normalizeCastClassResponse(key: string, value: string): TGeneric;
1637
+ syncOriginal(): /*elided*/any;
1638
+ syncChanges(): /*elided*/any;
1639
+ syncOriginalAttribute(attribute: string): void;
1640
+ syncOriginalAttributes(...attributes: string[]): /*elided*/any;
1641
+ isDirty(...attributes: string[]): boolean;
1642
+ getDirty(): TGeneric;
1643
+ originalIsEquivalent(key: string): boolean;
1644
+ setAttributes(attributes: TGeneric): void;
1645
+ setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
1646
+ getAttributes(): {
1647
+ [x: string]: any;
1648
+ };
1649
+ setAttribute(key: string, value: string): /*elided*/any;
1650
+ getAttribute(key: string): any;
1651
+ castAttribute(key: string, value: string): any;
1652
+ attributesToData(): {
1653
+ [x: string]: any;
1654
+ };
1655
+ mutateAttribute(key: string, value: string | null): any;
1656
+ mutateAttributeForArray(_key: string, _value: string): void;
1657
+ isDateAttribute(key: string): boolean;
1658
+ serializeDate(date?: Date | string | null): string | null;
1659
+ getDates(): any[];
1660
+ getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
1661
+ getCastType(key: string): any;
1662
+ hasCast(key: string, types?: readonly string[]): boolean;
1663
+ withDayjs(date: string): dayjs0.Dayjs;
1664
+ isCustomCast(cast: any): boolean;
1665
+ isCustomDateTimeCast(cast: any): boolean;
1666
+ isDecimalCast(cast: any): boolean;
1667
+ isDateCastable(key: string): boolean;
1668
+ fromDateTime(value: string): string;
1669
+ getDateFormat(): any;
1670
+ asDecimal(value: string, decimals: number): string;
1671
+ asDateTime(value: any): Date | null;
1672
+ asDate(value: string): Date;
1673
+ } & {
1674
+ [x: string]: any;
1675
+ hidden: any[];
1676
+ visible: any[];
1677
+ makeVisible(...keys: string[]): /*elided*/any;
1678
+ makeHidden(key: string[], ...keys: string[]): /*elided*/any;
1679
+ getHidden(): any[];
1680
+ getVisible(): any[];
1681
+ setHidden(hidden: any[]): /*elided*/any;
1682
+ setVisible(visible: any[]): /*elided*/any;
1683
+ } & {
1684
+ [x: string]: any;
1685
+ execHooks(hook: any, options: TGeneric): Promise<any>;
1686
+ } & {
1687
+ [x: string]: any;
1688
+ getGlobalScopes(): {};
1689
+ } & {
1690
+ [x: string]: any;
1691
+ useUniqueIds: boolean;
1692
+ usesUniqueIds(): boolean;
1693
+ uniqueIds(): never[];
1694
+ setUniqueIds(): void;
1695
+ }) & ((key: string, value: string) => (new () => IModel) & IModel & {
1696
+ [x: string]: any;
1697
+ timestamps: boolean;
1698
+ dateFormat: string;
1699
+ usesTimestamps(): boolean;
1700
+ updateTimestamps(): /*elided*/any;
1701
+ getCreatedAtColumn(): any;
1702
+ getUpdatedAtColumn(): any;
1703
+ setCreatedAt(value: any): /*elided*/any;
1704
+ setUpdatedAt(value: any): /*elided*/any;
1705
+ freshTimestamp(): Date;
1706
+ freshTimestampString(): any;
1707
+ } & TGeneric<any, string> & {
1708
+ [x: string]: any;
1709
+ attributes: TGeneric;
1710
+ original: TGeneric;
1711
+ casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
1712
+ changes: TGeneric;
1713
+ appends: any[];
1714
+ setAppends(appends: any[]): /*elided*/any;
1715
+ append(...keys: any[]): /*elided*/any;
1716
+ normalizeCastClassResponse(key: string, value: string): TGeneric;
1717
+ syncOriginal(): /*elided*/any;
1718
+ syncChanges(): /*elided*/any;
1719
+ syncOriginalAttribute(attribute: string): void;
1720
+ syncOriginalAttributes(...attributes: string[]): /*elided*/any;
1721
+ isDirty(...attributes: string[]): boolean;
1722
+ getDirty(): TGeneric;
1723
+ originalIsEquivalent(key: string): boolean;
1724
+ setAttributes(attributes: TGeneric): void;
1725
+ setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
1726
+ getAttributes(): {
1727
+ [x: string]: any;
1728
+ };
1729
+ setAttribute(key: string, value: string): /*elided*/any;
1730
+ getAttribute(key: string): any;
1731
+ castAttribute(key: string, value: string): any;
1732
+ attributesToData(): {
1733
+ [x: string]: any;
1734
+ };
1735
+ mutateAttribute(key: string, value: string | null): any;
1736
+ mutateAttributeForArray(_key: string, _value: string): void;
1737
+ isDateAttribute(key: string): boolean;
1738
+ serializeDate(date?: Date | string | null): string | null;
1739
+ getDates(): any[];
1740
+ getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
1741
+ getCastType(key: string): any;
1742
+ hasCast(key: string, types?: readonly string[]): boolean;
1743
+ withDayjs(date: string): dayjs0.Dayjs;
1744
+ isCustomCast(cast: any): boolean;
1745
+ isCustomDateTimeCast(cast: any): boolean;
1746
+ isDecimalCast(cast: any): boolean;
1747
+ isDateCastable(key: string): boolean;
1748
+ fromDateTime(value: string): string;
1749
+ getDateFormat(): any;
1750
+ asDecimal(value: string, decimals: number): string;
1751
+ asDateTime(value: any): Date | null;
1752
+ asDate(value: string): Date;
1753
+ } & {
1754
+ [x: string]: any;
1755
+ hidden: any[];
1756
+ visible: any[];
1757
+ makeVisible(...keys: string[]): /*elided*/any;
1758
+ makeHidden(key: string[], ...keys: string[]): /*elided*/any;
1759
+ getHidden(): any[];
1760
+ getVisible(): any[];
1761
+ setHidden(hidden: any[]): /*elided*/any;
1762
+ setVisible(visible: any[]): /*elided*/any;
1763
+ } & {
1764
+ [x: string]: any;
1765
+ execHooks(hook: any, options: TGeneric): Promise<any>;
1766
+ } & {
1767
+ [x: string]: any;
1768
+ getGlobalScopes(): {};
1769
+ } & {
1770
+ [x: string]: any;
1771
+ useUniqueIds: boolean;
1772
+ usesUniqueIds(): boolean;
1773
+ uniqueIds(): never[];
1774
+ setUniqueIds(): void;
1775
+ });
1776
+ fill: (attributes: any) => (new () => IModel) & IModel & {
1777
+ [x: string]: any;
1778
+ timestamps: boolean;
1779
+ dateFormat: string;
1780
+ usesTimestamps(): boolean;
1781
+ updateTimestamps(): /*elided*/any;
1782
+ getCreatedAtColumn(): any;
1783
+ getUpdatedAtColumn(): any;
1784
+ setCreatedAt(value: any): /*elided*/any;
1785
+ setUpdatedAt(value: any): /*elided*/any;
1786
+ freshTimestamp(): Date;
1787
+ freshTimestampString(): any;
1788
+ } & TGeneric<any, string> & {
1789
+ [x: string]: any;
1790
+ attributes: TGeneric;
1791
+ original: TGeneric;
1792
+ casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
1793
+ changes: TGeneric;
1794
+ appends: any[];
1795
+ setAppends(appends: any[]): /*elided*/any;
1796
+ append(...keys: any[]): /*elided*/any;
1797
+ normalizeCastClassResponse(key: string, value: string): TGeneric;
1798
+ syncOriginal(): /*elided*/any;
1799
+ syncChanges(): /*elided*/any;
1800
+ syncOriginalAttribute(attribute: string): void;
1801
+ syncOriginalAttributes(...attributes: string[]): /*elided*/any;
1802
+ isDirty(...attributes: string[]): boolean;
1803
+ getDirty(): TGeneric;
1804
+ originalIsEquivalent(key: string): boolean;
1805
+ setAttributes(attributes: TGeneric): void;
1806
+ setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
1807
+ getAttributes(): {
1808
+ [x: string]: any;
1809
+ };
1810
+ setAttribute(key: string, value: string): /*elided*/any;
1811
+ getAttribute(key: string): any;
1812
+ castAttribute(key: string, value: string): any;
1813
+ attributesToData(): {
1814
+ [x: string]: any;
1815
+ };
1816
+ mutateAttribute(key: string, value: string | null): any;
1817
+ mutateAttributeForArray(_key: string, _value: string): void;
1818
+ isDateAttribute(key: string): boolean;
1819
+ serializeDate(date?: Date | string | null): string | null;
1820
+ getDates(): any[];
1821
+ getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
1822
+ getCastType(key: string): any;
1823
+ hasCast(key: string, types?: readonly string[]): boolean;
1824
+ withDayjs(date: string): dayjs0.Dayjs;
1825
+ isCustomCast(cast: any): boolean;
1826
+ isCustomDateTimeCast(cast: any): boolean;
1827
+ isDecimalCast(cast: any): boolean;
1828
+ isDateCastable(key: string): boolean;
1829
+ fromDateTime(value: string): string;
1830
+ getDateFormat(): any;
1831
+ asDecimal(value: string, decimals: number): string;
1832
+ asDateTime(value: any): Date | null;
1833
+ asDate(value: string): Date;
1834
+ } & {
1835
+ [x: string]: any;
1836
+ hidden: any[];
1837
+ visible: any[];
1838
+ makeVisible(...keys: string[]): /*elided*/any;
1839
+ makeHidden(key: string[], ...keys: string[]): /*elided*/any;
1840
+ getHidden(): any[];
1841
+ getVisible(): any[];
1842
+ setHidden(hidden: any[]): /*elided*/any;
1843
+ setVisible(visible: any[]): /*elided*/any;
1844
+ } & {
1845
+ [x: string]: any;
1846
+ execHooks(hook: any, options: TGeneric): Promise<any>;
1847
+ } & {
1848
+ [x: string]: any;
1849
+ getGlobalScopes(): {};
1850
+ } & {
1851
+ [x: string]: any;
1852
+ useUniqueIds: boolean;
1853
+ usesUniqueIds(): boolean;
1854
+ uniqueIds(): never[];
1855
+ setUniqueIds(): void;
1856
+ };
1857
+ setAppends: ((appends: string[]) => (new () => IModel) & IModel & {
1858
+ [x: string]: any;
1859
+ timestamps: boolean;
1860
+ dateFormat: string;
1861
+ usesTimestamps(): boolean;
1862
+ updateTimestamps(): /*elided*/any;
1863
+ getCreatedAtColumn(): any;
1864
+ getUpdatedAtColumn(): any;
1865
+ setCreatedAt(value: any): /*elided*/any;
1866
+ setUpdatedAt(value: any): /*elided*/any;
1867
+ freshTimestamp(): Date;
1868
+ freshTimestampString(): any;
1869
+ } & TGeneric<any, string> & {
1870
+ [x: string]: any;
1871
+ attributes: TGeneric;
1872
+ original: TGeneric;
1873
+ casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
1874
+ changes: TGeneric;
1875
+ appends: any[];
1876
+ setAppends(appends: any[]): /*elided*/any;
1877
+ append(...keys: any[]): /*elided*/any;
1878
+ normalizeCastClassResponse(key: string, value: string): TGeneric;
1879
+ syncOriginal(): /*elided*/any;
1880
+ syncChanges(): /*elided*/any;
1881
+ syncOriginalAttribute(attribute: string): void;
1882
+ syncOriginalAttributes(...attributes: string[]): /*elided*/any;
1883
+ isDirty(...attributes: string[]): boolean;
1884
+ getDirty(): TGeneric;
1885
+ originalIsEquivalent(key: string): boolean;
1886
+ setAttributes(attributes: TGeneric): void;
1887
+ setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
1888
+ getAttributes(): {
1889
+ [x: string]: any;
1890
+ };
1891
+ setAttribute(key: string, value: string): /*elided*/any;
1892
+ getAttribute(key: string): any;
1893
+ castAttribute(key: string, value: string): any;
1894
+ attributesToData(): {
1895
+ [x: string]: any;
1896
+ };
1897
+ mutateAttribute(key: string, value: string | null): any;
1898
+ mutateAttributeForArray(_key: string, _value: string): void;
1899
+ isDateAttribute(key: string): boolean;
1900
+ serializeDate(date?: Date | string | null): string | null;
1901
+ getDates(): any[];
1902
+ getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
1903
+ getCastType(key: string): any;
1904
+ hasCast(key: string, types?: readonly string[]): boolean;
1905
+ withDayjs(date: string): dayjs0.Dayjs;
1906
+ isCustomCast(cast: any): boolean;
1907
+ isCustomDateTimeCast(cast: any): boolean;
1908
+ isDecimalCast(cast: any): boolean;
1909
+ isDateCastable(key: string): boolean;
1910
+ fromDateTime(value: string): string;
1911
+ getDateFormat(): any;
1912
+ asDecimal(value: string, decimals: number): string;
1913
+ asDateTime(value: any): Date | null;
1914
+ asDate(value: string): Date;
1915
+ } & {
1916
+ [x: string]: any;
1917
+ hidden: any[];
1918
+ visible: any[];
1919
+ makeVisible(...keys: string[]): /*elided*/any;
1920
+ makeHidden(key: string[], ...keys: string[]): /*elided*/any;
1921
+ getHidden(): any[];
1922
+ getVisible(): any[];
1923
+ setHidden(hidden: any[]): /*elided*/any;
1924
+ setVisible(visible: any[]): /*elided*/any;
1925
+ } & {
1926
+ [x: string]: any;
1927
+ execHooks(hook: any, options: TGeneric): Promise<any>;
1928
+ } & {
1929
+ [x: string]: any;
1930
+ getGlobalScopes(): {};
1931
+ } & {
1932
+ [x: string]: any;
1933
+ useUniqueIds: boolean;
1934
+ usesUniqueIds(): boolean;
1935
+ uniqueIds(): never[];
1936
+ setUniqueIds(): void;
1937
+ }) & ((appends: any[]) => (new () => IModel) & IModel & {
1938
+ [x: string]: any;
1939
+ timestamps: boolean;
1940
+ dateFormat: string;
1941
+ usesTimestamps(): boolean;
1942
+ updateTimestamps(): /*elided*/any;
1943
+ getCreatedAtColumn(): any;
1944
+ getUpdatedAtColumn(): any;
1945
+ setCreatedAt(value: any): /*elided*/any;
1946
+ setUpdatedAt(value: any): /*elided*/any;
1947
+ freshTimestamp(): Date;
1948
+ freshTimestampString(): any;
1949
+ } & TGeneric<any, string> & {
1950
+ [x: string]: any;
1951
+ attributes: TGeneric;
1952
+ original: TGeneric;
1953
+ casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
1954
+ changes: TGeneric;
1955
+ appends: any[];
1956
+ setAppends(appends: any[]): /*elided*/any;
1957
+ append(...keys: any[]): /*elided*/any;
1958
+ normalizeCastClassResponse(key: string, value: string): TGeneric;
1959
+ syncOriginal(): /*elided*/any;
1960
+ syncChanges(): /*elided*/any;
1961
+ syncOriginalAttribute(attribute: string): void;
1962
+ syncOriginalAttributes(...attributes: string[]): /*elided*/any;
1963
+ isDirty(...attributes: string[]): boolean;
1964
+ getDirty(): TGeneric;
1965
+ originalIsEquivalent(key: string): boolean;
1966
+ setAttributes(attributes: TGeneric): void;
1967
+ setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
1968
+ getAttributes(): {
1969
+ [x: string]: any;
1970
+ };
1971
+ setAttribute(key: string, value: string): /*elided*/any;
1972
+ getAttribute(key: string): any;
1973
+ castAttribute(key: string, value: string): any;
1974
+ attributesToData(): {
1975
+ [x: string]: any;
1976
+ };
1977
+ mutateAttribute(key: string, value: string | null): any;
1978
+ mutateAttributeForArray(_key: string, _value: string): void;
1979
+ isDateAttribute(key: string): boolean;
1980
+ serializeDate(date?: Date | string | null): string | null;
1981
+ getDates(): any[];
1982
+ getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
1983
+ getCastType(key: string): any;
1984
+ hasCast(key: string, types?: readonly string[]): boolean;
1985
+ withDayjs(date: string): dayjs0.Dayjs;
1986
+ isCustomCast(cast: any): boolean;
1987
+ isCustomDateTimeCast(cast: any): boolean;
1988
+ isDecimalCast(cast: any): boolean;
1989
+ isDateCastable(key: string): boolean;
1990
+ fromDateTime(value: string): string;
1991
+ getDateFormat(): any;
1992
+ asDecimal(value: string, decimals: number): string;
1993
+ asDateTime(value: any): Date | null;
1994
+ asDate(value: string): Date;
1995
+ } & {
1996
+ [x: string]: any;
1997
+ hidden: any[];
1998
+ visible: any[];
1999
+ makeVisible(...keys: string[]): /*elided*/any;
2000
+ makeHidden(key: string[], ...keys: string[]): /*elided*/any;
2001
+ getHidden(): any[];
2002
+ getVisible(): any[];
2003
+ setHidden(hidden: any[]): /*elided*/any;
2004
+ setVisible(visible: any[]): /*elided*/any;
2005
+ } & {
2006
+ [x: string]: any;
2007
+ execHooks(hook: any, options: TGeneric): Promise<any>;
2008
+ } & {
2009
+ [x: string]: any;
2010
+ getGlobalScopes(): {};
2011
+ } & {
2012
+ [x: string]: any;
2013
+ useUniqueIds: boolean;
2014
+ usesUniqueIds(): boolean;
2015
+ uniqueIds(): never[];
2016
+ setUniqueIds(): void;
2017
+ });
2018
+ append: ((key: string | string[]) => (new () => IModel) & IModel & {
2019
+ [x: string]: any;
2020
+ timestamps: boolean;
2021
+ dateFormat: string;
2022
+ usesTimestamps(): boolean;
2023
+ updateTimestamps(): /*elided*/any;
2024
+ getCreatedAtColumn(): any;
2025
+ getUpdatedAtColumn(): any;
2026
+ setCreatedAt(value: any): /*elided*/any;
2027
+ setUpdatedAt(value: any): /*elided*/any;
2028
+ freshTimestamp(): Date;
2029
+ freshTimestampString(): any;
2030
+ } & TGeneric<any, string> & {
2031
+ [x: string]: any;
2032
+ attributes: TGeneric;
2033
+ original: TGeneric;
2034
+ casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
2035
+ changes: TGeneric;
2036
+ appends: any[];
2037
+ setAppends(appends: any[]): /*elided*/any;
2038
+ append(...keys: any[]): /*elided*/any;
2039
+ normalizeCastClassResponse(key: string, value: string): TGeneric;
2040
+ syncOriginal(): /*elided*/any;
2041
+ syncChanges(): /*elided*/any;
2042
+ syncOriginalAttribute(attribute: string): void;
2043
+ syncOriginalAttributes(...attributes: string[]): /*elided*/any;
2044
+ isDirty(...attributes: string[]): boolean;
2045
+ getDirty(): TGeneric;
2046
+ originalIsEquivalent(key: string): boolean;
2047
+ setAttributes(attributes: TGeneric): void;
2048
+ setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
2049
+ getAttributes(): {
2050
+ [x: string]: any;
2051
+ };
2052
+ setAttribute(key: string, value: string): /*elided*/any;
2053
+ getAttribute(key: string): any;
2054
+ castAttribute(key: string, value: string): any;
2055
+ attributesToData(): {
2056
+ [x: string]: any;
2057
+ };
2058
+ mutateAttribute(key: string, value: string | null): any;
2059
+ mutateAttributeForArray(_key: string, _value: string): void;
2060
+ isDateAttribute(key: string): boolean;
2061
+ serializeDate(date?: Date | string | null): string | null;
2062
+ getDates(): any[];
2063
+ getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
2064
+ getCastType(key: string): any;
2065
+ hasCast(key: string, types?: readonly string[]): boolean;
2066
+ withDayjs(date: string): dayjs0.Dayjs;
2067
+ isCustomCast(cast: any): boolean;
2068
+ isCustomDateTimeCast(cast: any): boolean;
2069
+ isDecimalCast(cast: any): boolean;
2070
+ isDateCastable(key: string): boolean;
2071
+ fromDateTime(value: string): string;
2072
+ getDateFormat(): any;
2073
+ asDecimal(value: string, decimals: number): string;
2074
+ asDateTime(value: any): Date | null;
2075
+ asDate(value: string): Date;
2076
+ } & {
2077
+ [x: string]: any;
2078
+ hidden: any[];
2079
+ visible: any[];
2080
+ makeVisible(...keys: string[]): /*elided*/any;
2081
+ makeHidden(key: string[], ...keys: string[]): /*elided*/any;
2082
+ getHidden(): any[];
2083
+ getVisible(): any[];
2084
+ setHidden(hidden: any[]): /*elided*/any;
2085
+ setVisible(visible: any[]): /*elided*/any;
2086
+ } & {
2087
+ [x: string]: any;
2088
+ execHooks(hook: any, options: TGeneric): Promise<any>;
2089
+ } & {
2090
+ [x: string]: any;
2091
+ getGlobalScopes(): {};
2092
+ } & {
2093
+ [x: string]: any;
2094
+ useUniqueIds: boolean;
2095
+ usesUniqueIds(): boolean;
2096
+ uniqueIds(): never[];
2097
+ setUniqueIds(): void;
2098
+ }) & ((...keys: any[]) => (new () => IModel) & IModel & {
2099
+ [x: string]: any;
2100
+ timestamps: boolean;
2101
+ dateFormat: string;
2102
+ usesTimestamps(): boolean;
2103
+ updateTimestamps(): /*elided*/any;
2104
+ getCreatedAtColumn(): any;
2105
+ getUpdatedAtColumn(): any;
2106
+ setCreatedAt(value: any): /*elided*/any;
2107
+ setUpdatedAt(value: any): /*elided*/any;
2108
+ freshTimestamp(): Date;
2109
+ freshTimestampString(): any;
2110
+ } & TGeneric<any, string> & {
2111
+ [x: string]: any;
2112
+ attributes: TGeneric;
2113
+ original: TGeneric;
2114
+ casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
2115
+ changes: TGeneric;
2116
+ appends: any[];
2117
+ setAppends(appends: any[]): /*elided*/any;
2118
+ append(...keys: any[]): /*elided*/any;
2119
+ normalizeCastClassResponse(key: string, value: string): TGeneric;
2120
+ syncOriginal(): /*elided*/any;
2121
+ syncChanges(): /*elided*/any;
2122
+ syncOriginalAttribute(attribute: string): void;
2123
+ syncOriginalAttributes(...attributes: string[]): /*elided*/any;
2124
+ isDirty(...attributes: string[]): boolean;
2125
+ getDirty(): TGeneric;
2126
+ originalIsEquivalent(key: string): boolean;
2127
+ setAttributes(attributes: TGeneric): void;
2128
+ setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
2129
+ getAttributes(): {
2130
+ [x: string]: any;
2131
+ };
2132
+ setAttribute(key: string, value: string): /*elided*/any;
2133
+ getAttribute(key: string): any;
2134
+ castAttribute(key: string, value: string): any;
2135
+ attributesToData(): {
2136
+ [x: string]: any;
2137
+ };
2138
+ mutateAttribute(key: string, value: string | null): any;
2139
+ mutateAttributeForArray(_key: string, _value: string): void;
2140
+ isDateAttribute(key: string): boolean;
2141
+ serializeDate(date?: Date | string | null): string | null;
2142
+ getDates(): any[];
2143
+ getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
2144
+ getCastType(key: string): any;
2145
+ hasCast(key: string, types?: readonly string[]): boolean;
2146
+ withDayjs(date: string): dayjs0.Dayjs;
2147
+ isCustomCast(cast: any): boolean;
2148
+ isCustomDateTimeCast(cast: any): boolean;
2149
+ isDecimalCast(cast: any): boolean;
2150
+ isDateCastable(key: string): boolean;
2151
+ fromDateTime(value: string): string;
2152
+ getDateFormat(): any;
2153
+ asDecimal(value: string, decimals: number): string;
2154
+ asDateTime(value: any): Date | null;
2155
+ asDate(value: string): Date;
2156
+ } & {
2157
+ [x: string]: any;
2158
+ hidden: any[];
2159
+ visible: any[];
2160
+ makeVisible(...keys: string[]): /*elided*/any;
2161
+ makeHidden(key: string[], ...keys: string[]): /*elided*/any;
2162
+ getHidden(): any[];
2163
+ getVisible(): any[];
2164
+ setHidden(hidden: any[]): /*elided*/any;
2165
+ setVisible(visible: any[]): /*elided*/any;
2166
+ } & {
2167
+ [x: string]: any;
2168
+ execHooks(hook: any, options: TGeneric): Promise<any>;
2169
+ } & {
2170
+ [x: string]: any;
2171
+ getGlobalScopes(): {};
2172
+ } & {
2173
+ [x: string]: any;
2174
+ useUniqueIds: boolean;
2175
+ usesUniqueIds(): boolean;
2176
+ uniqueIds(): never[];
2177
+ setUniqueIds(): void;
2178
+ });
2179
+ getRelation: <T extends Model$1>(relation: string) => T | ICollection<T> | null | undefined;
2180
+ setRelation: <T extends Model$1>(relation: string, value: T | ICollection<T> | null) => (new () => IModel) & IModel & {
2181
+ [x: string]: any;
2182
+ timestamps: boolean;
2183
+ dateFormat: string;
2184
+ usesTimestamps(): boolean;
2185
+ updateTimestamps(): /*elided*/any;
2186
+ getCreatedAtColumn(): any;
2187
+ getUpdatedAtColumn(): any;
2188
+ setCreatedAt(value: any): /*elided*/any;
2189
+ setUpdatedAt(value: any): /*elided*/any;
2190
+ freshTimestamp(): Date;
2191
+ freshTimestampString(): any;
2192
+ } & TGeneric<any, string> & {
2193
+ [x: string]: any;
2194
+ attributes: TGeneric;
2195
+ original: TGeneric;
2196
+ casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
2197
+ changes: TGeneric;
2198
+ appends: any[];
2199
+ setAppends(appends: any[]): /*elided*/any;
2200
+ append(...keys: any[]): /*elided*/any;
2201
+ normalizeCastClassResponse(key: string, value: string): TGeneric;
2202
+ syncOriginal(): /*elided*/any;
2203
+ syncChanges(): /*elided*/any;
2204
+ syncOriginalAttribute(attribute: string): void;
2205
+ syncOriginalAttributes(...attributes: string[]): /*elided*/any;
2206
+ isDirty(...attributes: string[]): boolean;
2207
+ getDirty(): TGeneric;
2208
+ originalIsEquivalent(key: string): boolean;
2209
+ setAttributes(attributes: TGeneric): void;
2210
+ setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
2211
+ getAttributes(): {
2212
+ [x: string]: any;
2213
+ };
2214
+ setAttribute(key: string, value: string): /*elided*/any;
2215
+ getAttribute(key: string): any;
2216
+ castAttribute(key: string, value: string): any;
2217
+ attributesToData(): {
2218
+ [x: string]: any;
2219
+ };
2220
+ mutateAttribute(key: string, value: string | null): any;
2221
+ mutateAttributeForArray(_key: string, _value: string): void;
2222
+ isDateAttribute(key: string): boolean;
2223
+ serializeDate(date?: Date | string | null): string | null;
2224
+ getDates(): any[];
2225
+ getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
2226
+ getCastType(key: string): any;
2227
+ hasCast(key: string, types?: readonly string[]): boolean;
2228
+ withDayjs(date: string): dayjs0.Dayjs;
2229
+ isCustomCast(cast: any): boolean;
2230
+ isCustomDateTimeCast(cast: any): boolean;
2231
+ isDecimalCast(cast: any): boolean;
2232
+ isDateCastable(key: string): boolean;
2233
+ fromDateTime(value: string): string;
2234
+ getDateFormat(): any;
2235
+ asDecimal(value: string, decimals: number): string;
2236
+ asDateTime(value: any): Date | null;
2237
+ asDate(value: string): Date;
2238
+ } & {
2239
+ [x: string]: any;
2240
+ hidden: any[];
2241
+ visible: any[];
2242
+ makeVisible(...keys: string[]): /*elided*/any;
2243
+ makeHidden(key: string[], ...keys: string[]): /*elided*/any;
2244
+ getHidden(): any[];
2245
+ getVisible(): any[];
2246
+ setHidden(hidden: any[]): /*elided*/any;
2247
+ setVisible(visible: any[]): /*elided*/any;
2248
+ } & {
2249
+ [x: string]: any;
2250
+ execHooks(hook: any, options: TGeneric): Promise<any>;
2251
+ } & {
2252
+ [x: string]: any;
2253
+ getGlobalScopes(): {};
2254
+ } & {
2255
+ [x: string]: any;
2256
+ useUniqueIds: boolean;
2257
+ usesUniqueIds(): boolean;
2258
+ uniqueIds(): never[];
2259
+ setUniqueIds(): void;
2260
+ };
2261
+ unsetRelation: (relation: string) => (new () => IModel) & IModel & {
2262
+ [x: string]: any;
2263
+ timestamps: boolean;
2264
+ dateFormat: string;
2265
+ usesTimestamps(): boolean;
2266
+ updateTimestamps(): /*elided*/any;
2267
+ getCreatedAtColumn(): any;
2268
+ getUpdatedAtColumn(): any;
2269
+ setCreatedAt(value: any): /*elided*/any;
2270
+ setUpdatedAt(value: any): /*elided*/any;
2271
+ freshTimestamp(): Date;
2272
+ freshTimestampString(): any;
2273
+ } & TGeneric<any, string> & {
2274
+ [x: string]: any;
2275
+ attributes: TGeneric;
2276
+ original: TGeneric;
2277
+ casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
2278
+ changes: TGeneric;
2279
+ appends: any[];
2280
+ setAppends(appends: any[]): /*elided*/any;
2281
+ append(...keys: any[]): /*elided*/any;
2282
+ normalizeCastClassResponse(key: string, value: string): TGeneric;
2283
+ syncOriginal(): /*elided*/any;
2284
+ syncChanges(): /*elided*/any;
2285
+ syncOriginalAttribute(attribute: string): void;
2286
+ syncOriginalAttributes(...attributes: string[]): /*elided*/any;
2287
+ isDirty(...attributes: string[]): boolean;
2288
+ getDirty(): TGeneric;
2289
+ originalIsEquivalent(key: string): boolean;
2290
+ setAttributes(attributes: TGeneric): void;
2291
+ setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
2292
+ getAttributes(): {
2293
+ [x: string]: any;
2294
+ };
2295
+ setAttribute(key: string, value: string): /*elided*/any;
2296
+ getAttribute(key: string): any;
2297
+ castAttribute(key: string, value: string): any;
2298
+ attributesToData(): {
2299
+ [x: string]: any;
2300
+ };
2301
+ mutateAttribute(key: string, value: string | null): any;
2302
+ mutateAttributeForArray(_key: string, _value: string): void;
2303
+ isDateAttribute(key: string): boolean;
2304
+ serializeDate(date?: Date | string | null): string | null;
2305
+ getDates(): any[];
2306
+ getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
2307
+ getCastType(key: string): any;
2308
+ hasCast(key: string, types?: readonly string[]): boolean;
2309
+ withDayjs(date: string): dayjs0.Dayjs;
2310
+ isCustomCast(cast: any): boolean;
2311
+ isCustomDateTimeCast(cast: any): boolean;
2312
+ isDecimalCast(cast: any): boolean;
2313
+ isDateCastable(key: string): boolean;
2314
+ fromDateTime(value: string): string;
2315
+ getDateFormat(): any;
2316
+ asDecimal(value: string, decimals: number): string;
2317
+ asDateTime(value: any): Date | null;
2318
+ asDate(value: string): Date;
2319
+ } & {
2320
+ [x: string]: any;
2321
+ hidden: any[];
2322
+ visible: any[];
2323
+ makeVisible(...keys: string[]): /*elided*/any;
2324
+ makeHidden(key: string[], ...keys: string[]): /*elided*/any;
2325
+ getHidden(): any[];
2326
+ getVisible(): any[];
2327
+ setHidden(hidden: any[]): /*elided*/any;
2328
+ setVisible(visible: any[]): /*elided*/any;
2329
+ } & {
2330
+ [x: string]: any;
2331
+ execHooks(hook: any, options: TGeneric): Promise<any>;
2332
+ } & {
2333
+ [x: string]: any;
2334
+ getGlobalScopes(): {};
2335
+ } & {
2336
+ [x: string]: any;
2337
+ useUniqueIds: boolean;
2338
+ usesUniqueIds(): boolean;
2339
+ uniqueIds(): never[];
2340
+ setUniqueIds(): void;
2341
+ };
2342
+ relationLoaded: (relation: string) => boolean;
2343
+ makeVisible: ((attributes: string | string[]) => (new () => IModel) & IModel & {
2344
+ [x: string]: any;
2345
+ timestamps: boolean;
2346
+ dateFormat: string;
2347
+ usesTimestamps(): boolean;
2348
+ updateTimestamps(): /*elided*/any;
2349
+ getCreatedAtColumn(): any;
2350
+ getUpdatedAtColumn(): any;
2351
+ setCreatedAt(value: any): /*elided*/any;
2352
+ setUpdatedAt(value: any): /*elided*/any;
2353
+ freshTimestamp(): Date;
2354
+ freshTimestampString(): any;
2355
+ } & TGeneric<any, string> & {
2356
+ [x: string]: any;
2357
+ attributes: TGeneric;
2358
+ original: TGeneric;
2359
+ casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
2360
+ changes: TGeneric;
2361
+ appends: any[];
2362
+ setAppends(appends: any[]): /*elided*/any;
2363
+ append(...keys: any[]): /*elided*/any;
2364
+ normalizeCastClassResponse(key: string, value: string): TGeneric;
2365
+ syncOriginal(): /*elided*/any;
2366
+ syncChanges(): /*elided*/any;
2367
+ syncOriginalAttribute(attribute: string): void;
2368
+ syncOriginalAttributes(...attributes: string[]): /*elided*/any;
2369
+ isDirty(...attributes: string[]): boolean;
2370
+ getDirty(): TGeneric;
2371
+ originalIsEquivalent(key: string): boolean;
2372
+ setAttributes(attributes: TGeneric): void;
2373
+ setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
2374
+ getAttributes(): {
2375
+ [x: string]: any;
2376
+ };
2377
+ setAttribute(key: string, value: string): /*elided*/any;
2378
+ getAttribute(key: string): any;
2379
+ castAttribute(key: string, value: string): any;
2380
+ attributesToData(): {
2381
+ [x: string]: any;
2382
+ };
2383
+ mutateAttribute(key: string, value: string | null): any;
2384
+ mutateAttributeForArray(_key: string, _value: string): void;
2385
+ isDateAttribute(key: string): boolean;
2386
+ serializeDate(date?: Date | string | null): string | null;
2387
+ getDates(): any[];
2388
+ getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
2389
+ getCastType(key: string): any;
2390
+ hasCast(key: string, types?: readonly string[]): boolean;
2391
+ withDayjs(date: string): dayjs0.Dayjs;
2392
+ isCustomCast(cast: any): boolean;
2393
+ isCustomDateTimeCast(cast: any): boolean;
2394
+ isDecimalCast(cast: any): boolean;
2395
+ isDateCastable(key: string): boolean;
2396
+ fromDateTime(value: string): string;
2397
+ getDateFormat(): any;
2398
+ asDecimal(value: string, decimals: number): string;
2399
+ asDateTime(value: any): Date | null;
2400
+ asDate(value: string): Date;
2401
+ } & {
2402
+ [x: string]: any;
2403
+ hidden: any[];
2404
+ visible: any[];
2405
+ makeVisible(...keys: string[]): /*elided*/any;
2406
+ makeHidden(key: string[], ...keys: string[]): /*elided*/any;
2407
+ getHidden(): any[];
2408
+ getVisible(): any[];
2409
+ setHidden(hidden: any[]): /*elided*/any;
2410
+ setVisible(visible: any[]): /*elided*/any;
2411
+ } & {
2412
+ [x: string]: any;
2413
+ execHooks(hook: any, options: TGeneric): Promise<any>;
2414
+ } & {
2415
+ [x: string]: any;
2416
+ getGlobalScopes(): {};
2417
+ } & {
2418
+ [x: string]: any;
2419
+ useUniqueIds: boolean;
2420
+ usesUniqueIds(): boolean;
2421
+ uniqueIds(): never[];
2422
+ setUniqueIds(): void;
2423
+ }) & ((...keys: string[]) => (new () => IModel) & IModel & {
2424
+ [x: string]: any;
2425
+ timestamps: boolean;
2426
+ dateFormat: string;
2427
+ usesTimestamps(): boolean;
2428
+ updateTimestamps(): /*elided*/any;
2429
+ getCreatedAtColumn(): any;
2430
+ getUpdatedAtColumn(): any;
2431
+ setCreatedAt(value: any): /*elided*/any;
2432
+ setUpdatedAt(value: any): /*elided*/any;
2433
+ freshTimestamp(): Date;
2434
+ freshTimestampString(): any;
2435
+ } & TGeneric<any, string> & {
2436
+ [x: string]: any;
2437
+ attributes: TGeneric;
2438
+ original: TGeneric;
2439
+ casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
2440
+ changes: TGeneric;
2441
+ appends: any[];
2442
+ setAppends(appends: any[]): /*elided*/any;
2443
+ append(...keys: any[]): /*elided*/any;
2444
+ normalizeCastClassResponse(key: string, value: string): TGeneric;
2445
+ syncOriginal(): /*elided*/any;
2446
+ syncChanges(): /*elided*/any;
2447
+ syncOriginalAttribute(attribute: string): void;
2448
+ syncOriginalAttributes(...attributes: string[]): /*elided*/any;
2449
+ isDirty(...attributes: string[]): boolean;
2450
+ getDirty(): TGeneric;
2451
+ originalIsEquivalent(key: string): boolean;
2452
+ setAttributes(attributes: TGeneric): void;
2453
+ setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
2454
+ getAttributes(): {
2455
+ [x: string]: any;
2456
+ };
2457
+ setAttribute(key: string, value: string): /*elided*/any;
2458
+ getAttribute(key: string): any;
2459
+ castAttribute(key: string, value: string): any;
2460
+ attributesToData(): {
2461
+ [x: string]: any;
2462
+ };
2463
+ mutateAttribute(key: string, value: string | null): any;
2464
+ mutateAttributeForArray(_key: string, _value: string): void;
2465
+ isDateAttribute(key: string): boolean;
2466
+ serializeDate(date?: Date | string | null): string | null;
2467
+ getDates(): any[];
2468
+ getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
2469
+ getCastType(key: string): any;
2470
+ hasCast(key: string, types?: readonly string[]): boolean;
2471
+ withDayjs(date: string): dayjs0.Dayjs;
2472
+ isCustomCast(cast: any): boolean;
2473
+ isCustomDateTimeCast(cast: any): boolean;
2474
+ isDecimalCast(cast: any): boolean;
2475
+ isDateCastable(key: string): boolean;
2476
+ fromDateTime(value: string): string;
2477
+ getDateFormat(): any;
2478
+ asDecimal(value: string, decimals: number): string;
2479
+ asDateTime(value: any): Date | null;
2480
+ asDate(value: string): Date;
2481
+ } & {
2482
+ [x: string]: any;
2483
+ hidden: any[];
2484
+ visible: any[];
2485
+ makeVisible(...keys: string[]): /*elided*/any;
2486
+ makeHidden(key: string[], ...keys: string[]): /*elided*/any;
2487
+ getHidden(): any[];
2488
+ getVisible(): any[];
2489
+ setHidden(hidden: any[]): /*elided*/any;
2490
+ setVisible(visible: any[]): /*elided*/any;
2491
+ } & {
2492
+ [x: string]: any;
2493
+ execHooks(hook: any, options: TGeneric): Promise<any>;
2494
+ } & {
2495
+ [x: string]: any;
2496
+ getGlobalScopes(): {};
2497
+ } & {
2498
+ [x: string]: any;
2499
+ useUniqueIds: boolean;
2500
+ usesUniqueIds(): boolean;
2501
+ uniqueIds(): never[];
2502
+ setUniqueIds(): void;
2503
+ });
2504
+ makeHidden: ((attributes: string | string[]) => (new () => IModel) & IModel & {
2505
+ [x: string]: any;
2506
+ timestamps: boolean;
2507
+ dateFormat: string;
2508
+ usesTimestamps(): boolean;
2509
+ updateTimestamps(): /*elided*/any;
2510
+ getCreatedAtColumn(): any;
2511
+ getUpdatedAtColumn(): any;
2512
+ setCreatedAt(value: any): /*elided*/any;
2513
+ setUpdatedAt(value: any): /*elided*/any;
2514
+ freshTimestamp(): Date;
2515
+ freshTimestampString(): any;
2516
+ } & TGeneric<any, string> & {
2517
+ [x: string]: any;
2518
+ attributes: TGeneric;
2519
+ original: TGeneric;
2520
+ casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
2521
+ changes: TGeneric;
2522
+ appends: any[];
2523
+ setAppends(appends: any[]): /*elided*/any;
2524
+ append(...keys: any[]): /*elided*/any;
2525
+ normalizeCastClassResponse(key: string, value: string): TGeneric;
2526
+ syncOriginal(): /*elided*/any;
2527
+ syncChanges(): /*elided*/any;
2528
+ syncOriginalAttribute(attribute: string): void;
2529
+ syncOriginalAttributes(...attributes: string[]): /*elided*/any;
2530
+ isDirty(...attributes: string[]): boolean;
2531
+ getDirty(): TGeneric;
2532
+ originalIsEquivalent(key: string): boolean;
2533
+ setAttributes(attributes: TGeneric): void;
2534
+ setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
2535
+ getAttributes(): {
2536
+ [x: string]: any;
2537
+ };
2538
+ setAttribute(key: string, value: string): /*elided*/any;
2539
+ getAttribute(key: string): any;
2540
+ castAttribute(key: string, value: string): any;
2541
+ attributesToData(): {
2542
+ [x: string]: any;
2543
+ };
2544
+ mutateAttribute(key: string, value: string | null): any;
2545
+ mutateAttributeForArray(_key: string, _value: string): void;
2546
+ isDateAttribute(key: string): boolean;
2547
+ serializeDate(date?: Date | string | null): string | null;
2548
+ getDates(): any[];
2549
+ getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
2550
+ getCastType(key: string): any;
2551
+ hasCast(key: string, types?: readonly string[]): boolean;
2552
+ withDayjs(date: string): dayjs0.Dayjs;
2553
+ isCustomCast(cast: any): boolean;
2554
+ isCustomDateTimeCast(cast: any): boolean;
2555
+ isDecimalCast(cast: any): boolean;
2556
+ isDateCastable(key: string): boolean;
2557
+ fromDateTime(value: string): string;
2558
+ getDateFormat(): any;
2559
+ asDecimal(value: string, decimals: number): string;
2560
+ asDateTime(value: any): Date | null;
2561
+ asDate(value: string): Date;
2562
+ } & {
2563
+ [x: string]: any;
2564
+ hidden: any[];
2565
+ visible: any[];
2566
+ makeVisible(...keys: string[]): /*elided*/any;
2567
+ makeHidden(key: string[], ...keys: string[]): /*elided*/any;
2568
+ getHidden(): any[];
2569
+ getVisible(): any[];
2570
+ setHidden(hidden: any[]): /*elided*/any;
2571
+ setVisible(visible: any[]): /*elided*/any;
2572
+ } & {
2573
+ [x: string]: any;
2574
+ execHooks(hook: any, options: TGeneric): Promise<any>;
2575
+ } & {
2576
+ [x: string]: any;
2577
+ getGlobalScopes(): {};
2578
+ } & {
2579
+ [x: string]: any;
2580
+ useUniqueIds: boolean;
2581
+ usesUniqueIds(): boolean;
2582
+ uniqueIds(): never[];
2583
+ setUniqueIds(): void;
2584
+ }) & ((key: string[], ...keys: string[]) => (new () => IModel) & IModel & {
2585
+ [x: string]: any;
2586
+ timestamps: boolean;
2587
+ dateFormat: string;
2588
+ usesTimestamps(): boolean;
2589
+ updateTimestamps(): /*elided*/any;
2590
+ getCreatedAtColumn(): any;
2591
+ getUpdatedAtColumn(): any;
2592
+ setCreatedAt(value: any): /*elided*/any;
2593
+ setUpdatedAt(value: any): /*elided*/any;
2594
+ freshTimestamp(): Date;
2595
+ freshTimestampString(): any;
2596
+ } & TGeneric<any, string> & {
2597
+ [x: string]: any;
2598
+ attributes: TGeneric;
2599
+ original: TGeneric;
2600
+ casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
2601
+ changes: TGeneric;
2602
+ appends: any[];
2603
+ setAppends(appends: any[]): /*elided*/any;
2604
+ append(...keys: any[]): /*elided*/any;
2605
+ normalizeCastClassResponse(key: string, value: string): TGeneric;
2606
+ syncOriginal(): /*elided*/any;
2607
+ syncChanges(): /*elided*/any;
2608
+ syncOriginalAttribute(attribute: string): void;
2609
+ syncOriginalAttributes(...attributes: string[]): /*elided*/any;
2610
+ isDirty(...attributes: string[]): boolean;
2611
+ getDirty(): TGeneric;
2612
+ originalIsEquivalent(key: string): boolean;
2613
+ setAttributes(attributes: TGeneric): void;
2614
+ setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
2615
+ getAttributes(): {
2616
+ [x: string]: any;
2617
+ };
2618
+ setAttribute(key: string, value: string): /*elided*/any;
2619
+ getAttribute(key: string): any;
2620
+ castAttribute(key: string, value: string): any;
2621
+ attributesToData(): {
2622
+ [x: string]: any;
2623
+ };
2624
+ mutateAttribute(key: string, value: string | null): any;
2625
+ mutateAttributeForArray(_key: string, _value: string): void;
2626
+ isDateAttribute(key: string): boolean;
2627
+ serializeDate(date?: Date | string | null): string | null;
2628
+ getDates(): any[];
2629
+ getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
2630
+ getCastType(key: string): any;
2631
+ hasCast(key: string, types?: readonly string[]): boolean;
2632
+ withDayjs(date: string): dayjs0.Dayjs;
2633
+ isCustomCast(cast: any): boolean;
2634
+ isCustomDateTimeCast(cast: any): boolean;
2635
+ isDecimalCast(cast: any): boolean;
2636
+ isDateCastable(key: string): boolean;
2637
+ fromDateTime(value: string): string;
2638
+ getDateFormat(): any;
2639
+ asDecimal(value: string, decimals: number): string;
2640
+ asDateTime(value: any): Date | null;
2641
+ asDate(value: string): Date;
2642
+ } & {
2643
+ [x: string]: any;
2644
+ hidden: any[];
2645
+ visible: any[];
2646
+ makeVisible(...keys: string[]): /*elided*/any;
2647
+ makeHidden(key: string[], ...keys: string[]): /*elided*/any;
2648
+ getHidden(): any[];
2649
+ getVisible(): any[];
2650
+ setHidden(hidden: any[]): /*elided*/any;
2651
+ setVisible(visible: any[]): /*elided*/any;
2652
+ } & {
2653
+ [x: string]: any;
2654
+ execHooks(hook: any, options: TGeneric): Promise<any>;
2655
+ } & {
2656
+ [x: string]: any;
2657
+ getGlobalScopes(): {};
2658
+ } & {
2659
+ [x: string]: any;
2660
+ useUniqueIds: boolean;
2661
+ usesUniqueIds(): boolean;
2662
+ uniqueIds(): never[];
2663
+ setUniqueIds(): void;
2664
+ });
2665
+ newCollection: (models?: any[]) => ICollection<Model$1>;
2666
+ load: {
2667
+ (relations: WithRelationType): Promise<(new () => IModel) & IModel & {
2668
+ [x: string]: any;
2669
+ timestamps: boolean;
2670
+ dateFormat: string;
2671
+ usesTimestamps(): boolean;
2672
+ updateTimestamps(): /*elided*/any;
2673
+ getCreatedAtColumn(): any;
2674
+ getUpdatedAtColumn(): any;
2675
+ setCreatedAt(value: any): /*elided*/any;
2676
+ setUpdatedAt(value: any): /*elided*/any;
2677
+ freshTimestamp(): Date;
2678
+ freshTimestampString(): any;
2679
+ } & TGeneric<any, string> & {
2680
+ [x: string]: any;
2681
+ attributes: TGeneric;
2682
+ original: TGeneric;
2683
+ casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
2684
+ changes: TGeneric;
2685
+ appends: any[];
2686
+ setAppends(appends: any[]): /*elided*/any;
2687
+ append(...keys: any[]): /*elided*/any;
2688
+ normalizeCastClassResponse(key: string, value: string): TGeneric;
2689
+ syncOriginal(): /*elided*/any;
2690
+ syncChanges(): /*elided*/any;
2691
+ syncOriginalAttribute(attribute: string): void;
2692
+ syncOriginalAttributes(...attributes: string[]): /*elided*/any;
2693
+ isDirty(...attributes: string[]): boolean;
2694
+ getDirty(): TGeneric;
2695
+ originalIsEquivalent(key: string): boolean;
2696
+ setAttributes(attributes: TGeneric): void;
2697
+ setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
2698
+ getAttributes(): {
2699
+ [x: string]: any;
2700
+ };
2701
+ setAttribute(key: string, value: string): /*elided*/any;
2702
+ getAttribute(key: string): any;
2703
+ castAttribute(key: string, value: string): any;
2704
+ attributesToData(): {
2705
+ [x: string]: any;
2706
+ };
2707
+ mutateAttribute(key: string, value: string | null): any;
2708
+ mutateAttributeForArray(_key: string, _value: string): void;
2709
+ isDateAttribute(key: string): boolean;
2710
+ serializeDate(date?: Date | string | null): string | null;
2711
+ getDates(): any[];
2712
+ getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
2713
+ getCastType(key: string): any;
2714
+ hasCast(key: string, types?: readonly string[]): boolean;
2715
+ withDayjs(date: string): dayjs0.Dayjs;
2716
+ isCustomCast(cast: any): boolean;
2717
+ isCustomDateTimeCast(cast: any): boolean;
2718
+ isDecimalCast(cast: any): boolean;
2719
+ isDateCastable(key: string): boolean;
2720
+ fromDateTime(value: string): string;
2721
+ getDateFormat(): any;
2722
+ asDecimal(value: string, decimals: number): string;
2723
+ asDateTime(value: any): Date | null;
2724
+ asDate(value: string): Date;
2725
+ } & {
2726
+ [x: string]: any;
2727
+ hidden: any[];
2728
+ visible: any[];
2729
+ makeVisible(...keys: string[]): /*elided*/any;
2730
+ makeHidden(key: string[], ...keys: string[]): /*elided*/any;
2731
+ getHidden(): any[];
2732
+ getVisible(): any[];
2733
+ setHidden(hidden: any[]): /*elided*/any;
2734
+ setVisible(visible: any[]): /*elided*/any;
2735
+ } & {
2736
+ [x: string]: any;
2737
+ execHooks(hook: any, options: TGeneric): Promise<any>;
2738
+ } & {
2739
+ [x: string]: any;
2740
+ getGlobalScopes(): {};
2741
+ } & {
2742
+ [x: string]: any;
2743
+ useUniqueIds: boolean;
2744
+ usesUniqueIds(): boolean;
2745
+ uniqueIds(): never[];
2746
+ setUniqueIds(): void;
2747
+ }>;
2748
+ (...relations: WithRelationType[]): Promise<(new () => IModel) & IModel & {
2749
+ [x: string]: any;
2750
+ timestamps: boolean;
2751
+ dateFormat: string;
2752
+ usesTimestamps(): boolean;
2753
+ updateTimestamps(): /*elided*/any;
2754
+ getCreatedAtColumn(): any;
2755
+ getUpdatedAtColumn(): any;
2756
+ setCreatedAt(value: any): /*elided*/any;
2757
+ setUpdatedAt(value: any): /*elided*/any;
2758
+ freshTimestamp(): Date;
2759
+ freshTimestampString(): any;
2760
+ } & TGeneric<any, string> & {
2761
+ [x: string]: any;
2762
+ attributes: TGeneric;
2763
+ original: TGeneric;
2764
+ casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
2765
+ changes: TGeneric;
2766
+ appends: any[];
2767
+ setAppends(appends: any[]): /*elided*/any;
2768
+ append(...keys: any[]): /*elided*/any;
2769
+ normalizeCastClassResponse(key: string, value: string): TGeneric;
2770
+ syncOriginal(): /*elided*/any;
2771
+ syncChanges(): /*elided*/any;
2772
+ syncOriginalAttribute(attribute: string): void;
2773
+ syncOriginalAttributes(...attributes: string[]): /*elided*/any;
2774
+ isDirty(...attributes: string[]): boolean;
2775
+ getDirty(): TGeneric;
2776
+ originalIsEquivalent(key: string): boolean;
2777
+ setAttributes(attributes: TGeneric): void;
2778
+ setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
2779
+ getAttributes(): {
2780
+ [x: string]: any;
2781
+ };
2782
+ setAttribute(key: string, value: string): /*elided*/any;
2783
+ getAttribute(key: string): any;
2784
+ castAttribute(key: string, value: string): any;
2785
+ attributesToData(): {
2786
+ [x: string]: any;
2787
+ };
2788
+ mutateAttribute(key: string, value: string | null): any;
2789
+ mutateAttributeForArray(_key: string, _value: string): void;
2790
+ isDateAttribute(key: string): boolean;
2791
+ serializeDate(date?: Date | string | null): string | null;
2792
+ getDates(): any[];
2793
+ getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
2794
+ getCastType(key: string): any;
2795
+ hasCast(key: string, types?: readonly string[]): boolean;
2796
+ withDayjs(date: string): dayjs0.Dayjs;
2797
+ isCustomCast(cast: any): boolean;
2798
+ isCustomDateTimeCast(cast: any): boolean;
2799
+ isDecimalCast(cast: any): boolean;
2800
+ isDateCastable(key: string): boolean;
2801
+ fromDateTime(value: string): string;
2802
+ getDateFormat(): any;
2803
+ asDecimal(value: string, decimals: number): string;
2804
+ asDateTime(value: any): Date | null;
2805
+ asDate(value: string): Date;
2806
+ } & {
2807
+ [x: string]: any;
2808
+ hidden: any[];
2809
+ visible: any[];
2810
+ makeVisible(...keys: string[]): /*elided*/any;
2811
+ makeHidden(key: string[], ...keys: string[]): /*elided*/any;
2812
+ getHidden(): any[];
2813
+ getVisible(): any[];
2814
+ setHidden(hidden: any[]): /*elided*/any;
2815
+ setVisible(visible: any[]): /*elided*/any;
2816
+ } & {
2817
+ [x: string]: any;
2818
+ execHooks(hook: any, options: TGeneric): Promise<any>;
2819
+ } & {
2820
+ [x: string]: any;
2821
+ getGlobalScopes(): {};
2822
+ } & {
2823
+ [x: string]: any;
2824
+ useUniqueIds: boolean;
2825
+ usesUniqueIds(): boolean;
2826
+ uniqueIds(): never[];
2827
+ setUniqueIds(): void;
2828
+ }>;
2829
+ };
2830
+ loadAggregate: (relations: WithRelationType, column: any, callback?: any) => Promise<(new () => IModel) & IModel & {
2831
+ [x: string]: any;
2832
+ timestamps: boolean;
2833
+ dateFormat: string;
2834
+ usesTimestamps(): boolean;
2835
+ updateTimestamps(): /*elided*/any;
2836
+ getCreatedAtColumn(): any;
2837
+ getUpdatedAtColumn(): any;
2838
+ setCreatedAt(value: any): /*elided*/any;
2839
+ setUpdatedAt(value: any): /*elided*/any;
2840
+ freshTimestamp(): Date;
2841
+ freshTimestampString(): any;
2842
+ } & TGeneric<any, string> & {
2843
+ [x: string]: any;
2844
+ attributes: TGeneric;
2845
+ original: TGeneric;
2846
+ casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
2847
+ changes: TGeneric;
2848
+ appends: any[];
2849
+ setAppends(appends: any[]): /*elided*/any;
2850
+ append(...keys: any[]): /*elided*/any;
2851
+ normalizeCastClassResponse(key: string, value: string): TGeneric;
2852
+ syncOriginal(): /*elided*/any;
2853
+ syncChanges(): /*elided*/any;
2854
+ syncOriginalAttribute(attribute: string): void;
2855
+ syncOriginalAttributes(...attributes: string[]): /*elided*/any;
2856
+ isDirty(...attributes: string[]): boolean;
2857
+ getDirty(): TGeneric;
2858
+ originalIsEquivalent(key: string): boolean;
2859
+ setAttributes(attributes: TGeneric): void;
2860
+ setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
2861
+ getAttributes(): {
2862
+ [x: string]: any;
2863
+ };
2864
+ setAttribute(key: string, value: string): /*elided*/any;
2865
+ getAttribute(key: string): any;
2866
+ castAttribute(key: string, value: string): any;
2867
+ attributesToData(): {
2868
+ [x: string]: any;
2869
+ };
2870
+ mutateAttribute(key: string, value: string | null): any;
2871
+ mutateAttributeForArray(_key: string, _value: string): void;
2872
+ isDateAttribute(key: string): boolean;
2873
+ serializeDate(date?: Date | string | null): string | null;
2874
+ getDates(): any[];
2875
+ getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
2876
+ getCastType(key: string): any;
2877
+ hasCast(key: string, types?: readonly string[]): boolean;
2878
+ withDayjs(date: string): dayjs0.Dayjs;
2879
+ isCustomCast(cast: any): boolean;
2880
+ isCustomDateTimeCast(cast: any): boolean;
2881
+ isDecimalCast(cast: any): boolean;
2882
+ isDateCastable(key: string): boolean;
2883
+ fromDateTime(value: string): string;
2884
+ getDateFormat(): any;
2885
+ asDecimal(value: string, decimals: number): string;
2886
+ asDateTime(value: any): Date | null;
2887
+ asDate(value: string): Date;
2888
+ } & {
2889
+ [x: string]: any;
2890
+ hidden: any[];
2891
+ visible: any[];
2892
+ makeVisible(...keys: string[]): /*elided*/any;
2893
+ makeHidden(key: string[], ...keys: string[]): /*elided*/any;
2894
+ getHidden(): any[];
2895
+ getVisible(): any[];
2896
+ setHidden(hidden: any[]): /*elided*/any;
2897
+ setVisible(visible: any[]): /*elided*/any;
2898
+ } & {
2899
+ [x: string]: any;
2900
+ execHooks(hook: any, options: TGeneric): Promise<any>;
2901
+ } & {
2902
+ [x: string]: any;
2903
+ getGlobalScopes(): {};
2904
+ } & {
2905
+ [x: string]: any;
2906
+ useUniqueIds: boolean;
2907
+ usesUniqueIds(): boolean;
2908
+ uniqueIds(): never[];
2909
+ setUniqueIds(): void;
2910
+ }>;
2911
+ loadCount: (...relations: WithRelationType[]) => Promise<(new () => IModel) & IModel & {
2912
+ [x: string]: any;
2913
+ timestamps: boolean;
2914
+ dateFormat: string;
2915
+ usesTimestamps(): boolean;
2916
+ updateTimestamps(): /*elided*/any;
2917
+ getCreatedAtColumn(): any;
2918
+ getUpdatedAtColumn(): any;
2919
+ setCreatedAt(value: any): /*elided*/any;
2920
+ setUpdatedAt(value: any): /*elided*/any;
2921
+ freshTimestamp(): Date;
2922
+ freshTimestampString(): any;
2923
+ } & TGeneric<any, string> & {
2924
+ [x: string]: any;
2925
+ attributes: TGeneric;
2926
+ original: TGeneric;
2927
+ casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
2928
+ changes: TGeneric;
2929
+ appends: any[];
2930
+ setAppends(appends: any[]): /*elided*/any;
2931
+ append(...keys: any[]): /*elided*/any;
2932
+ normalizeCastClassResponse(key: string, value: string): TGeneric;
2933
+ syncOriginal(): /*elided*/any;
2934
+ syncChanges(): /*elided*/any;
2935
+ syncOriginalAttribute(attribute: string): void;
2936
+ syncOriginalAttributes(...attributes: string[]): /*elided*/any;
2937
+ isDirty(...attributes: string[]): boolean;
2938
+ getDirty(): TGeneric;
2939
+ originalIsEquivalent(key: string): boolean;
2940
+ setAttributes(attributes: TGeneric): void;
2941
+ setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
2942
+ getAttributes(): {
2943
+ [x: string]: any;
2944
+ };
2945
+ setAttribute(key: string, value: string): /*elided*/any;
2946
+ getAttribute(key: string): any;
2947
+ castAttribute(key: string, value: string): any;
2948
+ attributesToData(): {
2949
+ [x: string]: any;
2950
+ };
2951
+ mutateAttribute(key: string, value: string | null): any;
2952
+ mutateAttributeForArray(_key: string, _value: string): void;
2953
+ isDateAttribute(key: string): boolean;
2954
+ serializeDate(date?: Date | string | null): string | null;
2955
+ getDates(): any[];
2956
+ getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
2957
+ getCastType(key: string): any;
2958
+ hasCast(key: string, types?: readonly string[]): boolean;
2959
+ withDayjs(date: string): dayjs0.Dayjs;
2960
+ isCustomCast(cast: any): boolean;
2961
+ isCustomDateTimeCast(cast: any): boolean;
2962
+ isDecimalCast(cast: any): boolean;
2963
+ isDateCastable(key: string): boolean;
2964
+ fromDateTime(value: string): string;
2965
+ getDateFormat(): any;
2966
+ asDecimal(value: string, decimals: number): string;
2967
+ asDateTime(value: any): Date | null;
2968
+ asDate(value: string): Date;
2969
+ } & {
2970
+ [x: string]: any;
2971
+ hidden: any[];
2972
+ visible: any[];
2973
+ makeVisible(...keys: string[]): /*elided*/any;
2974
+ makeHidden(key: string[], ...keys: string[]): /*elided*/any;
2975
+ getHidden(): any[];
2976
+ getVisible(): any[];
2977
+ setHidden(hidden: any[]): /*elided*/any;
2978
+ setVisible(visible: any[]): /*elided*/any;
2979
+ } & {
2980
+ [x: string]: any;
2981
+ execHooks(hook: any, options: TGeneric): Promise<any>;
2982
+ } & {
2983
+ [x: string]: any;
2984
+ getGlobalScopes(): {};
2985
+ } & {
2986
+ [x: string]: any;
2987
+ useUniqueIds: boolean;
2988
+ usesUniqueIds(): boolean;
2989
+ uniqueIds(): never[];
2990
+ setUniqueIds(): void;
2991
+ }>;
2992
+ loadMax: (relations: WithRelationType, column: string) => Promise<(new () => IModel) & IModel & {
2993
+ [x: string]: any;
2994
+ timestamps: boolean;
2995
+ dateFormat: string;
2996
+ usesTimestamps(): boolean;
2997
+ updateTimestamps(): /*elided*/any;
2998
+ getCreatedAtColumn(): any;
2999
+ getUpdatedAtColumn(): any;
3000
+ setCreatedAt(value: any): /*elided*/any;
3001
+ setUpdatedAt(value: any): /*elided*/any;
3002
+ freshTimestamp(): Date;
3003
+ freshTimestampString(): any;
3004
+ } & TGeneric<any, string> & {
3005
+ [x: string]: any;
3006
+ attributes: TGeneric;
3007
+ original: TGeneric;
3008
+ casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
3009
+ changes: TGeneric;
3010
+ appends: any[];
3011
+ setAppends(appends: any[]): /*elided*/any;
3012
+ append(...keys: any[]): /*elided*/any;
3013
+ normalizeCastClassResponse(key: string, value: string): TGeneric;
3014
+ syncOriginal(): /*elided*/any;
3015
+ syncChanges(): /*elided*/any;
3016
+ syncOriginalAttribute(attribute: string): void;
3017
+ syncOriginalAttributes(...attributes: string[]): /*elided*/any;
3018
+ isDirty(...attributes: string[]): boolean;
3019
+ getDirty(): TGeneric;
3020
+ originalIsEquivalent(key: string): boolean;
3021
+ setAttributes(attributes: TGeneric): void;
3022
+ setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
3023
+ getAttributes(): {
3024
+ [x: string]: any;
3025
+ };
3026
+ setAttribute(key: string, value: string): /*elided*/any;
3027
+ getAttribute(key: string): any;
3028
+ castAttribute(key: string, value: string): any;
3029
+ attributesToData(): {
3030
+ [x: string]: any;
3031
+ };
3032
+ mutateAttribute(key: string, value: string | null): any;
3033
+ mutateAttributeForArray(_key: string, _value: string): void;
3034
+ isDateAttribute(key: string): boolean;
3035
+ serializeDate(date?: Date | string | null): string | null;
3036
+ getDates(): any[];
3037
+ getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
3038
+ getCastType(key: string): any;
3039
+ hasCast(key: string, types?: readonly string[]): boolean;
3040
+ withDayjs(date: string): dayjs0.Dayjs;
3041
+ isCustomCast(cast: any): boolean;
3042
+ isCustomDateTimeCast(cast: any): boolean;
3043
+ isDecimalCast(cast: any): boolean;
3044
+ isDateCastable(key: string): boolean;
3045
+ fromDateTime(value: string): string;
3046
+ getDateFormat(): any;
3047
+ asDecimal(value: string, decimals: number): string;
3048
+ asDateTime(value: any): Date | null;
3049
+ asDate(value: string): Date;
3050
+ } & {
3051
+ [x: string]: any;
3052
+ hidden: any[];
3053
+ visible: any[];
3054
+ makeVisible(...keys: string[]): /*elided*/any;
3055
+ makeHidden(key: string[], ...keys: string[]): /*elided*/any;
3056
+ getHidden(): any[];
3057
+ getVisible(): any[];
3058
+ setHidden(hidden: any[]): /*elided*/any;
3059
+ setVisible(visible: any[]): /*elided*/any;
3060
+ } & {
3061
+ [x: string]: any;
3062
+ execHooks(hook: any, options: TGeneric): Promise<any>;
3063
+ } & {
3064
+ [x: string]: any;
3065
+ getGlobalScopes(): {};
3066
+ } & {
3067
+ [x: string]: any;
3068
+ useUniqueIds: boolean;
3069
+ usesUniqueIds(): boolean;
3070
+ uniqueIds(): never[];
3071
+ setUniqueIds(): void;
3072
+ }>;
3073
+ loadMin: (relations: WithRelationType, column: string) => Promise<(new () => IModel) & IModel & {
3074
+ [x: string]: any;
3075
+ timestamps: boolean;
3076
+ dateFormat: string;
3077
+ usesTimestamps(): boolean;
3078
+ updateTimestamps(): /*elided*/any;
3079
+ getCreatedAtColumn(): any;
3080
+ getUpdatedAtColumn(): any;
3081
+ setCreatedAt(value: any): /*elided*/any;
3082
+ setUpdatedAt(value: any): /*elided*/any;
3083
+ freshTimestamp(): Date;
3084
+ freshTimestampString(): any;
3085
+ } & TGeneric<any, string> & {
3086
+ [x: string]: any;
3087
+ attributes: TGeneric;
3088
+ original: TGeneric;
3089
+ casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
3090
+ changes: TGeneric;
3091
+ appends: any[];
3092
+ setAppends(appends: any[]): /*elided*/any;
3093
+ append(...keys: any[]): /*elided*/any;
3094
+ normalizeCastClassResponse(key: string, value: string): TGeneric;
3095
+ syncOriginal(): /*elided*/any;
3096
+ syncChanges(): /*elided*/any;
3097
+ syncOriginalAttribute(attribute: string): void;
3098
+ syncOriginalAttributes(...attributes: string[]): /*elided*/any;
3099
+ isDirty(...attributes: string[]): boolean;
3100
+ getDirty(): TGeneric;
3101
+ originalIsEquivalent(key: string): boolean;
3102
+ setAttributes(attributes: TGeneric): void;
3103
+ setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
3104
+ getAttributes(): {
3105
+ [x: string]: any;
3106
+ };
3107
+ setAttribute(key: string, value: string): /*elided*/any;
3108
+ getAttribute(key: string): any;
3109
+ castAttribute(key: string, value: string): any;
3110
+ attributesToData(): {
3111
+ [x: string]: any;
3112
+ };
3113
+ mutateAttribute(key: string, value: string | null): any;
3114
+ mutateAttributeForArray(_key: string, _value: string): void;
3115
+ isDateAttribute(key: string): boolean;
3116
+ serializeDate(date?: Date | string | null): string | null;
3117
+ getDates(): any[];
3118
+ getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
3119
+ getCastType(key: string): any;
3120
+ hasCast(key: string, types?: readonly string[]): boolean;
3121
+ withDayjs(date: string): dayjs0.Dayjs;
3122
+ isCustomCast(cast: any): boolean;
3123
+ isCustomDateTimeCast(cast: any): boolean;
3124
+ isDecimalCast(cast: any): boolean;
3125
+ isDateCastable(key: string): boolean;
3126
+ fromDateTime(value: string): string;
3127
+ getDateFormat(): any;
3128
+ asDecimal(value: string, decimals: number): string;
3129
+ asDateTime(value: any): Date | null;
3130
+ asDate(value: string): Date;
3131
+ } & {
3132
+ [x: string]: any;
3133
+ hidden: any[];
3134
+ visible: any[];
3135
+ makeVisible(...keys: string[]): /*elided*/any;
3136
+ makeHidden(key: string[], ...keys: string[]): /*elided*/any;
3137
+ getHidden(): any[];
3138
+ getVisible(): any[];
3139
+ setHidden(hidden: any[]): /*elided*/any;
3140
+ setVisible(visible: any[]): /*elided*/any;
3141
+ } & {
3142
+ [x: string]: any;
3143
+ execHooks(hook: any, options: TGeneric): Promise<any>;
3144
+ } & {
3145
+ [x: string]: any;
3146
+ getGlobalScopes(): {};
3147
+ } & {
3148
+ [x: string]: any;
3149
+ useUniqueIds: boolean;
3150
+ usesUniqueIds(): boolean;
3151
+ uniqueIds(): never[];
3152
+ setUniqueIds(): void;
3153
+ }>;
3154
+ loadSum: (relations: WithRelationType, column: string) => Promise<(new () => IModel) & IModel & {
3155
+ [x: string]: any;
3156
+ timestamps: boolean;
3157
+ dateFormat: string;
3158
+ usesTimestamps(): boolean;
3159
+ updateTimestamps(): /*elided*/any;
3160
+ getCreatedAtColumn(): any;
3161
+ getUpdatedAtColumn(): any;
3162
+ setCreatedAt(value: any): /*elided*/any;
3163
+ setUpdatedAt(value: any): /*elided*/any;
3164
+ freshTimestamp(): Date;
3165
+ freshTimestampString(): any;
3166
+ } & TGeneric<any, string> & {
3167
+ [x: string]: any;
3168
+ attributes: TGeneric;
3169
+ original: TGeneric;
3170
+ casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
3171
+ changes: TGeneric;
3172
+ appends: any[];
3173
+ setAppends(appends: any[]): /*elided*/any;
3174
+ append(...keys: any[]): /*elided*/any;
3175
+ normalizeCastClassResponse(key: string, value: string): TGeneric;
3176
+ syncOriginal(): /*elided*/any;
3177
+ syncChanges(): /*elided*/any;
3178
+ syncOriginalAttribute(attribute: string): void;
3179
+ syncOriginalAttributes(...attributes: string[]): /*elided*/any;
3180
+ isDirty(...attributes: string[]): boolean;
3181
+ getDirty(): TGeneric;
3182
+ originalIsEquivalent(key: string): boolean;
3183
+ setAttributes(attributes: TGeneric): void;
3184
+ setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
3185
+ getAttributes(): {
3186
+ [x: string]: any;
3187
+ };
3188
+ setAttribute(key: string, value: string): /*elided*/any;
3189
+ getAttribute(key: string): any;
3190
+ castAttribute(key: string, value: string): any;
3191
+ attributesToData(): {
3192
+ [x: string]: any;
3193
+ };
3194
+ mutateAttribute(key: string, value: string | null): any;
3195
+ mutateAttributeForArray(_key: string, _value: string): void;
3196
+ isDateAttribute(key: string): boolean;
3197
+ serializeDate(date?: Date | string | null): string | null;
3198
+ getDates(): any[];
3199
+ getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
3200
+ getCastType(key: string): any;
3201
+ hasCast(key: string, types?: readonly string[]): boolean;
3202
+ withDayjs(date: string): dayjs0.Dayjs;
3203
+ isCustomCast(cast: any): boolean;
3204
+ isCustomDateTimeCast(cast: any): boolean;
3205
+ isDecimalCast(cast: any): boolean;
3206
+ isDateCastable(key: string): boolean;
3207
+ fromDateTime(value: string): string;
3208
+ getDateFormat(): any;
3209
+ asDecimal(value: string, decimals: number): string;
3210
+ asDateTime(value: any): Date | null;
3211
+ asDate(value: string): Date;
3212
+ } & {
3213
+ [x: string]: any;
3214
+ hidden: any[];
3215
+ visible: any[];
3216
+ makeVisible(...keys: string[]): /*elided*/any;
3217
+ makeHidden(key: string[], ...keys: string[]): /*elided*/any;
3218
+ getHidden(): any[];
3219
+ getVisible(): any[];
3220
+ setHidden(hidden: any[]): /*elided*/any;
3221
+ setVisible(visible: any[]): /*elided*/any;
3222
+ } & {
3223
+ [x: string]: any;
3224
+ execHooks(hook: any, options: TGeneric): Promise<any>;
3225
+ } & {
3226
+ [x: string]: any;
3227
+ getGlobalScopes(): {};
3228
+ } & {
3229
+ [x: string]: any;
3230
+ useUniqueIds: boolean;
3231
+ usesUniqueIds(): boolean;
3232
+ uniqueIds(): never[];
3233
+ setUniqueIds(): void;
3234
+ }>;
3235
+ usesTimestamps: (() => boolean) & (() => boolean);
3236
+ updateTimestamps: (() => (new () => IModel) & IModel & {
3237
+ [x: string]: any;
3238
+ timestamps: boolean;
3239
+ dateFormat: string;
3240
+ usesTimestamps(): boolean;
3241
+ updateTimestamps(): /*elided*/any;
3242
+ getCreatedAtColumn(): any;
3243
+ getUpdatedAtColumn(): any;
3244
+ setCreatedAt(value: any): /*elided*/any;
3245
+ setUpdatedAt(value: any): /*elided*/any;
3246
+ freshTimestamp(): Date;
3247
+ freshTimestampString(): any;
3248
+ } & TGeneric<any, string> & {
3249
+ [x: string]: any;
3250
+ attributes: TGeneric;
3251
+ original: TGeneric;
3252
+ casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
3253
+ changes: TGeneric;
3254
+ appends: any[];
3255
+ setAppends(appends: any[]): /*elided*/any;
3256
+ append(...keys: any[]): /*elided*/any;
3257
+ normalizeCastClassResponse(key: string, value: string): TGeneric;
3258
+ syncOriginal(): /*elided*/any;
3259
+ syncChanges(): /*elided*/any;
3260
+ syncOriginalAttribute(attribute: string): void;
3261
+ syncOriginalAttributes(...attributes: string[]): /*elided*/any;
3262
+ isDirty(...attributes: string[]): boolean;
3263
+ getDirty(): TGeneric;
3264
+ originalIsEquivalent(key: string): boolean;
3265
+ setAttributes(attributes: TGeneric): void;
3266
+ setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
3267
+ getAttributes(): {
3268
+ [x: string]: any;
3269
+ };
3270
+ setAttribute(key: string, value: string): /*elided*/any;
3271
+ getAttribute(key: string): any;
3272
+ castAttribute(key: string, value: string): any;
3273
+ attributesToData(): {
3274
+ [x: string]: any;
3275
+ };
3276
+ mutateAttribute(key: string, value: string | null): any;
3277
+ mutateAttributeForArray(_key: string, _value: string): void;
3278
+ isDateAttribute(key: string): boolean;
3279
+ serializeDate(date?: Date | string | null): string | null;
3280
+ getDates(): any[];
3281
+ getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
3282
+ getCastType(key: string): any;
3283
+ hasCast(key: string, types?: readonly string[]): boolean;
3284
+ withDayjs(date: string): dayjs0.Dayjs;
3285
+ isCustomCast(cast: any): boolean;
3286
+ isCustomDateTimeCast(cast: any): boolean;
3287
+ isDecimalCast(cast: any): boolean;
3288
+ isDateCastable(key: string): boolean;
3289
+ fromDateTime(value: string): string;
3290
+ getDateFormat(): any;
3291
+ asDecimal(value: string, decimals: number): string;
3292
+ asDateTime(value: any): Date | null;
3293
+ asDate(value: string): Date;
3294
+ } & {
3295
+ [x: string]: any;
3296
+ hidden: any[];
3297
+ visible: any[];
3298
+ makeVisible(...keys: string[]): /*elided*/any;
3299
+ makeHidden(key: string[], ...keys: string[]): /*elided*/any;
3300
+ getHidden(): any[];
3301
+ getVisible(): any[];
3302
+ setHidden(hidden: any[]): /*elided*/any;
3303
+ setVisible(visible: any[]): /*elided*/any;
3304
+ } & {
3305
+ [x: string]: any;
3306
+ execHooks(hook: any, options: TGeneric): Promise<any>;
3307
+ } & {
3308
+ [x: string]: any;
3309
+ getGlobalScopes(): {};
3310
+ } & {
3311
+ [x: string]: any;
3312
+ useUniqueIds: boolean;
3313
+ usesUniqueIds(): boolean;
3314
+ uniqueIds(): never[];
3315
+ setUniqueIds(): void;
3316
+ }) & (() => (new () => IModel) & IModel & {
3317
+ [x: string]: any;
3318
+ timestamps: boolean;
3319
+ dateFormat: string;
3320
+ usesTimestamps(): boolean;
3321
+ updateTimestamps(): /*elided*/any;
3322
+ getCreatedAtColumn(): any;
3323
+ getUpdatedAtColumn(): any;
3324
+ setCreatedAt(value: any): /*elided*/any;
3325
+ setUpdatedAt(value: any): /*elided*/any;
3326
+ freshTimestamp(): Date;
3327
+ freshTimestampString(): any;
3328
+ } & TGeneric<any, string> & {
3329
+ [x: string]: any;
3330
+ attributes: TGeneric;
3331
+ original: TGeneric;
3332
+ casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
3333
+ changes: TGeneric;
3334
+ appends: any[];
3335
+ setAppends(appends: any[]): /*elided*/any;
3336
+ append(...keys: any[]): /*elided*/any;
3337
+ normalizeCastClassResponse(key: string, value: string): TGeneric;
3338
+ syncOriginal(): /*elided*/any;
3339
+ syncChanges(): /*elided*/any;
3340
+ syncOriginalAttribute(attribute: string): void;
3341
+ syncOriginalAttributes(...attributes: string[]): /*elided*/any;
3342
+ isDirty(...attributes: string[]): boolean;
3343
+ getDirty(): TGeneric;
3344
+ originalIsEquivalent(key: string): boolean;
3345
+ setAttributes(attributes: TGeneric): void;
3346
+ setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
3347
+ getAttributes(): {
3348
+ [x: string]: any;
3349
+ };
3350
+ setAttribute(key: string, value: string): /*elided*/any;
3351
+ getAttribute(key: string): any;
3352
+ castAttribute(key: string, value: string): any;
3353
+ attributesToData(): {
3354
+ [x: string]: any;
3355
+ };
3356
+ mutateAttribute(key: string, value: string | null): any;
3357
+ mutateAttributeForArray(_key: string, _value: string): void;
3358
+ isDateAttribute(key: string): boolean;
3359
+ serializeDate(date?: Date | string | null): string | null;
3360
+ getDates(): any[];
3361
+ getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
3362
+ getCastType(key: string): any;
3363
+ hasCast(key: string, types?: readonly string[]): boolean;
3364
+ withDayjs(date: string): dayjs0.Dayjs;
3365
+ isCustomCast(cast: any): boolean;
3366
+ isCustomDateTimeCast(cast: any): boolean;
3367
+ isDecimalCast(cast: any): boolean;
3368
+ isDateCastable(key: string): boolean;
3369
+ fromDateTime(value: string): string;
3370
+ getDateFormat(): any;
3371
+ asDecimal(value: string, decimals: number): string;
3372
+ asDateTime(value: any): Date | null;
3373
+ asDate(value: string): Date;
3374
+ } & {
3375
+ [x: string]: any;
3376
+ hidden: any[];
3377
+ visible: any[];
3378
+ makeVisible(...keys: string[]): /*elided*/any;
3379
+ makeHidden(key: string[], ...keys: string[]): /*elided*/any;
3380
+ getHidden(): any[];
3381
+ getVisible(): any[];
3382
+ setHidden(hidden: any[]): /*elided*/any;
3383
+ setVisible(visible: any[]): /*elided*/any;
3384
+ } & {
3385
+ [x: string]: any;
3386
+ execHooks(hook: any, options: TGeneric): Promise<any>;
3387
+ } & {
3388
+ [x: string]: any;
3389
+ getGlobalScopes(): {};
3390
+ } & {
3391
+ [x: string]: any;
3392
+ useUniqueIds: boolean;
3393
+ usesUniqueIds(): boolean;
3394
+ uniqueIds(): never[];
3395
+ setUniqueIds(): void;
3396
+ });
3397
+ getCreatedAtColumn: (() => string) & (() => any);
3398
+ getUpdatedAtColumn: (() => string) & (() => any);
3399
+ getDeletedAtColumn: () => string;
3400
+ setCreatedAt: ((value: string) => (new () => IModel) & IModel & {
3401
+ [x: string]: any;
3402
+ timestamps: boolean;
3403
+ dateFormat: string;
3404
+ usesTimestamps(): boolean;
3405
+ updateTimestamps(): /*elided*/any;
3406
+ getCreatedAtColumn(): any;
3407
+ getUpdatedAtColumn(): any;
3408
+ setCreatedAt(value: any): /*elided*/any;
3409
+ setUpdatedAt(value: any): /*elided*/any;
3410
+ freshTimestamp(): Date;
3411
+ freshTimestampString(): any;
3412
+ } & TGeneric<any, string> & {
3413
+ [x: string]: any;
3414
+ attributes: TGeneric;
3415
+ original: TGeneric;
3416
+ casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
3417
+ changes: TGeneric;
3418
+ appends: any[];
3419
+ setAppends(appends: any[]): /*elided*/any;
3420
+ append(...keys: any[]): /*elided*/any;
3421
+ normalizeCastClassResponse(key: string, value: string): TGeneric;
3422
+ syncOriginal(): /*elided*/any;
3423
+ syncChanges(): /*elided*/any;
3424
+ syncOriginalAttribute(attribute: string): void;
3425
+ syncOriginalAttributes(...attributes: string[]): /*elided*/any;
3426
+ isDirty(...attributes: string[]): boolean;
3427
+ getDirty(): TGeneric;
3428
+ originalIsEquivalent(key: string): boolean;
3429
+ setAttributes(attributes: TGeneric): void;
3430
+ setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
3431
+ getAttributes(): {
3432
+ [x: string]: any;
3433
+ };
3434
+ setAttribute(key: string, value: string): /*elided*/any;
3435
+ getAttribute(key: string): any;
3436
+ castAttribute(key: string, value: string): any;
3437
+ attributesToData(): {
3438
+ [x: string]: any;
3439
+ };
3440
+ mutateAttribute(key: string, value: string | null): any;
3441
+ mutateAttributeForArray(_key: string, _value: string): void;
3442
+ isDateAttribute(key: string): boolean;
3443
+ serializeDate(date?: Date | string | null): string | null;
3444
+ getDates(): any[];
3445
+ getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
3446
+ getCastType(key: string): any;
3447
+ hasCast(key: string, types?: readonly string[]): boolean;
3448
+ withDayjs(date: string): dayjs0.Dayjs;
3449
+ isCustomCast(cast: any): boolean;
3450
+ isCustomDateTimeCast(cast: any): boolean;
3451
+ isDecimalCast(cast: any): boolean;
3452
+ isDateCastable(key: string): boolean;
3453
+ fromDateTime(value: string): string;
3454
+ getDateFormat(): any;
3455
+ asDecimal(value: string, decimals: number): string;
3456
+ asDateTime(value: any): Date | null;
3457
+ asDate(value: string): Date;
3458
+ } & {
3459
+ [x: string]: any;
3460
+ hidden: any[];
3461
+ visible: any[];
3462
+ makeVisible(...keys: string[]): /*elided*/any;
3463
+ makeHidden(key: string[], ...keys: string[]): /*elided*/any;
3464
+ getHidden(): any[];
3465
+ getVisible(): any[];
3466
+ setHidden(hidden: any[]): /*elided*/any;
3467
+ setVisible(visible: any[]): /*elided*/any;
3468
+ } & {
3469
+ [x: string]: any;
3470
+ execHooks(hook: any, options: TGeneric): Promise<any>;
3471
+ } & {
3472
+ [x: string]: any;
3473
+ getGlobalScopes(): {};
3474
+ } & {
3475
+ [x: string]: any;
3476
+ useUniqueIds: boolean;
3477
+ usesUniqueIds(): boolean;
3478
+ uniqueIds(): never[];
3479
+ setUniqueIds(): void;
3480
+ }) & ((value: any) => (new () => IModel) & IModel & {
3481
+ [x: string]: any;
3482
+ timestamps: boolean;
3483
+ dateFormat: string;
3484
+ usesTimestamps(): boolean;
3485
+ updateTimestamps(): /*elided*/any;
3486
+ getCreatedAtColumn(): any;
3487
+ getUpdatedAtColumn(): any;
3488
+ setCreatedAt(value: any): /*elided*/any;
3489
+ setUpdatedAt(value: any): /*elided*/any;
3490
+ freshTimestamp(): Date;
3491
+ freshTimestampString(): any;
3492
+ } & TGeneric<any, string> & {
3493
+ [x: string]: any;
3494
+ attributes: TGeneric;
3495
+ original: TGeneric;
3496
+ casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
3497
+ changes: TGeneric;
3498
+ appends: any[];
3499
+ setAppends(appends: any[]): /*elided*/any;
3500
+ append(...keys: any[]): /*elided*/any;
3501
+ normalizeCastClassResponse(key: string, value: string): TGeneric;
3502
+ syncOriginal(): /*elided*/any;
3503
+ syncChanges(): /*elided*/any;
3504
+ syncOriginalAttribute(attribute: string): void;
3505
+ syncOriginalAttributes(...attributes: string[]): /*elided*/any;
3506
+ isDirty(...attributes: string[]): boolean;
3507
+ getDirty(): TGeneric;
3508
+ originalIsEquivalent(key: string): boolean;
3509
+ setAttributes(attributes: TGeneric): void;
3510
+ setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
3511
+ getAttributes(): {
3512
+ [x: string]: any;
3513
+ };
3514
+ setAttribute(key: string, value: string): /*elided*/any;
3515
+ getAttribute(key: string): any;
3516
+ castAttribute(key: string, value: string): any;
3517
+ attributesToData(): {
3518
+ [x: string]: any;
3519
+ };
3520
+ mutateAttribute(key: string, value: string | null): any;
3521
+ mutateAttributeForArray(_key: string, _value: string): void;
3522
+ isDateAttribute(key: string): boolean;
3523
+ serializeDate(date?: Date | string | null): string | null;
3524
+ getDates(): any[];
3525
+ getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
3526
+ getCastType(key: string): any;
3527
+ hasCast(key: string, types?: readonly string[]): boolean;
3528
+ withDayjs(date: string): dayjs0.Dayjs;
3529
+ isCustomCast(cast: any): boolean;
3530
+ isCustomDateTimeCast(cast: any): boolean;
3531
+ isDecimalCast(cast: any): boolean;
3532
+ isDateCastable(key: string): boolean;
3533
+ fromDateTime(value: string): string;
3534
+ getDateFormat(): any;
3535
+ asDecimal(value: string, decimals: number): string;
3536
+ asDateTime(value: any): Date | null;
3537
+ asDate(value: string): Date;
3538
+ } & {
3539
+ [x: string]: any;
3540
+ hidden: any[];
3541
+ visible: any[];
3542
+ makeVisible(...keys: string[]): /*elided*/any;
3543
+ makeHidden(key: string[], ...keys: string[]): /*elided*/any;
3544
+ getHidden(): any[];
3545
+ getVisible(): any[];
3546
+ setHidden(hidden: any[]): /*elided*/any;
3547
+ setVisible(visible: any[]): /*elided*/any;
3548
+ } & {
3549
+ [x: string]: any;
3550
+ execHooks(hook: any, options: TGeneric): Promise<any>;
3551
+ } & {
3552
+ [x: string]: any;
3553
+ getGlobalScopes(): {};
3554
+ } & {
3555
+ [x: string]: any;
3556
+ useUniqueIds: boolean;
3557
+ usesUniqueIds(): boolean;
3558
+ uniqueIds(): never[];
3559
+ setUniqueIds(): void;
3560
+ });
3561
+ setUpdatedAt: ((value: string) => (new () => IModel) & IModel & {
3562
+ [x: string]: any;
3563
+ timestamps: boolean;
3564
+ dateFormat: string;
3565
+ usesTimestamps(): boolean;
3566
+ updateTimestamps(): /*elided*/any;
3567
+ getCreatedAtColumn(): any;
3568
+ getUpdatedAtColumn(): any;
3569
+ setCreatedAt(value: any): /*elided*/any;
3570
+ setUpdatedAt(value: any): /*elided*/any;
3571
+ freshTimestamp(): Date;
3572
+ freshTimestampString(): any;
3573
+ } & TGeneric<any, string> & {
3574
+ [x: string]: any;
3575
+ attributes: TGeneric;
3576
+ original: TGeneric;
3577
+ casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
3578
+ changes: TGeneric;
3579
+ appends: any[];
3580
+ setAppends(appends: any[]): /*elided*/any;
3581
+ append(...keys: any[]): /*elided*/any;
3582
+ normalizeCastClassResponse(key: string, value: string): TGeneric;
3583
+ syncOriginal(): /*elided*/any;
3584
+ syncChanges(): /*elided*/any;
3585
+ syncOriginalAttribute(attribute: string): void;
3586
+ syncOriginalAttributes(...attributes: string[]): /*elided*/any;
3587
+ isDirty(...attributes: string[]): boolean;
3588
+ getDirty(): TGeneric;
3589
+ originalIsEquivalent(key: string): boolean;
3590
+ setAttributes(attributes: TGeneric): void;
3591
+ setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
3592
+ getAttributes(): {
3593
+ [x: string]: any;
3594
+ };
3595
+ setAttribute(key: string, value: string): /*elided*/any;
3596
+ getAttribute(key: string): any;
3597
+ castAttribute(key: string, value: string): any;
3598
+ attributesToData(): {
3599
+ [x: string]: any;
3600
+ };
3601
+ mutateAttribute(key: string, value: string | null): any;
3602
+ mutateAttributeForArray(_key: string, _value: string): void;
3603
+ isDateAttribute(key: string): boolean;
3604
+ serializeDate(date?: Date | string | null): string | null;
3605
+ getDates(): any[];
3606
+ getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
3607
+ getCastType(key: string): any;
3608
+ hasCast(key: string, types?: readonly string[]): boolean;
3609
+ withDayjs(date: string): dayjs0.Dayjs;
3610
+ isCustomCast(cast: any): boolean;
3611
+ isCustomDateTimeCast(cast: any): boolean;
3612
+ isDecimalCast(cast: any): boolean;
3613
+ isDateCastable(key: string): boolean;
3614
+ fromDateTime(value: string): string;
3615
+ getDateFormat(): any;
3616
+ asDecimal(value: string, decimals: number): string;
3617
+ asDateTime(value: any): Date | null;
3618
+ asDate(value: string): Date;
3619
+ } & {
3620
+ [x: string]: any;
3621
+ hidden: any[];
3622
+ visible: any[];
3623
+ makeVisible(...keys: string[]): /*elided*/any;
3624
+ makeHidden(key: string[], ...keys: string[]): /*elided*/any;
3625
+ getHidden(): any[];
3626
+ getVisible(): any[];
3627
+ setHidden(hidden: any[]): /*elided*/any;
3628
+ setVisible(visible: any[]): /*elided*/any;
3629
+ } & {
3630
+ [x: string]: any;
3631
+ execHooks(hook: any, options: TGeneric): Promise<any>;
3632
+ } & {
3633
+ [x: string]: any;
3634
+ getGlobalScopes(): {};
3635
+ } & {
3636
+ [x: string]: any;
3637
+ useUniqueIds: boolean;
3638
+ usesUniqueIds(): boolean;
3639
+ uniqueIds(): never[];
3640
+ setUniqueIds(): void;
3641
+ }) & ((value: any) => (new () => IModel) & IModel & {
3642
+ [x: string]: any;
3643
+ timestamps: boolean;
3644
+ dateFormat: string;
3645
+ usesTimestamps(): boolean;
3646
+ updateTimestamps(): /*elided*/any;
3647
+ getCreatedAtColumn(): any;
3648
+ getUpdatedAtColumn(): any;
3649
+ setCreatedAt(value: any): /*elided*/any;
3650
+ setUpdatedAt(value: any): /*elided*/any;
3651
+ freshTimestamp(): Date;
3652
+ freshTimestampString(): any;
3653
+ } & TGeneric<any, string> & {
3654
+ [x: string]: any;
3655
+ attributes: TGeneric;
3656
+ original: TGeneric;
3657
+ casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
3658
+ changes: TGeneric;
3659
+ appends: any[];
3660
+ setAppends(appends: any[]): /*elided*/any;
3661
+ append(...keys: any[]): /*elided*/any;
3662
+ normalizeCastClassResponse(key: string, value: string): TGeneric;
3663
+ syncOriginal(): /*elided*/any;
3664
+ syncChanges(): /*elided*/any;
3665
+ syncOriginalAttribute(attribute: string): void;
3666
+ syncOriginalAttributes(...attributes: string[]): /*elided*/any;
3667
+ isDirty(...attributes: string[]): boolean;
3668
+ getDirty(): TGeneric;
3669
+ originalIsEquivalent(key: string): boolean;
3670
+ setAttributes(attributes: TGeneric): void;
3671
+ setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
3672
+ getAttributes(): {
3673
+ [x: string]: any;
3674
+ };
3675
+ setAttribute(key: string, value: string): /*elided*/any;
3676
+ getAttribute(key: string): any;
3677
+ castAttribute(key: string, value: string): any;
3678
+ attributesToData(): {
3679
+ [x: string]: any;
3680
+ };
3681
+ mutateAttribute(key: string, value: string | null): any;
3682
+ mutateAttributeForArray(_key: string, _value: string): void;
3683
+ isDateAttribute(key: string): boolean;
3684
+ serializeDate(date?: Date | string | null): string | null;
3685
+ getDates(): any[];
3686
+ getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
3687
+ getCastType(key: string): any;
3688
+ hasCast(key: string, types?: readonly string[]): boolean;
3689
+ withDayjs(date: string): dayjs0.Dayjs;
3690
+ isCustomCast(cast: any): boolean;
3691
+ isCustomDateTimeCast(cast: any): boolean;
3692
+ isDecimalCast(cast: any): boolean;
3693
+ isDateCastable(key: string): boolean;
3694
+ fromDateTime(value: string): string;
3695
+ getDateFormat(): any;
3696
+ asDecimal(value: string, decimals: number): string;
3697
+ asDateTime(value: any): Date | null;
3698
+ asDate(value: string): Date;
3699
+ } & {
3700
+ [x: string]: any;
3701
+ hidden: any[];
3702
+ visible: any[];
3703
+ makeVisible(...keys: string[]): /*elided*/any;
3704
+ makeHidden(key: string[], ...keys: string[]): /*elided*/any;
3705
+ getHidden(): any[];
3706
+ getVisible(): any[];
3707
+ setHidden(hidden: any[]): /*elided*/any;
3708
+ setVisible(visible: any[]): /*elided*/any;
3709
+ } & {
3710
+ [x: string]: any;
3711
+ execHooks(hook: any, options: TGeneric): Promise<any>;
3712
+ } & {
3713
+ [x: string]: any;
3714
+ getGlobalScopes(): {};
3715
+ } & {
3716
+ [x: string]: any;
3717
+ useUniqueIds: boolean;
3718
+ usesUniqueIds(): boolean;
3719
+ uniqueIds(): never[];
3720
+ setUniqueIds(): void;
3721
+ });
3722
+ freshTimestamp: (() => Date) & (() => Date);
3723
+ freshTimestampString: (() => string) & (() => any);
3724
+ fromDateTime: ((value: Date | number | null) => string) & ((value: string) => string);
3725
+ useSoftDeletes: () => boolean;
3726
+ toData: () => any;
3727
+ attributesToData: (() => any) & (() => {
3728
+ [x: string]: any;
3729
+ });
3730
+ relationsToData: () => any;
3731
+ toJSON: () => any;
3732
+ toJson: () => string;
3733
+ toString: () => string;
3734
+ isDirty: ((attributes?: string | string[]) => boolean) & ((...attributes: string[]) => boolean);
3735
+ getDirty: (() => string[]) & (() => TGeneric);
3736
+ save: (options?: any) => Promise<boolean>;
3737
+ update: (attributes?: any, options?: any) => Promise<boolean>;
3738
+ increment: (column: string, amount?: number, extra?: any) => Promise<boolean>;
3739
+ decrement: (column: string, amount?: number, extra?: any) => Promise<boolean>;
3740
+ serializeDate: ((date: any) => string) & ((date?: Date | string | null) => string | null);
3741
+ delete: (options?: any) => Promise<boolean>;
3742
+ softDelete: (options?: any) => Promise<boolean>;
3743
+ forceDelete: (options?: any) => Promise<boolean>;
3744
+ restore: (options?: any) => Promise<boolean>;
3745
+ fresh: () => Promise<(new () => IModel) & IModel & {
3746
+ [x: string]: any;
3747
+ timestamps: boolean;
3748
+ dateFormat: string;
3749
+ usesTimestamps(): boolean;
3750
+ updateTimestamps(): /*elided*/any;
3751
+ getCreatedAtColumn(): any;
3752
+ getUpdatedAtColumn(): any;
3753
+ setCreatedAt(value: any): /*elided*/any;
3754
+ setUpdatedAt(value: any): /*elided*/any;
3755
+ freshTimestamp(): Date;
3756
+ freshTimestampString(): any;
3757
+ } & TGeneric<any, string> & {
3758
+ [x: string]: any;
3759
+ attributes: TGeneric;
3760
+ original: TGeneric;
3761
+ casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
3762
+ changes: TGeneric;
3763
+ appends: any[];
3764
+ setAppends(appends: any[]): /*elided*/any;
3765
+ append(...keys: any[]): /*elided*/any;
3766
+ normalizeCastClassResponse(key: string, value: string): TGeneric;
3767
+ syncOriginal(): /*elided*/any;
3768
+ syncChanges(): /*elided*/any;
3769
+ syncOriginalAttribute(attribute: string): void;
3770
+ syncOriginalAttributes(...attributes: string[]): /*elided*/any;
3771
+ isDirty(...attributes: string[]): boolean;
3772
+ getDirty(): TGeneric;
3773
+ originalIsEquivalent(key: string): boolean;
3774
+ setAttributes(attributes: TGeneric): void;
3775
+ setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
3776
+ getAttributes(): {
3777
+ [x: string]: any;
3778
+ };
3779
+ setAttribute(key: string, value: string): /*elided*/any;
3780
+ getAttribute(key: string): any;
3781
+ castAttribute(key: string, value: string): any;
3782
+ attributesToData(): {
3783
+ [x: string]: any;
3784
+ };
3785
+ mutateAttribute(key: string, value: string | null): any;
3786
+ mutateAttributeForArray(_key: string, _value: string): void;
3787
+ isDateAttribute(key: string): boolean;
3788
+ serializeDate(date?: Date | string | null): string | null;
3789
+ getDates(): any[];
3790
+ getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
3791
+ getCastType(key: string): any;
3792
+ hasCast(key: string, types?: readonly string[]): boolean;
3793
+ withDayjs(date: string): dayjs0.Dayjs;
3794
+ isCustomCast(cast: any): boolean;
3795
+ isCustomDateTimeCast(cast: any): boolean;
3796
+ isDecimalCast(cast: any): boolean;
3797
+ isDateCastable(key: string): boolean;
3798
+ fromDateTime(value: string): string;
3799
+ getDateFormat(): any;
3800
+ asDecimal(value: string, decimals: number): string;
3801
+ asDateTime(value: any): Date | null;
3802
+ asDate(value: string): Date;
3803
+ } & {
3804
+ [x: string]: any;
3805
+ hidden: any[];
3806
+ visible: any[];
3807
+ makeVisible(...keys: string[]): /*elided*/any;
3808
+ makeHidden(key: string[], ...keys: string[]): /*elided*/any;
3809
+ getHidden(): any[];
3810
+ getVisible(): any[];
3811
+ setHidden(hidden: any[]): /*elided*/any;
3812
+ setVisible(visible: any[]): /*elided*/any;
3813
+ } & {
3814
+ [x: string]: any;
3815
+ execHooks(hook: any, options: TGeneric): Promise<any>;
3816
+ } & {
3817
+ [x: string]: any;
3818
+ getGlobalScopes(): {};
3819
+ } & {
3820
+ [x: string]: any;
3821
+ useUniqueIds: boolean;
3822
+ usesUniqueIds(): boolean;
3823
+ uniqueIds(): never[];
3824
+ setUniqueIds(): void;
3825
+ }>;
3826
+ refresh: () => Promise<((new () => IModel) & IModel & {
3827
+ [x: string]: any;
3828
+ timestamps: boolean;
3829
+ dateFormat: string;
3830
+ usesTimestamps(): boolean;
3831
+ updateTimestamps(): /*elided*/any;
3832
+ getCreatedAtColumn(): any;
3833
+ getUpdatedAtColumn(): any;
3834
+ setCreatedAt(value: any): /*elided*/any;
3835
+ setUpdatedAt(value: any): /*elided*/any;
3836
+ freshTimestamp(): Date;
3837
+ freshTimestampString(): any;
3838
+ } & TGeneric<any, string> & {
3839
+ [x: string]: any;
3840
+ attributes: TGeneric;
3841
+ original: TGeneric;
3842
+ casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
3843
+ changes: TGeneric;
3844
+ appends: any[];
3845
+ setAppends(appends: any[]): /*elided*/any;
3846
+ append(...keys: any[]): /*elided*/any;
3847
+ normalizeCastClassResponse(key: string, value: string): TGeneric;
3848
+ syncOriginal(): /*elided*/any;
3849
+ syncChanges(): /*elided*/any;
3850
+ syncOriginalAttribute(attribute: string): void;
3851
+ syncOriginalAttributes(...attributes: string[]): /*elided*/any;
3852
+ isDirty(...attributes: string[]): boolean;
3853
+ getDirty(): TGeneric;
3854
+ originalIsEquivalent(key: string): boolean;
3855
+ setAttributes(attributes: TGeneric): void;
3856
+ setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
3857
+ getAttributes(): {
3858
+ [x: string]: any;
3859
+ };
3860
+ setAttribute(key: string, value: string): /*elided*/any;
3861
+ getAttribute(key: string): any;
3862
+ castAttribute(key: string, value: string): any;
3863
+ attributesToData(): {
3864
+ [x: string]: any;
3865
+ };
3866
+ mutateAttribute(key: string, value: string | null): any;
3867
+ mutateAttributeForArray(_key: string, _value: string): void;
3868
+ isDateAttribute(key: string): boolean;
3869
+ serializeDate(date?: Date | string | null): string | null;
3870
+ getDates(): any[];
3871
+ getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
3872
+ getCastType(key: string): any;
3873
+ hasCast(key: string, types?: readonly string[]): boolean;
3874
+ withDayjs(date: string): dayjs0.Dayjs;
3875
+ isCustomCast(cast: any): boolean;
3876
+ isCustomDateTimeCast(cast: any): boolean;
3877
+ isDecimalCast(cast: any): boolean;
3878
+ isDateCastable(key: string): boolean;
3879
+ fromDateTime(value: string): string;
3880
+ getDateFormat(): any;
3881
+ asDecimal(value: string, decimals: number): string;
3882
+ asDateTime(value: any): Date | null;
3883
+ asDate(value: string): Date;
3884
+ } & {
3885
+ [x: string]: any;
3886
+ hidden: any[];
3887
+ visible: any[];
3888
+ makeVisible(...keys: string[]): /*elided*/any;
3889
+ makeHidden(key: string[], ...keys: string[]): /*elided*/any;
3890
+ getHidden(): any[];
3891
+ getVisible(): any[];
3892
+ setHidden(hidden: any[]): /*elided*/any;
3893
+ setVisible(visible: any[]): /*elided*/any;
3894
+ } & {
3895
+ [x: string]: any;
3896
+ execHooks(hook: any, options: TGeneric): Promise<any>;
3897
+ } & {
3898
+ [x: string]: any;
3899
+ getGlobalScopes(): {};
3900
+ } & {
3901
+ [x: string]: any;
3902
+ useUniqueIds: boolean;
3903
+ usesUniqueIds(): boolean;
3904
+ uniqueIds(): never[];
3905
+ setUniqueIds(): void;
3906
+ }) | undefined>;
3907
+ push: () => Promise<boolean>;
3908
+ is: (model: (new () => IModel) & IModel & {
3909
+ [x: string]: any;
3910
+ timestamps: boolean;
3911
+ dateFormat: string;
3912
+ usesTimestamps(): boolean;
3913
+ updateTimestamps(): /*elided*/any;
3914
+ getCreatedAtColumn(): any;
3915
+ getUpdatedAtColumn(): any;
3916
+ setCreatedAt(value: any): /*elided*/any;
3917
+ setUpdatedAt(value: any): /*elided*/any;
3918
+ freshTimestamp(): Date;
3919
+ freshTimestampString(): any;
3920
+ } & TGeneric<any, string> & {
3921
+ [x: string]: any;
3922
+ attributes: TGeneric;
3923
+ original: TGeneric;
3924
+ casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
3925
+ changes: TGeneric;
3926
+ appends: any[];
3927
+ setAppends(appends: any[]): /*elided*/any;
3928
+ append(...keys: any[]): /*elided*/any;
3929
+ normalizeCastClassResponse(key: string, value: string): TGeneric;
3930
+ syncOriginal(): /*elided*/any;
3931
+ syncChanges(): /*elided*/any;
3932
+ syncOriginalAttribute(attribute: string): void;
3933
+ syncOriginalAttributes(...attributes: string[]): /*elided*/any;
3934
+ isDirty(...attributes: string[]): boolean;
3935
+ getDirty(): TGeneric;
3936
+ originalIsEquivalent(key: string): boolean;
3937
+ setAttributes(attributes: TGeneric): void;
3938
+ setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
3939
+ getAttributes(): {
3940
+ [x: string]: any;
3941
+ };
3942
+ setAttribute(key: string, value: string): /*elided*/any;
3943
+ getAttribute(key: string): any;
3944
+ castAttribute(key: string, value: string): any;
3945
+ attributesToData(): {
3946
+ [x: string]: any;
3947
+ };
3948
+ mutateAttribute(key: string, value: string | null): any;
3949
+ mutateAttributeForArray(_key: string, _value: string): void;
3950
+ isDateAttribute(key: string): boolean;
3951
+ serializeDate(date?: Date | string | null): string | null;
3952
+ getDates(): any[];
3953
+ getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
3954
+ getCastType(key: string): any;
3955
+ hasCast(key: string, types?: readonly string[]): boolean;
3956
+ withDayjs(date: string): dayjs0.Dayjs;
3957
+ isCustomCast(cast: any): boolean;
3958
+ isCustomDateTimeCast(cast: any): boolean;
3959
+ isDecimalCast(cast: any): boolean;
3960
+ isDateCastable(key: string): boolean;
3961
+ fromDateTime(value: string): string;
3962
+ getDateFormat(): any;
3963
+ asDecimal(value: string, decimals: number): string;
3964
+ asDateTime(value: any): Date | null;
3965
+ asDate(value: string): Date;
3966
+ } & {
3967
+ [x: string]: any;
3968
+ hidden: any[];
3969
+ visible: any[];
3970
+ makeVisible(...keys: string[]): /*elided*/any;
3971
+ makeHidden(key: string[], ...keys: string[]): /*elided*/any;
3972
+ getHidden(): any[];
3973
+ getVisible(): any[];
3974
+ setHidden(hidden: any[]): /*elided*/any;
3975
+ setVisible(visible: any[]): /*elided*/any;
3976
+ } & {
3977
+ [x: string]: any;
3978
+ execHooks(hook: any, options: TGeneric): Promise<any>;
3979
+ } & {
3980
+ [x: string]: any;
3981
+ getGlobalScopes(): {};
3982
+ } & {
3983
+ [x: string]: any;
3984
+ useUniqueIds: boolean;
3985
+ usesUniqueIds(): boolean;
3986
+ uniqueIds(): never[];
3987
+ setUniqueIds(): void;
3988
+ }) => boolean;
3989
+ isNot: (model: (new () => IModel) & IModel & {
3990
+ [x: string]: any;
3991
+ timestamps: boolean;
3992
+ dateFormat: string;
3993
+ usesTimestamps(): boolean;
3994
+ updateTimestamps(): /*elided*/any;
3995
+ getCreatedAtColumn(): any;
3996
+ getUpdatedAtColumn(): any;
3997
+ setCreatedAt(value: any): /*elided*/any;
3998
+ setUpdatedAt(value: any): /*elided*/any;
3999
+ freshTimestamp(): Date;
4000
+ freshTimestampString(): any;
4001
+ } & TGeneric<any, string> & {
4002
+ [x: string]: any;
4003
+ attributes: TGeneric;
4004
+ original: TGeneric;
4005
+ casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
4006
+ changes: TGeneric;
4007
+ appends: any[];
4008
+ setAppends(appends: any[]): /*elided*/any;
4009
+ append(...keys: any[]): /*elided*/any;
4010
+ normalizeCastClassResponse(key: string, value: string): TGeneric;
4011
+ syncOriginal(): /*elided*/any;
4012
+ syncChanges(): /*elided*/any;
4013
+ syncOriginalAttribute(attribute: string): void;
4014
+ syncOriginalAttributes(...attributes: string[]): /*elided*/any;
4015
+ isDirty(...attributes: string[]): boolean;
4016
+ getDirty(): TGeneric;
4017
+ originalIsEquivalent(key: string): boolean;
4018
+ setAttributes(attributes: TGeneric): void;
4019
+ setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
4020
+ getAttributes(): {
4021
+ [x: string]: any;
4022
+ };
4023
+ setAttribute(key: string, value: string): /*elided*/any;
4024
+ getAttribute(key: string): any;
4025
+ castAttribute(key: string, value: string): any;
4026
+ attributesToData(): {
4027
+ [x: string]: any;
4028
+ };
4029
+ mutateAttribute(key: string, value: string | null): any;
4030
+ mutateAttributeForArray(_key: string, _value: string): void;
4031
+ isDateAttribute(key: string): boolean;
4032
+ serializeDate(date?: Date | string | null): string | null;
4033
+ getDates(): any[];
4034
+ getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
4035
+ getCastType(key: string): any;
4036
+ hasCast(key: string, types?: readonly string[]): boolean;
4037
+ withDayjs(date: string): dayjs0.Dayjs;
4038
+ isCustomCast(cast: any): boolean;
4039
+ isCustomDateTimeCast(cast: any): boolean;
4040
+ isDecimalCast(cast: any): boolean;
4041
+ isDateCastable(key: string): boolean;
4042
+ fromDateTime(value: string): string;
4043
+ getDateFormat(): any;
4044
+ asDecimal(value: string, decimals: number): string;
4045
+ asDateTime(value: any): Date | null;
4046
+ asDate(value: string): Date;
4047
+ } & {
4048
+ [x: string]: any;
4049
+ hidden: any[];
4050
+ visible: any[];
4051
+ makeVisible(...keys: string[]): /*elided*/any;
4052
+ makeHidden(key: string[], ...keys: string[]): /*elided*/any;
4053
+ getHidden(): any[];
4054
+ getVisible(): any[];
4055
+ setHidden(hidden: any[]): /*elided*/any;
4056
+ setVisible(visible: any[]): /*elided*/any;
4057
+ } & {
4058
+ [x: string]: any;
4059
+ execHooks(hook: any, options: TGeneric): Promise<any>;
4060
+ } & {
4061
+ [x: string]: any;
4062
+ getGlobalScopes(): {};
4063
+ } & {
4064
+ [x: string]: any;
4065
+ useUniqueIds: boolean;
4066
+ usesUniqueIds(): boolean;
4067
+ uniqueIds(): never[];
4068
+ setUniqueIds(): void;
4069
+ }) => boolean;
4070
+ related: <T extends never>(relation: T) => ReturnTypeOfMethod<(new () => IModel) & IModel & {
4071
+ [x: string]: any;
4072
+ timestamps: boolean;
4073
+ dateFormat: string;
4074
+ usesTimestamps(): boolean;
4075
+ updateTimestamps(): /*elided*/any;
4076
+ getCreatedAtColumn(): any;
4077
+ getUpdatedAtColumn(): any;
4078
+ setCreatedAt(value: any): /*elided*/any;
4079
+ setUpdatedAt(value: any): /*elided*/any;
4080
+ freshTimestamp(): Date;
4081
+ freshTimestampString(): any;
4082
+ } & TGeneric<any, string> & {
4083
+ [x: string]: any;
4084
+ attributes: TGeneric;
4085
+ original: TGeneric;
4086
+ casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
4087
+ changes: TGeneric;
4088
+ appends: any[];
4089
+ setAppends(appends: any[]): /*elided*/any;
4090
+ append(...keys: any[]): /*elided*/any;
4091
+ normalizeCastClassResponse(key: string, value: string): TGeneric;
4092
+ syncOriginal(): /*elided*/any;
4093
+ syncChanges(): /*elided*/any;
4094
+ syncOriginalAttribute(attribute: string): void;
4095
+ syncOriginalAttributes(...attributes: string[]): /*elided*/any;
4096
+ isDirty(...attributes: string[]): boolean;
4097
+ getDirty(): TGeneric;
4098
+ originalIsEquivalent(key: string): boolean;
4099
+ setAttributes(attributes: TGeneric): void;
4100
+ setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
4101
+ getAttributes(): {
4102
+ [x: string]: any;
4103
+ };
4104
+ setAttribute(key: string, value: string): /*elided*/any;
4105
+ getAttribute(key: string): any;
4106
+ castAttribute(key: string, value: string): any;
4107
+ attributesToData(): {
4108
+ [x: string]: any;
4109
+ };
4110
+ mutateAttribute(key: string, value: string | null): any;
4111
+ mutateAttributeForArray(_key: string, _value: string): void;
4112
+ isDateAttribute(key: string): boolean;
4113
+ serializeDate(date?: Date | string | null): string | null;
4114
+ getDates(): any[];
4115
+ getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
4116
+ getCastType(key: string): any;
4117
+ hasCast(key: string, types?: readonly string[]): boolean;
4118
+ withDayjs(date: string): dayjs0.Dayjs;
4119
+ isCustomCast(cast: any): boolean;
4120
+ isCustomDateTimeCast(cast: any): boolean;
4121
+ isDecimalCast(cast: any): boolean;
4122
+ isDateCastable(key: string): boolean;
4123
+ fromDateTime(value: string): string;
4124
+ getDateFormat(): any;
4125
+ asDecimal(value: string, decimals: number): string;
4126
+ asDateTime(value: any): Date | null;
4127
+ asDate(value: string): Date;
4128
+ } & {
4129
+ [x: string]: any;
4130
+ hidden: any[];
4131
+ visible: any[];
4132
+ makeVisible(...keys: string[]): /*elided*/any;
4133
+ makeHidden(key: string[], ...keys: string[]): /*elided*/any;
4134
+ getHidden(): any[];
4135
+ getVisible(): any[];
4136
+ setHidden(hidden: any[]): /*elided*/any;
4137
+ setVisible(visible: any[]): /*elided*/any;
4138
+ } & {
4139
+ [x: string]: any;
4140
+ execHooks(hook: any, options: TGeneric): Promise<any>;
4141
+ } & {
4142
+ [x: string]: any;
4143
+ getGlobalScopes(): {};
4144
+ } & {
4145
+ [x: string]: any;
4146
+ useUniqueIds: boolean;
4147
+ usesUniqueIds(): boolean;
4148
+ uniqueIds(): never[];
4149
+ setUniqueIds(): void;
4150
+ }, `relation${Capitalize<SnakeToCamelCase<T>>}`>;
4151
+ getRelated: <T extends never>(relation: T) => ReturnTypeOfMethod<ReturnTypeOfMethod<(new () => IModel) & IModel & {
4152
+ [x: string]: any;
4153
+ timestamps: boolean;
4154
+ dateFormat: string;
4155
+ usesTimestamps(): boolean;
4156
+ updateTimestamps(): /*elided*/any;
4157
+ getCreatedAtColumn(): any;
4158
+ getUpdatedAtColumn(): any;
4159
+ setCreatedAt(value: any): /*elided*/any;
4160
+ setUpdatedAt(value: any): /*elided*/any;
4161
+ freshTimestamp(): Date;
4162
+ freshTimestampString(): any;
4163
+ } & TGeneric<any, string> & {
4164
+ [x: string]: any;
4165
+ attributes: TGeneric;
4166
+ original: TGeneric;
4167
+ casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
4168
+ changes: TGeneric;
4169
+ appends: any[];
4170
+ setAppends(appends: any[]): /*elided*/any;
4171
+ append(...keys: any[]): /*elided*/any;
4172
+ normalizeCastClassResponse(key: string, value: string): TGeneric;
4173
+ syncOriginal(): /*elided*/any;
4174
+ syncChanges(): /*elided*/any;
4175
+ syncOriginalAttribute(attribute: string): void;
4176
+ syncOriginalAttributes(...attributes: string[]): /*elided*/any;
4177
+ isDirty(...attributes: string[]): boolean;
4178
+ getDirty(): TGeneric;
4179
+ originalIsEquivalent(key: string): boolean;
4180
+ setAttributes(attributes: TGeneric): void;
4181
+ setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
4182
+ getAttributes(): {
4183
+ [x: string]: any;
4184
+ };
4185
+ setAttribute(key: string, value: string): /*elided*/any;
4186
+ getAttribute(key: string): any;
4187
+ castAttribute(key: string, value: string): any;
4188
+ attributesToData(): {
4189
+ [x: string]: any;
4190
+ };
4191
+ mutateAttribute(key: string, value: string | null): any;
4192
+ mutateAttributeForArray(_key: string, _value: string): void;
4193
+ isDateAttribute(key: string): boolean;
4194
+ serializeDate(date?: Date | string | null): string | null;
4195
+ getDates(): any[];
4196
+ getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
4197
+ getCastType(key: string): any;
4198
+ hasCast(key: string, types?: readonly string[]): boolean;
4199
+ withDayjs(date: string): dayjs0.Dayjs;
4200
+ isCustomCast(cast: any): boolean;
4201
+ isCustomDateTimeCast(cast: any): boolean;
4202
+ isDecimalCast(cast: any): boolean;
4203
+ isDateCastable(key: string): boolean;
4204
+ fromDateTime(value: string): string;
4205
+ getDateFormat(): any;
4206
+ asDecimal(value: string, decimals: number): string;
4207
+ asDateTime(value: any): Date | null;
4208
+ asDate(value: string): Date;
4209
+ } & {
4210
+ [x: string]: any;
4211
+ hidden: any[];
4212
+ visible: any[];
4213
+ makeVisible(...keys: string[]): /*elided*/any;
4214
+ makeHidden(key: string[], ...keys: string[]): /*elided*/any;
4215
+ getHidden(): any[];
4216
+ getVisible(): any[];
4217
+ setHidden(hidden: any[]): /*elided*/any;
4218
+ setVisible(visible: any[]): /*elided*/any;
4219
+ } & {
4220
+ [x: string]: any;
4221
+ execHooks(hook: any, options: TGeneric): Promise<any>;
4222
+ } & {
4223
+ [x: string]: any;
4224
+ getGlobalScopes(): {};
4225
+ } & {
4226
+ [x: string]: any;
4227
+ useUniqueIds: boolean;
4228
+ usesUniqueIds(): boolean;
4229
+ uniqueIds(): never[];
4230
+ setUniqueIds(): void;
4231
+ }, `relation${Capitalize<SnakeToCamelCase<T>>}`>, any>;
4232
+ hasOne: <T extends Model$1>(model: new () => T, foreignKey?: string, localKey?: string) => HasOne<T>;
4233
+ hasMany: <T extends Model$1>(model: new () => T, foreignKey?: string, localKey?: string) => HasMany<T>;
4234
+ belongsTo: <T extends Model$1>(model: new () => T, foreignKey?: string, ownerKey?: string, relation?: string) => BelongsTo<T>;
4235
+ belongsToMany: <T extends Model$1>(model: new () => T, table?: string, foreignPivotKey?: string, relatedPivotKey?: string, parentKey?: string, relatedKey?: string) => BelongsToMany<T>;
4236
+ original: TGeneric;
4237
+ casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
4238
+ changes: TGeneric;
4239
+ appends: any[];
4240
+ normalizeCastClassResponse: (key: string, value: string) => TGeneric;
4241
+ syncOriginal: () => (new () => IModel) & IModel & {
4242
+ [x: string]: any;
4243
+ timestamps: boolean;
4244
+ dateFormat: string;
4245
+ usesTimestamps(): boolean;
4246
+ updateTimestamps(): /*elided*/any;
4247
+ getCreatedAtColumn(): any;
4248
+ getUpdatedAtColumn(): any;
4249
+ setCreatedAt(value: any): /*elided*/any;
4250
+ setUpdatedAt(value: any): /*elided*/any;
4251
+ freshTimestamp(): Date;
4252
+ freshTimestampString(): any;
4253
+ } & TGeneric<any, string> & {
4254
+ [x: string]: any;
4255
+ attributes: TGeneric;
4256
+ original: TGeneric;
4257
+ casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
4258
+ changes: TGeneric;
4259
+ appends: any[];
4260
+ setAppends(appends: any[]): /*elided*/any;
4261
+ append(...keys: any[]): /*elided*/any;
4262
+ normalizeCastClassResponse(key: string, value: string): TGeneric;
4263
+ syncOriginal(): /*elided*/any;
4264
+ syncChanges(): /*elided*/any;
4265
+ syncOriginalAttribute(attribute: string): void;
4266
+ syncOriginalAttributes(...attributes: string[]): /*elided*/any;
4267
+ isDirty(...attributes: string[]): boolean;
4268
+ getDirty(): TGeneric;
4269
+ originalIsEquivalent(key: string): boolean;
4270
+ setAttributes(attributes: TGeneric): void;
4271
+ setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
4272
+ getAttributes(): {
4273
+ [x: string]: any;
4274
+ };
4275
+ setAttribute(key: string, value: string): /*elided*/any;
4276
+ getAttribute(key: string): any;
4277
+ castAttribute(key: string, value: string): any;
4278
+ attributesToData(): {
4279
+ [x: string]: any;
4280
+ };
4281
+ mutateAttribute(key: string, value: string | null): any;
4282
+ mutateAttributeForArray(_key: string, _value: string): void;
4283
+ isDateAttribute(key: string): boolean;
4284
+ serializeDate(date?: Date | string | null): string | null;
4285
+ getDates(): any[];
4286
+ getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
4287
+ getCastType(key: string): any;
4288
+ hasCast(key: string, types?: readonly string[]): boolean;
4289
+ withDayjs(date: string): dayjs0.Dayjs;
4290
+ isCustomCast(cast: any): boolean;
4291
+ isCustomDateTimeCast(cast: any): boolean;
4292
+ isDecimalCast(cast: any): boolean;
4293
+ isDateCastable(key: string): boolean;
4294
+ fromDateTime(value: string): string;
4295
+ getDateFormat(): any;
4296
+ asDecimal(value: string, decimals: number): string;
4297
+ asDateTime(value: any): Date | null;
4298
+ asDate(value: string): Date;
4299
+ } & {
4300
+ [x: string]: any;
4301
+ hidden: any[];
4302
+ visible: any[];
4303
+ makeVisible(...keys: string[]): /*elided*/any;
4304
+ makeHidden(key: string[], ...keys: string[]): /*elided*/any;
4305
+ getHidden(): any[];
4306
+ getVisible(): any[];
4307
+ setHidden(hidden: any[]): /*elided*/any;
4308
+ setVisible(visible: any[]): /*elided*/any;
4309
+ } & {
4310
+ [x: string]: any;
4311
+ execHooks(hook: any, options: TGeneric): Promise<any>;
4312
+ } & {
4313
+ [x: string]: any;
4314
+ getGlobalScopes(): {};
4315
+ } & {
4316
+ [x: string]: any;
4317
+ useUniqueIds: boolean;
4318
+ usesUniqueIds(): boolean;
4319
+ uniqueIds(): never[];
4320
+ setUniqueIds(): void;
4321
+ };
4322
+ syncChanges: () => (new () => IModel) & IModel & {
4323
+ [x: string]: any;
4324
+ timestamps: boolean;
4325
+ dateFormat: string;
4326
+ usesTimestamps(): boolean;
4327
+ updateTimestamps(): /*elided*/any;
4328
+ getCreatedAtColumn(): any;
4329
+ getUpdatedAtColumn(): any;
4330
+ setCreatedAt(value: any): /*elided*/any;
4331
+ setUpdatedAt(value: any): /*elided*/any;
4332
+ freshTimestamp(): Date;
4333
+ freshTimestampString(): any;
4334
+ } & TGeneric<any, string> & {
4335
+ [x: string]: any;
4336
+ attributes: TGeneric;
4337
+ original: TGeneric;
4338
+ casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
4339
+ changes: TGeneric;
4340
+ appends: any[];
4341
+ setAppends(appends: any[]): /*elided*/any;
4342
+ append(...keys: any[]): /*elided*/any;
4343
+ normalizeCastClassResponse(key: string, value: string): TGeneric;
4344
+ syncOriginal(): /*elided*/any;
4345
+ syncChanges(): /*elided*/any;
4346
+ syncOriginalAttribute(attribute: string): void;
4347
+ syncOriginalAttributes(...attributes: string[]): /*elided*/any;
4348
+ isDirty(...attributes: string[]): boolean;
4349
+ getDirty(): TGeneric;
4350
+ originalIsEquivalent(key: string): boolean;
4351
+ setAttributes(attributes: TGeneric): void;
4352
+ setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
4353
+ getAttributes(): {
4354
+ [x: string]: any;
4355
+ };
4356
+ setAttribute(key: string, value: string): /*elided*/any;
4357
+ getAttribute(key: string): any;
4358
+ castAttribute(key: string, value: string): any;
4359
+ attributesToData(): {
4360
+ [x: string]: any;
4361
+ };
4362
+ mutateAttribute(key: string, value: string | null): any;
4363
+ mutateAttributeForArray(_key: string, _value: string): void;
4364
+ isDateAttribute(key: string): boolean;
4365
+ serializeDate(date?: Date | string | null): string | null;
4366
+ getDates(): any[];
4367
+ getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
4368
+ getCastType(key: string): any;
4369
+ hasCast(key: string, types?: readonly string[]): boolean;
4370
+ withDayjs(date: string): dayjs0.Dayjs;
4371
+ isCustomCast(cast: any): boolean;
4372
+ isCustomDateTimeCast(cast: any): boolean;
4373
+ isDecimalCast(cast: any): boolean;
4374
+ isDateCastable(key: string): boolean;
4375
+ fromDateTime(value: string): string;
4376
+ getDateFormat(): any;
4377
+ asDecimal(value: string, decimals: number): string;
4378
+ asDateTime(value: any): Date | null;
4379
+ asDate(value: string): Date;
4380
+ } & {
4381
+ [x: string]: any;
4382
+ hidden: any[];
4383
+ visible: any[];
4384
+ makeVisible(...keys: string[]): /*elided*/any;
4385
+ makeHidden(key: string[], ...keys: string[]): /*elided*/any;
4386
+ getHidden(): any[];
4387
+ getVisible(): any[];
4388
+ setHidden(hidden: any[]): /*elided*/any;
4389
+ setVisible(visible: any[]): /*elided*/any;
4390
+ } & {
4391
+ [x: string]: any;
4392
+ execHooks(hook: any, options: TGeneric): Promise<any>;
4393
+ } & {
4394
+ [x: string]: any;
4395
+ getGlobalScopes(): {};
4396
+ } & {
4397
+ [x: string]: any;
4398
+ useUniqueIds: boolean;
4399
+ usesUniqueIds(): boolean;
4400
+ uniqueIds(): never[];
4401
+ setUniqueIds(): void;
4402
+ };
4403
+ syncOriginalAttribute: (attribute: string) => void;
4404
+ syncOriginalAttributes: (...attributes: string[]) => (new () => IModel) & IModel & {
4405
+ [x: string]: any;
4406
+ timestamps: boolean;
4407
+ dateFormat: string;
4408
+ usesTimestamps(): boolean;
4409
+ updateTimestamps(): /*elided*/any;
4410
+ getCreatedAtColumn(): any;
4411
+ getUpdatedAtColumn(): any;
4412
+ setCreatedAt(value: any): /*elided*/any;
4413
+ setUpdatedAt(value: any): /*elided*/any;
4414
+ freshTimestamp(): Date;
4415
+ freshTimestampString(): any;
4416
+ } & TGeneric<any, string> & {
4417
+ [x: string]: any;
4418
+ attributes: TGeneric;
4419
+ original: TGeneric;
4420
+ casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
4421
+ changes: TGeneric;
4422
+ appends: any[];
4423
+ setAppends(appends: any[]): /*elided*/any;
4424
+ append(...keys: any[]): /*elided*/any;
4425
+ normalizeCastClassResponse(key: string, value: string): TGeneric;
4426
+ syncOriginal(): /*elided*/any;
4427
+ syncChanges(): /*elided*/any;
4428
+ syncOriginalAttribute(attribute: string): void;
4429
+ syncOriginalAttributes(...attributes: string[]): /*elided*/any;
4430
+ isDirty(...attributes: string[]): boolean;
4431
+ getDirty(): TGeneric;
4432
+ originalIsEquivalent(key: string): boolean;
4433
+ setAttributes(attributes: TGeneric): void;
4434
+ setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
4435
+ getAttributes(): {
4436
+ [x: string]: any;
4437
+ };
4438
+ setAttribute(key: string, value: string): /*elided*/any;
4439
+ getAttribute(key: string): any;
4440
+ castAttribute(key: string, value: string): any;
4441
+ attributesToData(): {
4442
+ [x: string]: any;
4443
+ };
4444
+ mutateAttribute(key: string, value: string | null): any;
4445
+ mutateAttributeForArray(_key: string, _value: string): void;
4446
+ isDateAttribute(key: string): boolean;
4447
+ serializeDate(date?: Date | string | null): string | null;
4448
+ getDates(): any[];
4449
+ getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
4450
+ getCastType(key: string): any;
4451
+ hasCast(key: string, types?: readonly string[]): boolean;
4452
+ withDayjs(date: string): dayjs0.Dayjs;
4453
+ isCustomCast(cast: any): boolean;
4454
+ isCustomDateTimeCast(cast: any): boolean;
4455
+ isDecimalCast(cast: any): boolean;
4456
+ isDateCastable(key: string): boolean;
4457
+ fromDateTime(value: string): string;
4458
+ getDateFormat(): any;
4459
+ asDecimal(value: string, decimals: number): string;
4460
+ asDateTime(value: any): Date | null;
4461
+ asDate(value: string): Date;
4462
+ } & {
4463
+ [x: string]: any;
4464
+ hidden: any[];
4465
+ visible: any[];
4466
+ makeVisible(...keys: string[]): /*elided*/any;
4467
+ makeHidden(key: string[], ...keys: string[]): /*elided*/any;
4468
+ getHidden(): any[];
4469
+ getVisible(): any[];
4470
+ setHidden(hidden: any[]): /*elided*/any;
4471
+ setVisible(visible: any[]): /*elided*/any;
4472
+ } & {
4473
+ [x: string]: any;
4474
+ execHooks(hook: any, options: TGeneric): Promise<any>;
4475
+ } & {
4476
+ [x: string]: any;
4477
+ getGlobalScopes(): {};
4478
+ } & {
4479
+ [x: string]: any;
4480
+ useUniqueIds: boolean;
4481
+ usesUniqueIds(): boolean;
4482
+ uniqueIds(): never[];
4483
+ setUniqueIds(): void;
4484
+ };
4485
+ originalIsEquivalent: (key: string) => boolean;
4486
+ setAttributes: (attributes: TGeneric) => void;
4487
+ setRawAttributes: (attributes: TGeneric, sync?: boolean) => (new () => IModel) & IModel & {
4488
+ [x: string]: any;
4489
+ timestamps: boolean;
4490
+ dateFormat: string;
4491
+ usesTimestamps(): boolean;
4492
+ updateTimestamps(): /*elided*/any;
4493
+ getCreatedAtColumn(): any;
4494
+ getUpdatedAtColumn(): any;
4495
+ setCreatedAt(value: any): /*elided*/any;
4496
+ setUpdatedAt(value: any): /*elided*/any;
4497
+ freshTimestamp(): Date;
4498
+ freshTimestampString(): any;
4499
+ } & TGeneric<any, string> & {
4500
+ [x: string]: any;
4501
+ attributes: TGeneric;
4502
+ original: TGeneric;
4503
+ casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
4504
+ changes: TGeneric;
4505
+ appends: any[];
4506
+ setAppends(appends: any[]): /*elided*/any;
4507
+ append(...keys: any[]): /*elided*/any;
4508
+ normalizeCastClassResponse(key: string, value: string): TGeneric;
4509
+ syncOriginal(): /*elided*/any;
4510
+ syncChanges(): /*elided*/any;
4511
+ syncOriginalAttribute(attribute: string): void;
4512
+ syncOriginalAttributes(...attributes: string[]): /*elided*/any;
4513
+ isDirty(...attributes: string[]): boolean;
4514
+ getDirty(): TGeneric;
4515
+ originalIsEquivalent(key: string): boolean;
4516
+ setAttributes(attributes: TGeneric): void;
4517
+ setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
4518
+ getAttributes(): {
4519
+ [x: string]: any;
4520
+ };
4521
+ setAttribute(key: string, value: string): /*elided*/any;
4522
+ getAttribute(key: string): any;
4523
+ castAttribute(key: string, value: string): any;
4524
+ attributesToData(): {
4525
+ [x: string]: any;
4526
+ };
4527
+ mutateAttribute(key: string, value: string | null): any;
4528
+ mutateAttributeForArray(_key: string, _value: string): void;
4529
+ isDateAttribute(key: string): boolean;
4530
+ serializeDate(date?: Date | string | null): string | null;
4531
+ getDates(): any[];
4532
+ getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
4533
+ getCastType(key: string): any;
4534
+ hasCast(key: string, types?: readonly string[]): boolean;
4535
+ withDayjs(date: string): dayjs0.Dayjs;
4536
+ isCustomCast(cast: any): boolean;
4537
+ isCustomDateTimeCast(cast: any): boolean;
4538
+ isDecimalCast(cast: any): boolean;
4539
+ isDateCastable(key: string): boolean;
4540
+ fromDateTime(value: string): string;
4541
+ getDateFormat(): any;
4542
+ asDecimal(value: string, decimals: number): string;
4543
+ asDateTime(value: any): Date | null;
4544
+ asDate(value: string): Date;
4545
+ } & {
4546
+ [x: string]: any;
4547
+ hidden: any[];
4548
+ visible: any[];
4549
+ makeVisible(...keys: string[]): /*elided*/any;
4550
+ makeHidden(key: string[], ...keys: string[]): /*elided*/any;
4551
+ getHidden(): any[];
4552
+ getVisible(): any[];
4553
+ setHidden(hidden: any[]): /*elided*/any;
4554
+ setVisible(visible: any[]): /*elided*/any;
4555
+ } & {
4556
+ [x: string]: any;
4557
+ execHooks(hook: any, options: TGeneric): Promise<any>;
4558
+ } & {
4559
+ [x: string]: any;
4560
+ getGlobalScopes(): {};
4561
+ } & {
4562
+ [x: string]: any;
4563
+ useUniqueIds: boolean;
4564
+ usesUniqueIds(): boolean;
4565
+ uniqueIds(): never[];
4566
+ setUniqueIds(): void;
4567
+ };
4568
+ castAttribute: (key: string, value: string) => any;
4569
+ mutateAttribute: (key: string, value: string | null) => any;
4570
+ mutateAttributeForArray: (_key: string, _value: string) => void;
4571
+ isDateAttribute: (key: string) => boolean;
4572
+ getCasts: () => TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
4573
+ getCastType: (key: string) => any;
4574
+ hasCast: (key: string, types?: readonly string[]) => boolean;
4575
+ withDayjs: (date: string) => dayjs0.Dayjs;
4576
+ isCustomCast: (cast: any) => boolean;
4577
+ isCustomDateTimeCast: (cast: any) => boolean;
4578
+ isDecimalCast: (cast: any) => boolean;
4579
+ isDateCastable: (key: string) => boolean;
4580
+ asDecimal: (value: string, decimals: number) => string;
4581
+ asDateTime: (value: any) => Date | null;
4582
+ asDate: (value: string) => Date;
4583
+ getHidden: () => any[];
4584
+ getVisible: () => any[];
4585
+ setHidden: (hidden: any[]) => (new () => IModel) & IModel & {
4586
+ [x: string]: any;
4587
+ timestamps: boolean;
4588
+ dateFormat: string;
4589
+ usesTimestamps(): boolean;
4590
+ updateTimestamps(): /*elided*/any;
4591
+ getCreatedAtColumn(): any;
4592
+ getUpdatedAtColumn(): any;
4593
+ setCreatedAt(value: any): /*elided*/any;
4594
+ setUpdatedAt(value: any): /*elided*/any;
4595
+ freshTimestamp(): Date;
4596
+ freshTimestampString(): any;
4597
+ } & TGeneric<any, string> & {
4598
+ [x: string]: any;
4599
+ attributes: TGeneric;
4600
+ original: TGeneric;
4601
+ casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
4602
+ changes: TGeneric;
4603
+ appends: any[];
4604
+ setAppends(appends: any[]): /*elided*/any;
4605
+ append(...keys: any[]): /*elided*/any;
4606
+ normalizeCastClassResponse(key: string, value: string): TGeneric;
4607
+ syncOriginal(): /*elided*/any;
4608
+ syncChanges(): /*elided*/any;
4609
+ syncOriginalAttribute(attribute: string): void;
4610
+ syncOriginalAttributes(...attributes: string[]): /*elided*/any;
4611
+ isDirty(...attributes: string[]): boolean;
4612
+ getDirty(): TGeneric;
4613
+ originalIsEquivalent(key: string): boolean;
4614
+ setAttributes(attributes: TGeneric): void;
4615
+ setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
4616
+ getAttributes(): {
4617
+ [x: string]: any;
4618
+ };
4619
+ setAttribute(key: string, value: string): /*elided*/any;
4620
+ getAttribute(key: string): any;
4621
+ castAttribute(key: string, value: string): any;
4622
+ attributesToData(): {
4623
+ [x: string]: any;
4624
+ };
4625
+ mutateAttribute(key: string, value: string | null): any;
4626
+ mutateAttributeForArray(_key: string, _value: string): void;
4627
+ isDateAttribute(key: string): boolean;
4628
+ serializeDate(date?: Date | string | null): string | null;
4629
+ getDates(): any[];
4630
+ getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
4631
+ getCastType(key: string): any;
4632
+ hasCast(key: string, types?: readonly string[]): boolean;
4633
+ withDayjs(date: string): dayjs0.Dayjs;
4634
+ isCustomCast(cast: any): boolean;
4635
+ isCustomDateTimeCast(cast: any): boolean;
4636
+ isDecimalCast(cast: any): boolean;
4637
+ isDateCastable(key: string): boolean;
4638
+ fromDateTime(value: string): string;
4639
+ getDateFormat(): any;
4640
+ asDecimal(value: string, decimals: number): string;
4641
+ asDateTime(value: any): Date | null;
4642
+ asDate(value: string): Date;
4643
+ } & {
4644
+ [x: string]: any;
4645
+ hidden: any[];
4646
+ visible: any[];
4647
+ makeVisible(...keys: string[]): /*elided*/any;
4648
+ makeHidden(key: string[], ...keys: string[]): /*elided*/any;
4649
+ getHidden(): any[];
4650
+ getVisible(): any[];
4651
+ setHidden(hidden: any[]): /*elided*/any;
4652
+ setVisible(visible: any[]): /*elided*/any;
4653
+ } & {
4654
+ [x: string]: any;
4655
+ execHooks(hook: any, options: TGeneric): Promise<any>;
4656
+ } & {
4657
+ [x: string]: any;
4658
+ getGlobalScopes(): {};
4659
+ } & {
4660
+ [x: string]: any;
4661
+ useUniqueIds: boolean;
4662
+ usesUniqueIds(): boolean;
4663
+ uniqueIds(): never[];
4664
+ setUniqueIds(): void;
4665
+ };
4666
+ setVisible: (visible: any[]) => (new () => IModel) & IModel & {
4667
+ [x: string]: any;
4668
+ timestamps: boolean;
4669
+ dateFormat: string;
4670
+ usesTimestamps(): boolean;
4671
+ updateTimestamps(): /*elided*/any;
4672
+ getCreatedAtColumn(): any;
4673
+ getUpdatedAtColumn(): any;
4674
+ setCreatedAt(value: any): /*elided*/any;
4675
+ setUpdatedAt(value: any): /*elided*/any;
4676
+ freshTimestamp(): Date;
4677
+ freshTimestampString(): any;
4678
+ } & TGeneric<any, string> & {
4679
+ [x: string]: any;
4680
+ attributes: TGeneric;
4681
+ original: TGeneric;
4682
+ casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
4683
+ changes: TGeneric;
4684
+ appends: any[];
4685
+ setAppends(appends: any[]): /*elided*/any;
4686
+ append(...keys: any[]): /*elided*/any;
4687
+ normalizeCastClassResponse(key: string, value: string): TGeneric;
4688
+ syncOriginal(): /*elided*/any;
4689
+ syncChanges(): /*elided*/any;
4690
+ syncOriginalAttribute(attribute: string): void;
4691
+ syncOriginalAttributes(...attributes: string[]): /*elided*/any;
4692
+ isDirty(...attributes: string[]): boolean;
4693
+ getDirty(): TGeneric;
4694
+ originalIsEquivalent(key: string): boolean;
4695
+ setAttributes(attributes: TGeneric): void;
4696
+ setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
4697
+ getAttributes(): {
4698
+ [x: string]: any;
4699
+ };
4700
+ setAttribute(key: string, value: string): /*elided*/any;
4701
+ getAttribute(key: string): any;
4702
+ castAttribute(key: string, value: string): any;
4703
+ attributesToData(): {
4704
+ [x: string]: any;
4705
+ };
4706
+ mutateAttribute(key: string, value: string | null): any;
4707
+ mutateAttributeForArray(_key: string, _value: string): void;
4708
+ isDateAttribute(key: string): boolean;
4709
+ serializeDate(date?: Date | string | null): string | null;
4710
+ getDates(): any[];
4711
+ getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
4712
+ getCastType(key: string): any;
4713
+ hasCast(key: string, types?: readonly string[]): boolean;
4714
+ withDayjs(date: string): dayjs0.Dayjs;
4715
+ isCustomCast(cast: any): boolean;
4716
+ isCustomDateTimeCast(cast: any): boolean;
4717
+ isDecimalCast(cast: any): boolean;
4718
+ isDateCastable(key: string): boolean;
4719
+ fromDateTime(value: string): string;
4720
+ getDateFormat(): any;
4721
+ asDecimal(value: string, decimals: number): string;
4722
+ asDateTime(value: any): Date | null;
4723
+ asDate(value: string): Date;
4724
+ } & {
4725
+ [x: string]: any;
4726
+ hidden: any[];
4727
+ visible: any[];
4728
+ makeVisible(...keys: string[]): /*elided*/any;
4729
+ makeHidden(key: string[], ...keys: string[]): /*elided*/any;
4730
+ getHidden(): any[];
4731
+ getVisible(): any[];
4732
+ setHidden(hidden: any[]): /*elided*/any;
4733
+ setVisible(visible: any[]): /*elided*/any;
4734
+ } & {
4735
+ [x: string]: any;
4736
+ execHooks(hook: any, options: TGeneric): Promise<any>;
4737
+ } & {
4738
+ [x: string]: any;
4739
+ getGlobalScopes(): {};
4740
+ } & {
4741
+ [x: string]: any;
4742
+ useUniqueIds: boolean;
4743
+ usesUniqueIds(): boolean;
4744
+ uniqueIds(): never[];
4745
+ setUniqueIds(): void;
4746
+ };
4747
+ execHooks: (hook: any, options: TGeneric) => Promise<any>;
4748
+ getGlobalScopes: () => {};
4749
+ useUniqueIds: boolean;
1280
4750
  };
1281
4751
  declare class Model$1 extends BaseModel {
1282
- protected primaryKey: string;
4752
+ [key: string]: any;
1283
4753
  protected builder: IBuilder<any, any> | null;
1284
4754
  protected table: string | null;
1285
4755
  protected keyType: string;
1286
4756
  protected incrementing: boolean;
1287
4757
  protected withCount: never[];
4758
+ protected primaryKey: string;
1288
4759
  perPage: number;
1289
4760
  static globalScopes: {};
1290
4761
  static pluginInitializers: {};
@@ -1294,6 +4765,7 @@ declare class Model$1 extends BaseModel {
1294
4765
  eagerLoad: {};
1295
4766
  exists: boolean;
1296
4767
  with: string | string[] | TGeneric<(...args: any[]) => IBuilder<Model$1>>;
4768
+ name: any;
1297
4769
  trx: null;
1298
4770
  constructor(attributes?: {});
1299
4771
  static query(trx?: null): Builder<Model$1, IModel | ICollection<Model$1>>;