@h3ravel/arquebus 0.4.1 → 0.6.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.
Files changed (45) hide show
  1. package/README.md +20 -1
  2. package/bin/index.cjs +225 -171
  3. package/bin/index.js +208 -122
  4. package/bin/seeders-8GJzfIIN.js +3 -0
  5. package/bin/seeders-ByeSoCAQ.cjs +131 -0
  6. package/bin/seeders-CltigymO.js +79 -0
  7. package/bin/seeders-_xJ6VGVS.cjs +3 -0
  8. package/dist/browser/index.cjs +9 -9
  9. package/dist/browser/index.d.cts +3655 -183
  10. package/dist/browser/index.d.ts +3655 -183
  11. package/dist/browser/index.js +9 -9
  12. package/dist/index.cjs +270 -135
  13. package/dist/index.d.cts +3797 -294
  14. package/dist/index.d.ts +3797 -294
  15. package/dist/index.js +263 -133
  16. package/dist/inspector/index.cjs +122 -46
  17. package/dist/inspector/index.js +119 -46
  18. package/dist/migrations/index.cjs +171 -151
  19. package/dist/migrations/index.d.cts +3510 -27
  20. package/dist/migrations/index.d.ts +3510 -27
  21. package/dist/migrations/index.js +177 -150
  22. package/dist/migrations/stubs/migration-js.stub +1 -1
  23. package/dist/migrations/stubs/migration-ts.stub +1 -1
  24. package/dist/migrations/stubs/migration.create-js.stub +5 -5
  25. package/dist/migrations/stubs/migration.create-ts.stub +5 -5
  26. package/dist/migrations/stubs/migration.update-js.stub +2 -2
  27. package/dist/migrations/stubs/migration.update-ts.stub +3 -3
  28. package/dist/seeders/index.cjs +141 -0
  29. package/dist/seeders/index.d.cts +4766 -0
  30. package/dist/seeders/index.d.ts +4766 -0
  31. package/dist/seeders/index.js +118 -0
  32. package/dist/seeders/index.ts +3 -0
  33. package/dist/seeders/runner.ts +102 -0
  34. package/dist/seeders/seeder-creator.ts +42 -0
  35. package/dist/seeders/seeder.ts +10 -0
  36. package/dist/stubs/seeder-js.stub +13 -0
  37. package/dist/stubs/seeder-ts.stub +9 -0
  38. package/package.json +15 -4
  39. package/types/builder.ts +158 -80
  40. package/types/container.ts +79 -66
  41. package/types/generics.ts +75 -36
  42. package/types/modeling.ts +213 -158
  43. package/types/query-builder.ts +223 -186
  44. package/types/query-methods.ts +160 -104
  45. package/types/utils.ts +64 -55
@@ -1,14 +1,26 @@
1
1
  import "node:module";
2
+ import * as dayjs0 from "dayjs";
2
3
  import { Collection } from "collect.js";
3
4
  import Knex$1, { Knex } from "knex";
4
5
 
5
6
  //#region rolldown:runtime
6
7
  //#endregion
8
+ //#region src/casts-attributes.d.ts
9
+ interface ICastsAttributes {
10
+ get?(model: Model, key: string, value: string, attributes: TGeneric): string | null | undefined;
11
+ set?(model: Model, key: string, value: string, attributes: TGeneric): string | null | undefined;
12
+ }
13
+ declare class CastsAttributes implements ICastsAttributes {
14
+ constructor();
15
+ static get(_model: Model, _key: string, _value: string, _attributes: TGeneric): string | null | undefined;
16
+ static set(_model: Model, _key: string, _value: string, _attributes: TGeneric): string | null | undefined;
17
+ }
18
+ //#endregion
7
19
  //#region src/collection.d.ts
