@h3ravel/arquebus 0.4.1 → 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.
package/dist/index.d.cts CHANGED
@@ -1,12 +1,12 @@
1
1
  import { Collection as Collection$1 } from "collect.js";
2
2
  import Knex$1, { Knex } from "knex";
3
+ import * as dayjs0 from "dayjs";
3
4
 
4
5
  //#region src/collection.d.ts
5
-
6
6
  declare class Collection<I extends Model$1 | Model$2> extends Collection$1<I> implements ICollection<I> {
7
7
  private newConstructor;
8
8
  getConstructor<T extends typeof Collection<I>>(this: InstanceType<T>): T;
9
- load(...relations: I[]): Promise<Collection<I>>;
9
+ load(...relations: (string[] | I[] | string | I)[]): Promise<Collection<I>>;
10
10
  loadAggregate<I>(relations: I, column: string, action?: string | null | TFunction): Promise<this>;
11
11
  loadCount(relations: I): Promise<this>;
12
12
  loadMax(relation: I, column: string): Promise<this>;
@@ -42,72 +42,6 @@ declare class Collection<I extends Model$1 | Model$2> extends Collection$1<I> im
42
42
  [Symbol.iterator]: () => Iterator<I>;
43
43
  }
44
44
  //#endregion
45
- //#region types/utils.d.ts
46
- interface ICollection<T extends Model$1 | Model$2> extends Collection$1<T> {
47
- items?: T[];
48
- load(...relations: T[]): Promise<ICollection<T>>;
49
- loadAggregate(relations: T | T[], column: string, action?: string | null): Promise<this>;
50
- loadCount(relation: T, column: string): Promise<this>;
51
- loadMax(relation: T, column: string): Promise<this>;
52
- loadMin(relation: T, column: string): Promise<this>;
53
- loadSum(relation: T, column: string): Promise<this>;
54
- loadAvg(relation: T, column: string): Promise<this>;
55
- mapThen(callback: () => void): Promise<any>;
56
- modelKeys(): string[] | number[];
57
- contains(key: IModel | any, operator?: any, value?: any): boolean;
58
- diff(items: ICollection<T> | any[]): ICollection<T>;
59
- except(keys: any[]): ICollection<T>;
60
- intersect(items: T[]): ICollection<T>;
61
- unique(key?: any, strict?: boolean): ICollection<T>;
62
- find(key: any, defaultValue?: any): any;
63
- fresh(withs?: any[]): Promise<ICollection<T>>;
64
- makeVisible(attributes: string | string[]): this;
65
- makeHidden(attributes: string | string[]): this;
66
- append(attributes: string[]): this;
67
- only(keys: null | any[]): this;
68
- getDictionary(items?: any[]): TGeneric;
69
- toQuery(): IBuilder<T, any>;
70
- toData(): any;
71
- toJSON(): any;
72
- toJson(): string;
73
- toString(): string;
74
- [key: string]: any;
75
- [Symbol.iterator]: () => Iterator<T>;
76
- }
77
- interface IPaginatorParams {
78
- current_page: number;
79
- data: any[];
80
- per_page: number;
81
- total: number;
82
- last_page: number;
83
- count: number;
84
- }
85
- interface IPaginator<T extends Model$1 | Model$2, K extends IPaginatorParams = IPaginatorParams> {
86
- formatter?(paginator: IPaginator<any>): any | null;
87
- setFormatter?(formatter: (paginator: IPaginator<any>) => any | null): void;
88
- setItems(items: T[] | Collection<T>): void;
89
- hasMorePages(): boolean;
90
- get(index: number): T | null;
91
- count(): number;
92
- items(): Collection<T>;
93
- map(callback: (value: T, index: number) => T): Collection<T>;
94
- currentPage(): number;
95
- perPage(): number;
96
- lastPage(): number;
97
- firstItem(): number | null;
98
- lastItem(): number | null;
99
- total(): number;
100
- toData<U = K>(): U;
101
- toJSON<U = K>(): U;
102
- toJson(): string;
103
- [Symbol.iterator]?(): {
104
- next: () => {
105
- value: T;
106
- done: boolean;
107
- };
108
- };
109
- }
110
- //#endregion
111
45
  //#region src/paginator.d.ts
