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