8
20
  declare class Collection$1<I extends Model | Model$1> extends Collection<I> implements ICollection<I> {
9
21
  private newConstructor;
10
22
  getConstructor<T extends typeof Collection$1<I>>(this: InstanceType<T>): T;
11
- load(...relations: I[]): Promise<Collection$1<I>>;
23
+ load(...relations: (string[] | I[] | string | I)[]): Promise<Collection$1<I>>;
12
24
  loadAggregate<I>(relations: I, column: string, action?: string | null | TFunction): Promise<this>;
13
25
  loadCount(relations: I): Promise<this>;
14
26
  loadMax(relation: I, column: string): Promise<this>;
@@ -54,7 +66,7 @@ declare class Paginator<T extends Model, K extends IPaginatorParams = IPaginator
54
66
  _currentPage: number;
55
67
  hasMore: boolean;
56
68
  options: TGeneric;
57
- static setFormatter(formatter: (paginator: IPaginator<any>) => any | null): void;
69
+ static setFormatter(formatter?: ((paginator: IPaginator<any> | null) => any) | null): void;
58
70
  constructor(items: T[], total: number, perPage: number, currentPage?: number, options?: TGeneric);
59
71
  setItems(items: T[]): void;
60
72
  firstItem(): number | null;
@@ -82,7 +94,7 @@ declare class Scope<M extends Model = Model> implements IScope {
82
94
  //#endregion
83
95
  //#region src/builder.d.ts
84
96
  declare const Inference$2: {
85
- new <M extends Model = Model, R = IModel | ICollection<M>>(): IBuilder<M, R>;
97
+ new <M extends Model | Model$1 = Model, R = IModel | ICollection<M>>(): IBuilder<M, R>;
86
98
  };
87
99
  declare class Builder<M extends Model = Model, R = IModel | ICollection<M>> extends Inference$2 {
88
100
  query: IBuilder<M, R>;
@@ -100,7 +112,7 @@ declare class Builder<M extends Model = Model, R = IModel | ICollection<M>> exte
100
112
  enforceOrderBy(this: any): void;
101
113
  clone(this: any): any;
102
114
  forPage(this: any, page: number, perPage?: number): any;
103
- insert(...args: Parameters<typeof (void 0).query.insert>): Promise<any>;
115
+ insert(...args: Parameters<typeof this.query.insert>): Promise<any>;
104
116
  update<T extends TGeneric>(values: T): Promise<any>;
105
117
  increment(column: string, amount?: number, extra?: {}): Promise<any>;
106
118
  decrement(column: string, amount?: number, extra?: {}): Promise<any>;
@@ -174,7 +186,7 @@ declare class Builder<M extends Model = Model, R = IModel | ICollection<M>> exte
174
186
  find(this: any, id: string | number | Collection$1<M>, columns?: string[]): Promise<any>;
175
187
  findMany(this: any, ids: string[] | number[] | ICollection<any>, columns?: string[]): Promise<any>;
176
188
  pluck(column: string): Promise<any>;
177
- destroy(this: any, ids?: (string | number)[] | TFunction | Collection$1<M>): Promise<number>;
189
+ destroy(this: any, ids?: string | number | string[] | number[] | TFunction | Collection$1<M>): Promise<number>;
178
190
  get<M extends Model>(columns?: string | string[]): Promise<Collection$1<M>>;
179
191
  all(columns?: string[]): Promise<any>;
180
192
  paginate(this: any, page?: number, perPage?: number): Promise<Paginator<any, IPaginatorParams>>;
@@ -184,7 +196,7 @@ declare class Builder<M extends Model = Model, R = IModel | ICollection<M>> exte
184
196
  isNestedUnder(relation: string, name: string): boolean;
185
197
  eagerLoadRelation<M extends Model>(models: M[], name: string, constraints: any): Promise<any>;
186
198
  eagerLoadRelations<M extends Model>(models: M[]): Promise<M[]>;
187
- hydrate(items: any[]): Collection$1<any>;
199
+ hydrate(items: any[] | ICollection<any>): Collection$1<any>;
188
200
  }
189
201
  //#endregion
190
202
  //#region src/relations/relation.d.ts
@@ -207,7 +219,7 @@ declare class Relation$1 {
207
219
  getEager(): any;
208
220
  get(columns?: string | string[]): Promise<any>;
209
221
  first(columns?: string[]): Promise<any>;
210
- paginate(...args: any[]): Promise<any>;
222
+ paginate(...args: unknown[]): Promise<any>;
211
223
  count(...args: any[]): Promise<any>;
212
224
  toSql(): string;
213
225
  addConstraints(): void;
@@ -403,15 +415,9 @@ interface IModel {
403
415
  attributes: any;
404
416
  relations: any;
405
417
  exists: boolean;
406
- primaryKey: string;
407
- builder?: IBuilder<any, any> | null;
408
- table: string | null;
409
418
  connection?: TBaseConfig['client'] | null;
410
- keyType: string;
411
- incrementing: boolean;
412
419
  perPage: number;
413
420
  with: string | string[] | TGeneric<(...args: any[]) => IBuilder<Model>>;
414
- withCount: string[];
415
421
  trx: AnyQueryBuilder | null;
416
422
  timestamps: boolean;
417
423
  dateFormat: string;
@@ -450,7 +456,6 @@ interface IModel {
450
456
  setConnection(connection: TBaseConfig['client'] | null): this;
451
457
  usesUniqueIds(): boolean;
452
458
  uniqueIds(): string[];
453
- newUniqueId(): string;
454
459
  setUniqueIds(): void;
455
460
  getKeyType(): string;
456
461
  getIncrementing(): boolean;
@@ -524,14 +529,3451 @@ interface IModel {
524
529
  //#region src/model.d.ts
525
530
  declare const BaseModel$1: (new (...args: any[]) => any) & {
526
531
  [x: string]: any;
532
+ } & {
533
+ [x: string]: any;
534
+ attributes: any;
535
+ relations: any;
536
+ exists: boolean;
537
+ connection?: (TBaseConfig["client"] | null) | undefined;
538
+ perPage: number;
539
+ with: string | string[] | TGeneric<(...args: any[]) => IBuilder<Model>>;
540
+ trx: AnyQueryBuilder | null;
541
+ timestamps: boolean;
542
+ dateFormat: string;
543
+ visible: string[] & any[];
544
+ hidden: string[] & any[];
545
+ query: <T extends {
546
+ prototype: unknown;
547
+ }>(this: T, client?: AnyQueryBuilder | null) => IBuilder<Model>;
548
+ on: <T extends {
549
+ prototype: unknown;
550
+ }>(this: T, connection: string | null) => IBuilder<Model>;
551
+ boot: () => void;
552
+ make: <T extends IModel>(this: new () => T, attributes?: TGeneric) => T;
553
+ addHook: (hook: Hook, callback: TFunction) => void;
554
+ creating: (callback: TFunction) => void;
555
+ created: (callback: TFunction) => void;
556
+ updating: (callback: TFunction) => void;
557
+ updated: (callback: TFunction) => void;
558
+ deleting: (callback: TFunction) => void;
559
+ deleted: (callback: TFunction) => void;
560
+ saving: (callback: TFunction) => void;
561
+ saved: (callback: TFunction) => void;
562
+ restoring: (callback: TFunction) => void;
563
+ restored: (callback: TFunction) => void;
564
+ trashed: {
565
+ (callback: TFunction): void;
566
+ (): boolean;
567
+ };
568
+ forceDeleted: (callback: TFunction) => void;
569
+ bootIfNotBooted: () => void;
570
+ initialize: () => void;
571
+ initializePlugins: () => void;
572
+ addPluginInitializer: (method: any) => void;
573
+ newInstance: (attributes?: TGeneric, exists?: boolean) => any;
574
+ getKey: () => string | number | null | undefined;
575
+ getKeyName: () => string;
576
+ getConnectionName: () => string;
577
+ getConnection: () => any;
578
+ setConnection: (connection: TBaseConfig["client"] | null) => (new () => IModel) & IModel & {
579
+ [x: string]: any;
580
+ timestamps: boolean;
581
+ dateFormat: string;
582
+ usesTimestamps(): boolean;
583
+ updateTimestamps(): /*elided*/any;
584
+ getCreatedAtColumn(): any;
585
+ getUpdatedAtColumn(): any;
586
+ setCreatedAt(value: any): /*elided*/any;
587
+ setUpdatedAt(value: any): /*elided*/any;
588
+ freshTimestamp(): Date;
589
+ freshTimestampString(): any;
590
+ } & TGeneric<any, string> & {
591
+ [x: string]: any;
592
+ attributes: TGeneric;
593
+ original: TGeneric;
594
+ casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
595
+ changes: TGeneric;
596
+ appends: any[];
597
+ setAppends(appends: any[]): /*elided*/any;
598
+ append(...keys: any[]): /*elided*/any;
599
+ normalizeCastClassResponse(key: string, value: string): TGeneric;
600
+ syncOriginal(): /*elided*/any;
601
+ syncChanges(): /*elided*/any;
602
+ syncOriginalAttribute(attribute: string): void;
603
+ syncOriginalAttributes(...attributes: string[]): /*elided*/any;
604
+ isDirty(...attributes: string[]): boolean;
605
+ getDirty(): TGeneric;
606
+ originalIsEquivalent(key: string): boolean;
607
+ setAttributes(attributes: TGeneric): void;
608
+ setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
609
+ getAttributes(): {
610
+ [x: string]: any;
611
+ };
612
+ setAttribute(key: string, value: string): /*elided*/any;
613
+ getAttribute(key: string): any;
614
+ castAttribute(key: string, value: string): any;
615
+ attributesToData(): {
616
+ [x: string]: any;
617
+ };
618
+ mutateAttribute(key: string, value: string | null): any;
619
+ mutateAttributeForArray(_key: string, _value: string): void;
620
+ isDateAttribute(key: string): boolean;
621
+ serializeDate(date?: Date | string | null): string | null;
622
+ getDates(): any[];
623
+ getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
624
+ getCastType(key: string): any;
625
+ hasCast(key: string, types?: readonly string[]): boolean;
626
+ withDayjs(date: string): dayjs0.Dayjs;
627
+ isCustomCast(cast: any): boolean;
628
+ isCustomDateTimeCast(cast: any): boolean;
629
+ isDecimalCast(cast: any): boolean;
630
+ isDateCastable(key: string): boolean;
631
+ fromDateTime(value: string): string;
632
+ getDateFormat(): any;
633
+ asDecimal(value: string, decimals: number): string;
634
+ asDateTime(value: any): Date | null;
635
+ asDate(value: string): Date;
636
+ } & {
637
+ [x: string]: any;
638
+ hidden: any[];
639
+ visible: any[];
640
+ makeVisible(...keys: string[]): /*elided*/any;
641
+ makeHidden(key: string[], ...keys: string[]): /*elided*/any;
642
+ getHidden(): any[];
643
+ getVisible(): any[];
644
+ setHidden(hidden: any[]): /*elided*/any;
645
+ setVisible(visible: any[]): /*elided*/any;
646
+ } & {
647
+ [x: string]: any;
648
+ execHooks(hook: any, options: TGeneric): Promise<any>;
649
+ } & {
650
+ [x: string]: any;
651
+ getGlobalScopes(): {};
652
+ } & {
653
+ [x: string]: any;
654
+ useUniqueIds: boolean;
655
+ usesUniqueIds(): boolean;
656
+ uniqueIds(): never[];
657
+ setUniqueIds(): void;
658
+ };
659
+ usesUniqueIds: (() => boolean) & (() => boolean);
660
+ uniqueIds: (() => string[]) & (() => never[]);
661
+ setUniqueIds: (() => void) & (() => void);
662
+ getKeyType: () => string;
663
+ getIncrementing: () => boolean;
664
+ setIncrementing: (value: boolean) => (new () => IModel) & IModel & {
665
+ [x: string]: any;
666
+ timestamps: boolean;
667
+ dateFormat: string;
668
+ usesTimestamps(): boolean;
669
+ updateTimestamps(): /*elided*/any;
670
+ getCreatedAtColumn(): any;
671
+ getUpdatedAtColumn(): any;
672
+ setCreatedAt(value: any): /*elided*/any;
673
+ setUpdatedAt(value: any): /*elided*/any;
674
+ freshTimestamp(): Date;
675
+ freshTimestampString(): any;
676
+ } & TGeneric<any, string> & {
677
+ [x: string]: any;
678
+ attributes: TGeneric;
679
+ original: TGeneric;
680
+ casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
681
+ changes: TGeneric;
682
+ appends: any[];
683
+ setAppends(appends: any[]): /*elided*/any;
684
+ append(...keys: any[]): /*elided*/any;
685
+ normalizeCastClassResponse(key: string, value: string): TGeneric;
686
+ syncOriginal(): /*elided*/any;
687
+ syncChanges(): /*elided*/any;
688
+ syncOriginalAttribute(attribute: string): void;
689
+ syncOriginalAttributes(...attributes: string[]): /*elided*/any;
690
+ isDirty(...attributes: string[]): boolean;
691
+ getDirty(): TGeneric;
692
+ originalIsEquivalent(key: string): boolean;
693
+ setAttributes(attributes: TGeneric): void;
694
+ setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
695
+ getAttributes(): {
696
+ [x: string]: any;
697
+ };
698
+ setAttribute(key: string, value: string): /*elided*/any;
699
+ getAttribute(key: string): any;
700
+ castAttribute(key: string, value: string): any;
701
+ attributesToData(): {
702
+ [x: string]: any;
703
+ };
704
+ mutateAttribute(key: string, value: string | null): any;
705
+ mutateAttributeForArray(_key: string, _value: string): void;
706
+ isDateAttribute(key: string): boolean;
707
+ serializeDate(date?: Date | string | null): string | null;
708
+ getDates(): any[];
709
+ getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
710
+ getCastType(key: string): any;
711
+ hasCast(key: string, types?: readonly string[]): boolean;
712
+ withDayjs(date: string): dayjs0.Dayjs;
713
+ isCustomCast(cast: any): boolean;
714
+ isCustomDateTimeCast(cast: any): boolean;
715
+ isDecimalCast(cast: any): boolean;
716
+ isDateCastable(key: string): boolean;
717
+ fromDateTime(value: string): string;
718
+ getDateFormat(): any;
719
+ asDecimal(value: string, decimals: number): string;
720
+ asDateTime(value: any): Date | null;
721
+ asDate(value: string): Date;
722
+ } & {
723
+ [x: string]: any;
724
+ hidden: any[];
725
+ visible: any[];
726
+ makeVisible(...keys: string[]): /*elided*/any;
727
+ makeHidden(key: string[], ...keys: string[]): /*elided*/any;
728
+ getHidden(): any[];
729
+ getVisible(): any[];
730
+ setHidden(hidden: any[]): /*elided*/any;
731
+ setVisible(visible: any[]): /*elided*/any;
732
+ } & {
733
+ [x: string]: any;
734
+ execHooks(hook: any, options: TGeneric): Promise<any>;
735
+ } & {
736
+ [x: string]: any;
737
+ getGlobalScopes(): {};
738
+ } & {
739
+ [x: string]: any;
740
+ useUniqueIds: boolean;
741
+ usesUniqueIds(): boolean;
742
+ uniqueIds(): never[];
743
+ setUniqueIds(): void;
744
+ };
745
+ getTable: () => string;
746
+ setTable: (table: string) => (new () => IModel) & IModel & {
747
+ [x: string]: any;
748
+ timestamps: boolean;
749
+ dateFormat: string;
750
+ usesTimestamps(): boolean;
751
+ updateTimestamps(): /*elided*/any;
752
+ getCreatedAtColumn(): any;
753
+ getUpdatedAtColumn(): any;
754
+ setCreatedAt(value: any): /*elided*/any;
755
+ setUpdatedAt(value: any): /*elided*/any;
756
+ freshTimestamp(): Date;
757
+ freshTimestampString(): any;
758
+ } & TGeneric<any, string> & {
759
+ [x: string]: any;
760
+ attributes: TGeneric;
761
+ original: TGeneric;
762
+ casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
763
+ changes: TGeneric;
764
+ appends: any[];
765
+ setAppends(appends: any[]): /*elided*/any;
766
+ append(...keys: any[]): /*elided*/any;
767
+ normalizeCastClassResponse(key: string, value: string): TGeneric;
768
+ syncOriginal(): /*elided*/any;
769
+ syncChanges(): /*elided*/any;
770
+ syncOriginalAttribute(attribute: string): void;
771
+ syncOriginalAttributes(...attributes: string[]): /*elided*/any;
772
+ isDirty(...attributes: string[]): boolean;
773
+ getDirty(): TGeneric;
774
+ originalIsEquivalent(key: string): boolean;
775
+ setAttributes(attributes: TGeneric): void;
776
+ setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
777
+ getAttributes(): {
778
+ [x: string]: any;
779
+ };
780
+ setAttribute(key: string, value: string): /*elided*/any;
781
+ getAttribute(key: string): any;
782
+ castAttribute(key: string, value: string): any;
783
+ attributesToData(): {
784
+ [x: string]: any;
785
+ };
786
+ mutateAttribute(key: string, value: string | null): any;
787
+ mutateAttributeForArray(_key: string, _value: string): void;
788
+ isDateAttribute(key: string): boolean;
789
+ serializeDate(date?: Date | string | null): string | null;
790
+ getDates(): any[];
791
+ getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
792
+ getCastType(key: string): any;
793
+ hasCast(key: string, types?: readonly string[]): boolean;
794
+ withDayjs(date: string): dayjs0.Dayjs;
795
+ isCustomCast(cast: any): boolean;
796
+ isCustomDateTimeCast(cast: any): boolean;
797
+ isDecimalCast(cast: any): boolean;
798
+ isDateCastable(key: string): boolean;
799
+ fromDateTime(value: string): string;
800
+ getDateFormat(): any;
801
+ asDecimal(value: string, decimals: number): string;
802
+ asDateTime(value: any): Date | null;
803
+ asDate(value: string): Date;
804
+ } & {
805
+ [x: string]: any;
806
+ hidden: any[];
807
+ visible: any[];
808
+ makeVisible(...keys: string[]): /*elided*/any;
809
+ makeHidden(key: string[], ...keys: string[]): /*elided*/any;
810
+ getHidden(): any[];
811
+ getVisible(): any[];
812
+ setHidden(hidden: any[]): /*elided*/any;
813
+ setVisible(visible: any[]): /*elided*/any;
814
+ } & {
815
+ [x: string]: any;
816
+ execHooks(hook: any, options: TGeneric): Promise<any>;
817
+ } & {
818
+ [x: string]: any;
819
+ getGlobalScopes(): {};
820
+ } & {
821
+ [x: string]: any;
822
+ useUniqueIds: boolean;
823
+ usesUniqueIds(): boolean;
824
+ uniqueIds(): never[];
825
+ setUniqueIds(): void;
826
+ };
827
+ getDates: (() => string[]) & (() => any[]);
828
+ getDateFormat: (() => string) & (() => any);
829
+ getAttributes: (() => object) & (() => {
830
+ [x: string]: any;
831
+ });
832
+ getAttribute: ((key: string) => any) & ((key: string) => any);
833
+ setAttribute: ((key: string, value: any) => (new () => IModel) & IModel & {
834
+ [x: string]: any;
835
+ timestamps: boolean;
836
+ dateFormat: string;
837
+ usesTimestamps(): boolean;
838
+ updateTimestamps(): /*elided*/any;
839
+ getCreatedAtColumn(): any;
840
+ getUpdatedAtColumn(): any;
841
+ setCreatedAt(value: any): /*elided*/any;
842
+ setUpdatedAt(value: any): /*elided*/any;
843
+ freshTimestamp(): Date;
844
+ freshTimestampString(): any;
845
+ } & TGeneric<any, string> & {
846
+ [x: string]: any;
847
+ attributes: TGeneric;
848
+ original: TGeneric;
849
+ casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
850
+ changes: TGeneric;
851
+ appends: any[];
852
+ setAppends(appends: any[]): /*elided*/any;
853
+ append(...keys: any[]): /*elided*/any;
854
+ normalizeCastClassResponse(key: string, value: string): TGeneric;
855
+ syncOriginal(): /*elided*/any;
856
+ syncChanges(): /*elided*/any;
857
+ syncOriginalAttribute(attribute: string): void;
858
+ syncOriginalAttributes(...attributes: string[]): /*elided*/any;
859
+ isDirty(...attributes: string[]): boolean;
860
+ getDirty(): TGeneric;
861
+ originalIsEquivalent(key: string): boolean;
862
+ setAttributes(attributes: TGeneric): void;
863
+ setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
864
+ getAttributes(): {
865
+ [x: string]: any;
866
+ };
867
+ setAttribute(key: string, value: string): /*elided*/any;
868
+ getAttribute(key: string): any;
869
+ castAttribute(key: string, value: string): any;
870
+ attributesToData(): {
871
+ [x: string]: any;
872
+ };
873
+ mutateAttribute(key: string, value: string | null): any;
874
+ mutateAttributeForArray(_key: string, _value: string): void;
875
+ isDateAttribute(key: string): boolean;
876
+ serializeDate(date?: Date | string | null): string | null;
877
+ getDates(): any[];
878
+ getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
879
+ getCastType(key: string): any;
880
+ hasCast(key: string, types?: readonly string[]): boolean;
881
+ withDayjs(date: string): dayjs0.Dayjs;
882
+ isCustomCast(cast: any): boolean;
883
+ isCustomDateTimeCast(cast: any): boolean;
884
+ isDecimalCast(cast: any): boolean;
885
+ isDateCastable(key: string): boolean;
886
+ fromDateTime(value: string): string;
887
+ getDateFormat(): any;
888
+ asDecimal(value: string, decimals: number): string;
889
+ asDateTime(value: any): Date | null;
890
+ asDate(value: string): Date;
891
+ } & {
892
+ [x: string]: any;
893
+ hidden: any[];
894
+ visible: any[];
895
+ makeVisible(...keys: string[]): /*elided*/any;
896
+ makeHidden(key: string[], ...keys: string[]): /*elided*/any;
897
+ getHidden(): any[];
898
+ getVisible(): any[];
899
+ setHidden(hidden: any[]): /*elided*/any;
900
+ setVisible(visible: any[]): /*elided*/any;
901
+ } & {
902
+ [x: string]: any;
903
+ execHooks(hook: any, options: TGeneric): Promise<any>;
904
+ } & {
905
+ [x: string]: any;
906
+ getGlobalScopes(): {};
907
+ } & {
908
+ [x: string]: any;
909
+ useUniqueIds: boolean;
910
+ usesUniqueIds(): boolean;
911
+ uniqueIds(): never[];
912
+ setUniqueIds(): void;
913
+ }) & ((key: string, value: string) => (new () => IModel) & IModel & {
914
+ [x: string]: any;
915
+ timestamps: boolean;
916
+ dateFormat: string;
917
+ usesTimestamps(): boolean;
918
+ updateTimestamps(): /*elided*/any;
919
+ getCreatedAtColumn(): any;
920
+ getUpdatedAtColumn(): any;
921
+ setCreatedAt(value: any): /*elided*/any;
922
+ setUpdatedAt(value: any): /*elided*/any;
923
+ freshTimestamp(): Date;
924
+ freshTimestampString(): any;
925
+ } & TGeneric<any, string> & {
926
+ [x: string]: any;
927
+ attributes: TGeneric;
928
+ original: TGeneric;
929
+ casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
930
+ changes: TGeneric;
931
+ appends: any[];
932
+ setAppends(appends: any[]): /*elided*/any;
933
+ append(...keys: any[]): /*elided*/any;
934
+ normalizeCastClassResponse(key: string, value: string): TGeneric;
935
+ syncOriginal(): /*elided*/any;
936
+ syncChanges(): /*elided*/any;
937
+ syncOriginalAttribute(attribute: string): void;
938
+ syncOriginalAttributes(...attributes: string[]): /*elided*/any;
939
+ isDirty(...attributes: string[]): boolean;
940
+ getDirty(): TGeneric;
941
+ originalIsEquivalent(key: string): boolean;
942
+ setAttributes(attributes: TGeneric): void;
943
+ setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
944
+ getAttributes(): {
945
+ [x: string]: any;
946
+ };
947
+ setAttribute(key: string, value: string): /*elided*/any;
948
+ getAttribute(key: string): any;
949
+ castAttribute(key: string, value: string): any;
950
+ attributesToData(): {
951
+ [x: string]: any;
952
+ };
953
+ mutateAttribute(key: string, value: string | null): any;
954
+ mutateAttributeForArray(_key: string, _value: string): void;
955
+ isDateAttribute(key: string): boolean;
956
+ serializeDate(date?: Date | string | null): string | null;
957
+ getDates(): any[];
958
+ getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
959
+ getCastType(key: string): any;
960
+ hasCast(key: string, types?: readonly string[]): boolean;
961
+ withDayjs(date: string): dayjs0.Dayjs;
962
+ isCustomCast(cast: any): boolean;
963
+ isCustomDateTimeCast(cast: any): boolean;
964
+ isDecimalCast(cast: any): boolean;
965
+ isDateCastable(key: string): boolean;
966
+ fromDateTime(value: string): string;
967
+ getDateFormat(): any;
968
+ asDecimal(value: string, decimals: number): string;
969
+ asDateTime(value: any): Date | null;
970
+ asDate(value: string): Date;
971
+ } & {
972
+ [x: string]: any;
973
+ hidden: any[];
974
+ visible: any[];
975
+ makeVisible(...keys: string[]): /*elided*/any;
976
+ makeHidden(key: string[], ...keys: string[]): /*elided*/any;
977
+ getHidden(): any[];
978
+ getVisible(): any[];
979
+ setHidden(hidden: any[]): /*elided*/any;
980
+ setVisible(visible: any[]): /*elided*/any;
981
+ } & {
982
+ [x: string]: any;
983
+ execHooks(hook: any, options: TGeneric): Promise<any>;
984
+ } & {
985
+ [x: string]: any;
986
+ getGlobalScopes(): {};
987
+ } & {
988
+ [x: string]: any;
989
+ useUniqueIds: boolean;
990
+ usesUniqueIds(): boolean;
991
+ uniqueIds(): never[];
992
+ setUniqueIds(): void;
993
+ });
994
+ fill: (attributes: any) => (new () => IModel) & IModel & {
995
+ [x: string]: any;
996
+ timestamps: boolean;
997
+ dateFormat: string;
998
+ usesTimestamps(): boolean;
999
+ updateTimestamps(): /*elided*/any;
1000
+ getCreatedAtColumn(): any;
1001
+ getUpdatedAtColumn(): any;
1002
+ setCreatedAt(value: any): /*elided*/any;
1003
+ setUpdatedAt(value: any): /*elided*/any;
1004
+ freshTimestamp(): Date;
1005
+ freshTimestampString(): any;
1006
+ } & TGeneric<any, string> & {
1007
+ [x: string]: any;
1008
+ attributes: TGeneric;
1009
+ original: TGeneric;
1010
+ casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
1011
+ changes: TGeneric;
1012
+ appends: any[];
1013
+ setAppends(appends: any[]): /*elided*/any;
1014
+ append(...keys: any[]): /*elided*/any;
1015
+ normalizeCastClassResponse(key: string, value: string): TGeneric;
1016
+ syncOriginal(): /*elided*/any;
1017
+ syncChanges(): /*elided*/any;
1018
+ syncOriginalAttribute(attribute: string): void;
1019
+ syncOriginalAttributes(...attributes: string[]): /*elided*/any;
1020
+ isDirty(...attributes: string[]): boolean;
1021
+ getDirty(): TGeneric;
1022
+ originalIsEquivalent(key: string): boolean;
1023
+ setAttributes(attributes: TGeneric): void;
1024
+ setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
1025
+ getAttributes(): {
1026
+ [x: string]: any;
1027
+ };
1028
+ setAttribute(key: string, value: string): /*elided*/any;
1029
+ getAttribute(key: string): any;
1030
+ castAttribute(key: string, value: string): any;
1031
+ attributesToData(): {
1032
+ [x: string]: any;
1033
+ };
1034
+ mutateAttribute(key: string, value: string | null): any;
1035
+ mutateAttributeForArray(_key: string, _value: string): void;
1036
+ isDateAttribute(key: string): boolean;
1037
+ serializeDate(date?: Date | string | null): string | null;
1038
+ getDates(): any[];
1039
+ getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
1040
+ getCastType(key: string): any;
1041
+ hasCast(key: string, types?: readonly string[]): boolean;
1042
+ withDayjs(date: string): dayjs0.Dayjs;
1043
+ isCustomCast(cast: any): boolean;
1044
+ isCustomDateTimeCast(cast: any): boolean;
1045
+ isDecimalCast(cast: any): boolean;
1046
+ isDateCastable(key: string): boolean;
1047
+ fromDateTime(value: string): string;
1048
+ getDateFormat(): any;
1049
+ asDecimal(value: string, decimals: number): string;
1050
+ asDateTime(value: any): Date | null;
1051
+ asDate(value: string): Date;
1052
+ } & {
1053
+ [x: string]: any;
1054
+ hidden: any[];
1055
+ visible: any[];
1056
+ makeVisible(...keys: string[]): /*elided*/any;
1057
+ makeHidden(key: string[], ...keys: string[]): /*elided*/any;
1058
+ getHidden(): any[];
1059
+ getVisible(): any[];
1060
+ setHidden(hidden: any[]): /*elided*/any;
1061
+ setVisible(visible: any[]): /*elided*/any;
1062
+ } & {
1063
+ [x: string]: any;
1064
+ execHooks(hook: any, options: TGeneric): Promise<any>;
1065
+ } & {
1066
+ [x: string]: any;
1067
+ getGlobalScopes(): {};
1068
+ } & {
1069
+ [x: string]: any;
1070
+ useUniqueIds: boolean;
1071
+ usesUniqueIds(): boolean;
1072
+ uniqueIds(): never[];
1073
+ setUniqueIds(): void;
1074
+ };
1075
+ setAppends: ((appends: string[]) => (new () => IModel) & IModel & {
1076
+ [x: string]: any;
1077
+ timestamps: boolean;
1078
+ dateFormat: string;
1079
+ usesTimestamps(): boolean;
1080
+ updateTimestamps(): /*elided*/any;
1081
+ getCreatedAtColumn(): any;
1082
+ getUpdatedAtColumn(): any;
1083
+ setCreatedAt(value: any): /*elided*/any;
1084
+ setUpdatedAt(value: any): /*elided*/any;
1085
+ freshTimestamp(): Date;
1086
+ freshTimestampString(): any;
1087
+ } & TGeneric<any, string> & {
1088
+ [x: string]: any;
1089
+ attributes: TGeneric;
1090
+ original: TGeneric;
1091
+ casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
1092
+ changes: TGeneric;
1093
+ appends: any[];
1094
+ setAppends(appends: any[]): /*elided*/any;
1095
+ append(...keys: any[]): /*elided*/any;
1096
+ normalizeCastClassResponse(key: string, value: string): TGeneric;
1097
+ syncOriginal(): /*elided*/any;
1098
+ syncChanges(): /*elided*/any;
1099
+ syncOriginalAttribute(attribute: string): void;
1100
+ syncOriginalAttributes(...attributes: string[]): /*elided*/any;
1101
+ isDirty(...attributes: string[]): boolean;
1102
+ getDirty(): TGeneric;
1103
+ originalIsEquivalent(key: string): boolean;
1104
+ setAttributes(attributes: TGeneric): void;
1105
+ setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
1106
+ getAttributes(): {
1107
+ [x: string]: any;
1108
+ };
1109
+ setAttribute(key: string, value: string): /*elided*/any;
1110
+ getAttribute(key: string): any;
1111
+ castAttribute(key: string, value: string): any;
1112
+ attributesToData(): {
1113
+ [x: string]: any;
1114
+ };
1115
+ mutateAttribute(key: string, value: string | null): any;
1116
+ mutateAttributeForArray(_key: string, _value: string): void;
1117
+ isDateAttribute(key: string): boolean;
1118
+ serializeDate(date?: Date | string | null): string | null;
1119
+ getDates(): any[];
1120
+ getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
1121
+ getCastType(key: string): any;
1122
+ hasCast(key: string, types?: readonly string[]): boolean;
1123
+ withDayjs(date: string): dayjs0.Dayjs;
1124
+ isCustomCast(cast: any): boolean;
1125
+ isCustomDateTimeCast(cast: any): boolean;
1126
+ isDecimalCast(cast: any): boolean;
1127
+ isDateCastable(key: string): boolean;
1128
+ fromDateTime(value: string): string;
1129
+ getDateFormat(): any;
1130
+ asDecimal(value: string, decimals: number): string;
1131
+ asDateTime(value: any): Date | null;
1132
+ asDate(value: string): Date;
1133
+ } & {
1134
+ [x: string]: any;
1135
+ hidden: any[];
1136
+ visible: any[];
1137
+ makeVisible(...keys: string[]): /*elided*/any;
1138
+ makeHidden(key: string[], ...keys: string[]): /*elided*/any;
1139
+ getHidden(): any[];
1140
+ getVisible(): any[];
1141
+ setHidden(hidden: any[]): /*elided*/any;
1142
+ setVisible(visible: any[]): /*elided*/any;
1143
+ } & {
1144
+ [x: string]: any;
1145
+ execHooks(hook: any, options: TGeneric): Promise<any>;
1146
+ } & {
1147
+ [x: string]: any;
1148
+ getGlobalScopes(): {};
1149
+ } & {
1150
+ [x: string]: any;
1151
+ useUniqueIds: boolean;
1152
+ usesUniqueIds(): boolean;
1153
+ uniqueIds(): never[];
1154
+ setUniqueIds(): void;
1155
+ }) & ((appends: any[]) => (new () => IModel) & IModel & {
1156
+ [x: string]: any;
1157
+ timestamps: boolean;
1158
+ dateFormat: string;
1159
+ usesTimestamps(): boolean;
1160
+ updateTimestamps(): /*elided*/any;
1161
+ getCreatedAtColumn(): any;
1162
+ getUpdatedAtColumn(): any;
1163
+ setCreatedAt(value: any): /*elided*/any;
1164
+ setUpdatedAt(value: any): /*elided*/any;
1165
+ freshTimestamp(): Date;
1166
+ freshTimestampString(): any;
1167
+ } & TGeneric<any, string> & {
1168
+ [x: string]: any;
1169
+ attributes: TGeneric;
1170
+ original: TGeneric;
1171
+ casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
1172
+ changes: TGeneric;
1173
+ appends: any[];
1174
+ setAppends(appends: any[]): /*elided*/any;
1175
+ append(...keys: any[]): /*elided*/any;
1176
+ normalizeCastClassResponse(key: string, value: string): TGeneric;
1177
+ syncOriginal(): /*elided*/any;
1178
+ syncChanges(): /*elided*/any;
1179
+ syncOriginalAttribute(attribute: string): void;
1180
+ syncOriginalAttributes(...attributes: string[]): /*elided*/any;
1181
+ isDirty(...attributes: string[]): boolean;
1182
+ getDirty(): TGeneric;
1183
+ originalIsEquivalent(key: string): boolean;
1184
+ setAttributes(attributes: TGeneric): void;
1185
+ setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
1186
+ getAttributes(): {
1187
+ [x: string]: any;
1188
+ };
1189
+ setAttribute(key: string, value: string): /*elided*/any;
1190
+ getAttribute(key: string): any;
1191
+ castAttribute(key: string, value: string): any;
1192
+ attributesToData(): {
1193
+ [x: string]: any;
1194
+ };
1195
+ mutateAttribute(key: string, value: string | null): any;
1196
+ mutateAttributeForArray(_key: string, _value: string): void;
1197
+ isDateAttribute(key: string): boolean;
1198
+ serializeDate(date?: Date | string | null): string | null;
1199
+ getDates(): any[];
1200
+ getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
1201
+ getCastType(key: string): any;
1202
+ hasCast(key: string, types?: readonly string[]): boolean;
1203
+ withDayjs(date: string): dayjs0.Dayjs;
1204
+ isCustomCast(cast: any): boolean;
1205
+ isCustomDateTimeCast(cast: any): boolean;
1206
+ isDecimalCast(cast: any): boolean;
1207
+ isDateCastable(key: string): boolean;
1208
+ fromDateTime(value: string): string;
1209
+ getDateFormat(): any;
1210
+ asDecimal(value: string, decimals: number): string;
1211
+ asDateTime(value: any): Date | null;
1212
+ asDate(value: string): Date;
1213
+ } & {
1214
+ [x: string]: any;
1215
+ hidden: any[];
1216
+ visible: any[];
1217
+ makeVisible(...keys: string[]): /*elided*/any;
1218
+ makeHidden(key: string[], ...keys: string[]): /*elided*/any;
1219
+ getHidden(): any[];
1220
+ getVisible(): any[];
1221
+ setHidden(hidden: any[]): /*elided*/any;
1222
+ setVisible(visible: any[]): /*elided*/any;
1223
+ } & {
1224
+ [x: string]: any;
1225
+ execHooks(hook: any, options: TGeneric): Promise<any>;
1226
+ } & {
1227
+ [x: string]: any;
1228
+ getGlobalScopes(): {};
1229
+ } & {
1230
+ [x: string]: any;
1231
+ useUniqueIds: boolean;
1232
+ usesUniqueIds(): boolean;
1233
+ uniqueIds(): never[];
1234
+ setUniqueIds(): void;
1235
+ });
1236
+ append: ((key: string | string[]) => (new () => IModel) & IModel & {
1237
+ [x: string]: any;
1238
+ timestamps: boolean;
1239
+ dateFormat: string;
1240
+ usesTimestamps(): boolean;
1241
+ updateTimestamps(): /*elided*/any;
1242
+ getCreatedAtColumn(): any;
1243
+ getUpdatedAtColumn(): any;
1244
+ setCreatedAt(value: any): /*elided*/any;
1245
+ setUpdatedAt(value: any): /*elided*/any;
1246
+ freshTimestamp(): Date;
1247
+ freshTimestampString(): any;
1248
+ } & TGeneric<any, string> & {
1249
+ [x: string]: any;
1250
+ attributes: TGeneric;
1251
+ original: TGeneric;
1252
+ casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
1253
+ changes: TGeneric;
1254
+ appends: any[];
1255
+ setAppends(appends: any[]): /*elided*/any;
1256
+ append(...keys: any[]): /*elided*/any;
1257
+ normalizeCastClassResponse(key: string, value: string): TGeneric;
1258
+ syncOriginal(): /*elided*/any;
1259
+ syncChanges(): /*elided*/any;
1260
+ syncOriginalAttribute(attribute: string): void;
1261
+ syncOriginalAttributes(...attributes: string[]): /*elided*/any;
1262
+ isDirty(...attributes: string[]): boolean;
1263
+ getDirty(): TGeneric;
1264
+ originalIsEquivalent(key: string): boolean;
1265
+ setAttributes(attributes: TGeneric): void;
1266
+ setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
1267
+ getAttributes(): {
1268
+ [x: string]: any;
1269
+ };
1270
+ setAttribute(key: string, value: string): /*elided*/any;
1271
+ getAttribute(key: string): any;
1272
+ castAttribute(key: string, value: string): any;
1273
+ attributesToData(): {
1274
+ [x: string]: any;
1275
+ };
1276
+ mutateAttribute(key: string, value: string | null): any;
1277
+ mutateAttributeForArray(_key: string, _value: string): void;
1278
+ isDateAttribute(key: string): boolean;
1279
+ serializeDate(date?: Date | string | null): string | null;
1280
+ getDates(): any[];
1281
+ getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
1282
+ getCastType(key: string): any;
1283
+ hasCast(key: string, types?: readonly string[]): boolean;
1284
+ withDayjs(date: string): dayjs0.Dayjs;
1285
+ isCustomCast(cast: any): boolean;
1286
+ isCustomDateTimeCast(cast: any): boolean;
1287
+ isDecimalCast(cast: any): boolean;
1288
+ isDateCastable(key: string): boolean;
1289
+ fromDateTime(value: string): string;
1290
+ getDateFormat(): any;
1291
+ asDecimal(value: string, decimals: number): string;
1292
+ asDateTime(value: any): Date | null;
1293
+ asDate(value: string): Date;
1294
+ } & {
1295
+ [x: string]: any;
1296
+ hidden: any[];
1297
+ visible: any[];
1298
+ makeVisible(...keys: string[]): /*elided*/any;
1299
+ makeHidden(key: string[], ...keys: string[]): /*elided*/any;
1300
+ getHidden(): any[];
1301
+ getVisible(): any[];
1302
+ setHidden(hidden: any[]): /*elided*/any;
1303
+ setVisible(visible: any[]): /*elided*/any;
1304
+ } & {
1305
+ [x: string]: any;
1306
+ execHooks(hook: any, options: TGeneric): Promise<any>;
1307
+ } & {
1308
+ [x: string]: any;
1309
+ getGlobalScopes(): {};
1310
+ } & {
1311
+ [x: string]: any;
1312
+ useUniqueIds: boolean;
1313
+ usesUniqueIds(): boolean;
1314
+ uniqueIds(): never[];
1315
+ setUniqueIds(): void;
1316
+ }) & ((...keys: any[]) => (new () => IModel) & IModel & {
1317
+ [x: string]: any;
1318
+ timestamps: boolean;
1319
+ dateFormat: string;
1320
+ usesTimestamps(): boolean;
1321
+ updateTimestamps(): /*elided*/any;
1322
+ getCreatedAtColumn(): any;
1323
+ getUpdatedAtColumn(): any;
1324
+ setCreatedAt(value: any): /*elided*/any;
1325
+ setUpdatedAt(value: any): /*elided*/any;
1326
+ freshTimestamp(): Date;
1327
+ freshTimestampString(): any;
1328
+ } & TGeneric<any, string> & {
1329
+ [x: string]: any;
1330
+ attributes: TGeneric;
1331
+ original: TGeneric;
1332
+ casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
1333
+ changes: TGeneric;
1334
+ appends: any[];
1335
+ setAppends(appends: any[]): /*elided*/any;
1336
+ append(...keys: any[]): /*elided*/any;
1337
+ normalizeCastClassResponse(key: string, value: string): TGeneric;
1338
+ syncOriginal(): /*elided*/any;
1339
+ syncChanges(): /*elided*/any;
1340
+ syncOriginalAttribute(attribute: string): void;
1341
+ syncOriginalAttributes(...attributes: string[]): /*elided*/any;
1342
+ isDirty(...attributes: string[]): boolean;
1343
+ getDirty(): TGeneric;
1344
+ originalIsEquivalent(key: string): boolean;
1345
+ setAttributes(attributes: TGeneric): void;
1346
+ setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
1347
+ getAttributes(): {
1348
+ [x: string]: any;
1349
+ };
1350
+ setAttribute(key: string, value: string): /*elided*/any;
1351
+ getAttribute(key: string): any;
1352
+ castAttribute(key: string, value: string): any;
1353
+ attributesToData(): {
1354
+ [x: string]: any;
1355
+ };
1356
+ mutateAttribute(key: string, value: string | null): any;
1357
+ mutateAttributeForArray(_key: string, _value: string): void;
1358
+ isDateAttribute(key: string): boolean;
1359
+ serializeDate(date?: Date | string | null): string | null;
1360
+ getDates(): any[];
1361
+ getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
1362
+ getCastType(key: string): any;
1363
+ hasCast(key: string, types?: readonly string[]): boolean;
1364
+ withDayjs(date: string): dayjs0.Dayjs;
1365
+ isCustomCast(cast: any): boolean;
1366
+ isCustomDateTimeCast(cast: any): boolean;
1367
+ isDecimalCast(cast: any): boolean;
1368
+ isDateCastable(key: string): boolean;
1369
+ fromDateTime(value: string): string;
1370
+ getDateFormat(): any;
1371
+ asDecimal(value: string, decimals: number): string;
1372
+ asDateTime(value: any): Date | null;
1373
+ asDate(value: string): Date;
1374
+ } & {
1375
+ [x: string]: any;
1376
+ hidden: any[];
1377
+ visible: any[];
1378
+ makeVisible(...keys: string[]): /*elided*/any;
1379
+ makeHidden(key: string[], ...keys: string[]): /*elided*/any;
1380
+ getHidden(): any[];
1381
+ getVisible(): any[];
1382
+ setHidden(hidden: any[]): /*elided*/any;
1383
+ setVisible(visible: any[]): /*elided*/any;
1384
+ } & {
1385
+ [x: string]: any;
1386
+ execHooks(hook: any, options: TGeneric): Promise<any>;
1387
+ } & {
1388
+ [x: string]: any;
1389
+ getGlobalScopes(): {};
1390
+ } & {
1391
+ [x: string]: any;
1392
+ useUniqueIds: boolean;
1393
+ usesUniqueIds(): boolean;
1394
+ uniqueIds(): never[];
1395
+ setUniqueIds(): void;
1396
+ });
1397
+ getRelation: <T extends Model>(relation: string) => T | ICollection<T> | null | undefined;
1398
+ setRelation: <T extends Model>(relation: string, value: T | ICollection<T> | null) => (new () => IModel) & IModel & {
1399
+ [x: string]: any;
1400
+ timestamps: boolean;
1401
+ dateFormat: string;
1402
+ usesTimestamps(): boolean;
1403
+ updateTimestamps(): /*elided*/any;
1404
+ getCreatedAtColumn(): any;
1405
+ getUpdatedAtColumn(): any;
1406
+ setCreatedAt(value: any): /*elided*/any;
1407
+ setUpdatedAt(value: any): /*elided*/any;
1408
+ freshTimestamp(): Date;
1409
+ freshTimestampString(): any;
1410
+ } & TGeneric<any, string> & {
1411
+ [x: string]: any;
1412
+ attributes: TGeneric;
1413
+ original: TGeneric;
1414
+ casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
1415
+ changes: TGeneric;
1416
+ appends: any[];
1417
+ setAppends(appends: any[]): /*elided*/any;
1418
+ append(...keys: any[]): /*elided*/any;
1419
+ normalizeCastClassResponse(key: string, value: string): TGeneric;
1420
+ syncOriginal(): /*elided*/any;
1421
+ syncChanges(): /*elided*/any;
1422
+ syncOriginalAttribute(attribute: string): void;
1423
+ syncOriginalAttributes(...attributes: string[]): /*elided*/any;
1424
+ isDirty(...attributes: string[]): boolean;
1425
+ getDirty(): TGeneric;
1426
+ originalIsEquivalent(key: string): boolean;
1427
+ setAttributes(attributes: TGeneric): void;
1428
+ setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
1429
+ getAttributes(): {
1430
+ [x: string]: any;
1431
+ };
1432
+ setAttribute(key: string, value: string): /*elided*/any;
1433
+ getAttribute(key: string): any;
1434
+ castAttribute(key: string, value: string): any;
1435
+ attributesToData(): {
1436
+ [x: string]: any;
1437
+ };
1438
+ mutateAttribute(key: string, value: string | null): any;
1439
+ mutateAttributeForArray(_key: string, _value: string): void;
1440
+ isDateAttribute(key: string): boolean;
1441
+ serializeDate(date?: Date | string | null): string | null;
1442
+ getDates(): any[];
1443
+ getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
1444
+ getCastType(key: string): any;
1445
+ hasCast(key: string, types?: readonly string[]): boolean;
1446
+ withDayjs(date: string): dayjs0.Dayjs;
1447
+ isCustomCast(cast: any): boolean;
1448
+ isCustomDateTimeCast(cast: any): boolean;
1449
+ isDecimalCast(cast: any): boolean;
1450
+ isDateCastable(key: string): boolean;
1451
+ fromDateTime(value: string): string;
1452
+ getDateFormat(): any;
1453
+ asDecimal(value: string, decimals: number): string;
1454
+ asDateTime(value: any): Date | null;
1455
+ asDate(value: string): Date;
1456
+ } & {
1457
+ [x: string]: any;
1458
+ hidden: any[];
1459
+ visible: any[];
1460
+ makeVisible(...keys: string[]): /*elided*/any;
1461
+ makeHidden(key: string[], ...keys: string[]): /*elided*/any;
1462
+ getHidden(): any[];
1463
+ getVisible(): any[];
1464
+ setHidden(hidden: any[]): /*elided*/any;
1465
+ setVisible(visible: any[]): /*elided*/any;
1466
+ } & {
1467
+ [x: string]: any;
1468
+ execHooks(hook: any, options: TGeneric): Promise<any>;
1469
+ } & {
1470
+ [x: string]: any;
1471
+ getGlobalScopes(): {};
1472
+ } & {
1473
+ [x: string]: any;
1474
+ useUniqueIds: boolean;
1475
+ usesUniqueIds(): boolean;
1476
+ uniqueIds(): never[];
1477
+ setUniqueIds(): void;
1478
+ };
1479
+ unsetRelation: (relation: string) => (new () => IModel) & IModel & {
1480
+ [x: string]: any;
1481
+ timestamps: boolean;
1482
+ dateFormat: string;
1483
+ usesTimestamps(): boolean;
1484
+ updateTimestamps(): /*elided*/any;
1485
+ getCreatedAtColumn(): any;
1486
+ getUpdatedAtColumn(): any;
1487
+ setCreatedAt(value: any): /*elided*/any;
1488
+ setUpdatedAt(value: any): /*elided*/any;
1489
+ freshTimestamp(): Date;
1490
+ freshTimestampString(): any;
1491
+ } & TGeneric<any, string> & {
1492
+ [x: string]: any;
1493
+ attributes: TGeneric;
1494
+ original: TGeneric;
1495
+ casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
1496
+ changes: TGeneric;
1497
+ appends: any[];
1498
+ setAppends(appends: any[]): /*elided*/any;
1499
+ append(...keys: any[]): /*elided*/any;
1500
+ normalizeCastClassResponse(key: string, value: string): TGeneric;
1501
+ syncOriginal(): /*elided*/any;
1502
+ syncChanges(): /*elided*/any;
1503
+ syncOriginalAttribute(attribute: string): void;
1504
+ syncOriginalAttributes(...attributes: string[]): /*elided*/any;
1505
+ isDirty(...attributes: string[]): boolean;
1506
+ getDirty(): TGeneric;
1507
+ originalIsEquivalent(key: string): boolean;
1508
+ setAttributes(attributes: TGeneric): void;
1509
+ setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
1510
+ getAttributes(): {
1511
+ [x: string]: any;
1512
+ };
1513
+ setAttribute(key: string, value: string): /*elided*/any;
1514
+ getAttribute(key: string): any;
1515
+ castAttribute(key: string, value: string): any;
1516
+ attributesToData(): {
1517
+ [x: string]: any;
1518
+ };
1519
+ mutateAttribute(key: string, value: string | null): any;
1520
+ mutateAttributeForArray(_key: string, _value: string): void;
1521
+ isDateAttribute(key: string): boolean;
1522
+ serializeDate(date?: Date | string | null): string | null;
1523
+ getDates(): any[];
1524
+ getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
1525
+ getCastType(key: string): any;
1526
+ hasCast(key: string, types?: readonly string[]): boolean;
1527
+ withDayjs(date: string): dayjs0.Dayjs;
1528
+ isCustomCast(cast: any): boolean;
1529
+ isCustomDateTimeCast(cast: any): boolean;
1530
+ isDecimalCast(cast: any): boolean;
1531
+ isDateCastable(key: string): boolean;
1532
+ fromDateTime(value: string): string;
1533
+ getDateFormat(): any;
1534
+ asDecimal(value: string, decimals: number): string;
1535
+ asDateTime(value: any): Date | null;
1536
+ asDate(value: string): Date;
1537
+ } & {
1538
+ [x: string]: any;
1539
+ hidden: any[];
1540
+ visible: any[];
1541
+ makeVisible(...keys: string[]): /*elided*/any;
1542
+ makeHidden(key: string[], ...keys: string[]): /*elided*/any;
1543
+ getHidden(): any[];
1544
+ getVisible(): any[];
1545
+ setHidden(hidden: any[]): /*elided*/any;
1546
+ setVisible(visible: any[]): /*elided*/any;
1547
+ } & {
1548
+ [x: string]: any;
1549
+ execHooks(hook: any, options: TGeneric): Promise<any>;
1550
+ } & {
1551
+ [x: string]: any;
1552
+ getGlobalScopes(): {};
1553
+ } & {
1554
+ [x: string]: any;
1555
+ useUniqueIds: boolean;
1556
+ usesUniqueIds(): boolean;
1557
+ uniqueIds(): never[];
1558
+ setUniqueIds(): void;
1559
+ };
1560
+ relationLoaded: (relation: string) => boolean;
1561
+ makeVisible: ((attributes: string | string[]) => (new () => IModel) & IModel & {
1562
+ [x: string]: any;
1563
+ timestamps: boolean;
1564
+ dateFormat: string;
1565
+ usesTimestamps(): boolean;
1566
+ updateTimestamps(): /*elided*/any;
1567
+ getCreatedAtColumn(): any;
1568
+ getUpdatedAtColumn(): any;
1569
+ setCreatedAt(value: any): /*elided*/any;
1570
+ setUpdatedAt(value: any): /*elided*/any;
1571
+ freshTimestamp(): Date;
1572
+ freshTimestampString(): any;
1573
+ } & TGeneric<any, string> & {
1574
+ [x: string]: any;
1575
+ attributes: TGeneric;
1576
+ original: TGeneric;
1577
+ casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
1578
+ changes: TGeneric;
1579
+ appends: any[];
1580
+ setAppends(appends: any[]): /*elided*/any;
1581
+ append(...keys: any[]): /*elided*/any;
1582
+ normalizeCastClassResponse(key: string, value: string): TGeneric;
1583
+ syncOriginal(): /*elided*/any;
1584
+ syncChanges(): /*elided*/any;
1585
+ syncOriginalAttribute(attribute: string): void;
1586
+ syncOriginalAttributes(...attributes: string[]): /*elided*/any;
1587
+ isDirty(...attributes: string[]): boolean;
1588
+ getDirty(): TGeneric;
1589
+ originalIsEquivalent(key: string): boolean;
1590
+ setAttributes(attributes: TGeneric): void;
1591
+ setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
1592
+ getAttributes(): {
1593
+ [x: string]: any;
1594
+ };
1595
+ setAttribute(key: string, value: string): /*elided*/any;
1596
+ getAttribute(key: string): any;
1597
+ castAttribute(key: string, value: string): any;
1598
+ attributesToData(): {
1599
+ [x: string]: any;
1600
+ };
1601
+ mutateAttribute(key: string, value: string | null): any;
1602
+ mutateAttributeForArray(_key: string, _value: string): void;
1603
+ isDateAttribute(key: string): boolean;
1604
+ serializeDate(date?: Date | string | null): string | null;
1605
+ getDates(): any[];
1606
+ getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
1607
+ getCastType(key: string): any;
1608
+ hasCast(key: string, types?: readonly string[]): boolean;
1609
+ withDayjs(date: string): dayjs0.Dayjs;
1610
+ isCustomCast(cast: any): boolean;
1611
+ isCustomDateTimeCast(cast: any): boolean;
1612
+ isDecimalCast(cast: any): boolean;
1613
+ isDateCastable(key: string): boolean;
1614
+ fromDateTime(value: string): string;
1615
+ getDateFormat(): any;
1616
+ asDecimal(value: string, decimals: number): string;
1617
+ asDateTime(value: any): Date | null;
1618
+ asDate(value: string): Date;
1619
+ } & {
1620
+ [x: string]: any;
1621
+ hidden: any[];
1622
+ visible: any[];
1623
+ makeVisible(...keys: string[]): /*elided*/any;
1624
+ makeHidden(key: string[], ...keys: string[]): /*elided*/any;
1625
+ getHidden(): any[];
1626
+ getVisible(): any[];
1627
+ setHidden(hidden: any[]): /*elided*/any;
1628
+ setVisible(visible: any[]): /*elided*/any;
1629
+ } & {
1630
+ [x: string]: any;
1631
+ execHooks(hook: any, options: TGeneric): Promise<any>;
1632
+ } & {
1633
+ [x: string]: any;
1634
+ getGlobalScopes(): {};
1635
+ } & {
1636
+ [x: string]: any;
1637
+ useUniqueIds: boolean;
1638
+ usesUniqueIds(): boolean;
1639
+ uniqueIds(): never[];
1640
+ setUniqueIds(): void;
1641
+ }) & ((...keys: string[]) => (new () => IModel) & IModel & {
1642
+ [x: string]: any;
1643
+ timestamps: boolean;
1644
+ dateFormat: string;
1645
+ usesTimestamps(): boolean;
1646
+ updateTimestamps(): /*elided*/any;
1647
+ getCreatedAtColumn(): any;
1648
+ getUpdatedAtColumn(): any;
1649
+ setCreatedAt(value: any): /*elided*/any;
1650
+ setUpdatedAt(value: any): /*elided*/any;
1651
+ freshTimestamp(): Date;
1652
+ freshTimestampString(): any;
1653
+ } & TGeneric<any, string> & {
1654
+ [x: string]: any;
1655
+ attributes: TGeneric;
1656
+ original: TGeneric;
1657
+ casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
1658
+ changes: TGeneric;
1659
+ appends: any[];
1660
+ setAppends(appends: any[]): /*elided*/any;
1661
+ append(...keys: any[]): /*elided*/any;
1662
+ normalizeCastClassResponse(key: string, value: string): TGeneric;
1663
+ syncOriginal(): /*elided*/any;
1664
+ syncChanges(): /*elided*/any;
1665
+ syncOriginalAttribute(attribute: string): void;
1666
+ syncOriginalAttributes(...attributes: string[]): /*elided*/any;
1667
+ isDirty(...attributes: string[]): boolean;
1668
+ getDirty(): TGeneric;
1669
+ originalIsEquivalent(key: string): boolean;
1670
+ setAttributes(attributes: TGeneric): void;
1671
+ setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
1672
+ getAttributes(): {
1673
+ [x: string]: any;
1674
+ };
1675
+ setAttribute(key: string, value: string): /*elided*/any;
1676
+ getAttribute(key: string): any;
1677
+ castAttribute(key: string, value: string): any;
1678
+ attributesToData(): {
1679
+ [x: string]: any;
1680
+ };
1681
+ mutateAttribute(key: string, value: string | null): any;
1682
+ mutateAttributeForArray(_key: string, _value: string): void;
1683
+ isDateAttribute(key: string): boolean;
1684
+ serializeDate(date?: Date | string | null): string | null;
1685
+ getDates(): any[];
1686
+ getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
1687
+ getCastType(key: string): any;
1688
+ hasCast(key: string, types?: readonly string[]): boolean;
1689
+ withDayjs(date: string): dayjs0.Dayjs;
1690
+ isCustomCast(cast: any): boolean;
1691
+ isCustomDateTimeCast(cast: any): boolean;
1692
+ isDecimalCast(cast: any): boolean;
1693
+ isDateCastable(key: string): boolean;
1694
+ fromDateTime(value: string): string;
1695
+ getDateFormat(): any;
1696
+ asDecimal(value: string, decimals: number): string;
1697
+ asDateTime(value: any): Date | null;
1698
+ asDate(value: string): Date;
1699
+ } & {
1700
+ [x: string]: any;
1701
+ hidden: any[];
1702
+ visible: any[];
1703
+ makeVisible(...keys: string[]): /*elided*/any;
1704
+ makeHidden(key: string[], ...keys: string[]): /*elided*/any;
1705
+ getHidden(): any[];
1706
+ getVisible(): any[];
1707
+ setHidden(hidden: any[]): /*elided*/any;
1708
+ setVisible(visible: any[]): /*elided*/any;
1709
+ } & {
1710
+ [x: string]: any;
1711
+ execHooks(hook: any, options: TGeneric): Promise<any>;
1712
+ } & {
1713
+ [x: string]: any;
1714
+ getGlobalScopes(): {};
1715
+ } & {
1716
+ [x: string]: any;
1717
+ useUniqueIds: boolean;
1718
+ usesUniqueIds(): boolean;
1719
+ uniqueIds(): never[];
1720
+ setUniqueIds(): void;
1721
+ });
1722
+ makeHidden: ((attributes: string | string[]) => (new () => IModel) & IModel & {
1723
+ [x: string]: any;
1724
+ timestamps: boolean;
1725
+ dateFormat: string;
1726
+ usesTimestamps(): boolean;
1727
+ updateTimestamps(): /*elided*/any;
1728
+ getCreatedAtColumn(): any;
1729
+ getUpdatedAtColumn(): any;
1730
+ setCreatedAt(value: any): /*elided*/any;
1731
+ setUpdatedAt(value: any): /*elided*/any;
1732
+ freshTimestamp(): Date;
1733
+ freshTimestampString(): any;
1734
+ } & TGeneric<any, string> & {
1735
+ [x: string]: any;
1736
+ attributes: TGeneric;
1737
+ original: TGeneric;
1738
+ casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
1739
+ changes: TGeneric;
1740
+ appends: any[];
1741
+ setAppends(appends: any[]): /*elided*/any;
1742
+ append(...keys: any[]): /*elided*/any;
1743
+ normalizeCastClassResponse(key: string, value: string): TGeneric;
1744
+ syncOriginal(): /*elided*/any;
1745
+ syncChanges(): /*elided*/any;
1746
+ syncOriginalAttribute(attribute: string): void;
1747
+ syncOriginalAttributes(...attributes: string[]): /*elided*/any;
1748
+ isDirty(...attributes: string[]): boolean;
1749
+ getDirty(): TGeneric;
1750
+ originalIsEquivalent(key: string): boolean;
1751
+ setAttributes(attributes: TGeneric): void;
1752
+ setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
1753
+ getAttributes(): {
1754
+ [x: string]: any;
1755
+ };
1756
+ setAttribute(key: string, value: string): /*elided*/any;
1757
+ getAttribute(key: string): any;
1758
+ castAttribute(key: string, value: string): any;
1759
+ attributesToData(): {
1760
+ [x: string]: any;
1761
+ };
1762
+ mutateAttribute(key: string, value: string | null): any;
1763
+ mutateAttributeForArray(_key: string, _value: string): void;
1764
+ isDateAttribute(key: string): boolean;
1765
+ serializeDate(date?: Date | string | null): string | null;
1766
+ getDates(): any[];
1767
+ getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
1768
+ getCastType(key: string): any;
1769
+ hasCast(key: string, types?: readonly string[]): boolean;
1770
+ withDayjs(date: string): dayjs0.Dayjs;
1771
+ isCustomCast(cast: any): boolean;
1772
+ isCustomDateTimeCast(cast: any): boolean;
1773
+ isDecimalCast(cast: any): boolean;
1774
+ isDateCastable(key: string): boolean;
1775
+ fromDateTime(value: string): string;
1776
+ getDateFormat(): any;
1777
+ asDecimal(value: string, decimals: number): string;
1778
+ asDateTime(value: any): Date | null;
1779
+ asDate(value: string): Date;
1780
+ } & {
1781
+ [x: string]: any;
1782
+ hidden: any[];
1783
+ visible: any[];
1784
+ makeVisible(...keys: string[]): /*elided*/any;
1785
+ makeHidden(key: string[], ...keys: string[]): /*elided*/any;
1786
+ getHidden(): any[];
1787
+ getVisible(): any[];
1788
+ setHidden(hidden: any[]): /*elided*/any;
1789
+ setVisible(visible: any[]): /*elided*/any;
1790
+ } & {
1791
+ [x: string]: any;
1792
+ execHooks(hook: any, options: TGeneric): Promise<any>;
1793
+ } & {
1794
+ [x: string]: any;
1795
+ getGlobalScopes(): {};
1796
+ } & {
1797
+ [x: string]: any;
1798
+ useUniqueIds: boolean;
1799
+ usesUniqueIds(): boolean;
1800
+ uniqueIds(): never[];
1801
+ setUniqueIds(): void;
1802
+ }) & ((key: string[], ...keys: string[]) => (new () => IModel) & IModel & {
1803
+ [x: string]: any;
1804
+ timestamps: boolean;
1805
+ dateFormat: string;
1806
+ usesTimestamps(): boolean;
1807
+ updateTimestamps(): /*elided*/any;
1808
+ getCreatedAtColumn(): any;
1809
+ getUpdatedAtColumn(): any;
1810
+ setCreatedAt(value: any): /*elided*/any;
1811
+ setUpdatedAt(value: any): /*elided*/any;
1812
+ freshTimestamp(): Date;
1813
+ freshTimestampString(): any;
1814
+ } & TGeneric<any, string> & {
1815
+ [x: string]: any;
1816
+ attributes: TGeneric;
1817
+ original: TGeneric;
1818
+ casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
1819
+ changes: TGeneric;
1820
+ appends: any[];
1821
+ setAppends(appends: any[]): /*elided*/any;
1822
+ append(...keys: any[]): /*elided*/any;
1823
+ normalizeCastClassResponse(key: string, value: string): TGeneric;
1824
+ syncOriginal(): /*elided*/any;
1825
+ syncChanges(): /*elided*/any;
1826
+ syncOriginalAttribute(attribute: string): void;
1827
+ syncOriginalAttributes(...attributes: string[]): /*elided*/any;
1828
+ isDirty(...attributes: string[]): boolean;
1829
+ getDirty(): TGeneric;
1830
+ originalIsEquivalent(key: string): boolean;
1831
+ setAttributes(attributes: TGeneric): void;
1832
+ setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
1833
+ getAttributes(): {
1834
+ [x: string]: any;
1835
+ };
1836
+ setAttribute(key: string, value: string): /*elided*/any;
1837
+ getAttribute(key: string): any;
1838
+ castAttribute(key: string, value: string): any;
1839
+ attributesToData(): {
1840
+ [x: string]: any;
1841
+ };
1842
+ mutateAttribute(key: string, value: string | null): any;
1843
+ mutateAttributeForArray(_key: string, _value: string): void;
1844
+ isDateAttribute(key: string): boolean;
1845
+ serializeDate(date?: Date | string | null): string | null;
1846
+ getDates(): any[];
1847
+ getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
1848
+ getCastType(key: string): any;
1849
+ hasCast(key: string, types?: readonly string[]): boolean;
1850
+ withDayjs(date: string): dayjs0.Dayjs;
1851
+ isCustomCast(cast: any): boolean;
1852
+ isCustomDateTimeCast(cast: any): boolean;
1853
+ isDecimalCast(cast: any): boolean;
1854
+ isDateCastable(key: string): boolean;
1855
+ fromDateTime(value: string): string;
1856
+ getDateFormat(): any;
1857
+ asDecimal(value: string, decimals: number): string;
1858
+ asDateTime(value: any): Date | null;
1859
+ asDate(value: string): Date;
1860
+ } & {
1861
+ [x: string]: any;
1862
+ hidden: any[];
1863
+ visible: any[];
1864
+ makeVisible(...keys: string[]): /*elided*/any;
1865
+ makeHidden(key: string[], ...keys: string[]): /*elided*/any;
1866
+ getHidden(): any[];
1867
+ getVisible(): any[];
1868
+ setHidden(hidden: any[]): /*elided*/any;
1869
+ setVisible(visible: any[]): /*elided*/any;
1870
+ } & {
1871
+ [x: string]: any;
1872
+ execHooks(hook: any, options: TGeneric): Promise<any>;
1873
+ } & {
1874
+ [x: string]: any;
1875
+ getGlobalScopes(): {};
1876
+ } & {
1877
+ [x: string]: any;
1878
+ useUniqueIds: boolean;
1879
+ usesUniqueIds(): boolean;
1880
+ uniqueIds(): never[];
1881
+ setUniqueIds(): void;
1882
+ });
1883
+ newCollection: (models?: any[]) => ICollection<Model>;
1884
+ load: {
1885
+ (relations: WithRelationType): Promise<(new () => IModel) & IModel & {
1886
+ [x: string]: any;
1887
+ timestamps: boolean;
1888
+ dateFormat: string;
1889
+ usesTimestamps(): boolean;
1890
+ updateTimestamps(): /*elided*/any;
1891
+ getCreatedAtColumn(): any;
1892
+ getUpdatedAtColumn(): any;
1893
+ setCreatedAt(value: any): /*elided*/any;
1894
+ setUpdatedAt(value: any): /*elided*/any;
1895
+ freshTimestamp(): Date;
1896
+ freshTimestampString(): any;
1897
+ } & TGeneric<any, string> & {
1898
+ [x: string]: any;
1899
+ attributes: TGeneric;
1900
+ original: TGeneric;
1901
+ casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
1902
+ changes: TGeneric;
1903
+ appends: any[];
1904
+ setAppends(appends: any[]): /*elided*/any;
1905
+ append(...keys: any[]): /*elided*/any;
1906
+ normalizeCastClassResponse(key: string, value: string): TGeneric;
1907
+ syncOriginal(): /*elided*/any;
1908
+ syncChanges(): /*elided*/any;
1909
+ syncOriginalAttribute(attribute: string): void;
1910
+ syncOriginalAttributes(...attributes: string[]): /*elided*/any;
1911
+ isDirty(...attributes: string[]): boolean;
1912
+ getDirty(): TGeneric;
1913
+ originalIsEquivalent(key: string): boolean;
1914
+ setAttributes(attributes: TGeneric): void;
1915
+ setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
1916
+ getAttributes(): {
1917
+ [x: string]: any;
1918
+ };
1919
+ setAttribute(key: string, value: string): /*elided*/any;
1920
+ getAttribute(key: string): any;
1921
+ castAttribute(key: string, value: string): any;
1922
+ attributesToData(): {
1923
+ [x: string]: any;
1924
+ };
1925
+ mutateAttribute(key: string, value: string | null): any;
1926
+ mutateAttributeForArray(_key: string, _value: string): void;
1927
+ isDateAttribute(key: string): boolean;
1928
+ serializeDate(date?: Date | string | null): string | null;
1929
+ getDates(): any[];
1930
+ getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
1931
+ getCastType(key: string): any;
1932
+ hasCast(key: string, types?: readonly string[]): boolean;
1933
+ withDayjs(date: string): dayjs0.Dayjs;
1934
+ isCustomCast(cast: any): boolean;
1935
+ isCustomDateTimeCast(cast: any): boolean;
1936
+ isDecimalCast(cast: any): boolean;
1937
+ isDateCastable(key: string): boolean;
1938
+ fromDateTime(value: string): string;
1939
+ getDateFormat(): any;
1940
+ asDecimal(value: string, decimals: number): string;
1941
+ asDateTime(value: any): Date | null;
1942
+ asDate(value: string): Date;
1943
+ } & {
1944
+ [x: string]: any;
1945
+ hidden: any[];
1946
+ visible: any[];
1947
+ makeVisible(...keys: string[]): /*elided*/any;
1948
+ makeHidden(key: string[], ...keys: string[]): /*elided*/any;
1949
+ getHidden(): any[];
1950
+ getVisible(): any[];
1951
+ setHidden(hidden: any[]): /*elided*/any;
1952
+ setVisible(visible: any[]): /*elided*/any;
1953
+ } & {
1954
+ [x: string]: any;
1955
+ execHooks(hook: any, options: TGeneric): Promise<any>;
1956
+ } & {
1957
+ [x: string]: any;
1958
+ getGlobalScopes(): {};
1959
+ } & {
1960
+ [x: string]: any;
1961
+ useUniqueIds: boolean;
1962
+ usesUniqueIds(): boolean;
1963
+ uniqueIds(): never[];
1964
+ setUniqueIds(): void;
1965
+ }>;
1966
+ (...relations: WithRelationType[]): Promise<(new () => IModel) & IModel & {
1967
+ [x: string]: any;
1968
+ timestamps: boolean;
1969
+ dateFormat: string;
1970
+ usesTimestamps(): boolean;
1971
+ updateTimestamps(): /*elided*/any;
1972
+ getCreatedAtColumn(): any;
1973
+ getUpdatedAtColumn(): any;
1974
+ setCreatedAt(value: any): /*elided*/any;
1975
+ setUpdatedAt(value: any): /*elided*/any;
1976
+ freshTimestamp(): Date;
1977
+ freshTimestampString(): any;
1978
+ } & TGeneric<any, string> & {
1979
+ [x: string]: any;
1980
+ attributes: TGeneric;
1981
+ original: TGeneric;
1982
+ casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
1983
+ changes: TGeneric;
1984
+ appends: any[];
1985
+ setAppends(appends: any[]): /*elided*/any;
1986
+ append(...keys: any[]): /*elided*/any;
1987
+ normalizeCastClassResponse(key: string, value: string): TGeneric;
1988
+ syncOriginal(): /*elided*/any;
1989
+ syncChanges(): /*elided*/any;
1990
+ syncOriginalAttribute(attribute: string): void;
1991
+ syncOriginalAttributes(...attributes: string[]): /*elided*/any;
1992
+ isDirty(...attributes: string[]): boolean;
1993
+ getDirty(): TGeneric;
1994
+ originalIsEquivalent(key: string): boolean;
1995
+ setAttributes(attributes: TGeneric): void;
1996
+ setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
1997
+ getAttributes(): {
1998
+ [x: string]: any;
1999
+ };
2000
+ setAttribute(key: string, value: string): /*elided*/any;
2001
+ getAttribute(key: string): any;
2002
+ castAttribute(key: string, value: string): any;
2003
+ attributesToData(): {
2004
+ [x: string]: any;
2005
+ };
2006
+ mutateAttribute(key: string, value: string | null): any;
2007
+ mutateAttributeForArray(_key: string, _value: string): void;
2008
+ isDateAttribute(key: string): boolean;
2009
+ serializeDate(date?: Date | string | null): string | null;
2010
+ getDates(): any[];
2011
+ getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
2012
+ getCastType(key: string): any;
2013
+ hasCast(key: string, types?: readonly string[]): boolean;
2014
+ withDayjs(date: string): dayjs0.Dayjs;
2015
+ isCustomCast(cast: any): boolean;
2016
+ isCustomDateTimeCast(cast: any): boolean;
2017
+ isDecimalCast(cast: any): boolean;
2018
+ isDateCastable(key: string): boolean;
2019
+ fromDateTime(value: string): string;
2020
+ getDateFormat(): any;
2021
+ asDecimal(value: string, decimals: number): string;
2022
+ asDateTime(value: any): Date | null;
2023
+ asDate(value: string): Date;
2024
+ } & {
2025
+ [x: string]: any;
2026
+ hidden: any[];
2027
+ visible: any[];
2028
+ makeVisible(...keys: string[]): /*elided*/any;
2029
+ makeHidden(key: string[], ...keys: string[]): /*elided*/any;
2030
+ getHidden(): any[];
2031
+ getVisible(): any[];
2032
+ setHidden(hidden: any[]): /*elided*/any;
2033
+ setVisible(visible: any[]): /*elided*/any;
2034
+ } & {
2035
+ [x: string]: any;
2036
+ execHooks(hook: any, options: TGeneric): Promise<any>;
2037
+ } & {
2038
+ [x: string]: any;
2039
+ getGlobalScopes(): {};
2040
+ } & {
2041
+ [x: string]: any;
2042
+ useUniqueIds: boolean;
2043
+ usesUniqueIds(): boolean;
2044
+ uniqueIds(): never[];
2045
+ setUniqueIds(): void;
2046
+ }>;
2047
+ };
2048
+ loadAggregate: (relations: WithRelationType, column: any, callback?: any) => Promise<(new () => IModel) & IModel & {
2049
+ [x: string]: any;
2050
+ timestamps: boolean;
2051
+ dateFormat: string;
2052
+ usesTimestamps(): boolean;
2053
+ updateTimestamps(): /*elided*/any;
2054
+ getCreatedAtColumn(): any;
2055
+ getUpdatedAtColumn(): any;
2056
+ setCreatedAt(value: any): /*elided*/any;
2057
+ setUpdatedAt(value: any): /*elided*/any;
2058
+ freshTimestamp(): Date;
2059
+ freshTimestampString(): any;
2060
+ } & TGeneric<any, string> & {
2061
+ [x: string]: any;
2062
+ attributes: TGeneric;
2063
+ original: TGeneric;
2064
+ casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
2065
+ changes: TGeneric;
2066
+ appends: any[];
2067
+ setAppends(appends: any[]): /*elided*/any;
2068
+ append(...keys: any[]): /*elided*/any;
2069
+ normalizeCastClassResponse(key: string, value: string): TGeneric;
2070
+ syncOriginal(): /*elided*/any;
2071
+ syncChanges(): /*elided*/any;
2072
+ syncOriginalAttribute(attribute: string): void;
2073
+ syncOriginalAttributes(...attributes: string[]): /*elided*/any;
2074
+ isDirty(...attributes: string[]): boolean;
2075
+ getDirty(): TGeneric;
2076
+ originalIsEquivalent(key: string): boolean;
2077
+ setAttributes(attributes: TGeneric): void;
2078
+ setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
2079
+ getAttributes(): {
2080
+ [x: string]: any;
2081
+ };
2082
+ setAttribute(key: string, value: string): /*elided*/any;
2083
+ getAttribute(key: string): any;
2084
+ castAttribute(key: string, value: string): any;
2085
+ attributesToData(): {
2086
+ [x: string]: any;
2087
+ };
2088
+ mutateAttribute(key: string, value: string | null): any;
2089
+ mutateAttributeForArray(_key: string, _value: string): void;
2090
+ isDateAttribute(key: string): boolean;
2091
+ serializeDate(date?: Date | string | null): string | null;
2092
+ getDates(): any[];
2093
+ getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
2094
+ getCastType(key: string): any;
2095
+ hasCast(key: string, types?: readonly string[]): boolean;
2096
+ withDayjs(date: string): dayjs0.Dayjs;
2097
+ isCustomCast(cast: any): boolean;
2098
+ isCustomDateTimeCast(cast: any): boolean;
2099
+ isDecimalCast(cast: any): boolean;
2100
+ isDateCastable(key: string): boolean;
2101
+ fromDateTime(value: string): string;
2102
+ getDateFormat(): any;
2103
+ asDecimal(value: string, decimals: number): string;
2104
+ asDateTime(value: any): Date | null;
2105
+ asDate(value: string): Date;
2106
+ } & {
2107
+ [x: string]: any;
2108
+ hidden: any[];
2109
+ visible: any[];
2110
+ makeVisible(...keys: string[]): /*elided*/any;
2111
+ makeHidden(key: string[], ...keys: string[]): /*elided*/any;
2112
+ getHidden(): any[];
2113
+ getVisible(): any[];
2114
+ setHidden(hidden: any[]): /*elided*/any;
2115
+ setVisible(visible: any[]): /*elided*/any;
2116
+ } & {
2117
+ [x: string]: any;
2118
+ execHooks(hook: any, options: TGeneric): Promise<any>;
2119
+ } & {
2120
+ [x: string]: any;
2121
+ getGlobalScopes(): {};
2122
+ } & {
2123
+ [x: string]: any;
2124
+ useUniqueIds: boolean;
2125
+ usesUniqueIds(): boolean;
2126
+ uniqueIds(): never[];
2127
+ setUniqueIds(): void;
2128
+ }>;
2129
+ loadCount: (...relations: WithRelationType[]) => Promise<(new () => IModel) & IModel & {
2130
+ [x: string]: any;
2131
+ timestamps: boolean;
2132
+ dateFormat: string;
2133
+ usesTimestamps(): boolean;
2134
+ updateTimestamps(): /*elided*/any;
2135
+ getCreatedAtColumn(): any;
2136
+ getUpdatedAtColumn(): any;
2137
+ setCreatedAt(value: any): /*elided*/any;
2138
+ setUpdatedAt(value: any): /*elided*/any;
2139
+ freshTimestamp(): Date;
2140
+ freshTimestampString(): any;
2141
+ } & TGeneric<any, string> & {
2142
+ [x: string]: any;
2143
+ attributes: TGeneric;
2144
+ original: TGeneric;
2145
+ casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
2146
+ changes: TGeneric;
2147
+ appends: any[];
2148
+ setAppends(appends: any[]): /*elided*/any;
2149
+ append(...keys: any[]): /*elided*/any;
2150
+ normalizeCastClassResponse(key: string, value: string): TGeneric;
2151
+ syncOriginal(): /*elided*/any;
2152
+ syncChanges(): /*elided*/any;
2153
+ syncOriginalAttribute(attribute: string): void;
2154
+ syncOriginalAttributes(...attributes: string[]): /*elided*/any;
2155
+ isDirty(...attributes: string[]): boolean;
2156
+ getDirty(): TGeneric;
2157
+ originalIsEquivalent(key: string): boolean;
2158
+ setAttributes(attributes: TGeneric): void;
2159
+ setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
2160
+ getAttributes(): {
2161
+ [x: string]: any;
2162
+ };
2163
+ setAttribute(key: string, value: string): /*elided*/any;
2164
+ getAttribute(key: string): any;
2165
+ castAttribute(key: string, value: string): any;
2166
+ attributesToData(): {
2167
+ [x: string]: any;
2168
+ };
2169
+ mutateAttribute(key: string, value: string | null): any;
2170
+ mutateAttributeForArray(_key: string, _value: string): void;
2171
+ isDateAttribute(key: string): boolean;
2172
+ serializeDate(date?: Date | string | null): string | null;
2173
+ getDates(): any[];
2174
+ getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
2175
+ getCastType(key: string): any;
2176
+ hasCast(key: string, types?: readonly string[]): boolean;
2177
+ withDayjs(date: string): dayjs0.Dayjs;
2178
+ isCustomCast(cast: any): boolean;
2179
+ isCustomDateTimeCast(cast: any): boolean;
2180
+ isDecimalCast(cast: any): boolean;
2181
+ isDateCastable(key: string): boolean;
2182
+ fromDateTime(value: string): string;
2183
+ getDateFormat(): any;
2184
+ asDecimal(value: string, decimals: number): string;
2185
+ asDateTime(value: any): Date | null;
2186
+ asDate(value: string): Date;
2187
+ } & {
2188
+ [x: string]: any;
2189
+ hidden: any[];
2190
+ visible: any[];
2191
+ makeVisible(...keys: string[]): /*elided*/any;
2192
+ makeHidden(key: string[], ...keys: string[]): /*elided*/any;
2193
+ getHidden(): any[];
2194
+ getVisible(): any[];
2195
+ setHidden(hidden: any[]): /*elided*/any;
2196
+ setVisible(visible: any[]): /*elided*/any;
2197
+ } & {
2198
+ [x: string]: any;
2199
+ execHooks(hook: any, options: TGeneric): Promise<any>;
2200
+ } & {
2201
+ [x: string]: any;
2202
+ getGlobalScopes(): {};
2203
+ } & {
2204
+ [x: string]: any;
2205
+ useUniqueIds: boolean;
2206
+ usesUniqueIds(): boolean;
2207
+ uniqueIds(): never[];
2208
+ setUniqueIds(): void;
2209
+ }>;
2210
+ loadMax: (relations: WithRelationType, column: string) => Promise<(new () => IModel) & IModel & {
2211
+ [x: string]: any;
2212
+ timestamps: boolean;
2213
+ dateFormat: string;
2214
+ usesTimestamps(): boolean;
2215
+ updateTimestamps(): /*elided*/any;
2216
+ getCreatedAtColumn(): any;
2217
+ getUpdatedAtColumn(): any;
2218
+ setCreatedAt(value: any): /*elided*/any;
2219
+ setUpdatedAt(value: any): /*elided*/any;
2220
+ freshTimestamp(): Date;
2221
+ freshTimestampString(): any;
2222
+ } & TGeneric<any, string> & {
2223
+ [x: string]: any;
2224
+ attributes: TGeneric;
2225
+ original: TGeneric;
2226
+ casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
2227
+ changes: TGeneric;
2228
+ appends: any[];
2229
+ setAppends(appends: any[]): /*elided*/any;
2230
+ append(...keys: any[]): /*elided*/any;
2231
+ normalizeCastClassResponse(key: string, value: string): TGeneric;
2232
+ syncOriginal(): /*elided*/any;
2233
+ syncChanges(): /*elided*/any;
2234
+ syncOriginalAttribute(attribute: string): void;
2235
+ syncOriginalAttributes(...attributes: string[]): /*elided*/any;
2236
+ isDirty(...attributes: string[]): boolean;
2237
+ getDirty(): TGeneric;
2238
+ originalIsEquivalent(key: string): boolean;
2239
+ setAttributes(attributes: TGeneric): void;
2240
+ setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
2241
+ getAttributes(): {
2242
+ [x: string]: any;
2243
+ };
2244
+ setAttribute(key: string, value: string): /*elided*/any;
2245
+ getAttribute(key: string): any;
2246
+ castAttribute(key: string, value: string): any;
2247
+ attributesToData(): {
2248
+ [x: string]: any;
2249
+ };
2250
+ mutateAttribute(key: string, value: string | null): any;
2251
+ mutateAttributeForArray(_key: string, _value: string): void;
2252
+ isDateAttribute(key: string): boolean;
2253
+ serializeDate(date?: Date | string | null): string | null;
2254
+ getDates(): any[];
2255
+ getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
2256
+ getCastType(key: string): any;
2257
+ hasCast(key: string, types?: readonly string[]): boolean;
2258
+ withDayjs(date: string): dayjs0.Dayjs;
2259
+ isCustomCast(cast: any): boolean;
2260
+ isCustomDateTimeCast(cast: any): boolean;
2261
+ isDecimalCast(cast: any): boolean;
2262
+ isDateCastable(key: string): boolean;
2263
+ fromDateTime(value: string): string;
2264
+ getDateFormat(): any;
2265
+ asDecimal(value: string, decimals: number): string;
2266
+ asDateTime(value: any): Date | null;
2267
+ asDate(value: string): Date;
2268
+ } & {
2269
+ [x: string]: any;
2270
+ hidden: any[];
2271
+ visible: any[];
2272
+ makeVisible(...keys: string[]): /*elided*/any;
2273
+ makeHidden(key: string[], ...keys: string[]): /*elided*/any;
2274
+ getHidden(): any[];
2275
+ getVisible(): any[];
2276
+ setHidden(hidden: any[]): /*elided*/any;
2277
+ setVisible(visible: any[]): /*elided*/any;
2278
+ } & {
2279
+ [x: string]: any;
2280
+ execHooks(hook: any, options: TGeneric): Promise<any>;
2281
+ } & {
2282
+ [x: string]: any;
2283
+ getGlobalScopes(): {};
2284
+ } & {
2285
+ [x: string]: any;
2286
+ useUniqueIds: boolean;
2287
+ usesUniqueIds(): boolean;
2288
+ uniqueIds(): never[];
2289
+ setUniqueIds(): void;
2290
+ }>;
2291
+ loadMin: (relations: WithRelationType, column: string) => Promise<(new () => IModel) & IModel & {
2292
+ [x: string]: any;
2293
+ timestamps: boolean;
2294
+ dateFormat: string;
2295
+ usesTimestamps(): boolean;
2296
+ updateTimestamps(): /*elided*/any;
2297
+ getCreatedAtColumn(): any;
2298
+ getUpdatedAtColumn(): any;
2299
+ setCreatedAt(value: any): /*elided*/any;
2300
+ setUpdatedAt(value: any): /*elided*/any;
2301
+ freshTimestamp(): Date;
2302
+ freshTimestampString(): any;
2303
+ } & TGeneric<any, string> & {
2304
+ [x: string]: any;
2305
+ attributes: TGeneric;
2306
+ original: TGeneric;
2307
+ casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
2308
+ changes: TGeneric;
2309
+ appends: any[];
2310
+ setAppends(appends: any[]): /*elided*/any;
2311
+ append(...keys: any[]): /*elided*/any;
2312
+ normalizeCastClassResponse(key: string, value: string): TGeneric;
2313
+ syncOriginal(): /*elided*/any;
2314
+ syncChanges(): /*elided*/any;
2315
+ syncOriginalAttribute(attribute: string): void;
2316
+ syncOriginalAttributes(...attributes: string[]): /*elided*/any;
2317
+ isDirty(...attributes: string[]): boolean;
2318
+ getDirty(): TGeneric;
2319
+ originalIsEquivalent(key: string): boolean;
2320
+ setAttributes(attributes: TGeneric): void;
2321
+ setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
2322
+ getAttributes(): {
2323
+ [x: string]: any;
2324
+ };
2325
+ setAttribute(key: string, value: string): /*elided*/any;
2326
+ getAttribute(key: string): any;
2327
+ castAttribute(key: string, value: string): any;
2328
+ attributesToData(): {
2329
+ [x: string]: any;
2330
+ };
2331
+ mutateAttribute(key: string, value: string | null): any;
2332
+ mutateAttributeForArray(_key: string, _value: string): void;
2333
+ isDateAttribute(key: string): boolean;
2334
+ serializeDate(date?: Date | string | null): string | null;
2335
+ getDates(): any[];
2336
+ getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
2337
+ getCastType(key: string): any;
2338
+ hasCast(key: string, types?: readonly string[]): boolean;
2339
+ withDayjs(date: string): dayjs0.Dayjs;
2340
+ isCustomCast(cast: any): boolean;
2341
+ isCustomDateTimeCast(cast: any): boolean;
2342
+ isDecimalCast(cast: any): boolean;
2343
+ isDateCastable(key: string): boolean;
2344
+ fromDateTime(value: string): string;
2345
+ getDateFormat(): any;
2346
+ asDecimal(value: string, decimals: number): string;
2347
+ asDateTime(value: any): Date | null;
2348
+ asDate(value: string): Date;
2349
+ } & {
2350
+ [x: string]: any;
2351
+ hidden: any[];
2352
+ visible: any[];
2353
+ makeVisible(...keys: string[]): /*elided*/any;
2354
+ makeHidden(key: string[], ...keys: string[]): /*elided*/any;
2355
+ getHidden(): any[];
2356
+ getVisible(): any[];
2357
+ setHidden(hidden: any[]): /*elided*/any;
2358
+ setVisible(visible: any[]): /*elided*/any;
2359
+ } & {
2360
+ [x: string]: any;
2361
+ execHooks(hook: any, options: TGeneric): Promise<any>;
2362
+ } & {
2363
+ [x: string]: any;
2364
+ getGlobalScopes(): {};
2365
+ } & {
2366
+ [x: string]: any;
2367
+ useUniqueIds: boolean;
2368
+ usesUniqueIds(): boolean;
2369
+ uniqueIds(): never[];
2370
+ setUniqueIds(): void;
2371
+ }>;
2372
+ loadSum: (relations: WithRelationType, column: string) => Promise<(new () => IModel) & IModel & {
2373
+ [x: string]: any;
2374
+ timestamps: boolean;
2375
+ dateFormat: string;
2376
+ usesTimestamps(): boolean;
2377
+ updateTimestamps(): /*elided*/any;
2378
+ getCreatedAtColumn(): any;
2379
+ getUpdatedAtColumn(): any;
2380
+ setCreatedAt(value: any): /*elided*/any;
2381
+ setUpdatedAt(value: any): /*elided*/any;
2382
+ freshTimestamp(): Date;
2383
+ freshTimestampString(): any;
2384
+ } & TGeneric<any, string> & {
2385
+ [x: string]: any;
2386
+ attributes: TGeneric;
2387
+ original: TGeneric;
2388
+ casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
2389
+ changes: TGeneric;
2390
+ appends: any[];
2391
+ setAppends(appends: any[]): /*elided*/any;
2392
+ append(...keys: any[]): /*elided*/any;
2393
+ normalizeCastClassResponse(key: string, value: string): TGeneric;
2394
+ syncOriginal(): /*elided*/any;
2395
+ syncChanges(): /*elided*/any;
2396
+ syncOriginalAttribute(attribute: string): void;
2397
+ syncOriginalAttributes(...attributes: string[]): /*elided*/any;
2398
+ isDirty(...attributes: string[]): boolean;
2399
+ getDirty(): TGeneric;
2400
+ originalIsEquivalent(key: string): boolean;
2401
+ setAttributes(attributes: TGeneric): void;
2402
+ setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
2403
+ getAttributes(): {
2404
+ [x: string]: any;
2405
+ };
2406
+ setAttribute(key: string, value: string): /*elided*/any;
2407
+ getAttribute(key: string): any;
2408
+ castAttribute(key: string, value: string): any;
2409
+ attributesToData(): {
2410
+ [x: string]: any;
2411
+ };
2412
+ mutateAttribute(key: string, value: string | null): any;
2413
+ mutateAttributeForArray(_key: string, _value: string): void;
2414
+ isDateAttribute(key: string): boolean;
2415
+ serializeDate(date?: Date | string | null): string | null;
2416
+ getDates(): any[];
2417
+ getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
2418
+ getCastType(key: string): any;
2419
+ hasCast(key: string, types?: readonly string[]): boolean;
2420
+ withDayjs(date: string): dayjs0.Dayjs;
2421
+ isCustomCast(cast: any): boolean;
2422
+ isCustomDateTimeCast(cast: any): boolean;
2423
+ isDecimalCast(cast: any): boolean;
2424
+ isDateCastable(key: string): boolean;
2425
+ fromDateTime(value: string): string;
2426
+ getDateFormat(): any;
2427
+ asDecimal(value: string, decimals: number): string;
2428
+ asDateTime(value: any): Date | null;
2429
+ asDate(value: string): Date;
2430
+ } & {
2431
+ [x: string]: any;
2432
+ hidden: any[];
2433
+ visible: any[];
2434
+ makeVisible(...keys: string[]): /*elided*/any;
2435
+ makeHidden(key: string[], ...keys: string[]): /*elided*/any;
2436
+ getHidden(): any[];
2437
+ getVisible(): any[];
2438
+ setHidden(hidden: any[]): /*elided*/any;
2439
+ setVisible(visible: any[]): /*elided*/any;
2440
+ } & {
2441
+ [x: string]: any;
2442
+ execHooks(hook: any, options: TGeneric): Promise<any>;
2443
+ } & {
2444
+ [x: string]: any;
2445
+ getGlobalScopes(): {};
2446
+ } & {
2447
+ [x: string]: any;
2448
+ useUniqueIds: boolean;
2449
+ usesUniqueIds(): boolean;
2450
+ uniqueIds(): never[];
2451
+ setUniqueIds(): void;
2452
+ }>;
2453
+ usesTimestamps: (() => boolean) & (() => boolean);
2454
+ updateTimestamps: (() => (new () => IModel) & IModel & {
2455
+ [x: string]: any;
2456
+ timestamps: boolean;
2457
+ dateFormat: string;
2458
+ usesTimestamps(): boolean;
2459
+ updateTimestamps(): /*elided*/any;
2460
+ getCreatedAtColumn(): any;
2461
+ getUpdatedAtColumn(): any;
2462
+ setCreatedAt(value: any): /*elided*/any;
2463
+ setUpdatedAt(value: any): /*elided*/any;
2464
+ freshTimestamp(): Date;
2465
+ freshTimestampString(): any;
2466
+ } & TGeneric<any, string> & {
2467
+ [x: string]: any;
2468
+ attributes: TGeneric;
2469
+ original: TGeneric;
2470
+ casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
2471
+ changes: TGeneric;
2472
+ appends: any[];
2473
+ setAppends(appends: any[]): /*elided*/any;
2474
+ append(...keys: any[]): /*elided*/any;
2475
+ normalizeCastClassResponse(key: string, value: string): TGeneric;
2476
+ syncOriginal(): /*elided*/any;
2477
+ syncChanges(): /*elided*/any;
2478
+ syncOriginalAttribute(attribute: string): void;
2479
+ syncOriginalAttributes(...attributes: string[]): /*elided*/any;
2480
+ isDirty(...attributes: string[]): boolean;
2481
+ getDirty(): TGeneric;
2482
+ originalIsEquivalent(key: string): boolean;
2483
+ setAttributes(attributes: TGeneric): void;
2484
+ setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
2485
+ getAttributes(): {
2486
+ [x: string]: any;
2487
+ };
2488
+ setAttribute(key: string, value: string): /*elided*/any;
2489
+ getAttribute(key: string): any;
2490
+ castAttribute(key: string, value: string): any;
2491
+ attributesToData(): {
2492
+ [x: string]: any;
2493
+ };
2494
+ mutateAttribute(key: string, value: string | null): any;
2495
+ mutateAttributeForArray(_key: string, _value: string): void;
2496
+ isDateAttribute(key: string): boolean;
2497
+ serializeDate(date?: Date | string | null): string | null;
2498
+ getDates(): any[];
2499
+ getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
2500
+ getCastType(key: string): any;
2501
+ hasCast(key: string, types?: readonly string[]): boolean;
2502
+ withDayjs(date: string): dayjs0.Dayjs;
2503
+ isCustomCast(cast: any): boolean;
2504
+ isCustomDateTimeCast(cast: any): boolean;
2505
+ isDecimalCast(cast: any): boolean;
2506
+ isDateCastable(key: string): boolean;
2507
+ fromDateTime(value: string): string;
2508
+ getDateFormat(): any;
2509
+ asDecimal(value: string, decimals: number): string;
2510
+ asDateTime(value: any): Date | null;
2511
+ asDate(value: string): Date;
2512
+ } & {
2513
+ [x: string]: any;
2514
+ hidden: any[];
2515
+ visible: any[];
2516
+ makeVisible(...keys: string[]): /*elided*/any;
2517
+ makeHidden(key: string[], ...keys: string[]): /*elided*/any;
2518
+ getHidden(): any[];
2519
+ getVisible(): any[];
2520
+ setHidden(hidden: any[]): /*elided*/any;
2521
+ setVisible(visible: any[]): /*elided*/any;
2522
+ } & {
2523
+ [x: string]: any;
2524
+ execHooks(hook: any, options: TGeneric): Promise<any>;
2525
+ } & {
2526
+ [x: string]: any;
2527
+ getGlobalScopes(): {};
2528
+ } & {
2529
+ [x: string]: any;
2530
+ useUniqueIds: boolean;
2531
+ usesUniqueIds(): boolean;
2532
+ uniqueIds(): never[];
2533
+ setUniqueIds(): void;
2534
+ }) & (() => (new () => IModel) & IModel & {
2535
+ [x: string]: any;
2536
+ timestamps: boolean;
2537
+ dateFormat: string;
2538
+ usesTimestamps(): boolean;
2539
+ updateTimestamps(): /*elided*/any;
2540
+ getCreatedAtColumn(): any;
2541
+ getUpdatedAtColumn(): any;
2542
+ setCreatedAt(value: any): /*elided*/any;
2543
+ setUpdatedAt(value: any): /*elided*/any;
2544
+ freshTimestamp(): Date;
2545
+ freshTimestampString(): any;
2546
+ } & TGeneric<any, string> & {
2547
+ [x: string]: any;
2548
+ attributes: TGeneric;
2549
+ original: TGeneric;
2550
+ casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
2551
+ changes: TGeneric;
2552
+ appends: any[];
2553
+ setAppends(appends: any[]): /*elided*/any;
2554
+ append(...keys: any[]): /*elided*/any;
2555
+ normalizeCastClassResponse(key: string, value: string): TGeneric;
2556
+ syncOriginal(): /*elided*/any;
2557
+ syncChanges(): /*elided*/any;
2558
+ syncOriginalAttribute(attribute: string): void;
2559
+ syncOriginalAttributes(...attributes: string[]): /*elided*/any;
2560
+ isDirty(...attributes: string[]): boolean;
2561
+ getDirty(): TGeneric;
2562
+ originalIsEquivalent(key: string): boolean;
2563
+ setAttributes(attributes: TGeneric): void;
2564
+ setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
2565
+ getAttributes(): {
2566
+ [x: string]: any;
2567
+ };
2568
+ setAttribute(key: string, value: string): /*elided*/any;
2569
+ getAttribute(key: string): any;
2570
+ castAttribute(key: string, value: string): any;
2571
+ attributesToData(): {
2572
+ [x: string]: any;
2573
+ };
2574
+ mutateAttribute(key: string, value: string | null): any;
2575
+ mutateAttributeForArray(_key: string, _value: string): void;
2576
+ isDateAttribute(key: string): boolean;
2577
+ serializeDate(date?: Date | string | null): string | null;
2578
+ getDates(): any[];
2579
+ getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
2580
+ getCastType(key: string): any;
2581
+ hasCast(key: string, types?: readonly string[]): boolean;
2582
+ withDayjs(date: string): dayjs0.Dayjs;
2583
+ isCustomCast(cast: any): boolean;
2584
+ isCustomDateTimeCast(cast: any): boolean;
2585
+ isDecimalCast(cast: any): boolean;
2586
+ isDateCastable(key: string): boolean;
2587
+ fromDateTime(value: string): string;
2588
+ getDateFormat(): any;
2589
+ asDecimal(value: string, decimals: number): string;
2590
+ asDateTime(value: any): Date | null;
2591
+ asDate(value: string): Date;
2592
+ } & {
2593
+ [x: string]: any;
2594
+ hidden: any[];
2595
+ visible: any[];
2596
+ makeVisible(...keys: string[]): /*elided*/any;
2597
+ makeHidden(key: string[], ...keys: string[]): /*elided*/any;
2598
+ getHidden(): any[];
2599
+ getVisible(): any[];
2600
+ setHidden(hidden: any[]): /*elided*/any;
2601
+ setVisible(visible: any[]): /*elided*/any;
2602
+ } & {
2603
+ [x: string]: any;
2604
+ execHooks(hook: any, options: TGeneric): Promise<any>;
2605
+ } & {
2606
+ [x: string]: any;
2607
+ getGlobalScopes(): {};
2608
+ } & {
2609
+ [x: string]: any;
2610
+ useUniqueIds: boolean;
2611
+ usesUniqueIds(): boolean;
2612
+ uniqueIds(): never[];
2613
+ setUniqueIds(): void;
2614
+ });
2615
+ getCreatedAtColumn: (() => string) & (() => any);
2616
+ getUpdatedAtColumn: (() => string) & (() => any);
2617
+ getDeletedAtColumn: () => string;
2618
+ setCreatedAt: ((value: string) => (new () => IModel) & IModel & {
2619
+ [x: string]: any;
2620
+ timestamps: boolean;
2621
+ dateFormat: string;
2622
+ usesTimestamps(): boolean;
2623
+ updateTimestamps(): /*elided*/any;
2624
+ getCreatedAtColumn(): any;
2625
+ getUpdatedAtColumn(): any;
2626
+ setCreatedAt(value: any): /*elided*/any;
2627
+ setUpdatedAt(value: any): /*elided*/any;
2628
+ freshTimestamp(): Date;
2629
+ freshTimestampString(): any;
2630
+ } & TGeneric<any, string> & {
2631
+ [x: string]: any;
2632
+ attributes: TGeneric;
2633
+ original: TGeneric;
2634
+ casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
2635
+ changes: TGeneric;
2636
+ appends: any[];
2637
+ setAppends(appends: any[]): /*elided*/any;
2638
+ append(...keys: any[]): /*elided*/any;
2639
+ normalizeCastClassResponse(key: string, value: string): TGeneric;
2640
+ syncOriginal(): /*elided*/any;
2641
+ syncChanges(): /*elided*/any;
2642
+ syncOriginalAttribute(attribute: string): void;
2643
+ syncOriginalAttributes(...attributes: string[]): /*elided*/any;
2644
+ isDirty(...attributes: string[]): boolean;
2645
+ getDirty(): TGeneric;
2646
+ originalIsEquivalent(key: string): boolean;
2647
+ setAttributes(attributes: TGeneric): void;
2648
+ setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
2649
+ getAttributes(): {
2650
+ [x: string]: any;
2651
+ };
2652
+ setAttribute(key: string, value: string): /*elided*/any;
2653
+ getAttribute(key: string): any;
2654
+ castAttribute(key: string, value: string): any;
2655
+ attributesToData(): {
2656
+ [x: string]: any;
2657
+ };
2658
+ mutateAttribute(key: string, value: string | null): any;
2659
+ mutateAttributeForArray(_key: string, _value: string): void;
2660
+ isDateAttribute(key: string): boolean;
2661
+ serializeDate(date?: Date | string | null): string | null;
2662
+ getDates(): any[];
2663
+ getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
2664
+ getCastType(key: string): any;
2665
+ hasCast(key: string, types?: readonly string[]): boolean;
2666
+ withDayjs(date: string): dayjs0.Dayjs;
2667
+ isCustomCast(cast: any): boolean;
2668
+ isCustomDateTimeCast(cast: any): boolean;
2669
+ isDecimalCast(cast: any): boolean;
2670
+ isDateCastable(key: string): boolean;
2671
+ fromDateTime(value: string): string;
2672
+ getDateFormat(): any;
2673
+ asDecimal(value: string, decimals: number): string;
2674
+ asDateTime(value: any): Date | null;
2675
+ asDate(value: string): Date;
2676
+ } & {
2677
+ [x: string]: any;
2678
+ hidden: any[];
2679
+ visible: any[];
2680
+ makeVisible(...keys: string[]): /*elided*/any;
2681
+ makeHidden(key: string[], ...keys: string[]): /*elided*/any;
2682
+ getHidden(): any[];
2683
+ getVisible(): any[];
2684
+ setHidden(hidden: any[]): /*elided*/any;
2685
+ setVisible(visible: any[]): /*elided*/any;
2686
+ } & {
2687
+ [x: string]: any;
2688
+ execHooks(hook: any, options: TGeneric): Promise<any>;
2689
+ } & {
2690
+ [x: string]: any;
2691
+ getGlobalScopes(): {};
2692
+ } & {
2693
+ [x: string]: any;
2694
+ useUniqueIds: boolean;
2695
+ usesUniqueIds(): boolean;
2696
+ uniqueIds(): never[];
2697
+ setUniqueIds(): void;
2698
+ }) & ((value: any) => (new () => IModel) & IModel & {
2699
+ [x: string]: any;
2700
+ timestamps: boolean;
2701
+ dateFormat: string;
2702
+ usesTimestamps(): boolean;
2703
+ updateTimestamps(): /*elided*/any;
2704
+ getCreatedAtColumn(): any;
2705
+ getUpdatedAtColumn(): any;
2706
+ setCreatedAt(value: any): /*elided*/any;
2707
+ setUpdatedAt(value: any): /*elided*/any;
2708
+ freshTimestamp(): Date;
2709
+ freshTimestampString(): any;
2710
+ } & TGeneric<any, string> & {
2711
+ [x: string]: any;
2712
+ attributes: TGeneric;
2713
+ original: TGeneric;
2714
+ casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
2715
+ changes: TGeneric;
2716
+ appends: any[];
2717
+ setAppends(appends: any[]): /*elided*/any;
2718
+ append(...keys: any[]): /*elided*/any;
2719
+ normalizeCastClassResponse(key: string, value: string): TGeneric;
2720
+ syncOriginal(): /*elided*/any;
2721
+ syncChanges(): /*elided*/any;
2722
+ syncOriginalAttribute(attribute: string): void;
2723
+ syncOriginalAttributes(...attributes: string[]): /*elided*/any;
2724
+ isDirty(...attributes: string[]): boolean;
2725
+ getDirty(): TGeneric;
2726
+ originalIsEquivalent(key: string): boolean;
2727
+ setAttributes(attributes: TGeneric): void;
2728
+ setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
2729
+ getAttributes(): {
2730
+ [x: string]: any;
2731
+ };
2732
+ setAttribute(key: string, value: string): /*elided*/any;
2733
+ getAttribute(key: string): any;
2734
+ castAttribute(key: string, value: string): any;
2735
+ attributesToData(): {
2736
+ [x: string]: any;
2737
+ };
2738
+ mutateAttribute(key: string, value: string | null): any;
2739
+ mutateAttributeForArray(_key: string, _value: string): void;
2740
+ isDateAttribute(key: string): boolean;
2741
+ serializeDate(date?: Date | string | null): string | null;
2742
+ getDates(): any[];
2743
+ getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
2744
+ getCastType(key: string): any;
2745
+ hasCast(key: string, types?: readonly string[]): boolean;
2746
+ withDayjs(date: string): dayjs0.Dayjs;
2747
+ isCustomCast(cast: any): boolean;
2748
+ isCustomDateTimeCast(cast: any): boolean;
2749
+ isDecimalCast(cast: any): boolean;
2750
+ isDateCastable(key: string): boolean;
2751
+ fromDateTime(value: string): string;
2752
+ getDateFormat(): any;
2753
+ asDecimal(value: string, decimals: number): string;
2754
+ asDateTime(value: any): Date | null;
2755
+ asDate(value: string): Date;
2756
+ } & {
2757
+ [x: string]: any;
2758
+ hidden: any[];
2759
+ visible: any[];
2760
+ makeVisible(...keys: string[]): /*elided*/any;
2761
+ makeHidden(key: string[], ...keys: string[]): /*elided*/any;
2762
+ getHidden(): any[];
2763
+ getVisible(): any[];
2764
+ setHidden(hidden: any[]): /*elided*/any;
2765
+ setVisible(visible: any[]): /*elided*/any;
2766
+ } & {
2767
+ [x: string]: any;
2768
+ execHooks(hook: any, options: TGeneric): Promise<any>;
2769
+ } & {
2770
+ [x: string]: any;
2771
+ getGlobalScopes(): {};
2772
+ } & {
2773
+ [x: string]: any;
2774
+ useUniqueIds: boolean;
2775
+ usesUniqueIds(): boolean;
2776
+ uniqueIds(): never[];
2777
+ setUniqueIds(): void;
2778
+ });
2779
+ setUpdatedAt: ((value: string) => (new () => IModel) & IModel & {
2780
+ [x: string]: any;
2781
+ timestamps: boolean;
2782
+ dateFormat: string;
2783
+ usesTimestamps(): boolean;
2784
+ updateTimestamps(): /*elided*/any;
2785
+ getCreatedAtColumn(): any;
2786
+ getUpdatedAtColumn(): any;
2787
+ setCreatedAt(value: any): /*elided*/any;
2788
+ setUpdatedAt(value: any): /*elided*/any;
2789
+ freshTimestamp(): Date;
2790
+ freshTimestampString(): any;
2791
+ } & TGeneric<any, string> & {
2792
+ [x: string]: any;
2793
+ attributes: TGeneric;
2794
+ original: TGeneric;
2795
+ casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
2796
+ changes: TGeneric;
2797
+ appends: any[];
2798
+ setAppends(appends: any[]): /*elided*/any;
2799
+ append(...keys: any[]): /*elided*/any;
2800
+ normalizeCastClassResponse(key: string, value: string): TGeneric;
2801
+ syncOriginal(): /*elided*/any;
2802
+ syncChanges(): /*elided*/any;
2803
+ syncOriginalAttribute(attribute: string): void;
2804
+ syncOriginalAttributes(...attributes: string[]): /*elided*/any;
2805
+ isDirty(...attributes: string[]): boolean;
2806
+ getDirty(): TGeneric;
2807
+ originalIsEquivalent(key: string): boolean;
2808
+ setAttributes(attributes: TGeneric): void;
2809
+ setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
2810
+ getAttributes(): {
2811
+ [x: string]: any;
2812
+ };
2813
+ setAttribute(key: string, value: string): /*elided*/any;
2814
+ getAttribute(key: string): any;
2815
+ castAttribute(key: string, value: string): any;
2816
+ attributesToData(): {
2817
+ [x: string]: any;
2818
+ };
2819
+ mutateAttribute(key: string, value: string | null): any;
2820
+ mutateAttributeForArray(_key: string, _value: string): void;
2821
+ isDateAttribute(key: string): boolean;
2822
+ serializeDate(date?: Date | string | null): string | null;
2823
+ getDates(): any[];
2824
+ getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
2825
+ getCastType(key: string): any;
2826
+ hasCast(key: string, types?: readonly string[]): boolean;
2827
+ withDayjs(date: string): dayjs0.Dayjs;
2828
+ isCustomCast(cast: any): boolean;
2829
+ isCustomDateTimeCast(cast: any): boolean;
2830
+ isDecimalCast(cast: any): boolean;
2831
+ isDateCastable(key: string): boolean;
2832
+ fromDateTime(value: string): string;
2833
+ getDateFormat(): any;
2834
+ asDecimal(value: string, decimals: number): string;
2835
+ asDateTime(value: any): Date | null;
2836
+ asDate(value: string): Date;
2837
+ } & {
2838
+ [x: string]: any;
2839
+ hidden: any[];
2840
+ visible: any[];
2841
+ makeVisible(...keys: string[]): /*elided*/any;
2842
+ makeHidden(key: string[], ...keys: string[]): /*elided*/any;
2843
+ getHidden(): any[];
2844
+ getVisible(): any[];
2845
+ setHidden(hidden: any[]): /*elided*/any;
2846
+ setVisible(visible: any[]): /*elided*/any;
2847
+ } & {
2848
+ [x: string]: any;
2849
+ execHooks(hook: any, options: TGeneric): Promise<any>;
2850
+ } & {
2851
+ [x: string]: any;
2852
+ getGlobalScopes(): {};
2853
+ } & {
2854
+ [x: string]: any;
2855
+ useUniqueIds: boolean;
2856
+ usesUniqueIds(): boolean;
2857
+ uniqueIds(): never[];
2858
+ setUniqueIds(): void;
2859
+ }) & ((value: any) => (new () => IModel) & IModel & {
2860
+ [x: string]: any;
2861
+ timestamps: boolean;
2862
+ dateFormat: string;
2863
+ usesTimestamps(): boolean;
2864
+ updateTimestamps(): /*elided*/any;
2865
+ getCreatedAtColumn(): any;
2866
+ getUpdatedAtColumn(): any;
2867
+ setCreatedAt(value: any): /*elided*/any;
2868
+ setUpdatedAt(value: any): /*elided*/any;
2869
+ freshTimestamp(): Date;
2870
+ freshTimestampString(): any;
2871
+ } & TGeneric<any, string> & {
2872
+ [x: string]: any;
2873
+ attributes: TGeneric;
2874
+ original: TGeneric;
2875
+ casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
2876
+ changes: TGeneric;
2877
+ appends: any[];
2878
+ setAppends(appends: any[]): /*elided*/any;
2879
+ append(...keys: any[]): /*elided*/any;
2880
+ normalizeCastClassResponse(key: string, value: string): TGeneric;
2881
+ syncOriginal(): /*elided*/any;
2882
+ syncChanges(): /*elided*/any;
2883
+ syncOriginalAttribute(attribute: string): void;
2884
+ syncOriginalAttributes(...attributes: string[]): /*elided*/any;
2885
+ isDirty(...attributes: string[]): boolean;
2886
+ getDirty(): TGeneric;
2887
+ originalIsEquivalent(key: string): boolean;
2888
+ setAttributes(attributes: TGeneric): void;
2889
+ setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
2890
+ getAttributes(): {
2891
+ [x: string]: any;
2892
+ };
2893
+ setAttribute(key: string, value: string): /*elided*/any;
2894
+ getAttribute(key: string): any;
2895
+ castAttribute(key: string, value: string): any;
2896
+ attributesToData(): {
2897
+ [x: string]: any;
2898
+ };
2899
+ mutateAttribute(key: string, value: string | null): any;
2900
+ mutateAttributeForArray(_key: string, _value: string): void;
2901
+ isDateAttribute(key: string): boolean;
2902
+ serializeDate(date?: Date | string | null): string | null;
2903
+ getDates(): any[];
2904
+ getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
2905
+ getCastType(key: string): any;
2906
+ hasCast(key: string, types?: readonly string[]): boolean;
2907
+ withDayjs(date: string): dayjs0.Dayjs;
2908
+ isCustomCast(cast: any): boolean;
2909
+ isCustomDateTimeCast(cast: any): boolean;
2910
+ isDecimalCast(cast: any): boolean;
2911
+ isDateCastable(key: string): boolean;
2912
+ fromDateTime(value: string): string;
2913
+ getDateFormat(): any;
2914
+ asDecimal(value: string, decimals: number): string;
2915
+ asDateTime(value: any): Date | null;
2916
+ asDate(value: string): Date;
2917
+ } & {
2918
+ [x: string]: any;
2919
+ hidden: any[];
2920
+ visible: any[];
2921
+ makeVisible(...keys: string[]): /*elided*/any;
2922
+ makeHidden(key: string[], ...keys: string[]): /*elided*/any;
2923
+ getHidden(): any[];
2924
+ getVisible(): any[];
2925
+ setHidden(hidden: any[]): /*elided*/any;
2926
+ setVisible(visible: any[]): /*elided*/any;
2927
+ } & {
2928
+ [x: string]: any;
2929
+ execHooks(hook: any, options: TGeneric): Promise<any>;
2930
+ } & {
2931
+ [x: string]: any;
2932
+ getGlobalScopes(): {};
2933
+ } & {
2934
+ [x: string]: any;
2935
+ useUniqueIds: boolean;
2936
+ usesUniqueIds(): boolean;
2937
+ uniqueIds(): never[];
2938
+ setUniqueIds(): void;
2939
+ });
2940
+ freshTimestamp: (() => Date) & (() => Date);
2941
+ freshTimestampString: (() => string) & (() => any);
2942
+ fromDateTime: ((value: Date | number | null) => string) & ((value: string) => string);
2943
+ useSoftDeletes: () => boolean;
2944
+ toData: () => any;
2945
+ attributesToData: (() => any) & (() => {
2946
+ [x: string]: any;
2947
+ });
2948
+ relationsToData: () => any;
2949
+ toJSON: () => any;
2950
+ toJson: () => string;
2951
+ toString: () => string;
2952
+ isDirty: ((attributes?: string | string[]) => boolean) & ((...attributes: string[]) => boolean);
2953
+ getDirty: (() => string[]) & (() => TGeneric);
2954
+ save: (options?: any) => Promise<boolean>;
2955
+ update: (attributes?: any, options?: any) => Promise<boolean>;
2956
+ increment: (column: string, amount?: number, extra?: any) => Promise<boolean>;
2957
+ decrement: (column: string, amount?: number, extra?: any) => Promise<boolean>;
2958
+ serializeDate: ((date: any) => string) & ((date?: Date | string | null) => string | null);
2959
+ delete: (options?: any) => Promise<boolean>;
2960
+ softDelete: (options?: any) => Promise<boolean>;
2961
+ forceDelete: (options?: any) => Promise<boolean>;
2962
+ restore: (options?: any) => Promise<boolean>;
2963
+ fresh: () => Promise<(new () => IModel) & IModel & {
2964
+ [x: string]: any;
2965
+ timestamps: boolean;
2966
+ dateFormat: string;
2967
+ usesTimestamps(): boolean;
2968
+ updateTimestamps(): /*elided*/any;
2969
+ getCreatedAtColumn(): any;
2970
+ getUpdatedAtColumn(): any;
2971
+ setCreatedAt(value: any): /*elided*/any;
2972
+ setUpdatedAt(value: any): /*elided*/any;
2973
+ freshTimestamp(): Date;
2974
+ freshTimestampString(): any;
2975
+ } & TGeneric<any, string> & {
2976
+ [x: string]: any;
2977
+ attributes: TGeneric;
2978
+ original: TGeneric;
2979
+ casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
2980
+ changes: TGeneric;
2981
+ appends: any[];
2982
+ setAppends(appends: any[]): /*elided*/any;
2983
+ append(...keys: any[]): /*elided*/any;
2984
+ normalizeCastClassResponse(key: string, value: string): TGeneric;
2985
+ syncOriginal(): /*elided*/any;
2986
+ syncChanges(): /*elided*/any;
2987
+ syncOriginalAttribute(attribute: string): void;
2988
+ syncOriginalAttributes(...attributes: string[]): /*elided*/any;
2989
+ isDirty(...attributes: string[]): boolean;
2990
+ getDirty(): TGeneric;
2991
+ originalIsEquivalent(key: string): boolean;
2992
+ setAttributes(attributes: TGeneric): void;
2993
+ setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
2994
+ getAttributes(): {
2995
+ [x: string]: any;
2996
+ };
2997
+ setAttribute(key: string, value: string): /*elided*/any;
2998
+ getAttribute(key: string): any;
2999
+ castAttribute(key: string, value: string): any;
3000
+ attributesToData(): {
3001
+ [x: string]: any;
3002
+ };
3003
+ mutateAttribute(key: string, value: string | null): any;
3004
+ mutateAttributeForArray(_key: string, _value: string): void;
3005
+ isDateAttribute(key: string): boolean;
3006
+ serializeDate(date?: Date | string | null): string | null;
3007
+ getDates(): any[];
3008
+ getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
3009
+ getCastType(key: string): any;
3010
+ hasCast(key: string, types?: readonly string[]): boolean;
3011
+ withDayjs(date: string): dayjs0.Dayjs;
3012
+ isCustomCast(cast: any): boolean;
3013
+ isCustomDateTimeCast(cast: any): boolean;
3014
+ isDecimalCast(cast: any): boolean;
3015
+ isDateCastable(key: string): boolean;
3016
+ fromDateTime(value: string): string;
3017
+ getDateFormat(): any;
3018
+ asDecimal(value: string, decimals: number): string;
3019
+ asDateTime(value: any): Date | null;
3020
+ asDate(value: string): Date;
3021
+ } & {
3022
+ [x: string]: any;
3023
+ hidden: any[];
3024
+ visible: any[];
3025
+ makeVisible(...keys: string[]): /*elided*/any;
3026
+ makeHidden(key: string[], ...keys: string[]): /*elided*/any;
3027
+ getHidden(): any[];
3028
+ getVisible(): any[];
3029
+ setHidden(hidden: any[]): /*elided*/any;
3030
+ setVisible(visible: any[]): /*elided*/any;
3031
+ } & {
3032
+ [x: string]: any;
3033
+ execHooks(hook: any, options: TGeneric): Promise<any>;
3034
+ } & {
3035
+ [x: string]: any;
3036
+ getGlobalScopes(): {};
3037
+ } & {
3038
+ [x: string]: any;
3039
+ useUniqueIds: boolean;
3040
+ usesUniqueIds(): boolean;
3041
+ uniqueIds(): never[];
3042
+ setUniqueIds(): void;
3043
+ }>;
3044
+ refresh: () => Promise<((new () => IModel) & IModel & {
3045
+ [x: string]: any;
3046
+ timestamps: boolean;
3047
+ dateFormat: string;
3048
+ usesTimestamps(): boolean;
3049
+ updateTimestamps(): /*elided*/any;
3050
+ getCreatedAtColumn(): any;
3051
+ getUpdatedAtColumn(): any;
3052
+ setCreatedAt(value: any): /*elided*/any;
3053
+ setUpdatedAt(value: any): /*elided*/any;
3054
+ freshTimestamp(): Date;
3055
+ freshTimestampString(): any;
3056
+ } & TGeneric<any, string> & {
3057
+ [x: string]: any;
3058
+ attributes: TGeneric;
3059
+ original: TGeneric;
3060
+ casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
3061
+ changes: TGeneric;
3062
+ appends: any[];
3063
+ setAppends(appends: any[]): /*elided*/any;
3064
+ append(...keys: any[]): /*elided*/any;
3065
+ normalizeCastClassResponse(key: string, value: string): TGeneric;
3066
+ syncOriginal(): /*elided*/any;
3067
+ syncChanges(): /*elided*/any;
3068
+ syncOriginalAttribute(attribute: string): void;
3069
+ syncOriginalAttributes(...attributes: string[]): /*elided*/any;
3070
+ isDirty(...attributes: string[]): boolean;
3071
+ getDirty(): TGeneric;
3072
+ originalIsEquivalent(key: string): boolean;
3073
+ setAttributes(attributes: TGeneric): void;
3074
+ setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
3075
+ getAttributes(): {
3076
+ [x: string]: any;
3077
+ };
3078
+ setAttribute(key: string, value: string): /*elided*/any;
3079
+ getAttribute(key: string): any;
3080
+ castAttribute(key: string, value: string): any;
3081
+ attributesToData(): {
3082
+ [x: string]: any;
3083
+ };
3084
+ mutateAttribute(key: string, value: string | null): any;
3085
+ mutateAttributeForArray(_key: string, _value: string): void;
3086
+ isDateAttribute(key: string): boolean;
3087
+ serializeDate(date?: Date | string | null): string | null;
3088
+ getDates(): any[];
3089
+ getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
3090
+ getCastType(key: string): any;
3091
+ hasCast(key: string, types?: readonly string[]): boolean;
3092
+ withDayjs(date: string): dayjs0.Dayjs;
3093
+ isCustomCast(cast: any): boolean;
3094
+ isCustomDateTimeCast(cast: any): boolean;
3095
+ isDecimalCast(cast: any): boolean;
3096
+ isDateCastable(key: string): boolean;
3097
+ fromDateTime(value: string): string;
3098
+ getDateFormat(): any;
3099
+ asDecimal(value: string, decimals: number): string;
3100
+ asDateTime(value: any): Date | null;
3101
+ asDate(value: string): Date;
3102
+ } & {
3103
+ [x: string]: any;
3104
+ hidden: any[];
3105
+ visible: any[];
3106
+ makeVisible(...keys: string[]): /*elided*/any;
3107
+ makeHidden(key: string[], ...keys: string[]): /*elided*/any;
3108
+ getHidden(): any[];
3109
+ getVisible(): any[];
3110
+ setHidden(hidden: any[]): /*elided*/any;
3111
+ setVisible(visible: any[]): /*elided*/any;
3112
+ } & {
3113
+ [x: string]: any;
3114
+ execHooks(hook: any, options: TGeneric): Promise<any>;
3115
+ } & {
3116
+ [x: string]: any;
3117
+ getGlobalScopes(): {};
3118
+ } & {
3119
+ [x: string]: any;
3120
+ useUniqueIds: boolean;
3121
+ usesUniqueIds(): boolean;
3122
+ uniqueIds(): never[];
3123
+ setUniqueIds(): void;
3124
+ }) | undefined>;
3125
+ push: () => Promise<boolean>;
3126
+ is: (model: (new () => IModel) & IModel & {
3127
+ [x: string]: any;
3128
+ timestamps: boolean;
3129
+ dateFormat: string;
3130
+ usesTimestamps(): boolean;
3131
+ updateTimestamps(): /*elided*/any;
3132
+ getCreatedAtColumn(): any;
3133
+ getUpdatedAtColumn(): any;
3134
+ setCreatedAt(value: any): /*elided*/any;
3135
+ setUpdatedAt(value: any): /*elided*/any;
3136
+ freshTimestamp(): Date;
3137
+ freshTimestampString(): any;
3138
+ } & TGeneric<any, string> & {
3139
+ [x: string]: any;
3140
+ attributes: TGeneric;
3141
+ original: TGeneric;
3142
+ casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
3143
+ changes: TGeneric;
3144
+ appends: any[];
3145
+ setAppends(appends: any[]): /*elided*/any;
3146
+ append(...keys: any[]): /*elided*/any;
3147
+ normalizeCastClassResponse(key: string, value: string): TGeneric;
3148
+ syncOriginal(): /*elided*/any;
3149
+ syncChanges(): /*elided*/any;
3150
+ syncOriginalAttribute(attribute: string): void;
3151
+ syncOriginalAttributes(...attributes: string[]): /*elided*/any;
3152
+ isDirty(...attributes: string[]): boolean;
3153
+ getDirty(): TGeneric;
3154
+ originalIsEquivalent(key: string): boolean;
3155
+ setAttributes(attributes: TGeneric): void;
3156
+ setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
3157
+ getAttributes(): {
3158
+ [x: string]: any;
3159
+ };
3160
+ setAttribute(key: string, value: string): /*elided*/any;
3161
+ getAttribute(key: string): any;
3162
+ castAttribute(key: string, value: string): any;
3163
+ attributesToData(): {
3164
+ [x: string]: any;
3165
+ };
3166
+ mutateAttribute(key: string, value: string | null): any;
3167
+ mutateAttributeForArray(_key: string, _value: string): void;
3168
+ isDateAttribute(key: string): boolean;
3169
+ serializeDate(date?: Date | string | null): string | null;
3170
+ getDates(): any[];
3171
+ getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
3172
+ getCastType(key: string): any;
3173
+ hasCast(key: string, types?: readonly string[]): boolean;
3174
+ withDayjs(date: string): dayjs0.Dayjs;
3175
+ isCustomCast(cast: any): boolean;
3176
+ isCustomDateTimeCast(cast: any): boolean;
3177
+ isDecimalCast(cast: any): boolean;
3178
+ isDateCastable(key: string): boolean;
3179
+ fromDateTime(value: string): string;
3180
+ getDateFormat(): any;
3181
+ asDecimal(value: string, decimals: number): string;
3182
+ asDateTime(value: any): Date | null;
3183
+ asDate(value: string): Date;
3184
+ } & {
3185
+ [x: string]: any;
3186
+ hidden: any[];
3187
+ visible: any[];
3188
+ makeVisible(...keys: string[]): /*elided*/any;
3189
+ makeHidden(key: string[], ...keys: string[]): /*elided*/any;
3190
+ getHidden(): any[];
3191
+ getVisible(): any[];
3192
+ setHidden(hidden: any[]): /*elided*/any;
3193
+ setVisible(visible: any[]): /*elided*/any;
3194
+ } & {
3195
+ [x: string]: any;
3196
+ execHooks(hook: any, options: TGeneric): Promise<any>;
3197
+ } & {
3198
+ [x: string]: any;
3199
+ getGlobalScopes(): {};
3200
+ } & {
3201
+ [x: string]: any;
3202
+ useUniqueIds: boolean;
3203
+ usesUniqueIds(): boolean;
3204
+ uniqueIds(): never[];
3205
+ setUniqueIds(): void;
3206
+ }) => boolean;
3207
+ isNot: (model: (new () => IModel) & IModel & {
3208
+ [x: string]: any;
3209
+ timestamps: boolean;
3210
+ dateFormat: string;
3211
+ usesTimestamps(): boolean;
3212
+ updateTimestamps(): /*elided*/any;
3213
+ getCreatedAtColumn(): any;
3214
+ getUpdatedAtColumn(): any;
3215
+ setCreatedAt(value: any): /*elided*/any;
3216
+ setUpdatedAt(value: any): /*elided*/any;
3217
+ freshTimestamp(): Date;
3218
+ freshTimestampString(): any;
3219
+ } & TGeneric<any, string> & {
3220
+ [x: string]: any;
3221
+ attributes: TGeneric;
3222
+ original: TGeneric;
3223
+ casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
3224
+ changes: TGeneric;
3225
+ appends: any[];
3226
+ setAppends(appends: any[]): /*elided*/any;
3227
+ append(...keys: any[]): /*elided*/any;
3228
+ normalizeCastClassResponse(key: string, value: string): TGeneric;
3229
+ syncOriginal(): /*elided*/any;
3230
+ syncChanges(): /*elided*/any;
3231
+ syncOriginalAttribute(attribute: string): void;
3232
+ syncOriginalAttributes(...attributes: string[]): /*elided*/any;
3233
+ isDirty(...attributes: string[]): boolean;
3234
+ getDirty(): TGeneric;
3235
+ originalIsEquivalent(key: string): boolean;
3236
+ setAttributes(attributes: TGeneric): void;
3237
+ setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
3238
+ getAttributes(): {
3239
+ [x: string]: any;
3240
+ };
3241
+ setAttribute(key: string, value: string): /*elided*/any;
3242
+ getAttribute(key: string): any;
3243
+ castAttribute(key: string, value: string): any;
3244
+ attributesToData(): {
3245
+ [x: string]: any;
3246
+ };
3247
+ mutateAttribute(key: string, value: string | null): any;
3248
+ mutateAttributeForArray(_key: string, _value: string): void;
3249
+ isDateAttribute(key: string): boolean;
3250
+ serializeDate(date?: Date | string | null): string | null;
3251
+ getDates(): any[];
3252
+ getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
3253
+ getCastType(key: string): any;
3254
+ hasCast(key: string, types?: readonly string[]): boolean;
3255
+ withDayjs(date: string): dayjs0.Dayjs;
3256
+ isCustomCast(cast: any): boolean;
3257
+ isCustomDateTimeCast(cast: any): boolean;
3258
+ isDecimalCast(cast: any): boolean;
3259
+ isDateCastable(key: string): boolean;
3260
+ fromDateTime(value: string): string;
3261
+ getDateFormat(): any;
3262
+ asDecimal(value: string, decimals: number): string;
3263
+ asDateTime(value: any): Date | null;
3264
+ asDate(value: string): Date;
3265
+ } & {
3266
+ [x: string]: any;
3267
+ hidden: any[];
3268
+ visible: any[];
3269
+ makeVisible(...keys: string[]): /*elided*/any;
3270
+ makeHidden(key: string[], ...keys: string[]): /*elided*/any;
3271
+ getHidden(): any[];
3272
+ getVisible(): any[];
3273
+ setHidden(hidden: any[]): /*elided*/any;
3274
+ setVisible(visible: any[]): /*elided*/any;
3275
+ } & {
3276
+ [x: string]: any;
3277
+ execHooks(hook: any, options: TGeneric): Promise<any>;
3278
+ } & {
3279
+ [x: string]: any;
3280
+ getGlobalScopes(): {};
3281
+ } & {
3282
+ [x: string]: any;
3283
+ useUniqueIds: boolean;
3284
+ usesUniqueIds(): boolean;
3285
+ uniqueIds(): never[];
3286
+ setUniqueIds(): void;
3287
+ }) => boolean;
3288
+ related: <T extends never>(relation: T) => ReturnTypeOfMethod<(new () => IModel) & IModel & {
3289
+ [x: string]: any;
3290
+ timestamps: boolean;
3291
+ dateFormat: string;
3292
+ usesTimestamps(): boolean;
3293
+ updateTimestamps(): /*elided*/any;
3294
+ getCreatedAtColumn(): any;
3295
+ getUpdatedAtColumn(): any;
3296
+ setCreatedAt(value: any): /*elided*/any;
3297
+ setUpdatedAt(value: any): /*elided*/any;
3298
+ freshTimestamp(): Date;
3299
+ freshTimestampString(): any;
3300
+ } & TGeneric<any, string> & {
3301
+ [x: string]: any;
3302
+ attributes: TGeneric;
3303
+ original: TGeneric;
3304
+ casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
3305
+ changes: TGeneric;
3306
+ appends: any[];
3307
+ setAppends(appends: any[]): /*elided*/any;
3308
+ append(...keys: any[]): /*elided*/any;
3309
+ normalizeCastClassResponse(key: string, value: string): TGeneric;
3310
+ syncOriginal(): /*elided*/any;
3311
+ syncChanges(): /*elided*/any;
3312
+ syncOriginalAttribute(attribute: string): void;
3313
+ syncOriginalAttributes(...attributes: string[]): /*elided*/any;
3314
+ isDirty(...attributes: string[]): boolean;
3315
+ getDirty(): TGeneric;
3316
+ originalIsEquivalent(key: string): boolean;
3317
+ setAttributes(attributes: TGeneric): void;
3318
+ setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
3319
+ getAttributes(): {
3320
+ [x: string]: any;
3321
+ };
3322
+ setAttribute(key: string, value: string): /*elided*/any;
3323
+ getAttribute(key: string): any;
3324
+ castAttribute(key: string, value: string): any;
3325
+ attributesToData(): {
3326
+ [x: string]: any;
3327
+ };
3328
+ mutateAttribute(key: string, value: string | null): any;
3329
+ mutateAttributeForArray(_key: string, _value: string): void;
3330
+ isDateAttribute(key: string): boolean;
3331
+ serializeDate(date?: Date | string | null): string | null;
3332
+ getDates(): any[];
3333
+ getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
3334
+ getCastType(key: string): any;
3335
+ hasCast(key: string, types?: readonly string[]): boolean;
3336
+ withDayjs(date: string): dayjs0.Dayjs;
3337
+ isCustomCast(cast: any): boolean;
3338
+ isCustomDateTimeCast(cast: any): boolean;
3339
+ isDecimalCast(cast: any): boolean;
3340
+ isDateCastable(key: string): boolean;
3341
+ fromDateTime(value: string): string;
3342
+ getDateFormat(): any;
3343
+ asDecimal(value: string, decimals: number): string;
3344
+ asDateTime(value: any): Date | null;
3345
+ asDate(value: string): Date;
3346
+ } & {
3347
+ [x: string]: any;
3348
+ hidden: any[];
3349
+ visible: any[];
3350
+ makeVisible(...keys: string[]): /*elided*/any;
3351
+ makeHidden(key: string[], ...keys: string[]): /*elided*/any;
3352
+ getHidden(): any[];
3353
+ getVisible(): any[];
3354
+ setHidden(hidden: any[]): /*elided*/any;
3355
+ setVisible(visible: any[]): /*elided*/any;
3356
+ } & {
3357
+ [x: string]: any;
3358
+ execHooks(hook: any, options: TGeneric): Promise<any>;
3359
+ } & {
3360
+ [x: string]: any;
3361
+ getGlobalScopes(): {};
3362
+ } & {
3363
+ [x: string]: any;
3364
+ useUniqueIds: boolean;
3365
+ usesUniqueIds(): boolean;
3366
+ uniqueIds(): never[];
3367
+ setUniqueIds(): void;
3368
+ }, `relation${Capitalize<SnakeToCamelCase<T>>}`>;
3369
+ getRelated: <T extends never>(relation: T) => ReturnTypeOfMethod<ReturnTypeOfMethod<(new () => IModel) & IModel & {
3370
+ [x: string]: any;
3371
+ timestamps: boolean;
3372
+ dateFormat: string;
3373
+ usesTimestamps(): boolean;
3374
+ updateTimestamps(): /*elided*/any;
3375
+ getCreatedAtColumn(): any;
3376
+ getUpdatedAtColumn(): any;
3377
+ setCreatedAt(value: any): /*elided*/any;
3378
+ setUpdatedAt(value: any): /*elided*/any;
3379
+ freshTimestamp(): Date;
3380
+ freshTimestampString(): any;
3381
+ } & TGeneric<any, string> & {
3382
+ [x: string]: any;
3383
+ attributes: TGeneric;
3384
+ original: TGeneric;
3385
+ casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
3386
+ changes: TGeneric;
3387
+ appends: any[];
3388
+ setAppends(appends: any[]): /*elided*/any;
3389
+ append(...keys: any[]): /*elided*/any;
3390
+ normalizeCastClassResponse(key: string, value: string): TGeneric;
3391
+ syncOriginal(): /*elided*/any;
3392
+ syncChanges(): /*elided*/any;
3393
+ syncOriginalAttribute(attribute: string): void;
3394
+ syncOriginalAttributes(...attributes: string[]): /*elided*/any;
3395
+ isDirty(...attributes: string[]): boolean;
3396
+ getDirty(): TGeneric;
3397
+ originalIsEquivalent(key: string): boolean;
3398
+ setAttributes(attributes: TGeneric): void;
3399
+ setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
3400
+ getAttributes(): {
3401
+ [x: string]: any;
3402
+ };
3403
+ setAttribute(key: string, value: string): /*elided*/any;
3404
+ getAttribute(key: string): any;
3405
+ castAttribute(key: string, value: string): any;
3406
+ attributesToData(): {
3407
+ [x: string]: any;
3408
+ };
3409
+ mutateAttribute(key: string, value: string | null): any;
3410
+ mutateAttributeForArray(_key: string, _value: string): void;
3411
+ isDateAttribute(key: string): boolean;
3412
+ serializeDate(date?: Date | string | null): string | null;
3413
+ getDates(): any[];
3414
+ getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
3415
+ getCastType(key: string): any;
3416
+ hasCast(key: string, types?: readonly string[]): boolean;
3417
+ withDayjs(date: string): dayjs0.Dayjs;
3418
+ isCustomCast(cast: any): boolean;
3419
+ isCustomDateTimeCast(cast: any): boolean;
3420
+ isDecimalCast(cast: any): boolean;
3421
+ isDateCastable(key: string): boolean;
3422
+ fromDateTime(value: string): string;
3423
+ getDateFormat(): any;
3424
+ asDecimal(value: string, decimals: number): string;
3425
+ asDateTime(value: any): Date | null;
3426
+ asDate(value: string): Date;
3427
+ } & {
3428
+ [x: string]: any;
3429
+ hidden: any[];
3430
+ visible: any[];
3431
+ makeVisible(...keys: string[]): /*elided*/any;
3432
+ makeHidden(key: string[], ...keys: string[]): /*elided*/any;
3433
+ getHidden(): any[];
3434
+ getVisible(): any[];
3435
+ setHidden(hidden: any[]): /*elided*/any;
3436
+ setVisible(visible: any[]): /*elided*/any;
3437
+ } & {
3438
+ [x: string]: any;
3439
+ execHooks(hook: any, options: TGeneric): Promise<any>;
3440
+ } & {
3441
+ [x: string]: any;
3442
+ getGlobalScopes(): {};
3443
+ } & {
3444
+ [x: string]: any;
3445
+ useUniqueIds: boolean;
3446
+ usesUniqueIds(): boolean;
3447
+ uniqueIds(): never[];
3448
+ setUniqueIds(): void;
3449
+ }, `relation${Capitalize<SnakeToCamelCase<T>>}`>, any>;
3450
+ hasOne: <T extends Model>(model: new () => T, foreignKey?: string, localKey?: string) => HasOne<T>;
3451
+ hasMany: <T extends Model>(model: new () => T, foreignKey?: string, localKey?: string) => HasMany<T>;
3452
+ belongsTo: <T extends Model>(model: new () => T, foreignKey?: string, ownerKey?: string, relation?: string) => BelongsTo<T>;
3453
+ belongsToMany: <T extends Model>(model: new () => T, table?: string, foreignPivotKey?: string, relatedPivotKey?: string, parentKey?: string, relatedKey?: string) => BelongsToMany<T>;
3454
+ original: TGeneric;
3455
+ casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
3456
+ changes: TGeneric;
3457
+ appends: any[];
3458
+ normalizeCastClassResponse: (key: string, value: string) => TGeneric;
3459
+ syncOriginal: () => (new () => IModel) & IModel & {
3460
+ [x: string]: any;
3461
+ timestamps: boolean;
3462
+ dateFormat: string;
3463
+ usesTimestamps(): boolean;
3464
+ updateTimestamps(): /*elided*/any;
3465
+ getCreatedAtColumn(): any;
3466
+ getUpdatedAtColumn(): any;
3467
+ setCreatedAt(value: any): /*elided*/any;
3468
+ setUpdatedAt(value: any): /*elided*/any;
3469
+ freshTimestamp(): Date;
3470
+ freshTimestampString(): any;
3471
+ } & TGeneric<any, string> & {
3472
+ [x: string]: any;
3473
+ attributes: TGeneric;
3474
+ original: TGeneric;
3475
+ casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
3476
+ changes: TGeneric;
3477
+ appends: any[];
3478
+ setAppends(appends: any[]): /*elided*/any;
3479
+ append(...keys: any[]): /*elided*/any;
3480
+ normalizeCastClassResponse(key: string, value: string): TGeneric;
3481
+ syncOriginal(): /*elided*/any;
3482
+ syncChanges(): /*elided*/any;
3483
+ syncOriginalAttribute(attribute: string): void;
3484
+ syncOriginalAttributes(...attributes: string[]): /*elided*/any;
3485
+ isDirty(...attributes: string[]): boolean;
3486
+ getDirty(): TGeneric;
3487
+ originalIsEquivalent(key: string): boolean;
3488
+ setAttributes(attributes: TGeneric): void;
3489
+ setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
3490
+ getAttributes(): {
3491
+ [x: string]: any;
3492
+ };
3493
+ setAttribute(key: string, value: string): /*elided*/any;
3494
+ getAttribute(key: string): any;
3495
+ castAttribute(key: string, value: string): any;
3496
+ attributesToData(): {
3497
+ [x: string]: any;
3498
+ };
3499
+ mutateAttribute(key: string, value: string | null): any;
3500
+ mutateAttributeForArray(_key: string, _value: string): void;
3501
+ isDateAttribute(key: string): boolean;
3502
+ serializeDate(date?: Date | string | null): string | null;
3503
+ getDates(): any[];
3504
+ getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
3505
+ getCastType(key: string): any;
3506
+ hasCast(key: string, types?: readonly string[]): boolean;
3507
+ withDayjs(date: string): dayjs0.Dayjs;
3508
+ isCustomCast(cast: any): boolean;
3509
+ isCustomDateTimeCast(cast: any): boolean;
3510
+ isDecimalCast(cast: any): boolean;
3511
+ isDateCastable(key: string): boolean;
3512
+ fromDateTime(value: string): string;
3513
+ getDateFormat(): any;
3514
+ asDecimal(value: string, decimals: number): string;
3515
+ asDateTime(value: any): Date | null;
3516
+ asDate(value: string): Date;
3517
+ } & {
3518
+ [x: string]: any;
3519
+ hidden: any[];
3520
+ visible: any[];
3521
+ makeVisible(...keys: string[]): /*elided*/any;
3522
+ makeHidden(key: string[], ...keys: string[]): /*elided*/any;
3523
+ getHidden(): any[];
3524
+ getVisible(): any[];
3525
+ setHidden(hidden: any[]): /*elided*/any;
3526
+ setVisible(visible: any[]): /*elided*/any;
3527
+ } & {
3528
+ [x: string]: any;
3529
+ execHooks(hook: any, options: TGeneric): Promise<any>;
3530
+ } & {
3531
+ [x: string]: any;
3532
+ getGlobalScopes(): {};
3533
+ } & {
3534
+ [x: string]: any;
3535
+ useUniqueIds: boolean;
3536
+ usesUniqueIds(): boolean;
3537
+ uniqueIds(): never[];
3538
+ setUniqueIds(): void;
3539
+ };
3540
+ syncChanges: () => (new () => IModel) & IModel & {
3541
+ [x: string]: any;
3542
+ timestamps: boolean;
3543
+ dateFormat: string;
3544
+ usesTimestamps(): boolean;
3545
+ updateTimestamps(): /*elided*/any;
3546
+ getCreatedAtColumn(): any;
3547
+ getUpdatedAtColumn(): any;
3548
+ setCreatedAt(value: any): /*elided*/any;
3549
+ setUpdatedAt(value: any): /*elided*/any;
3550
+ freshTimestamp(): Date;
3551
+ freshTimestampString(): any;
3552
+ } & TGeneric<any, string> & {
3553
+ [x: string]: any;
3554
+ attributes: TGeneric;
3555
+ original: TGeneric;
3556
+ casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
3557
+ changes: TGeneric;
3558
+ appends: any[];
3559
+ setAppends(appends: any[]): /*elided*/any;
3560
+ append(...keys: any[]): /*elided*/any;
3561
+ normalizeCastClassResponse(key: string, value: string): TGeneric;
3562
+ syncOriginal(): /*elided*/any;
3563
+ syncChanges(): /*elided*/any;
3564
+ syncOriginalAttribute(attribute: string): void;
3565
+ syncOriginalAttributes(...attributes: string[]): /*elided*/any;
3566
+ isDirty(...attributes: string[]): boolean;
3567
+ getDirty(): TGeneric;
3568
+ originalIsEquivalent(key: string): boolean;
3569
+ setAttributes(attributes: TGeneric): void;
3570
+ setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
3571
+ getAttributes(): {
3572
+ [x: string]: any;
3573
+ };
3574
+ setAttribute(key: string, value: string): /*elided*/any;
3575
+ getAttribute(key: string): any;
3576
+ castAttribute(key: string, value: string): any;
3577
+ attributesToData(): {
3578
+ [x: string]: any;
3579
+ };
3580
+ mutateAttribute(key: string, value: string | null): any;
3581
+ mutateAttributeForArray(_key: string, _value: string): void;
3582
+ isDateAttribute(key: string): boolean;
3583
+ serializeDate(date?: Date | string | null): string | null;
3584
+ getDates(): any[];
3585
+ getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
3586
+ getCastType(key: string): any;
3587
+ hasCast(key: string, types?: readonly string[]): boolean;
3588
+ withDayjs(date: string): dayjs0.Dayjs;
3589
+ isCustomCast(cast: any): boolean;
3590
+ isCustomDateTimeCast(cast: any): boolean;
3591
+ isDecimalCast(cast: any): boolean;
3592
+ isDateCastable(key: string): boolean;
3593
+ fromDateTime(value: string): string;
3594
+ getDateFormat(): any;
3595
+ asDecimal(value: string, decimals: number): string;
3596
+ asDateTime(value: any): Date | null;
3597
+ asDate(value: string): Date;
3598
+ } & {
3599
+ [x: string]: any;
3600
+ hidden: any[];
3601
+ visible: any[];
3602
+ makeVisible(...keys: string[]): /*elided*/any;
3603
+ makeHidden(key: string[], ...keys: string[]): /*elided*/any;
3604
+ getHidden(): any[];
3605
+ getVisible(): any[];
3606
+ setHidden(hidden: any[]): /*elided*/any;
3607
+ setVisible(visible: any[]): /*elided*/any;
3608
+ } & {
3609
+ [x: string]: any;
3610
+ execHooks(hook: any, options: TGeneric): Promise<any>;
3611
+ } & {
3612
+ [x: string]: any;
3613
+ getGlobalScopes(): {};
3614
+ } & {
3615
+ [x: string]: any;
3616
+ useUniqueIds: boolean;
3617
+ usesUniqueIds(): boolean;
3618
+ uniqueIds(): never[];
3619
+ setUniqueIds(): void;
3620
+ };
3621
+ syncOriginalAttribute: (attribute: string) => void;
3622
+ syncOriginalAttributes: (...attributes: string[]) => (new () => IModel) & IModel & {
3623
+ [x: string]: any;
3624
+ timestamps: boolean;
3625
+ dateFormat: string;
3626
+ usesTimestamps(): boolean;
3627
+ updateTimestamps(): /*elided*/any;
3628
+ getCreatedAtColumn(): any;
3629
+ getUpdatedAtColumn(): any;
3630
+ setCreatedAt(value: any): /*elided*/any;
3631
+ setUpdatedAt(value: any): /*elided*/any;
3632
+ freshTimestamp(): Date;
3633
+ freshTimestampString(): any;
3634
+ } & TGeneric<any, string> & {
3635
+ [x: string]: any;
3636
+ attributes: TGeneric;
3637
+ original: TGeneric;
3638
+ casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
3639
+ changes: TGeneric;
3640
+ appends: any[];
3641
+ setAppends(appends: any[]): /*elided*/any;
3642
+ append(...keys: any[]): /*elided*/any;
3643
+ normalizeCastClassResponse(key: string, value: string): TGeneric;
3644
+ syncOriginal(): /*elided*/any;
3645
+ syncChanges(): /*elided*/any;
3646
+ syncOriginalAttribute(attribute: string): void;
3647
+ syncOriginalAttributes(...attributes: string[]): /*elided*/any;
3648
+ isDirty(...attributes: string[]): boolean;
3649
+ getDirty(): TGeneric;
3650
+ originalIsEquivalent(key: string): boolean;
3651
+ setAttributes(attributes: TGeneric): void;
3652
+ setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
3653
+ getAttributes(): {
3654
+ [x: string]: any;
3655
+ };
3656
+ setAttribute(key: string, value: string): /*elided*/any;
3657
+ getAttribute(key: string): any;
3658
+ castAttribute(key: string, value: string): any;
3659
+ attributesToData(): {
3660
+ [x: string]: any;
3661
+ };
3662
+ mutateAttribute(key: string, value: string | null): any;
3663
+ mutateAttributeForArray(_key: string, _value: string): void;
3664
+ isDateAttribute(key: string): boolean;
3665
+ serializeDate(date?: Date | string | null): string | null;
3666
+ getDates(): any[];
3667
+ getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
3668
+ getCastType(key: string): any;
3669
+ hasCast(key: string, types?: readonly string[]): boolean;
3670
+ withDayjs(date: string): dayjs0.Dayjs;
3671
+ isCustomCast(cast: any): boolean;
3672
+ isCustomDateTimeCast(cast: any): boolean;
3673
+ isDecimalCast(cast: any): boolean;
3674
+ isDateCastable(key: string): boolean;
3675
+ fromDateTime(value: string): string;
3676
+ getDateFormat(): any;
3677
+ asDecimal(value: string, decimals: number): string;
3678
+ asDateTime(value: any): Date | null;
3679
+ asDate(value: string): Date;
3680
+ } & {
3681
+ [x: string]: any;
3682
+ hidden: any[];
3683
+ visible: any[];
3684
+ makeVisible(...keys: string[]): /*elided*/any;
3685
+ makeHidden(key: string[], ...keys: string[]): /*elided*/any;
3686
+ getHidden(): any[];
3687
+ getVisible(): any[];
3688
+ setHidden(hidden: any[]): /*elided*/any;
3689
+ setVisible(visible: any[]): /*elided*/any;
3690
+ } & {
3691
+ [x: string]: any;
3692
+ execHooks(hook: any, options: TGeneric): Promise<any>;
3693
+ } & {
3694
+ [x: string]: any;
3695
+ getGlobalScopes(): {};
3696
+ } & {
3697
+ [x: string]: any;
3698
+ useUniqueIds: boolean;
3699
+ usesUniqueIds(): boolean;
3700
+ uniqueIds(): never[];
3701
+ setUniqueIds(): void;
3702
+ };
3703
+ originalIsEquivalent: (key: string) => boolean;
3704
+ setAttributes: (attributes: TGeneric) => void;
3705
+ setRawAttributes: (attributes: TGeneric, sync?: boolean) => (new () => IModel) & IModel & {
3706
+ [x: string]: any;
3707
+ timestamps: boolean;
3708
+ dateFormat: string;
3709
+ usesTimestamps(): boolean;
3710
+ updateTimestamps(): /*elided*/any;
3711
+ getCreatedAtColumn(): any;
3712
+ getUpdatedAtColumn(): any;
3713
+ setCreatedAt(value: any): /*elided*/any;
3714
+ setUpdatedAt(value: any): /*elided*/any;
3715
+ freshTimestamp(): Date;
3716
+ freshTimestampString(): any;
3717
+ } & TGeneric<any, string> & {
3718
+ [x: string]: any;
3719
+ attributes: TGeneric;
3720
+ original: TGeneric;
3721
+ casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
3722
+ changes: TGeneric;
3723
+ appends: any[];
3724
+ setAppends(appends: any[]): /*elided*/any;
3725
+ append(...keys: any[]): /*elided*/any;
3726
+ normalizeCastClassResponse(key: string, value: string): TGeneric;
3727
+ syncOriginal(): /*elided*/any;
3728
+ syncChanges(): /*elided*/any;
3729
+ syncOriginalAttribute(attribute: string): void;
3730
+ syncOriginalAttributes(...attributes: string[]): /*elided*/any;
3731
+ isDirty(...attributes: string[]): boolean;
3732
+ getDirty(): TGeneric;
3733
+ originalIsEquivalent(key: string): boolean;
3734
+ setAttributes(attributes: TGeneric): void;
3735
+ setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
3736
+ getAttributes(): {
3737
+ [x: string]: any;
3738
+ };
3739
+ setAttribute(key: string, value: string): /*elided*/any;
3740
+ getAttribute(key: string): any;
3741
+ castAttribute(key: string, value: string): any;
3742
+ attributesToData(): {
3743
+ [x: string]: any;
3744
+ };
3745
+ mutateAttribute(key: string, value: string | null): any;
3746
+ mutateAttributeForArray(_key: string, _value: string): void;
3747
+ isDateAttribute(key: string): boolean;
3748
+ serializeDate(date?: Date | string | null): string | null;
3749
+ getDates(): any[];
3750
+ getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
3751
+ getCastType(key: string): any;
3752
+ hasCast(key: string, types?: readonly string[]): boolean;
3753
+ withDayjs(date: string): dayjs0.Dayjs;
3754
+ isCustomCast(cast: any): boolean;
3755
+ isCustomDateTimeCast(cast: any): boolean;
3756
+ isDecimalCast(cast: any): boolean;
3757
+ isDateCastable(key: string): boolean;
3758
+ fromDateTime(value: string): string;
3759
+ getDateFormat(): any;
3760
+ asDecimal(value: string, decimals: number): string;
3761
+ asDateTime(value: any): Date | null;
3762
+ asDate(value: string): Date;
3763
+ } & {
3764
+ [x: string]: any;
3765
+ hidden: any[];
3766
+ visible: any[];
3767
+ makeVisible(...keys: string[]): /*elided*/any;
3768
+ makeHidden(key: string[], ...keys: string[]): /*elided*/any;
3769
+ getHidden(): any[];
3770
+ getVisible(): any[];
3771
+ setHidden(hidden: any[]): /*elided*/any;
3772
+ setVisible(visible: any[]): /*elided*/any;
3773
+ } & {
3774
+ [x: string]: any;
3775
+ execHooks(hook: any, options: TGeneric): Promise<any>;
3776
+ } & {
3777
+ [x: string]: any;
3778
+ getGlobalScopes(): {};
3779
+ } & {
3780
+ [x: string]: any;
3781
+ useUniqueIds: boolean;
3782
+ usesUniqueIds(): boolean;
3783
+ uniqueIds(): never[];
3784
+ setUniqueIds(): void;
3785
+ };
3786
+ castAttribute: (key: string, value: string) => any;
3787
+ mutateAttribute: (key: string, value: string | null) => any;
3788
+ mutateAttributeForArray: (_key: string, _value: string) => void;
3789
+ isDateAttribute: (key: string) => boolean;
3790
+ getCasts: () => TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
3791
+ getCastType: (key: string) => any;
3792
+ hasCast: (key: string, types?: readonly string[]) => boolean;
3793
+ withDayjs: (date: string) => dayjs0.Dayjs;
3794
+ isCustomCast: (cast: any) => boolean;
3795
+ isCustomDateTimeCast: (cast: any) => boolean;
3796
+ isDecimalCast: (cast: any) => boolean;
3797
+ isDateCastable: (key: string) => boolean;
3798
+ asDecimal: (value: string, decimals: number) => string;
3799
+ asDateTime: (value: any) => Date | null;
3800
+ asDate: (value: string) => Date;
3801
+ getHidden: () => any[];
3802
+ getVisible: () => any[];
3803
+ setHidden: (hidden: any[]) => (new () => IModel) & IModel & {
3804
+ [x: string]: any;
3805
+ timestamps: boolean;
3806
+ dateFormat: string;
3807
+ usesTimestamps(): boolean;
3808
+ updateTimestamps(): /*elided*/any;
3809
+ getCreatedAtColumn(): any;
3810
+ getUpdatedAtColumn(): any;
3811
+ setCreatedAt(value: any): /*elided*/any;
3812
+ setUpdatedAt(value: any): /*elided*/any;
3813
+ freshTimestamp(): Date;
3814
+ freshTimestampString(): any;
3815
+ } & TGeneric<any, string> & {
3816
+ [x: string]: any;
3817
+ attributes: TGeneric;
3818
+ original: TGeneric;
3819
+ casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
3820
+ changes: TGeneric;
3821
+ appends: any[];
3822
+ setAppends(appends: any[]): /*elided*/any;
3823
+ append(...keys: any[]): /*elided*/any;
3824
+ normalizeCastClassResponse(key: string, value: string): TGeneric;
3825
+ syncOriginal(): /*elided*/any;
3826
+ syncChanges(): /*elided*/any;
3827
+ syncOriginalAttribute(attribute: string): void;
3828
+ syncOriginalAttributes(...attributes: string[]): /*elided*/any;
3829
+ isDirty(...attributes: string[]): boolean;
3830
+ getDirty(): TGeneric;
3831
+ originalIsEquivalent(key: string): boolean;
3832
+ setAttributes(attributes: TGeneric): void;
3833
+ setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
3834
+ getAttributes(): {
3835
+ [x: string]: any;
3836
+ };
3837
+ setAttribute(key: string, value: string): /*elided*/any;
3838
+ getAttribute(key: string): any;
3839
+ castAttribute(key: string, value: string): any;
3840
+ attributesToData(): {
3841
+ [x: string]: any;
3842
+ };
3843
+ mutateAttribute(key: string, value: string | null): any;
3844
+ mutateAttributeForArray(_key: string, _value: string): void;
3845
+ isDateAttribute(key: string): boolean;
3846
+ serializeDate(date?: Date | string | null): string | null;
3847
+ getDates(): any[];
3848
+ getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
3849
+ getCastType(key: string): any;
3850
+ hasCast(key: string, types?: readonly string[]): boolean;
3851
+ withDayjs(date: string): dayjs0.Dayjs;
3852
+ isCustomCast(cast: any): boolean;
3853
+ isCustomDateTimeCast(cast: any): boolean;
3854
+ isDecimalCast(cast: any): boolean;
3855
+ isDateCastable(key: string): boolean;
3856
+ fromDateTime(value: string): string;
3857
+ getDateFormat(): any;
3858
+ asDecimal(value: string, decimals: number): string;
3859
+ asDateTime(value: any): Date | null;
3860
+ asDate(value: string): Date;
3861
+ } & {
3862
+ [x: string]: any;
3863
+ hidden: any[];
3864
+ visible: any[];
3865
+ makeVisible(...keys: string[]): /*elided*/any;
3866
+ makeHidden(key: string[], ...keys: string[]): /*elided*/any;
3867
+ getHidden(): any[];
3868
+ getVisible(): any[];
3869
+ setHidden(hidden: any[]): /*elided*/any;
3870
+ setVisible(visible: any[]): /*elided*/any;
3871
+ } & {
3872
+ [x: string]: any;
3873
+ execHooks(hook: any, options: TGeneric): Promise<any>;
3874
+ } & {
3875
+ [x: string]: any;
3876
+ getGlobalScopes(): {};
3877
+ } & {
3878
+ [x: string]: any;
3879
+ useUniqueIds: boolean;
3880
+ usesUniqueIds(): boolean;
3881
+ uniqueIds(): never[];
3882
+ setUniqueIds(): void;
3883
+ };
3884
+ setVisible: (visible: any[]) => (new () => IModel) & IModel & {
3885
+ [x: string]: any;
3886
+ timestamps: boolean;
3887
+ dateFormat: string;
3888
+ usesTimestamps(): boolean;
3889
+ updateTimestamps(): /*elided*/any;
3890
+ getCreatedAtColumn(): any;
3891
+ getUpdatedAtColumn(): any;
3892
+ setCreatedAt(value: any): /*elided*/any;
3893
+ setUpdatedAt(value: any): /*elided*/any;
3894
+ freshTimestamp(): Date;
3895
+ freshTimestampString(): any;
3896
+ } & TGeneric<any, string> & {
3897
+ [x: string]: any;
3898
+ attributes: TGeneric;
3899
+ original: TGeneric;
3900
+ casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
3901
+ changes: TGeneric;
3902
+ appends: any[];
3903
+ setAppends(appends: any[]): /*elided*/any;
3904
+ append(...keys: any[]): /*elided*/any;
3905
+ normalizeCastClassResponse(key: string, value: string): TGeneric;
3906
+ syncOriginal(): /*elided*/any;
3907
+ syncChanges(): /*elided*/any;
3908
+ syncOriginalAttribute(attribute: string): void;
3909
+ syncOriginalAttributes(...attributes: string[]): /*elided*/any;
3910
+ isDirty(...attributes: string[]): boolean;
3911
+ getDirty(): TGeneric;
3912
+ originalIsEquivalent(key: string): boolean;
3913
+ setAttributes(attributes: TGeneric): void;
3914
+ setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
3915
+ getAttributes(): {
3916
+ [x: string]: any;
3917
+ };
3918
+ setAttribute(key: string, value: string): /*elided*/any;
3919
+ getAttribute(key: string): any;
3920
+ castAttribute(key: string, value: string): any;
3921
+ attributesToData(): {
3922
+ [x: string]: any;
3923
+ };
3924
+ mutateAttribute(key: string, value: string | null): any;
3925
+ mutateAttributeForArray(_key: string, _value: string): void;
3926
+ isDateAttribute(key: string): boolean;
3927
+ serializeDate(date?: Date | string | null): string | null;
3928
+ getDates(): any[];
3929
+ getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
3930
+ getCastType(key: string): any;
3931
+ hasCast(key: string, types?: readonly string[]): boolean;
3932
+ withDayjs(date: string): dayjs0.Dayjs;
3933
+ isCustomCast(cast: any): boolean;
3934
+ isCustomDateTimeCast(cast: any): boolean;
3935
+ isDecimalCast(cast: any): boolean;
3936
+ isDateCastable(key: string): boolean;
3937
+ fromDateTime(value: string): string;
3938
+ getDateFormat(): any;
3939
+ asDecimal(value: string, decimals: number): string;
3940
+ asDateTime(value: any): Date | null;
3941
+ asDate(value: string): Date;
3942
+ } & {
3943
+ [x: string]: any;
3944
+ hidden: any[];
3945
+ visible: any[];
3946
+ makeVisible(...keys: string[]): /*elided*/any;
3947
+ makeHidden(key: string[], ...keys: string[]): /*elided*/any;
3948
+ getHidden(): any[];
3949
+ getVisible(): any[];
3950
+ setHidden(hidden: any[]): /*elided*/any;
3951
+ setVisible(visible: any[]): /*elided*/any;
3952
+ } & {
3953
+ [x: string]: any;
3954
+ execHooks(hook: any, options: TGeneric): Promise<any>;
3955
+ } & {
3956
+ [x: string]: any;
3957
+ getGlobalScopes(): {};
3958
+ } & {
3959
+ [x: string]: any;
3960
+ useUniqueIds: boolean;
3961
+ usesUniqueIds(): boolean;
3962
+ uniqueIds(): never[];
3963
+ setUniqueIds(): void;
3964
+ };
3965
+ execHooks: (hook: any, options: TGeneric) => Promise<any>;
3966
+ getGlobalScopes: () => {};
3967
+ useUniqueIds: boolean;
527
3968
  };
528
3969
  declare class Model extends BaseModel$1 {
529
- protected primaryKey: string;
3970
+ [key: string]: any;
530
3971
  protected builder: IBuilder<any, any> | null;
531
3972
  protected table: string | null;
532
3973
  protected keyType: string;
533
3974
  protected incrementing: boolean;
534
3975
  protected withCount: never[];
3976
+ protected primaryKey: string;
535
3977
  perPage: number;
536
3978
  static globalScopes: {};
537
3979
  static pluginInitializers: {};
@@ -541,6 +3983,7 @@ declare class Model extends BaseModel$1 {
541
3983
  eagerLoad: {};
542
3984
  exists: boolean;
543
3985
  with: string | string[] | TGeneric<(...args: any[]) => IBuilder<Model>>;
3986
+ name: any;
544
3987
  trx: null;
545
3988
  constructor(attributes?: {});
546
3989
  static query(trx?: null): Builder<Model, IModel | ICollection<Model>>;
@@ -638,7 +4081,7 @@ type ReturnTypeOfMethod<T, K extends keyof T> = T[K] extends ((...args: any[]) =
638
4081
  type SnakeToCamelCase<S extends string> = S extends `${infer T}_${infer U}` ? `${T}${Capitalize<SnakeToCamelCase<U>>}` : S;
639
4082
  type CamelToSnakeCase<S extends string> = S extends `${infer T}${infer U}` ? U extends Uncapitalize<U> ? `${Uncapitalize<T>}${CamelToSnakeCase<U>}` : `${Uncapitalize<T>}_${CamelToSnakeCase<U>}` : S;
640
4083
  type FunctionPropertyNames<T> = { [K in keyof T]: T[K] extends ((...args: any[]) => any) ? K : never }[keyof T];
641
- type RelationNames<T> = FunctionPropertyNames<T> extends infer R ? R extends `relation${infer P}` ? P extends ('sToData' | 'loaded') ? never : CamelToSnakeCase<P> : never : never;
4084
+ type RelationNames<T> = FunctionPropertyNames<T> extends infer R ? R extends `relation${infer P}` ? P extends 'sToData' | 'loaded' ? never : CamelToSnakeCase<P> : never : never;
642
4085
  type MixinConstructor<T = TGeneric> = new (...args: any[]) => T;
643
4086
  //#endregion
644
4087
  //#region src/browser/collection.d.ts
@@ -782,6 +4225,7 @@ interface IPaginatorParams {
782
4225
  total: number;
783
4226
  last_page: number;
784
4227
  count: number;
4228
+ paginated?: boolean;
785
4229
  }
786
4230
  interface IPaginator<T extends Model | Model$1, K extends IPaginatorParams = IPaginatorParams> {
787
4231
  formatter?(paginator: IPaginator<any>): any | null;
@@ -810,13 +4254,22 @@ interface IPaginator<T extends Model | Model$1, K extends IPaginatorParams = IPa
810
4254
  }
811
4255
  //#endregion
812
4256
  //#region types/builder.d.ts
4257
+ type BaseBuilder<M extends Model | Model$1, R = ICollection<M> | IModel> = Omit<IQueryBuilder<M, R>, 'destroy' | 'clone' | 'get' | 'skip' | 'limit' | 'take' | 'offset' | 'chunk' | 'forPage' | 'orWhere' | 'pluck'>;
813
4258
  interface IScope {
814
4259
  apply(builder: Builder<any>, model: Model): void;
815
4260
  }
816
- interface IBuilder<M extends Model | Model$1, R = ICollection<M> | IModel> extends IQueryBuilder<M, R> {
4261
+ interface IBuilder<M extends Model | Model$1, R = ICollection<M> | IModel> extends BaseBuilder<M, R> {
4262
+ connector: IQueryBuilder<M, R> & Knex.QueryBuilder & {
4263
+ _statements: any[];
4264
+ _single: any;
4265
+ } & Knex;
817
4266
  asProxy(): IQueryBuilder<M, R>;
4267
+ chunk(count: number, callback: (rows: ICollection<M>) => any): Promise<boolean>;
818
4268
  enforceOrderBy(): void;
819
- insert(attributes: any): Promise<any>;
4269
+ idOf(id: string | number): this;
4270
+ clone(): IBuilder<M, R>;
4271
+ forPage(page: number, perPage?: number): this;
4272
+ insert(...attributes: any[]): Promise<any>;
820
4273
  update(attributes: any): Promise<any>;
821
4274
  increment(column: string, amount?: number, extra?: any): Promise<any>;
822
4275
  decrement(column: string, amount?: number, extra?: any): Promise<any>;
@@ -847,6 +4300,7 @@ interface IBuilder<M extends Model | Model$1, R = ICollection<M> | IModel> exten
847
4300
  doesntHave(relation: string, boolean?: any, callback?: (builder: IBuilder<any>) => void | null): this;
848
4301
  orDoesntHave(relation: string): this;
849
4302
  whereHas(relation: string, callback?: (builder: IBuilder<any>) => void | IBuilder<any> | null, operator?: any, count?: number): this;
4303
+ orWhere(...args: any[]): this;
850
4304
  orWhereHas(relation: string, callback?: (builder: IBuilder<any>) => void | IBuilder<any> | null, operator?: any, count?: number): this;
851
4305
  whereRelation(relation: string, column: string, operator?: any, value?: any): this;
852
4306
  hasNested(relation: string, operator?: any, count?: number, boolean?: any, callback?: (builder: IBuilder<any>) => void | null): this;
@@ -861,6 +4315,10 @@ interface IBuilder<M extends Model | Model$1, R = ICollection<M> | IModel> exten
861
4315
  withSum(relation: WithRelationType, column: string): this;
862
4316
  withExists(relation: WithRelationType): this;
863
4317
  related(relation: string): this;
4318
+ take(count: number): this;
4319
+ skip(count: number): this;
4320
+ limit(count: number): this;
4321
+ offset(count: number): this;
864
4322
  first(column?: string | string[]): Promise<M | null | undefined>;
865
4323
  firstOrFail(column?: string | string[]): Promise<M>;
866
4324
  findOrFail(key: string | number, columns?: string[]): Promise<M>;
@@ -875,6 +4333,8 @@ interface IBuilder<M extends Model | Model$1, R = ICollection<M> | IModel> exten
875
4333
  find(key: string | number, columns?: string[]): Promise<M | null | undefined>;
876
4334
  findMany(keys: string[] | number[] | ICollection<any>, columns?: string[]): Promise<ICollection<M>>;
877
4335
  pluck<X extends Model = any | M>(column: string): Promise<ICollection<X>>;
4336
+ destroy(ids?: string | number | string[] | number[] | TFunction | ICollection<any>): Promise<number>;
4337
+ get(columns?: string[]): Promise<ICollection<M>>;
878
4338
  all(columns?: string[]): Promise<ICollection<M>>;
879
4339
  paginate<F extends IPaginatorParams>(page?: number, perPage?: number): Promise<IPaginator<M, F>>;
880
4340
  [value: string]: any;
@@ -961,6 +4421,23 @@ interface OrderByMethod<QB extends AnyQueryBuilder> {
961
4421
  interface WhereJsonExpressionMethod<QB extends AnyQueryBuilder> {
962
4422
  (fieldExpression: FieldExpression, keys: string | string[]): QB;
963
4423
  }
4424
+ interface ReturningMethod<QB extends AnyQueryBuilder> {
4425
+ (key: FieldExpression | FieldExpression[], options?: {
4426
+ [key: string]: any;
4427
+ }): QB;
4428
+ }
4429
+ interface FirstOrFailMethod<QB extends AnyQueryBuilder> {
4430
+ (): Promise<QB>;
4431
+ }
4432
+ interface AddSelectMethod<QB extends AnyQueryBuilder> {
4433
+ (params: string[]): QB;
4434
+ }
4435
+ interface ForceDeleteMethod {
4436
+ (): Promise<boolean | number>;
4437
+ }
4438
+ interface RestoreMethod {
4439
+ (): Promise<number>;
4440
+ }
964
4441
  interface WhereColumnMethod<QB extends AnyQueryBuilder> {
965
4442
  (col1: ColumnRef, op: Operator, col2: ColumnRef): QB;
966
4443
  (col1: ColumnRef, col2: ColumnRef): QB;
@@ -1089,17 +4566,22 @@ interface IStatement {
1089
4566
  bool: 'and' | 'or' | 'not';
1090
4567
  }
1091
4568
  interface IQueryBuilder<M extends Model | Model$1 = Model, R = M[] | M> {
4569
+ query: IBuilder<M, R>;
1092
4570
  schema: SchemaBuilder;
1093
4571
  _statements: IStatement[];
1094
4572
  table(name: string): IQueryBuilder<M, R>;
1095
4573
  select: SelectMethod<this>;
4574
+ addSelect: AddSelectMethod<this>;
1096
4575
  columns: SelectMethod<this>;
1097
4576
  column: SelectMethod<this>;
1098
4577
  distinct: SelectMethod<this>;
4578
+ returning: ReturningMethod<this>;
1099
4579
  distinctOn: SelectMethod<this>;
1100
4580
  as: AsMethod<this>;
1101
4581
  asProxy(): IQueryBuilder<M, R>;
1102
4582
  where: WhereMethod<this>;
4583
+ firstOrFail: FirstOrFailMethod<this>;
4584
+ forceDelete: ForceDeleteMethod;
1103
4585
  andWhere: WhereMethod<this>;
1104
4586
  orWhere(...args: any[]): this;
1105
4587
  whereNot: WhereMethod<this>;
@@ -1114,6 +4596,7 @@ interface IQueryBuilder<M extends Model | Model$1 = Model, R = M[] | M> {
1114
4596
  orWhereExists: WhereExistsMethod<this>;
1115
4597
  whereNotExists: WhereExistsMethod<this>;
1116
4598
  orWhereNotExists: WhereExistsMethod<this>;
4599
+ restore: RestoreMethod;
1117
4600
  whereIn: WhereInMethod<this>;
1118
4601
  orWhereIn: WhereInMethod<this>;
1119
4602
  whereNotIn: WhereInMethod<this>;
@@ -1233,9 +4716,9 @@ declare class QueryBuilder<M extends Model = Model, R = M[] | M> extends Inferen
1233
4716
  skip(this: any, ...args: any[]): any;
1234
4717
  take(this: any, ...args: any[]): any;
1235
4718
  chunk(count: number, callback: TFunction): Promise<boolean>;
1236
- paginate<F extends IPaginatorParams>(this: any, page?: number, perPage?: number): Promise<IPaginator<M, F>>;
4719
+ paginate<F extends IPaginatorParams>(this: any, page: number | undefined, perPage: number | undefined, _pageName: string, _page: number): Promise<IPaginator<M, F>>;
1237
4720
  forPage(this: any, page?: number, perPage?: number): any;
1238
- toSQL(...args: Parameters<typeof (void 0).connector.toSQL>): Knex.Sql;
4721
+ toSQL(...args: Parameters<typeof this.connector.toSQL>): Knex.Sql;
1239
4722
  count(column: string): Promise<number>;
1240
4723
  min(column: string): Promise<number>;
1241
4724
  max(column: string): Promise<number>;
@@ -1243,9 +4726,9 @@ declare class QueryBuilder<M extends Model = Model, R = M[] | M> extends Inferen
1243
4726
  avg(column: string): Promise<number>;
1244
4727
  clone(): IQueryBuilder<M, R>;
1245
4728
  delete(): Promise<number | boolean>;
1246
- insert(...args: Parameters<typeof (void 0).connector.insert>): Promise<unknown>;
1247
- update(...args: Parameters<typeof (void 0).connector.update>): Promise<number>;
1248
- destroy(...args: Parameters<typeof (void 0).connector.destroy>): Promise<number>;
4729
+ insert(...args: Parameters<typeof this.connector.insert>): Promise<unknown>;
4730
+ update(...args: Parameters<typeof this.connector.update>): Promise<number>;
4731
+ destroy(...args: Parameters<typeof this.connector.destroy>): Promise<number>;
1249
4732
  get _statements(): IStatement[] & any[];
1250
4733
  get _single(): any;
1251
4734
  get from(): Knex.Table<any, any> & Knex.Table<any, any[]>;
@@ -1460,7 +4943,7 @@ declare class MigrationCreator {
1460
4943
  * @param create
1461
4944
  * @returns
1462
4945
  */
1463
- create(name: string, dir: string, table: string, create?: boolean): Promise<string>;
4946
+ create(name: string, dir: string, table?: string, create?: boolean): Promise<string>;
1464
4947
  /**
1465
4948
  * Publish migrations from third party vendors
1466
4949
  *
@@ -1468,11 +4951,11 @@ declare class MigrationCreator {
1468
4951
  * @param callback
1469
4952
  */
1470
4953
  publish(dir: string, callback?: (name: string, source: string, dest: string) => void): Promise<void>;
1471
- getStub(table?: string, create?: boolean): string;
1472
- populateStub(stub: string, table: string): string;
4954
+ getStub(table?: string, create?: boolean): Promise<string>;
4955
+ populateStub(stub: string, table?: string): string;
1473
4956
  getClassName(name: string): string;
1474
4957
  getPath(name: string, dir: string): string;
1475
- firePostCreateHooks(table: string, filePath: string): Promise<void>;
4958
+ firePostCreateHooks(table: string | undefined, filePath: string): Promise<void>;
1476
4959
  afterCreate(callback: TFunction): void;
1477
4960
  ensureDirectoryExists(dir: string): Promise<void>;
1478
4961
  stubPath(stub?: string): string;