112
46
  declare class Paginator<T extends Model$1, K extends IPaginatorParams = IPaginatorParams> implements IPaginator<T, K> {
113
47
  static formatter: (paginator: IPaginator<any>) => any | null;
@@ -118,7 +52,7 @@ declare class Paginator<T extends Model$1, K extends IPaginatorParams = IPaginat
118
52
  _currentPage: number;
119
53
  hasMore: boolean;
120
54
  options: TGeneric;
121
- static setFormatter(formatter: (paginator: IPaginator<any>) => any | null): void;
55
+ static setFormatter(formatter?: ((paginator: IPaginator<any> | null) => any) | null): void;
122
56
  constructor(items: T[], total: number, perPage: number, currentPage?: number, options?: TGeneric);
123
57
  setItems(items: T[]): void;
124
58
  firstItem(): number | null;
@@ -146,7 +80,7 @@ declare class Scope<M extends Model$1 = Model$1> implements IScope {
146
80
  //#endregion
147
81
  //#region src/builder.d.ts
148
82
  declare const Inference$2: {
149
- new <M extends Model$1 = Model$1, R = IModel | ICollection<M>>(): IBuilder<M, R>;
83
+ new <M extends Model$1 | Model$2 = Model$1, R = IModel | ICollection<M>>(): IBuilder<M, R>;
150
84
  };
151
85
  declare class Builder<M extends Model$1 = Model$1, R = IModel | ICollection<M>> extends Inference$2 {
152
86
  query: IBuilder<M, R>;
@@ -238,7 +172,7 @@ declare class Builder<M extends Model$1 = Model$1, R = IModel | ICollection<M>>
238
172
  find(this: any, id: string | number | Collection<M>, columns?: string[]): Promise<any>;
239
173
  findMany(this: any, ids: string[] | number[] | ICollection<any>, columns?: string[]): Promise<any>;
240
174
  pluck(column: string): Promise<any>;
241
- destroy(this: any, ids?: (string | number)[] | TFunction | Collection<M>): Promise<number>;
175
+ destroy(this: any, ids?: string | number | string[] | number[] | TFunction | Collection<M>): Promise<number>;
242
176
  get<M extends Model$1>(columns?: string | string[]): Promise<Collection<M>>;
243
177
  all(columns?: string[]): Promise<any>;
244
178
  paginate(this: any, page?: number, perPage?: number): Promise<Paginator<any, IPaginatorParams>>;
@@ -248,7 +182,7 @@ declare class Builder<M extends Model$1 = Model$1, R = IModel | ICollection<M>>
248
182
  isNestedUnder(relation: string, name: string): boolean;
249
183
  eagerLoadRelation<M extends Model$1>(models: M[], name: string, constraints: any): Promise<any>;
250
184
  eagerLoadRelations<M extends Model$1>(models: M[]): Promise<M[]>;
251
- hydrate(items: any[]): Collection<any>;
185
+ hydrate(items: any[] | ICollection<any>): Collection<any>;
252
186
  }
253
187
  //#endregion
254
188
  //#region src/inspector/types/column.d.ts
@@ -351,17 +285,22 @@ interface IStatement {
351
285
  bool: 'and' | 'or' | 'not';
352
286
  }
353
287
  interface IQueryBuilder<M extends Model$1 | Model$2 = Model$1, R = M[] | M> {
288
+ query: IBuilder<M, R>;
354
289
  schema: SchemaBuilder;
355
290
  _statements: IStatement[];
356
291
  table(name: string): IQueryBuilder<M, R>;
357
292
  select: SelectMethod<this>;
293
+ addSelect: AddSelectMethod<this>;
358
294
  columns: SelectMethod<this>;
359
295
  column: SelectMethod<this>;
360
296
  distinct: SelectMethod<this>;
297
+ returning: ReturningMethod<this>;
361
298
  distinctOn: SelectMethod<this>;
362
299
  as: AsMethod<this>;
363
300
  asProxy(): IQueryBuilder<M, R>;
364
301
  where: WhereMethod<this>;
302
+ firstOrFail: FirstOrFailMethod<this>;
303
+ forceDelete: ForceDeleteMethod;
365
304
  andWhere: WhereMethod<this>;
366
305
  orWhere(...args: any[]): this;
367
306
  whereNot: WhereMethod<this>;
@@ -376,6 +315,7 @@ interface IQueryBuilder<M extends Model$1 | Model$2 = Model$1, R = M[] | M> {
376
315
  orWhereExists: WhereExistsMethod<this>;
377
316
  whereNotExists: WhereExistsMethod<this>;
378
317
  orWhereNotExists: WhereExistsMethod<this>;
318
+ restore: RestoreMethod;
379
319
  whereIn: WhereInMethod<this>;
380
320
  orWhereIn: WhereInMethod<this>;
381
321
  whereNotIn: WhereInMethod<this>;
@@ -473,186 +413,6 @@ interface IQueryBuilder<M extends Model$1 | Model$2 = Model$1, R = M[] | M> {
473
413
  paginate<F extends IPaginatorParams>(page?: number, perPage?: number): Promise<IPaginator<M, F>>;
474
414
  }
475
415
  //#endregion
476
- //#region types/builder.d.ts
477
- interface IScope {
478
- apply(builder: Builder<any>, model: Model$1): void;
479
- }
480
- interface IBuilder<M extends Model$1 | Model$2, R = ICollection<M> | IModel> extends IQueryBuilder<M, R> {
481
- asProxy(): IQueryBuilder<M, R>;
482
- enforceOrderBy(): void;
483
- insert(attributes: any): Promise<any>;
484
- update(attributes: any): Promise<any>;
485
- increment(column: string, amount?: number, extra?: any): Promise<any>;
486
- decrement(column: string, amount?: number, extra?: any): Promise<any>;
487
- addUpdatedAtColumn(values: any): any;
488
- delete(): Promise<boolean | number>;
489
- softDelete(): boolean | Promise<any>;
490
- forceDelete(): boolean | Promise<any>;
491
- restore(): boolean | Promise<any>;
492
- withTrashed(): this;
493
- withoutTrashed(): this;
494
- onlyTrashed(): this;
495
- getDeletedAtColumn(): string;
496
- create(attributes?: any): Promise<M>;
497
- newModelInstance(attributes?: any): M;
498
- count(columns?: string): Promise<number>;
499
- getQuery(): AnyQueryBuilder;
500
- getModel(): M;
501
- setModel(model: M): this;
502
- setTable(table: string): this;
503
- applyScopes(): this;
504
- scopes(scopes: string[]): this;
505
- withGlobalScope(identifier: string | number, scope: string | (() => void)): this;
506
- withoutGlobalScope(scope: IScope | string): this;
507
- with(relation: WithRelationType): this;
508
- with(...relations: WithRelationType[]): this;
509
- has(relation: string, operator?: any, count?: number, boolean?: any, callback?: (builder: IBuilder<any>) => void | null): this;
510
- orHas(relation: string, operator?: any, count?: number): this;
511
- doesntHave(relation: string, boolean?: any, callback?: (builder: IBuilder<any>) => void | null): this;
512
- orDoesntHave(relation: string): this;
513
- whereHas(relation: string, callback?: (builder: IBuilder<any>) => void | IBuilder<any> | null, operator?: any, count?: number): this;
514
- orWhereHas(relation: string, callback?: (builder: IBuilder<any>) => void | IBuilder<any> | null, operator?: any, count?: number): this;
515
- whereRelation(relation: string, column: string, operator?: any, value?: any): this;
516
- hasNested(relation: string, operator?: any, count?: number, boolean?: any, callback?: (builder: IBuilder<any>) => void | null): this;
517
- canUseExistsForExistenceCheck(operator: string, count: number): boolean;
518
- addHasWhere(hasQuery: IBuilder<any>, relation: string, operator?: string, count?: number, boolean?: string): this;
519
- withAggregate(relations: string | string[] | object, column: string, action?: string | null): this;
520
- toSql(): object;
521
- withCount(...relations: WithRelationType[]): this;
522
- withMax(relation: WithRelationType, column: string): this;
523
- withMin(relation: WithRelationType, column: string): this;
524
- withAvg(relation: WithRelationType, column: string): this;
525
- withSum(relation: WithRelationType, column: string): this;
526
- withExists(relation: WithRelationType): this;
527
- related(relation: string): this;
528
- first(column?: string | string[]): Promise<M | null | undefined>;
529
- firstOrFail(column?: string | string[]): Promise<M>;
530
- findOrFail(key: string | number, columns?: string[]): Promise<M>;
531
- findOrFail(key: string[] | number[] | ICollection<any>, columns?: string[]): Promise<M>;
532
- findOrFail(key: string | number | string[] | number[] | ICollection<any>, columns?: string[]): Promise<M>;
533
- findOrNew(id: string | number, columns?: string[]): Promise<M>;
534
- firstOrNew(attributes?: object, values?: object): Promise<M>;
535
- firstOrCreate(attributes?: object, values?: object): Promise<M>;
536
- updateOrCreate(attributes: object, values?: object): Promise<M>;
537
- latest(column?: string): this;
538
- oldest(column?: string): this;
539
- find(key: string | number, columns?: string[]): Promise<M | null | undefined>;
540
- findMany(keys: string[] | number[] | ICollection<any>, columns?: string[]): Promise<ICollection<M>>;
541
- pluck<X extends Model$1 = any | M>(column: string): Promise<ICollection<X>>;
542
- all(columns?: string[]): Promise<ICollection<M>>;
543
- paginate<F extends IPaginatorParams>(page?: number, perPage?: number): Promise<IPaginator<M, F>>;
544
- [value: string]: any;
545
- }
546
- //#endregion
547
- //#region types/query-methods.d.ts
548
- type Operator = string;
549
- type ColumnRef = string | Raw;
550
- type FieldExpression = string;
551
- type TableRef<QB extends AnyQueryBuilder> = ColumnRef | AnyQueryBuilder | CallbackVoid<QB>;
552
- type Selection<QB extends AnyQueryBuilder> = ColumnRef | AnyQueryBuilder | CallbackVoid<QB>;
553
- type QBOrCallback<QB extends AnyQueryBuilder> = AnyQueryBuilder | CallbackVoid<QB>;
554
- interface CallbackVoid<T> {
555
- (this: T, arg: T): void;
556
- }
557
- type Raw = Knex.Raw;
558
- type OrderByDirection = 'asc' | 'desc' | 'ASC' | 'DESC';
559
- interface OrderByDescriptor {
560
- column: ColumnRef;
561
- order?: OrderByDirection;
562
- }
563
- type AnyQueryBuilder<M extends Model$1 = any, R = any> = IQueryBuilder<M, R> | IBuilder<M, R>;
564
- type Expression<T> = T | Raw | AnyQueryBuilder;
565
- type ColumnRefOrOrderByDescriptor = ColumnRef | OrderByDescriptor;
566
- interface RawInterface<R> {
567
- (sql: string, ...bindings: any[]): R;
568
- }
569
- interface BaseSetOperations<QB extends AnyQueryBuilder> {
570
- (callbackOrBuilder: QBOrCallback<QB>, wrap?: boolean): QB;
571
- (callbacksOrBuilders: QBOrCallback<QB>[], wrap?: boolean): QB;
572
- }
573
- type JoinRawMethod<QB extends AnyQueryBuilder> = RawInterface<QB> & {};
574
- type OrderByRawMethod<QB extends AnyQueryBuilder> = RawInterface<QB> & {};
575
- type WhereRawMethod<QB extends AnyQueryBuilder> = RawInterface<QB> & {};
576
- interface GroupByMethod<QB extends AnyQueryBuilder> {
577
- (...columns: ColumnRef[]): QB;
578
- (columns: ColumnRef[]): QB;
579
- }
580
- type WithRelationType = {
581
- [key: string]: <T extends IBuilder<any>>(builder: T) => T | void;
582
- } | string | string[];
583
- interface SetOperationsMethod<QB extends AnyQueryBuilder> extends BaseSetOperations<QB> {
584
- (...callbacksOrBuilders: QBOrCallback<QB>[]): QB;
585
- }
586
- interface SelectMethod<QB extends AnyQueryBuilder> {
587
- <QBP extends QB>(...columns: Selection<QBP>[]): QB;
588
- <QBP extends QB>(columns: Selection<QBP>[]): QB;
589
- }
590
- interface WhereMethod<QB extends AnyQueryBuilder> {
591
- (col: ColumnRef, op: Operator, expr: Expression<PrimitiveValue>): QB;
592
- (col: ColumnRef, expr: Expression<PrimitiveValue>): QB;
593
- (condition: boolean): QB;
594
- (cb: CallbackVoid<QB>): QB;
595
- (raw: Raw): QB;
596
- <QBA extends AnyQueryBuilder>(qb: QBA): QB;
597
- (obj: object): QB;
598
- }
599
- interface WhereWrappedMethod<QB extends AnyQueryBuilder> {
600
- (cb: CallbackVoid<QB>): QB;
601
- }
602
- interface WhereFieldExpressionMethod<QB extends AnyQueryBuilder> {
603
- (fieldExpression: FieldExpression): QB;
604
- }
605
- interface WhereExistsMethod<QB extends AnyQueryBuilder> {
606
- (cb: CallbackVoid<QB>): QB;
607
- (raw: Raw): QB;
608
- <QBA extends AnyQueryBuilder>(qb: QBA): QB;
609
- }
610
- interface WhereInMethod<QB extends AnyQueryBuilder> {
611
- (col: ColumnRef | ColumnRef[], expr: Expression<PrimitiveValue>[]): QB;
612
- (col: ColumnRef | ColumnRef[], cb: CallbackVoid<QB>): QB;
613
- (col: ColumnRef | ColumnRef[], qb: AnyQueryBuilder): QB;
614
- }
615
- interface WhereBetweenMethod<QB extends AnyQueryBuilder> {
616
- (column: ColumnRef, range: [Expression<PrimitiveValue>, Expression<PrimitiveValue>]): QB;
617
- }
618
- interface WhereNullMethod<QB extends AnyQueryBuilder> {
619
- (column: ColumnRef): QB;
620
- }
621
- interface OrderByMethod<QB extends AnyQueryBuilder> {
622
- (column: ColumnRef, order?: OrderByDirection): QB;
623
- (columns: ColumnRefOrOrderByDescriptor[]): QB;
624
- }
625
- interface WhereJsonExpressionMethod<QB extends AnyQueryBuilder> {
626
- (fieldExpression: FieldExpression, keys: string | string[]): QB;
627
- }
628
- interface WhereColumnMethod<QB extends AnyQueryBuilder> {
629
- (col1: ColumnRef, op: Operator, col2: ColumnRef): QB;
630
- (col1: ColumnRef, col2: ColumnRef): QB;
631
- }
632
- interface JoinMethod<QB extends AnyQueryBuilder> {
633
- (table: TableRef<QB>, leftCol: ColumnRef, op: Operator, rightCol: ColumnRef): QB;
634
- (table: TableRef<QB>, leftCol: ColumnRef, rightCol: ColumnRef): QB;
635
- (table: TableRef<QB>, cb: CallbackVoid<Knex.JoinClause>): QB;
636
- (table: TableRef<QB>, raw: Raw): QB;
637
- (raw: Raw): QB;
638
- }
639
- interface UnionMethod<QB extends AnyQueryBuilder> extends BaseSetOperations<QB> {
640
- (arg1: QBOrCallback<QB>, wrap?: boolean): QB;
641
- (arg1: QBOrCallback<QB>, arg2: QBOrCallback<QB>, wrap?: boolean): QB;
642
- (arg1: QBOrCallback<QB>, arg2: QBOrCallback<QB>, arg3: QBOrCallback<QB>, wrap?: boolean): QB;
643
- (arg1: QBOrCallback<QB>, arg2: QBOrCallback<QB>, arg3: QBOrCallback<QB>, arg4: QBOrCallback<QB>, wrap?: boolean): QB;
644
- (arg1: QBOrCallback<QB>, arg2: QBOrCallback<QB>, arg3: QBOrCallback<QB>, arg4: QBOrCallback<QB>, arg5: QBOrCallback<QB>, wrap?: boolean): QB;
645
- (arg1: QBOrCallback<QB>, arg2: QBOrCallback<QB>, arg3: QBOrCallback<QB>, arg4: QBOrCallback<QB>, arg5: QBOrCallback<QB>, arg6: QBOrCallback<QB>, wrap?: boolean): QB;
646
- (arg1: QBOrCallback<QB>, arg2: QBOrCallback<QB>, arg3: QBOrCallback<QB>, arg4: QBOrCallback<QB>, arg5: QBOrCallback<QB>, arg6: QBOrCallback<QB>, arg7: QBOrCallback<QB>, wrap?: boolean): QB;
647
- }
648
- interface JoinMethod<QB extends AnyQueryBuilder> {
649
- (table: TableRef<QB>, leftCol: ColumnRef, op: Operator, rightCol: ColumnRef): QB;
650
- (table: TableRef<QB>, leftCol: ColumnRef, rightCol: ColumnRef): QB;
651
- (table: TableRef<QB>, cb: CallbackVoid<Knex.JoinClause>): QB;
652
- (table: TableRef<QB>, raw: Raw): QB;
653
- (raw: Raw): QB;
654
- }
655
- //#endregion
656
416
  //#region src/query-builder.d.ts
657
417
  declare const Inference$1: {
658
418
  new <M extends Model$1 = Model$1, R = M[] | M>(): IQueryBuilder<M, R>;
@@ -675,7 +435,7 @@ declare class QueryBuilder<M extends Model$1 = Model$1, R = M[] | M> extends Inf
675
435
  skip(this: any, ...args: any[]): any;
676
436
  take(this: any, ...args: any[]): any;
677
437
  chunk(count: number, callback: TFunction): Promise<boolean>;
678
- paginate<F extends IPaginatorParams>(this: any, page?: number, perPage?: number): Promise<IPaginator<M, F>>;
438
+ paginate<F extends IPaginatorParams>(this: any, page: number | undefined, perPage: number | undefined, _pageName: string, _page: number): Promise<IPaginator<M, F>>;
679
439
  forPage(this: any, page?: number, perPage?: number): any;
680
440
  toSQL(...args: Parameters<typeof (void 0).connector.toSQL>): Knex.Sql;
681
441
  count(column: string): Promise<number>;
@@ -851,15 +611,9 @@ interface IModel {
851
611
  attributes: any;
852
612
  relations: any;
853
613
  exists: boolean;
854
- primaryKey: string;
855
- builder?: IBuilder<any, any> | null;
856
- table: string | null;
857
614
  connection?: TBaseConfig['client'] | null;
858
- keyType: string;
859
- incrementing: boolean;
860
615
  perPage: number;
861
616
  with: string | string[] | TGeneric<(...args: any[]) => IBuilder<Model$1>>;
862
- withCount: string[];
863
617
  trx: AnyQueryBuilder | null;
864
618
  timestamps: boolean;
865
619
  dateFormat: string;
@@ -898,7 +652,6 @@ interface IModel {
898
652
  setConnection(connection: TBaseConfig['client'] | null): this;
899
653
  usesUniqueIds(): boolean;
900
654
  uniqueIds(): string[];
901
- newUniqueId(): string;
902
655
  setUniqueIds(): void;
903
656
  getKeyType(): string;
904
657
  getIncrementing(): boolean;
@@ -969,15 +722,306 @@ interface IModel {
969
722
  belongsToMany<T extends Model$1>(model: new () => T, table?: string, foreignPivotKey?: string, relatedPivotKey?: string, parentKey?: string, relatedKey?: string): BelongsToMany<T>;
970
723
  }
971
724
  //#endregion
972
- //#region src/arquebus.d.ts
973
- declare class arquebus<M extends Model$1 = Model$1> {
974
- static connectorFactory: typeof Knex$1 | null;
975
- static instance: arquebus | null;
976
- manager: Record<string, QueryBuilder<M>>;
977
- connections: Record<string, TConfig>;
978
- models: Record<string, typeof Model$1>;
979
- constructor();
980
- getConstructor<T extends typeof arquebus>(this: InstanceType<T>): T;
725
+ //#region types/utils.d.ts
726
+ interface ICollection<T extends Model$1 | Model$2> extends Collection$1<T> {
727
+ items?: T[];
728
+ load(...relations: T[]): Promise<ICollection<T>>;
729
+ loadAggregate(relations: T | T[], column: string, action?: string | null): Promise<this>;
730
+ loadCount(relation: T, column: string): Promise<this>;
731
+ loadMax(relation: T, column: string): Promise<this>;
732
+ loadMin(relation: T, column: string): Promise<this>;
733
+ loadSum(relation: T, column: string): Promise<this>;
734
+ loadAvg(relation: T, column: string): Promise<this>;
735
+ mapThen(callback: () => void): Promise<any>;
736
+ modelKeys(): string[] | number[];
737
+ contains(key: IModel | any, operator?: any, value?: any): boolean;
738
+ diff(items: ICollection<T> | any[]): ICollection<T>;
739
+ except(keys: any[]): ICollection<T>;
740
+ intersect(items: T[]): ICollection<T>;
741
+ unique(key?: any, strict?: boolean): ICollection<T>;
742
+ find(key: any, defaultValue?: any): any;
743
+ fresh(withs?: any[]): Promise<ICollection<T>>;
744
+ makeVisible(attributes: string | string[]): this;
745
+ makeHidden(attributes: string | string[]): this;
746
+ append(attributes: string[]): this;
747
+ only(keys: null | any[]): this;
748
+ getDictionary(items?: any[]): TGeneric;
749
+ toQuery(): IBuilder<T, any>;
750
+ toData(): any;
751
+ toJSON(): any;
752
+ toJson(): string;
753
+ toString(): string;
754
+ [key: string]: any;
755
+ [Symbol.iterator]: () => Iterator<T>;
756
+ }
757
+ interface IPaginatorParams {
758
+ current_page: number;
759
+ data: any[];
760
+ per_page: number;
761
+ total: number;
762
+ last_page: number;
763
+ count: number;
764
+ paginated?: boolean;
765
+ }
766
+ interface IPaginator<T extends Model$1 | Model$2, K extends IPaginatorParams = IPaginatorParams> {
767
+ formatter?(paginator: IPaginator<any>): any | null;
768
+ setFormatter?(formatter: (paginator: IPaginator<any>) => any | null): void;
769
+ setItems(items: T[] | Collection<T>): void;
770
+ hasMorePages(): boolean;
771
+ get(index: number): T | null;
772
+ count(): number;
773
+ items(): Collection<T>;
774
+ map(callback: (value: T, index: number) => T): Collection<T>;
775
+ currentPage(): number;
776
+ perPage(): number;
777
+ lastPage(): number;
778
+ firstItem(): number | null;
779
+ lastItem(): number | null;
780
+ total(): number;
781
+ toData<U = K>(): U;
782
+ toJSON<U = K>(): U;
783
+ toJson(): string;
784
+ [Symbol.iterator]?(): {
785
+ next: () => {
786
+ value: T;
787
+ done: boolean;
788
+ };
789
+ };
790
+ }
791
+ //#endregion
792
+ //#region types/builder.d.ts
793
+ type BaseBuilder<M extends Model$1 | Model$2, R = ICollection<M> | IModel> = Omit<IQueryBuilder<M, R>, 'destroy' | 'clone' | 'get' | 'skip' | 'limit' | 'take' | 'offset' | 'chunk' | 'forPage' | 'orWhere' | 'pluck'>;
794
+ interface IScope {
795
+ apply(builder: Builder<any>, model: Model$1): void;
796
+ }
797
+ interface IBuilder<M extends Model$1 | Model$2, R = ICollection<M> | IModel> extends BaseBuilder<M, R> {
798
+ connector: IQueryBuilder<M, R> & Knex.QueryBuilder & {
799
+ _statements: any[];
800
+ _single: any;
801
+ } & Knex;
802
+ asProxy(): IQueryBuilder<M, R>;
803
+ chunk(count: number, callback: (rows: ICollection<M>) => any): Promise<boolean>;
804
+ enforceOrderBy(): void;
805
+ idOf(id: string | number): this;
806
+ clone(): IBuilder<M, R>;
807
+ forPage(page: number, perPage?: number): this;
808
+ insert(...attributes: any[]): Promise<any>;
809
+ update(attributes: any): Promise<any>;
810
+ increment(column: string, amount?: number, extra?: any): Promise<any>;
811
+ decrement(column: string, amount?: number, extra?: any): Promise<any>;
812
+ addUpdatedAtColumn(values: any): any;
813
+ delete(): Promise<boolean | number>;
814
+ softDelete(): boolean | Promise<any>;
815
+ forceDelete(): boolean | Promise<any>;
816
+ restore(): boolean | Promise<any>;
817
+ withTrashed(): this;
818
+ withoutTrashed(): this;
819
+ onlyTrashed(): this;
820
+ getDeletedAtColumn(): string;
821
+ create(attributes?: any): Promise<M>;
822
+ newModelInstance(attributes?: any): M;
823
+ count(columns?: string): Promise<number>;
824
+ getQuery(): AnyQueryBuilder;
825
+ getModel(): M;
826
+ setModel(model: M): this;
827
+ setTable(table: string): this;
828
+ applyScopes(): this;
829
+ scopes(scopes: string[]): this;
830
+ withGlobalScope(identifier: string | number, scope: string | (() => void)): this;
831
+ withoutGlobalScope(scope: IScope | string): this;
832
+ with(relation: WithRelationType): this;
833
+ with(...relations: WithRelationType[]): this;
834
+ has(relation: string, operator?: any, count?: number, boolean?: any, callback?: (builder: IBuilder<any>) => void | null): this;
835
+ orHas(relation: string, operator?: any, count?: number): this;
836
+ doesntHave(relation: string, boolean?: any, callback?: (builder: IBuilder<any>) => void | null): this;
837
+ orDoesntHave(relation: string): this;
838
+ whereHas(relation: string, callback?: (builder: IBuilder<any>) => void | IBuilder<any> | null, operator?: any, count?: number): this;
839
+ orWhere(...args: any[]): this;
840
+ orWhereHas(relation: string, callback?: (builder: IBuilder<any>) => void | IBuilder<any> | null, operator?: any, count?: number): this;
841
+ whereRelation(relation: string, column: string, operator?: any, value?: any): this;
842
+ hasNested(relation: string, operator?: any, count?: number, boolean?: any, callback?: (builder: IBuilder<any>) => void | null): this;
843
+ canUseExistsForExistenceCheck(operator: string, count: number): boolean;
844
+ addHasWhere(hasQuery: IBuilder<any>, relation: string, operator?: string, count?: number, boolean?: string): this;
845
+ withAggregate(relations: string | string[] | object, column: string, action?: string | null): this;
846
+ toSql(): object;
847
+ withCount(...relations: WithRelationType[]): this;
848
+ withMax(relation: WithRelationType, column: string): this;
849
+ withMin(relation: WithRelationType, column: string): this;
850
+ withAvg(relation: WithRelationType, column: string): this;
851
+ withSum(relation: WithRelationType, column: string): this;
852
+ withExists(relation: WithRelationType): this;
853
+ related(relation: string): this;
854
+ take(count: number): this;
855
+ skip(count: number): this;
856
+ limit(count: number): this;
857
+ offset(count: number): this;
858
+ first(column?: string | string[]): Promise<M | null | undefined>;
859
+ firstOrFail(column?: string | string[]): Promise<M>;
860
+ findOrFail(key: string | number, columns?: string[]): Promise<M>;
861
+ findOrFail(key: string[] | number[] | ICollection<any>, columns?: string[]): Promise<M>;
862
+ findOrFail(key: string | number | string[] | number[] | ICollection<any>, columns?: string[]): Promise<M>;
863
+ findOrNew(id: string | number, columns?: string[]): Promise<M>;
864
+ firstOrNew(attributes?: object, values?: object): Promise<M>;
865
+ firstOrCreate(attributes?: object, values?: object): Promise<M>;
866
+ updateOrCreate(attributes: object, values?: object): Promise<M>;
867
+ latest(column?: string): this;
868
+ oldest(column?: string): this;
869
+ find(key: string | number, columns?: string[]): Promise<M | null | undefined>;
870
+ findMany(keys: string[] | number[] | ICollection<any>, columns?: string[]): Promise<ICollection<M>>;
871
+ pluck<X extends Model$1 = any | M>(column: string): Promise<ICollection<X>>;
872
+ destroy(ids?: string | number | string[] | number[] | TFunction | ICollection<any>): Promise<number>;
873
+ get(columns?: string[]): Promise<ICollection<M>>;
874
+ all(columns?: string[]): Promise<ICollection<M>>;
875
+ paginate<F extends IPaginatorParams>(page?: number, perPage?: number): Promise<IPaginator<M, F>>;
876
+ [value: string]: any;
877
+ }
878
+ //#endregion
879
+ //#region types/query-methods.d.ts
880
+ type Operator = string;
881
+ type ColumnRef = string | Raw;
882
+ type FieldExpression = string;
883
+ type TableRef<QB extends AnyQueryBuilder> = ColumnRef | AnyQueryBuilder | CallbackVoid<QB>;
884
+ type Selection<QB extends AnyQueryBuilder> = ColumnRef | AnyQueryBuilder | CallbackVoid<QB>;
885
+ type QBOrCallback<QB extends AnyQueryBuilder> = AnyQueryBuilder | CallbackVoid<QB>;
886
+ interface CallbackVoid<T> {
887
+ (this: T, arg: T): void;
888
+ }
889
+ type Raw = Knex.Raw;
890
+ type OrderByDirection = 'asc' | 'desc' | 'ASC' | 'DESC';
891
+ interface OrderByDescriptor {
892
+ column: ColumnRef;
893
+ order?: OrderByDirection;
894
+ }
895
+ type AnyQueryBuilder<M extends Model$1 = any, R = any> = IQueryBuilder<M, R> | IBuilder<M, R>;
896
+ type Expression<T> = T | Raw | AnyQueryBuilder;
897
+ type ColumnRefOrOrderByDescriptor = ColumnRef | OrderByDescriptor;
898
+ interface RawInterface<R> {
899
+ (sql: string, ...bindings: any[]): R;
900
+ }
901
+ interface BaseSetOperations<QB extends AnyQueryBuilder> {
902
+ (callbackOrBuilder: QBOrCallback<QB>, wrap?: boolean): QB;
903
+ (callbacksOrBuilders: QBOrCallback<QB>[], wrap?: boolean): QB;
904
+ }
905
+ type JoinRawMethod<QB extends AnyQueryBuilder> = RawInterface<QB> & {};
906
+ type OrderByRawMethod<QB extends AnyQueryBuilder> = RawInterface<QB> & {};
907
+ type WhereRawMethod<QB extends AnyQueryBuilder> = RawInterface<QB> & {};
908
+ interface GroupByMethod<QB extends AnyQueryBuilder> {
909
+ (...columns: ColumnRef[]): QB;
910
+ (columns: ColumnRef[]): QB;
911
+ }
912
+ type WithRelationType = {
913
+ [key: string]: <T extends IBuilder<any>>(builder: T) => T | void;
914
+ } | string | string[];
915
+ interface SetOperationsMethod<QB extends AnyQueryBuilder> extends BaseSetOperations<QB> {
916
+ (...callbacksOrBuilders: QBOrCallback<QB>[]): QB;
917
+ }
918
+ interface SelectMethod<QB extends AnyQueryBuilder> {
919
+ <QBP extends QB>(...columns: Selection<QBP>[]): QB;
920
+ <QBP extends QB>(columns: Selection<QBP>[]): QB;
921
+ }
922
+ interface WhereMethod<QB extends AnyQueryBuilder> {
923
+ (col: ColumnRef, op: Operator, expr: Expression<PrimitiveValue>): QB;
924
+ (col: ColumnRef, expr: Expression<PrimitiveValue>): QB;
925
+ (condition: boolean): QB;
926
+ (cb: CallbackVoid<QB>): QB;
927
+ (raw: Raw): QB;
928
+ <QBA extends AnyQueryBuilder>(qb: QBA): QB;
929
+ (obj: object): QB;
930
+ }
931
+ interface WhereWrappedMethod<QB extends AnyQueryBuilder> {
932
+ (cb: CallbackVoid<QB>): QB;
933
+ }
934
+ interface WhereFieldExpressionMethod<QB extends AnyQueryBuilder> {
935
+ (fieldExpression: FieldExpression): QB;
936
+ }
937
+ interface WhereExistsMethod<QB extends AnyQueryBuilder> {
938
+ (cb: CallbackVoid<QB>): QB;
939
+ (raw: Raw): QB;
940
+ <QBA extends AnyQueryBuilder>(qb: QBA): QB;
941
+ }
942
+ interface WhereInMethod<QB extends AnyQueryBuilder> {
943
+ (col: ColumnRef | ColumnRef[], expr: Expression<PrimitiveValue>[]): QB;
944
+ (col: ColumnRef | ColumnRef[], cb: CallbackVoid<QB>): QB;
945
+ (col: ColumnRef | ColumnRef[], qb: AnyQueryBuilder): QB;
946
+ }
947
+ interface WhereBetweenMethod<QB extends AnyQueryBuilder> {
948
+ (column: ColumnRef, range: [Expression<PrimitiveValue>, Expression<PrimitiveValue>]): QB;
949
+ }
950
+ interface WhereNullMethod<QB extends AnyQueryBuilder> {
951
+ (column: ColumnRef): QB;
952
+ }
953
+ interface OrderByMethod<QB extends AnyQueryBuilder> {
954
+ (column: ColumnRef, order?: OrderByDirection): QB;
955
+ (columns: ColumnRefOrOrderByDescriptor[]): QB;
956
+ }
957
+ interface WhereJsonExpressionMethod<QB extends AnyQueryBuilder> {
958
+ (fieldExpression: FieldExpression, keys: string | string[]): QB;
959
+ }
960
+ interface ReturningMethod<QB extends AnyQueryBuilder> {
961
+ (key: FieldExpression | FieldExpression[], options?: {
962
+ [key: string]: any;
963
+ }): QB;
964
+ }
965
+ interface FirstOrFailMethod<QB extends AnyQueryBuilder> {
966
+ (): Promise<QB>;
967
+ }
968
+ interface AddSelectMethod<QB extends AnyQueryBuilder> {
969
+ (params: string[]): QB;
970
+ }
971
+ interface ForceDeleteMethod {
972
+ (): Promise<boolean | number>;
973
+ }
974
+ interface RestoreMethod {
975
+ (): Promise<number>;
976
+ }
977
+ interface WhereColumnMethod<QB extends AnyQueryBuilder> {
978
+ (col1: ColumnRef, op: Operator, col2: ColumnRef): QB;
979
+ (col1: ColumnRef, col2: ColumnRef): QB;
980
+ }
981
+ interface JoinMethod<QB extends AnyQueryBuilder> {
982
+ (table: TableRef<QB>, leftCol: ColumnRef, op: Operator, rightCol: ColumnRef): QB;
983
+ (table: TableRef<QB>, leftCol: ColumnRef, rightCol: ColumnRef): QB;
984
+ (table: TableRef<QB>, cb: CallbackVoid<Knex.JoinClause>): QB;
985
+ (table: TableRef<QB>, raw: Raw): QB;
986
+ (raw: Raw): QB;
987
+ }
988
+ interface UnionMethod<QB extends AnyQueryBuilder> extends BaseSetOperations<QB> {
989
+ (arg1: QBOrCallback<QB>, wrap?: boolean): QB;
990
+ (arg1: QBOrCallback<QB>, arg2: QBOrCallback<QB>, wrap?: boolean): QB;
991
+ (arg1: QBOrCallback<QB>, arg2: QBOrCallback<QB>, arg3: QBOrCallback<QB>, wrap?: boolean): QB;
992
+ (arg1: QBOrCallback<QB>, arg2: QBOrCallback<QB>, arg3: QBOrCallback<QB>, arg4: QBOrCallback<QB>, wrap?: boolean): QB;
993
+ (arg1: QBOrCallback<QB>, arg2: QBOrCallback<QB>, arg3: QBOrCallback<QB>, arg4: QBOrCallback<QB>, arg5: QBOrCallback<QB>, wrap?: boolean): QB;
994
+ (arg1: QBOrCallback<QB>, arg2: QBOrCallback<QB>, arg3: QBOrCallback<QB>, arg4: QBOrCallback<QB>, arg5: QBOrCallback<QB>, arg6: QBOrCallback<QB>, wrap?: boolean): QB;
995
+ (arg1: QBOrCallback<QB>, arg2: QBOrCallback<QB>, arg3: QBOrCallback<QB>, arg4: QBOrCallback<QB>, arg5: QBOrCallback<QB>, arg6: QBOrCallback<QB>, arg7: QBOrCallback<QB>, wrap?: boolean): QB;
996
+ }
997
+ interface JoinMethod<QB extends AnyQueryBuilder> {
998
+ (table: TableRef<QB>, leftCol: ColumnRef, op: Operator, rightCol: ColumnRef): QB;
999
+ (table: TableRef<QB>, leftCol: ColumnRef, rightCol: ColumnRef): QB;
1000
+ (table: TableRef<QB>, cb: CallbackVoid<Knex.JoinClause>): QB;
1001
+ (table: TableRef<QB>, raw: Raw): QB;
1002
+ (raw: Raw): QB;
1003
+ }
1004
+ //#endregion
1005
+ //#region src/casts-attributes.d.ts
1006
+ interface ICastsAttributes {
1007
+ get?(model: Model$1, key: string, value: string, attributes: TGeneric): string | null | undefined;
1008
+ set?(model: Model$1, key: string, value: string, attributes: TGeneric): string | null | undefined;
1009
+ }
1010
+ declare class CastsAttributes implements ICastsAttributes {
1011
+ constructor();
1012
+ static get(_model: Model$1, _key: string, _value: string, _attributes: TGeneric): string | null | undefined;
1013
+ static set(_model: Model$1, _key: string, _value: string, _attributes: TGeneric): string | null | undefined;
1014
+ }
1015
+ //#endregion
1016
+ //#region src/arquebus.d.ts
1017
+ declare class arquebus<M extends Model$1 = Model$1> {
1018
+ static connectorFactory: typeof Knex$1 | null;
1019
+ static instance: arquebus | null;
1020
+ manager: Record<string, QueryBuilder<M>>;
1021
+ connections: Record<string, TConfig>;
1022
+ models: Record<string, typeof Model$1>;
1023
+ constructor();
1024
+ getConstructor<T extends typeof arquebus>(this: InstanceType<T>): T;
981
1025
  static getInstance(): arquebus<Model$1>;
982
1026
  /**
983
1027
  * Initialize a new database connection
@@ -1030,14 +1074,3451 @@ declare class arquebus<M extends Model$1 = Model$1> {
1030
1074
  //#region src/model.d.ts
1031
1075
  declare const BaseModel$1: (new (...args: any[]) => any) & {
1032
1076
  [x: string]: any;
1077
+ } & {
1078
+ [x: string]: any;
1079
+ attributes: any;
1080
+ relations: any;
1081
+ exists: boolean;
1082
+ connection?: (TBaseConfig["client"] | null) | undefined;
1083
+ perPage: number;
1084
+ with: string | string[] | TGeneric<(...args: any[]) => IBuilder<Model$1>>;
1085
+ trx: AnyQueryBuilder | null;
1086
+ timestamps: boolean;
1087
+ dateFormat: string;
1088
+ visible: string[] & any[];
1089
+ hidden: string[] & any[];
1090
+ query: <T extends {
1091
+ prototype: unknown;
1092
+ }>(this: T, client?: AnyQueryBuilder | null) => IBuilder<Model$1>;
1093
+ on: <T extends {
1094
+ prototype: unknown;
1095
+ }>(this: T, connection: string | null) => IBuilder<Model$1>;
1096
+ boot: () => void;
1097
+ make: <T extends IModel>(this: new () => T, attributes?: TGeneric) => T;
1098
+ addHook: (hook: Hook, callback: TFunction) => void;
1099
+ creating: (callback: TFunction) => void;
1100
+ created: (callback: TFunction) => void;
1101
+ updating: (callback: TFunction) => void;
1102
+ updated: (callback: TFunction) => void;
1103
+ deleting: (callback: TFunction) => void;
1104
+ deleted: (callback: TFunction) => void;
1105
+ saving: (callback: TFunction) => void;
1106
+ saved: (callback: TFunction) => void;
1107
+ restoring: (callback: TFunction) => void;
1108
+ restored: (callback: TFunction) => void;
1109
+ trashed: {
1110
+ (callback: TFunction): void;
1111
+ (): boolean;
1112
+ };
1113
+ forceDeleted: (callback: TFunction) => void;
1114
+ bootIfNotBooted: () => void;
1115
+ initialize: () => void;
1116
+ initializePlugins: () => void;
1117
+ addPluginInitializer: (method: any) => void;
1118
+ newInstance: (attributes?: TGeneric, exists?: boolean) => any;
1119
+ getKey: () => string | number | null | undefined;
1120
+ getKeyName: () => string;
1121
+ getConnectionName: () => string;
1122
+ getConnection: () => any;
1123
+ setConnection: (connection: TBaseConfig["client"] | null) => (new () => IModel) & IModel & {
1124
+ [x: string]: any;
1125
+ timestamps: boolean;
1126
+ dateFormat: string;
1127
+ usesTimestamps(): boolean;
1128
+ updateTimestamps(): /*elided*/any;
1129
+ getCreatedAtColumn(): any;
1130
+ getUpdatedAtColumn(): any;
1131
+ setCreatedAt(value: any): /*elided*/any;
1132
+ setUpdatedAt(value: any): /*elided*/any;
1133
+ freshTimestamp(): Date;
1134
+ freshTimestampString(): any;
1135
+ } & TGeneric<any, string> & {
1136
+ [x: string]: any;
1137
+ attributes: TGeneric;
1138
+ original: TGeneric;
1139
+ casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
1140
+ changes: TGeneric;
1141
+ appends: any[];
1142
+ setAppends(appends: any[]): /*elided*/any;
1143
+ append(...keys: any[]): /*elided*/any;
1144
+ normalizeCastClassResponse(key: string, value: string): TGeneric;
1145
+ syncOriginal(): /*elided*/any;
1146
+ syncChanges(): /*elided*/any;
1147
+ syncOriginalAttribute(attribute: string): void;
1148
+ syncOriginalAttributes(...attributes: string[]): /*elided*/any;
1149
+ isDirty(...attributes: string[]): boolean;
1150
+ getDirty(): TGeneric;
1151
+ originalIsEquivalent(key: string): boolean;
1152
+ setAttributes(attributes: TGeneric): void;
1153
+ setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
1154
+ getAttributes(): {
1155
+ [x: string]: any;
1156
+ };
1157
+ setAttribute(key: string, value: string): /*elided*/any;
1158
+ getAttribute(key: string): any;
1159
+ castAttribute(key: string, value: string): any;
1160
+ attributesToData(): {
1161
+ [x: string]: any;
1162
+ };
1163
+ mutateAttribute(key: string, value: string | null): any;
1164
+ mutateAttributeForArray(_key: string, _value: string): void;
1165
+ isDateAttribute(key: string): boolean;
1166
+ serializeDate(date?: Date | string | null): string | null;
1167
+ getDates(): any[];
1168
+ getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
1169
+ getCastType(key: string): any;
1170
+ hasCast(key: string, types?: readonly string[]): boolean;
1171
+ withDayjs(date: string): dayjs0.Dayjs;
1172
+ isCustomCast(cast: any): boolean;
1173
+ isCustomDateTimeCast(cast: any): boolean;
1174
+ isDecimalCast(cast: any): boolean;
1175
+ isDateCastable(key: string): boolean;
1176
+ fromDateTime(value: string): string;
1177
+ getDateFormat(): any;
1178
+ asDecimal(value: string, decimals: number): string;
1179
+ asDateTime(value: any): Date | null;
1180
+ asDate(value: string): Date;
1181
+ } & {
1182
+ [x: string]: any;
1183
+ hidden: any[];
1184
+ visible: any[];
1185
+ makeVisible(...keys: string[]): /*elided*/any;
1186
+ makeHidden(key: string[], ...keys: string[]): /*elided*/any;
1187
+ getHidden(): any[];
1188
+ getVisible(): any[];
1189
+ setHidden(hidden: any[]): /*elided*/any;
1190
+ setVisible(visible: any[]): /*elided*/any;
1191
+ } & {
1192
+ [x: string]: any;
1193
+ execHooks(hook: any, options: TGeneric): Promise<any>;
1194
+ } & {
1195
+ [x: string]: any;
1196
+ getGlobalScopes(): {};
1197
+ } & {
1198
+ [x: string]: any;
1199
+ useUniqueIds: boolean;
1200
+ usesUniqueIds(): boolean;
1201
+ uniqueIds(): never[];
1202
+ setUniqueIds(): void;
1203
+ };
1204
+ usesUniqueIds: (() => boolean) & (() => boolean);
1205
+ uniqueIds: (() => string[]) & (() => never[]);
1206
+ setUniqueIds: (() => void) & (() => void);
1207
+ getKeyType: () => string;
1208
+ getIncrementing: () => boolean;
1209
+ setIncrementing: (value: boolean) => (new () => IModel) & IModel & {
1210
+ [x: string]: any;
1211
+ timestamps: boolean;
1212
+ dateFormat: string;
1213
+ usesTimestamps(): boolean;
1214
+ updateTimestamps(): /*elided*/any;
1215
+ getCreatedAtColumn(): any;
1216
+ getUpdatedAtColumn(): any;
1217
+ setCreatedAt(value: any): /*elided*/any;
1218
+ setUpdatedAt(value: any): /*elided*/any;
1219
+ freshTimestamp(): Date;
1220
+ freshTimestampString(): any;
1221
+ } & TGeneric<any, string> & {
1222
+ [x: string]: any;
1223
+ attributes: TGeneric;
1224
+ original: TGeneric;
1225
+ casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
1226
+ changes: TGeneric;
1227
+ appends: any[];
1228
+ setAppends(appends: any[]): /*elided*/any;
1229
+ append(...keys: any[]): /*elided*/any;
1230
+ normalizeCastClassResponse(key: string, value: string): TGeneric;
1231
+ syncOriginal(): /*elided*/any;
1232
+ syncChanges(): /*elided*/any;
1233
+ syncOriginalAttribute(attribute: string): void;
1234
+ syncOriginalAttributes(...attributes: string[]): /*elided*/any;
1235
+ isDirty(...attributes: string[]): boolean;
1236
+ getDirty(): TGeneric;
1237
+ originalIsEquivalent(key: string): boolean;
1238
+ setAttributes(attributes: TGeneric): void;
1239
+ setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
1240
+ getAttributes(): {
1241
+ [x: string]: any;
1242
+ };
1243
+ setAttribute(key: string, value: string): /*elided*/any;
1244
+ getAttribute(key: string): any;
1245
+ castAttribute(key: string, value: string): any;
1246
+ attributesToData(): {
1247
+ [x: string]: any;
1248
+ };
1249
+ mutateAttribute(key: string, value: string | null): any;
1250
+ mutateAttributeForArray(_key: string, _value: string): void;
1251
+ isDateAttribute(key: string): boolean;
1252
+ serializeDate(date?: Date | string | null): string | null;
1253
+ getDates(): any[];
1254
+ getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
1255
+ getCastType(key: string): any;
1256
+ hasCast(key: string, types?: readonly string[]): boolean;
1257
+ withDayjs(date: string): dayjs0.Dayjs;
1258
+ isCustomCast(cast: any): boolean;
1259
+ isCustomDateTimeCast(cast: any): boolean;
1260
+ isDecimalCast(cast: any): boolean;
1261
+ isDateCastable(key: string): boolean;
1262
+ fromDateTime(value: string): string;
1263
+ getDateFormat(): any;
1264
+ asDecimal(value: string, decimals: number): string;
1265
+ asDateTime(value: any): Date | null;
1266
+ asDate(value: string): Date;
1267
+ } & {
1268
+ [x: string]: any;
1269
+ hidden: any[];
1270
+ visible: any[];
1271
+ makeVisible(...keys: string[]): /*elided*/any;
1272
+ makeHidden(key: string[], ...keys: string[]): /*elided*/any;
1273
+ getHidden(): any[];
1274
+ getVisible(): any[];
1275
+ setHidden(hidden: any[]): /*elided*/any;
1276
+ setVisible(visible: any[]): /*elided*/any;
1277
+ } & {
1278
+ [x: string]: any;
1279
+ execHooks(hook: any, options: TGeneric): Promise<any>;
1280
+ } & {
1281
+ [x: string]: any;
1282
+ getGlobalScopes(): {};
1283
+ } & {
1284
+ [x: string]: any;
1285
+ useUniqueIds: boolean;
1286
+ usesUniqueIds(): boolean;
1287
+ uniqueIds(): never[];
1288
+ setUniqueIds(): void;
1289
+ };
1290
+ getTable: () => string;
1291
+ setTable: (table: string) => (new () => IModel) & IModel & {
1292
+ [x: string]: any;
1293
+ timestamps: boolean;
1294
+ dateFormat: string;
1295
+ usesTimestamps(): boolean;
1296
+ updateTimestamps(): /*elided*/any;
1297
+ getCreatedAtColumn(): any;
1298
+ getUpdatedAtColumn(): any;
1299
+ setCreatedAt(value: any): /*elided*/any;
1300
+ setUpdatedAt(value: any): /*elided*/any;
1301
+ freshTimestamp(): Date;
1302
+ freshTimestampString(): any;
1303
+ } & TGeneric<any, string> & {
1304
+ [x: string]: any;
1305
+ attributes: TGeneric;
1306
+ original: TGeneric;
1307
+ casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
1308
+ changes: TGeneric;
1309
+ appends: any[];
1310
+ setAppends(appends: any[]): /*elided*/any;
1311
+ append(...keys: any[]): /*elided*/any;
1312
+ normalizeCastClassResponse(key: string, value: string): TGeneric;
1313
+ syncOriginal(): /*elided*/any;
1314
+ syncChanges(): /*elided*/any;
1315
+ syncOriginalAttribute(attribute: string): void;
1316
+ syncOriginalAttributes(...attributes: string[]): /*elided*/any;
1317
+ isDirty(...attributes: string[]): boolean;
1318
+ getDirty(): TGeneric;
1319
+ originalIsEquivalent(key: string): boolean;
1320
+ setAttributes(attributes: TGeneric): void;
1321
+ setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
1322
+ getAttributes(): {
1323
+ [x: string]: any;
1324
+ };
1325
+ setAttribute(key: string, value: string): /*elided*/any;
1326
+ getAttribute(key: string): any;
1327
+ castAttribute(key: string, value: string): any;
1328
+ attributesToData(): {
1329
+ [x: string]: any;
1330
+ };
1331
+ mutateAttribute(key: string, value: string | null): any;
1332
+ mutateAttributeForArray(_key: string, _value: string): void;
1333
+ isDateAttribute(key: string): boolean;
1334
+ serializeDate(date?: Date | string | null): string | null;
1335
+ getDates(): any[];
1336
+ getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
1337
+ getCastType(key: string): any;
1338
+ hasCast(key: string, types?: readonly string[]): boolean;
1339
+ withDayjs(date: string): dayjs0.Dayjs;
1340
+ isCustomCast(cast: any): boolean;
1341
+ isCustomDateTimeCast(cast: any): boolean;
1342
+ isDecimalCast(cast: any): boolean;
1343
+ isDateCastable(key: string): boolean;
1344
+ fromDateTime(value: string): string;
1345
+ getDateFormat(): any;
1346
+ asDecimal(value: string, decimals: number): string;
1347
+ asDateTime(value: any): Date | null;
1348
+ asDate(value: string): Date;
1349
+ } & {
1350
+ [x: string]: any;
1351
+ hidden: any[];
1352
+ visible: any[];
1353
+ makeVisible(...keys: string[]): /*elided*/any;
1354
+ makeHidden(key: string[], ...keys: string[]): /*elided*/any;
1355
+ getHidden(): any[];
1356
+ getVisible(): any[];
1357
+ setHidden(hidden: any[]): /*elided*/any;
1358
+ setVisible(visible: any[]): /*elided*/any;
1359
+ } & {
1360
+ [x: string]: any;
1361
+ execHooks(hook: any, options: TGeneric): Promise<any>;
1362
+ } & {
1363
+ [x: string]: any;
1364
+ getGlobalScopes(): {};
1365
+ } & {
1366
+ [x: string]: any;
1367
+ useUniqueIds: boolean;
1368
+ usesUniqueIds(): boolean;
1369
+ uniqueIds(): never[];
1370
+ setUniqueIds(): void;
1371
+ };
1372
+ getDates: (() => string[]) & (() => any[]);
1373
+ getDateFormat: (() => string) & (() => any);
1374
+ getAttributes: (() => object) & (() => {
1375
+ [x: string]: any;
1376
+ });
1377
+ getAttribute: ((key: string) => any) & ((key: string) => any);
1378
+ setAttribute: ((key: string, value: any) => (new () => IModel) & IModel & {
1379
+ [x: string]: any;
1380
+ timestamps: boolean;
1381
+ dateFormat: string;
1382
+ usesTimestamps(): boolean;
1383
+ updateTimestamps(): /*elided*/any;
1384
+ getCreatedAtColumn(): any;
1385
+ getUpdatedAtColumn(): any;
1386
+ setCreatedAt(value: any): /*elided*/any;
1387
+ setUpdatedAt(value: any): /*elided*/any;
1388
+ freshTimestamp(): Date;
1389
+ freshTimestampString(): any;
1390
+ } & TGeneric<any, string> & {
1391
+ [x: string]: any;
1392
+ attributes: TGeneric;
1393
+ original: TGeneric;
1394
+ casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
1395
+ changes: TGeneric;
1396
+ appends: any[];
1397
+ setAppends(appends: any[]): /*elided*/any;
1398
+ append(...keys: any[]): /*elided*/any;
1399
+ normalizeCastClassResponse(key: string, value: string): TGeneric;
1400
+ syncOriginal(): /*elided*/any;
1401
+ syncChanges(): /*elided*/any;
1402
+ syncOriginalAttribute(attribute: string): void;
1403
+ syncOriginalAttributes(...attributes: string[]): /*elided*/any;
1404
+ isDirty(...attributes: string[]): boolean;
1405
+ getDirty(): TGeneric;
1406
+ originalIsEquivalent(key: string): boolean;
1407
+ setAttributes(attributes: TGeneric): void;
1408
+ setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
1409
+ getAttributes(): {
1410
+ [x: string]: any;
1411
+ };
1412
+ setAttribute(key: string, value: string): /*elided*/any;
1413
+ getAttribute(key: string): any;
1414
+ castAttribute(key: string, value: string): any;
1415
+ attributesToData(): {
1416
+ [x: string]: any;
1417
+ };
1418
+ mutateAttribute(key: string, value: string | null): any;
1419
+ mutateAttributeForArray(_key: string, _value: string): void;
1420
+ isDateAttribute(key: string): boolean;
1421
+ serializeDate(date?: Date | string | null): string | null;
1422
+ getDates(): any[];
1423
+ getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
1424
+ getCastType(key: string): any;
1425
+ hasCast(key: string, types?: readonly string[]): boolean;
1426
+ withDayjs(date: string): dayjs0.Dayjs;
1427
+ isCustomCast(cast: any): boolean;
1428
+ isCustomDateTimeCast(cast: any): boolean;
1429
+ isDecimalCast(cast: any): boolean;
1430
+ isDateCastable(key: string): boolean;
1431
+ fromDateTime(value: string): string;
1432
+ getDateFormat(): any;
1433
+ asDecimal(value: string, decimals: number): string;
1434
+ asDateTime(value: any): Date | null;
1435
+ asDate(value: string): Date;
1436
+ } & {
1437
+ [x: string]: any;
1438
+ hidden: any[];
1439
+ visible: any[];
1440
+ makeVisible(...keys: string[]): /*elided*/any;
1441
+ makeHidden(key: string[], ...keys: string[]): /*elided*/any;
1442
+ getHidden(): any[];
1443
+ getVisible(): any[];
1444
+ setHidden(hidden: any[]): /*elided*/any;
1445
+ setVisible(visible: any[]): /*elided*/any;
1446
+ } & {
1447
+ [x: string]: any;
1448
+ execHooks(hook: any, options: TGeneric): Promise<any>;
1449
+ } & {
1450
+ [x: string]: any;
1451
+ getGlobalScopes(): {};
1452
+ } & {
1453
+ [x: string]: any;
1454
+ useUniqueIds: boolean;
1455
+ usesUniqueIds(): boolean;
1456
+ uniqueIds(): never[];
1457
+ setUniqueIds(): void;
1458
+ }) & ((key: string, value: string) => (new () => IModel) & IModel & {
1459
+ [x: string]: any;
1460
+ timestamps: boolean;
1461
+ dateFormat: string;
1462
+ usesTimestamps(): boolean;
1463
+ updateTimestamps(): /*elided*/any;
1464
+ getCreatedAtColumn(): any;
1465
+ getUpdatedAtColumn(): any;
1466
+ setCreatedAt(value: any): /*elided*/any;
1467
+ setUpdatedAt(value: any): /*elided*/any;
1468
+ freshTimestamp(): Date;
1469
+ freshTimestampString(): any;
1470
+ } & TGeneric<any, string> & {
1471
+ [x: string]: any;
1472
+ attributes: TGeneric;
1473
+ original: TGeneric;
1474
+ casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
1475
+ changes: TGeneric;
1476
+ appends: any[];
1477
+ setAppends(appends: any[]): /*elided*/any;
1478
+ append(...keys: any[]): /*elided*/any;
1479
+ normalizeCastClassResponse(key: string, value: string): TGeneric;
1480
+ syncOriginal(): /*elided*/any;
1481
+ syncChanges(): /*elided*/any;
1482
+ syncOriginalAttribute(attribute: string): void;
1483
+ syncOriginalAttributes(...attributes: string[]): /*elided*/any;
1484
+ isDirty(...attributes: string[]): boolean;
1485
+ getDirty(): TGeneric;
1486
+ originalIsEquivalent(key: string): boolean;
1487
+ setAttributes(attributes: TGeneric): void;
1488
+ setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
1489
+ getAttributes(): {
1490
+ [x: string]: any;
1491
+ };
1492
+ setAttribute(key: string, value: string): /*elided*/any;
1493
+ getAttribute(key: string): any;
1494
+ castAttribute(key: string, value: string): any;
1495
+ attributesToData(): {
1496
+ [x: string]: any;
1497
+ };
1498
+ mutateAttribute(key: string, value: string | null): any;
1499
+ mutateAttributeForArray(_key: string, _value: string): void;
1500
+ isDateAttribute(key: string): boolean;
1501
+ serializeDate(date?: Date | string | null): string | null;
1502
+ getDates(): any[];
1503
+ getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
1504
+ getCastType(key: string): any;
1505
+ hasCast(key: string, types?: readonly string[]): boolean;
1506
+ withDayjs(date: string): dayjs0.Dayjs;
1507
+ isCustomCast(cast: any): boolean;
1508
+ isCustomDateTimeCast(cast: any): boolean;
1509
+ isDecimalCast(cast: any): boolean;
1510
+ isDateCastable(key: string): boolean;
1511
+ fromDateTime(value: string): string;
1512
+ getDateFormat(): any;
1513
+ asDecimal(value: string, decimals: number): string;
1514
+ asDateTime(value: any): Date | null;
1515
+ asDate(value: string): Date;
1516
+ } & {
1517
+ [x: string]: any;
1518
+ hidden: any[];
1519
+ visible: any[];
1520
+ makeVisible(...keys: string[]): /*elided*/any;
1521
+ makeHidden(key: string[], ...keys: string[]): /*elided*/any;
1522
+ getHidden(): any[];
1523
+ getVisible(): any[];
1524
+ setHidden(hidden: any[]): /*elided*/any;
1525
+ setVisible(visible: any[]): /*elided*/any;
1526
+ } & {
1527
+ [x: string]: any;
1528
+ execHooks(hook: any, options: TGeneric): Promise<any>;
1529
+ } & {
1530
+ [x: string]: any;
1531
+ getGlobalScopes(): {};
1532
+ } & {
1533
+ [x: string]: any;
1534
+ useUniqueIds: boolean;
1535
+ usesUniqueIds(): boolean;
1536
+ uniqueIds(): never[];
1537
+ setUniqueIds(): void;
1538
+ });
1539
+ fill: (attributes: any) => (new () => IModel) & IModel & {
1540
+ [x: string]: any;
1541
+ timestamps: boolean;
1542
+ dateFormat: string;
1543
+ usesTimestamps(): boolean;
1544
+ updateTimestamps(): /*elided*/any;
1545
+ getCreatedAtColumn(): any;
1546
+ getUpdatedAtColumn(): any;
1547
+ setCreatedAt(value: any): /*elided*/any;
1548
+ setUpdatedAt(value: any): /*elided*/any;
1549
+ freshTimestamp(): Date;
1550
+ freshTimestampString(): any;
1551
+ } & TGeneric<any, string> & {
1552
+ [x: string]: any;
1553
+ attributes: TGeneric;
1554
+ original: TGeneric;
1555
+ casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
1556
+ changes: TGeneric;
1557
+ appends: any[];
1558
+ setAppends(appends: any[]): /*elided*/any;
1559
+ append(...keys: any[]): /*elided*/any;
1560
+ normalizeCastClassResponse(key: string, value: string): TGeneric;
1561
+ syncOriginal(): /*elided*/any;
1562
+ syncChanges(): /*elided*/any;
1563
+ syncOriginalAttribute(attribute: string): void;
1564
+ syncOriginalAttributes(...attributes: string[]): /*elided*/any;
1565
+ isDirty(...attributes: string[]): boolean;
1566
+ getDirty(): TGeneric;
1567
+ originalIsEquivalent(key: string): boolean;
1568
+ setAttributes(attributes: TGeneric): void;
1569
+ setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
1570
+ getAttributes(): {
1571
+ [x: string]: any;
1572
+ };
1573
+ setAttribute(key: string, value: string): /*elided*/any;
1574
+ getAttribute(key: string): any;
1575
+ castAttribute(key: string, value: string): any;
1576
+ attributesToData(): {
1577
+ [x: string]: any;
1578
+ };
1579
+ mutateAttribute(key: string, value: string | null): any;
1580
+ mutateAttributeForArray(_key: string, _value: string): void;
1581
+ isDateAttribute(key: string): boolean;
1582
+ serializeDate(date?: Date | string | null): string | null;
1583
+ getDates(): any[];
1584
+ getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
1585
+ getCastType(key: string): any;
1586
+ hasCast(key: string, types?: readonly string[]): boolean;
1587
+ withDayjs(date: string): dayjs0.Dayjs;
1588
+ isCustomCast(cast: any): boolean;
1589
+ isCustomDateTimeCast(cast: any): boolean;
1590
+ isDecimalCast(cast: any): boolean;
1591
+ isDateCastable(key: string): boolean;
1592
+ fromDateTime(value: string): string;
1593
+ getDateFormat(): any;
1594
+ asDecimal(value: string, decimals: number): string;
1595
+ asDateTime(value: any): Date | null;
1596
+ asDate(value: string): Date;
1597
+ } & {
1598
+ [x: string]: any;
1599
+ hidden: any[];
1600
+ visible: any[];
1601
+ makeVisible(...keys: string[]): /*elided*/any;
1602
+ makeHidden(key: string[], ...keys: string[]): /*elided*/any;
1603
+ getHidden(): any[];
1604
+ getVisible(): any[];
1605
+ setHidden(hidden: any[]): /*elided*/any;
1606
+ setVisible(visible: any[]): /*elided*/any;
1607
+ } & {
1608
+ [x: string]: any;
1609
+ execHooks(hook: any, options: TGeneric): Promise<any>;
1610
+ } & {
1611
+ [x: string]: any;
1612
+ getGlobalScopes(): {};
1613
+ } & {
1614
+ [x: string]: any;
1615
+ useUniqueIds: boolean;
1616
+ usesUniqueIds(): boolean;
1617
+ uniqueIds(): never[];
1618
+ setUniqueIds(): void;
1619
+ };
1620
+ setAppends: ((appends: string[]) => (new () => IModel) & IModel & {
1621
+ [x: string]: any;
1622
+ timestamps: boolean;
1623
+ dateFormat: string;
1624
+ usesTimestamps(): boolean;
1625
+ updateTimestamps(): /*elided*/any;
1626
+ getCreatedAtColumn(): any;
1627
+ getUpdatedAtColumn(): any;
1628
+ setCreatedAt(value: any): /*elided*/any;
1629
+ setUpdatedAt(value: any): /*elided*/any;
1630
+ freshTimestamp(): Date;
1631
+ freshTimestampString(): any;
1632
+ } & TGeneric<any, string> & {
1633
+ [x: string]: any;
1634
+ attributes: TGeneric;
1635
+ original: TGeneric;
1636
+ casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
1637
+ changes: TGeneric;
1638
+ appends: any[];
1639
+ setAppends(appends: any[]): /*elided*/any;
1640
+ append(...keys: any[]): /*elided*/any;
1641
+ normalizeCastClassResponse(key: string, value: string): TGeneric;
1642
+ syncOriginal(): /*elided*/any;
1643
+ syncChanges(): /*elided*/any;
1644
+ syncOriginalAttribute(attribute: string): void;
1645
+ syncOriginalAttributes(...attributes: string[]): /*elided*/any;
1646
+ isDirty(...attributes: string[]): boolean;
1647
+ getDirty(): TGeneric;
1648
+ originalIsEquivalent(key: string): boolean;
1649
+ setAttributes(attributes: TGeneric): void;
1650
+ setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
1651
+ getAttributes(): {
1652
+ [x: string]: any;
1653
+ };
1654
+ setAttribute(key: string, value: string): /*elided*/any;
1655
+ getAttribute(key: string): any;
1656
+ castAttribute(key: string, value: string): any;
1657
+ attributesToData(): {
1658
+ [x: string]: any;
1659
+ };
1660
+ mutateAttribute(key: string, value: string | null): any;
1661
+ mutateAttributeForArray(_key: string, _value: string): void;
1662
+ isDateAttribute(key: string): boolean;
1663
+ serializeDate(date?: Date | string | null): string | null;
1664
+ getDates(): any[];
1665
+ getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
1666
+ getCastType(key: string): any;
1667
+ hasCast(key: string, types?: readonly string[]): boolean;
1668
+ withDayjs(date: string): dayjs0.Dayjs;
1669
+ isCustomCast(cast: any): boolean;
1670
+ isCustomDateTimeCast(cast: any): boolean;
1671
+ isDecimalCast(cast: any): boolean;
1672
+ isDateCastable(key: string): boolean;
1673
+ fromDateTime(value: string): string;
1674
+ getDateFormat(): any;
1675
+ asDecimal(value: string, decimals: number): string;
1676
+ asDateTime(value: any): Date | null;
1677
+ asDate(value: string): Date;
1678
+ } & {
1679
+ [x: string]: any;
1680
+ hidden: any[];
1681
+ visible: any[];
1682
+ makeVisible(...keys: string[]): /*elided*/any;
1683
+ makeHidden(key: string[], ...keys: string[]): /*elided*/any;
1684
+ getHidden(): any[];
1685
+ getVisible(): any[];
1686
+ setHidden(hidden: any[]): /*elided*/any;
1687
+ setVisible(visible: any[]): /*elided*/any;
1688
+ } & {
1689
+ [x: string]: any;
1690
+ execHooks(hook: any, options: TGeneric): Promise<any>;
1691
+ } & {
1692
+ [x: string]: any;
1693
+ getGlobalScopes(): {};
1694
+ } & {
1695
+ [x: string]: any;
1696
+ useUniqueIds: boolean;
1697
+ usesUniqueIds(): boolean;
1698
+ uniqueIds(): never[];
1699
+ setUniqueIds(): void;
1700
+ }) & ((appends: any[]) => (new () => IModel) & IModel & {
1701
+ [x: string]: any;
1702
+ timestamps: boolean;
1703
+ dateFormat: string;
1704
+ usesTimestamps(): boolean;
1705
+ updateTimestamps(): /*elided*/any;
1706
+ getCreatedAtColumn(): any;
1707
+ getUpdatedAtColumn(): any;
1708
+ setCreatedAt(value: any): /*elided*/any;
1709
+ setUpdatedAt(value: any): /*elided*/any;
1710
+ freshTimestamp(): Date;
1711
+ freshTimestampString(): any;
1712
+ } & TGeneric<any, string> & {
1713
+ [x: string]: any;
1714
+ attributes: TGeneric;
1715
+ original: TGeneric;
1716
+ casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
1717
+ changes: TGeneric;
1718
+ appends: any[];
1719
+ setAppends(appends: any[]): /*elided*/any;
1720
+ append(...keys: any[]): /*elided*/any;
1721
+ normalizeCastClassResponse(key: string, value: string): TGeneric;
1722
+ syncOriginal(): /*elided*/any;
1723
+ syncChanges(): /*elided*/any;
1724
+ syncOriginalAttribute(attribute: string): void;
1725
+ syncOriginalAttributes(...attributes: string[]): /*elided*/any;
1726
+ isDirty(...attributes: string[]): boolean;
1727
+ getDirty(): TGeneric;
1728
+ originalIsEquivalent(key: string): boolean;
1729
+ setAttributes(attributes: TGeneric): void;
1730
+ setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
1731
+ getAttributes(): {
1732
+ [x: string]: any;
1733
+ };
1734
+ setAttribute(key: string, value: string): /*elided*/any;
1735
+ getAttribute(key: string): any;
1736
+ castAttribute(key: string, value: string): any;
1737
+ attributesToData(): {
1738
+ [x: string]: any;
1739
+ };
1740
+ mutateAttribute(key: string, value: string | null): any;
1741
+ mutateAttributeForArray(_key: string, _value: string): void;
1742
+ isDateAttribute(key: string): boolean;
1743
+ serializeDate(date?: Date | string | null): string | null;
1744
+ getDates(): any[];
1745
+ getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
1746
+ getCastType(key: string): any;
1747
+ hasCast(key: string, types?: readonly string[]): boolean;
1748
+ withDayjs(date: string): dayjs0.Dayjs;
1749
+ isCustomCast(cast: any): boolean;
1750
+ isCustomDateTimeCast(cast: any): boolean;
1751
+ isDecimalCast(cast: any): boolean;
1752
+ isDateCastable(key: string): boolean;
1753
+ fromDateTime(value: string): string;
1754
+ getDateFormat(): any;
1755
+ asDecimal(value: string, decimals: number): string;
1756
+ asDateTime(value: any): Date | null;
1757
+ asDate(value: string): Date;
1758
+ } & {
1759
+ [x: string]: any;
1760
+ hidden: any[];
1761
+ visible: any[];
1762
+ makeVisible(...keys: string[]): /*elided*/any;
1763
+ makeHidden(key: string[], ...keys: string[]): /*elided*/any;
1764
+ getHidden(): any[];
1765
+ getVisible(): any[];
1766
+ setHidden(hidden: any[]): /*elided*/any;
1767
+ setVisible(visible: any[]): /*elided*/any;
1768
+ } & {
1769
+ [x: string]: any;
1770
+ execHooks(hook: any, options: TGeneric): Promise<any>;
1771
+ } & {
1772
+ [x: string]: any;
1773
+ getGlobalScopes(): {};
1774
+ } & {
1775
+ [x: string]: any;
1776
+ useUniqueIds: boolean;
1777
+ usesUniqueIds(): boolean;
1778
+ uniqueIds(): never[];
1779
+ setUniqueIds(): void;
1780
+ });
1781
+ append: ((key: string | string[]) => (new () => IModel) & IModel & {
1782
+ [x: string]: any;
1783
+ timestamps: boolean;
1784
+ dateFormat: string;
1785
+ usesTimestamps(): boolean;
1786
+ updateTimestamps(): /*elided*/any;
1787
+ getCreatedAtColumn(): any;
1788
+ getUpdatedAtColumn(): any;
1789
+ setCreatedAt(value: any): /*elided*/any;
1790
+ setUpdatedAt(value: any): /*elided*/any;
1791
+ freshTimestamp(): Date;
1792
+ freshTimestampString(): any;
1793
+ } & TGeneric<any, string> & {
1794
+ [x: string]: any;
1795
+ attributes: TGeneric;
1796
+ original: TGeneric;
1797
+ casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
1798
+ changes: TGeneric;
1799
+ appends: any[];
1800
+ setAppends(appends: any[]): /*elided*/any;
1801
+ append(...keys: any[]): /*elided*/any;
1802
+ normalizeCastClassResponse(key: string, value: string): TGeneric;
1803
+ syncOriginal(): /*elided*/any;
1804
+ syncChanges(): /*elided*/any;
1805
+ syncOriginalAttribute(attribute: string): void;
1806
+ syncOriginalAttributes(...attributes: string[]): /*elided*/any;
1807
+ isDirty(...attributes: string[]): boolean;
1808
+ getDirty(): TGeneric;
1809
+ originalIsEquivalent(key: string): boolean;
1810
+ setAttributes(attributes: TGeneric): void;
1811
+ setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
1812
+ getAttributes(): {
1813
+ [x: string]: any;
1814
+ };
1815
+ setAttribute(key: string, value: string): /*elided*/any;
1816
+ getAttribute(key: string): any;
1817
+ castAttribute(key: string, value: string): any;
1818
+ attributesToData(): {
1819
+ [x: string]: any;
1820
+ };
1821
+ mutateAttribute(key: string, value: string | null): any;
1822
+ mutateAttributeForArray(_key: string, _value: string): void;
1823
+ isDateAttribute(key: string): boolean;
1824
+ serializeDate(date?: Date | string | null): string | null;
1825
+ getDates(): any[];
1826
+ getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
1827
+ getCastType(key: string): any;
1828
+ hasCast(key: string, types?: readonly string[]): boolean;
1829
+ withDayjs(date: string): dayjs0.Dayjs;
1830
+ isCustomCast(cast: any): boolean;
1831
+ isCustomDateTimeCast(cast: any): boolean;
1832
+ isDecimalCast(cast: any): boolean;
1833
+ isDateCastable(key: string): boolean;
1834
+ fromDateTime(value: string): string;
1835
+ getDateFormat(): any;
1836
+ asDecimal(value: string, decimals: number): string;
1837
+ asDateTime(value: any): Date | null;
1838
+ asDate(value: string): Date;
1839
+ } & {
1840
+ [x: string]: any;
1841
+ hidden: any[];
1842
+ visible: any[];
1843
+ makeVisible(...keys: string[]): /*elided*/any;
1844
+ makeHidden(key: string[], ...keys: string[]): /*elided*/any;
1845
+ getHidden(): any[];
1846
+ getVisible(): any[];
1847
+ setHidden(hidden: any[]): /*elided*/any;
1848
+ setVisible(visible: any[]): /*elided*/any;
1849
+ } & {
1850
+ [x: string]: any;
1851
+ execHooks(hook: any, options: TGeneric): Promise<any>;
1852
+ } & {
1853
+ [x: string]: any;
1854
+ getGlobalScopes(): {};
1855
+ } & {
1856
+ [x: string]: any;
1857
+ useUniqueIds: boolean;
1858
+ usesUniqueIds(): boolean;
1859
+ uniqueIds(): never[];
1860
+ setUniqueIds(): void;
1861
+ }) & ((...keys: any[]) => (new () => IModel) & IModel & {
1862
+ [x: string]: any;
1863
+ timestamps: boolean;
1864
+ dateFormat: string;
1865
+ usesTimestamps(): boolean;
1866
+ updateTimestamps(): /*elided*/any;
1867
+ getCreatedAtColumn(): any;
1868
+ getUpdatedAtColumn(): any;
1869
+ setCreatedAt(value: any): /*elided*/any;
1870
+ setUpdatedAt(value: any): /*elided*/any;
1871
+ freshTimestamp(): Date;
1872
+ freshTimestampString(): any;
1873
+ } & TGeneric<any, string> & {
1874
+ [x: string]: any;
1875
+ attributes: TGeneric;
1876
+ original: TGeneric;
1877
+ casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
1878
+ changes: TGeneric;
1879
+ appends: any[];
1880
+ setAppends(appends: any[]): /*elided*/any;
1881
+ append(...keys: any[]): /*elided*/any;
1882
+ normalizeCastClassResponse(key: string, value: string): TGeneric;
1883
+ syncOriginal(): /*elided*/any;
1884
+ syncChanges(): /*elided*/any;
1885
+ syncOriginalAttribute(attribute: string): void;
1886
+ syncOriginalAttributes(...attributes: string[]): /*elided*/any;
1887
+ isDirty(...attributes: string[]): boolean;
1888
+ getDirty(): TGeneric;
1889
+ originalIsEquivalent(key: string): boolean;
1890
+ setAttributes(attributes: TGeneric): void;
1891
+ setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
1892
+ getAttributes(): {
1893
+ [x: string]: any;
1894
+ };
1895
+ setAttribute(key: string, value: string): /*elided*/any;
1896
+ getAttribute(key: string): any;
1897
+ castAttribute(key: string, value: string): any;
1898
+ attributesToData(): {
1899
+ [x: string]: any;
1900
+ };
1901
+ mutateAttribute(key: string, value: string | null): any;
1902
+ mutateAttributeForArray(_key: string, _value: string): void;
1903
+ isDateAttribute(key: string): boolean;
1904
+ serializeDate(date?: Date | string | null): string | null;
1905
+ getDates(): any[];
1906
+ getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
1907
+ getCastType(key: string): any;
1908
+ hasCast(key: string, types?: readonly string[]): boolean;
1909
+ withDayjs(date: string): dayjs0.Dayjs;
1910
+ isCustomCast(cast: any): boolean;
1911
+ isCustomDateTimeCast(cast: any): boolean;
1912
+ isDecimalCast(cast: any): boolean;
1913
+ isDateCastable(key: string): boolean;
1914
+ fromDateTime(value: string): string;
1915
+ getDateFormat(): any;
1916
+ asDecimal(value: string, decimals: number): string;
1917
+ asDateTime(value: any): Date | null;
1918
+ asDate(value: string): Date;
1919
+ } & {
1920
+ [x: string]: any;
1921
+ hidden: any[];
1922
+ visible: any[];
1923
+ makeVisible(...keys: string[]): /*elided*/any;
1924
+ makeHidden(key: string[], ...keys: string[]): /*elided*/any;
1925
+ getHidden(): any[];
1926
+ getVisible(): any[];
1927
+ setHidden(hidden: any[]): /*elided*/any;
1928
+ setVisible(visible: any[]): /*elided*/any;
1929
+ } & {
1930
+ [x: string]: any;
1931
+ execHooks(hook: any, options: TGeneric): Promise<any>;
1932
+ } & {
1933
+ [x: string]: any;
1934
+ getGlobalScopes(): {};
1935
+ } & {
1936
+ [x: string]: any;
1937
+ useUniqueIds: boolean;
1938
+ usesUniqueIds(): boolean;
1939
+ uniqueIds(): never[];
1940
+ setUniqueIds(): void;
1941
+ });
1942
+ getRelation: <T extends Model$1>(relation: string) => T | ICollection<T> | null | undefined;
1943
+ setRelation: <T extends Model$1>(relation: string, value: T | ICollection<T> | null) => (new () => IModel) & IModel & {
1944
+ [x: string]: any;
1945
+ timestamps: boolean;
1946
+ dateFormat: string;
1947
+ usesTimestamps(): boolean;
1948
+ updateTimestamps(): /*elided*/any;
1949
+ getCreatedAtColumn(): any;
1950
+ getUpdatedAtColumn(): any;
1951
+ setCreatedAt(value: any): /*elided*/any;
1952
+ setUpdatedAt(value: any): /*elided*/any;
1953
+ freshTimestamp(): Date;
1954
+ freshTimestampString(): any;
1955
+ } & TGeneric<any, string> & {
1956
+ [x: string]: any;
1957
+ attributes: TGeneric;
1958
+ original: TGeneric;
1959
+ casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
1960
+ changes: TGeneric;
1961
+ appends: any[];
1962
+ setAppends(appends: any[]): /*elided*/any;
1963
+ append(...keys: any[]): /*elided*/any;
1964
+ normalizeCastClassResponse(key: string, value: string): TGeneric;
1965
+ syncOriginal(): /*elided*/any;
1966
+ syncChanges(): /*elided*/any;
1967
+ syncOriginalAttribute(attribute: string): void;
1968
+ syncOriginalAttributes(...attributes: string[]): /*elided*/any;
1969
+ isDirty(...attributes: string[]): boolean;
1970
+ getDirty(): TGeneric;
1971
+ originalIsEquivalent(key: string): boolean;
1972
+ setAttributes(attributes: TGeneric): void;
1973
+ setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
1974
+ getAttributes(): {
1975
+ [x: string]: any;
1976
+ };
1977
+ setAttribute(key: string, value: string): /*elided*/any;
1978
+ getAttribute(key: string): any;
1979
+ castAttribute(key: string, value: string): any;
1980
+ attributesToData(): {
1981
+ [x: string]: any;
1982
+ };
1983
+ mutateAttribute(key: string, value: string | null): any;
1984
+ mutateAttributeForArray(_key: string, _value: string): void;
1985
+ isDateAttribute(key: string): boolean;
1986
+ serializeDate(date?: Date | string | null): string | null;
1987
+ getDates(): any[];
1988
+ getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
1989
+ getCastType(key: string): any;
1990
+ hasCast(key: string, types?: readonly string[]): boolean;
1991
+ withDayjs(date: string): dayjs0.Dayjs;
1992
+ isCustomCast(cast: any): boolean;
1993
+ isCustomDateTimeCast(cast: any): boolean;
1994
+ isDecimalCast(cast: any): boolean;
1995
+ isDateCastable(key: string): boolean;
1996
+ fromDateTime(value: string): string;
1997
+ getDateFormat(): any;
1998
+ asDecimal(value: string, decimals: number): string;
1999
+ asDateTime(value: any): Date | null;
2000
+ asDate(value: string): Date;
2001
+ } & {
2002
+ [x: string]: any;
2003
+ hidden: any[];
2004
+ visible: any[];
2005
+ makeVisible(...keys: string[]): /*elided*/any;
2006
+ makeHidden(key: string[], ...keys: string[]): /*elided*/any;
2007
+ getHidden(): any[];
2008
+ getVisible(): any[];
2009
+ setHidden(hidden: any[]): /*elided*/any;
2010
+ setVisible(visible: any[]): /*elided*/any;
2011
+ } & {
2012
+ [x: string]: any;
2013
+ execHooks(hook: any, options: TGeneric): Promise<any>;
2014
+ } & {
2015
+ [x: string]: any;
2016
+ getGlobalScopes(): {};
2017
+ } & {
2018
+ [x: string]: any;
2019
+ useUniqueIds: boolean;
2020
+ usesUniqueIds(): boolean;
2021
+ uniqueIds(): never[];
2022
+ setUniqueIds(): void;
2023
+ };
2024
+ unsetRelation: (relation: string) => (new () => IModel) & IModel & {
2025
+ [x: string]: any;
2026
+ timestamps: boolean;
2027
+ dateFormat: string;
2028
+ usesTimestamps(): boolean;
2029
+ updateTimestamps(): /*elided*/any;
2030
+ getCreatedAtColumn(): any;
2031
+ getUpdatedAtColumn(): any;
2032
+ setCreatedAt(value: any): /*elided*/any;
2033
+ setUpdatedAt(value: any): /*elided*/any;
2034
+ freshTimestamp(): Date;
2035
+ freshTimestampString(): any;
2036
+ } & TGeneric<any, string> & {
2037
+ [x: string]: any;
2038
+ attributes: TGeneric;
2039
+ original: TGeneric;
2040
+ casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
2041
+ changes: TGeneric;
2042
+ appends: any[];
2043
+ setAppends(appends: any[]): /*elided*/any;
2044
+ append(...keys: any[]): /*elided*/any;
2045
+ normalizeCastClassResponse(key: string, value: string): TGeneric;
2046
+ syncOriginal(): /*elided*/any;
2047
+ syncChanges(): /*elided*/any;
2048
+ syncOriginalAttribute(attribute: string): void;
2049
+ syncOriginalAttributes(...attributes: string[]): /*elided*/any;
2050
+ isDirty(...attributes: string[]): boolean;
2051
+ getDirty(): TGeneric;
2052
+ originalIsEquivalent(key: string): boolean;
2053
+ setAttributes(attributes: TGeneric): void;
2054
+ setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
2055
+ getAttributes(): {
2056
+ [x: string]: any;
2057
+ };
2058
+ setAttribute(key: string, value: string): /*elided*/any;
2059
+ getAttribute(key: string): any;
2060
+ castAttribute(key: string, value: string): any;
2061
+ attributesToData(): {
2062
+ [x: string]: any;
2063
+ };
2064
+ mutateAttribute(key: string, value: string | null): any;
2065
+ mutateAttributeForArray(_key: string, _value: string): void;
2066
+ isDateAttribute(key: string): boolean;
2067
+ serializeDate(date?: Date | string | null): string | null;
2068
+ getDates(): any[];
2069
+ getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
2070
+ getCastType(key: string): any;
2071
+ hasCast(key: string, types?: readonly string[]): boolean;
2072
+ withDayjs(date: string): dayjs0.Dayjs;
2073
+ isCustomCast(cast: any): boolean;
2074
+ isCustomDateTimeCast(cast: any): boolean;
2075
+ isDecimalCast(cast: any): boolean;
2076
+ isDateCastable(key: string): boolean;
2077
+ fromDateTime(value: string): string;
2078
+ getDateFormat(): any;
2079
+ asDecimal(value: string, decimals: number): string;
2080
+ asDateTime(value: any): Date | null;
2081
+ asDate(value: string): Date;
2082
+ } & {
2083
+ [x: string]: any;
2084
+ hidden: any[];
2085
+ visible: any[];
2086
+ makeVisible(...keys: string[]): /*elided*/any;
2087
+ makeHidden(key: string[], ...keys: string[]): /*elided*/any;
2088
+ getHidden(): any[];
2089
+ getVisible(): any[];
2090
+ setHidden(hidden: any[]): /*elided*/any;
2091
+ setVisible(visible: any[]): /*elided*/any;
2092
+ } & {
2093
+ [x: string]: any;
2094
+ execHooks(hook: any, options: TGeneric): Promise<any>;
2095
+ } & {
2096
+ [x: string]: any;
2097
+ getGlobalScopes(): {};
2098
+ } & {
2099
+ [x: string]: any;
2100
+ useUniqueIds: boolean;
2101
+ usesUniqueIds(): boolean;
2102
+ uniqueIds(): never[];
2103
+ setUniqueIds(): void;
2104
+ };
2105
+ relationLoaded: (relation: string) => boolean;
2106
+ makeVisible: ((attributes: string | string[]) => (new () => IModel) & IModel & {
2107
+ [x: string]: any;
2108
+ timestamps: boolean;
2109
+ dateFormat: string;
2110
+ usesTimestamps(): boolean;
2111
+ updateTimestamps(): /*elided*/any;
2112
+ getCreatedAtColumn(): any;
2113
+ getUpdatedAtColumn(): any;
2114
+ setCreatedAt(value: any): /*elided*/any;
2115
+ setUpdatedAt(value: any): /*elided*/any;
2116
+ freshTimestamp(): Date;
2117
+ freshTimestampString(): any;
2118
+ } & TGeneric<any, string> & {
2119
+ [x: string]: any;
2120
+ attributes: TGeneric;
2121
+ original: TGeneric;
2122
+ casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
2123
+ changes: TGeneric;
2124
+ appends: any[];
2125
+ setAppends(appends: any[]): /*elided*/any;
2126
+ append(...keys: any[]): /*elided*/any;
2127
+ normalizeCastClassResponse(key: string, value: string): TGeneric;
2128
+ syncOriginal(): /*elided*/any;
2129
+ syncChanges(): /*elided*/any;
2130
+ syncOriginalAttribute(attribute: string): void;
2131
+ syncOriginalAttributes(...attributes: string[]): /*elided*/any;
2132
+ isDirty(...attributes: string[]): boolean;
2133
+ getDirty(): TGeneric;
2134
+ originalIsEquivalent(key: string): boolean;
2135
+ setAttributes(attributes: TGeneric): void;
2136
+ setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
2137
+ getAttributes(): {
2138
+ [x: string]: any;
2139
+ };
2140
+ setAttribute(key: string, value: string): /*elided*/any;
2141
+ getAttribute(key: string): any;
2142
+ castAttribute(key: string, value: string): any;
2143
+ attributesToData(): {
2144
+ [x: string]: any;
2145
+ };
2146
+ mutateAttribute(key: string, value: string | null): any;
2147
+ mutateAttributeForArray(_key: string, _value: string): void;
2148
+ isDateAttribute(key: string): boolean;
2149
+ serializeDate(date?: Date | string | null): string | null;
2150
+ getDates(): any[];
2151
+ getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
2152
+ getCastType(key: string): any;
2153
+ hasCast(key: string, types?: readonly string[]): boolean;
2154
+ withDayjs(date: string): dayjs0.Dayjs;
2155
+ isCustomCast(cast: any): boolean;
2156
+ isCustomDateTimeCast(cast: any): boolean;
2157
+ isDecimalCast(cast: any): boolean;
2158
+ isDateCastable(key: string): boolean;
2159
+ fromDateTime(value: string): string;
2160
+ getDateFormat(): any;
2161
+ asDecimal(value: string, decimals: number): string;
2162
+ asDateTime(value: any): Date | null;
2163
+ asDate(value: string): Date;
2164
+ } & {
2165
+ [x: string]: any;
2166
+ hidden: any[];
2167
+ visible: any[];
2168
+ makeVisible(...keys: string[]): /*elided*/any;
2169
+ makeHidden(key: string[], ...keys: string[]): /*elided*/any;
2170
+ getHidden(): any[];
2171
+ getVisible(): any[];
2172
+ setHidden(hidden: any[]): /*elided*/any;
2173
+ setVisible(visible: any[]): /*elided*/any;
2174
+ } & {
2175
+ [x: string]: any;
2176
+ execHooks(hook: any, options: TGeneric): Promise<any>;
2177
+ } & {
2178
+ [x: string]: any;
2179
+ getGlobalScopes(): {};
2180
+ } & {
2181
+ [x: string]: any;
2182
+ useUniqueIds: boolean;
2183
+ usesUniqueIds(): boolean;
2184
+ uniqueIds(): never[];
2185
+ setUniqueIds(): void;
2186
+ }) & ((...keys: string[]) => (new () => IModel) & IModel & {
2187
+ [x: string]: any;
2188
+ timestamps: boolean;
2189
+ dateFormat: string;
2190
+ usesTimestamps(): boolean;
2191
+ updateTimestamps(): /*elided*/any;
2192
+ getCreatedAtColumn(): any;
2193
+ getUpdatedAtColumn(): any;
2194
+ setCreatedAt(value: any): /*elided*/any;
2195
+ setUpdatedAt(value: any): /*elided*/any;
2196
+ freshTimestamp(): Date;
2197
+ freshTimestampString(): any;
2198
+ } & TGeneric<any, string> & {
2199
+ [x: string]: any;
2200
+ attributes: TGeneric;
2201
+ original: TGeneric;
2202
+ casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
2203
+ changes: TGeneric;
2204
+ appends: any[];
2205
+ setAppends(appends: any[]): /*elided*/any;
2206
+ append(...keys: any[]): /*elided*/any;
2207
+ normalizeCastClassResponse(key: string, value: string): TGeneric;
2208
+ syncOriginal(): /*elided*/any;
2209
+ syncChanges(): /*elided*/any;
2210
+ syncOriginalAttribute(attribute: string): void;
2211
+ syncOriginalAttributes(...attributes: string[]): /*elided*/any;
2212
+ isDirty(...attributes: string[]): boolean;
2213
+ getDirty(): TGeneric;
2214
+ originalIsEquivalent(key: string): boolean;
2215
+ setAttributes(attributes: TGeneric): void;
2216
+ setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
2217
+ getAttributes(): {
2218
+ [x: string]: any;
2219
+ };
2220
+ setAttribute(key: string, value: string): /*elided*/any;
2221
+ getAttribute(key: string): any;
2222
+ castAttribute(key: string, value: string): any;
2223
+ attributesToData(): {
2224
+ [x: string]: any;
2225
+ };
2226
+ mutateAttribute(key: string, value: string | null): any;
2227
+ mutateAttributeForArray(_key: string, _value: string): void;
2228
+ isDateAttribute(key: string): boolean;
2229
+ serializeDate(date?: Date | string | null): string | null;
2230
+ getDates(): any[];
2231
+ getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
2232
+ getCastType(key: string): any;
2233
+ hasCast(key: string, types?: readonly string[]): boolean;
2234
+ withDayjs(date: string): dayjs0.Dayjs;
2235
+ isCustomCast(cast: any): boolean;
2236
+ isCustomDateTimeCast(cast: any): boolean;
2237
+ isDecimalCast(cast: any): boolean;
2238
+ isDateCastable(key: string): boolean;
2239
+ fromDateTime(value: string): string;
2240
+ getDateFormat(): any;
2241
+ asDecimal(value: string, decimals: number): string;
2242
+ asDateTime(value: any): Date | null;
2243
+ asDate(value: string): Date;
2244
+ } & {
2245
+ [x: string]: any;
2246
+ hidden: any[];
2247
+ visible: any[];
2248
+ makeVisible(...keys: string[]): /*elided*/any;
2249
+ makeHidden(key: string[], ...keys: string[]): /*elided*/any;
2250
+ getHidden(): any[];
2251
+ getVisible(): any[];
2252
+ setHidden(hidden: any[]): /*elided*/any;
2253
+ setVisible(visible: any[]): /*elided*/any;
2254
+ } & {
2255
+ [x: string]: any;
2256
+ execHooks(hook: any, options: TGeneric): Promise<any>;
2257
+ } & {
2258
+ [x: string]: any;
2259
+ getGlobalScopes(): {};
2260
+ } & {
2261
+ [x: string]: any;
2262
+ useUniqueIds: boolean;
2263
+ usesUniqueIds(): boolean;
2264
+ uniqueIds(): never[];
2265
+ setUniqueIds(): void;
2266
+ });
2267
+ makeHidden: ((attributes: string | string[]) => (new () => IModel) & IModel & {
2268
+ [x: string]: any;
2269
+ timestamps: boolean;
2270
+ dateFormat: string;
2271
+ usesTimestamps(): boolean;
2272
+ updateTimestamps(): /*elided*/any;
2273
+ getCreatedAtColumn(): any;
2274
+ getUpdatedAtColumn(): any;
2275
+ setCreatedAt(value: any): /*elided*/any;
2276
+ setUpdatedAt(value: any): /*elided*/any;
2277
+ freshTimestamp(): Date;
2278
+ freshTimestampString(): any;
2279
+ } & TGeneric<any, string> & {
2280
+ [x: string]: any;
2281
+ attributes: TGeneric;
2282
+ original: TGeneric;
2283
+ casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
2284
+ changes: TGeneric;
2285
+ appends: any[];
2286
+ setAppends(appends: any[]): /*elided*/any;
2287
+ append(...keys: any[]): /*elided*/any;
2288
+ normalizeCastClassResponse(key: string, value: string): TGeneric;
2289
+ syncOriginal(): /*elided*/any;
2290
+ syncChanges(): /*elided*/any;
2291
+ syncOriginalAttribute(attribute: string): void;
2292
+ syncOriginalAttributes(...attributes: string[]): /*elided*/any;
2293
+ isDirty(...attributes: string[]): boolean;
2294
+ getDirty(): TGeneric;
2295
+ originalIsEquivalent(key: string): boolean;
2296
+ setAttributes(attributes: TGeneric): void;
2297
+ setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
2298
+ getAttributes(): {
2299
+ [x: string]: any;
2300
+ };
2301
+ setAttribute(key: string, value: string): /*elided*/any;
2302
+ getAttribute(key: string): any;
2303
+ castAttribute(key: string, value: string): any;
2304
+ attributesToData(): {
2305
+ [x: string]: any;
2306
+ };
2307
+ mutateAttribute(key: string, value: string | null): any;
2308
+ mutateAttributeForArray(_key: string, _value: string): void;
2309
+ isDateAttribute(key: string): boolean;
2310
+ serializeDate(date?: Date | string | null): string | null;
2311
+ getDates(): any[];
2312
+ getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
2313
+ getCastType(key: string): any;
2314
+ hasCast(key: string, types?: readonly string[]): boolean;
2315
+ withDayjs(date: string): dayjs0.Dayjs;
2316
+ isCustomCast(cast: any): boolean;
2317
+ isCustomDateTimeCast(cast: any): boolean;
2318
+ isDecimalCast(cast: any): boolean;
2319
+ isDateCastable(key: string): boolean;
2320
+ fromDateTime(value: string): string;
2321
+ getDateFormat(): any;
2322
+ asDecimal(value: string, decimals: number): string;
2323
+ asDateTime(value: any): Date | null;
2324
+ asDate(value: string): Date;
2325
+ } & {
2326
+ [x: string]: any;
2327
+ hidden: any[];
2328
+ visible: any[];
2329
+ makeVisible(...keys: string[]): /*elided*/any;
2330
+ makeHidden(key: string[], ...keys: string[]): /*elided*/any;
2331
+ getHidden(): any[];
2332
+ getVisible(): any[];
2333
+ setHidden(hidden: any[]): /*elided*/any;
2334
+ setVisible(visible: any[]): /*elided*/any;
2335
+ } & {
2336
+ [x: string]: any;
2337
+ execHooks(hook: any, options: TGeneric): Promise<any>;
2338
+ } & {
2339
+ [x: string]: any;
2340
+ getGlobalScopes(): {};
2341
+ } & {
2342
+ [x: string]: any;
2343
+ useUniqueIds: boolean;
2344
+ usesUniqueIds(): boolean;
2345
+ uniqueIds(): never[];
2346
+ setUniqueIds(): void;
2347
+ }) & ((key: string[], ...keys: string[]) => (new () => IModel) & IModel & {
2348
+ [x: string]: any;
2349
+ timestamps: boolean;
2350
+ dateFormat: string;
2351
+ usesTimestamps(): boolean;
2352
+ updateTimestamps(): /*elided*/any;
2353
+ getCreatedAtColumn(): any;
2354
+ getUpdatedAtColumn(): any;
2355
+ setCreatedAt(value: any): /*elided*/any;
2356
+ setUpdatedAt(value: any): /*elided*/any;
2357
+ freshTimestamp(): Date;
2358
+ freshTimestampString(): any;
2359
+ } & TGeneric<any, string> & {
2360
+ [x: string]: any;
2361
+ attributes: TGeneric;
2362
+ original: TGeneric;
2363
+ casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
2364
+ changes: TGeneric;
2365
+ appends: any[];
2366
+ setAppends(appends: any[]): /*elided*/any;
2367
+ append(...keys: any[]): /*elided*/any;
2368
+ normalizeCastClassResponse(key: string, value: string): TGeneric;
2369
+ syncOriginal(): /*elided*/any;
2370
+ syncChanges(): /*elided*/any;
2371
+ syncOriginalAttribute(attribute: string): void;
2372
+ syncOriginalAttributes(...attributes: string[]): /*elided*/any;
2373
+ isDirty(...attributes: string[]): boolean;
2374
+ getDirty(): TGeneric;
2375
+ originalIsEquivalent(key: string): boolean;
2376
+ setAttributes(attributes: TGeneric): void;
2377
+ setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
2378
+ getAttributes(): {
2379
+ [x: string]: any;
2380
+ };
2381
+ setAttribute(key: string, value: string): /*elided*/any;
2382
+ getAttribute(key: string): any;
2383
+ castAttribute(key: string, value: string): any;
2384
+ attributesToData(): {
2385
+ [x: string]: any;
2386
+ };
2387
+ mutateAttribute(key: string, value: string | null): any;
2388
+ mutateAttributeForArray(_key: string, _value: string): void;
2389
+ isDateAttribute(key: string): boolean;
2390
+ serializeDate(date?: Date | string | null): string | null;
2391
+ getDates(): any[];
2392
+ getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
2393
+ getCastType(key: string): any;
2394
+ hasCast(key: string, types?: readonly string[]): boolean;
2395
+ withDayjs(date: string): dayjs0.Dayjs;
2396
+ isCustomCast(cast: any): boolean;
2397
+ isCustomDateTimeCast(cast: any): boolean;
2398
+ isDecimalCast(cast: any): boolean;
2399
+ isDateCastable(key: string): boolean;
2400
+ fromDateTime(value: string): string;
2401
+ getDateFormat(): any;
2402
+ asDecimal(value: string, decimals: number): string;
2403
+ asDateTime(value: any): Date | null;
2404
+ asDate(value: string): Date;
2405
+ } & {
2406
+ [x: string]: any;
2407
+ hidden: any[];
2408
+ visible: any[];
2409
+ makeVisible(...keys: string[]): /*elided*/any;
2410
+ makeHidden(key: string[], ...keys: string[]): /*elided*/any;
2411
+ getHidden(): any[];
2412
+ getVisible(): any[];
2413
+ setHidden(hidden: any[]): /*elided*/any;
2414
+ setVisible(visible: any[]): /*elided*/any;
2415
+ } & {
2416
+ [x: string]: any;
2417
+ execHooks(hook: any, options: TGeneric): Promise<any>;
2418
+ } & {
2419
+ [x: string]: any;
2420
+ getGlobalScopes(): {};
2421
+ } & {
2422
+ [x: string]: any;
2423
+ useUniqueIds: boolean;
2424
+ usesUniqueIds(): boolean;
2425
+ uniqueIds(): never[];
2426
+ setUniqueIds(): void;
2427
+ });
2428
+ newCollection: (models?: any[]) => ICollection<Model$1>;
2429
+ load: {
2430
+ (relations: WithRelationType): Promise<(new () => IModel) & IModel & {
2431
+ [x: string]: any;
2432
+ timestamps: boolean;
2433
+ dateFormat: string;
2434
+ usesTimestamps(): boolean;
2435
+ updateTimestamps(): /*elided*/any;
2436
+ getCreatedAtColumn(): any;
2437
+ getUpdatedAtColumn(): any;
2438
+ setCreatedAt(value: any): /*elided*/any;
2439
+ setUpdatedAt(value: any): /*elided*/any;
2440
+ freshTimestamp(): Date;
2441
+ freshTimestampString(): any;
2442
+ } & TGeneric<any, string> & {
2443
+ [x: string]: any;
2444
+ attributes: TGeneric;
2445
+ original: TGeneric;
2446
+ casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
2447
+ changes: TGeneric;
2448
+ appends: any[];
2449
+ setAppends(appends: any[]): /*elided*/any;
2450
+ append(...keys: any[]): /*elided*/any;
2451
+ normalizeCastClassResponse(key: string, value: string): TGeneric;
2452
+ syncOriginal(): /*elided*/any;
2453
+ syncChanges(): /*elided*/any;
2454
+ syncOriginalAttribute(attribute: string): void;
2455
+ syncOriginalAttributes(...attributes: string[]): /*elided*/any;
2456
+ isDirty(...attributes: string[]): boolean;
2457
+ getDirty(): TGeneric;
2458
+ originalIsEquivalent(key: string): boolean;
2459
+ setAttributes(attributes: TGeneric): void;
2460
+ setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
2461
+ getAttributes(): {
2462
+ [x: string]: any;
2463
+ };
2464
+ setAttribute(key: string, value: string): /*elided*/any;
2465
+ getAttribute(key: string): any;
2466
+ castAttribute(key: string, value: string): any;
2467
+ attributesToData(): {
2468
+ [x: string]: any;
2469
+ };
2470
+ mutateAttribute(key: string, value: string | null): any;
2471
+ mutateAttributeForArray(_key: string, _value: string): void;
2472
+ isDateAttribute(key: string): boolean;
2473
+ serializeDate(date?: Date | string | null): string | null;
2474
+ getDates(): any[];
2475
+ getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
2476
+ getCastType(key: string): any;
2477
+ hasCast(key: string, types?: readonly string[]): boolean;
2478
+ withDayjs(date: string): dayjs0.Dayjs;
2479
+ isCustomCast(cast: any): boolean;
2480
+ isCustomDateTimeCast(cast: any): boolean;
2481
+ isDecimalCast(cast: any): boolean;
2482
+ isDateCastable(key: string): boolean;
2483
+ fromDateTime(value: string): string;
2484
+ getDateFormat(): any;
2485
+ asDecimal(value: string, decimals: number): string;
2486
+ asDateTime(value: any): Date | null;
2487
+ asDate(value: string): Date;
2488
+ } & {
2489
+ [x: string]: any;
2490
+ hidden: any[];
2491
+ visible: any[];
2492
+ makeVisible(...keys: string[]): /*elided*/any;
2493
+ makeHidden(key: string[], ...keys: string[]): /*elided*/any;
2494
+ getHidden(): any[];
2495
+ getVisible(): any[];
2496
+ setHidden(hidden: any[]): /*elided*/any;
2497
+ setVisible(visible: any[]): /*elided*/any;
2498
+ } & {
2499
+ [x: string]: any;
2500
+ execHooks(hook: any, options: TGeneric): Promise<any>;
2501
+ } & {
2502
+ [x: string]: any;
2503
+ getGlobalScopes(): {};
2504
+ } & {
2505
+ [x: string]: any;
2506
+ useUniqueIds: boolean;
2507
+ usesUniqueIds(): boolean;
2508
+ uniqueIds(): never[];
2509
+ setUniqueIds(): void;
2510
+ }>;
2511
+ (...relations: WithRelationType[]): Promise<(new () => IModel) & IModel & {
2512
+ [x: string]: any;
2513
+ timestamps: boolean;
2514
+ dateFormat: string;
2515
+ usesTimestamps(): boolean;
2516
+ updateTimestamps(): /*elided*/any;
2517
+ getCreatedAtColumn(): any;
2518
+ getUpdatedAtColumn(): any;
2519
+ setCreatedAt(value: any): /*elided*/any;
2520
+ setUpdatedAt(value: any): /*elided*/any;
2521
+ freshTimestamp(): Date;
2522
+ freshTimestampString(): any;
2523
+ } & TGeneric<any, string> & {
2524
+ [x: string]: any;
2525
+ attributes: TGeneric;
2526
+ original: TGeneric;
2527
+ casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
2528
+ changes: TGeneric;
2529
+ appends: any[];
2530
+ setAppends(appends: any[]): /*elided*/any;
2531
+ append(...keys: any[]): /*elided*/any;
2532
+ normalizeCastClassResponse(key: string, value: string): TGeneric;
2533
+ syncOriginal(): /*elided*/any;
2534
+ syncChanges(): /*elided*/any;
2535
+ syncOriginalAttribute(attribute: string): void;
2536
+ syncOriginalAttributes(...attributes: string[]): /*elided*/any;
2537
+ isDirty(...attributes: string[]): boolean;
2538
+ getDirty(): TGeneric;
2539
+ originalIsEquivalent(key: string): boolean;
2540
+ setAttributes(attributes: TGeneric): void;
2541
+ setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
2542
+ getAttributes(): {
2543
+ [x: string]: any;
2544
+ };
2545
+ setAttribute(key: string, value: string): /*elided*/any;
2546
+ getAttribute(key: string): any;
2547
+ castAttribute(key: string, value: string): any;
2548
+ attributesToData(): {
2549
+ [x: string]: any;
2550
+ };
2551
+ mutateAttribute(key: string, value: string | null): any;
2552
+ mutateAttributeForArray(_key: string, _value: string): void;
2553
+ isDateAttribute(key: string): boolean;
2554
+ serializeDate(date?: Date | string | null): string | null;
2555
+ getDates(): any[];
2556
+ getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
2557
+ getCastType(key: string): any;
2558
+ hasCast(key: string, types?: readonly string[]): boolean;
2559
+ withDayjs(date: string): dayjs0.Dayjs;
2560
+ isCustomCast(cast: any): boolean;
2561
+ isCustomDateTimeCast(cast: any): boolean;
2562
+ isDecimalCast(cast: any): boolean;
2563
+ isDateCastable(key: string): boolean;
2564
+ fromDateTime(value: string): string;
2565
+ getDateFormat(): any;
2566
+ asDecimal(value: string, decimals: number): string;
2567
+ asDateTime(value: any): Date | null;
2568
+ asDate(value: string): Date;
2569
+ } & {
2570
+ [x: string]: any;
2571
+ hidden: any[];
2572
+ visible: any[];
2573
+ makeVisible(...keys: string[]): /*elided*/any;
2574
+ makeHidden(key: string[], ...keys: string[]): /*elided*/any;
2575
+ getHidden(): any[];
2576
+ getVisible(): any[];
2577
+ setHidden(hidden: any[]): /*elided*/any;
2578
+ setVisible(visible: any[]): /*elided*/any;
2579
+ } & {
2580
+ [x: string]: any;
2581
+ execHooks(hook: any, options: TGeneric): Promise<any>;
2582
+ } & {
2583
+ [x: string]: any;
2584
+ getGlobalScopes(): {};
2585
+ } & {
2586
+ [x: string]: any;
2587
+ useUniqueIds: boolean;
2588
+ usesUniqueIds(): boolean;
2589
+ uniqueIds(): never[];
2590
+ setUniqueIds(): void;
2591
+ }>;
2592
+ };
2593
+ loadAggregate: (relations: WithRelationType, column: any, callback?: any) => Promise<(new () => IModel) & IModel & {
2594
+ [x: string]: any;
2595
+ timestamps: boolean;
2596
+ dateFormat: string;
2597
+ usesTimestamps(): boolean;
2598
+ updateTimestamps(): /*elided*/any;
2599
+ getCreatedAtColumn(): any;
2600
+ getUpdatedAtColumn(): any;
2601
+ setCreatedAt(value: any): /*elided*/any;
2602
+ setUpdatedAt(value: any): /*elided*/any;
2603
+ freshTimestamp(): Date;
2604
+ freshTimestampString(): any;
2605
+ } & TGeneric<any, string> & {
2606
+ [x: string]: any;
2607
+ attributes: TGeneric;
2608
+ original: TGeneric;
2609
+ casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
2610
+ changes: TGeneric;
2611
+ appends: any[];
2612
+ setAppends(appends: any[]): /*elided*/any;
2613
+ append(...keys: any[]): /*elided*/any;
2614
+ normalizeCastClassResponse(key: string, value: string): TGeneric;
2615
+ syncOriginal(): /*elided*/any;
2616
+ syncChanges(): /*elided*/any;
2617
+ syncOriginalAttribute(attribute: string): void;
2618
+ syncOriginalAttributes(...attributes: string[]): /*elided*/any;
2619
+ isDirty(...attributes: string[]): boolean;
2620
+ getDirty(): TGeneric;
2621
+ originalIsEquivalent(key: string): boolean;
2622
+ setAttributes(attributes: TGeneric): void;
2623
+ setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
2624
+ getAttributes(): {
2625
+ [x: string]: any;
2626
+ };
2627
+ setAttribute(key: string, value: string): /*elided*/any;
2628
+ getAttribute(key: string): any;
2629
+ castAttribute(key: string, value: string): any;
2630
+ attributesToData(): {
2631
+ [x: string]: any;
2632
+ };
2633
+ mutateAttribute(key: string, value: string | null): any;
2634
+ mutateAttributeForArray(_key: string, _value: string): void;
2635
+ isDateAttribute(key: string): boolean;
2636
+ serializeDate(date?: Date | string | null): string | null;
2637
+ getDates(): any[];
2638
+ getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
2639
+ getCastType(key: string): any;
2640
+ hasCast(key: string, types?: readonly string[]): boolean;
2641
+ withDayjs(date: string): dayjs0.Dayjs;
2642
+ isCustomCast(cast: any): boolean;
2643
+ isCustomDateTimeCast(cast: any): boolean;
2644
+ isDecimalCast(cast: any): boolean;
2645
+ isDateCastable(key: string): boolean;
2646
+ fromDateTime(value: string): string;
2647
+ getDateFormat(): any;
2648
+ asDecimal(value: string, decimals: number): string;
2649
+ asDateTime(value: any): Date | null;
2650
+ asDate(value: string): Date;
2651
+ } & {
2652
+ [x: string]: any;
2653
+ hidden: any[];
2654
+ visible: any[];
2655
+ makeVisible(...keys: string[]): /*elided*/any;
2656
+ makeHidden(key: string[], ...keys: string[]): /*elided*/any;
2657
+ getHidden(): any[];
2658
+ getVisible(): any[];
2659
+ setHidden(hidden: any[]): /*elided*/any;
2660
+ setVisible(visible: any[]): /*elided*/any;
2661
+ } & {
2662
+ [x: string]: any;
2663
+ execHooks(hook: any, options: TGeneric): Promise<any>;
2664
+ } & {
2665
+ [x: string]: any;
2666
+ getGlobalScopes(): {};
2667
+ } & {
2668
+ [x: string]: any;
2669
+ useUniqueIds: boolean;
2670
+ usesUniqueIds(): boolean;
2671
+ uniqueIds(): never[];
2672
+ setUniqueIds(): void;
2673
+ }>;
2674
+ loadCount: (...relations: WithRelationType[]) => Promise<(new () => IModel) & IModel & {
2675
+ [x: string]: any;
2676
+ timestamps: boolean;
2677
+ dateFormat: string;
2678
+ usesTimestamps(): boolean;
2679
+ updateTimestamps(): /*elided*/any;
2680
+ getCreatedAtColumn(): any;
2681
+ getUpdatedAtColumn(): any;
2682
+ setCreatedAt(value: any): /*elided*/any;
2683
+ setUpdatedAt(value: any): /*elided*/any;
2684
+ freshTimestamp(): Date;
2685
+ freshTimestampString(): any;
2686
+ } & TGeneric<any, string> & {
2687
+ [x: string]: any;
2688
+ attributes: TGeneric;
2689
+ original: TGeneric;
2690
+ casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
2691
+ changes: TGeneric;
2692
+ appends: any[];
2693
+ setAppends(appends: any[]): /*elided*/any;
2694
+ append(...keys: any[]): /*elided*/any;
2695
+ normalizeCastClassResponse(key: string, value: string): TGeneric;
2696
+ syncOriginal(): /*elided*/any;
2697
+ syncChanges(): /*elided*/any;
2698
+ syncOriginalAttribute(attribute: string): void;
2699
+ syncOriginalAttributes(...attributes: string[]): /*elided*/any;
2700
+ isDirty(...attributes: string[]): boolean;
2701
+ getDirty(): TGeneric;
2702
+ originalIsEquivalent(key: string): boolean;
2703
+ setAttributes(attributes: TGeneric): void;
2704
+ setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
2705
+ getAttributes(): {
2706
+ [x: string]: any;
2707
+ };
2708
+ setAttribute(key: string, value: string): /*elided*/any;
2709
+ getAttribute(key: string): any;
2710
+ castAttribute(key: string, value: string): any;
2711
+ attributesToData(): {
2712
+ [x: string]: any;
2713
+ };
2714
+ mutateAttribute(key: string, value: string | null): any;
2715
+ mutateAttributeForArray(_key: string, _value: string): void;
2716
+ isDateAttribute(key: string): boolean;
2717
+ serializeDate(date?: Date | string | null): string | null;
2718
+ getDates(): any[];
2719
+ getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
2720
+ getCastType(key: string): any;
2721
+ hasCast(key: string, types?: readonly string[]): boolean;
2722
+ withDayjs(date: string): dayjs0.Dayjs;
2723
+ isCustomCast(cast: any): boolean;
2724
+ isCustomDateTimeCast(cast: any): boolean;
2725
+ isDecimalCast(cast: any): boolean;
2726
+ isDateCastable(key: string): boolean;
2727
+ fromDateTime(value: string): string;
2728
+ getDateFormat(): any;
2729
+ asDecimal(value: string, decimals: number): string;
2730
+ asDateTime(value: any): Date | null;
2731
+ asDate(value: string): Date;
2732
+ } & {
2733
+ [x: string]: any;
2734
+ hidden: any[];
2735
+ visible: any[];
2736
+ makeVisible(...keys: string[]): /*elided*/any;
2737
+ makeHidden(key: string[], ...keys: string[]): /*elided*/any;
2738
+ getHidden(): any[];
2739
+ getVisible(): any[];
2740
+ setHidden(hidden: any[]): /*elided*/any;
2741
+ setVisible(visible: any[]): /*elided*/any;
2742
+ } & {
2743
+ [x: string]: any;
2744
+ execHooks(hook: any, options: TGeneric): Promise<any>;
2745
+ } & {
2746
+ [x: string]: any;
2747
+ getGlobalScopes(): {};
2748
+ } & {
2749
+ [x: string]: any;
2750
+ useUniqueIds: boolean;
2751
+ usesUniqueIds(): boolean;
2752
+ uniqueIds(): never[];
2753
+ setUniqueIds(): void;
2754
+ }>;
2755
+ loadMax: (relations: WithRelationType, column: string) => Promise<(new () => IModel) & IModel & {
2756
+ [x: string]: any;
2757
+ timestamps: boolean;
2758
+ dateFormat: string;
2759
+ usesTimestamps(): boolean;
2760
+ updateTimestamps(): /*elided*/any;
2761
+ getCreatedAtColumn(): any;
2762
+ getUpdatedAtColumn(): any;
2763
+ setCreatedAt(value: any): /*elided*/any;
2764
+ setUpdatedAt(value: any): /*elided*/any;
2765
+ freshTimestamp(): Date;
2766
+ freshTimestampString(): any;
2767
+ } & TGeneric<any, string> & {
2768
+ [x: string]: any;
2769
+ attributes: TGeneric;
2770
+ original: TGeneric;
2771
+ casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
2772
+ changes: TGeneric;
2773
+ appends: any[];
2774
+ setAppends(appends: any[]): /*elided*/any;
2775
+ append(...keys: any[]): /*elided*/any;
2776
+ normalizeCastClassResponse(key: string, value: string): TGeneric;
2777
+ syncOriginal(): /*elided*/any;
2778
+ syncChanges(): /*elided*/any;
2779
+ syncOriginalAttribute(attribute: string): void;
2780
+ syncOriginalAttributes(...attributes: string[]): /*elided*/any;
2781
+ isDirty(...attributes: string[]): boolean;
2782
+ getDirty(): TGeneric;
2783
+ originalIsEquivalent(key: string): boolean;
2784
+ setAttributes(attributes: TGeneric): void;
2785
+ setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
2786
+ getAttributes(): {
2787
+ [x: string]: any;
2788
+ };
2789
+ setAttribute(key: string, value: string): /*elided*/any;
2790
+ getAttribute(key: string): any;
2791
+ castAttribute(key: string, value: string): any;
2792
+ attributesToData(): {
2793
+ [x: string]: any;
2794
+ };
2795
+ mutateAttribute(key: string, value: string | null): any;
2796
+ mutateAttributeForArray(_key: string, _value: string): void;
2797
+ isDateAttribute(key: string): boolean;
2798
+ serializeDate(date?: Date | string | null): string | null;
2799
+ getDates(): any[];
2800
+ getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
2801
+ getCastType(key: string): any;
2802
+ hasCast(key: string, types?: readonly string[]): boolean;
2803
+ withDayjs(date: string): dayjs0.Dayjs;
2804
+ isCustomCast(cast: any): boolean;
2805
+ isCustomDateTimeCast(cast: any): boolean;
2806
+ isDecimalCast(cast: any): boolean;
2807
+ isDateCastable(key: string): boolean;
2808
+ fromDateTime(value: string): string;
2809
+ getDateFormat(): any;
2810
+ asDecimal(value: string, decimals: number): string;
2811
+ asDateTime(value: any): Date | null;
2812
+ asDate(value: string): Date;
2813
+ } & {
2814
+ [x: string]: any;
2815
+ hidden: any[];
2816
+ visible: any[];
2817
+ makeVisible(...keys: string[]): /*elided*/any;
2818
+ makeHidden(key: string[], ...keys: string[]): /*elided*/any;
2819
+ getHidden(): any[];
2820
+ getVisible(): any[];
2821
+ setHidden(hidden: any[]): /*elided*/any;
2822
+ setVisible(visible: any[]): /*elided*/any;
2823
+ } & {
2824
+ [x: string]: any;
2825
+ execHooks(hook: any, options: TGeneric): Promise<any>;
2826
+ } & {
2827
+ [x: string]: any;
2828
+ getGlobalScopes(): {};
2829
+ } & {
2830
+ [x: string]: any;
2831
+ useUniqueIds: boolean;
2832
+ usesUniqueIds(): boolean;
2833
+ uniqueIds(): never[];
2834
+ setUniqueIds(): void;
2835
+ }>;
2836
+ loadMin: (relations: WithRelationType, column: string) => Promise<(new () => IModel) & IModel & {
2837
+ [x: string]: any;
2838
+ timestamps: boolean;
2839
+ dateFormat: string;
2840
+ usesTimestamps(): boolean;
2841
+ updateTimestamps(): /*elided*/any;
2842
+ getCreatedAtColumn(): any;
2843
+ getUpdatedAtColumn(): any;
2844
+ setCreatedAt(value: any): /*elided*/any;
2845
+ setUpdatedAt(value: any): /*elided*/any;
2846
+ freshTimestamp(): Date;
2847
+ freshTimestampString(): any;
2848
+ } & TGeneric<any, string> & {
2849
+ [x: string]: any;
2850
+ attributes: TGeneric;
2851
+ original: TGeneric;
2852
+ casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
2853
+ changes: TGeneric;
2854
+ appends: any[];
2855
+ setAppends(appends: any[]): /*elided*/any;
2856
+ append(...keys: any[]): /*elided*/any;
2857
+ normalizeCastClassResponse(key: string, value: string): TGeneric;
2858
+ syncOriginal(): /*elided*/any;
2859
+ syncChanges(): /*elided*/any;
2860
+ syncOriginalAttribute(attribute: string): void;
2861
+ syncOriginalAttributes(...attributes: string[]): /*elided*/any;
2862
+ isDirty(...attributes: string[]): boolean;
2863
+ getDirty(): TGeneric;
2864
+ originalIsEquivalent(key: string): boolean;
2865
+ setAttributes(attributes: TGeneric): void;
2866
+ setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
2867
+ getAttributes(): {
2868
+ [x: string]: any;
2869
+ };
2870
+ setAttribute(key: string, value: string): /*elided*/any;
2871
+ getAttribute(key: string): any;
2872
+ castAttribute(key: string, value: string): any;
2873
+ attributesToData(): {
2874
+ [x: string]: any;
2875
+ };
2876
+ mutateAttribute(key: string, value: string | null): any;
2877
+ mutateAttributeForArray(_key: string, _value: string): void;
2878
+ isDateAttribute(key: string): boolean;
2879
+ serializeDate(date?: Date | string | null): string | null;
2880
+ getDates(): any[];
2881
+ getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
2882
+ getCastType(key: string): any;
2883
+ hasCast(key: string, types?: readonly string[]): boolean;
2884
+ withDayjs(date: string): dayjs0.Dayjs;
2885
+ isCustomCast(cast: any): boolean;
2886
+ isCustomDateTimeCast(cast: any): boolean;
2887
+ isDecimalCast(cast: any): boolean;
2888
+ isDateCastable(key: string): boolean;
2889
+ fromDateTime(value: string): string;
2890
+ getDateFormat(): any;
2891
+ asDecimal(value: string, decimals: number): string;
2892
+ asDateTime(value: any): Date | null;
2893
+ asDate(value: string): Date;
2894
+ } & {
2895
+ [x: string]: any;
2896
+ hidden: any[];
2897
+ visible: any[];
2898
+ makeVisible(...keys: string[]): /*elided*/any;
2899
+ makeHidden(key: string[], ...keys: string[]): /*elided*/any;
2900
+ getHidden(): any[];
2901
+ getVisible(): any[];
2902
+ setHidden(hidden: any[]): /*elided*/any;
2903
+ setVisible(visible: any[]): /*elided*/any;
2904
+ } & {
2905
+ [x: string]: any;
2906
+ execHooks(hook: any, options: TGeneric): Promise<any>;
2907
+ } & {
2908
+ [x: string]: any;
2909
+ getGlobalScopes(): {};
2910
+ } & {
2911
+ [x: string]: any;
2912
+ useUniqueIds: boolean;
2913
+ usesUniqueIds(): boolean;
2914
+ uniqueIds(): never[];
2915
+ setUniqueIds(): void;
2916
+ }>;
2917
+ loadSum: (relations: WithRelationType, column: string) => Promise<(new () => IModel) & IModel & {
2918
+ [x: string]: any;
2919
+ timestamps: boolean;
2920
+ dateFormat: string;
2921
+ usesTimestamps(): boolean;
2922
+ updateTimestamps(): /*elided*/any;
2923
+ getCreatedAtColumn(): any;
2924
+ getUpdatedAtColumn(): any;
2925
+ setCreatedAt(value: any): /*elided*/any;
2926
+ setUpdatedAt(value: any): /*elided*/any;
2927
+ freshTimestamp(): Date;
2928
+ freshTimestampString(): any;
2929
+ } & TGeneric<any, string> & {
2930
+ [x: string]: any;
2931
+ attributes: TGeneric;
2932
+ original: TGeneric;
2933
+ casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
2934
+ changes: TGeneric;
2935
+ appends: any[];
2936
+ setAppends(appends: any[]): /*elided*/any;
2937
+ append(...keys: any[]): /*elided*/any;
2938
+ normalizeCastClassResponse(key: string, value: string): TGeneric;
2939
+ syncOriginal(): /*elided*/any;
2940
+ syncChanges(): /*elided*/any;
2941
+ syncOriginalAttribute(attribute: string): void;
2942
+ syncOriginalAttributes(...attributes: string[]): /*elided*/any;
2943
+ isDirty(...attributes: string[]): boolean;
2944
+ getDirty(): TGeneric;
2945
+ originalIsEquivalent(key: string): boolean;
2946
+ setAttributes(attributes: TGeneric): void;
2947
+ setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
2948
+ getAttributes(): {
2949
+ [x: string]: any;
2950
+ };
2951
+ setAttribute(key: string, value: string): /*elided*/any;
2952
+ getAttribute(key: string): any;
2953
+ castAttribute(key: string, value: string): any;
2954
+ attributesToData(): {
2955
+ [x: string]: any;
2956
+ };
2957
+ mutateAttribute(key: string, value: string | null): any;
2958
+ mutateAttributeForArray(_key: string, _value: string): void;
2959
+ isDateAttribute(key: string): boolean;
2960
+ serializeDate(date?: Date | string | null): string | null;
2961
+ getDates(): any[];
2962
+ getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
2963
+ getCastType(key: string): any;
2964
+ hasCast(key: string, types?: readonly string[]): boolean;
2965
+ withDayjs(date: string): dayjs0.Dayjs;
2966
+ isCustomCast(cast: any): boolean;
2967
+ isCustomDateTimeCast(cast: any): boolean;
2968
+ isDecimalCast(cast: any): boolean;
2969
+ isDateCastable(key: string): boolean;
2970
+ fromDateTime(value: string): string;
2971
+ getDateFormat(): any;
2972
+ asDecimal(value: string, decimals: number): string;
2973
+ asDateTime(value: any): Date | null;
2974
+ asDate(value: string): Date;
2975
+ } & {
2976
+ [x: string]: any;
2977
+ hidden: any[];
2978
+ visible: any[];
2979
+ makeVisible(...keys: string[]): /*elided*/any;
2980
+ makeHidden(key: string[], ...keys: string[]): /*elided*/any;
2981
+ getHidden(): any[];
2982
+ getVisible(): any[];
2983
+ setHidden(hidden: any[]): /*elided*/any;
2984
+ setVisible(visible: any[]): /*elided*/any;
2985
+ } & {
2986
+ [x: string]: any;
2987
+ execHooks(hook: any, options: TGeneric): Promise<any>;
2988
+ } & {
2989
+ [x: string]: any;
2990
+ getGlobalScopes(): {};
2991
+ } & {
2992
+ [x: string]: any;
2993
+ useUniqueIds: boolean;
2994
+ usesUniqueIds(): boolean;
2995
+ uniqueIds(): never[];
2996
+ setUniqueIds(): void;
2997
+ }>;
2998
+ usesTimestamps: (() => boolean) & (() => boolean);
2999
+ updateTimestamps: (() => (new () => IModel) & IModel & {
3000
+ [x: string]: any;
3001
+ timestamps: boolean;
3002
+ dateFormat: string;
3003
+ usesTimestamps(): boolean;
3004
+ updateTimestamps(): /*elided*/any;
3005
+ getCreatedAtColumn(): any;
3006
+ getUpdatedAtColumn(): any;
3007
+ setCreatedAt(value: any): /*elided*/any;
3008
+ setUpdatedAt(value: any): /*elided*/any;
3009
+ freshTimestamp(): Date;
3010
+ freshTimestampString(): any;
3011
+ } & TGeneric<any, string> & {
3012
+ [x: string]: any;
3013
+ attributes: TGeneric;
3014
+ original: TGeneric;
3015
+ casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
3016
+ changes: TGeneric;
3017
+ appends: any[];
3018
+ setAppends(appends: any[]): /*elided*/any;
3019
+ append(...keys: any[]): /*elided*/any;
3020
+ normalizeCastClassResponse(key: string, value: string): TGeneric;
3021
+ syncOriginal(): /*elided*/any;
3022
+ syncChanges(): /*elided*/any;
3023
+ syncOriginalAttribute(attribute: string): void;
3024
+ syncOriginalAttributes(...attributes: string[]): /*elided*/any;
3025
+ isDirty(...attributes: string[]): boolean;
3026
+ getDirty(): TGeneric;
3027
+ originalIsEquivalent(key: string): boolean;
3028
+ setAttributes(attributes: TGeneric): void;
3029
+ setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
3030
+ getAttributes(): {
3031
+ [x: string]: any;
3032
+ };
3033
+ setAttribute(key: string, value: string): /*elided*/any;
3034
+ getAttribute(key: string): any;
3035
+ castAttribute(key: string, value: string): any;
3036
+ attributesToData(): {
3037
+ [x: string]: any;
3038
+ };
3039
+ mutateAttribute(key: string, value: string | null): any;
3040
+ mutateAttributeForArray(_key: string, _value: string): void;
3041
+ isDateAttribute(key: string): boolean;
3042
+ serializeDate(date?: Date | string | null): string | null;
3043
+ getDates(): any[];
3044
+ getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
3045
+ getCastType(key: string): any;
3046
+ hasCast(key: string, types?: readonly string[]): boolean;
3047
+ withDayjs(date: string): dayjs0.Dayjs;
3048
+ isCustomCast(cast: any): boolean;
3049
+ isCustomDateTimeCast(cast: any): boolean;
3050
+ isDecimalCast(cast: any): boolean;
3051
+ isDateCastable(key: string): boolean;
3052
+ fromDateTime(value: string): string;
3053
+ getDateFormat(): any;
3054
+ asDecimal(value: string, decimals: number): string;
3055
+ asDateTime(value: any): Date | null;
3056
+ asDate(value: string): Date;
3057
+ } & {
3058
+ [x: string]: any;
3059
+ hidden: any[];
3060
+ visible: any[];
3061
+ makeVisible(...keys: string[]): /*elided*/any;
3062
+ makeHidden(key: string[], ...keys: string[]): /*elided*/any;
3063
+ getHidden(): any[];
3064
+ getVisible(): any[];
3065
+ setHidden(hidden: any[]): /*elided*/any;
3066
+ setVisible(visible: any[]): /*elided*/any;
3067
+ } & {
3068
+ [x: string]: any;
3069
+ execHooks(hook: any, options: TGeneric): Promise<any>;
3070
+ } & {
3071
+ [x: string]: any;
3072
+ getGlobalScopes(): {};
3073
+ } & {
3074
+ [x: string]: any;
3075
+ useUniqueIds: boolean;
3076
+ usesUniqueIds(): boolean;
3077
+ uniqueIds(): never[];
3078
+ setUniqueIds(): void;
3079
+ }) & (() => (new () => IModel) & IModel & {
3080
+ [x: string]: any;
3081
+ timestamps: boolean;
3082
+ dateFormat: string;
3083
+ usesTimestamps(): boolean;
3084
+ updateTimestamps(): /*elided*/any;
3085
+ getCreatedAtColumn(): any;
3086
+ getUpdatedAtColumn(): any;
3087
+ setCreatedAt(value: any): /*elided*/any;
3088
+ setUpdatedAt(value: any): /*elided*/any;
3089
+ freshTimestamp(): Date;
3090
+ freshTimestampString(): any;
3091
+ } & TGeneric<any, string> & {
3092
+ [x: string]: any;
3093
+ attributes: TGeneric;
3094
+ original: TGeneric;
3095
+ casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
3096
+ changes: TGeneric;
3097
+ appends: any[];
3098
+ setAppends(appends: any[]): /*elided*/any;
3099
+ append(...keys: any[]): /*elided*/any;
3100
+ normalizeCastClassResponse(key: string, value: string): TGeneric;
3101
+ syncOriginal(): /*elided*/any;
3102
+ syncChanges(): /*elided*/any;
3103
+ syncOriginalAttribute(attribute: string): void;
3104
+ syncOriginalAttributes(...attributes: string[]): /*elided*/any;
3105
+ isDirty(...attributes: string[]): boolean;
3106
+ getDirty(): TGeneric;
3107
+ originalIsEquivalent(key: string): boolean;
3108
+ setAttributes(attributes: TGeneric): void;
3109
+ setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
3110
+ getAttributes(): {
3111
+ [x: string]: any;
3112
+ };
3113
+ setAttribute(key: string, value: string): /*elided*/any;
3114
+ getAttribute(key: string): any;
3115
+ castAttribute(key: string, value: string): any;
3116
+ attributesToData(): {
3117
+ [x: string]: any;
3118
+ };
3119
+ mutateAttribute(key: string, value: string | null): any;
3120
+ mutateAttributeForArray(_key: string, _value: string): void;
3121
+ isDateAttribute(key: string): boolean;
3122
+ serializeDate(date?: Date | string | null): string | null;
3123
+ getDates(): any[];
3124
+ getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
3125
+ getCastType(key: string): any;
3126
+ hasCast(key: string, types?: readonly string[]): boolean;
3127
+ withDayjs(date: string): dayjs0.Dayjs;
3128
+ isCustomCast(cast: any): boolean;
3129
+ isCustomDateTimeCast(cast: any): boolean;
3130
+ isDecimalCast(cast: any): boolean;
3131
+ isDateCastable(key: string): boolean;
3132
+ fromDateTime(value: string): string;
3133
+ getDateFormat(): any;
3134
+ asDecimal(value: string, decimals: number): string;
3135
+ asDateTime(value: any): Date | null;
3136
+ asDate(value: string): Date;
3137
+ } & {
3138
+ [x: string]: any;
3139
+ hidden: any[];
3140
+ visible: any[];
3141
+ makeVisible(...keys: string[]): /*elided*/any;
3142
+ makeHidden(key: string[], ...keys: string[]): /*elided*/any;
3143
+ getHidden(): any[];
3144
+ getVisible(): any[];
3145
+ setHidden(hidden: any[]): /*elided*/any;
3146
+ setVisible(visible: any[]): /*elided*/any;
3147
+ } & {
3148
+ [x: string]: any;
3149
+ execHooks(hook: any, options: TGeneric): Promise<any>;
3150
+ } & {
3151
+ [x: string]: any;
3152
+ getGlobalScopes(): {};
3153
+ } & {
3154
+ [x: string]: any;
3155
+ useUniqueIds: boolean;
3156
+ usesUniqueIds(): boolean;
3157
+ uniqueIds(): never[];
3158
+ setUniqueIds(): void;
3159
+ });
3160
+ getCreatedAtColumn: (() => string) & (() => any);
3161
+ getUpdatedAtColumn: (() => string) & (() => any);
3162
+ getDeletedAtColumn: () => string;
3163
+ setCreatedAt: ((value: string) => (new () => IModel) & IModel & {
3164
+ [x: string]: any;
3165
+ timestamps: boolean;
3166
+ dateFormat: string;
3167
+ usesTimestamps(): boolean;
3168
+ updateTimestamps(): /*elided*/any;
3169
+ getCreatedAtColumn(): any;
3170
+ getUpdatedAtColumn(): any;
3171
+ setCreatedAt(value: any): /*elided*/any;
3172
+ setUpdatedAt(value: any): /*elided*/any;
3173
+ freshTimestamp(): Date;
3174
+ freshTimestampString(): any;
3175
+ } & TGeneric<any, string> & {
3176
+ [x: string]: any;
3177
+ attributes: TGeneric;
3178
+ original: TGeneric;
3179
+ casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
3180
+ changes: TGeneric;
3181
+ appends: any[];
3182
+ setAppends(appends: any[]): /*elided*/any;
3183
+ append(...keys: any[]): /*elided*/any;
3184
+ normalizeCastClassResponse(key: string, value: string): TGeneric;
3185
+ syncOriginal(): /*elided*/any;
3186
+ syncChanges(): /*elided*/any;
3187
+ syncOriginalAttribute(attribute: string): void;
3188
+ syncOriginalAttributes(...attributes: string[]): /*elided*/any;
3189
+ isDirty(...attributes: string[]): boolean;
3190
+ getDirty(): TGeneric;
3191
+ originalIsEquivalent(key: string): boolean;
3192
+ setAttributes(attributes: TGeneric): void;
3193
+ setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
3194
+ getAttributes(): {
3195
+ [x: string]: any;
3196
+ };
3197
+ setAttribute(key: string, value: string): /*elided*/any;
3198
+ getAttribute(key: string): any;
3199
+ castAttribute(key: string, value: string): any;
3200
+ attributesToData(): {
3201
+ [x: string]: any;
3202
+ };
3203
+ mutateAttribute(key: string, value: string | null): any;
3204
+ mutateAttributeForArray(_key: string, _value: string): void;
3205
+ isDateAttribute(key: string): boolean;
3206
+ serializeDate(date?: Date | string | null): string | null;
3207
+ getDates(): any[];
3208
+ getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
3209
+ getCastType(key: string): any;
3210
+ hasCast(key: string, types?: readonly string[]): boolean;
3211
+ withDayjs(date: string): dayjs0.Dayjs;
3212
+ isCustomCast(cast: any): boolean;
3213
+ isCustomDateTimeCast(cast: any): boolean;
3214
+ isDecimalCast(cast: any): boolean;
3215
+ isDateCastable(key: string): boolean;
3216
+ fromDateTime(value: string): string;
3217
+ getDateFormat(): any;
3218
+ asDecimal(value: string, decimals: number): string;
3219
+ asDateTime(value: any): Date | null;
3220
+ asDate(value: string): Date;
3221
+ } & {
3222
+ [x: string]: any;
3223
+ hidden: any[];
3224
+ visible: any[];
3225
+ makeVisible(...keys: string[]): /*elided*/any;
3226
+ makeHidden(key: string[], ...keys: string[]): /*elided*/any;
3227
+ getHidden(): any[];
3228
+ getVisible(): any[];
3229
+ setHidden(hidden: any[]): /*elided*/any;
3230
+ setVisible(visible: any[]): /*elided*/any;
3231
+ } & {
3232
+ [x: string]: any;
3233
+ execHooks(hook: any, options: TGeneric): Promise<any>;
3234
+ } & {
3235
+ [x: string]: any;
3236
+ getGlobalScopes(): {};
3237
+ } & {
3238
+ [x: string]: any;
3239
+ useUniqueIds: boolean;
3240
+ usesUniqueIds(): boolean;
3241
+ uniqueIds(): never[];
3242
+ setUniqueIds(): void;
3243
+ }) & ((value: any) => (new () => IModel) & IModel & {
3244
+ [x: string]: any;
3245
+ timestamps: boolean;
3246
+ dateFormat: string;
3247
+ usesTimestamps(): boolean;
3248
+ updateTimestamps(): /*elided*/any;
3249
+ getCreatedAtColumn(): any;
3250
+ getUpdatedAtColumn(): any;
3251
+ setCreatedAt(value: any): /*elided*/any;
3252
+ setUpdatedAt(value: any): /*elided*/any;
3253
+ freshTimestamp(): Date;
3254
+ freshTimestampString(): any;
3255
+ } & TGeneric<any, string> & {
3256
+ [x: string]: any;
3257
+ attributes: TGeneric;
3258
+ original: TGeneric;
3259
+ casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
3260
+ changes: TGeneric;
3261
+ appends: any[];
3262
+ setAppends(appends: any[]): /*elided*/any;
3263
+ append(...keys: any[]): /*elided*/any;
3264
+ normalizeCastClassResponse(key: string, value: string): TGeneric;
3265
+ syncOriginal(): /*elided*/any;
3266
+ syncChanges(): /*elided*/any;
3267
+ syncOriginalAttribute(attribute: string): void;
3268
+ syncOriginalAttributes(...attributes: string[]): /*elided*/any;
3269
+ isDirty(...attributes: string[]): boolean;
3270
+ getDirty(): TGeneric;
3271
+ originalIsEquivalent(key: string): boolean;
3272
+ setAttributes(attributes: TGeneric): void;
3273
+ setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
3274
+ getAttributes(): {
3275
+ [x: string]: any;
3276
+ };
3277
+ setAttribute(key: string, value: string): /*elided*/any;
3278
+ getAttribute(key: string): any;
3279
+ castAttribute(key: string, value: string): any;
3280
+ attributesToData(): {
3281
+ [x: string]: any;
3282
+ };
3283
+ mutateAttribute(key: string, value: string | null): any;
3284
+ mutateAttributeForArray(_key: string, _value: string): void;
3285
+ isDateAttribute(key: string): boolean;
3286
+ serializeDate(date?: Date | string | null): string | null;
3287
+ getDates(): any[];
3288
+ getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
3289
+ getCastType(key: string): any;
3290
+ hasCast(key: string, types?: readonly string[]): boolean;
3291
+ withDayjs(date: string): dayjs0.Dayjs;
3292
+ isCustomCast(cast: any): boolean;
3293
+ isCustomDateTimeCast(cast: any): boolean;
3294
+ isDecimalCast(cast: any): boolean;
3295
+ isDateCastable(key: string): boolean;
3296
+ fromDateTime(value: string): string;
3297
+ getDateFormat(): any;
3298
+ asDecimal(value: string, decimals: number): string;
3299
+ asDateTime(value: any): Date | null;
3300
+ asDate(value: string): Date;
3301
+ } & {
3302
+ [x: string]: any;
3303
+ hidden: any[];
3304
+ visible: any[];
3305
+ makeVisible(...keys: string[]): /*elided*/any;
3306
+ makeHidden(key: string[], ...keys: string[]): /*elided*/any;
3307
+ getHidden(): any[];
3308
+ getVisible(): any[];
3309
+ setHidden(hidden: any[]): /*elided*/any;
3310
+ setVisible(visible: any[]): /*elided*/any;
3311
+ } & {
3312
+ [x: string]: any;
3313
+ execHooks(hook: any, options: TGeneric): Promise<any>;
3314
+ } & {
3315
+ [x: string]: any;
3316
+ getGlobalScopes(): {};
3317
+ } & {
3318
+ [x: string]: any;
3319
+ useUniqueIds: boolean;
3320
+ usesUniqueIds(): boolean;
3321
+ uniqueIds(): never[];
3322
+ setUniqueIds(): void;
3323
+ });
3324
+ setUpdatedAt: ((value: string) => (new () => IModel) & IModel & {
3325
+ [x: string]: any;
3326
+ timestamps: boolean;
3327
+ dateFormat: string;
3328
+ usesTimestamps(): boolean;
3329
+ updateTimestamps(): /*elided*/any;
3330
+ getCreatedAtColumn(): any;
3331
+ getUpdatedAtColumn(): any;
3332
+ setCreatedAt(value: any): /*elided*/any;
3333
+ setUpdatedAt(value: any): /*elided*/any;
3334
+ freshTimestamp(): Date;
3335
+ freshTimestampString(): any;
3336
+ } & TGeneric<any, string> & {
3337
+ [x: string]: any;
3338
+ attributes: TGeneric;
3339
+ original: TGeneric;
3340
+ casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
3341
+ changes: TGeneric;
3342
+ appends: any[];
3343
+ setAppends(appends: any[]): /*elided*/any;
3344
+ append(...keys: any[]): /*elided*/any;
3345
+ normalizeCastClassResponse(key: string, value: string): TGeneric;
3346
+ syncOriginal(): /*elided*/any;
3347
+ syncChanges(): /*elided*/any;
3348
+ syncOriginalAttribute(attribute: string): void;
3349
+ syncOriginalAttributes(...attributes: string[]): /*elided*/any;
3350
+ isDirty(...attributes: string[]): boolean;
3351
+ getDirty(): TGeneric;
3352
+ originalIsEquivalent(key: string): boolean;
3353
+ setAttributes(attributes: TGeneric): void;
3354
+ setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
3355
+ getAttributes(): {
3356
+ [x: string]: any;
3357
+ };
3358
+ setAttribute(key: string, value: string): /*elided*/any;
3359
+ getAttribute(key: string): any;
3360
+ castAttribute(key: string, value: string): any;
3361
+ attributesToData(): {
3362
+ [x: string]: any;
3363
+ };
3364
+ mutateAttribute(key: string, value: string | null): any;
3365
+ mutateAttributeForArray(_key: string, _value: string): void;
3366
+ isDateAttribute(key: string): boolean;
3367
+ serializeDate(date?: Date | string | null): string | null;
3368
+ getDates(): any[];
3369
+ getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
3370
+ getCastType(key: string): any;
3371
+ hasCast(key: string, types?: readonly string[]): boolean;
3372
+ withDayjs(date: string): dayjs0.Dayjs;
3373
+ isCustomCast(cast: any): boolean;
3374
+ isCustomDateTimeCast(cast: any): boolean;
3375
+ isDecimalCast(cast: any): boolean;
3376
+ isDateCastable(key: string): boolean;
3377
+ fromDateTime(value: string): string;
3378
+ getDateFormat(): any;
3379
+ asDecimal(value: string, decimals: number): string;
3380
+ asDateTime(value: any): Date | null;
3381
+ asDate(value: string): Date;
3382
+ } & {
3383
+ [x: string]: any;
3384
+ hidden: any[];
3385
+ visible: any[];
3386
+ makeVisible(...keys: string[]): /*elided*/any;
3387
+ makeHidden(key: string[], ...keys: string[]): /*elided*/any;
3388
+ getHidden(): any[];
3389
+ getVisible(): any[];
3390
+ setHidden(hidden: any[]): /*elided*/any;
3391
+ setVisible(visible: any[]): /*elided*/any;
3392
+ } & {
3393
+ [x: string]: any;
3394
+ execHooks(hook: any, options: TGeneric): Promise<any>;
3395
+ } & {
3396
+ [x: string]: any;
3397
+ getGlobalScopes(): {};
3398
+ } & {
3399
+ [x: string]: any;
3400
+ useUniqueIds: boolean;
3401
+ usesUniqueIds(): boolean;
3402
+ uniqueIds(): never[];
3403
+ setUniqueIds(): void;
3404
+ }) & ((value: any) => (new () => IModel) & IModel & {
3405
+ [x: string]: any;
3406
+ timestamps: boolean;
3407
+ dateFormat: string;
3408
+ usesTimestamps(): boolean;
3409
+ updateTimestamps(): /*elided*/any;
3410
+ getCreatedAtColumn(): any;
3411
+ getUpdatedAtColumn(): any;
3412
+ setCreatedAt(value: any): /*elided*/any;
3413
+ setUpdatedAt(value: any): /*elided*/any;
3414
+ freshTimestamp(): Date;
3415
+ freshTimestampString(): any;
3416
+ } & TGeneric<any, string> & {
3417
+ [x: string]: any;
3418
+ attributes: TGeneric;
3419
+ original: TGeneric;
3420
+ casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
3421
+ changes: TGeneric;
3422
+ appends: any[];
3423
+ setAppends(appends: any[]): /*elided*/any;
3424
+ append(...keys: any[]): /*elided*/any;
3425
+ normalizeCastClassResponse(key: string, value: string): TGeneric;
3426
+ syncOriginal(): /*elided*/any;
3427
+ syncChanges(): /*elided*/any;
3428
+ syncOriginalAttribute(attribute: string): void;
3429
+ syncOriginalAttributes(...attributes: string[]): /*elided*/any;
3430
+ isDirty(...attributes: string[]): boolean;
3431
+ getDirty(): TGeneric;
3432
+ originalIsEquivalent(key: string): boolean;
3433
+ setAttributes(attributes: TGeneric): void;
3434
+ setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
3435
+ getAttributes(): {
3436
+ [x: string]: any;
3437
+ };
3438
+ setAttribute(key: string, value: string): /*elided*/any;
3439
+ getAttribute(key: string): any;
3440
+ castAttribute(key: string, value: string): any;
3441
+ attributesToData(): {
3442
+ [x: string]: any;
3443
+ };
3444
+ mutateAttribute(key: string, value: string | null): any;
3445
+ mutateAttributeForArray(_key: string, _value: string): void;
3446
+ isDateAttribute(key: string): boolean;
3447
+ serializeDate(date?: Date | string | null): string | null;
3448
+ getDates(): any[];
3449
+ getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
3450
+ getCastType(key: string): any;
3451
+ hasCast(key: string, types?: readonly string[]): boolean;
3452
+ withDayjs(date: string): dayjs0.Dayjs;
3453
+ isCustomCast(cast: any): boolean;
3454
+ isCustomDateTimeCast(cast: any): boolean;
3455
+ isDecimalCast(cast: any): boolean;
3456
+ isDateCastable(key: string): boolean;
3457
+ fromDateTime(value: string): string;
3458
+ getDateFormat(): any;
3459
+ asDecimal(value: string, decimals: number): string;
3460
+ asDateTime(value: any): Date | null;
3461
+ asDate(value: string): Date;
3462
+ } & {
3463
+ [x: string]: any;
3464
+ hidden: any[];
3465
+ visible: any[];
3466
+ makeVisible(...keys: string[]): /*elided*/any;
3467
+ makeHidden(key: string[], ...keys: string[]): /*elided*/any;
3468
+ getHidden(): any[];
3469
+ getVisible(): any[];
3470
+ setHidden(hidden: any[]): /*elided*/any;
3471
+ setVisible(visible: any[]): /*elided*/any;
3472
+ } & {
3473
+ [x: string]: any;
3474
+ execHooks(hook: any, options: TGeneric): Promise<any>;
3475
+ } & {
3476
+ [x: string]: any;
3477
+ getGlobalScopes(): {};
3478
+ } & {
3479
+ [x: string]: any;
3480
+ useUniqueIds: boolean;
3481
+ usesUniqueIds(): boolean;
3482
+ uniqueIds(): never[];
3483
+ setUniqueIds(): void;
3484
+ });
3485
+ freshTimestamp: (() => Date) & (() => Date);
3486
+ freshTimestampString: (() => string) & (() => any);
3487
+ fromDateTime: ((value: Date | number | null) => string) & ((value: string) => string);
3488
+ useSoftDeletes: () => boolean;
3489
+ toData: () => any;
3490
+ attributesToData: (() => any) & (() => {
3491
+ [x: string]: any;
3492
+ });
3493
+ relationsToData: () => any;
3494
+ toJSON: () => any;
3495
+ toJson: () => string;
3496
+ toString: () => string;
3497
+ isDirty: ((attributes?: string | string[]) => boolean) & ((...attributes: string[]) => boolean);
3498
+ getDirty: (() => string[]) & (() => TGeneric);
3499
+ save: (options?: any) => Promise<boolean>;
3500
+ update: (attributes?: any, options?: any) => Promise<boolean>;
3501
+ increment: (column: string, amount?: number, extra?: any) => Promise<boolean>;
3502
+ decrement: (column: string, amount?: number, extra?: any) => Promise<boolean>;
3503
+ serializeDate: ((date: any) => string) & ((date?: Date | string | null) => string | null);
3504
+ delete: (options?: any) => Promise<boolean>;
3505
+ softDelete: (options?: any) => Promise<boolean>;
3506
+ forceDelete: (options?: any) => Promise<boolean>;
3507
+ restore: (options?: any) => Promise<boolean>;
3508
+ fresh: () => Promise<(new () => IModel) & IModel & {
3509
+ [x: string]: any;
3510
+ timestamps: boolean;
3511
+ dateFormat: string;
3512
+ usesTimestamps(): boolean;
3513
+ updateTimestamps(): /*elided*/any;
3514
+ getCreatedAtColumn(): any;
3515
+ getUpdatedAtColumn(): any;
3516
+ setCreatedAt(value: any): /*elided*/any;
3517
+ setUpdatedAt(value: any): /*elided*/any;
3518
+ freshTimestamp(): Date;
3519
+ freshTimestampString(): any;
3520
+ } & TGeneric<any, string> & {
3521
+ [x: string]: any;
3522
+ attributes: TGeneric;
3523
+ original: TGeneric;
3524
+ casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
3525
+ changes: TGeneric;
3526
+ appends: any[];
3527
+ setAppends(appends: any[]): /*elided*/any;
3528
+ append(...keys: any[]): /*elided*/any;
3529
+ normalizeCastClassResponse(key: string, value: string): TGeneric;
3530
+ syncOriginal(): /*elided*/any;
3531
+ syncChanges(): /*elided*/any;
3532
+ syncOriginalAttribute(attribute: string): void;
3533
+ syncOriginalAttributes(...attributes: string[]): /*elided*/any;
3534
+ isDirty(...attributes: string[]): boolean;
3535
+ getDirty(): TGeneric;
3536
+ originalIsEquivalent(key: string): boolean;
3537
+ setAttributes(attributes: TGeneric): void;
3538
+ setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
3539
+ getAttributes(): {
3540
+ [x: string]: any;
3541
+ };
3542
+ setAttribute(key: string, value: string): /*elided*/any;
3543
+ getAttribute(key: string): any;
3544
+ castAttribute(key: string, value: string): any;
3545
+ attributesToData(): {
3546
+ [x: string]: any;
3547
+ };
3548
+ mutateAttribute(key: string, value: string | null): any;
3549
+ mutateAttributeForArray(_key: string, _value: string): void;
3550
+ isDateAttribute(key: string): boolean;
3551
+ serializeDate(date?: Date | string | null): string | null;
3552
+ getDates(): any[];
3553
+ getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
3554
+ getCastType(key: string): any;
3555
+ hasCast(key: string, types?: readonly string[]): boolean;
3556
+ withDayjs(date: string): dayjs0.Dayjs;
3557
+ isCustomCast(cast: any): boolean;
3558
+ isCustomDateTimeCast(cast: any): boolean;
3559
+ isDecimalCast(cast: any): boolean;
3560
+ isDateCastable(key: string): boolean;
3561
+ fromDateTime(value: string): string;
3562
+ getDateFormat(): any;
3563
+ asDecimal(value: string, decimals: number): string;
3564
+ asDateTime(value: any): Date | null;
3565
+ asDate(value: string): Date;
3566
+ } & {
3567
+ [x: string]: any;
3568
+ hidden: any[];
3569
+ visible: any[];
3570
+ makeVisible(...keys: string[]): /*elided*/any;
3571
+ makeHidden(key: string[], ...keys: string[]): /*elided*/any;
3572
+ getHidden(): any[];
3573
+ getVisible(): any[];
3574
+ setHidden(hidden: any[]): /*elided*/any;
3575
+ setVisible(visible: any[]): /*elided*/any;
3576
+ } & {
3577
+ [x: string]: any;
3578
+ execHooks(hook: any, options: TGeneric): Promise<any>;
3579
+ } & {
3580
+ [x: string]: any;
3581
+ getGlobalScopes(): {};
3582
+ } & {
3583
+ [x: string]: any;
3584
+ useUniqueIds: boolean;
3585
+ usesUniqueIds(): boolean;
3586
+ uniqueIds(): never[];
3587
+ setUniqueIds(): void;
3588
+ }>;
3589
+ refresh: () => Promise<((new () => IModel) & IModel & {
3590
+ [x: string]: any;
3591
+ timestamps: boolean;
3592
+ dateFormat: string;
3593
+ usesTimestamps(): boolean;
3594
+ updateTimestamps(): /*elided*/any;
3595
+ getCreatedAtColumn(): any;
3596
+ getUpdatedAtColumn(): any;
3597
+ setCreatedAt(value: any): /*elided*/any;
3598
+ setUpdatedAt(value: any): /*elided*/any;
3599
+ freshTimestamp(): Date;
3600
+ freshTimestampString(): any;
3601
+ } & TGeneric<any, string> & {
3602
+ [x: string]: any;
3603
+ attributes: TGeneric;
3604
+ original: TGeneric;
3605
+ casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
3606
+ changes: TGeneric;
3607
+ appends: any[];
3608
+ setAppends(appends: any[]): /*elided*/any;
3609
+ append(...keys: any[]): /*elided*/any;
3610
+ normalizeCastClassResponse(key: string, value: string): TGeneric;
3611
+ syncOriginal(): /*elided*/any;
3612
+ syncChanges(): /*elided*/any;
3613
+ syncOriginalAttribute(attribute: string): void;
3614
+ syncOriginalAttributes(...attributes: string[]): /*elided*/any;
3615
+ isDirty(...attributes: string[]): boolean;
3616
+ getDirty(): TGeneric;
3617
+ originalIsEquivalent(key: string): boolean;
3618
+ setAttributes(attributes: TGeneric): void;
3619
+ setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
3620
+ getAttributes(): {
3621
+ [x: string]: any;
3622
+ };
3623
+ setAttribute(key: string, value: string): /*elided*/any;
3624
+ getAttribute(key: string): any;
3625
+ castAttribute(key: string, value: string): any;
3626
+ attributesToData(): {
3627
+ [x: string]: any;
3628
+ };
3629
+ mutateAttribute(key: string, value: string | null): any;
3630
+ mutateAttributeForArray(_key: string, _value: string): void;
3631
+ isDateAttribute(key: string): boolean;
3632
+ serializeDate(date?: Date | string | null): string | null;
3633
+ getDates(): any[];
3634
+ getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
3635
+ getCastType(key: string): any;
3636
+ hasCast(key: string, types?: readonly string[]): boolean;
3637
+ withDayjs(date: string): dayjs0.Dayjs;
3638
+ isCustomCast(cast: any): boolean;
3639
+ isCustomDateTimeCast(cast: any): boolean;
3640
+ isDecimalCast(cast: any): boolean;
3641
+ isDateCastable(key: string): boolean;
3642
+ fromDateTime(value: string): string;
3643
+ getDateFormat(): any;
3644
+ asDecimal(value: string, decimals: number): string;
3645
+ asDateTime(value: any): Date | null;
3646
+ asDate(value: string): Date;
3647
+ } & {
3648
+ [x: string]: any;
3649
+ hidden: any[];
3650
+ visible: any[];
3651
+ makeVisible(...keys: string[]): /*elided*/any;
3652
+ makeHidden(key: string[], ...keys: string[]): /*elided*/any;
3653
+ getHidden(): any[];
3654
+ getVisible(): any[];
3655
+ setHidden(hidden: any[]): /*elided*/any;
3656
+ setVisible(visible: any[]): /*elided*/any;
3657
+ } & {
3658
+ [x: string]: any;
3659
+ execHooks(hook: any, options: TGeneric): Promise<any>;
3660
+ } & {
3661
+ [x: string]: any;
3662
+ getGlobalScopes(): {};
3663
+ } & {
3664
+ [x: string]: any;
3665
+ useUniqueIds: boolean;
3666
+ usesUniqueIds(): boolean;
3667
+ uniqueIds(): never[];
3668
+ setUniqueIds(): void;
3669
+ }) | undefined>;
3670
+ push: () => Promise<boolean>;
3671
+ is: (model: (new () => IModel) & IModel & {
3672
+ [x: string]: any;
3673
+ timestamps: boolean;
3674
+ dateFormat: string;
3675
+ usesTimestamps(): boolean;
3676
+ updateTimestamps(): /*elided*/any;
3677
+ getCreatedAtColumn(): any;
3678
+ getUpdatedAtColumn(): any;
3679
+ setCreatedAt(value: any): /*elided*/any;
3680
+ setUpdatedAt(value: any): /*elided*/any;
3681
+ freshTimestamp(): Date;
3682
+ freshTimestampString(): any;
3683
+ } & TGeneric<any, string> & {
3684
+ [x: string]: any;
3685
+ attributes: TGeneric;
3686
+ original: TGeneric;
3687
+ casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
3688
+ changes: TGeneric;
3689
+ appends: any[];
3690
+ setAppends(appends: any[]): /*elided*/any;
3691
+ append(...keys: any[]): /*elided*/any;
3692
+ normalizeCastClassResponse(key: string, value: string): TGeneric;
3693
+ syncOriginal(): /*elided*/any;
3694
+ syncChanges(): /*elided*/any;
3695
+ syncOriginalAttribute(attribute: string): void;
3696
+ syncOriginalAttributes(...attributes: string[]): /*elided*/any;
3697
+ isDirty(...attributes: string[]): boolean;
3698
+ getDirty(): TGeneric;
3699
+ originalIsEquivalent(key: string): boolean;
3700
+ setAttributes(attributes: TGeneric): void;
3701
+ setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
3702
+ getAttributes(): {
3703
+ [x: string]: any;
3704
+ };
3705
+ setAttribute(key: string, value: string): /*elided*/any;
3706
+ getAttribute(key: string): any;
3707
+ castAttribute(key: string, value: string): any;
3708
+ attributesToData(): {
3709
+ [x: string]: any;
3710
+ };
3711
+ mutateAttribute(key: string, value: string | null): any;
3712
+ mutateAttributeForArray(_key: string, _value: string): void;
3713
+ isDateAttribute(key: string): boolean;
3714
+ serializeDate(date?: Date | string | null): string | null;
3715
+ getDates(): any[];
3716
+ getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
3717
+ getCastType(key: string): any;
3718
+ hasCast(key: string, types?: readonly string[]): boolean;
3719
+ withDayjs(date: string): dayjs0.Dayjs;
3720
+ isCustomCast(cast: any): boolean;
3721
+ isCustomDateTimeCast(cast: any): boolean;
3722
+ isDecimalCast(cast: any): boolean;
3723
+ isDateCastable(key: string): boolean;
3724
+ fromDateTime(value: string): string;
3725
+ getDateFormat(): any;
3726
+ asDecimal(value: string, decimals: number): string;
3727
+ asDateTime(value: any): Date | null;
3728
+ asDate(value: string): Date;
3729
+ } & {
3730
+ [x: string]: any;
3731
+ hidden: any[];
3732
+ visible: any[];
3733
+ makeVisible(...keys: string[]): /*elided*/any;
3734
+ makeHidden(key: string[], ...keys: string[]): /*elided*/any;
3735
+ getHidden(): any[];
3736
+ getVisible(): any[];
3737
+ setHidden(hidden: any[]): /*elided*/any;
3738
+ setVisible(visible: any[]): /*elided*/any;
3739
+ } & {
3740
+ [x: string]: any;
3741
+ execHooks(hook: any, options: TGeneric): Promise<any>;
3742
+ } & {
3743
+ [x: string]: any;
3744
+ getGlobalScopes(): {};
3745
+ } & {
3746
+ [x: string]: any;
3747
+ useUniqueIds: boolean;
3748
+ usesUniqueIds(): boolean;
3749
+ uniqueIds(): never[];
3750
+ setUniqueIds(): void;
3751
+ }) => boolean;
3752
+ isNot: (model: (new () => IModel) & IModel & {
3753
+ [x: string]: any;
3754
+ timestamps: boolean;
3755
+ dateFormat: string;
3756
+ usesTimestamps(): boolean;
3757
+ updateTimestamps(): /*elided*/any;
3758
+ getCreatedAtColumn(): any;
3759
+ getUpdatedAtColumn(): any;
3760
+ setCreatedAt(value: any): /*elided*/any;
3761
+ setUpdatedAt(value: any): /*elided*/any;
3762
+ freshTimestamp(): Date;
3763
+ freshTimestampString(): any;
3764
+ } & TGeneric<any, string> & {
3765
+ [x: string]: any;
3766
+ attributes: TGeneric;
3767
+ original: TGeneric;
3768
+ casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
3769
+ changes: TGeneric;
3770
+ appends: any[];
3771
+ setAppends(appends: any[]): /*elided*/any;
3772
+ append(...keys: any[]): /*elided*/any;
3773
+ normalizeCastClassResponse(key: string, value: string): TGeneric;
3774
+ syncOriginal(): /*elided*/any;
3775
+ syncChanges(): /*elided*/any;
3776
+ syncOriginalAttribute(attribute: string): void;
3777
+ syncOriginalAttributes(...attributes: string[]): /*elided*/any;
3778
+ isDirty(...attributes: string[]): boolean;
3779
+ getDirty(): TGeneric;
3780
+ originalIsEquivalent(key: string): boolean;
3781
+ setAttributes(attributes: TGeneric): void;
3782
+ setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
3783
+ getAttributes(): {
3784
+ [x: string]: any;
3785
+ };
3786
+ setAttribute(key: string, value: string): /*elided*/any;
3787
+ getAttribute(key: string): any;
3788
+ castAttribute(key: string, value: string): any;
3789
+ attributesToData(): {
3790
+ [x: string]: any;
3791
+ };
3792
+ mutateAttribute(key: string, value: string | null): any;
3793
+ mutateAttributeForArray(_key: string, _value: string): void;
3794
+ isDateAttribute(key: string): boolean;
3795
+ serializeDate(date?: Date | string | null): string | null;
3796
+ getDates(): any[];
3797
+ getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
3798
+ getCastType(key: string): any;
3799
+ hasCast(key: string, types?: readonly string[]): boolean;
3800
+ withDayjs(date: string): dayjs0.Dayjs;
3801
+ isCustomCast(cast: any): boolean;
3802
+ isCustomDateTimeCast(cast: any): boolean;
3803
+ isDecimalCast(cast: any): boolean;
3804
+ isDateCastable(key: string): boolean;
3805
+ fromDateTime(value: string): string;
3806
+ getDateFormat(): any;
3807
+ asDecimal(value: string, decimals: number): string;
3808
+ asDateTime(value: any): Date | null;
3809
+ asDate(value: string): Date;
3810
+ } & {
3811
+ [x: string]: any;
3812
+ hidden: any[];
3813
+ visible: any[];
3814
+ makeVisible(...keys: string[]): /*elided*/any;
3815
+ makeHidden(key: string[], ...keys: string[]): /*elided*/any;
3816
+ getHidden(): any[];
3817
+ getVisible(): any[];
3818
+ setHidden(hidden: any[]): /*elided*/any;
3819
+ setVisible(visible: any[]): /*elided*/any;
3820
+ } & {
3821
+ [x: string]: any;
3822
+ execHooks(hook: any, options: TGeneric): Promise<any>;
3823
+ } & {
3824
+ [x: string]: any;
3825
+ getGlobalScopes(): {};
3826
+ } & {
3827
+ [x: string]: any;
3828
+ useUniqueIds: boolean;
3829
+ usesUniqueIds(): boolean;
3830
+ uniqueIds(): never[];
3831
+ setUniqueIds(): void;
3832
+ }) => boolean;
3833
+ related: <T extends never>(relation: T) => ReturnTypeOfMethod<(new () => IModel) & IModel & {
3834
+ [x: string]: any;
3835
+ timestamps: boolean;
3836
+ dateFormat: string;
3837
+ usesTimestamps(): boolean;
3838
+ updateTimestamps(): /*elided*/any;
3839
+ getCreatedAtColumn(): any;
3840
+ getUpdatedAtColumn(): any;
3841
+ setCreatedAt(value: any): /*elided*/any;
3842
+ setUpdatedAt(value: any): /*elided*/any;
3843
+ freshTimestamp(): Date;
3844
+ freshTimestampString(): any;
3845
+ } & TGeneric<any, string> & {
3846
+ [x: string]: any;
3847
+ attributes: TGeneric;
3848
+ original: TGeneric;
3849
+ casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
3850
+ changes: TGeneric;
3851
+ appends: any[];
3852
+ setAppends(appends: any[]): /*elided*/any;
3853
+ append(...keys: any[]): /*elided*/any;
3854
+ normalizeCastClassResponse(key: string, value: string): TGeneric;
3855
+ syncOriginal(): /*elided*/any;
3856
+ syncChanges(): /*elided*/any;
3857
+ syncOriginalAttribute(attribute: string): void;
3858
+ syncOriginalAttributes(...attributes: string[]): /*elided*/any;
3859
+ isDirty(...attributes: string[]): boolean;
3860
+ getDirty(): TGeneric;
3861
+ originalIsEquivalent(key: string): boolean;
3862
+ setAttributes(attributes: TGeneric): void;
3863
+ setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
3864
+ getAttributes(): {
3865
+ [x: string]: any;
3866
+ };
3867
+ setAttribute(key: string, value: string): /*elided*/any;
3868
+ getAttribute(key: string): any;
3869
+ castAttribute(key: string, value: string): any;
3870
+ attributesToData(): {
3871
+ [x: string]: any;
3872
+ };
3873
+ mutateAttribute(key: string, value: string | null): any;
3874
+ mutateAttributeForArray(_key: string, _value: string): void;
3875
+ isDateAttribute(key: string): boolean;
3876
+ serializeDate(date?: Date | string | null): string | null;
3877
+ getDates(): any[];
3878
+ getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
3879
+ getCastType(key: string): any;
3880
+ hasCast(key: string, types?: readonly string[]): boolean;
3881
+ withDayjs(date: string): dayjs0.Dayjs;
3882
+ isCustomCast(cast: any): boolean;
3883
+ isCustomDateTimeCast(cast: any): boolean;
3884
+ isDecimalCast(cast: any): boolean;
3885
+ isDateCastable(key: string): boolean;
3886
+ fromDateTime(value: string): string;
3887
+ getDateFormat(): any;
3888
+ asDecimal(value: string, decimals: number): string;
3889
+ asDateTime(value: any): Date | null;
3890
+ asDate(value: string): Date;
3891
+ } & {
3892
+ [x: string]: any;
3893
+ hidden: any[];
3894
+ visible: any[];
3895
+ makeVisible(...keys: string[]): /*elided*/any;
3896
+ makeHidden(key: string[], ...keys: string[]): /*elided*/any;
3897
+ getHidden(): any[];
3898
+ getVisible(): any[];
3899
+ setHidden(hidden: any[]): /*elided*/any;
3900
+ setVisible(visible: any[]): /*elided*/any;
3901
+ } & {
3902
+ [x: string]: any;
3903
+ execHooks(hook: any, options: TGeneric): Promise<any>;
3904
+ } & {
3905
+ [x: string]: any;
3906
+ getGlobalScopes(): {};
3907
+ } & {
3908
+ [x: string]: any;
3909
+ useUniqueIds: boolean;
3910
+ usesUniqueIds(): boolean;
3911
+ uniqueIds(): never[];
3912
+ setUniqueIds(): void;
3913
+ }, `relation${Capitalize<SnakeToCamelCase<T>>}`>;
3914
+ getRelated: <T extends never>(relation: T) => ReturnTypeOfMethod<ReturnTypeOfMethod<(new () => IModel) & IModel & {
3915
+ [x: string]: any;
3916
+ timestamps: boolean;
3917
+ dateFormat: string;
3918
+ usesTimestamps(): boolean;
3919
+ updateTimestamps(): /*elided*/any;
3920
+ getCreatedAtColumn(): any;
3921
+ getUpdatedAtColumn(): any;
3922
+ setCreatedAt(value: any): /*elided*/any;
3923
+ setUpdatedAt(value: any): /*elided*/any;
3924
+ freshTimestamp(): Date;
3925
+ freshTimestampString(): any;
3926
+ } & TGeneric<any, string> & {
3927
+ [x: string]: any;
3928
+ attributes: TGeneric;
3929
+ original: TGeneric;
3930
+ casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
3931
+ changes: TGeneric;
3932
+ appends: any[];
3933
+ setAppends(appends: any[]): /*elided*/any;
3934
+ append(...keys: any[]): /*elided*/any;
3935
+ normalizeCastClassResponse(key: string, value: string): TGeneric;
3936
+ syncOriginal(): /*elided*/any;
3937
+ syncChanges(): /*elided*/any;
3938
+ syncOriginalAttribute(attribute: string): void;
3939
+ syncOriginalAttributes(...attributes: string[]): /*elided*/any;
3940
+ isDirty(...attributes: string[]): boolean;
3941
+ getDirty(): TGeneric;
3942
+ originalIsEquivalent(key: string): boolean;
3943
+ setAttributes(attributes: TGeneric): void;
3944
+ setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
3945
+ getAttributes(): {
3946
+ [x: string]: any;
3947
+ };
3948
+ setAttribute(key: string, value: string): /*elided*/any;
3949
+ getAttribute(key: string): any;
3950
+ castAttribute(key: string, value: string): any;
3951
+ attributesToData(): {
3952
+ [x: string]: any;
3953
+ };
3954
+ mutateAttribute(key: string, value: string | null): any;
3955
+ mutateAttributeForArray(_key: string, _value: string): void;
3956
+ isDateAttribute(key: string): boolean;
3957
+ serializeDate(date?: Date | string | null): string | null;
3958
+ getDates(): any[];
3959
+ getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
3960
+ getCastType(key: string): any;
3961
+ hasCast(key: string, types?: readonly string[]): boolean;
3962
+ withDayjs(date: string): dayjs0.Dayjs;
3963
+ isCustomCast(cast: any): boolean;
3964
+ isCustomDateTimeCast(cast: any): boolean;
3965
+ isDecimalCast(cast: any): boolean;
3966
+ isDateCastable(key: string): boolean;
3967
+ fromDateTime(value: string): string;
3968
+ getDateFormat(): any;
3969
+ asDecimal(value: string, decimals: number): string;
3970
+ asDateTime(value: any): Date | null;
3971
+ asDate(value: string): Date;
3972
+ } & {
3973
+ [x: string]: any;
3974
+ hidden: any[];
3975
+ visible: any[];
3976
+ makeVisible(...keys: string[]): /*elided*/any;
3977
+ makeHidden(key: string[], ...keys: string[]): /*elided*/any;
3978
+ getHidden(): any[];
3979
+ getVisible(): any[];
3980
+ setHidden(hidden: any[]): /*elided*/any;
3981
+ setVisible(visible: any[]): /*elided*/any;
3982
+ } & {
3983
+ [x: string]: any;
3984
+ execHooks(hook: any, options: TGeneric): Promise<any>;
3985
+ } & {
3986
+ [x: string]: any;
3987
+ getGlobalScopes(): {};
3988
+ } & {
3989
+ [x: string]: any;
3990
+ useUniqueIds: boolean;
3991
+ usesUniqueIds(): boolean;
3992
+ uniqueIds(): never[];
3993
+ setUniqueIds(): void;
3994
+ }, `relation${Capitalize<SnakeToCamelCase<T>>}`>, any>;
3995
+ hasOne: <T extends Model$1>(model: new () => T, foreignKey?: string, localKey?: string) => HasOne<T>;
3996
+ hasMany: <T extends Model$1>(model: new () => T, foreignKey?: string, localKey?: string) => HasMany<T>;
3997
+ belongsTo: <T extends Model$1>(model: new () => T, foreignKey?: string, ownerKey?: string, relation?: string) => BelongsTo<T>;
3998
+ belongsToMany: <T extends Model$1>(model: new () => T, table?: string, foreignPivotKey?: string, relatedPivotKey?: string, parentKey?: string, relatedKey?: string) => BelongsToMany<T>;
3999
+ original: TGeneric;
4000
+ casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
4001
+ changes: TGeneric;
4002
+ appends: any[];
4003
+ normalizeCastClassResponse: (key: string, value: string) => TGeneric;
4004
+ syncOriginal: () => (new () => IModel) & IModel & {
4005
+ [x: string]: any;
4006
+ timestamps: boolean;
4007
+ dateFormat: string;
4008
+ usesTimestamps(): boolean;
4009
+ updateTimestamps(): /*elided*/any;
4010
+ getCreatedAtColumn(): any;
4011
+ getUpdatedAtColumn(): any;
4012
+ setCreatedAt(value: any): /*elided*/any;
4013
+ setUpdatedAt(value: any): /*elided*/any;
4014
+ freshTimestamp(): Date;
4015
+ freshTimestampString(): any;
4016
+ } & TGeneric<any, string> & {
4017
+ [x: string]: any;
4018
+ attributes: TGeneric;
4019
+ original: TGeneric;
4020
+ casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
4021
+ changes: TGeneric;
4022
+ appends: any[];
4023
+ setAppends(appends: any[]): /*elided*/any;
4024
+ append(...keys: any[]): /*elided*/any;
4025
+ normalizeCastClassResponse(key: string, value: string): TGeneric;
4026
+ syncOriginal(): /*elided*/any;
4027
+ syncChanges(): /*elided*/any;
4028
+ syncOriginalAttribute(attribute: string): void;
4029
+ syncOriginalAttributes(...attributes: string[]): /*elided*/any;
4030
+ isDirty(...attributes: string[]): boolean;
4031
+ getDirty(): TGeneric;
4032
+ originalIsEquivalent(key: string): boolean;
4033
+ setAttributes(attributes: TGeneric): void;
4034
+ setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
4035
+ getAttributes(): {
4036
+ [x: string]: any;
4037
+ };
4038
+ setAttribute(key: string, value: string): /*elided*/any;
4039
+ getAttribute(key: string): any;
4040
+ castAttribute(key: string, value: string): any;
4041
+ attributesToData(): {
4042
+ [x: string]: any;
4043
+ };
4044
+ mutateAttribute(key: string, value: string | null): any;
4045
+ mutateAttributeForArray(_key: string, _value: string): void;
4046
+ isDateAttribute(key: string): boolean;
4047
+ serializeDate(date?: Date | string | null): string | null;
4048
+ getDates(): any[];
4049
+ getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
4050
+ getCastType(key: string): any;
4051
+ hasCast(key: string, types?: readonly string[]): boolean;
4052
+ withDayjs(date: string): dayjs0.Dayjs;
4053
+ isCustomCast(cast: any): boolean;
4054
+ isCustomDateTimeCast(cast: any): boolean;
4055
+ isDecimalCast(cast: any): boolean;
4056
+ isDateCastable(key: string): boolean;
4057
+ fromDateTime(value: string): string;
4058
+ getDateFormat(): any;
4059
+ asDecimal(value: string, decimals: number): string;
4060
+ asDateTime(value: any): Date | null;
4061
+ asDate(value: string): Date;
4062
+ } & {
4063
+ [x: string]: any;
4064
+ hidden: any[];
4065
+ visible: any[];
4066
+ makeVisible(...keys: string[]): /*elided*/any;
4067
+ makeHidden(key: string[], ...keys: string[]): /*elided*/any;
4068
+ getHidden(): any[];
4069
+ getVisible(): any[];
4070
+ setHidden(hidden: any[]): /*elided*/any;
4071
+ setVisible(visible: any[]): /*elided*/any;
4072
+ } & {
4073
+ [x: string]: any;
4074
+ execHooks(hook: any, options: TGeneric): Promise<any>;
4075
+ } & {
4076
+ [x: string]: any;
4077
+ getGlobalScopes(): {};
4078
+ } & {
4079
+ [x: string]: any;
4080
+ useUniqueIds: boolean;
4081
+ usesUniqueIds(): boolean;
4082
+ uniqueIds(): never[];
4083
+ setUniqueIds(): void;
4084
+ };
4085
+ syncChanges: () => (new () => IModel) & IModel & {
4086
+ [x: string]: any;
4087
+ timestamps: boolean;
4088
+ dateFormat: string;
4089
+ usesTimestamps(): boolean;
4090
+ updateTimestamps(): /*elided*/any;
4091
+ getCreatedAtColumn(): any;
4092
+ getUpdatedAtColumn(): any;
4093
+ setCreatedAt(value: any): /*elided*/any;
4094
+ setUpdatedAt(value: any): /*elided*/any;
4095
+ freshTimestamp(): Date;
4096
+ freshTimestampString(): any;
4097
+ } & TGeneric<any, string> & {
4098
+ [x: string]: any;
4099
+ attributes: TGeneric;
4100
+ original: TGeneric;
4101
+ casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
4102
+ changes: TGeneric;
4103
+ appends: any[];
4104
+ setAppends(appends: any[]): /*elided*/any;
4105
+ append(...keys: any[]): /*elided*/any;
4106
+ normalizeCastClassResponse(key: string, value: string): TGeneric;
4107
+ syncOriginal(): /*elided*/any;
4108
+ syncChanges(): /*elided*/any;
4109
+ syncOriginalAttribute(attribute: string): void;
4110
+ syncOriginalAttributes(...attributes: string[]): /*elided*/any;
4111
+ isDirty(...attributes: string[]): boolean;
4112
+ getDirty(): TGeneric;
4113
+ originalIsEquivalent(key: string): boolean;
4114
+ setAttributes(attributes: TGeneric): void;
4115
+ setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
4116
+ getAttributes(): {
4117
+ [x: string]: any;
4118
+ };
4119
+ setAttribute(key: string, value: string): /*elided*/any;
4120
+ getAttribute(key: string): any;
4121
+ castAttribute(key: string, value: string): any;
4122
+ attributesToData(): {
4123
+ [x: string]: any;
4124
+ };
4125
+ mutateAttribute(key: string, value: string | null): any;
4126
+ mutateAttributeForArray(_key: string, _value: string): void;
4127
+ isDateAttribute(key: string): boolean;
4128
+ serializeDate(date?: Date | string | null): string | null;
4129
+ getDates(): any[];
4130
+ getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
4131
+ getCastType(key: string): any;
4132
+ hasCast(key: string, types?: readonly string[]): boolean;
4133
+ withDayjs(date: string): dayjs0.Dayjs;
4134
+ isCustomCast(cast: any): boolean;
4135
+ isCustomDateTimeCast(cast: any): boolean;
4136
+ isDecimalCast(cast: any): boolean;
4137
+ isDateCastable(key: string): boolean;
4138
+ fromDateTime(value: string): string;
4139
+ getDateFormat(): any;
4140
+ asDecimal(value: string, decimals: number): string;
4141
+ asDateTime(value: any): Date | null;
4142
+ asDate(value: string): Date;
4143
+ } & {
4144
+ [x: string]: any;
4145
+ hidden: any[];
4146
+ visible: any[];
4147
+ makeVisible(...keys: string[]): /*elided*/any;
4148
+ makeHidden(key: string[], ...keys: string[]): /*elided*/any;
4149
+ getHidden(): any[];
4150
+ getVisible(): any[];
4151
+ setHidden(hidden: any[]): /*elided*/any;
4152
+ setVisible(visible: any[]): /*elided*/any;
4153
+ } & {
4154
+ [x: string]: any;
4155
+ execHooks(hook: any, options: TGeneric): Promise<any>;
4156
+ } & {
4157
+ [x: string]: any;
4158
+ getGlobalScopes(): {};
4159
+ } & {
4160
+ [x: string]: any;
4161
+ useUniqueIds: boolean;
4162
+ usesUniqueIds(): boolean;
4163
+ uniqueIds(): never[];
4164
+ setUniqueIds(): void;
4165
+ };
4166
+ syncOriginalAttribute: (attribute: string) => void;
4167
+ syncOriginalAttributes: (...attributes: string[]) => (new () => IModel) & IModel & {
4168
+ [x: string]: any;
4169
+ timestamps: boolean;
4170
+ dateFormat: string;
4171
+ usesTimestamps(): boolean;
4172
+ updateTimestamps(): /*elided*/any;
4173
+ getCreatedAtColumn(): any;
4174
+ getUpdatedAtColumn(): any;
4175
+ setCreatedAt(value: any): /*elided*/any;
4176
+ setUpdatedAt(value: any): /*elided*/any;
4177
+ freshTimestamp(): Date;
4178
+ freshTimestampString(): any;
4179
+ } & TGeneric<any, string> & {
4180
+ [x: string]: any;
4181
+ attributes: TGeneric;
4182
+ original: TGeneric;
4183
+ casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
4184
+ changes: TGeneric;
4185
+ appends: any[];
4186
+ setAppends(appends: any[]): /*elided*/any;
4187
+ append(...keys: any[]): /*elided*/any;
4188
+ normalizeCastClassResponse(key: string, value: string): TGeneric;
4189
+ syncOriginal(): /*elided*/any;
4190
+ syncChanges(): /*elided*/any;
4191
+ syncOriginalAttribute(attribute: string): void;
4192
+ syncOriginalAttributes(...attributes: string[]): /*elided*/any;
4193
+ isDirty(...attributes: string[]): boolean;
4194
+ getDirty(): TGeneric;
4195
+ originalIsEquivalent(key: string): boolean;
4196
+ setAttributes(attributes: TGeneric): void;
4197
+ setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
4198
+ getAttributes(): {
4199
+ [x: string]: any;
4200
+ };
4201
+ setAttribute(key: string, value: string): /*elided*/any;
4202
+ getAttribute(key: string): any;
4203
+ castAttribute(key: string, value: string): any;
4204
+ attributesToData(): {
4205
+ [x: string]: any;
4206
+ };
4207
+ mutateAttribute(key: string, value: string | null): any;
4208
+ mutateAttributeForArray(_key: string, _value: string): void;
4209
+ isDateAttribute(key: string): boolean;
4210
+ serializeDate(date?: Date | string | null): string | null;
4211
+ getDates(): any[];
4212
+ getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
4213
+ getCastType(key: string): any;
4214
+ hasCast(key: string, types?: readonly string[]): boolean;
4215
+ withDayjs(date: string): dayjs0.Dayjs;
4216
+ isCustomCast(cast: any): boolean;
4217
+ isCustomDateTimeCast(cast: any): boolean;
4218
+ isDecimalCast(cast: any): boolean;
4219
+ isDateCastable(key: string): boolean;
4220
+ fromDateTime(value: string): string;
4221
+ getDateFormat(): any;
4222
+ asDecimal(value: string, decimals: number): string;
4223
+ asDateTime(value: any): Date | null;
4224
+ asDate(value: string): Date;
4225
+ } & {
4226
+ [x: string]: any;
4227
+ hidden: any[];
4228
+ visible: any[];
4229
+ makeVisible(...keys: string[]): /*elided*/any;
4230
+ makeHidden(key: string[], ...keys: string[]): /*elided*/any;
4231
+ getHidden(): any[];
4232
+ getVisible(): any[];
4233
+ setHidden(hidden: any[]): /*elided*/any;
4234
+ setVisible(visible: any[]): /*elided*/any;
4235
+ } & {
4236
+ [x: string]: any;
4237
+ execHooks(hook: any, options: TGeneric): Promise<any>;
4238
+ } & {
4239
+ [x: string]: any;
4240
+ getGlobalScopes(): {};
4241
+ } & {
4242
+ [x: string]: any;
4243
+ useUniqueIds: boolean;
4244
+ usesUniqueIds(): boolean;
4245
+ uniqueIds(): never[];
4246
+ setUniqueIds(): void;
4247
+ };
4248
+ originalIsEquivalent: (key: string) => boolean;
4249
+ setAttributes: (attributes: TGeneric) => void;
4250
+ setRawAttributes: (attributes: TGeneric, sync?: boolean) => (new () => IModel) & IModel & {
4251
+ [x: string]: any;
4252
+ timestamps: boolean;
4253
+ dateFormat: string;
4254
+ usesTimestamps(): boolean;
4255
+ updateTimestamps(): /*elided*/any;
4256
+ getCreatedAtColumn(): any;
4257
+ getUpdatedAtColumn(): any;
4258
+ setCreatedAt(value: any): /*elided*/any;
4259
+ setUpdatedAt(value: any): /*elided*/any;
4260
+ freshTimestamp(): Date;
4261
+ freshTimestampString(): any;
4262
+ } & TGeneric<any, string> & {
4263
+ [x: string]: any;
4264
+ attributes: TGeneric;
4265
+ original: TGeneric;
4266
+ casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
4267
+ changes: TGeneric;
4268
+ appends: any[];
4269
+ setAppends(appends: any[]): /*elided*/any;
4270
+ append(...keys: any[]): /*elided*/any;
4271
+ normalizeCastClassResponse(key: string, value: string): TGeneric;
4272
+ syncOriginal(): /*elided*/any;
4273
+ syncChanges(): /*elided*/any;
4274
+ syncOriginalAttribute(attribute: string): void;
4275
+ syncOriginalAttributes(...attributes: string[]): /*elided*/any;
4276
+ isDirty(...attributes: string[]): boolean;
4277
+ getDirty(): TGeneric;
4278
+ originalIsEquivalent(key: string): boolean;
4279
+ setAttributes(attributes: TGeneric): void;
4280
+ setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
4281
+ getAttributes(): {
4282
+ [x: string]: any;
4283
+ };
4284
+ setAttribute(key: string, value: string): /*elided*/any;
4285
+ getAttribute(key: string): any;
4286
+ castAttribute(key: string, value: string): any;
4287
+ attributesToData(): {
4288
+ [x: string]: any;
4289
+ };
4290
+ mutateAttribute(key: string, value: string | null): any;
4291
+ mutateAttributeForArray(_key: string, _value: string): void;
4292
+ isDateAttribute(key: string): boolean;
4293
+ serializeDate(date?: Date | string | null): string | null;
4294
+ getDates(): any[];
4295
+ getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
4296
+ getCastType(key: string): any;
4297
+ hasCast(key: string, types?: readonly string[]): boolean;
4298
+ withDayjs(date: string): dayjs0.Dayjs;
4299
+ isCustomCast(cast: any): boolean;
4300
+ isCustomDateTimeCast(cast: any): boolean;
4301
+ isDecimalCast(cast: any): boolean;
4302
+ isDateCastable(key: string): boolean;
4303
+ fromDateTime(value: string): string;
4304
+ getDateFormat(): any;
4305
+ asDecimal(value: string, decimals: number): string;
4306
+ asDateTime(value: any): Date | null;
4307
+ asDate(value: string): Date;
4308
+ } & {
4309
+ [x: string]: any;
4310
+ hidden: any[];
4311
+ visible: any[];
4312
+ makeVisible(...keys: string[]): /*elided*/any;
4313
+ makeHidden(key: string[], ...keys: string[]): /*elided*/any;
4314
+ getHidden(): any[];
4315
+ getVisible(): any[];
4316
+ setHidden(hidden: any[]): /*elided*/any;
4317
+ setVisible(visible: any[]): /*elided*/any;
4318
+ } & {
4319
+ [x: string]: any;
4320
+ execHooks(hook: any, options: TGeneric): Promise<any>;
4321
+ } & {
4322
+ [x: string]: any;
4323
+ getGlobalScopes(): {};
4324
+ } & {
4325
+ [x: string]: any;
4326
+ useUniqueIds: boolean;
4327
+ usesUniqueIds(): boolean;
4328
+ uniqueIds(): never[];
4329
+ setUniqueIds(): void;
4330
+ };
4331
+ castAttribute: (key: string, value: string) => any;
4332
+ mutateAttribute: (key: string, value: string | null) => any;
4333
+ mutateAttributeForArray: (_key: string, _value: string) => void;
4334
+ isDateAttribute: (key: string) => boolean;
4335
+ getCasts: () => TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
4336
+ getCastType: (key: string) => any;
4337
+ hasCast: (key: string, types?: readonly string[]) => boolean;
4338
+ withDayjs: (date: string) => dayjs0.Dayjs;
4339
+ isCustomCast: (cast: any) => boolean;
4340
+ isCustomDateTimeCast: (cast: any) => boolean;
4341
+ isDecimalCast: (cast: any) => boolean;
4342
+ isDateCastable: (key: string) => boolean;
4343
+ asDecimal: (value: string, decimals: number) => string;
4344
+ asDateTime: (value: any) => Date | null;
4345
+ asDate: (value: string) => Date;
4346
+ getHidden: () => any[];
4347
+ getVisible: () => any[];
4348
+ setHidden: (hidden: any[]) => (new () => IModel) & IModel & {
4349
+ [x: string]: any;
4350
+ timestamps: boolean;
4351
+ dateFormat: string;
4352
+ usesTimestamps(): boolean;
4353
+ updateTimestamps(): /*elided*/any;
4354
+ getCreatedAtColumn(): any;
4355
+ getUpdatedAtColumn(): any;
4356
+ setCreatedAt(value: any): /*elided*/any;
4357
+ setUpdatedAt(value: any): /*elided*/any;
4358
+ freshTimestamp(): Date;
4359
+ freshTimestampString(): any;
4360
+ } & TGeneric<any, string> & {
4361
+ [x: string]: any;
4362
+ attributes: TGeneric;
4363
+ original: TGeneric;
4364
+ casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
4365
+ changes: TGeneric;
4366
+ appends: any[];
4367
+ setAppends(appends: any[]): /*elided*/any;
4368
+ append(...keys: any[]): /*elided*/any;
4369
+ normalizeCastClassResponse(key: string, value: string): TGeneric;
4370
+ syncOriginal(): /*elided*/any;
4371
+ syncChanges(): /*elided*/any;
4372
+ syncOriginalAttribute(attribute: string): void;
4373
+ syncOriginalAttributes(...attributes: string[]): /*elided*/any;
4374
+ isDirty(...attributes: string[]): boolean;
4375
+ getDirty(): TGeneric;
4376
+ originalIsEquivalent(key: string): boolean;
4377
+ setAttributes(attributes: TGeneric): void;
4378
+ setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
4379
+ getAttributes(): {
4380
+ [x: string]: any;
4381
+ };
4382
+ setAttribute(key: string, value: string): /*elided*/any;
4383
+ getAttribute(key: string): any;
4384
+ castAttribute(key: string, value: string): any;
4385
+ attributesToData(): {
4386
+ [x: string]: any;
4387
+ };
4388
+ mutateAttribute(key: string, value: string | null): any;
4389
+ mutateAttributeForArray(_key: string, _value: string): void;
4390
+ isDateAttribute(key: string): boolean;
4391
+ serializeDate(date?: Date | string | null): string | null;
4392
+ getDates(): any[];
4393
+ getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
4394
+ getCastType(key: string): any;
4395
+ hasCast(key: string, types?: readonly string[]): boolean;
4396
+ withDayjs(date: string): dayjs0.Dayjs;
4397
+ isCustomCast(cast: any): boolean;
4398
+ isCustomDateTimeCast(cast: any): boolean;
4399
+ isDecimalCast(cast: any): boolean;
4400
+ isDateCastable(key: string): boolean;
4401
+ fromDateTime(value: string): string;
4402
+ getDateFormat(): any;
4403
+ asDecimal(value: string, decimals: number): string;
4404
+ asDateTime(value: any): Date | null;
4405
+ asDate(value: string): Date;
4406
+ } & {
4407
+ [x: string]: any;
4408
+ hidden: any[];
4409
+ visible: any[];
4410
+ makeVisible(...keys: string[]): /*elided*/any;
4411
+ makeHidden(key: string[], ...keys: string[]): /*elided*/any;
4412
+ getHidden(): any[];
4413
+ getVisible(): any[];
4414
+ setHidden(hidden: any[]): /*elided*/any;
4415
+ setVisible(visible: any[]): /*elided*/any;
4416
+ } & {
4417
+ [x: string]: any;
4418
+ execHooks(hook: any, options: TGeneric): Promise<any>;
4419
+ } & {
4420
+ [x: string]: any;
4421
+ getGlobalScopes(): {};
4422
+ } & {
4423
+ [x: string]: any;
4424
+ useUniqueIds: boolean;
4425
+ usesUniqueIds(): boolean;
4426
+ uniqueIds(): never[];
4427
+ setUniqueIds(): void;
4428
+ };
4429
+ setVisible: (visible: any[]) => (new () => IModel) & IModel & {
4430
+ [x: string]: any;
4431
+ timestamps: boolean;
4432
+ dateFormat: string;
4433
+ usesTimestamps(): boolean;
4434
+ updateTimestamps(): /*elided*/any;
4435
+ getCreatedAtColumn(): any;
4436
+ getUpdatedAtColumn(): any;
4437
+ setCreatedAt(value: any): /*elided*/any;
4438
+ setUpdatedAt(value: any): /*elided*/any;
4439
+ freshTimestamp(): Date;
4440
+ freshTimestampString(): any;
4441
+ } & TGeneric<any, string> & {
4442
+ [x: string]: any;
4443
+ attributes: TGeneric;
4444
+ original: TGeneric;
4445
+ casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
4446
+ changes: TGeneric;
4447
+ appends: any[];
4448
+ setAppends(appends: any[]): /*elided*/any;
4449
+ append(...keys: any[]): /*elided*/any;
4450
+ normalizeCastClassResponse(key: string, value: string): TGeneric;
4451
+ syncOriginal(): /*elided*/any;
4452
+ syncChanges(): /*elided*/any;
4453
+ syncOriginalAttribute(attribute: string): void;
4454
+ syncOriginalAttributes(...attributes: string[]): /*elided*/any;
4455
+ isDirty(...attributes: string[]): boolean;
4456
+ getDirty(): TGeneric;
4457
+ originalIsEquivalent(key: string): boolean;
4458
+ setAttributes(attributes: TGeneric): void;
4459
+ setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
4460
+ getAttributes(): {
4461
+ [x: string]: any;
4462
+ };
4463
+ setAttribute(key: string, value: string): /*elided*/any;
4464
+ getAttribute(key: string): any;
4465
+ castAttribute(key: string, value: string): any;
4466
+ attributesToData(): {
4467
+ [x: string]: any;
4468
+ };
4469
+ mutateAttribute(key: string, value: string | null): any;
4470
+ mutateAttributeForArray(_key: string, _value: string): void;
4471
+ isDateAttribute(key: string): boolean;
4472
+ serializeDate(date?: Date | string | null): string | null;
4473
+ getDates(): any[];
4474
+ getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
4475
+ getCastType(key: string): any;
4476
+ hasCast(key: string, types?: readonly string[]): boolean;
4477
+ withDayjs(date: string): dayjs0.Dayjs;
4478
+ isCustomCast(cast: any): boolean;
4479
+ isCustomDateTimeCast(cast: any): boolean;
4480
+ isDecimalCast(cast: any): boolean;
4481
+ isDateCastable(key: string): boolean;
4482
+ fromDateTime(value: string): string;
4483
+ getDateFormat(): any;
4484
+ asDecimal(value: string, decimals: number): string;
4485
+ asDateTime(value: any): Date | null;
4486
+ asDate(value: string): Date;
4487
+ } & {
4488
+ [x: string]: any;
4489
+ hidden: any[];
4490
+ visible: any[];
4491
+ makeVisible(...keys: string[]): /*elided*/any;
4492
+ makeHidden(key: string[], ...keys: string[]): /*elided*/any;
4493
+ getHidden(): any[];
4494
+ getVisible(): any[];
4495
+ setHidden(hidden: any[]): /*elided*/any;
4496
+ setVisible(visible: any[]): /*elided*/any;
4497
+ } & {
4498
+ [x: string]: any;
4499
+ execHooks(hook: any, options: TGeneric): Promise<any>;
4500
+ } & {
4501
+ [x: string]: any;
4502
+ getGlobalScopes(): {};
4503
+ } & {
4504
+ [x: string]: any;
4505
+ useUniqueIds: boolean;
4506
+ usesUniqueIds(): boolean;
4507
+ uniqueIds(): never[];
4508
+ setUniqueIds(): void;
4509
+ };
4510
+ execHooks: (hook: any, options: TGeneric) => Promise<any>;
4511
+ getGlobalScopes: () => {};
4512
+ useUniqueIds: boolean;
1033
4513
  };
1034
4514
  declare class Model$1 extends BaseModel$1 {
1035
- protected primaryKey: string;
4515
+ [key: string]: any;
1036
4516
  protected builder: IBuilder<any, any> | null;
1037
4517
  protected table: string | null;
1038
4518
  protected keyType: string;
1039
4519
  protected incrementing: boolean;
1040
4520
  protected withCount: never[];
4521
+ protected primaryKey: string;
1041
4522
  perPage: number;
1042
4523
  static globalScopes: {};
1043
4524
  static pluginInitializers: {};
@@ -1047,6 +4528,7 @@ declare class Model$1 extends BaseModel$1 {
1047
4528
  eagerLoad: {};
1048
4529
  exists: boolean;
1049
4530
  with: string | string[] | TGeneric<(...args: any[]) => IBuilder<Model$1>>;
4531
+ name: any;
1050
4532
  trx: null;
1051
4533
  constructor(attributes?: {});
1052
4534
  static query(trx?: null): Builder<Model$1, IModel | ICollection<Model$1>>;
@@ -1276,17 +4758,6 @@ declare class Attribute {
1276
4758
  shouldCache(): this;
1277
4759
  }
1278
4760
  //#endregion
1279
- //#region src/casts-attributes.d.ts
1280
- interface ICastsAttributes {
1281
- get?(model: Model$1, key: string, value: string, attributes: TGeneric): string | null | undefined;
1282
- set?(model: Model$1, key: string, value: string, attributes: TGeneric): string | null | undefined;
1283
- }
1284
- declare class CastsAttributes implements ICastsAttributes {
1285
- constructor();
1286
- static get(_model: Model$1, _key: string, _value: string, _attributes: TGeneric): string | null | undefined;
1287
- static set(_model: Model$1, _key: string, _value: string, _attributes: TGeneric): string | null | undefined;
1288
- }
1289
- //#endregion
1290
4761
  //#region src/concerns/has-unique-ids.d.ts
1291
4762
  declare const HasUniqueIds: <TBase extends MixinConstructor>(Model: TBase) => {
1292
4763
  new (...args: any[]): {
@@ -1589,7 +5060,7 @@ type Static<T> = { [K in keyof T]: T[K] };
1589
5060
  * @param mixins
1590
5061
  * @returns
1591
5062
  */
1592
- 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>;
5063
+ 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>;
1593
5064
  //#endregion
1594
5065
  //#region src/utils.d.ts
1595
5066
  declare const now: (format?: string) => string;
@@ -1617,10 +5088,10 @@ declare const snakeCase: (str: string) => string;
1617
5088
  declare const defineConfig: (config: TConfig) => XGeneric<TConfig>;
1618
5089
  //#endregion
1619
5090
  //#region src/index.d.ts
1620
- declare const make: (model: Model$1, data: TGeneric, options?: {
1621
- paginated: IPaginatorParams;
5091
+ declare const make: <M extends Model$1 | typeof Model$1>(model: M, data: TGeneric, options?: {
5092
+ paginated: IPaginatorParams | boolean;
1622
5093
  }) => any;
1623
- declare const makeCollection: (model: Model$1, data: TGeneric) => Collection<Model$1 | Model$2>;
1624
- declare const makePaginator: (model: Model$1, data: TGeneric) => Paginator<Model$1, IPaginatorParams>;
5094
+ declare const makeCollection: <M extends Model$1 | typeof Model$1>(model: M, data: TGeneric) => Collection<Model$1 | Model$2>;
5095
+ declare const makePaginator: <M extends Model$1 | typeof Model$1>(model: M, data: TGeneric, _: any) => Paginator<Model$1, IPaginatorParams>;
1625
5096
  //#endregion
1626
5097
  export { Attribute, Builder, CastsAttributes, Collection, HasUniqueIds, InvalidArgumentError, Migrate, Migration, Model$1 as Model, ModelNotFoundError, Paginator, Pivot, QueryBuilder, RelationNotFoundError, Scope, softDeletes as SoftDeletes, arquebus, compose, defineConfig, flatten, flattenDeep, getAttrMethod, getAttrName, getGetterMethod, getRelationMethod, getRelationName, getScopeMethod, getScopeName, getSetterMethod, kebabCase, make, makeCollection, makePaginator, now, snakeCase, tap };