@h3ravel/arquebus 0.6.6 → 0.6.7

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 (47) hide show
  1. package/README.md +5 -4
  2. package/package.json +4 -3
  3. package/bin/index.cjs +0 -5927
  4. package/bin/index.d.cts +0 -1
  5. package/bin/index.d.ts +0 -1
  6. package/bin/index.js +0 -5925
  7. package/bin/seeders-8GJzfIIN.js +0 -3
  8. package/bin/seeders-ByeSoCAQ.cjs +0 -131
  9. package/bin/seeders-CltigymO.js +0 -79
  10. package/bin/seeders-_xJ6VGVS.cjs +0 -3
  11. package/dist/browser/index.cjs +0 -1271
  12. package/dist/browser/index.d.cts +0 -4932
  13. package/dist/browser/index.d.ts +0 -4932
  14. package/dist/browser/index.js +0 -1218
  15. package/dist/index.cjs +0 -5713
  16. package/dist/index.d.cts +0 -5129
  17. package/dist/index.d.ts +0 -5129
  18. package/dist/index.js +0 -5644
  19. package/dist/inspector/index.cjs +0 -4908
  20. package/dist/inspector/index.d.cts +0 -83
  21. package/dist/inspector/index.d.ts +0 -83
  22. package/dist/inspector/index.js +0 -4881
  23. package/dist/migrations/chunk-PECeCxCb.js +0 -15
  24. package/dist/migrations/index.cjs +0 -5470
  25. package/dist/migrations/index.d.cts +0 -4965
  26. package/dist/migrations/index.d.ts +0 -4962
  27. package/dist/migrations/index.js +0 -5419
  28. package/dist/migrations/stubs/migration-js.stub +0 -21
  29. package/dist/migrations/stubs/migration-ts.stub +0 -18
  30. package/dist/migrations/stubs/migration.create-js.stub +0 -24
  31. package/dist/migrations/stubs/migration.create-ts.stub +0 -21
  32. package/dist/migrations/stubs/migration.update-js.stub +0 -25
  33. package/dist/migrations/stubs/migration.update-ts.stub +0 -22
  34. package/dist/seeders/index.cjs +0 -141
  35. package/dist/seeders/index.d.cts +0 -4766
  36. package/dist/seeders/index.d.ts +0 -4766
  37. package/dist/seeders/index.js +0 -118
  38. package/dist/seeders/index.ts +0 -3
  39. package/dist/seeders/runner.ts +0 -101
  40. package/dist/seeders/seeder-creator.ts +0 -42
  41. package/dist/seeders/seeder.ts +0 -10
  42. package/dist/stubs/arquebus.config-js.stub +0 -25
  43. package/dist/stubs/arquebus.config-ts.stub +0 -24
  44. package/dist/stubs/model-js.stub +0 -5
  45. package/dist/stubs/model-ts.stub +0 -5
  46. package/dist/stubs/seeder-js.stub +0 -13
  47. package/dist/stubs/seeder-ts.stub +0 -9
@@ -1,4932 +0,0 @@
1
- import { Collection as Collection$1 } from "collect.js";
2
- import * as dayjs0 from "dayjs";
3
- import Knex$1, { Knex } from "knex";
4
-
5
- //#region src/browser/collection.d.ts
6
- declare class Collection<I extends Model> extends Collection$1<I> {
7
- mapThen(callback: TFunction): Promise<any[]>;
8
- modelKeys(): any[];
9
- contains<K, V>(key: keyof I | K | TFunction, value?: V): boolean;
10
- diff(items: ICollection<any> | any[]): any;
11
- except(keys: any[]): any;
12
- intersect(items: I[]): any;
13
- unique(key?: TFunction | keyof I, _strict?: boolean): any;
14
- find(key: any, defaultValue?: null): any;
15
- makeVisible(attributes: any): this;
16
- makeHidden(attributes: any): this;
17
- append(attributes: any): this;
18
- only(keys: any[]): any;
19
- getDictionary(items?: ICollection<any> | any[]): TGeneric;
20
- toData(): (I | {
21
- [x: string]: any;
22
- [x: number]: any;
23
- [x: symbol]: any;
24
- })[];
25
- toJSON(): (I | {
26
- [x: string]: any;
27
- [x: number]: any;
28
- [x: symbol]: any;
29
- })[];
30
- toJson(...args: any[]): string;
31
- [Symbol.iterator]: () => Iterator<I>;
32
- }
33
- //#endregion
34
- //#region types/modeling.d.ts
35
- interface Attribute$1 {
36
- make(config: {
37
- get?: TFunction | null;
38
- set?: TFunction | null;
39
- }): Attribute$1;
40
- get: TFunction | null;
41
- set: TFunction | null;
42
- withCaching?: boolean;
43
- withObjectCaching?: boolean;
44
- }
45
- type Relation$1<M extends Model$1> = IBuilder<M, any> & {};
46
- interface HasOneOrMany<M extends Model$1> extends Relation$1<M> {
47
- save(model: M): Promise<M>;
48
- saveMany(models: M[] | ICollection<M>): Promise<ICollection<M>>;
49
- create(attributes?: any): Promise<M>;
50
- createMany(records: any[]): Promise<ICollection<M>>;
51
- }
52
- interface HasOne<M extends Model$1> extends HasOneOrMany<M> {
53
- getResults(): Promise<M | null>;
54
- withDefault(callback?: TFunction | object): this;
55
- }
56
- interface HasMany<M extends Model$1> extends HasOneOrMany<M> {
57
- getResults(): Promise<ICollection<M>>;
58
- }
59
- interface BelongsTo<M extends Model$1> extends Relation$1<M> {
60
- getResults(): Promise<M | null>;
61
- withDefault(callback?: TFunction | object): this;
62
- }
63
- interface BelongsToMany<M extends Model$1> extends Relation$1<M> {
64
- getResults(): Promise<ICollection<M>>;
65
- withTimestamps(): this;
66
- wherePivot(column: any, operator?: any, value?: any, boolean?: string, ...args: any[]): this;
67
- wherePivotBetween(column: any, values: any, boolean?: string, not?: boolean): this;
68
- orWherePivotBetween(column: any, values: any): this;
69
- wherePivotNotBetween(column: any, values: any, boolean?: string): this;
70
- orWherePivotNotBetween(column: any, values: any): this;
71
- wherePivotIn(column: any, values: any, boolean?: string, not?: boolean): this;
72
- orWherePivot(column: any, operator?: any, value?: any): this;
73
- orWherePivotIn(column: any, values: any): this;
74
- wherePivotNotIn(column: any, values: any, boolean?: string): this;
75
- orWherePivotNotIn(column: any, values: any): this;
76
- wherePivotNull(column: any, boolean?: string, not?: boolean): this;
77
- wherePivotNotNull(column: any, boolean?: string): this;
78
- orWherePivotNull(column: any, not?: boolean): this;
79
- orWherePivotNotNull(column: any): this;
80
- orderByPivot(column: any, direction?: string): this;
81
- }
82
- interface IModel {
83
- [value: string]: any;
84
- attributes: any;
85
- relations: any;
86
- exists: boolean;
87
- connection?: TBaseConfig['client'] | null;
88
- perPage: number;
89
- with: string | string[] | TGeneric<(...args: any[]) => IBuilder<Model$1>>;
90
- trx: AnyQueryBuilder | null;
91
- timestamps: boolean;
92
- dateFormat: string;
93
- visible: string[];
94
- hidden: string[];
95
- query<T extends {
96
- prototype: unknown;
97
- }>(this: T, client?: AnyQueryBuilder | null): IBuilder<Model$1>;
98
- on<T extends {
99
- prototype: unknown;
100
- }>(this: T, connection: string | null): IBuilder<Model$1>;
101
- boot(): void;
102
- make<T extends IModel>(this: new () => T, attributes?: TGeneric): T;
103
- addHook(hook: Hook, callback: TFunction): void;
104
- creating(callback: TFunction): void;
105
- created(callback: TFunction): void;
106
- updating(callback: TFunction): void;
107
- updated(callback: TFunction): void;
108
- deleting(callback: TFunction): void;
109
- deleted(callback: TFunction): void;
110
- saving(callback: TFunction): void;
111
- saved(callback: TFunction): void;
112
- restoring(callback: TFunction): void;
113
- restored(callback: TFunction): void;
114
- trashed(callback: TFunction): void;
115
- forceDeleted(callback: TFunction): void;
116
- bootIfNotBooted(): void;
117
- initialize(): void;
118
- initializePlugins(): void;
119
- addPluginInitializer(method: any): void;
120
- newInstance(attributes?: TGeneric, exists?: boolean): any;
121
- getKey(): string | number | null | undefined;
122
- getKeyName(): string;
123
- getConnectionName(): string;
124
- getConnection(): any;
125
- setConnection(connection: TBaseConfig['client'] | null): this;
126
- usesUniqueIds(): boolean;
127
- uniqueIds(): string[];
128
- setUniqueIds(): void;
129
- getKeyType(): string;
130
- getIncrementing(): boolean;
131
- setIncrementing(value: boolean): this;
132
- getTable(): string;
133
- setTable(table: string): this;
134
- getDates(): string[];
135
- getDateFormat(): string;
136
- getAttributes(): object;
137
- getAttribute(key: string): any;
138
- setAttribute(key: string, value: any): this;
139
- fill(attributes: any): this;
140
- setAppends(appends: string[]): this;
141
- append(key: string | string[]): this;
142
- getRelation<T extends Model$1>(relation: string): T | ICollection<T> | null | undefined;
143
- setRelation<T extends Model$1>(relation: string, value: T | ICollection<T> | null): this;
144
- unsetRelation(relation: string): this;
145
- relationLoaded(relation: string): boolean;
146
- makeVisible(attributes: string | string[]): this;
147
- makeHidden(attributes: string | string[]): this;
148
- newCollection(models?: any[]): ICollection<Model$1>;
149
- load(relations: WithRelationType): Promise<this>;
150
- load(...relations: WithRelationType[]): Promise<this>;
151
- loadAggregate(relations: WithRelationType, column: any, callback?: any): Promise<this>;
152
- loadCount(...relations: WithRelationType[]): Promise<this>;
153
- loadMax(relations: WithRelationType, column: string): Promise<this>;
154
- loadMin(relations: WithRelationType, column: string): Promise<this>;
155
- loadSum(relations: WithRelationType, column: string): Promise<this>;
156
- usesTimestamps(): boolean;
157
- updateTimestamps(): this;
158
- getCreatedAtColumn(): string;
159
- getUpdatedAtColumn(): string;
160
- getDeletedAtColumn(): string;
161
- setCreatedAt(value: string): this;
162
- setUpdatedAt(value: string): this;
163
- freshTimestamp(): Date;
164
- freshTimestampString(): string;
165
- fromDateTime(value: Date | number | null): string;
166
- useSoftDeletes(): boolean;
167
- toData(): any;
168
- attributesToData(): any;
169
- relationsToData(): any;
170
- toJSON(): any;
171
- toJson(): string;
172
- toString(): string;
173
- isDirty(attributes?: string | string[]): boolean;
174
- getDirty(): string[];
175
- save(options?: any): Promise<boolean>;
176
- update(attributes?: any, options?: any): Promise<boolean>;
177
- increment(column: string, amount?: number, extra?: any): Promise<boolean>;
178
- decrement(column: string, amount?: number, extra?: any): Promise<boolean>;
179
- serializeDate(date: any): string;
180
- delete(options?: any): Promise<boolean>;
181
- softDelete(options?: any): Promise<boolean>;
182
- forceDelete(options?: any): Promise<boolean>;
183
- restore(options?: any): Promise<boolean>;
184
- trashed(): boolean;
185
- fresh(): Promise<this>;
186
- refresh(): Promise<this | undefined>;
187
- push(): Promise<boolean>;
188
- is(model: this): boolean;
189
- isNot(model: this): boolean;
190
- related<T extends RelationNames<this>>(relation: T): ReturnTypeOfMethod<this, `relation${Capitalize<SnakeToCamelCase<T>>}`>;
191
- getRelated<T extends RelationNames<this>>(relation: T): ReturnTypeOfMethod<ReturnTypeOfMethod<this, `relation${Capitalize<SnakeToCamelCase<T>>}`>, any>;
192
- hasOne<T extends Model$1>(model: new () => T, foreignKey?: string, localKey?: string): HasOne<T>;
193
- hasMany<T extends Model$1>(model: new () => T, foreignKey?: string, localKey?: string): HasMany<T>;
194
- belongsTo<T extends Model$1>(model: new () => T, foreignKey?: string, ownerKey?: string, relation?: string): BelongsTo<T>;
195
- belongsToMany<T extends Model$1>(model: new () => T, table?: string, foreignPivotKey?: string, relatedPivotKey?: string, parentKey?: string, relatedKey?: string): BelongsToMany<T>;
196
- }
197
- //#endregion
198
- //#region src/collection.d.ts
199
- declare class Collection$2<I extends Model$1 | Model> extends Collection$1<I> implements ICollection<I> {
200
- private newConstructor;
201
- getConstructor<T extends typeof Collection$2<I>>(this: InstanceType<T>): T;
202
- load(...relations: (string[] | I[] | string | I)[]): Promise<Collection$2<I>>;
203
- loadAggregate<I>(relations: I, column: string, action?: string | null | TFunction): Promise<this>;
204
- loadCount(relations: I): Promise<this>;
205
- loadMax(relation: I, column: string): Promise<this>;
206
- loadMin(relation: I, column: string): Promise<this>;
207
- loadSum(relation: I, column: string): Promise<this>;
208
- loadAvg(relation: I, column: string): Promise<this>;
209
- mapThen(callback: () => void): Promise<void[]>;
210
- modelKeys(): any[];
211
- contains<K, V>(key: keyof I | K | TFunction, value?: V): boolean;
212
- diff(items: ICollection<any> | any[]): any;
213
- except(keys: any[]): any;
214
- intersect(items: I[]): any;
215
- unique(key?: TFunction | keyof I, _strict?: boolean): any;
216
- find(key: any, defaultValue?: null): any;
217
- fresh(...args: any[]): Promise<any>;
218
- makeVisible(attributes: any): this;
219
- makeHidden(attributes: any): this;
220
- append(attributes: any): this;
221
- only(keys: any[]): any;
222
- getDictionary(items?: ICollection<any> | any[]): TGeneric;
223
- toQuery(): any;
224
- toData(): ({
225
- [x: string]: any;
226
- [x: number]: any;
227
- [x: symbol]: any;
228
- } | I)[];
229
- toJSON(): ({
230
- [x: string]: any;
231
- [x: number]: any;
232
- [x: symbol]: any;
233
- } | I)[];
234
- toJson(...args: any[]): string;
235
- [Symbol.iterator]: () => Iterator<I>;
236
- }
237
- //#endregion
238
- //#region src/paginator.d.ts
239
- declare class Paginator$1<T extends Model$1, K extends IPaginatorParams = IPaginatorParams> implements IPaginator<T, K> {
240
- static formatter: (paginator: IPaginator<any>) => any | null;
241
- _items: Collection$2<T>;
242
- _total: number;
243
- _perPage: number;
244
- _lastPage: number;
245
- _currentPage: number;
246
- hasMore: boolean;
247
- options: TGeneric;
248
- static setFormatter(formatter?: ((paginator: IPaginator<any> | null) => any) | null): void;
249
- constructor(items: T[], total: number, perPage: number, currentPage?: number, options?: TGeneric);
250
- setItems(items: T[]): void;
251
- firstItem(): number | null;
252
- lastItem(): number | null;
253
- hasMorePages(): boolean;
254
- get(index: number): T | null;
255
- count(): number;
256
- items(): Collection$2<T>;
257
- map(callback: (value: T, index: number) => T): Collection$2<T>;
258
- currentPage(): number;
259
- onFirstPage(): boolean;
260
- perPage(): number;
261
- lastPage(): number;
262
- total(): number;
263
- toData(): any;
264
- toJSON(): any;
265
- toJson(...args: any[]): string;
266
- }
267
- //#endregion
268
- //#region src/scope.d.ts
269
- declare class Scope<M extends Model$1 = Model$1> implements IScope {
270
- constructor();
271
- apply(_builder: Builder<M>, _model: M): void;
272
- }
273
- //#endregion
274
- //#region src/builder.d.ts
275
- declare const Inference$1: {
276
- new <M extends Model$1 | Model = Model$1, R = IModel | ICollection<M>>(): IBuilder<M, R>;
277
- };
278
- declare class Builder<M extends Model$1 = Model$1, R = IModel | ICollection<M>> extends Inference$1 {
279
- query: IBuilder<M, R>;
280
- connection: any;
281
- model: M;
282
- actions: any[];
283
- localMacros: TGeneric<(...args: any[]) => any, keyof Omit<IBuilder<M, R>, number>>;
284
- eagerLoad: TGeneric<(...args: any[]) => any>;
285
- globalScopes: TGeneric<Scope<M> | ((arg: Builder<M, R>) => Builder<M, R>)>;
286
- onDeleteCallback?: (builder: Builder<M, R>) => Promise<boolean | number>;
287
- constructor(query: IBuilder<M, R>);
288
- asProxy(): Builder<M, R>;
289
- orWhere(...args: any[]): this;
290
- chunk<C extends TFunction>(count: number, callback: C): Promise<boolean>;
291
- enforceOrderBy(this: any): void;
292
- clone(this: any): any;
293
- forPage(this: any, page: number, perPage?: number): any;
294
- insert(...args: Parameters<typeof this.query.insert>): Promise<any>;
295
- update<T extends TGeneric>(values: T): Promise<any>;
296
- increment(column: string, amount?: number, extra?: {}): Promise<any>;
297
- decrement(column: string, amount?: number, extra?: {}): Promise<any>;
298
- addUpdatedAtColumn(values: TGeneric<string>): TGeneric<string>;
299
- delete(): Promise<number | boolean>;
300
- onDelete<C extends TFunction<any, Promise<number | boolean>>>(callback: C): void;
301
- forceDelete(): Promise<number | boolean>;
302
- create(attributes?: {}): Promise<any>;
303
- newModelInstance(attributes?: {}): any;
304
- getQuery(): IBuilder<M, R>;
305
- getModel(): M;
306
- setModel<MO extends Model$1>(model: MO): this;
307
- qualifyColumn(column: string): string;
308
- setTable(table: string): this;
309
- applyScopes(): this;
310
- hasNamedScope(name: string): boolean;
311
- callNamedScope(scope: string, parameters: any[]): any;
312
- callScope(scope: (builder: this, ...args: any[]) => this, parameters?: never[]): this;
313
- scopes(scopes: string[]): this;
314
- withGlobalScope(identifier: string, scope: any): this;
315
- withoutGlobalScope(scope: Scope | string): this;
316
- macro<N extends string>(name: N, callback: (builder: TGeneric & IBuilder<M>, attrs: any, vals: any) => any): this;
317
- hasMacro(name: string): boolean;
318
- getMacro(name: string): (...args: any[]) => any;
319
- with(...args: any[]): this;
320
- has(relation: any, operator?: string, count?: number, boolean?: string, callback?: TFunction | null): any;
321
- orHas(relation: any, operator?: string, count?: number): any;
322
- doesntHave(relation: any, boolean?: string, callback?: TFunction | null): any;
323
- orDoesntHave(relation: any): any;
324
- whereHas(relation: any, callback?: TFunction | null, operator?: string, count?: number): any;
325
- orWhereHas(relation: any, callback?: TFunction | null, operator?: string, count?: number): any;
326
- whereRelation(relation: any, ...args: any[]): any;
327
- orWhereRelation(relation: any, ...args: any[]): any;
328
- hasNested(relations: any, operator?: string, count?: number, boolean?: string, callback?: TFunction | null): any;
329
- canUseExistsForExistenceCheck(operator: string, count: number): boolean;
330
- addHasWhere(hasQuery: any, relation: any, operator: string, count: number, boolean: string): any;
331
- addWhereExistsQuery(this: any, query: any, boolean?: string, not?: boolean): any;
332
- addWhereCountQuery(this: any, query: any, operator?: string, count?: number, boolean?: string): any;
333
- withAggregate(relations: any, column: string, action?: string | null): this;
334
- toSql(): any;
335
- mergeConstraintsFrom(_from: any): this;
336
- selectSub(query: Builder<M>, as: string): any;
337
- createSub(query: any): any[];
338
- parseSub(query: any): any[];
339
- prependDatabaseNameIfCrossDatabaseQuery(query: any): any;
340
- getRelationWithoutConstraints(relation: string): any;
341
- withCount(...args: any[]): this;
342
- withMax(relation: any, column: string): this;
343
- withMin(relation: any, column: string): this;
344
- withAvg(relation: any, column: string): this;
345
- withSum(relation: any, column: string): this;
346
- withExists(relation: any): this;
347
- parseWithRelations(relations: TGeneric): TGeneric | never[];
348
- addNestedWiths(name: string, results: TGeneric): TGeneric;
349
- prepareNestedWithRelationships(relations: TGeneric, prefix?: string): TGeneric;
350
- combineConstraints(constraints: TFunction[]): (builder: Builder<M>) => Builder<M, IModel | ICollection<M>>;
351
- parseNameAndAttributeSelectionConstraint(name: string, value: string): (string | ((query: any) => void))[];
352
- createSelectWithConstraint(name: string): (string | ((query: any) => void))[];
353
- related(relation: string): any;
354
- take(this: any, ...args: any[]): any;
355
- skip(this: any, ...args: any[]): any;
356
- first(this: any, ...columns: any[]): Promise<M | null>;
357
- firstOrFail(...columns: any[]): Promise<M>;
358
- findOrFail(this: any, ...args: any[]): Promise<M>;
359
- findOrNew(id: string, columns?: string[]): Promise<any>;
360
- firstOrNew(this: any, attributes?: {}, values?: {}): Promise<any>;
361
- firstOrCreate(this: any, attributes?: TGeneric, values?: {}): Promise<any>;
362
- updateOrCreate(attributes: TGeneric, values?: {}): Promise<any>;
363
- latest(column?: string): this;
364
- oldest(column?: string): this;
365
- find(this: any, id: string | number | Collection$2<M>, columns?: string[]): Promise<any>;
366
- findMany(this: any, ids: string[] | number[] | ICollection<any>, columns?: string[]): Promise<any>;
367
- pluck(column: string): Promise<any>;
368
- destroy(this: any, ids?: string | number | string[] | number[] | TFunction | Collection$2<M>): Promise<number>;
369
- get<M extends Model$1>(columns?: string | string[]): Promise<Collection$2<M>>;
370
- all(columns?: string[]): Promise<any>;
371
- paginate(this: any, page?: number, perPage?: number): Promise<Paginator$1<any, IPaginatorParams>>;
372
- getModels(...columns: any[]): Promise<any[]>;
373
- getRelation(name: string): any;
374
- relationsNestedUnder(relation: string): TGeneric;
375
- isNestedUnder(relation: string, name: string): boolean;
376
- eagerLoadRelation<M extends Model$1>(models: M[], name: string, constraints: any): Promise<any>;
377
- eagerLoadRelations<M extends Model$1>(models: M[]): Promise<M[]>;
378
- hydrate(items: any[] | ICollection<any>): Collection$2<any>;
379
- }
380
- //#endregion
381
- //#region src/inspector/types/column.d.ts
382
- interface Column {
383
- name: string;
384
- table: string;
385
- data_type: string;
386
- default_value: string | null;
387
- max_length: number | null;
388
- numeric_precision: number | null;
389
- numeric_scale: number | null;
390
- is_nullable: boolean;
391
- is_unique: boolean;
392
- is_primary_key: boolean;
393
- is_generated: boolean;
394
- generation_expression?: string | null;
395
- has_auto_increment: boolean;
396
- foreign_key_table: string | null;
397
- foreign_key_column: string | null;
398
- comment?: string | null;
399
- schema?: string;
400
- foreign_key_schema?: string | null;
401
- collation?: string | null;
402
- }
403
- //#endregion
404
- //#region src/inspector/types/foreign-key.d.ts
405
- type ForeignKey = {
406
- table: string;
407
- column: string;
408
- foreign_key_table: string;
409
- foreign_key_column: string;
410
- foreign_key_schema?: string;
411
- constraint_name: null | string;
412
- on_update: null | 'NO ACTION' | 'RESTRICT' | 'CASCADE' | 'SET NULL' | 'SET DEFAULT';
413
- on_delete: null | 'NO ACTION' | 'RESTRICT' | 'CASCADE' | 'SET NULL' | 'SET DEFAULT';
414
- };
415
- //#endregion
416
- //#region src/inspector/types/table.d.ts
417
- interface Table {
418
- name: string;
419
- comment?: string | null;
420
- schema?: string;
421
- collation?: string;
422
- engine?: string;
423
- owner?: string;
424
- sql?: string;
425
- catalog?: string;
426
- }
427
- //#endregion
428
- //#region types/query-builder.d.ts
429
- interface SchemaBuilder extends Knex.SchemaBuilder {
430
- [k: string]: any;
431
- /**
432
- * Retrieve all tables in the current database.
433
- */
434
- tables(): Promise<string[]>;
435
- /**
436
- * Retrieve the table info for the given table, or all tables if no table is specified.
437
- *
438
- * @param table
439
- */
440
- tableInfo(table?: string): Promise<Table | Table[]>;
441
- /**
442
- * Retrieve all columns in a given table, or all columns if no table is specified.
443
- *
444
- * @param table
445
- */
446
- columns(table?: string): Promise<{
447
- table: string;
448
- column: string;
449
- }[]>;
450
- /**
451
- * Retrieve all columns from a given table. Returns all columns if table parameter is undefined.
452
- *
453
- * @param table
454
- * @param column
455
- */
456
- columnInfo(table?: string, column?: string): Promise<Column[] | Column>;
457
- /**
458
- * Retrieve the primary key column for a given table.
459
- *
460
- * @param table
461
- */
462
- primary(table: string): Promise<string>;
463
- /**
464
- * Retrieve all configured foreign key constraints
465
- */
466
- foreignKeys(): Promise<ForeignKey>;
467
- }
468
- interface AsMethod<QB extends AnyQueryBuilder> {
469
- (alias: string): QB;
470
- }
471
- interface IStatement {
472
- grouping: string;
473
- direction: string;
474
- type: string;
475
- value: () => any;
476
- not: boolean;
477
- nulls: boolean;
478
- bool: 'and' | 'or' | 'not';
479
- }
480
- interface IQueryBuilder<M extends Model$1 | Model = Model$1, R = M[] | M> {
481
- query: IBuilder<M, R>;
482
- schema: SchemaBuilder;
483
- _statements: IStatement[];
484
- table(name: string): IQueryBuilder<M, R>;
485
- select: SelectMethod<this>;
486
- addSelect: AddSelectMethod<this>;
487
- columns: SelectMethod<this>;
488
- column: SelectMethod<this>;
489
- distinct: SelectMethod<this>;
490
- returning: ReturningMethod<this>;
491
- distinctOn: SelectMethod<this>;
492
- as: AsMethod<this>;
493
- asProxy(): IQueryBuilder<M, R>;
494
- where: WhereMethod<this>;
495
- firstOrFail: FirstOrFailMethod<this>;
496
- forceDelete: ForceDeleteMethod;
497
- andWhere: WhereMethod<this>;
498
- orWhere(...args: any[]): this;
499
- whereNot: WhereMethod<this>;
500
- andWhereNot: WhereMethod<this>;
501
- orWhereNot: WhereMethod<this>;
502
- whereRaw: WhereRawMethod<this>;
503
- orWhereRaw: WhereRawMethod<this>;
504
- andWhereRaw: WhereRawMethod<this>;
505
- whereWrapped: WhereWrappedMethod<this>;
506
- havingWrapped: WhereWrappedMethod<this>;
507
- whereExists: WhereExistsMethod<this>;
508
- orWhereExists: WhereExistsMethod<this>;
509
- whereNotExists: WhereExistsMethod<this>;
510
- orWhereNotExists: WhereExistsMethod<this>;
511
- restore: RestoreMethod;
512
- whereIn: WhereInMethod<this>;
513
- orWhereIn: WhereInMethod<this>;
514
- whereNotIn: WhereInMethod<this>;
515
- orWhereNotIn: WhereInMethod<this>;
516
- whereBetween: WhereBetweenMethod<this>;
517
- orWhereBetween: WhereBetweenMethod<this>;
518
- andWhereBetween: WhereBetweenMethod<this>;
519
- whereNotBetween: WhereBetweenMethod<this>;
520
- orWhereNotBetween: WhereBetweenMethod<this>;
521
- andWhereNotBetween: WhereBetweenMethod<this>;
522
- whereNull: WhereNullMethod<this>;
523
- orWhereNull: WhereNullMethod<this>;
524
- whereNotNull: WhereNullMethod<this>;
525
- orWhereNotNull: WhereNullMethod<this>;
526
- whereColumn: WhereColumnMethod<this>;
527
- orWhereColumn: WhereColumnMethod<this>;
528
- andWhereColumn: WhereColumnMethod<this>;
529
- whereNotColumn: WhereColumnMethod<this>;
530
- orWhereNotColumn: WhereColumnMethod<this>;
531
- andWhereNotColumn: WhereColumnMethod<this>;
532
- whereJsonIsArray: WhereFieldExpressionMethod<this>;
533
- orWhereJsonIsArray: WhereFieldExpressionMethod<this>;
534
- whereJsonNotArray: WhereFieldExpressionMethod<this>;
535
- orWhereJsonNotArray: WhereFieldExpressionMethod<this>;
536
- whereJsonIsObject: WhereFieldExpressionMethod<this>;
537
- orWhereJsonIsObject: WhereFieldExpressionMethod<this>;
538
- whereJsonNotObject: WhereFieldExpressionMethod<this>;
539
- orWhereJsonNotObject: WhereFieldExpressionMethod<this>;
540
- whereJsonHasAny: WhereJsonExpressionMethod<this>;
541
- orWhereJsonHasAny: WhereJsonExpressionMethod<this>;
542
- whereJsonHasAll: WhereJsonExpressionMethod<this>;
543
- orWhereJsonHasAll: WhereJsonExpressionMethod<this>;
544
- having: WhereMethod<this>;
545
- andHaving: WhereMethod<this>;
546
- orHaving: WhereMethod<this>;
547
- havingRaw: WhereRawMethod<this>;
548
- orHavingRaw: WhereRawMethod<this>;
549
- havingIn: WhereInMethod<this>;
550
- orHavingIn: WhereInMethod<this>;
551
- havingNotIn: WhereInMethod<this>;
552
- orHavingNotIn: WhereInMethod<this>;
553
- havingNull: WhereNullMethod<this>;
554
- orHavingNull: WhereNullMethod<this>;
555
- havingNotNull: WhereNullMethod<this>;
556
- orHavingNotNull: WhereNullMethod<this>;
557
- havingExists: WhereExistsMethod<this>;
558
- orHavingExists: WhereExistsMethod<this>;
559
- havingNotExists: WhereExistsMethod<this>;
560
- orHavingNotExists: WhereExistsMethod<this>;
561
- havingBetween: WhereBetweenMethod<this>;
562
- orHavingBetween: WhereBetweenMethod<this>;
563
- havingNotBetween: WhereBetweenMethod<this>;
564
- orHavingNotBetween: WhereBetweenMethod<this>;
565
- union: UnionMethod<this>;
566
- unionAll: UnionMethod<this>;
567
- intersect: SetOperationsMethod<this>;
568
- join: JoinMethod<this>;
569
- joinRaw: JoinRawMethod<this>;
570
- innerJoin: JoinMethod<this>;
571
- leftJoin: JoinMethod<this>;
572
- leftOuterJoin: JoinMethod<this>;
573
- rightJoin: JoinMethod<this>;
574
- rightOuterJoin: JoinMethod<this>;
575
- outerJoin: JoinMethod<this>;
576
- fullOuterJoin: JoinMethod<this>;
577
- crossJoin: JoinMethod<this>;
578
- orderBy: OrderByMethod<this>;
579
- orderByRaw: OrderByRawMethod<this>;
580
- groupBy: GroupByMethod<this>;
581
- groupByRaw: RawInterface<this>;
582
- transaction(callback?: TFunction): Promise<Knex.Transaction> | undefined;
583
- destroy(callback: TFunction): Promise<number>;
584
- destroy(): Promise<number>;
585
- clone(): IQueryBuilder<M, R>;
586
- raw: Knex.RawQueryBuilder<TGeneric, M>;
587
- get(columns?: string[]): Promise<any>;
588
- first(columns?: string[]): Promise<M | null | undefined>;
589
- find(key: string | number, columns?: string[]): Promise<M | null | undefined>;
590
- insert(attributes: any): Promise<unknown>;
591
- update(...attributes: any[]): Promise<number>;
592
- delete(): Promise<boolean | number>;
593
- exists(): Promise<boolean>;
594
- count(column?: string): Promise<number>;
595
- min(column: string): Promise<number>;
596
- max(column: string): Promise<number>;
597
- sum(column: string): Promise<number>;
598
- avg(column: string): Promise<number>;
599
- skip(count: number): this;
600
- take(count: number): this;
601
- limit(count: number): this;
602
- offset(count: number): this;
603
- pluck<X extends Model$1 = any>(column: string): Promise<Array<X>>;
604
- chunk(count: number, callback: (rows: M[]) => any): Promise<boolean>;
605
- forPage(page: number, perPage?: number): this;
606
- paginate<F extends IPaginatorParams>(page?: number, perPage?: number): Promise<IPaginator<M, F>>;
607
- }
608
- //#endregion
609
- //#region src/query-builder.d.ts
610
- declare const Inference: {
611
- new <M extends Model$1 = Model$1, R = M[] | M>(): IQueryBuilder<M, R>;
612
- };
613
- declare class QueryBuilder<M extends Model$1 = Model$1, R = M[] | M> extends Inference<M, R> {
614
- model: M;
615
- schema: SchemaBuilder;
616
- connector: IQueryBuilder<M, R> & Knex.QueryBuilder & {
617
- _statements: any[];
618
- _single: any;
619
- } & Knex;
620
- constructor(config: TConfig | null, connector: TFunction);
621
- asProxy(): any;
622
- beginTransaction(): Promise<Knex.Transaction<any, any[]>>;
623
- table<X extends M>(table: string): IQueryBuilder<X, R>;
624
- transaction(callback?: TFunction): Promise<Knex.Transaction> | undefined;
625
- find(id: string | number, columns?: string[]): Promise<any>;
626
- get(_columns?: string[]): Promise<any>;
627
- exists(): Promise<boolean>;
628
- skip(this: any, ...args: any[]): any;
629
- take(this: any, ...args: any[]): any;
630
- chunk(count: number, callback: TFunction): Promise<boolean>;
631
- paginate<F extends IPaginatorParams>(this: any, page: number | undefined, perPage: number | undefined, _pageName: string, _page: number): Promise<IPaginator<M, F>>;
632
- forPage(this: any, page?: number, perPage?: number): any;
633
- toSQL(...args: any[]): Knex.Sql;
634
- count(column: string): Promise<number>;
635
- min(column: string): Promise<number>;
636
- max(column: string): Promise<number>;
637
- sum(column: string): Promise<number>;
638
- avg(column: string): Promise<number>;
639
- clone(): IQueryBuilder<M, R>;
640
- delete(): Promise<number | boolean>;
641
- insert(...args: Parameters<typeof this.connector.insert>): Promise<unknown>;
642
- update(...args: Parameters<typeof this.connector.update>): Promise<number>;
643
- destroy(...args: Parameters<typeof this.connector.destroy>): Promise<number>;
644
- get _statements(): IStatement[] & any[];
645
- get _single(): any;
646
- get from(): Knex.Table<any, any> & Knex.Table<any, any[]>;
647
- }
648
- //#endregion
649
- //#region src/relations/relation.d.ts
650
- declare class Relation {
651
- query: QueryBuilder;
652
- parent: any;
653
- related: any;
654
- eagerKeysWereEmpty: boolean;
655
- static constraints: boolean;
656
- static selfJoinCount: number;
657
- constructor(query: any, parent: any);
658
- static extend(trait: Record<string, any>): void;
659
- static noConstraints(callback: () => any): any;
660
- asProxy(): any;
661
- getRelated(): any;
662
- getKeys(models: any[], key?: string | null): any[];
663
- getRelationQuery(): any;
664
- whereInEager(whereIn: string, key: string, modelKeys: any[], query?: any): void;
665
- whereInMethod(model: any, key: string): string;
666
- getEager(): any;
667
- get(columns?: string | string[]): Promise<any>;
668
- first(columns?: string[]): Promise<any>;
669
- paginate(...args: unknown[]): Promise<any>;
670
- count(...args: any[]): Promise<any>;
671
- toSql(): string;
672
- addConstraints(): void;
673
- getRelationCountHash(incrementJoinCount?: boolean): string;
674
- getRelationExistenceQuery(query: any, parentQuery: any, columns?: string[]): any;
675
- getRelationExistenceCountQuery(query: any, parentQuery: any): any;
676
- getQualifiedParentKeyName(): string;
677
- getExistenceCompareKey(this: any): string;
678
- }
679
- //#endregion
680
- //#region src/casts/attribute.d.ts
681
- interface IAttribute {
682
- get?: null | (<A extends TGeneric>(value: string, attr: A) => string);
683
- set?: null | (<A extends TGeneric>(value: string, attr: A) => string | TGeneric);
684
- }
685
- declare class Attribute {
686
- get: IAttribute['get'];
687
- set: IAttribute['set'];
688
- withCaching: boolean;
689
- withObjectCaching: boolean;
690
- constructor({
691
- get,
692
- set
693
- }: IAttribute);
694
- static make({
695
- get,
696
- set
697
- }: IAttribute): Attribute;
698
- static get(get: IAttribute['get']): Attribute;
699
- static set(set: IAttribute['set']): Attribute;
700
- withoutObjectCaching(): this;
701
- shouldCache(): this;
702
- }
703
- //#endregion
704
- //#region src/casts-attributes.d.ts
705
- interface ICastsAttributes {
706
- get?(model: Model$1, key: string, value: string, attributes: TGeneric): string | null | undefined;
707
- set?(model: Model$1, key: string, value: string, attributes: TGeneric): string | null | undefined;
708
- }
709
- declare class CastsAttributes implements ICastsAttributes {
710
- constructor();
711
- static get(_model: Model$1, _key: string, _value: string, _attributes: TGeneric): string | null | undefined;
712
- static set(_model: Model$1, _key: string, _value: string, _attributes: TGeneric): string | null | undefined;
713
- }
714
- //#endregion
715
- //#region src/concerns/has-unique-ids.d.ts
716
- declare const HasUniqueIds: <TBase extends MixinConstructor>(Model: TBase) => {
717
- new (...args: any[]): {
718
- [x: string]: any;
719
- useUniqueIds: boolean;
720
- uniqueIds(): any[];
721
- getKeyType(): any;
722
- getIncrementing(): any;
723
- };
724
- } & TBase;
725
- //#endregion
726
- //#region src/arquebus.d.ts
727
- declare class arquebus<M extends Model$1 = Model$1> {
728
- static connectorFactory: typeof Knex$1 | null;
729
- static instance: arquebus | null;
730
- manager: Record<string, QueryBuilder<M>>;
731
- connections: Record<string, TConfig>;
732
- models: Record<string, typeof Model$1>;
733
- constructor();
734
- getConstructor<T extends typeof arquebus>(this: InstanceType<T>): T;
735
- static getInstance(): arquebus<Model$1>;
736
- /**
737
- * Initialize a new database connection
738
- *
739
- * @returns
740
- */
741
- static fire<C extends TBaseConfig['client']>(connection?: C | null): QueryBuilder<Model$1>;
742
- /**
743
- * Initialize a new database connection
744
- *
745
- * This is an alias of `arquebus.fire()` and will be removed in the future
746
- *
747
- * @deprecated since version 0.3.0
748
- * @alias fire
749
- *
750
- * @returns
751
- */
752
- static connection<C extends TBaseConfig['client']>(connection?: C | null): QueryBuilder<Model$1, Model$1 | Model$1[]>;
753
- static setConnectorFactory(connectorFactory: typeof Knex$1): void;
754
- static getConnectorFactory(): typeof Knex$1;
755
- static addConnection(config: TConfig | TBaseConfig, name?: string): void;
756
- static beginTransaction(connection?: null): Promise<Knex$1.Knex.Transaction<any, any[]>>;
757
- static transaction<A, R>(callback: TFunction<A[], R>, connection?: null): Promise<Knex$1.Knex.Transaction<any, any[]>> | undefined;
758
- static table(name: string, connection?: null): IQueryBuilder<Model$1, Model$1 | Model$1[]>;
759
- static schema(connection?: null): SchemaBuilder;
760
- static destroyAll(): Promise<void>;
761
- static createModel<X extends TGeneric>(name: string, options: X): typeof Model$1;
762
- connection(connection?: string | null): QueryBuilder<M, M | M[]>;
763
- getConnection(name?: string | null): QueryBuilder<M, M | M[]>;
764
- addConnection(config: TConfig | TBaseConfig, name?: string): void;
765
- /**
766
- * Autoload the config file
767
- *
768
- * @param addConnection
769
- * @default true
770
- * If set to `false` we will no attempt add the connection, we
771
- * will just go ahead and return the config
772
- *
773
- * @returns
774
- */
775
- static autoLoad(addConnection?: boolean): Promise<TBaseConfig>;
776
- beginTransaction(connection?: null): Promise<Knex$1.Knex.Transaction<any, any[]>>;
777
- transaction(callback: TFunction, connection?: null): Promise<Knex$1.Knex.Transaction<any, any[]>> | undefined;
778
- table(name: string, connection?: null): IQueryBuilder<M, M | M[]>;
779
- schema(connection?: null): SchemaBuilder;
780
- destroyAll(): Promise<void>;
781
- createModel(name: string, options?: ModelOptions): typeof Model$1;
782
- }
783
- //#endregion
784
- //#region src/errors.d.ts
785
- declare class BaseError extends Error {
786
- constructor(message: string, _entity?: any);
787
- }
788
- declare class ModelNotFoundError extends BaseError {
789
- model?: IModel;
790
- ids: (string | number)[] | string | number;
791
- constructor();
792
- setModel(model: IModel, ids?: never[]): this;
793
- getModel(): IModel | undefined;
794
- getIds(): string | number | (string | number)[];
795
- }
796
- declare class RelationNotFoundError extends BaseError {}
797
- declare class InvalidArgumentError extends BaseError {}
798
- //#endregion
799
- //#region src/mixin.d.ts
800
- /**
801
- * Helper type to extract instance type from constructor or mixin function
802
- */
803
- type Constructor<T = TGeneric> = MixinConstructor<T>;
804
- type Mixin<TBase extends Constructor> = (Base: TBase) => Constructor;
805
- /**
806
- * Helper type to convert union to intersection
807
- */
808
- type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends ((k: infer I) => void) ? I : never;
809
- /**
810
- * Helper type to get static side of a constructor
811
- */
812
- type Static<T> = { [K in keyof T]: T[K] };
813
- /**
814
- * Compose function that merges multiple classes and mixins
815
- *
816
- * @example
817
- * const SomePlugin = <TBase extends new (...args: any[]) => TGeneric> (Base: TBase) => {
818
- * return class extends Base {
819
- * pluginAttribtue = 'plugin'
820
- * pluginMethod () {
821
- * return this.pluginAttribtue
822
- * }
823
- * }
824
- * }
825
- *
826
- * // Base class
827
- * class Model {
828
- * make () {
829
- * console.log('make')
830
- * }
831
- * pluginMethod (id: string) {
832
- * }
833
- * }
834
- *
835
- * class User extends compose(
836
- * Model,
837
- * SomePlugin,
838
- * ) {
839
- * relationPosts () {
840
- * return 'hasMany Posts'
841
- * }
842
- * }
843
- *
844
- * const user = new User()
845
- * user.make() // from Model
846
- * user.pluginMethod() // from SomePlugin
847
- * user.relationPosts() // from User
848
- *
849
- * console.log(user.pluginMethod('w')) // "plugin"
850
- * console.log(user.pluginMethod()) // "plugin"
851
- * console.log(user.relationPosts()) // "hasMany Posts"
852
- *
853
- * @param Base
854
- * @param mixins
855
- * @returns
856
- */
857
- declare function compose$1<TBase extends Constructor, TMixins extends Array<Mixin<any> | Constructor> = any>(Base: TBase, ...mixins: TMixins): Constructor<InstanceType<TBase> & TBase & UnionToIntersection<{ [K in keyof TMixins]: TMixins[K] extends Mixin<any> ? InstanceType<ReturnType<TMixins[K]>> : TMixins[K] extends Constructor ? InstanceType<TMixins[K]> : never }[number]>> & UnionToIntersection<{ [K in keyof TMixins]: TMixins[K] extends Mixin<any> ? Static<ReturnType<TMixins[K]>> : TMixins[K] extends Constructor ? Static<TMixins[K]> : never }[number]> & Static<TBase>;
858
- //#endregion
859
- //#region src/utils.d.ts
860
- declare const now: (format?: string) => string;
861
- declare const getRelationName: (relationMethod: string) => string;
862
- declare const getScopeName: (scopeMethod: string) => string;
863
- declare const getRelationMethod: (relation: string) => string;
864
- declare const getScopeMethod: (scope: string) => string;
865
- declare const getAttrMethod: (attr: string) => string;
866
- declare const getGetterMethod: (attr: string) => string;
867
- declare const getSetterMethod: (attr: string) => string;
868
- declare const getAttrName: (attrMethod: string) => string;
869
- /**
870
- * Tap into a model a collection instance
871
- *
872
- * @param instance
873
- * @param callback
874
- * @returns
875
- */
876
- declare const tap: <I>(instance: I, callback: (ins: I) => Promise<I> | I) => Promise<I> | I;
877
- declare const compose: typeof compose$1;
878
- declare const flatten: <A = any>(arr: A[]) => (A extends readonly (infer InnerArr)[] ? InnerArr : A)[];
879
- declare const flattenDeep: (arr: any) => any;
880
- declare const kebabCase: (str: string) => string;
881
- declare const snakeCase: (str: string) => string;
882
- declare const defineConfig: (config: TConfig) => XGeneric<TConfig>;
883
- //#endregion
884
- //#region types/container.d.ts
885
- interface TBaseConfig {
886
- client: 'mysql' | 'mysql2' | 'sqlite3' | 'oracle' | 'mariadb' | 'pg';
887
- connection: {
888
- typeCast?(field: TField, next: TFunction): any;
889
- dateStrings?: boolean;
890
- };
891
- pool?: {
892
- afterCreate: (connection: TConfig, callback: (val: any, con: any) => void) => Promise<any>;
893
- } | undefined;
894
- connections?: arquebus['connections'];
895
- migrations?: {
896
- table: string;
897
- path: string;
898
- };
899
- factories?: {
900
- path: string;
901
- };
902
- seeders?: {
903
- path: string;
904
- };
905
- models?: {
906
- path: string;
907
- };
908
- }
909
- type TConfig = TBaseConfig & ({
910
- client: 'pg';
911
- connection: Knex.PgConnectionConfig;
912
- } | {
913
- client: 'oracle';
914
- connection: Knex.OracleDbConnectionConfig;
915
- } | {
916
- client: 'mysql2';
917
- connection: Knex.MySql2ConnectionConfig;
918
- } | {
919
- client: 'mysql';
920
- connection: Knex.MySqlConnectionConfig;
921
- } | {
922
- client: 'sqlite3';
923
- connection: Knex.Sqlite3ConnectionConfig;
924
- useNullAsDefault?: boolean;
925
- } | {
926
- client: 'mariadb';
927
- connection: Knex.MariaSqlConnectionConfig;
928
- useNullAsDefault?: boolean;
929
- });
930
- interface ModelOptions<M extends Model$1 = Model$1> {
931
- table?: string;
932
- scopes?: TGeneric<(...args: any[]) => Builder<M>>;
933
- plugins?: (<X extends MixinConstructor<M>>(Model: X) => MixinConstructor<M>)[];
934
- relations?: TGeneric<(...args: any[]) => Relation>;
935
- attributes?: TGeneric<Attribute$1>;
936
- CREATED_AT?: string;
937
- UPDATED_AT?: string;
938
- DELETED_AT?: string;
939
- connection?: TBaseConfig['client'];
940
- timestamps?: boolean;
941
- primaryKey?: string;
942
- incrementing?: boolean;
943
- keyType?: 'int' | 'string';
944
- with?: Model$1['with'];
945
- casts?: Model$1['casts'];
946
- }
947
- interface TField {
948
- type: 'VAR_STRING' | 'BLOB' | 'DATETIME' | 'TIMESTAMP' | 'LONG' | 'JSON';
949
- length: number;
950
- db: string;
951
- table: string;
952
- name: string;
953
- string: TFunction;
954
- buffer: TFunction;
955
- geometry: TFunction;
956
- }
957
- //#endregion
958
- //#region src/browser/model.d.ts
959
- declare const BaseModel$1: (new (...args: any[]) => any) & {
960
- [x: string]: any;
961
- };
962
- declare class Model extends BaseModel$1 {
963
- protected primaryKey: string;
964
- protected perPage: number;
965
- static globalScopes: {};
966
- static pluginInitializers: {};
967
- static _booted: {};
968
- static resolver: arquebus;
969
- static browser: boolean;
970
- connection: TBaseConfig['client'] | null;
971
- constructor(attributes?: {});
972
- static init(attributes?: {}): Model;
973
- static extend(plugin: TFunction, options: TGeneric): void;
974
- static make(attributes?: TGeneric): Model;
975
- bootIfNotBooted(this: any): void;
976
- static booting(): void;
977
- static boot(): void;
978
- static booted(): void;
979
- static setConnectionResolver(resolver: arquebus): void;
980
- initialize(): void;
981
- initializePlugins(this: any): void;
982
- addPluginInitializer(this: any, method: any): void;
983
- newInstance(this: any, attributes?: TGeneric, exists?: boolean): any;
984
- asProxy(): this;
985
- getKey(): any;
986
- getKeyName(): string;
987
- getForeignKey(): string;
988
- getConnectionName(): "mysql" | "mysql2" | "sqlite3" | "oracle" | "mariadb" | "pg" | null;
989
- getTable(): any;
990
- setConnection(connection: TBaseConfig['client']): this;
991
- getKeyType(): any;
992
- hasNamedScope(name: string): boolean;
993
- callNamedScope(scope: string, parameters: any): any;
994
- setTable(table: string): this;
995
- newCollection(models?: never[]): Collection<never>;
996
- getIncrementing(): any;
997
- setIncrementing(value: boolean): this;
998
- toData(): {
999
- [x: string]: any;
1000
- [x: number]: any;
1001
- [x: symbol]: any;
1002
- };
1003
- toJSON(): {
1004
- [x: string]: any;
1005
- [x: number]: any;
1006
- [x: symbol]: any;
1007
- };
1008
- toJson(...args: any[]): string;
1009
- toString(): string;
1010
- fill(attributes: TGeneric): this;
1011
- transacting(trx: any): this;
1012
- trashed(): boolean;
1013
- newPivot<E extends Model>(parent: E, attributes: TGeneric, table: string, exists: boolean, using?: typeof Pivot | null): Pivot;
1014
- qualifyColumn(column: string): string;
1015
- getQualifiedKeyName(): string;
1016
- is(model: any): any;
1017
- isNot(model: any): boolean;
1018
- }
1019
- declare class Pivot extends Model {
1020
- incrementing: boolean;
1021
- guarded: never[];
1022
- pivotParent: Model | null;
1023
- foreignKey: string | null;
1024
- relatedKey: string | null;
1025
- setPivotKeys(foreignKey: string, relatedKey: string): this;
1026
- static fromRawAttributes<E extends Model>(parent: E, attributes: TGeneric, table: string, exists?: boolean): Pivot;
1027
- static fromAttributes<E extends Model>(parent: E, attributes: TGeneric, table: string, exists?: boolean): Pivot;
1028
- hasTimestampAttributes(this: any, attributes?: TGeneric | null): boolean;
1029
- }
1030
- //#endregion
1031
- //#region types/utils.d.ts
1032
- interface ICollection<T extends Model$1 | Model> extends Collection$1<T> {
1033
- items?: T[];
1034
- load(...relations: T[]): Promise<ICollection<T>>;
1035
- loadAggregate(relations: T | T[], column: string, action?: string | null): Promise<this>;
1036
- loadCount(relation: T, column: string): Promise<this>;
1037
- loadMax(relation: T, column: string): Promise<this>;
1038
- loadMin(relation: T, column: string): Promise<this>;
1039
- loadSum(relation: T, column: string): Promise<this>;
1040
- loadAvg(relation: T, column: string): Promise<this>;
1041
- mapThen(callback: () => void): Promise<any>;
1042
- modelKeys(): string[] | number[];
1043
- contains(key: IModel | any, operator?: any, value?: any): boolean;
1044
- diff(items: ICollection<T> | any[]): ICollection<T>;
1045
- except(keys: any[]): ICollection<T>;
1046
- intersect(items: T[]): ICollection<T>;
1047
- unique(key?: any, strict?: boolean): ICollection<T>;
1048
- find(key: any, defaultValue?: any): any;
1049
- fresh(withs?: any[]): Promise<ICollection<T>>;
1050
- makeVisible(attributes: string | string[]): this;
1051
- makeHidden(attributes: string | string[]): this;
1052
- append(attributes: string[]): this;
1053
- only(keys: null | any[]): this;
1054
- getDictionary(items?: any[]): TGeneric;
1055
- toQuery(): IBuilder<T, any>;
1056
- toData(): any;
1057
- toJSON(): any;
1058
- toJson(): string;
1059
- toString(): string;
1060
- [key: string]: any;
1061
- [Symbol.iterator]: () => Iterator<T>;
1062
- }
1063
- interface IPaginatorParams {
1064
- current_page: number;
1065
- data: any[];
1066
- per_page: number;
1067
- total: number;
1068
- last_page: number;
1069
- count: number;
1070
- paginated?: boolean;
1071
- }
1072
- interface IPaginator<T extends Model$1 | Model, K extends IPaginatorParams = IPaginatorParams> {
1073
- formatter?(paginator: IPaginator<any>): any | null;
1074
- setFormatter?(formatter: (paginator: IPaginator<any>) => any | null): void;
1075
- setItems(items: T[] | Collection$2<T>): void;
1076
- hasMorePages(): boolean;
1077
- get(index: number): T | null;
1078
- count(): number;
1079
- items(): Collection$2<T>;
1080
- map(callback: (value: T, index: number) => T): Collection$2<T>;
1081
- currentPage(): number;
1082
- perPage(): number;
1083
- lastPage(): number;
1084
- firstItem(): number | null;
1085
- lastItem(): number | null;
1086
- total(): number;
1087
- toData<U = K>(): U;
1088
- toJSON<U = K>(): U;
1089
- toJson(): string;
1090
- [Symbol.iterator]?(): {
1091
- next: () => {
1092
- value: T;
1093
- done: boolean;
1094
- };
1095
- };
1096
- }
1097
- //#endregion
1098
- //#region types/builder.d.ts
1099
- type BaseBuilder<M extends Model$1 | Model, R = ICollection<M> | IModel> = Omit<IQueryBuilder<M, R>, 'destroy' | 'clone' | 'get' | 'skip' | 'limit' | 'take' | 'offset' | 'chunk' | 'forPage' | 'orWhere' | 'pluck'>;
1100
- interface IScope {
1101
- apply(builder: Builder<any>, model: Model$1): void;
1102
- }
1103
- interface IBuilder<M extends Model$1 | Model, R = ICollection<M> | IModel> extends BaseBuilder<M, R> {
1104
- connector: IQueryBuilder<M, R> & Knex.QueryBuilder & {
1105
- _statements: any[];
1106
- _single: any;
1107
- } & Knex;
1108
- asProxy(): IQueryBuilder<M, R>;
1109
- chunk(count: number, callback: (rows: ICollection<M>) => any): Promise<boolean>;
1110
- enforceOrderBy(): void;
1111
- idOf(id: string | number): this;
1112
- clone(): IBuilder<M, R>;
1113
- forPage(page: number, perPage?: number): this;
1114
- insert(...attributes: any[]): Promise<any>;
1115
- update(attributes: any): Promise<any>;
1116
- increment(column: string, amount?: number, extra?: any): Promise<any>;
1117
- decrement(column: string, amount?: number, extra?: any): Promise<any>;
1118
- addUpdatedAtColumn(values: any): any;
1119
- delete(): Promise<boolean | number>;
1120
- softDelete(): boolean | Promise<any>;
1121
- forceDelete(): boolean | Promise<any>;
1122
- restore(): boolean | Promise<any>;
1123
- withTrashed(): this;
1124
- withoutTrashed(): this;
1125
- onlyTrashed(): this;
1126
- getDeletedAtColumn(): string;
1127
- create(attributes?: any): Promise<M>;
1128
- newModelInstance(attributes?: any): M;
1129
- count(columns?: string): Promise<number>;
1130
- getQuery(): AnyQueryBuilder;
1131
- getModel(): M;
1132
- setModel(model: M): this;
1133
- setTable(table: string): this;
1134
- applyScopes(): this;
1135
- scopes(scopes: string[]): this;
1136
- withGlobalScope(identifier: string | number, scope: string | (() => void)): this;
1137
- withoutGlobalScope(scope: IScope | string): this;
1138
- with(relation: WithRelationType): this;
1139
- with(...relations: WithRelationType[]): this;
1140
- has(relation: string, operator?: any, count?: number, boolean?: any, callback?: (builder: IBuilder<any>) => void | null): this;
1141
- orHas(relation: string, operator?: any, count?: number): this;
1142
- doesntHave(relation: string, boolean?: any, callback?: (builder: IBuilder<any>) => void | null): this;
1143
- orDoesntHave(relation: string): this;
1144
- whereHas(relation: string, callback?: (builder: IBuilder<any>) => void | IBuilder<any> | null, operator?: any, count?: number): this;
1145
- orWhere(...args: any[]): this;
1146
- orWhereHas(relation: string, callback?: (builder: IBuilder<any>) => void | IBuilder<any> | null, operator?: any, count?: number): this;
1147
- whereRelation(relation: string, column: string, operator?: any, value?: any): this;
1148
- hasNested(relation: string, operator?: any, count?: number, boolean?: any, callback?: (builder: IBuilder<any>) => void | null): this;
1149
- canUseExistsForExistenceCheck(operator: string, count: number): boolean;
1150
- addHasWhere(hasQuery: IBuilder<any>, relation: string, operator?: string, count?: number, boolean?: string): this;
1151
- withAggregate(relations: string | string[] | object, column: string, action?: string | null): this;
1152
- toSql(): object;
1153
- withCount(...relations: WithRelationType[]): this;
1154
- withMax(relation: WithRelationType, column: string): this;
1155
- withMin(relation: WithRelationType, column: string): this;
1156
- withAvg(relation: WithRelationType, column: string): this;
1157
- withSum(relation: WithRelationType, column: string): this;
1158
- withExists(relation: WithRelationType): this;
1159
- related(relation: string): this;
1160
- take(count: number): this;
1161
- skip(count: number): this;
1162
- limit(count: number): this;
1163
- offset(count: number): this;
1164
- first(column?: string | string[]): Promise<M | null | undefined>;
1165
- firstOrFail(column?: string | string[]): Promise<M>;
1166
- findOrFail(key: string | number, columns?: string[]): Promise<M>;
1167
- findOrFail(key: string[] | number[] | ICollection<any>, columns?: string[]): Promise<M>;
1168
- findOrFail(key: string | number | string[] | number[] | ICollection<any>, columns?: string[]): Promise<M>;
1169
- findOrNew(id: string | number, columns?: string[]): Promise<M>;
1170
- firstOrNew(attributes?: object, values?: object): Promise<M>;
1171
- firstOrCreate(attributes?: object, values?: object): Promise<M>;
1172
- updateOrCreate(attributes: object, values?: object): Promise<M>;
1173
- latest(column?: string): this;
1174
- oldest(column?: string): this;
1175
- find(key: string | number, columns?: string[]): Promise<M | null | undefined>;
1176
- findMany(keys: string[] | number[] | ICollection<any>, columns?: string[]): Promise<ICollection<M>>;
1177
- pluck<X extends Model$1 = any | M>(column: string): Promise<ICollection<X>>;
1178
- destroy(ids?: string | number | string[] | number[] | TFunction | ICollection<any>): Promise<number>;
1179
- get(columns?: string[]): Promise<ICollection<M>>;
1180
- all(columns?: string[]): Promise<ICollection<M>>;
1181
- paginate<F extends IPaginatorParams>(page?: number, perPage?: number): Promise<IPaginator<M, F>>;
1182
- [value: string]: any;
1183
- }
1184
- //#endregion
1185
- //#region types/query-methods.d.ts
1186
- type Operator = string;
1187
- type ColumnRef = string | Raw;
1188
- type FieldExpression = string;
1189
- type TableRef<QB extends AnyQueryBuilder> = ColumnRef | AnyQueryBuilder | CallbackVoid<QB>;
1190
- type Selection<QB extends AnyQueryBuilder> = ColumnRef | AnyQueryBuilder | CallbackVoid<QB>;
1191
- type QBOrCallback<QB extends AnyQueryBuilder> = AnyQueryBuilder | CallbackVoid<QB>;
1192
- interface CallbackVoid<T> {
1193
- (this: T, arg: T): void;
1194
- }
1195
- type Raw = Knex.Raw;
1196
- type OrderByDirection = 'asc' | 'desc' | 'ASC' | 'DESC';
1197
- interface OrderByDescriptor {
1198
- column: ColumnRef;
1199
- order?: OrderByDirection;
1200
- }
1201
- type AnyQueryBuilder<M extends Model$1 = any, R = any> = IQueryBuilder<M, R> | IBuilder<M, R>;
1202
- type Expression<T> = T | Raw | AnyQueryBuilder;
1203
- type ColumnRefOrOrderByDescriptor = ColumnRef | OrderByDescriptor;
1204
- interface RawInterface<R> {
1205
- (sql: string, ...bindings: any[]): R;
1206
- }
1207
- interface BaseSetOperations<QB extends AnyQueryBuilder> {
1208
- (callbackOrBuilder: QBOrCallback<QB>, wrap?: boolean): QB;
1209
- (callbacksOrBuilders: QBOrCallback<QB>[], wrap?: boolean): QB;
1210
- }
1211
- type JoinRawMethod<QB extends AnyQueryBuilder> = RawInterface<QB> & {};
1212
- type OrderByRawMethod<QB extends AnyQueryBuilder> = RawInterface<QB> & {};
1213
- type WhereRawMethod<QB extends AnyQueryBuilder> = RawInterface<QB> & {};
1214
- interface GroupByMethod<QB extends AnyQueryBuilder> {
1215
- (...columns: ColumnRef[]): QB;
1216
- (columns: ColumnRef[]): QB;
1217
- }
1218
- type WithRelationType = {
1219
- [key: string]: <T extends IBuilder<any>>(builder: T) => T | void;
1220
- } | string | string[];
1221
- interface SetOperationsMethod<QB extends AnyQueryBuilder> extends BaseSetOperations<QB> {
1222
- (...callbacksOrBuilders: QBOrCallback<QB>[]): QB;
1223
- }
1224
- interface SelectMethod<QB extends AnyQueryBuilder> {
1225
- <QBP extends QB>(...columns: Selection<QBP>[]): QB;
1226
- <QBP extends QB>(columns: Selection<QBP>[]): QB;
1227
- }
1228
- interface WhereMethod<QB extends AnyQueryBuilder> {
1229
- (col: ColumnRef, op: Operator, expr: Expression<PrimitiveValue>): QB;
1230
- (col: ColumnRef, expr: Expression<PrimitiveValue>): QB;
1231
- (condition: boolean): QB;
1232
- (cb: CallbackVoid<QB>): QB;
1233
- (raw: Raw): QB;
1234
- <QBA extends AnyQueryBuilder>(qb: QBA): QB;
1235
- (obj: object): QB;
1236
- }
1237
- interface WhereWrappedMethod<QB extends AnyQueryBuilder> {
1238
- (cb: CallbackVoid<QB>): QB;
1239
- }
1240
- interface WhereFieldExpressionMethod<QB extends AnyQueryBuilder> {
1241
- (fieldExpression: FieldExpression): QB;
1242
- }
1243
- interface WhereExistsMethod<QB extends AnyQueryBuilder> {
1244
- (cb: CallbackVoid<QB>): QB;
1245
- (raw: Raw): QB;
1246
- <QBA extends AnyQueryBuilder>(qb: QBA): QB;
1247
- }
1248
- interface WhereInMethod<QB extends AnyQueryBuilder> {
1249
- (col: ColumnRef | ColumnRef[], expr: Expression<PrimitiveValue>[]): QB;
1250
- (col: ColumnRef | ColumnRef[], cb: CallbackVoid<QB>): QB;
1251
- (col: ColumnRef | ColumnRef[], qb: AnyQueryBuilder): QB;
1252
- }
1253
- interface WhereBetweenMethod<QB extends AnyQueryBuilder> {
1254
- (column: ColumnRef, range: [Expression<PrimitiveValue>, Expression<PrimitiveValue>]): QB;
1255
- }
1256
- interface WhereNullMethod<QB extends AnyQueryBuilder> {
1257
- (column: ColumnRef): QB;
1258
- }
1259
- interface OrderByMethod<QB extends AnyQueryBuilder> {
1260
- (column: ColumnRef, order?: OrderByDirection): QB;
1261
- (columns: ColumnRefOrOrderByDescriptor[]): QB;
1262
- }
1263
- interface WhereJsonExpressionMethod<QB extends AnyQueryBuilder> {
1264
- (fieldExpression: FieldExpression, keys: string | string[]): QB;
1265
- }
1266
- interface ReturningMethod<QB extends AnyQueryBuilder> {
1267
- (key: FieldExpression | FieldExpression[], options?: {
1268
- [key: string]: any;
1269
- }): QB;
1270
- }
1271
- interface FirstOrFailMethod<QB extends AnyQueryBuilder> {
1272
- (): Promise<QB>;
1273
- }
1274
- interface AddSelectMethod<QB extends AnyQueryBuilder> {
1275
- (params: string[]): QB;
1276
- }
1277
- interface ForceDeleteMethod {
1278
- (): Promise<boolean | number>;
1279
- }
1280
- interface RestoreMethod {
1281
- (): Promise<number>;
1282
- }
1283
- interface WhereColumnMethod<QB extends AnyQueryBuilder> {
1284
- (col1: ColumnRef, op: Operator, col2: ColumnRef): QB;
1285
- (col1: ColumnRef, col2: ColumnRef): QB;
1286
- }
1287
- interface JoinMethod<QB extends AnyQueryBuilder> {
1288
- (table: TableRef<QB>, leftCol: ColumnRef, op: Operator, rightCol: ColumnRef): QB;
1289
- (table: TableRef<QB>, leftCol: ColumnRef, rightCol: ColumnRef): QB;
1290
- (table: TableRef<QB>, cb: CallbackVoid<Knex.JoinClause>): QB;
1291
- (table: TableRef<QB>, raw: Raw): QB;
1292
- (raw: Raw): QB;
1293
- }
1294
- interface UnionMethod<QB extends AnyQueryBuilder> extends BaseSetOperations<QB> {
1295
- (arg1: QBOrCallback<QB>, wrap?: boolean): QB;
1296
- (arg1: QBOrCallback<QB>, arg2: QBOrCallback<QB>, wrap?: boolean): QB;
1297
- (arg1: QBOrCallback<QB>, arg2: QBOrCallback<QB>, arg3: QBOrCallback<QB>, wrap?: boolean): QB;
1298
- (arg1: QBOrCallback<QB>, arg2: QBOrCallback<QB>, arg3: QBOrCallback<QB>, arg4: QBOrCallback<QB>, wrap?: boolean): QB;
1299
- (arg1: QBOrCallback<QB>, arg2: QBOrCallback<QB>, arg3: QBOrCallback<QB>, arg4: QBOrCallback<QB>, arg5: QBOrCallback<QB>, wrap?: boolean): QB;
1300
- (arg1: QBOrCallback<QB>, arg2: QBOrCallback<QB>, arg3: QBOrCallback<QB>, arg4: QBOrCallback<QB>, arg5: QBOrCallback<QB>, arg6: QBOrCallback<QB>, wrap?: boolean): QB;
1301
- (arg1: QBOrCallback<QB>, arg2: QBOrCallback<QB>, arg3: QBOrCallback<QB>, arg4: QBOrCallback<QB>, arg5: QBOrCallback<QB>, arg6: QBOrCallback<QB>, arg7: QBOrCallback<QB>, wrap?: boolean): QB;
1302
- }
1303
- interface JoinMethod<QB extends AnyQueryBuilder> {
1304
- (table: TableRef<QB>, leftCol: ColumnRef, op: Operator, rightCol: ColumnRef): QB;
1305
- (table: TableRef<QB>, leftCol: ColumnRef, rightCol: ColumnRef): QB;
1306
- (table: TableRef<QB>, cb: CallbackVoid<Knex.JoinClause>): QB;
1307
- (table: TableRef<QB>, raw: Raw): QB;
1308
- (raw: Raw): QB;
1309
- }
1310
- //#endregion
1311
- //#region src/model.d.ts
1312
- declare const BaseModel: (new (...args: any[]) => any) & {
1313
- [x: string]: any;
1314
- } & {
1315
- [x: string]: any;
1316
- attributes: any;
1317
- relations: any;
1318
- exists: boolean;
1319
- connection?: (TBaseConfig["client"] | null) | undefined;
1320
- perPage: number;
1321
- with: string | string[] | TGeneric<(...args: any[]) => IBuilder<Model$1>>;
1322
- trx: AnyQueryBuilder | null;
1323
- timestamps: boolean;
1324
- dateFormat: string;
1325
- visible: string[] & any[];
1326
- hidden: string[] & any[];
1327
- query: <T extends {
1328
- prototype: unknown;
1329
- }>(this: T, client?: AnyQueryBuilder | null) => IBuilder<Model$1>;
1330
- on: <T extends {
1331
- prototype: unknown;
1332
- }>(this: T, connection: string | null) => IBuilder<Model$1>;
1333
- boot: () => void;
1334
- make: <T extends IModel>(this: new () => T, attributes?: TGeneric) => T;
1335
- addHook: (hook: Hook, callback: TFunction) => void;
1336
- creating: (callback: TFunction) => void;
1337
- created: (callback: TFunction) => void;
1338
- updating: (callback: TFunction) => void;
1339
- updated: (callback: TFunction) => void;
1340
- deleting: (callback: TFunction) => void;
1341
- deleted: (callback: TFunction) => void;
1342
- saving: (callback: TFunction) => void;
1343
- saved: (callback: TFunction) => void;
1344
- restoring: (callback: TFunction) => void;
1345
- restored: (callback: TFunction) => void;
1346
- trashed: {
1347
- (callback: TFunction): void;
1348
- (): boolean;
1349
- };
1350
- forceDeleted: (callback: TFunction) => void;
1351
- bootIfNotBooted: () => void;
1352
- initialize: () => void;
1353
- initializePlugins: () => void;
1354
- addPluginInitializer: (method: any) => void;
1355
- newInstance: (attributes?: TGeneric, exists?: boolean) => any;
1356
- getKey: () => string | number | null | undefined;
1357
- getKeyName: () => string;
1358
- getConnectionName: () => string;
1359
- getConnection: () => any;
1360
- setConnection: (connection: TBaseConfig["client"] | null) => (new () => IModel) & IModel & {
1361
- [x: string]: any;
1362
- timestamps: boolean;
1363
- dateFormat: string;
1364
- usesTimestamps(): boolean;
1365
- updateTimestamps(): /*elided*/any;
1366
- getCreatedAtColumn(): any;
1367
- getUpdatedAtColumn(): any;
1368
- setCreatedAt(value: any): /*elided*/any;
1369
- setUpdatedAt(value: any): /*elided*/any;
1370
- freshTimestamp(): Date;
1371
- freshTimestampString(): any;
1372
- } & TGeneric<any, string> & {
1373
- [x: string]: any;
1374
- attributes: TGeneric;
1375
- original: TGeneric;
1376
- casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
1377
- changes: TGeneric;
1378
- appends: any[];
1379
- setAppends(appends: any[]): /*elided*/any;
1380
- append(...keys: any[]): /*elided*/any;
1381
- normalizeCastClassResponse(key: string, value: string): TGeneric;
1382
- syncOriginal(): /*elided*/any;
1383
- syncChanges(): /*elided*/any;
1384
- syncOriginalAttribute(attribute: string): void;
1385
- syncOriginalAttributes(...attributes: string[]): /*elided*/any;
1386
- isDirty(...attributes: string[]): boolean;
1387
- getDirty(): TGeneric;
1388
- originalIsEquivalent(key: string): boolean;
1389
- setAttributes(attributes: TGeneric): void;
1390
- setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
1391
- getAttributes(): {
1392
- [x: string]: any;
1393
- };
1394
- setAttribute(key: string, value: string): /*elided*/any;
1395
- getAttribute(key: string): any;
1396
- castAttribute(key: string, value: string): any;
1397
- attributesToData(): {
1398
- [x: string]: any;
1399
- };
1400
- mutateAttribute(key: string, value: string | null): any;
1401
- mutateAttributeForArray(_key: string, _value: string): void;
1402
- isDateAttribute(key: string): boolean;
1403
- serializeDate(date?: Date | string | null): string | null;
1404
- getDates(): any[];
1405
- getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
1406
- getCastType(key: string): any;
1407
- hasCast(key: string, types?: readonly string[]): boolean;
1408
- withDayjs(date: string): dayjs0.Dayjs;
1409
- isCustomCast(cast: any): boolean;
1410
- isCustomDateTimeCast(cast: any): boolean;
1411
- isDecimalCast(cast: any): boolean;
1412
- isDateCastable(key: string): boolean;
1413
- fromDateTime(value: string): string;
1414
- getDateFormat(): any;
1415
- asDecimal(value: string, decimals: number): string;
1416
- asDateTime(value: any): Date | null;
1417
- asDate(value: string): Date;
1418
- } & {
1419
- [x: string]: any;
1420
- hidden: any[];
1421
- visible: any[];
1422
- makeVisible(...keys: string[]): /*elided*/any;
1423
- makeHidden(key: string[], ...keys: string[]): /*elided*/any;
1424
- getHidden(): any[];
1425
- getVisible(): any[];
1426
- setHidden(hidden: any[]): /*elided*/any;
1427
- setVisible(visible: any[]): /*elided*/any;
1428
- } & {
1429
- [x: string]: any;
1430
- execHooks(hook: any, options: TGeneric): Promise<any>;
1431
- } & {
1432
- [x: string]: any;
1433
- getGlobalScopes(): {};
1434
- } & {
1435
- [x: string]: any;
1436
- useUniqueIds: boolean;
1437
- usesUniqueIds(): boolean;
1438
- uniqueIds(): never[];
1439
- setUniqueIds(): void;
1440
- };
1441
- usesUniqueIds: (() => boolean) & (() => boolean);
1442
- uniqueIds: (() => string[]) & (() => never[]);
1443
- setUniqueIds: (() => void) & (() => void);
1444
- getKeyType: () => string;
1445
- getIncrementing: () => boolean;
1446
- setIncrementing: (value: boolean) => (new () => IModel) & IModel & {
1447
- [x: string]: any;
1448
- timestamps: boolean;
1449
- dateFormat: string;
1450
- usesTimestamps(): boolean;
1451
- updateTimestamps(): /*elided*/any;
1452
- getCreatedAtColumn(): any;
1453
- getUpdatedAtColumn(): any;
1454
- setCreatedAt(value: any): /*elided*/any;
1455
- setUpdatedAt(value: any): /*elided*/any;
1456
- freshTimestamp(): Date;
1457
- freshTimestampString(): any;
1458
- } & TGeneric<any, string> & {
1459
- [x: string]: any;
1460
- attributes: TGeneric;
1461
- original: TGeneric;
1462
- casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
1463
- changes: TGeneric;
1464
- appends: any[];
1465
- setAppends(appends: any[]): /*elided*/any;
1466
- append(...keys: any[]): /*elided*/any;
1467
- normalizeCastClassResponse(key: string, value: string): TGeneric;
1468
- syncOriginal(): /*elided*/any;
1469
- syncChanges(): /*elided*/any;
1470
- syncOriginalAttribute(attribute: string): void;
1471
- syncOriginalAttributes(...attributes: string[]): /*elided*/any;
1472
- isDirty(...attributes: string[]): boolean;
1473
- getDirty(): TGeneric;
1474
- originalIsEquivalent(key: string): boolean;
1475
- setAttributes(attributes: TGeneric): void;
1476
- setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
1477
- getAttributes(): {
1478
- [x: string]: any;
1479
- };
1480
- setAttribute(key: string, value: string): /*elided*/any;
1481
- getAttribute(key: string): any;
1482
- castAttribute(key: string, value: string): any;
1483
- attributesToData(): {
1484
- [x: string]: any;
1485
- };
1486
- mutateAttribute(key: string, value: string | null): any;
1487
- mutateAttributeForArray(_key: string, _value: string): void;
1488
- isDateAttribute(key: string): boolean;
1489
- serializeDate(date?: Date | string | null): string | null;
1490
- getDates(): any[];
1491
- getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
1492
- getCastType(key: string): any;
1493
- hasCast(key: string, types?: readonly string[]): boolean;
1494
- withDayjs(date: string): dayjs0.Dayjs;
1495
- isCustomCast(cast: any): boolean;
1496
- isCustomDateTimeCast(cast: any): boolean;
1497
- isDecimalCast(cast: any): boolean;
1498
- isDateCastable(key: string): boolean;
1499
- fromDateTime(value: string): string;
1500
- getDateFormat(): any;
1501
- asDecimal(value: string, decimals: number): string;
1502
- asDateTime(value: any): Date | null;
1503
- asDate(value: string): Date;
1504
- } & {
1505
- [x: string]: any;
1506
- hidden: any[];
1507
- visible: any[];
1508
- makeVisible(...keys: string[]): /*elided*/any;
1509
- makeHidden(key: string[], ...keys: string[]): /*elided*/any;
1510
- getHidden(): any[];
1511
- getVisible(): any[];
1512
- setHidden(hidden: any[]): /*elided*/any;
1513
- setVisible(visible: any[]): /*elided*/any;
1514
- } & {
1515
- [x: string]: any;
1516
- execHooks(hook: any, options: TGeneric): Promise<any>;
1517
- } & {
1518
- [x: string]: any;
1519
- getGlobalScopes(): {};
1520
- } & {
1521
- [x: string]: any;
1522
- useUniqueIds: boolean;
1523
- usesUniqueIds(): boolean;
1524
- uniqueIds(): never[];
1525
- setUniqueIds(): void;
1526
- };
1527
- getTable: () => string;
1528
- setTable: (table: string) => (new () => IModel) & IModel & {
1529
- [x: string]: any;
1530
- timestamps: boolean;
1531
- dateFormat: string;
1532
- usesTimestamps(): boolean;
1533
- updateTimestamps(): /*elided*/any;
1534
- getCreatedAtColumn(): any;
1535
- getUpdatedAtColumn(): any;
1536
- setCreatedAt(value: any): /*elided*/any;
1537
- setUpdatedAt(value: any): /*elided*/any;
1538
- freshTimestamp(): Date;
1539
- freshTimestampString(): any;
1540
- } & TGeneric<any, string> & {
1541
- [x: string]: any;
1542
- attributes: TGeneric;
1543
- original: TGeneric;
1544
- casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
1545
- changes: TGeneric;
1546
- appends: any[];
1547
- setAppends(appends: any[]): /*elided*/any;
1548
- append(...keys: any[]): /*elided*/any;
1549
- normalizeCastClassResponse(key: string, value: string): TGeneric;
1550
- syncOriginal(): /*elided*/any;
1551
- syncChanges(): /*elided*/any;
1552
- syncOriginalAttribute(attribute: string): void;
1553
- syncOriginalAttributes(...attributes: string[]): /*elided*/any;
1554
- isDirty(...attributes: string[]): boolean;
1555
- getDirty(): TGeneric;
1556
- originalIsEquivalent(key: string): boolean;
1557
- setAttributes(attributes: TGeneric): void;
1558
- setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
1559
- getAttributes(): {
1560
- [x: string]: any;
1561
- };
1562
- setAttribute(key: string, value: string): /*elided*/any;
1563
- getAttribute(key: string): any;
1564
- castAttribute(key: string, value: string): any;
1565
- attributesToData(): {
1566
- [x: string]: any;
1567
- };
1568
- mutateAttribute(key: string, value: string | null): any;
1569
- mutateAttributeForArray(_key: string, _value: string): void;
1570
- isDateAttribute(key: string): boolean;
1571
- serializeDate(date?: Date | string | null): string | null;
1572
- getDates(): any[];
1573
- getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
1574
- getCastType(key: string): any;
1575
- hasCast(key: string, types?: readonly string[]): boolean;
1576
- withDayjs(date: string): dayjs0.Dayjs;
1577
- isCustomCast(cast: any): boolean;
1578
- isCustomDateTimeCast(cast: any): boolean;
1579
- isDecimalCast(cast: any): boolean;
1580
- isDateCastable(key: string): boolean;
1581
- fromDateTime(value: string): string;
1582
- getDateFormat(): any;
1583
- asDecimal(value: string, decimals: number): string;
1584
- asDateTime(value: any): Date | null;
1585
- asDate(value: string): Date;
1586
- } & {
1587
- [x: string]: any;
1588
- hidden: any[];
1589
- visible: any[];
1590
- makeVisible(...keys: string[]): /*elided*/any;
1591
- makeHidden(key: string[], ...keys: string[]): /*elided*/any;
1592
- getHidden(): any[];
1593
- getVisible(): any[];
1594
- setHidden(hidden: any[]): /*elided*/any;
1595
- setVisible(visible: any[]): /*elided*/any;
1596
- } & {
1597
- [x: string]: any;
1598
- execHooks(hook: any, options: TGeneric): Promise<any>;
1599
- } & {
1600
- [x: string]: any;
1601
- getGlobalScopes(): {};
1602
- } & {
1603
- [x: string]: any;
1604
- useUniqueIds: boolean;
1605
- usesUniqueIds(): boolean;
1606
- uniqueIds(): never[];
1607
- setUniqueIds(): void;
1608
- };
1609
- getDates: (() => string[]) & (() => any[]);
1610
- getDateFormat: (() => string) & (() => any);
1611
- getAttributes: (() => object) & (() => {
1612
- [x: string]: any;
1613
- });
1614
- getAttribute: ((key: string) => any) & ((key: string) => any);
1615
- setAttribute: ((key: string, value: any) => (new () => IModel) & IModel & {
1616
- [x: string]: any;
1617
- timestamps: boolean;
1618
- dateFormat: string;
1619
- usesTimestamps(): boolean;
1620
- updateTimestamps(): /*elided*/any;
1621
- getCreatedAtColumn(): any;
1622
- getUpdatedAtColumn(): any;
1623
- setCreatedAt(value: any): /*elided*/any;
1624
- setUpdatedAt(value: any): /*elided*/any;
1625
- freshTimestamp(): Date;
1626
- freshTimestampString(): any;
1627
- } & TGeneric<any, string> & {
1628
- [x: string]: any;
1629
- attributes: TGeneric;
1630
- original: TGeneric;
1631
- casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
1632
- changes: TGeneric;
1633
- appends: any[];
1634
- setAppends(appends: any[]): /*elided*/any;
1635
- append(...keys: any[]): /*elided*/any;
1636
- normalizeCastClassResponse(key: string, value: string): TGeneric;
1637
- syncOriginal(): /*elided*/any;
1638
- syncChanges(): /*elided*/any;
1639
- syncOriginalAttribute(attribute: string): void;
1640
- syncOriginalAttributes(...attributes: string[]): /*elided*/any;
1641
- isDirty(...attributes: string[]): boolean;
1642
- getDirty(): TGeneric;
1643
- originalIsEquivalent(key: string): boolean;
1644
- setAttributes(attributes: TGeneric): void;
1645
- setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
1646
- getAttributes(): {
1647
- [x: string]: any;
1648
- };
1649
- setAttribute(key: string, value: string): /*elided*/any;
1650
- getAttribute(key: string): any;
1651
- castAttribute(key: string, value: string): any;
1652
- attributesToData(): {
1653
- [x: string]: any;
1654
- };
1655
- mutateAttribute(key: string, value: string | null): any;
1656
- mutateAttributeForArray(_key: string, _value: string): void;
1657
- isDateAttribute(key: string): boolean;
1658
- serializeDate(date?: Date | string | null): string | null;
1659
- getDates(): any[];
1660
- getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
1661
- getCastType(key: string): any;
1662
- hasCast(key: string, types?: readonly string[]): boolean;
1663
- withDayjs(date: string): dayjs0.Dayjs;
1664
- isCustomCast(cast: any): boolean;
1665
- isCustomDateTimeCast(cast: any): boolean;
1666
- isDecimalCast(cast: any): boolean;
1667
- isDateCastable(key: string): boolean;
1668
- fromDateTime(value: string): string;
1669
- getDateFormat(): any;
1670
- asDecimal(value: string, decimals: number): string;
1671
- asDateTime(value: any): Date | null;
1672
- asDate(value: string): Date;
1673
- } & {
1674
- [x: string]: any;
1675
- hidden: any[];
1676
- visible: any[];
1677
- makeVisible(...keys: string[]): /*elided*/any;
1678
- makeHidden(key: string[], ...keys: string[]): /*elided*/any;
1679
- getHidden(): any[];
1680
- getVisible(): any[];
1681
- setHidden(hidden: any[]): /*elided*/any;
1682
- setVisible(visible: any[]): /*elided*/any;
1683
- } & {
1684
- [x: string]: any;
1685
- execHooks(hook: any, options: TGeneric): Promise<any>;
1686
- } & {
1687
- [x: string]: any;
1688
- getGlobalScopes(): {};
1689
- } & {
1690
- [x: string]: any;
1691
- useUniqueIds: boolean;
1692
- usesUniqueIds(): boolean;
1693
- uniqueIds(): never[];
1694
- setUniqueIds(): void;
1695
- }) & ((key: string, value: string) => (new () => IModel) & IModel & {
1696
- [x: string]: any;
1697
- timestamps: boolean;
1698
- dateFormat: string;
1699
- usesTimestamps(): boolean;
1700
- updateTimestamps(): /*elided*/any;
1701
- getCreatedAtColumn(): any;
1702
- getUpdatedAtColumn(): any;
1703
- setCreatedAt(value: any): /*elided*/any;
1704
- setUpdatedAt(value: any): /*elided*/any;
1705
- freshTimestamp(): Date;
1706
- freshTimestampString(): any;
1707
- } & TGeneric<any, string> & {
1708
- [x: string]: any;
1709
- attributes: TGeneric;
1710
- original: TGeneric;
1711
- casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
1712
- changes: TGeneric;
1713
- appends: any[];
1714
- setAppends(appends: any[]): /*elided*/any;
1715
- append(...keys: any[]): /*elided*/any;
1716
- normalizeCastClassResponse(key: string, value: string): TGeneric;
1717
- syncOriginal(): /*elided*/any;
1718
- syncChanges(): /*elided*/any;
1719
- syncOriginalAttribute(attribute: string): void;
1720
- syncOriginalAttributes(...attributes: string[]): /*elided*/any;
1721
- isDirty(...attributes: string[]): boolean;
1722
- getDirty(): TGeneric;
1723
- originalIsEquivalent(key: string): boolean;
1724
- setAttributes(attributes: TGeneric): void;
1725
- setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
1726
- getAttributes(): {
1727
- [x: string]: any;
1728
- };
1729
- setAttribute(key: string, value: string): /*elided*/any;
1730
- getAttribute(key: string): any;
1731
- castAttribute(key: string, value: string): any;
1732
- attributesToData(): {
1733
- [x: string]: any;
1734
- };
1735
- mutateAttribute(key: string, value: string | null): any;
1736
- mutateAttributeForArray(_key: string, _value: string): void;
1737
- isDateAttribute(key: string): boolean;
1738
- serializeDate(date?: Date | string | null): string | null;
1739
- getDates(): any[];
1740
- getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
1741
- getCastType(key: string): any;
1742
- hasCast(key: string, types?: readonly string[]): boolean;
1743
- withDayjs(date: string): dayjs0.Dayjs;
1744
- isCustomCast(cast: any): boolean;
1745
- isCustomDateTimeCast(cast: any): boolean;
1746
- isDecimalCast(cast: any): boolean;
1747
- isDateCastable(key: string): boolean;
1748
- fromDateTime(value: string): string;
1749
- getDateFormat(): any;
1750
- asDecimal(value: string, decimals: number): string;
1751
- asDateTime(value: any): Date | null;
1752
- asDate(value: string): Date;
1753
- } & {
1754
- [x: string]: any;
1755
- hidden: any[];
1756
- visible: any[];
1757
- makeVisible(...keys: string[]): /*elided*/any;
1758
- makeHidden(key: string[], ...keys: string[]): /*elided*/any;
1759
- getHidden(): any[];
1760
- getVisible(): any[];
1761
- setHidden(hidden: any[]): /*elided*/any;
1762
- setVisible(visible: any[]): /*elided*/any;
1763
- } & {
1764
- [x: string]: any;
1765
- execHooks(hook: any, options: TGeneric): Promise<any>;
1766
- } & {
1767
- [x: string]: any;
1768
- getGlobalScopes(): {};
1769
- } & {
1770
- [x: string]: any;
1771
- useUniqueIds: boolean;
1772
- usesUniqueIds(): boolean;
1773
- uniqueIds(): never[];
1774
- setUniqueIds(): void;
1775
- });
1776
- fill: (attributes: any) => (new () => IModel) & IModel & {
1777
- [x: string]: any;
1778
- timestamps: boolean;
1779
- dateFormat: string;
1780
- usesTimestamps(): boolean;
1781
- updateTimestamps(): /*elided*/any;
1782
- getCreatedAtColumn(): any;
1783
- getUpdatedAtColumn(): any;
1784
- setCreatedAt(value: any): /*elided*/any;
1785
- setUpdatedAt(value: any): /*elided*/any;
1786
- freshTimestamp(): Date;
1787
- freshTimestampString(): any;
1788
- } & TGeneric<any, string> & {
1789
- [x: string]: any;
1790
- attributes: TGeneric;
1791
- original: TGeneric;
1792
- casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
1793
- changes: TGeneric;
1794
- appends: any[];
1795
- setAppends(appends: any[]): /*elided*/any;
1796
- append(...keys: any[]): /*elided*/any;
1797
- normalizeCastClassResponse(key: string, value: string): TGeneric;
1798
- syncOriginal(): /*elided*/any;
1799
- syncChanges(): /*elided*/any;
1800
- syncOriginalAttribute(attribute: string): void;
1801
- syncOriginalAttributes(...attributes: string[]): /*elided*/any;
1802
- isDirty(...attributes: string[]): boolean;
1803
- getDirty(): TGeneric;
1804
- originalIsEquivalent(key: string): boolean;
1805
- setAttributes(attributes: TGeneric): void;
1806
- setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
1807
- getAttributes(): {
1808
- [x: string]: any;
1809
- };
1810
- setAttribute(key: string, value: string): /*elided*/any;
1811
- getAttribute(key: string): any;
1812
- castAttribute(key: string, value: string): any;
1813
- attributesToData(): {
1814
- [x: string]: any;
1815
- };
1816
- mutateAttribute(key: string, value: string | null): any;
1817
- mutateAttributeForArray(_key: string, _value: string): void;
1818
- isDateAttribute(key: string): boolean;
1819
- serializeDate(date?: Date | string | null): string | null;
1820
- getDates(): any[];
1821
- getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
1822
- getCastType(key: string): any;
1823
- hasCast(key: string, types?: readonly string[]): boolean;
1824
- withDayjs(date: string): dayjs0.Dayjs;
1825
- isCustomCast(cast: any): boolean;
1826
- isCustomDateTimeCast(cast: any): boolean;
1827
- isDecimalCast(cast: any): boolean;
1828
- isDateCastable(key: string): boolean;
1829
- fromDateTime(value: string): string;
1830
- getDateFormat(): any;
1831
- asDecimal(value: string, decimals: number): string;
1832
- asDateTime(value: any): Date | null;
1833
- asDate(value: string): Date;
1834
- } & {
1835
- [x: string]: any;
1836
- hidden: any[];
1837
- visible: any[];
1838
- makeVisible(...keys: string[]): /*elided*/any;
1839
- makeHidden(key: string[], ...keys: string[]): /*elided*/any;
1840
- getHidden(): any[];
1841
- getVisible(): any[];
1842
- setHidden(hidden: any[]): /*elided*/any;
1843
- setVisible(visible: any[]): /*elided*/any;
1844
- } & {
1845
- [x: string]: any;
1846
- execHooks(hook: any, options: TGeneric): Promise<any>;
1847
- } & {
1848
- [x: string]: any;
1849
- getGlobalScopes(): {};
1850
- } & {
1851
- [x: string]: any;
1852
- useUniqueIds: boolean;
1853
- usesUniqueIds(): boolean;
1854
- uniqueIds(): never[];
1855
- setUniqueIds(): void;
1856
- };
1857
- setAppends: ((appends: string[]) => (new () => IModel) & IModel & {
1858
- [x: string]: any;
1859
- timestamps: boolean;
1860
- dateFormat: string;
1861
- usesTimestamps(): boolean;
1862
- updateTimestamps(): /*elided*/any;
1863
- getCreatedAtColumn(): any;
1864
- getUpdatedAtColumn(): any;
1865
- setCreatedAt(value: any): /*elided*/any;
1866
- setUpdatedAt(value: any): /*elided*/any;
1867
- freshTimestamp(): Date;
1868
- freshTimestampString(): any;
1869
- } & TGeneric<any, string> & {
1870
- [x: string]: any;
1871
- attributes: TGeneric;
1872
- original: TGeneric;
1873
- casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
1874
- changes: TGeneric;
1875
- appends: any[];
1876
- setAppends(appends: any[]): /*elided*/any;
1877
- append(...keys: any[]): /*elided*/any;
1878
- normalizeCastClassResponse(key: string, value: string): TGeneric;
1879
- syncOriginal(): /*elided*/any;
1880
- syncChanges(): /*elided*/any;
1881
- syncOriginalAttribute(attribute: string): void;
1882
- syncOriginalAttributes(...attributes: string[]): /*elided*/any;
1883
- isDirty(...attributes: string[]): boolean;
1884
- getDirty(): TGeneric;
1885
- originalIsEquivalent(key: string): boolean;
1886
- setAttributes(attributes: TGeneric): void;
1887
- setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
1888
- getAttributes(): {
1889
- [x: string]: any;
1890
- };
1891
- setAttribute(key: string, value: string): /*elided*/any;
1892
- getAttribute(key: string): any;
1893
- castAttribute(key: string, value: string): any;
1894
- attributesToData(): {
1895
- [x: string]: any;
1896
- };
1897
- mutateAttribute(key: string, value: string | null): any;
1898
- mutateAttributeForArray(_key: string, _value: string): void;
1899
- isDateAttribute(key: string): boolean;
1900
- serializeDate(date?: Date | string | null): string | null;
1901
- getDates(): any[];
1902
- getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
1903
- getCastType(key: string): any;
1904
- hasCast(key: string, types?: readonly string[]): boolean;
1905
- withDayjs(date: string): dayjs0.Dayjs;
1906
- isCustomCast(cast: any): boolean;
1907
- isCustomDateTimeCast(cast: any): boolean;
1908
- isDecimalCast(cast: any): boolean;
1909
- isDateCastable(key: string): boolean;
1910
- fromDateTime(value: string): string;
1911
- getDateFormat(): any;
1912
- asDecimal(value: string, decimals: number): string;
1913
- asDateTime(value: any): Date | null;
1914
- asDate(value: string): Date;
1915
- } & {
1916
- [x: string]: any;
1917
- hidden: any[];
1918
- visible: any[];
1919
- makeVisible(...keys: string[]): /*elided*/any;
1920
- makeHidden(key: string[], ...keys: string[]): /*elided*/any;
1921
- getHidden(): any[];
1922
- getVisible(): any[];
1923
- setHidden(hidden: any[]): /*elided*/any;
1924
- setVisible(visible: any[]): /*elided*/any;
1925
- } & {
1926
- [x: string]: any;
1927
- execHooks(hook: any, options: TGeneric): Promise<any>;
1928
- } & {
1929
- [x: string]: any;
1930
- getGlobalScopes(): {};
1931
- } & {
1932
- [x: string]: any;
1933
- useUniqueIds: boolean;
1934
- usesUniqueIds(): boolean;
1935
- uniqueIds(): never[];
1936
- setUniqueIds(): void;
1937
- }) & ((appends: any[]) => (new () => IModel) & IModel & {
1938
- [x: string]: any;
1939
- timestamps: boolean;
1940
- dateFormat: string;
1941
- usesTimestamps(): boolean;
1942
- updateTimestamps(): /*elided*/any;
1943
- getCreatedAtColumn(): any;
1944
- getUpdatedAtColumn(): any;
1945
- setCreatedAt(value: any): /*elided*/any;
1946
- setUpdatedAt(value: any): /*elided*/any;
1947
- freshTimestamp(): Date;
1948
- freshTimestampString(): any;
1949
- } & TGeneric<any, string> & {
1950
- [x: string]: any;
1951
- attributes: TGeneric;
1952
- original: TGeneric;
1953
- casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
1954
- changes: TGeneric;
1955
- appends: any[];
1956
- setAppends(appends: any[]): /*elided*/any;
1957
- append(...keys: any[]): /*elided*/any;
1958
- normalizeCastClassResponse(key: string, value: string): TGeneric;
1959
- syncOriginal(): /*elided*/any;
1960
- syncChanges(): /*elided*/any;
1961
- syncOriginalAttribute(attribute: string): void;
1962
- syncOriginalAttributes(...attributes: string[]): /*elided*/any;
1963
- isDirty(...attributes: string[]): boolean;
1964
- getDirty(): TGeneric;
1965
- originalIsEquivalent(key: string): boolean;
1966
- setAttributes(attributes: TGeneric): void;
1967
- setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
1968
- getAttributes(): {
1969
- [x: string]: any;
1970
- };
1971
- setAttribute(key: string, value: string): /*elided*/any;
1972
- getAttribute(key: string): any;
1973
- castAttribute(key: string, value: string): any;
1974
- attributesToData(): {
1975
- [x: string]: any;
1976
- };
1977
- mutateAttribute(key: string, value: string | null): any;
1978
- mutateAttributeForArray(_key: string, _value: string): void;
1979
- isDateAttribute(key: string): boolean;
1980
- serializeDate(date?: Date | string | null): string | null;
1981
- getDates(): any[];
1982
- getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
1983
- getCastType(key: string): any;
1984
- hasCast(key: string, types?: readonly string[]): boolean;
1985
- withDayjs(date: string): dayjs0.Dayjs;
1986
- isCustomCast(cast: any): boolean;
1987
- isCustomDateTimeCast(cast: any): boolean;
1988
- isDecimalCast(cast: any): boolean;
1989
- isDateCastable(key: string): boolean;
1990
- fromDateTime(value: string): string;
1991
- getDateFormat(): any;
1992
- asDecimal(value: string, decimals: number): string;
1993
- asDateTime(value: any): Date | null;
1994
- asDate(value: string): Date;
1995
- } & {
1996
- [x: string]: any;
1997
- hidden: any[];
1998
- visible: any[];
1999
- makeVisible(...keys: string[]): /*elided*/any;
2000
- makeHidden(key: string[], ...keys: string[]): /*elided*/any;
2001
- getHidden(): any[];
2002
- getVisible(): any[];
2003
- setHidden(hidden: any[]): /*elided*/any;
2004
- setVisible(visible: any[]): /*elided*/any;
2005
- } & {
2006
- [x: string]: any;
2007
- execHooks(hook: any, options: TGeneric): Promise<any>;
2008
- } & {
2009
- [x: string]: any;
2010
- getGlobalScopes(): {};
2011
- } & {
2012
- [x: string]: any;
2013
- useUniqueIds: boolean;
2014
- usesUniqueIds(): boolean;
2015
- uniqueIds(): never[];
2016
- setUniqueIds(): void;
2017
- });
2018
- append: ((key: string | string[]) => (new () => IModel) & IModel & {
2019
- [x: string]: any;
2020
- timestamps: boolean;
2021
- dateFormat: string;
2022
- usesTimestamps(): boolean;
2023
- updateTimestamps(): /*elided*/any;
2024
- getCreatedAtColumn(): any;
2025
- getUpdatedAtColumn(): any;
2026
- setCreatedAt(value: any): /*elided*/any;
2027
- setUpdatedAt(value: any): /*elided*/any;
2028
- freshTimestamp(): Date;
2029
- freshTimestampString(): any;
2030
- } & TGeneric<any, string> & {
2031
- [x: string]: any;
2032
- attributes: TGeneric;
2033
- original: TGeneric;
2034
- casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
2035
- changes: TGeneric;
2036
- appends: any[];
2037
- setAppends(appends: any[]): /*elided*/any;
2038
- append(...keys: any[]): /*elided*/any;
2039
- normalizeCastClassResponse(key: string, value: string): TGeneric;
2040
- syncOriginal(): /*elided*/any;
2041
- syncChanges(): /*elided*/any;
2042
- syncOriginalAttribute(attribute: string): void;
2043
- syncOriginalAttributes(...attributes: string[]): /*elided*/any;
2044
- isDirty(...attributes: string[]): boolean;
2045
- getDirty(): TGeneric;
2046
- originalIsEquivalent(key: string): boolean;
2047
- setAttributes(attributes: TGeneric): void;
2048
- setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
2049
- getAttributes(): {
2050
- [x: string]: any;
2051
- };
2052
- setAttribute(key: string, value: string): /*elided*/any;
2053
- getAttribute(key: string): any;
2054
- castAttribute(key: string, value: string): any;
2055
- attributesToData(): {
2056
- [x: string]: any;
2057
- };
2058
- mutateAttribute(key: string, value: string | null): any;
2059
- mutateAttributeForArray(_key: string, _value: string): void;
2060
- isDateAttribute(key: string): boolean;
2061
- serializeDate(date?: Date | string | null): string | null;
2062
- getDates(): any[];
2063
- getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
2064
- getCastType(key: string): any;
2065
- hasCast(key: string, types?: readonly string[]): boolean;
2066
- withDayjs(date: string): dayjs0.Dayjs;
2067
- isCustomCast(cast: any): boolean;
2068
- isCustomDateTimeCast(cast: any): boolean;
2069
- isDecimalCast(cast: any): boolean;
2070
- isDateCastable(key: string): boolean;
2071
- fromDateTime(value: string): string;
2072
- getDateFormat(): any;
2073
- asDecimal(value: string, decimals: number): string;
2074
- asDateTime(value: any): Date | null;
2075
- asDate(value: string): Date;
2076
- } & {
2077
- [x: string]: any;
2078
- hidden: any[];
2079
- visible: any[];
2080
- makeVisible(...keys: string[]): /*elided*/any;
2081
- makeHidden(key: string[], ...keys: string[]): /*elided*/any;
2082
- getHidden(): any[];
2083
- getVisible(): any[];
2084
- setHidden(hidden: any[]): /*elided*/any;
2085
- setVisible(visible: any[]): /*elided*/any;
2086
- } & {
2087
- [x: string]: any;
2088
- execHooks(hook: any, options: TGeneric): Promise<any>;
2089
- } & {
2090
- [x: string]: any;
2091
- getGlobalScopes(): {};
2092
- } & {
2093
- [x: string]: any;
2094
- useUniqueIds: boolean;
2095
- usesUniqueIds(): boolean;
2096
- uniqueIds(): never[];
2097
- setUniqueIds(): void;
2098
- }) & ((...keys: any[]) => (new () => IModel) & IModel & {
2099
- [x: string]: any;
2100
- timestamps: boolean;
2101
- dateFormat: string;
2102
- usesTimestamps(): boolean;
2103
- updateTimestamps(): /*elided*/any;
2104
- getCreatedAtColumn(): any;
2105
- getUpdatedAtColumn(): any;
2106
- setCreatedAt(value: any): /*elided*/any;
2107
- setUpdatedAt(value: any): /*elided*/any;
2108
- freshTimestamp(): Date;
2109
- freshTimestampString(): any;
2110
- } & TGeneric<any, string> & {
2111
- [x: string]: any;
2112
- attributes: TGeneric;
2113
- original: TGeneric;
2114
- casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
2115
- changes: TGeneric;
2116
- appends: any[];
2117
- setAppends(appends: any[]): /*elided*/any;
2118
- append(...keys: any[]): /*elided*/any;
2119
- normalizeCastClassResponse(key: string, value: string): TGeneric;
2120
- syncOriginal(): /*elided*/any;
2121
- syncChanges(): /*elided*/any;
2122
- syncOriginalAttribute(attribute: string): void;
2123
- syncOriginalAttributes(...attributes: string[]): /*elided*/any;
2124
- isDirty(...attributes: string[]): boolean;
2125
- getDirty(): TGeneric;
2126
- originalIsEquivalent(key: string): boolean;
2127
- setAttributes(attributes: TGeneric): void;
2128
- setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
2129
- getAttributes(): {
2130
- [x: string]: any;
2131
- };
2132
- setAttribute(key: string, value: string): /*elided*/any;
2133
- getAttribute(key: string): any;
2134
- castAttribute(key: string, value: string): any;
2135
- attributesToData(): {
2136
- [x: string]: any;
2137
- };
2138
- mutateAttribute(key: string, value: string | null): any;
2139
- mutateAttributeForArray(_key: string, _value: string): void;
2140
- isDateAttribute(key: string): boolean;
2141
- serializeDate(date?: Date | string | null): string | null;
2142
- getDates(): any[];
2143
- getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
2144
- getCastType(key: string): any;
2145
- hasCast(key: string, types?: readonly string[]): boolean;
2146
- withDayjs(date: string): dayjs0.Dayjs;
2147
- isCustomCast(cast: any): boolean;
2148
- isCustomDateTimeCast(cast: any): boolean;
2149
- isDecimalCast(cast: any): boolean;
2150
- isDateCastable(key: string): boolean;
2151
- fromDateTime(value: string): string;
2152
- getDateFormat(): any;
2153
- asDecimal(value: string, decimals: number): string;
2154
- asDateTime(value: any): Date | null;
2155
- asDate(value: string): Date;
2156
- } & {
2157
- [x: string]: any;
2158
- hidden: any[];
2159
- visible: any[];
2160
- makeVisible(...keys: string[]): /*elided*/any;
2161
- makeHidden(key: string[], ...keys: string[]): /*elided*/any;
2162
- getHidden(): any[];
2163
- getVisible(): any[];
2164
- setHidden(hidden: any[]): /*elided*/any;
2165
- setVisible(visible: any[]): /*elided*/any;
2166
- } & {
2167
- [x: string]: any;
2168
- execHooks(hook: any, options: TGeneric): Promise<any>;
2169
- } & {
2170
- [x: string]: any;
2171
- getGlobalScopes(): {};
2172
- } & {
2173
- [x: string]: any;
2174
- useUniqueIds: boolean;
2175
- usesUniqueIds(): boolean;
2176
- uniqueIds(): never[];
2177
- setUniqueIds(): void;
2178
- });
2179
- getRelation: <T extends Model$1>(relation: string) => T | ICollection<T> | null | undefined;
2180
- setRelation: <T extends Model$1>(relation: string, value: T | ICollection<T> | null) => (new () => IModel) & IModel & {
2181
- [x: string]: any;
2182
- timestamps: boolean;
2183
- dateFormat: string;
2184
- usesTimestamps(): boolean;
2185
- updateTimestamps(): /*elided*/any;
2186
- getCreatedAtColumn(): any;
2187
- getUpdatedAtColumn(): any;
2188
- setCreatedAt(value: any): /*elided*/any;
2189
- setUpdatedAt(value: any): /*elided*/any;
2190
- freshTimestamp(): Date;
2191
- freshTimestampString(): any;
2192
- } & TGeneric<any, string> & {
2193
- [x: string]: any;
2194
- attributes: TGeneric;
2195
- original: TGeneric;
2196
- casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
2197
- changes: TGeneric;
2198
- appends: any[];
2199
- setAppends(appends: any[]): /*elided*/any;
2200
- append(...keys: any[]): /*elided*/any;
2201
- normalizeCastClassResponse(key: string, value: string): TGeneric;
2202
- syncOriginal(): /*elided*/any;
2203
- syncChanges(): /*elided*/any;
2204
- syncOriginalAttribute(attribute: string): void;
2205
- syncOriginalAttributes(...attributes: string[]): /*elided*/any;
2206
- isDirty(...attributes: string[]): boolean;
2207
- getDirty(): TGeneric;
2208
- originalIsEquivalent(key: string): boolean;
2209
- setAttributes(attributes: TGeneric): void;
2210
- setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
2211
- getAttributes(): {
2212
- [x: string]: any;
2213
- };
2214
- setAttribute(key: string, value: string): /*elided*/any;
2215
- getAttribute(key: string): any;
2216
- castAttribute(key: string, value: string): any;
2217
- attributesToData(): {
2218
- [x: string]: any;
2219
- };
2220
- mutateAttribute(key: string, value: string | null): any;
2221
- mutateAttributeForArray(_key: string, _value: string): void;
2222
- isDateAttribute(key: string): boolean;
2223
- serializeDate(date?: Date | string | null): string | null;
2224
- getDates(): any[];
2225
- getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
2226
- getCastType(key: string): any;
2227
- hasCast(key: string, types?: readonly string[]): boolean;
2228
- withDayjs(date: string): dayjs0.Dayjs;
2229
- isCustomCast(cast: any): boolean;
2230
- isCustomDateTimeCast(cast: any): boolean;
2231
- isDecimalCast(cast: any): boolean;
2232
- isDateCastable(key: string): boolean;
2233
- fromDateTime(value: string): string;
2234
- getDateFormat(): any;
2235
- asDecimal(value: string, decimals: number): string;
2236
- asDateTime(value: any): Date | null;
2237
- asDate(value: string): Date;
2238
- } & {
2239
- [x: string]: any;
2240
- hidden: any[];
2241
- visible: any[];
2242
- makeVisible(...keys: string[]): /*elided*/any;
2243
- makeHidden(key: string[], ...keys: string[]): /*elided*/any;
2244
- getHidden(): any[];
2245
- getVisible(): any[];
2246
- setHidden(hidden: any[]): /*elided*/any;
2247
- setVisible(visible: any[]): /*elided*/any;
2248
- } & {
2249
- [x: string]: any;
2250
- execHooks(hook: any, options: TGeneric): Promise<any>;
2251
- } & {
2252
- [x: string]: any;
2253
- getGlobalScopes(): {};
2254
- } & {
2255
- [x: string]: any;
2256
- useUniqueIds: boolean;
2257
- usesUniqueIds(): boolean;
2258
- uniqueIds(): never[];
2259
- setUniqueIds(): void;
2260
- };
2261
- unsetRelation: (relation: string) => (new () => IModel) & IModel & {
2262
- [x: string]: any;
2263
- timestamps: boolean;
2264
- dateFormat: string;
2265
- usesTimestamps(): boolean;
2266
- updateTimestamps(): /*elided*/any;
2267
- getCreatedAtColumn(): any;
2268
- getUpdatedAtColumn(): any;
2269
- setCreatedAt(value: any): /*elided*/any;
2270
- setUpdatedAt(value: any): /*elided*/any;
2271
- freshTimestamp(): Date;
2272
- freshTimestampString(): any;
2273
- } & TGeneric<any, string> & {
2274
- [x: string]: any;
2275
- attributes: TGeneric;
2276
- original: TGeneric;
2277
- casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
2278
- changes: TGeneric;
2279
- appends: any[];
2280
- setAppends(appends: any[]): /*elided*/any;
2281
- append(...keys: any[]): /*elided*/any;
2282
- normalizeCastClassResponse(key: string, value: string): TGeneric;
2283
- syncOriginal(): /*elided*/any;
2284
- syncChanges(): /*elided*/any;
2285
- syncOriginalAttribute(attribute: string): void;
2286
- syncOriginalAttributes(...attributes: string[]): /*elided*/any;
2287
- isDirty(...attributes: string[]): boolean;
2288
- getDirty(): TGeneric;
2289
- originalIsEquivalent(key: string): boolean;
2290
- setAttributes(attributes: TGeneric): void;
2291
- setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
2292
- getAttributes(): {
2293
- [x: string]: any;
2294
- };
2295
- setAttribute(key: string, value: string): /*elided*/any;
2296
- getAttribute(key: string): any;
2297
- castAttribute(key: string, value: string): any;
2298
- attributesToData(): {
2299
- [x: string]: any;
2300
- };
2301
- mutateAttribute(key: string, value: string | null): any;
2302
- mutateAttributeForArray(_key: string, _value: string): void;
2303
- isDateAttribute(key: string): boolean;
2304
- serializeDate(date?: Date | string | null): string | null;
2305
- getDates(): any[];
2306
- getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
2307
- getCastType(key: string): any;
2308
- hasCast(key: string, types?: readonly string[]): boolean;
2309
- withDayjs(date: string): dayjs0.Dayjs;
2310
- isCustomCast(cast: any): boolean;
2311
- isCustomDateTimeCast(cast: any): boolean;
2312
- isDecimalCast(cast: any): boolean;
2313
- isDateCastable(key: string): boolean;
2314
- fromDateTime(value: string): string;
2315
- getDateFormat(): any;
2316
- asDecimal(value: string, decimals: number): string;
2317
- asDateTime(value: any): Date | null;
2318
- asDate(value: string): Date;
2319
- } & {
2320
- [x: string]: any;
2321
- hidden: any[];
2322
- visible: any[];
2323
- makeVisible(...keys: string[]): /*elided*/any;
2324
- makeHidden(key: string[], ...keys: string[]): /*elided*/any;
2325
- getHidden(): any[];
2326
- getVisible(): any[];
2327
- setHidden(hidden: any[]): /*elided*/any;
2328
- setVisible(visible: any[]): /*elided*/any;
2329
- } & {
2330
- [x: string]: any;
2331
- execHooks(hook: any, options: TGeneric): Promise<any>;
2332
- } & {
2333
- [x: string]: any;
2334
- getGlobalScopes(): {};
2335
- } & {
2336
- [x: string]: any;
2337
- useUniqueIds: boolean;
2338
- usesUniqueIds(): boolean;
2339
- uniqueIds(): never[];
2340
- setUniqueIds(): void;
2341
- };
2342
- relationLoaded: (relation: string) => boolean;
2343
- makeVisible: ((attributes: string | string[]) => (new () => IModel) & IModel & {
2344
- [x: string]: any;
2345
- timestamps: boolean;
2346
- dateFormat: string;
2347
- usesTimestamps(): boolean;
2348
- updateTimestamps(): /*elided*/any;
2349
- getCreatedAtColumn(): any;
2350
- getUpdatedAtColumn(): any;
2351
- setCreatedAt(value: any): /*elided*/any;
2352
- setUpdatedAt(value: any): /*elided*/any;
2353
- freshTimestamp(): Date;
2354
- freshTimestampString(): any;
2355
- } & TGeneric<any, string> & {
2356
- [x: string]: any;
2357
- attributes: TGeneric;
2358
- original: TGeneric;
2359
- casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
2360
- changes: TGeneric;
2361
- appends: any[];
2362
- setAppends(appends: any[]): /*elided*/any;
2363
- append(...keys: any[]): /*elided*/any;
2364
- normalizeCastClassResponse(key: string, value: string): TGeneric;
2365
- syncOriginal(): /*elided*/any;
2366
- syncChanges(): /*elided*/any;
2367
- syncOriginalAttribute(attribute: string): void;
2368
- syncOriginalAttributes(...attributes: string[]): /*elided*/any;
2369
- isDirty(...attributes: string[]): boolean;
2370
- getDirty(): TGeneric;
2371
- originalIsEquivalent(key: string): boolean;
2372
- setAttributes(attributes: TGeneric): void;
2373
- setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
2374
- getAttributes(): {
2375
- [x: string]: any;
2376
- };
2377
- setAttribute(key: string, value: string): /*elided*/any;
2378
- getAttribute(key: string): any;
2379
- castAttribute(key: string, value: string): any;
2380
- attributesToData(): {
2381
- [x: string]: any;
2382
- };
2383
- mutateAttribute(key: string, value: string | null): any;
2384
- mutateAttributeForArray(_key: string, _value: string): void;
2385
- isDateAttribute(key: string): boolean;
2386
- serializeDate(date?: Date | string | null): string | null;
2387
- getDates(): any[];
2388
- getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
2389
- getCastType(key: string): any;
2390
- hasCast(key: string, types?: readonly string[]): boolean;
2391
- withDayjs(date: string): dayjs0.Dayjs;
2392
- isCustomCast(cast: any): boolean;
2393
- isCustomDateTimeCast(cast: any): boolean;
2394
- isDecimalCast(cast: any): boolean;
2395
- isDateCastable(key: string): boolean;
2396
- fromDateTime(value: string): string;
2397
- getDateFormat(): any;
2398
- asDecimal(value: string, decimals: number): string;
2399
- asDateTime(value: any): Date | null;
2400
- asDate(value: string): Date;
2401
- } & {
2402
- [x: string]: any;
2403
- hidden: any[];
2404
- visible: any[];
2405
- makeVisible(...keys: string[]): /*elided*/any;
2406
- makeHidden(key: string[], ...keys: string[]): /*elided*/any;
2407
- getHidden(): any[];
2408
- getVisible(): any[];
2409
- setHidden(hidden: any[]): /*elided*/any;
2410
- setVisible(visible: any[]): /*elided*/any;
2411
- } & {
2412
- [x: string]: any;
2413
- execHooks(hook: any, options: TGeneric): Promise<any>;
2414
- } & {
2415
- [x: string]: any;
2416
- getGlobalScopes(): {};
2417
- } & {
2418
- [x: string]: any;
2419
- useUniqueIds: boolean;
2420
- usesUniqueIds(): boolean;
2421
- uniqueIds(): never[];
2422
- setUniqueIds(): void;
2423
- }) & ((...keys: string[]) => (new () => IModel) & IModel & {
2424
- [x: string]: any;
2425
- timestamps: boolean;
2426
- dateFormat: string;
2427
- usesTimestamps(): boolean;
2428
- updateTimestamps(): /*elided*/any;
2429
- getCreatedAtColumn(): any;
2430
- getUpdatedAtColumn(): any;
2431
- setCreatedAt(value: any): /*elided*/any;
2432
- setUpdatedAt(value: any): /*elided*/any;
2433
- freshTimestamp(): Date;
2434
- freshTimestampString(): any;
2435
- } & TGeneric<any, string> & {
2436
- [x: string]: any;
2437
- attributes: TGeneric;
2438
- original: TGeneric;
2439
- casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
2440
- changes: TGeneric;
2441
- appends: any[];
2442
- setAppends(appends: any[]): /*elided*/any;
2443
- append(...keys: any[]): /*elided*/any;
2444
- normalizeCastClassResponse(key: string, value: string): TGeneric;
2445
- syncOriginal(): /*elided*/any;
2446
- syncChanges(): /*elided*/any;
2447
- syncOriginalAttribute(attribute: string): void;
2448
- syncOriginalAttributes(...attributes: string[]): /*elided*/any;
2449
- isDirty(...attributes: string[]): boolean;
2450
- getDirty(): TGeneric;
2451
- originalIsEquivalent(key: string): boolean;
2452
- setAttributes(attributes: TGeneric): void;
2453
- setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
2454
- getAttributes(): {
2455
- [x: string]: any;
2456
- };
2457
- setAttribute(key: string, value: string): /*elided*/any;
2458
- getAttribute(key: string): any;
2459
- castAttribute(key: string, value: string): any;
2460
- attributesToData(): {
2461
- [x: string]: any;
2462
- };
2463
- mutateAttribute(key: string, value: string | null): any;
2464
- mutateAttributeForArray(_key: string, _value: string): void;
2465
- isDateAttribute(key: string): boolean;
2466
- serializeDate(date?: Date | string | null): string | null;
2467
- getDates(): any[];
2468
- getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
2469
- getCastType(key: string): any;
2470
- hasCast(key: string, types?: readonly string[]): boolean;
2471
- withDayjs(date: string): dayjs0.Dayjs;
2472
- isCustomCast(cast: any): boolean;
2473
- isCustomDateTimeCast(cast: any): boolean;
2474
- isDecimalCast(cast: any): boolean;
2475
- isDateCastable(key: string): boolean;
2476
- fromDateTime(value: string): string;
2477
- getDateFormat(): any;
2478
- asDecimal(value: string, decimals: number): string;
2479
- asDateTime(value: any): Date | null;
2480
- asDate(value: string): Date;
2481
- } & {
2482
- [x: string]: any;
2483
- hidden: any[];
2484
- visible: any[];
2485
- makeVisible(...keys: string[]): /*elided*/any;
2486
- makeHidden(key: string[], ...keys: string[]): /*elided*/any;
2487
- getHidden(): any[];
2488
- getVisible(): any[];
2489
- setHidden(hidden: any[]): /*elided*/any;
2490
- setVisible(visible: any[]): /*elided*/any;
2491
- } & {
2492
- [x: string]: any;
2493
- execHooks(hook: any, options: TGeneric): Promise<any>;
2494
- } & {
2495
- [x: string]: any;
2496
- getGlobalScopes(): {};
2497
- } & {
2498
- [x: string]: any;
2499
- useUniqueIds: boolean;
2500
- usesUniqueIds(): boolean;
2501
- uniqueIds(): never[];
2502
- setUniqueIds(): void;
2503
- });
2504
- makeHidden: ((attributes: string | string[]) => (new () => IModel) & IModel & {
2505
- [x: string]: any;
2506
- timestamps: boolean;
2507
- dateFormat: string;
2508
- usesTimestamps(): boolean;
2509
- updateTimestamps(): /*elided*/any;
2510
- getCreatedAtColumn(): any;
2511
- getUpdatedAtColumn(): any;
2512
- setCreatedAt(value: any): /*elided*/any;
2513
- setUpdatedAt(value: any): /*elided*/any;
2514
- freshTimestamp(): Date;
2515
- freshTimestampString(): any;
2516
- } & TGeneric<any, string> & {
2517
- [x: string]: any;
2518
- attributes: TGeneric;
2519
- original: TGeneric;
2520
- casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
2521
- changes: TGeneric;
2522
- appends: any[];
2523
- setAppends(appends: any[]): /*elided*/any;
2524
- append(...keys: any[]): /*elided*/any;
2525
- normalizeCastClassResponse(key: string, value: string): TGeneric;
2526
- syncOriginal(): /*elided*/any;
2527
- syncChanges(): /*elided*/any;
2528
- syncOriginalAttribute(attribute: string): void;
2529
- syncOriginalAttributes(...attributes: string[]): /*elided*/any;
2530
- isDirty(...attributes: string[]): boolean;
2531
- getDirty(): TGeneric;
2532
- originalIsEquivalent(key: string): boolean;
2533
- setAttributes(attributes: TGeneric): void;
2534
- setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
2535
- getAttributes(): {
2536
- [x: string]: any;
2537
- };
2538
- setAttribute(key: string, value: string): /*elided*/any;
2539
- getAttribute(key: string): any;
2540
- castAttribute(key: string, value: string): any;
2541
- attributesToData(): {
2542
- [x: string]: any;
2543
- };
2544
- mutateAttribute(key: string, value: string | null): any;
2545
- mutateAttributeForArray(_key: string, _value: string): void;
2546
- isDateAttribute(key: string): boolean;
2547
- serializeDate(date?: Date | string | null): string | null;
2548
- getDates(): any[];
2549
- getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
2550
- getCastType(key: string): any;
2551
- hasCast(key: string, types?: readonly string[]): boolean;
2552
- withDayjs(date: string): dayjs0.Dayjs;
2553
- isCustomCast(cast: any): boolean;
2554
- isCustomDateTimeCast(cast: any): boolean;
2555
- isDecimalCast(cast: any): boolean;
2556
- isDateCastable(key: string): boolean;
2557
- fromDateTime(value: string): string;
2558
- getDateFormat(): any;
2559
- asDecimal(value: string, decimals: number): string;
2560
- asDateTime(value: any): Date | null;
2561
- asDate(value: string): Date;
2562
- } & {
2563
- [x: string]: any;
2564
- hidden: any[];
2565
- visible: any[];
2566
- makeVisible(...keys: string[]): /*elided*/any;
2567
- makeHidden(key: string[], ...keys: string[]): /*elided*/any;
2568
- getHidden(): any[];
2569
- getVisible(): any[];
2570
- setHidden(hidden: any[]): /*elided*/any;
2571
- setVisible(visible: any[]): /*elided*/any;
2572
- } & {
2573
- [x: string]: any;
2574
- execHooks(hook: any, options: TGeneric): Promise<any>;
2575
- } & {
2576
- [x: string]: any;
2577
- getGlobalScopes(): {};
2578
- } & {
2579
- [x: string]: any;
2580
- useUniqueIds: boolean;
2581
- usesUniqueIds(): boolean;
2582
- uniqueIds(): never[];
2583
- setUniqueIds(): void;
2584
- }) & ((key: string[], ...keys: string[]) => (new () => IModel) & IModel & {
2585
- [x: string]: any;
2586
- timestamps: boolean;
2587
- dateFormat: string;
2588
- usesTimestamps(): boolean;
2589
- updateTimestamps(): /*elided*/any;
2590
- getCreatedAtColumn(): any;
2591
- getUpdatedAtColumn(): any;
2592
- setCreatedAt(value: any): /*elided*/any;
2593
- setUpdatedAt(value: any): /*elided*/any;
2594
- freshTimestamp(): Date;
2595
- freshTimestampString(): any;
2596
- } & TGeneric<any, string> & {
2597
- [x: string]: any;
2598
- attributes: TGeneric;
2599
- original: TGeneric;
2600
- casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
2601
- changes: TGeneric;
2602
- appends: any[];
2603
- setAppends(appends: any[]): /*elided*/any;
2604
- append(...keys: any[]): /*elided*/any;
2605
- normalizeCastClassResponse(key: string, value: string): TGeneric;
2606
- syncOriginal(): /*elided*/any;
2607
- syncChanges(): /*elided*/any;
2608
- syncOriginalAttribute(attribute: string): void;
2609
- syncOriginalAttributes(...attributes: string[]): /*elided*/any;
2610
- isDirty(...attributes: string[]): boolean;
2611
- getDirty(): TGeneric;
2612
- originalIsEquivalent(key: string): boolean;
2613
- setAttributes(attributes: TGeneric): void;
2614
- setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
2615
- getAttributes(): {
2616
- [x: string]: any;
2617
- };
2618
- setAttribute(key: string, value: string): /*elided*/any;
2619
- getAttribute(key: string): any;
2620
- castAttribute(key: string, value: string): any;
2621
- attributesToData(): {
2622
- [x: string]: any;
2623
- };
2624
- mutateAttribute(key: string, value: string | null): any;
2625
- mutateAttributeForArray(_key: string, _value: string): void;
2626
- isDateAttribute(key: string): boolean;
2627
- serializeDate(date?: Date | string | null): string | null;
2628
- getDates(): any[];
2629
- getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
2630
- getCastType(key: string): any;
2631
- hasCast(key: string, types?: readonly string[]): boolean;
2632
- withDayjs(date: string): dayjs0.Dayjs;
2633
- isCustomCast(cast: any): boolean;
2634
- isCustomDateTimeCast(cast: any): boolean;
2635
- isDecimalCast(cast: any): boolean;
2636
- isDateCastable(key: string): boolean;
2637
- fromDateTime(value: string): string;
2638
- getDateFormat(): any;
2639
- asDecimal(value: string, decimals: number): string;
2640
- asDateTime(value: any): Date | null;
2641
- asDate(value: string): Date;
2642
- } & {
2643
- [x: string]: any;
2644
- hidden: any[];
2645
- visible: any[];
2646
- makeVisible(...keys: string[]): /*elided*/any;
2647
- makeHidden(key: string[], ...keys: string[]): /*elided*/any;
2648
- getHidden(): any[];
2649
- getVisible(): any[];
2650
- setHidden(hidden: any[]): /*elided*/any;
2651
- setVisible(visible: any[]): /*elided*/any;
2652
- } & {
2653
- [x: string]: any;
2654
- execHooks(hook: any, options: TGeneric): Promise<any>;
2655
- } & {
2656
- [x: string]: any;
2657
- getGlobalScopes(): {};
2658
- } & {
2659
- [x: string]: any;
2660
- useUniqueIds: boolean;
2661
- usesUniqueIds(): boolean;
2662
- uniqueIds(): never[];
2663
- setUniqueIds(): void;
2664
- });
2665
- newCollection: (models?: any[]) => ICollection<Model$1>;
2666
- load: {
2667
- (relations: WithRelationType): Promise<(new () => IModel) & IModel & {
2668
- [x: string]: any;
2669
- timestamps: boolean;
2670
- dateFormat: string;
2671
- usesTimestamps(): boolean;
2672
- updateTimestamps(): /*elided*/any;
2673
- getCreatedAtColumn(): any;
2674
- getUpdatedAtColumn(): any;
2675
- setCreatedAt(value: any): /*elided*/any;
2676
- setUpdatedAt(value: any): /*elided*/any;
2677
- freshTimestamp(): Date;
2678
- freshTimestampString(): any;
2679
- } & TGeneric<any, string> & {
2680
- [x: string]: any;
2681
- attributes: TGeneric;
2682
- original: TGeneric;
2683
- casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
2684
- changes: TGeneric;
2685
- appends: any[];
2686
- setAppends(appends: any[]): /*elided*/any;
2687
- append(...keys: any[]): /*elided*/any;
2688
- normalizeCastClassResponse(key: string, value: string): TGeneric;
2689
- syncOriginal(): /*elided*/any;
2690
- syncChanges(): /*elided*/any;
2691
- syncOriginalAttribute(attribute: string): void;
2692
- syncOriginalAttributes(...attributes: string[]): /*elided*/any;
2693
- isDirty(...attributes: string[]): boolean;
2694
- getDirty(): TGeneric;
2695
- originalIsEquivalent(key: string): boolean;
2696
- setAttributes(attributes: TGeneric): void;
2697
- setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
2698
- getAttributes(): {
2699
- [x: string]: any;
2700
- };
2701
- setAttribute(key: string, value: string): /*elided*/any;
2702
- getAttribute(key: string): any;
2703
- castAttribute(key: string, value: string): any;
2704
- attributesToData(): {
2705
- [x: string]: any;
2706
- };
2707
- mutateAttribute(key: string, value: string | null): any;
2708
- mutateAttributeForArray(_key: string, _value: string): void;
2709
- isDateAttribute(key: string): boolean;
2710
- serializeDate(date?: Date | string | null): string | null;
2711
- getDates(): any[];
2712
- getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
2713
- getCastType(key: string): any;
2714
- hasCast(key: string, types?: readonly string[]): boolean;
2715
- withDayjs(date: string): dayjs0.Dayjs;
2716
- isCustomCast(cast: any): boolean;
2717
- isCustomDateTimeCast(cast: any): boolean;
2718
- isDecimalCast(cast: any): boolean;
2719
- isDateCastable(key: string): boolean;
2720
- fromDateTime(value: string): string;
2721
- getDateFormat(): any;
2722
- asDecimal(value: string, decimals: number): string;
2723
- asDateTime(value: any): Date | null;
2724
- asDate(value: string): Date;
2725
- } & {
2726
- [x: string]: any;
2727
- hidden: any[];
2728
- visible: any[];
2729
- makeVisible(...keys: string[]): /*elided*/any;
2730
- makeHidden(key: string[], ...keys: string[]): /*elided*/any;
2731
- getHidden(): any[];
2732
- getVisible(): any[];
2733
- setHidden(hidden: any[]): /*elided*/any;
2734
- setVisible(visible: any[]): /*elided*/any;
2735
- } & {
2736
- [x: string]: any;
2737
- execHooks(hook: any, options: TGeneric): Promise<any>;
2738
- } & {
2739
- [x: string]: any;
2740
- getGlobalScopes(): {};
2741
- } & {
2742
- [x: string]: any;
2743
- useUniqueIds: boolean;
2744
- usesUniqueIds(): boolean;
2745
- uniqueIds(): never[];
2746
- setUniqueIds(): void;
2747
- }>;
2748
- (...relations: WithRelationType[]): Promise<(new () => IModel) & IModel & {
2749
- [x: string]: any;
2750
- timestamps: boolean;
2751
- dateFormat: string;
2752
- usesTimestamps(): boolean;
2753
- updateTimestamps(): /*elided*/any;
2754
- getCreatedAtColumn(): any;
2755
- getUpdatedAtColumn(): any;
2756
- setCreatedAt(value: any): /*elided*/any;
2757
- setUpdatedAt(value: any): /*elided*/any;
2758
- freshTimestamp(): Date;
2759
- freshTimestampString(): any;
2760
- } & TGeneric<any, string> & {
2761
- [x: string]: any;
2762
- attributes: TGeneric;
2763
- original: TGeneric;
2764
- casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
2765
- changes: TGeneric;
2766
- appends: any[];
2767
- setAppends(appends: any[]): /*elided*/any;
2768
- append(...keys: any[]): /*elided*/any;
2769
- normalizeCastClassResponse(key: string, value: string): TGeneric;
2770
- syncOriginal(): /*elided*/any;
2771
- syncChanges(): /*elided*/any;
2772
- syncOriginalAttribute(attribute: string): void;
2773
- syncOriginalAttributes(...attributes: string[]): /*elided*/any;
2774
- isDirty(...attributes: string[]): boolean;
2775
- getDirty(): TGeneric;
2776
- originalIsEquivalent(key: string): boolean;
2777
- setAttributes(attributes: TGeneric): void;
2778
- setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
2779
- getAttributes(): {
2780
- [x: string]: any;
2781
- };
2782
- setAttribute(key: string, value: string): /*elided*/any;
2783
- getAttribute(key: string): any;
2784
- castAttribute(key: string, value: string): any;
2785
- attributesToData(): {
2786
- [x: string]: any;
2787
- };
2788
- mutateAttribute(key: string, value: string | null): any;
2789
- mutateAttributeForArray(_key: string, _value: string): void;
2790
- isDateAttribute(key: string): boolean;
2791
- serializeDate(date?: Date | string | null): string | null;
2792
- getDates(): any[];
2793
- getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
2794
- getCastType(key: string): any;
2795
- hasCast(key: string, types?: readonly string[]): boolean;
2796
- withDayjs(date: string): dayjs0.Dayjs;
2797
- isCustomCast(cast: any): boolean;
2798
- isCustomDateTimeCast(cast: any): boolean;
2799
- isDecimalCast(cast: any): boolean;
2800
- isDateCastable(key: string): boolean;
2801
- fromDateTime(value: string): string;
2802
- getDateFormat(): any;
2803
- asDecimal(value: string, decimals: number): string;
2804
- asDateTime(value: any): Date | null;
2805
- asDate(value: string): Date;
2806
- } & {
2807
- [x: string]: any;
2808
- hidden: any[];
2809
- visible: any[];
2810
- makeVisible(...keys: string[]): /*elided*/any;
2811
- makeHidden(key: string[], ...keys: string[]): /*elided*/any;
2812
- getHidden(): any[];
2813
- getVisible(): any[];
2814
- setHidden(hidden: any[]): /*elided*/any;
2815
- setVisible(visible: any[]): /*elided*/any;
2816
- } & {
2817
- [x: string]: any;
2818
- execHooks(hook: any, options: TGeneric): Promise<any>;
2819
- } & {
2820
- [x: string]: any;
2821
- getGlobalScopes(): {};
2822
- } & {
2823
- [x: string]: any;
2824
- useUniqueIds: boolean;
2825
- usesUniqueIds(): boolean;
2826
- uniqueIds(): never[];
2827
- setUniqueIds(): void;
2828
- }>;
2829
- };
2830
- loadAggregate: (relations: WithRelationType, column: any, callback?: any) => Promise<(new () => IModel) & IModel & {
2831
- [x: string]: any;
2832
- timestamps: boolean;
2833
- dateFormat: string;
2834
- usesTimestamps(): boolean;
2835
- updateTimestamps(): /*elided*/any;
2836
- getCreatedAtColumn(): any;
2837
- getUpdatedAtColumn(): any;
2838
- setCreatedAt(value: any): /*elided*/any;
2839
- setUpdatedAt(value: any): /*elided*/any;
2840
- freshTimestamp(): Date;
2841
- freshTimestampString(): any;
2842
- } & TGeneric<any, string> & {
2843
- [x: string]: any;
2844
- attributes: TGeneric;
2845
- original: TGeneric;
2846
- casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
2847
- changes: TGeneric;
2848
- appends: any[];
2849
- setAppends(appends: any[]): /*elided*/any;
2850
- append(...keys: any[]): /*elided*/any;
2851
- normalizeCastClassResponse(key: string, value: string): TGeneric;
2852
- syncOriginal(): /*elided*/any;
2853
- syncChanges(): /*elided*/any;
2854
- syncOriginalAttribute(attribute: string): void;
2855
- syncOriginalAttributes(...attributes: string[]): /*elided*/any;
2856
- isDirty(...attributes: string[]): boolean;
2857
- getDirty(): TGeneric;
2858
- originalIsEquivalent(key: string): boolean;
2859
- setAttributes(attributes: TGeneric): void;
2860
- setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
2861
- getAttributes(): {
2862
- [x: string]: any;
2863
- };
2864
- setAttribute(key: string, value: string): /*elided*/any;
2865
- getAttribute(key: string): any;
2866
- castAttribute(key: string, value: string): any;
2867
- attributesToData(): {
2868
- [x: string]: any;
2869
- };
2870
- mutateAttribute(key: string, value: string | null): any;
2871
- mutateAttributeForArray(_key: string, _value: string): void;
2872
- isDateAttribute(key: string): boolean;
2873
- serializeDate(date?: Date | string | null): string | null;
2874
- getDates(): any[];
2875
- getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
2876
- getCastType(key: string): any;
2877
- hasCast(key: string, types?: readonly string[]): boolean;
2878
- withDayjs(date: string): dayjs0.Dayjs;
2879
- isCustomCast(cast: any): boolean;
2880
- isCustomDateTimeCast(cast: any): boolean;
2881
- isDecimalCast(cast: any): boolean;
2882
- isDateCastable(key: string): boolean;
2883
- fromDateTime(value: string): string;
2884
- getDateFormat(): any;
2885
- asDecimal(value: string, decimals: number): string;
2886
- asDateTime(value: any): Date | null;
2887
- asDate(value: string): Date;
2888
- } & {
2889
- [x: string]: any;
2890
- hidden: any[];
2891
- visible: any[];
2892
- makeVisible(...keys: string[]): /*elided*/any;
2893
- makeHidden(key: string[], ...keys: string[]): /*elided*/any;
2894
- getHidden(): any[];
2895
- getVisible(): any[];
2896
- setHidden(hidden: any[]): /*elided*/any;
2897
- setVisible(visible: any[]): /*elided*/any;
2898
- } & {
2899
- [x: string]: any;
2900
- execHooks(hook: any, options: TGeneric): Promise<any>;
2901
- } & {
2902
- [x: string]: any;
2903
- getGlobalScopes(): {};
2904
- } & {
2905
- [x: string]: any;
2906
- useUniqueIds: boolean;
2907
- usesUniqueIds(): boolean;
2908
- uniqueIds(): never[];
2909
- setUniqueIds(): void;
2910
- }>;
2911
- loadCount: (...relations: WithRelationType[]) => Promise<(new () => IModel) & IModel & {
2912
- [x: string]: any;
2913
- timestamps: boolean;
2914
- dateFormat: string;
2915
- usesTimestamps(): boolean;
2916
- updateTimestamps(): /*elided*/any;
2917
- getCreatedAtColumn(): any;
2918
- getUpdatedAtColumn(): any;
2919
- setCreatedAt(value: any): /*elided*/any;
2920
- setUpdatedAt(value: any): /*elided*/any;
2921
- freshTimestamp(): Date;
2922
- freshTimestampString(): any;
2923
- } & TGeneric<any, string> & {
2924
- [x: string]: any;
2925
- attributes: TGeneric;
2926
- original: TGeneric;
2927
- casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
2928
- changes: TGeneric;
2929
- appends: any[];
2930
- setAppends(appends: any[]): /*elided*/any;
2931
- append(...keys: any[]): /*elided*/any;
2932
- normalizeCastClassResponse(key: string, value: string): TGeneric;
2933
- syncOriginal(): /*elided*/any;
2934
- syncChanges(): /*elided*/any;
2935
- syncOriginalAttribute(attribute: string): void;
2936
- syncOriginalAttributes(...attributes: string[]): /*elided*/any;
2937
- isDirty(...attributes: string[]): boolean;
2938
- getDirty(): TGeneric;
2939
- originalIsEquivalent(key: string): boolean;
2940
- setAttributes(attributes: TGeneric): void;
2941
- setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
2942
- getAttributes(): {
2943
- [x: string]: any;
2944
- };
2945
- setAttribute(key: string, value: string): /*elided*/any;
2946
- getAttribute(key: string): any;
2947
- castAttribute(key: string, value: string): any;
2948
- attributesToData(): {
2949
- [x: string]: any;
2950
- };
2951
- mutateAttribute(key: string, value: string | null): any;
2952
- mutateAttributeForArray(_key: string, _value: string): void;
2953
- isDateAttribute(key: string): boolean;
2954
- serializeDate(date?: Date | string | null): string | null;
2955
- getDates(): any[];
2956
- getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
2957
- getCastType(key: string): any;
2958
- hasCast(key: string, types?: readonly string[]): boolean;
2959
- withDayjs(date: string): dayjs0.Dayjs;
2960
- isCustomCast(cast: any): boolean;
2961
- isCustomDateTimeCast(cast: any): boolean;
2962
- isDecimalCast(cast: any): boolean;
2963
- isDateCastable(key: string): boolean;
2964
- fromDateTime(value: string): string;
2965
- getDateFormat(): any;
2966
- asDecimal(value: string, decimals: number): string;
2967
- asDateTime(value: any): Date | null;
2968
- asDate(value: string): Date;
2969
- } & {
2970
- [x: string]: any;
2971
- hidden: any[];
2972
- visible: any[];
2973
- makeVisible(...keys: string[]): /*elided*/any;
2974
- makeHidden(key: string[], ...keys: string[]): /*elided*/any;
2975
- getHidden(): any[];
2976
- getVisible(): any[];
2977
- setHidden(hidden: any[]): /*elided*/any;
2978
- setVisible(visible: any[]): /*elided*/any;
2979
- } & {
2980
- [x: string]: any;
2981
- execHooks(hook: any, options: TGeneric): Promise<any>;
2982
- } & {
2983
- [x: string]: any;
2984
- getGlobalScopes(): {};
2985
- } & {
2986
- [x: string]: any;
2987
- useUniqueIds: boolean;
2988
- usesUniqueIds(): boolean;
2989
- uniqueIds(): never[];
2990
- setUniqueIds(): void;
2991
- }>;
2992
- loadMax: (relations: WithRelationType, column: string) => Promise<(new () => IModel) & IModel & {
2993
- [x: string]: any;
2994
- timestamps: boolean;
2995
- dateFormat: string;
2996
- usesTimestamps(): boolean;
2997
- updateTimestamps(): /*elided*/any;
2998
- getCreatedAtColumn(): any;
2999
- getUpdatedAtColumn(): any;
3000
- setCreatedAt(value: any): /*elided*/any;
3001
- setUpdatedAt(value: any): /*elided*/any;
3002
- freshTimestamp(): Date;
3003
- freshTimestampString(): any;
3004
- } & TGeneric<any, string> & {
3005
- [x: string]: any;
3006
- attributes: TGeneric;
3007
- original: TGeneric;
3008
- casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
3009
- changes: TGeneric;
3010
- appends: any[];
3011
- setAppends(appends: any[]): /*elided*/any;
3012
- append(...keys: any[]): /*elided*/any;
3013
- normalizeCastClassResponse(key: string, value: string): TGeneric;
3014
- syncOriginal(): /*elided*/any;
3015
- syncChanges(): /*elided*/any;
3016
- syncOriginalAttribute(attribute: string): void;
3017
- syncOriginalAttributes(...attributes: string[]): /*elided*/any;
3018
- isDirty(...attributes: string[]): boolean;
3019
- getDirty(): TGeneric;
3020
- originalIsEquivalent(key: string): boolean;
3021
- setAttributes(attributes: TGeneric): void;
3022
- setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
3023
- getAttributes(): {
3024
- [x: string]: any;
3025
- };
3026
- setAttribute(key: string, value: string): /*elided*/any;
3027
- getAttribute(key: string): any;
3028
- castAttribute(key: string, value: string): any;
3029
- attributesToData(): {
3030
- [x: string]: any;
3031
- };
3032
- mutateAttribute(key: string, value: string | null): any;
3033
- mutateAttributeForArray(_key: string, _value: string): void;
3034
- isDateAttribute(key: string): boolean;
3035
- serializeDate(date?: Date | string | null): string | null;
3036
- getDates(): any[];
3037
- getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
3038
- getCastType(key: string): any;
3039
- hasCast(key: string, types?: readonly string[]): boolean;
3040
- withDayjs(date: string): dayjs0.Dayjs;
3041
- isCustomCast(cast: any): boolean;
3042
- isCustomDateTimeCast(cast: any): boolean;
3043
- isDecimalCast(cast: any): boolean;
3044
- isDateCastable(key: string): boolean;
3045
- fromDateTime(value: string): string;
3046
- getDateFormat(): any;
3047
- asDecimal(value: string, decimals: number): string;
3048
- asDateTime(value: any): Date | null;
3049
- asDate(value: string): Date;
3050
- } & {
3051
- [x: string]: any;
3052
- hidden: any[];
3053
- visible: any[];
3054
- makeVisible(...keys: string[]): /*elided*/any;
3055
- makeHidden(key: string[], ...keys: string[]): /*elided*/any;
3056
- getHidden(): any[];
3057
- getVisible(): any[];
3058
- setHidden(hidden: any[]): /*elided*/any;
3059
- setVisible(visible: any[]): /*elided*/any;
3060
- } & {
3061
- [x: string]: any;
3062
- execHooks(hook: any, options: TGeneric): Promise<any>;
3063
- } & {
3064
- [x: string]: any;
3065
- getGlobalScopes(): {};
3066
- } & {
3067
- [x: string]: any;
3068
- useUniqueIds: boolean;
3069
- usesUniqueIds(): boolean;
3070
- uniqueIds(): never[];
3071
- setUniqueIds(): void;
3072
- }>;
3073
- loadMin: (relations: WithRelationType, column: string) => Promise<(new () => IModel) & IModel & {
3074
- [x: string]: any;
3075
- timestamps: boolean;
3076
- dateFormat: string;
3077
- usesTimestamps(): boolean;
3078
- updateTimestamps(): /*elided*/any;
3079
- getCreatedAtColumn(): any;
3080
- getUpdatedAtColumn(): any;
3081
- setCreatedAt(value: any): /*elided*/any;
3082
- setUpdatedAt(value: any): /*elided*/any;
3083
- freshTimestamp(): Date;
3084
- freshTimestampString(): any;
3085
- } & TGeneric<any, string> & {
3086
- [x: string]: any;
3087
- attributes: TGeneric;
3088
- original: TGeneric;
3089
- casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
3090
- changes: TGeneric;
3091
- appends: any[];
3092
- setAppends(appends: any[]): /*elided*/any;
3093
- append(...keys: any[]): /*elided*/any;
3094
- normalizeCastClassResponse(key: string, value: string): TGeneric;
3095
- syncOriginal(): /*elided*/any;
3096
- syncChanges(): /*elided*/any;
3097
- syncOriginalAttribute(attribute: string): void;
3098
- syncOriginalAttributes(...attributes: string[]): /*elided*/any;
3099
- isDirty(...attributes: string[]): boolean;
3100
- getDirty(): TGeneric;
3101
- originalIsEquivalent(key: string): boolean;
3102
- setAttributes(attributes: TGeneric): void;
3103
- setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
3104
- getAttributes(): {
3105
- [x: string]: any;
3106
- };
3107
- setAttribute(key: string, value: string): /*elided*/any;
3108
- getAttribute(key: string): any;
3109
- castAttribute(key: string, value: string): any;
3110
- attributesToData(): {
3111
- [x: string]: any;
3112
- };
3113
- mutateAttribute(key: string, value: string | null): any;
3114
- mutateAttributeForArray(_key: string, _value: string): void;
3115
- isDateAttribute(key: string): boolean;
3116
- serializeDate(date?: Date | string | null): string | null;
3117
- getDates(): any[];
3118
- getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
3119
- getCastType(key: string): any;
3120
- hasCast(key: string, types?: readonly string[]): boolean;
3121
- withDayjs(date: string): dayjs0.Dayjs;
3122
- isCustomCast(cast: any): boolean;
3123
- isCustomDateTimeCast(cast: any): boolean;
3124
- isDecimalCast(cast: any): boolean;
3125
- isDateCastable(key: string): boolean;
3126
- fromDateTime(value: string): string;
3127
- getDateFormat(): any;
3128
- asDecimal(value: string, decimals: number): string;
3129
- asDateTime(value: any): Date | null;
3130
- asDate(value: string): Date;
3131
- } & {
3132
- [x: string]: any;
3133
- hidden: any[];
3134
- visible: any[];
3135
- makeVisible(...keys: string[]): /*elided*/any;
3136
- makeHidden(key: string[], ...keys: string[]): /*elided*/any;
3137
- getHidden(): any[];
3138
- getVisible(): any[];
3139
- setHidden(hidden: any[]): /*elided*/any;
3140
- setVisible(visible: any[]): /*elided*/any;
3141
- } & {
3142
- [x: string]: any;
3143
- execHooks(hook: any, options: TGeneric): Promise<any>;
3144
- } & {
3145
- [x: string]: any;
3146
- getGlobalScopes(): {};
3147
- } & {
3148
- [x: string]: any;
3149
- useUniqueIds: boolean;
3150
- usesUniqueIds(): boolean;
3151
- uniqueIds(): never[];
3152
- setUniqueIds(): void;
3153
- }>;
3154
- loadSum: (relations: WithRelationType, column: string) => Promise<(new () => IModel) & IModel & {
3155
- [x: string]: any;
3156
- timestamps: boolean;
3157
- dateFormat: string;
3158
- usesTimestamps(): boolean;
3159
- updateTimestamps(): /*elided*/any;
3160
- getCreatedAtColumn(): any;
3161
- getUpdatedAtColumn(): any;
3162
- setCreatedAt(value: any): /*elided*/any;
3163
- setUpdatedAt(value: any): /*elided*/any;
3164
- freshTimestamp(): Date;
3165
- freshTimestampString(): any;
3166
- } & TGeneric<any, string> & {
3167
- [x: string]: any;
3168
- attributes: TGeneric;
3169
- original: TGeneric;
3170
- casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
3171
- changes: TGeneric;
3172
- appends: any[];
3173
- setAppends(appends: any[]): /*elided*/any;
3174
- append(...keys: any[]): /*elided*/any;
3175
- normalizeCastClassResponse(key: string, value: string): TGeneric;
3176
- syncOriginal(): /*elided*/any;
3177
- syncChanges(): /*elided*/any;
3178
- syncOriginalAttribute(attribute: string): void;
3179
- syncOriginalAttributes(...attributes: string[]): /*elided*/any;
3180
- isDirty(...attributes: string[]): boolean;
3181
- getDirty(): TGeneric;
3182
- originalIsEquivalent(key: string): boolean;
3183
- setAttributes(attributes: TGeneric): void;
3184
- setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
3185
- getAttributes(): {
3186
- [x: string]: any;
3187
- };
3188
- setAttribute(key: string, value: string): /*elided*/any;
3189
- getAttribute(key: string): any;
3190
- castAttribute(key: string, value: string): any;
3191
- attributesToData(): {
3192
- [x: string]: any;
3193
- };
3194
- mutateAttribute(key: string, value: string | null): any;
3195
- mutateAttributeForArray(_key: string, _value: string): void;
3196
- isDateAttribute(key: string): boolean;
3197
- serializeDate(date?: Date | string | null): string | null;
3198
- getDates(): any[];
3199
- getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
3200
- getCastType(key: string): any;
3201
- hasCast(key: string, types?: readonly string[]): boolean;
3202
- withDayjs(date: string): dayjs0.Dayjs;
3203
- isCustomCast(cast: any): boolean;
3204
- isCustomDateTimeCast(cast: any): boolean;
3205
- isDecimalCast(cast: any): boolean;
3206
- isDateCastable(key: string): boolean;
3207
- fromDateTime(value: string): string;
3208
- getDateFormat(): any;
3209
- asDecimal(value: string, decimals: number): string;
3210
- asDateTime(value: any): Date | null;
3211
- asDate(value: string): Date;
3212
- } & {
3213
- [x: string]: any;
3214
- hidden: any[];
3215
- visible: any[];
3216
- makeVisible(...keys: string[]): /*elided*/any;
3217
- makeHidden(key: string[], ...keys: string[]): /*elided*/any;
3218
- getHidden(): any[];
3219
- getVisible(): any[];
3220
- setHidden(hidden: any[]): /*elided*/any;
3221
- setVisible(visible: any[]): /*elided*/any;
3222
- } & {
3223
- [x: string]: any;
3224
- execHooks(hook: any, options: TGeneric): Promise<any>;
3225
- } & {
3226
- [x: string]: any;
3227
- getGlobalScopes(): {};
3228
- } & {
3229
- [x: string]: any;
3230
- useUniqueIds: boolean;
3231
- usesUniqueIds(): boolean;
3232
- uniqueIds(): never[];
3233
- setUniqueIds(): void;
3234
- }>;
3235
- usesTimestamps: (() => boolean) & (() => boolean);
3236
- updateTimestamps: (() => (new () => IModel) & IModel & {
3237
- [x: string]: any;
3238
- timestamps: boolean;
3239
- dateFormat: string;
3240
- usesTimestamps(): boolean;
3241
- updateTimestamps(): /*elided*/any;
3242
- getCreatedAtColumn(): any;
3243
- getUpdatedAtColumn(): any;
3244
- setCreatedAt(value: any): /*elided*/any;
3245
- setUpdatedAt(value: any): /*elided*/any;
3246
- freshTimestamp(): Date;
3247
- freshTimestampString(): any;
3248
- } & TGeneric<any, string> & {
3249
- [x: string]: any;
3250
- attributes: TGeneric;
3251
- original: TGeneric;
3252
- casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
3253
- changes: TGeneric;
3254
- appends: any[];
3255
- setAppends(appends: any[]): /*elided*/any;
3256
- append(...keys: any[]): /*elided*/any;
3257
- normalizeCastClassResponse(key: string, value: string): TGeneric;
3258
- syncOriginal(): /*elided*/any;
3259
- syncChanges(): /*elided*/any;
3260
- syncOriginalAttribute(attribute: string): void;
3261
- syncOriginalAttributes(...attributes: string[]): /*elided*/any;
3262
- isDirty(...attributes: string[]): boolean;
3263
- getDirty(): TGeneric;
3264
- originalIsEquivalent(key: string): boolean;
3265
- setAttributes(attributes: TGeneric): void;
3266
- setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
3267
- getAttributes(): {
3268
- [x: string]: any;
3269
- };
3270
- setAttribute(key: string, value: string): /*elided*/any;
3271
- getAttribute(key: string): any;
3272
- castAttribute(key: string, value: string): any;
3273
- attributesToData(): {
3274
- [x: string]: any;
3275
- };
3276
- mutateAttribute(key: string, value: string | null): any;
3277
- mutateAttributeForArray(_key: string, _value: string): void;
3278
- isDateAttribute(key: string): boolean;
3279
- serializeDate(date?: Date | string | null): string | null;
3280
- getDates(): any[];
3281
- getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
3282
- getCastType(key: string): any;
3283
- hasCast(key: string, types?: readonly string[]): boolean;
3284
- withDayjs(date: string): dayjs0.Dayjs;
3285
- isCustomCast(cast: any): boolean;
3286
- isCustomDateTimeCast(cast: any): boolean;
3287
- isDecimalCast(cast: any): boolean;
3288
- isDateCastable(key: string): boolean;
3289
- fromDateTime(value: string): string;
3290
- getDateFormat(): any;
3291
- asDecimal(value: string, decimals: number): string;
3292
- asDateTime(value: any): Date | null;
3293
- asDate(value: string): Date;
3294
- } & {
3295
- [x: string]: any;
3296
- hidden: any[];
3297
- visible: any[];
3298
- makeVisible(...keys: string[]): /*elided*/any;
3299
- makeHidden(key: string[], ...keys: string[]): /*elided*/any;
3300
- getHidden(): any[];
3301
- getVisible(): any[];
3302
- setHidden(hidden: any[]): /*elided*/any;
3303
- setVisible(visible: any[]): /*elided*/any;
3304
- } & {
3305
- [x: string]: any;
3306
- execHooks(hook: any, options: TGeneric): Promise<any>;
3307
- } & {
3308
- [x: string]: any;
3309
- getGlobalScopes(): {};
3310
- } & {
3311
- [x: string]: any;
3312
- useUniqueIds: boolean;
3313
- usesUniqueIds(): boolean;
3314
- uniqueIds(): never[];
3315
- setUniqueIds(): void;
3316
- }) & (() => (new () => IModel) & IModel & {
3317
- [x: string]: any;
3318
- timestamps: boolean;
3319
- dateFormat: string;
3320
- usesTimestamps(): boolean;
3321
- updateTimestamps(): /*elided*/any;
3322
- getCreatedAtColumn(): any;
3323
- getUpdatedAtColumn(): any;
3324
- setCreatedAt(value: any): /*elided*/any;
3325
- setUpdatedAt(value: any): /*elided*/any;
3326
- freshTimestamp(): Date;
3327
- freshTimestampString(): any;
3328
- } & TGeneric<any, string> & {
3329
- [x: string]: any;
3330
- attributes: TGeneric;
3331
- original: TGeneric;
3332
- casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
3333
- changes: TGeneric;
3334
- appends: any[];
3335
- setAppends(appends: any[]): /*elided*/any;
3336
- append(...keys: any[]): /*elided*/any;
3337
- normalizeCastClassResponse(key: string, value: string): TGeneric;
3338
- syncOriginal(): /*elided*/any;
3339
- syncChanges(): /*elided*/any;
3340
- syncOriginalAttribute(attribute: string): void;
3341
- syncOriginalAttributes(...attributes: string[]): /*elided*/any;
3342
- isDirty(...attributes: string[]): boolean;
3343
- getDirty(): TGeneric;
3344
- originalIsEquivalent(key: string): boolean;
3345
- setAttributes(attributes: TGeneric): void;
3346
- setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
3347
- getAttributes(): {
3348
- [x: string]: any;
3349
- };
3350
- setAttribute(key: string, value: string): /*elided*/any;
3351
- getAttribute(key: string): any;
3352
- castAttribute(key: string, value: string): any;
3353
- attributesToData(): {
3354
- [x: string]: any;
3355
- };
3356
- mutateAttribute(key: string, value: string | null): any;
3357
- mutateAttributeForArray(_key: string, _value: string): void;
3358
- isDateAttribute(key: string): boolean;
3359
- serializeDate(date?: Date | string | null): string | null;
3360
- getDates(): any[];
3361
- getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
3362
- getCastType(key: string): any;
3363
- hasCast(key: string, types?: readonly string[]): boolean;
3364
- withDayjs(date: string): dayjs0.Dayjs;
3365
- isCustomCast(cast: any): boolean;
3366
- isCustomDateTimeCast(cast: any): boolean;
3367
- isDecimalCast(cast: any): boolean;
3368
- isDateCastable(key: string): boolean;
3369
- fromDateTime(value: string): string;
3370
- getDateFormat(): any;
3371
- asDecimal(value: string, decimals: number): string;
3372
- asDateTime(value: any): Date | null;
3373
- asDate(value: string): Date;
3374
- } & {
3375
- [x: string]: any;
3376
- hidden: any[];
3377
- visible: any[];
3378
- makeVisible(...keys: string[]): /*elided*/any;
3379
- makeHidden(key: string[], ...keys: string[]): /*elided*/any;
3380
- getHidden(): any[];
3381
- getVisible(): any[];
3382
- setHidden(hidden: any[]): /*elided*/any;
3383
- setVisible(visible: any[]): /*elided*/any;
3384
- } & {
3385
- [x: string]: any;
3386
- execHooks(hook: any, options: TGeneric): Promise<any>;
3387
- } & {
3388
- [x: string]: any;
3389
- getGlobalScopes(): {};
3390
- } & {
3391
- [x: string]: any;
3392
- useUniqueIds: boolean;
3393
- usesUniqueIds(): boolean;
3394
- uniqueIds(): never[];
3395
- setUniqueIds(): void;
3396
- });
3397
- getCreatedAtColumn: (() => string) & (() => any);
3398
- getUpdatedAtColumn: (() => string) & (() => any);
3399
- getDeletedAtColumn: () => string;
3400
- setCreatedAt: ((value: string) => (new () => IModel) & IModel & {
3401
- [x: string]: any;
3402
- timestamps: boolean;
3403
- dateFormat: string;
3404
- usesTimestamps(): boolean;
3405
- updateTimestamps(): /*elided*/any;
3406
- getCreatedAtColumn(): any;
3407
- getUpdatedAtColumn(): any;
3408
- setCreatedAt(value: any): /*elided*/any;
3409
- setUpdatedAt(value: any): /*elided*/any;
3410
- freshTimestamp(): Date;
3411
- freshTimestampString(): any;
3412
- } & TGeneric<any, string> & {
3413
- [x: string]: any;
3414
- attributes: TGeneric;
3415
- original: TGeneric;
3416
- casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
3417
- changes: TGeneric;
3418
- appends: any[];
3419
- setAppends(appends: any[]): /*elided*/any;
3420
- append(...keys: any[]): /*elided*/any;
3421
- normalizeCastClassResponse(key: string, value: string): TGeneric;
3422
- syncOriginal(): /*elided*/any;
3423
- syncChanges(): /*elided*/any;
3424
- syncOriginalAttribute(attribute: string): void;
3425
- syncOriginalAttributes(...attributes: string[]): /*elided*/any;
3426
- isDirty(...attributes: string[]): boolean;
3427
- getDirty(): TGeneric;
3428
- originalIsEquivalent(key: string): boolean;
3429
- setAttributes(attributes: TGeneric): void;
3430
- setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
3431
- getAttributes(): {
3432
- [x: string]: any;
3433
- };
3434
- setAttribute(key: string, value: string): /*elided*/any;
3435
- getAttribute(key: string): any;
3436
- castAttribute(key: string, value: string): any;
3437
- attributesToData(): {
3438
- [x: string]: any;
3439
- };
3440
- mutateAttribute(key: string, value: string | null): any;
3441
- mutateAttributeForArray(_key: string, _value: string): void;
3442
- isDateAttribute(key: string): boolean;
3443
- serializeDate(date?: Date | string | null): string | null;
3444
- getDates(): any[];
3445
- getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
3446
- getCastType(key: string): any;
3447
- hasCast(key: string, types?: readonly string[]): boolean;
3448
- withDayjs(date: string): dayjs0.Dayjs;
3449
- isCustomCast(cast: any): boolean;
3450
- isCustomDateTimeCast(cast: any): boolean;
3451
- isDecimalCast(cast: any): boolean;
3452
- isDateCastable(key: string): boolean;
3453
- fromDateTime(value: string): string;
3454
- getDateFormat(): any;
3455
- asDecimal(value: string, decimals: number): string;
3456
- asDateTime(value: any): Date | null;
3457
- asDate(value: string): Date;
3458
- } & {
3459
- [x: string]: any;
3460
- hidden: any[];
3461
- visible: any[];
3462
- makeVisible(...keys: string[]): /*elided*/any;
3463
- makeHidden(key: string[], ...keys: string[]): /*elided*/any;
3464
- getHidden(): any[];
3465
- getVisible(): any[];
3466
- setHidden(hidden: any[]): /*elided*/any;
3467
- setVisible(visible: any[]): /*elided*/any;
3468
- } & {
3469
- [x: string]: any;
3470
- execHooks(hook: any, options: TGeneric): Promise<any>;
3471
- } & {
3472
- [x: string]: any;
3473
- getGlobalScopes(): {};
3474
- } & {
3475
- [x: string]: any;
3476
- useUniqueIds: boolean;
3477
- usesUniqueIds(): boolean;
3478
- uniqueIds(): never[];
3479
- setUniqueIds(): void;
3480
- }) & ((value: any) => (new () => IModel) & IModel & {
3481
- [x: string]: any;
3482
- timestamps: boolean;
3483
- dateFormat: string;
3484
- usesTimestamps(): boolean;
3485
- updateTimestamps(): /*elided*/any;
3486
- getCreatedAtColumn(): any;
3487
- getUpdatedAtColumn(): any;
3488
- setCreatedAt(value: any): /*elided*/any;
3489
- setUpdatedAt(value: any): /*elided*/any;
3490
- freshTimestamp(): Date;
3491
- freshTimestampString(): any;
3492
- } & TGeneric<any, string> & {
3493
- [x: string]: any;
3494
- attributes: TGeneric;
3495
- original: TGeneric;
3496
- casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
3497
- changes: TGeneric;
3498
- appends: any[];
3499
- setAppends(appends: any[]): /*elided*/any;
3500
- append(...keys: any[]): /*elided*/any;
3501
- normalizeCastClassResponse(key: string, value: string): TGeneric;
3502
- syncOriginal(): /*elided*/any;
3503
- syncChanges(): /*elided*/any;
3504
- syncOriginalAttribute(attribute: string): void;
3505
- syncOriginalAttributes(...attributes: string[]): /*elided*/any;
3506
- isDirty(...attributes: string[]): boolean;
3507
- getDirty(): TGeneric;
3508
- originalIsEquivalent(key: string): boolean;
3509
- setAttributes(attributes: TGeneric): void;
3510
- setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
3511
- getAttributes(): {
3512
- [x: string]: any;
3513
- };
3514
- setAttribute(key: string, value: string): /*elided*/any;
3515
- getAttribute(key: string): any;
3516
- castAttribute(key: string, value: string): any;
3517
- attributesToData(): {
3518
- [x: string]: any;
3519
- };
3520
- mutateAttribute(key: string, value: string | null): any;
3521
- mutateAttributeForArray(_key: string, _value: string): void;
3522
- isDateAttribute(key: string): boolean;
3523
- serializeDate(date?: Date | string | null): string | null;
3524
- getDates(): any[];
3525
- getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
3526
- getCastType(key: string): any;
3527
- hasCast(key: string, types?: readonly string[]): boolean;
3528
- withDayjs(date: string): dayjs0.Dayjs;
3529
- isCustomCast(cast: any): boolean;
3530
- isCustomDateTimeCast(cast: any): boolean;
3531
- isDecimalCast(cast: any): boolean;
3532
- isDateCastable(key: string): boolean;
3533
- fromDateTime(value: string): string;
3534
- getDateFormat(): any;
3535
- asDecimal(value: string, decimals: number): string;
3536
- asDateTime(value: any): Date | null;
3537
- asDate(value: string): Date;
3538
- } & {
3539
- [x: string]: any;
3540
- hidden: any[];
3541
- visible: any[];
3542
- makeVisible(...keys: string[]): /*elided*/any;
3543
- makeHidden(key: string[], ...keys: string[]): /*elided*/any;
3544
- getHidden(): any[];
3545
- getVisible(): any[];
3546
- setHidden(hidden: any[]): /*elided*/any;
3547
- setVisible(visible: any[]): /*elided*/any;
3548
- } & {
3549
- [x: string]: any;
3550
- execHooks(hook: any, options: TGeneric): Promise<any>;
3551
- } & {
3552
- [x: string]: any;
3553
- getGlobalScopes(): {};
3554
- } & {
3555
- [x: string]: any;
3556
- useUniqueIds: boolean;
3557
- usesUniqueIds(): boolean;
3558
- uniqueIds(): never[];
3559
- setUniqueIds(): void;
3560
- });
3561
- setUpdatedAt: ((value: string) => (new () => IModel) & IModel & {
3562
- [x: string]: any;
3563
- timestamps: boolean;
3564
- dateFormat: string;
3565
- usesTimestamps(): boolean;
3566
- updateTimestamps(): /*elided*/any;
3567
- getCreatedAtColumn(): any;
3568
- getUpdatedAtColumn(): any;
3569
- setCreatedAt(value: any): /*elided*/any;
3570
- setUpdatedAt(value: any): /*elided*/any;
3571
- freshTimestamp(): Date;
3572
- freshTimestampString(): any;
3573
- } & TGeneric<any, string> & {
3574
- [x: string]: any;
3575
- attributes: TGeneric;
3576
- original: TGeneric;
3577
- casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
3578
- changes: TGeneric;
3579
- appends: any[];
3580
- setAppends(appends: any[]): /*elided*/any;
3581
- append(...keys: any[]): /*elided*/any;
3582
- normalizeCastClassResponse(key: string, value: string): TGeneric;
3583
- syncOriginal(): /*elided*/any;
3584
- syncChanges(): /*elided*/any;
3585
- syncOriginalAttribute(attribute: string): void;
3586
- syncOriginalAttributes(...attributes: string[]): /*elided*/any;
3587
- isDirty(...attributes: string[]): boolean;
3588
- getDirty(): TGeneric;
3589
- originalIsEquivalent(key: string): boolean;
3590
- setAttributes(attributes: TGeneric): void;
3591
- setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
3592
- getAttributes(): {
3593
- [x: string]: any;
3594
- };
3595
- setAttribute(key: string, value: string): /*elided*/any;
3596
- getAttribute(key: string): any;
3597
- castAttribute(key: string, value: string): any;
3598
- attributesToData(): {
3599
- [x: string]: any;
3600
- };
3601
- mutateAttribute(key: string, value: string | null): any;
3602
- mutateAttributeForArray(_key: string, _value: string): void;
3603
- isDateAttribute(key: string): boolean;
3604
- serializeDate(date?: Date | string | null): string | null;
3605
- getDates(): any[];
3606
- getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
3607
- getCastType(key: string): any;
3608
- hasCast(key: string, types?: readonly string[]): boolean;
3609
- withDayjs(date: string): dayjs0.Dayjs;
3610
- isCustomCast(cast: any): boolean;
3611
- isCustomDateTimeCast(cast: any): boolean;
3612
- isDecimalCast(cast: any): boolean;
3613
- isDateCastable(key: string): boolean;
3614
- fromDateTime(value: string): string;
3615
- getDateFormat(): any;
3616
- asDecimal(value: string, decimals: number): string;
3617
- asDateTime(value: any): Date | null;
3618
- asDate(value: string): Date;
3619
- } & {
3620
- [x: string]: any;
3621
- hidden: any[];
3622
- visible: any[];
3623
- makeVisible(...keys: string[]): /*elided*/any;
3624
- makeHidden(key: string[], ...keys: string[]): /*elided*/any;
3625
- getHidden(): any[];
3626
- getVisible(): any[];
3627
- setHidden(hidden: any[]): /*elided*/any;
3628
- setVisible(visible: any[]): /*elided*/any;
3629
- } & {
3630
- [x: string]: any;
3631
- execHooks(hook: any, options: TGeneric): Promise<any>;
3632
- } & {
3633
- [x: string]: any;
3634
- getGlobalScopes(): {};
3635
- } & {
3636
- [x: string]: any;
3637
- useUniqueIds: boolean;
3638
- usesUniqueIds(): boolean;
3639
- uniqueIds(): never[];
3640
- setUniqueIds(): void;
3641
- }) & ((value: any) => (new () => IModel) & IModel & {
3642
- [x: string]: any;
3643
- timestamps: boolean;
3644
- dateFormat: string;
3645
- usesTimestamps(): boolean;
3646
- updateTimestamps(): /*elided*/any;
3647
- getCreatedAtColumn(): any;
3648
- getUpdatedAtColumn(): any;
3649
- setCreatedAt(value: any): /*elided*/any;
3650
- setUpdatedAt(value: any): /*elided*/any;
3651
- freshTimestamp(): Date;
3652
- freshTimestampString(): any;
3653
- } & TGeneric<any, string> & {
3654
- [x: string]: any;
3655
- attributes: TGeneric;
3656
- original: TGeneric;
3657
- casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
3658
- changes: TGeneric;
3659
- appends: any[];
3660
- setAppends(appends: any[]): /*elided*/any;
3661
- append(...keys: any[]): /*elided*/any;
3662
- normalizeCastClassResponse(key: string, value: string): TGeneric;
3663
- syncOriginal(): /*elided*/any;
3664
- syncChanges(): /*elided*/any;
3665
- syncOriginalAttribute(attribute: string): void;
3666
- syncOriginalAttributes(...attributes: string[]): /*elided*/any;
3667
- isDirty(...attributes: string[]): boolean;
3668
- getDirty(): TGeneric;
3669
- originalIsEquivalent(key: string): boolean;
3670
- setAttributes(attributes: TGeneric): void;
3671
- setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
3672
- getAttributes(): {
3673
- [x: string]: any;
3674
- };
3675
- setAttribute(key: string, value: string): /*elided*/any;
3676
- getAttribute(key: string): any;
3677
- castAttribute(key: string, value: string): any;
3678
- attributesToData(): {
3679
- [x: string]: any;
3680
- };
3681
- mutateAttribute(key: string, value: string | null): any;
3682
- mutateAttributeForArray(_key: string, _value: string): void;
3683
- isDateAttribute(key: string): boolean;
3684
- serializeDate(date?: Date | string | null): string | null;
3685
- getDates(): any[];
3686
- getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
3687
- getCastType(key: string): any;
3688
- hasCast(key: string, types?: readonly string[]): boolean;
3689
- withDayjs(date: string): dayjs0.Dayjs;
3690
- isCustomCast(cast: any): boolean;
3691
- isCustomDateTimeCast(cast: any): boolean;
3692
- isDecimalCast(cast: any): boolean;
3693
- isDateCastable(key: string): boolean;
3694
- fromDateTime(value: string): string;
3695
- getDateFormat(): any;
3696
- asDecimal(value: string, decimals: number): string;
3697
- asDateTime(value: any): Date | null;
3698
- asDate(value: string): Date;
3699
- } & {
3700
- [x: string]: any;
3701
- hidden: any[];
3702
- visible: any[];
3703
- makeVisible(...keys: string[]): /*elided*/any;
3704
- makeHidden(key: string[], ...keys: string[]): /*elided*/any;
3705
- getHidden(): any[];
3706
- getVisible(): any[];
3707
- setHidden(hidden: any[]): /*elided*/any;
3708
- setVisible(visible: any[]): /*elided*/any;
3709
- } & {
3710
- [x: string]: any;
3711
- execHooks(hook: any, options: TGeneric): Promise<any>;
3712
- } & {
3713
- [x: string]: any;
3714
- getGlobalScopes(): {};
3715
- } & {
3716
- [x: string]: any;
3717
- useUniqueIds: boolean;
3718
- usesUniqueIds(): boolean;
3719
- uniqueIds(): never[];
3720
- setUniqueIds(): void;
3721
- });
3722
- freshTimestamp: (() => Date) & (() => Date);
3723
- freshTimestampString: (() => string) & (() => any);
3724
- fromDateTime: ((value: Date | number | null) => string) & ((value: string) => string);
3725
- useSoftDeletes: () => boolean;
3726
- toData: () => any;
3727
- attributesToData: (() => any) & (() => {
3728
- [x: string]: any;
3729
- });
3730
- relationsToData: () => any;
3731
- toJSON: () => any;
3732
- toJson: () => string;
3733
- toString: () => string;
3734
- isDirty: ((attributes?: string | string[]) => boolean) & ((...attributes: string[]) => boolean);
3735
- getDirty: (() => string[]) & (() => TGeneric);
3736
- save: (options?: any) => Promise<boolean>;
3737
- update: (attributes?: any, options?: any) => Promise<boolean>;
3738
- increment: (column: string, amount?: number, extra?: any) => Promise<boolean>;
3739
- decrement: (column: string, amount?: number, extra?: any) => Promise<boolean>;
3740
- serializeDate: ((date: any) => string) & ((date?: Date | string | null) => string | null);
3741
- delete: (options?: any) => Promise<boolean>;
3742
- softDelete: (options?: any) => Promise<boolean>;
3743
- forceDelete: (options?: any) => Promise<boolean>;
3744
- restore: (options?: any) => Promise<boolean>;
3745
- fresh: () => Promise<(new () => IModel) & IModel & {
3746
- [x: string]: any;
3747
- timestamps: boolean;
3748
- dateFormat: string;
3749
- usesTimestamps(): boolean;
3750
- updateTimestamps(): /*elided*/any;
3751
- getCreatedAtColumn(): any;
3752
- getUpdatedAtColumn(): any;
3753
- setCreatedAt(value: any): /*elided*/any;
3754
- setUpdatedAt(value: any): /*elided*/any;
3755
- freshTimestamp(): Date;
3756
- freshTimestampString(): any;
3757
- } & TGeneric<any, string> & {
3758
- [x: string]: any;
3759
- attributes: TGeneric;
3760
- original: TGeneric;
3761
- casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
3762
- changes: TGeneric;
3763
- appends: any[];
3764
- setAppends(appends: any[]): /*elided*/any;
3765
- append(...keys: any[]): /*elided*/any;
3766
- normalizeCastClassResponse(key: string, value: string): TGeneric;
3767
- syncOriginal(): /*elided*/any;
3768
- syncChanges(): /*elided*/any;
3769
- syncOriginalAttribute(attribute: string): void;
3770
- syncOriginalAttributes(...attributes: string[]): /*elided*/any;
3771
- isDirty(...attributes: string[]): boolean;
3772
- getDirty(): TGeneric;
3773
- originalIsEquivalent(key: string): boolean;
3774
- setAttributes(attributes: TGeneric): void;
3775
- setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
3776
- getAttributes(): {
3777
- [x: string]: any;
3778
- };
3779
- setAttribute(key: string, value: string): /*elided*/any;
3780
- getAttribute(key: string): any;
3781
- castAttribute(key: string, value: string): any;
3782
- attributesToData(): {
3783
- [x: string]: any;
3784
- };
3785
- mutateAttribute(key: string, value: string | null): any;
3786
- mutateAttributeForArray(_key: string, _value: string): void;
3787
- isDateAttribute(key: string): boolean;
3788
- serializeDate(date?: Date | string | null): string | null;
3789
- getDates(): any[];
3790
- getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
3791
- getCastType(key: string): any;
3792
- hasCast(key: string, types?: readonly string[]): boolean;
3793
- withDayjs(date: string): dayjs0.Dayjs;
3794
- isCustomCast(cast: any): boolean;
3795
- isCustomDateTimeCast(cast: any): boolean;
3796
- isDecimalCast(cast: any): boolean;
3797
- isDateCastable(key: string): boolean;
3798
- fromDateTime(value: string): string;
3799
- getDateFormat(): any;
3800
- asDecimal(value: string, decimals: number): string;
3801
- asDateTime(value: any): Date | null;
3802
- asDate(value: string): Date;
3803
- } & {
3804
- [x: string]: any;
3805
- hidden: any[];
3806
- visible: any[];
3807
- makeVisible(...keys: string[]): /*elided*/any;
3808
- makeHidden(key: string[], ...keys: string[]): /*elided*/any;
3809
- getHidden(): any[];
3810
- getVisible(): any[];
3811
- setHidden(hidden: any[]): /*elided*/any;
3812
- setVisible(visible: any[]): /*elided*/any;
3813
- } & {
3814
- [x: string]: any;
3815
- execHooks(hook: any, options: TGeneric): Promise<any>;
3816
- } & {
3817
- [x: string]: any;
3818
- getGlobalScopes(): {};
3819
- } & {
3820
- [x: string]: any;
3821
- useUniqueIds: boolean;
3822
- usesUniqueIds(): boolean;
3823
- uniqueIds(): never[];
3824
- setUniqueIds(): void;
3825
- }>;
3826
- refresh: () => Promise<((new () => IModel) & IModel & {
3827
- [x: string]: any;
3828
- timestamps: boolean;
3829
- dateFormat: string;
3830
- usesTimestamps(): boolean;
3831
- updateTimestamps(): /*elided*/any;
3832
- getCreatedAtColumn(): any;
3833
- getUpdatedAtColumn(): any;
3834
- setCreatedAt(value: any): /*elided*/any;
3835
- setUpdatedAt(value: any): /*elided*/any;
3836
- freshTimestamp(): Date;
3837
- freshTimestampString(): any;
3838
- } & TGeneric<any, string> & {
3839
- [x: string]: any;
3840
- attributes: TGeneric;
3841
- original: TGeneric;
3842
- casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
3843
- changes: TGeneric;
3844
- appends: any[];
3845
- setAppends(appends: any[]): /*elided*/any;
3846
- append(...keys: any[]): /*elided*/any;
3847
- normalizeCastClassResponse(key: string, value: string): TGeneric;
3848
- syncOriginal(): /*elided*/any;
3849
- syncChanges(): /*elided*/any;
3850
- syncOriginalAttribute(attribute: string): void;
3851
- syncOriginalAttributes(...attributes: string[]): /*elided*/any;
3852
- isDirty(...attributes: string[]): boolean;
3853
- getDirty(): TGeneric;
3854
- originalIsEquivalent(key: string): boolean;
3855
- setAttributes(attributes: TGeneric): void;
3856
- setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
3857
- getAttributes(): {
3858
- [x: string]: any;
3859
- };
3860
- setAttribute(key: string, value: string): /*elided*/any;
3861
- getAttribute(key: string): any;
3862
- castAttribute(key: string, value: string): any;
3863
- attributesToData(): {
3864
- [x: string]: any;
3865
- };
3866
- mutateAttribute(key: string, value: string | null): any;
3867
- mutateAttributeForArray(_key: string, _value: string): void;
3868
- isDateAttribute(key: string): boolean;
3869
- serializeDate(date?: Date | string | null): string | null;
3870
- getDates(): any[];
3871
- getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
3872
- getCastType(key: string): any;
3873
- hasCast(key: string, types?: readonly string[]): boolean;
3874
- withDayjs(date: string): dayjs0.Dayjs;
3875
- isCustomCast(cast: any): boolean;
3876
- isCustomDateTimeCast(cast: any): boolean;
3877
- isDecimalCast(cast: any): boolean;
3878
- isDateCastable(key: string): boolean;
3879
- fromDateTime(value: string): string;
3880
- getDateFormat(): any;
3881
- asDecimal(value: string, decimals: number): string;
3882
- asDateTime(value: any): Date | null;
3883
- asDate(value: string): Date;
3884
- } & {
3885
- [x: string]: any;
3886
- hidden: any[];
3887
- visible: any[];
3888
- makeVisible(...keys: string[]): /*elided*/any;
3889
- makeHidden(key: string[], ...keys: string[]): /*elided*/any;
3890
- getHidden(): any[];
3891
- getVisible(): any[];
3892
- setHidden(hidden: any[]): /*elided*/any;
3893
- setVisible(visible: any[]): /*elided*/any;
3894
- } & {
3895
- [x: string]: any;
3896
- execHooks(hook: any, options: TGeneric): Promise<any>;
3897
- } & {
3898
- [x: string]: any;
3899
- getGlobalScopes(): {};
3900
- } & {
3901
- [x: string]: any;
3902
- useUniqueIds: boolean;
3903
- usesUniqueIds(): boolean;
3904
- uniqueIds(): never[];
3905
- setUniqueIds(): void;
3906
- }) | undefined>;
3907
- push: () => Promise<boolean>;
3908
- is: (model: (new () => IModel) & IModel & {
3909
- [x: string]: any;
3910
- timestamps: boolean;
3911
- dateFormat: string;
3912
- usesTimestamps(): boolean;
3913
- updateTimestamps(): /*elided*/any;
3914
- getCreatedAtColumn(): any;
3915
- getUpdatedAtColumn(): any;
3916
- setCreatedAt(value: any): /*elided*/any;
3917
- setUpdatedAt(value: any): /*elided*/any;
3918
- freshTimestamp(): Date;
3919
- freshTimestampString(): any;
3920
- } & TGeneric<any, string> & {
3921
- [x: string]: any;
3922
- attributes: TGeneric;
3923
- original: TGeneric;
3924
- casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
3925
- changes: TGeneric;
3926
- appends: any[];
3927
- setAppends(appends: any[]): /*elided*/any;
3928
- append(...keys: any[]): /*elided*/any;
3929
- normalizeCastClassResponse(key: string, value: string): TGeneric;
3930
- syncOriginal(): /*elided*/any;
3931
- syncChanges(): /*elided*/any;
3932
- syncOriginalAttribute(attribute: string): void;
3933
- syncOriginalAttributes(...attributes: string[]): /*elided*/any;
3934
- isDirty(...attributes: string[]): boolean;
3935
- getDirty(): TGeneric;
3936
- originalIsEquivalent(key: string): boolean;
3937
- setAttributes(attributes: TGeneric): void;
3938
- setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
3939
- getAttributes(): {
3940
- [x: string]: any;
3941
- };
3942
- setAttribute(key: string, value: string): /*elided*/any;
3943
- getAttribute(key: string): any;
3944
- castAttribute(key: string, value: string): any;
3945
- attributesToData(): {
3946
- [x: string]: any;
3947
- };
3948
- mutateAttribute(key: string, value: string | null): any;
3949
- mutateAttributeForArray(_key: string, _value: string): void;
3950
- isDateAttribute(key: string): boolean;
3951
- serializeDate(date?: Date | string | null): string | null;
3952
- getDates(): any[];
3953
- getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
3954
- getCastType(key: string): any;
3955
- hasCast(key: string, types?: readonly string[]): boolean;
3956
- withDayjs(date: string): dayjs0.Dayjs;
3957
- isCustomCast(cast: any): boolean;
3958
- isCustomDateTimeCast(cast: any): boolean;
3959
- isDecimalCast(cast: any): boolean;
3960
- isDateCastable(key: string): boolean;
3961
- fromDateTime(value: string): string;
3962
- getDateFormat(): any;
3963
- asDecimal(value: string, decimals: number): string;
3964
- asDateTime(value: any): Date | null;
3965
- asDate(value: string): Date;
3966
- } & {
3967
- [x: string]: any;
3968
- hidden: any[];
3969
- visible: any[];
3970
- makeVisible(...keys: string[]): /*elided*/any;
3971
- makeHidden(key: string[], ...keys: string[]): /*elided*/any;
3972
- getHidden(): any[];
3973
- getVisible(): any[];
3974
- setHidden(hidden: any[]): /*elided*/any;
3975
- setVisible(visible: any[]): /*elided*/any;
3976
- } & {
3977
- [x: string]: any;
3978
- execHooks(hook: any, options: TGeneric): Promise<any>;
3979
- } & {
3980
- [x: string]: any;
3981
- getGlobalScopes(): {};
3982
- } & {
3983
- [x: string]: any;
3984
- useUniqueIds: boolean;
3985
- usesUniqueIds(): boolean;
3986
- uniqueIds(): never[];
3987
- setUniqueIds(): void;
3988
- }) => boolean;
3989
- isNot: (model: (new () => IModel) & IModel & {
3990
- [x: string]: any;
3991
- timestamps: boolean;
3992
- dateFormat: string;
3993
- usesTimestamps(): boolean;
3994
- updateTimestamps(): /*elided*/any;
3995
- getCreatedAtColumn(): any;
3996
- getUpdatedAtColumn(): any;
3997
- setCreatedAt(value: any): /*elided*/any;
3998
- setUpdatedAt(value: any): /*elided*/any;
3999
- freshTimestamp(): Date;
4000
- freshTimestampString(): any;
4001
- } & TGeneric<any, string> & {
4002
- [x: string]: any;
4003
- attributes: TGeneric;
4004
- original: TGeneric;
4005
- casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
4006
- changes: TGeneric;
4007
- appends: any[];
4008
- setAppends(appends: any[]): /*elided*/any;
4009
- append(...keys: any[]): /*elided*/any;
4010
- normalizeCastClassResponse(key: string, value: string): TGeneric;
4011
- syncOriginal(): /*elided*/any;
4012
- syncChanges(): /*elided*/any;
4013
- syncOriginalAttribute(attribute: string): void;
4014
- syncOriginalAttributes(...attributes: string[]): /*elided*/any;
4015
- isDirty(...attributes: string[]): boolean;
4016
- getDirty(): TGeneric;
4017
- originalIsEquivalent(key: string): boolean;
4018
- setAttributes(attributes: TGeneric): void;
4019
- setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
4020
- getAttributes(): {
4021
- [x: string]: any;
4022
- };
4023
- setAttribute(key: string, value: string): /*elided*/any;
4024
- getAttribute(key: string): any;
4025
- castAttribute(key: string, value: string): any;
4026
- attributesToData(): {
4027
- [x: string]: any;
4028
- };
4029
- mutateAttribute(key: string, value: string | null): any;
4030
- mutateAttributeForArray(_key: string, _value: string): void;
4031
- isDateAttribute(key: string): boolean;
4032
- serializeDate(date?: Date | string | null): string | null;
4033
- getDates(): any[];
4034
- getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
4035
- getCastType(key: string): any;
4036
- hasCast(key: string, types?: readonly string[]): boolean;
4037
- withDayjs(date: string): dayjs0.Dayjs;
4038
- isCustomCast(cast: any): boolean;
4039
- isCustomDateTimeCast(cast: any): boolean;
4040
- isDecimalCast(cast: any): boolean;
4041
- isDateCastable(key: string): boolean;
4042
- fromDateTime(value: string): string;
4043
- getDateFormat(): any;
4044
- asDecimal(value: string, decimals: number): string;
4045
- asDateTime(value: any): Date | null;
4046
- asDate(value: string): Date;
4047
- } & {
4048
- [x: string]: any;
4049
- hidden: any[];
4050
- visible: any[];
4051
- makeVisible(...keys: string[]): /*elided*/any;
4052
- makeHidden(key: string[], ...keys: string[]): /*elided*/any;
4053
- getHidden(): any[];
4054
- getVisible(): any[];
4055
- setHidden(hidden: any[]): /*elided*/any;
4056
- setVisible(visible: any[]): /*elided*/any;
4057
- } & {
4058
- [x: string]: any;
4059
- execHooks(hook: any, options: TGeneric): Promise<any>;
4060
- } & {
4061
- [x: string]: any;
4062
- getGlobalScopes(): {};
4063
- } & {
4064
- [x: string]: any;
4065
- useUniqueIds: boolean;
4066
- usesUniqueIds(): boolean;
4067
- uniqueIds(): never[];
4068
- setUniqueIds(): void;
4069
- }) => boolean;
4070
- related: <T extends never>(relation: T) => ReturnTypeOfMethod<(new () => IModel) & IModel & {
4071
- [x: string]: any;
4072
- timestamps: boolean;
4073
- dateFormat: string;
4074
- usesTimestamps(): boolean;
4075
- updateTimestamps(): /*elided*/any;
4076
- getCreatedAtColumn(): any;
4077
- getUpdatedAtColumn(): any;
4078
- setCreatedAt(value: any): /*elided*/any;
4079
- setUpdatedAt(value: any): /*elided*/any;
4080
- freshTimestamp(): Date;
4081
- freshTimestampString(): any;
4082
- } & TGeneric<any, string> & {
4083
- [x: string]: any;
4084
- attributes: TGeneric;
4085
- original: TGeneric;
4086
- casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
4087
- changes: TGeneric;
4088
- appends: any[];
4089
- setAppends(appends: any[]): /*elided*/any;
4090
- append(...keys: any[]): /*elided*/any;
4091
- normalizeCastClassResponse(key: string, value: string): TGeneric;
4092
- syncOriginal(): /*elided*/any;
4093
- syncChanges(): /*elided*/any;
4094
- syncOriginalAttribute(attribute: string): void;
4095
- syncOriginalAttributes(...attributes: string[]): /*elided*/any;
4096
- isDirty(...attributes: string[]): boolean;
4097
- getDirty(): TGeneric;
4098
- originalIsEquivalent(key: string): boolean;
4099
- setAttributes(attributes: TGeneric): void;
4100
- setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
4101
- getAttributes(): {
4102
- [x: string]: any;
4103
- };
4104
- setAttribute(key: string, value: string): /*elided*/any;
4105
- getAttribute(key: string): any;
4106
- castAttribute(key: string, value: string): any;
4107
- attributesToData(): {
4108
- [x: string]: any;
4109
- };
4110
- mutateAttribute(key: string, value: string | null): any;
4111
- mutateAttributeForArray(_key: string, _value: string): void;
4112
- isDateAttribute(key: string): boolean;
4113
- serializeDate(date?: Date | string | null): string | null;
4114
- getDates(): any[];
4115
- getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
4116
- getCastType(key: string): any;
4117
- hasCast(key: string, types?: readonly string[]): boolean;
4118
- withDayjs(date: string): dayjs0.Dayjs;
4119
- isCustomCast(cast: any): boolean;
4120
- isCustomDateTimeCast(cast: any): boolean;
4121
- isDecimalCast(cast: any): boolean;
4122
- isDateCastable(key: string): boolean;
4123
- fromDateTime(value: string): string;
4124
- getDateFormat(): any;
4125
- asDecimal(value: string, decimals: number): string;
4126
- asDateTime(value: any): Date | null;
4127
- asDate(value: string): Date;
4128
- } & {
4129
- [x: string]: any;
4130
- hidden: any[];
4131
- visible: any[];
4132
- makeVisible(...keys: string[]): /*elided*/any;
4133
- makeHidden(key: string[], ...keys: string[]): /*elided*/any;
4134
- getHidden(): any[];
4135
- getVisible(): any[];
4136
- setHidden(hidden: any[]): /*elided*/any;
4137
- setVisible(visible: any[]): /*elided*/any;
4138
- } & {
4139
- [x: string]: any;
4140
- execHooks(hook: any, options: TGeneric): Promise<any>;
4141
- } & {
4142
- [x: string]: any;
4143
- getGlobalScopes(): {};
4144
- } & {
4145
- [x: string]: any;
4146
- useUniqueIds: boolean;
4147
- usesUniqueIds(): boolean;
4148
- uniqueIds(): never[];
4149
- setUniqueIds(): void;
4150
- }, `relation${Capitalize<SnakeToCamelCase<T>>}`>;
4151
- getRelated: <T extends never>(relation: T) => ReturnTypeOfMethod<ReturnTypeOfMethod<(new () => IModel) & IModel & {
4152
- [x: string]: any;
4153
- timestamps: boolean;
4154
- dateFormat: string;
4155
- usesTimestamps(): boolean;
4156
- updateTimestamps(): /*elided*/any;
4157
- getCreatedAtColumn(): any;
4158
- getUpdatedAtColumn(): any;
4159
- setCreatedAt(value: any): /*elided*/any;
4160
- setUpdatedAt(value: any): /*elided*/any;
4161
- freshTimestamp(): Date;
4162
- freshTimestampString(): any;
4163
- } & TGeneric<any, string> & {
4164
- [x: string]: any;
4165
- attributes: TGeneric;
4166
- original: TGeneric;
4167
- casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
4168
- changes: TGeneric;
4169
- appends: any[];
4170
- setAppends(appends: any[]): /*elided*/any;
4171
- append(...keys: any[]): /*elided*/any;
4172
- normalizeCastClassResponse(key: string, value: string): TGeneric;
4173
- syncOriginal(): /*elided*/any;
4174
- syncChanges(): /*elided*/any;
4175
- syncOriginalAttribute(attribute: string): void;
4176
- syncOriginalAttributes(...attributes: string[]): /*elided*/any;
4177
- isDirty(...attributes: string[]): boolean;
4178
- getDirty(): TGeneric;
4179
- originalIsEquivalent(key: string): boolean;
4180
- setAttributes(attributes: TGeneric): void;
4181
- setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
4182
- getAttributes(): {
4183
- [x: string]: any;
4184
- };
4185
- setAttribute(key: string, value: string): /*elided*/any;
4186
- getAttribute(key: string): any;
4187
- castAttribute(key: string, value: string): any;
4188
- attributesToData(): {
4189
- [x: string]: any;
4190
- };
4191
- mutateAttribute(key: string, value: string | null): any;
4192
- mutateAttributeForArray(_key: string, _value: string): void;
4193
- isDateAttribute(key: string): boolean;
4194
- serializeDate(date?: Date | string | null): string | null;
4195
- getDates(): any[];
4196
- getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
4197
- getCastType(key: string): any;
4198
- hasCast(key: string, types?: readonly string[]): boolean;
4199
- withDayjs(date: string): dayjs0.Dayjs;
4200
- isCustomCast(cast: any): boolean;
4201
- isCustomDateTimeCast(cast: any): boolean;
4202
- isDecimalCast(cast: any): boolean;
4203
- isDateCastable(key: string): boolean;
4204
- fromDateTime(value: string): string;
4205
- getDateFormat(): any;
4206
- asDecimal(value: string, decimals: number): string;
4207
- asDateTime(value: any): Date | null;
4208
- asDate(value: string): Date;
4209
- } & {
4210
- [x: string]: any;
4211
- hidden: any[];
4212
- visible: any[];
4213
- makeVisible(...keys: string[]): /*elided*/any;
4214
- makeHidden(key: string[], ...keys: string[]): /*elided*/any;
4215
- getHidden(): any[];
4216
- getVisible(): any[];
4217
- setHidden(hidden: any[]): /*elided*/any;
4218
- setVisible(visible: any[]): /*elided*/any;
4219
- } & {
4220
- [x: string]: any;
4221
- execHooks(hook: any, options: TGeneric): Promise<any>;
4222
- } & {
4223
- [x: string]: any;
4224
- getGlobalScopes(): {};
4225
- } & {
4226
- [x: string]: any;
4227
- useUniqueIds: boolean;
4228
- usesUniqueIds(): boolean;
4229
- uniqueIds(): never[];
4230
- setUniqueIds(): void;
4231
- }, `relation${Capitalize<SnakeToCamelCase<T>>}`>, any>;
4232
- hasOne: <T extends Model$1>(model: new () => T, foreignKey?: string, localKey?: string) => HasOne<T>;
4233
- hasMany: <T extends Model$1>(model: new () => T, foreignKey?: string, localKey?: string) => HasMany<T>;
4234
- belongsTo: <T extends Model$1>(model: new () => T, foreignKey?: string, ownerKey?: string, relation?: string) => BelongsTo<T>;
4235
- belongsToMany: <T extends Model$1>(model: new () => T, table?: string, foreignPivotKey?: string, relatedPivotKey?: string, parentKey?: string, relatedKey?: string) => BelongsToMany<T>;
4236
- original: TGeneric;
4237
- casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
4238
- changes: TGeneric;
4239
- appends: any[];
4240
- normalizeCastClassResponse: (key: string, value: string) => TGeneric;
4241
- syncOriginal: () => (new () => IModel) & IModel & {
4242
- [x: string]: any;
4243
- timestamps: boolean;
4244
- dateFormat: string;
4245
- usesTimestamps(): boolean;
4246
- updateTimestamps(): /*elided*/any;
4247
- getCreatedAtColumn(): any;
4248
- getUpdatedAtColumn(): any;
4249
- setCreatedAt(value: any): /*elided*/any;
4250
- setUpdatedAt(value: any): /*elided*/any;
4251
- freshTimestamp(): Date;
4252
- freshTimestampString(): any;
4253
- } & TGeneric<any, string> & {
4254
- [x: string]: any;
4255
- attributes: TGeneric;
4256
- original: TGeneric;
4257
- casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
4258
- changes: TGeneric;
4259
- appends: any[];
4260
- setAppends(appends: any[]): /*elided*/any;
4261
- append(...keys: any[]): /*elided*/any;
4262
- normalizeCastClassResponse(key: string, value: string): TGeneric;
4263
- syncOriginal(): /*elided*/any;
4264
- syncChanges(): /*elided*/any;
4265
- syncOriginalAttribute(attribute: string): void;
4266
- syncOriginalAttributes(...attributes: string[]): /*elided*/any;
4267
- isDirty(...attributes: string[]): boolean;
4268
- getDirty(): TGeneric;
4269
- originalIsEquivalent(key: string): boolean;
4270
- setAttributes(attributes: TGeneric): void;
4271
- setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
4272
- getAttributes(): {
4273
- [x: string]: any;
4274
- };
4275
- setAttribute(key: string, value: string): /*elided*/any;
4276
- getAttribute(key: string): any;
4277
- castAttribute(key: string, value: string): any;
4278
- attributesToData(): {
4279
- [x: string]: any;
4280
- };
4281
- mutateAttribute(key: string, value: string | null): any;
4282
- mutateAttributeForArray(_key: string, _value: string): void;
4283
- isDateAttribute(key: string): boolean;
4284
- serializeDate(date?: Date | string | null): string | null;
4285
- getDates(): any[];
4286
- getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
4287
- getCastType(key: string): any;
4288
- hasCast(key: string, types?: readonly string[]): boolean;
4289
- withDayjs(date: string): dayjs0.Dayjs;
4290
- isCustomCast(cast: any): boolean;
4291
- isCustomDateTimeCast(cast: any): boolean;
4292
- isDecimalCast(cast: any): boolean;
4293
- isDateCastable(key: string): boolean;
4294
- fromDateTime(value: string): string;
4295
- getDateFormat(): any;
4296
- asDecimal(value: string, decimals: number): string;
4297
- asDateTime(value: any): Date | null;
4298
- asDate(value: string): Date;
4299
- } & {
4300
- [x: string]: any;
4301
- hidden: any[];
4302
- visible: any[];
4303
- makeVisible(...keys: string[]): /*elided*/any;
4304
- makeHidden(key: string[], ...keys: string[]): /*elided*/any;
4305
- getHidden(): any[];
4306
- getVisible(): any[];
4307
- setHidden(hidden: any[]): /*elided*/any;
4308
- setVisible(visible: any[]): /*elided*/any;
4309
- } & {
4310
- [x: string]: any;
4311
- execHooks(hook: any, options: TGeneric): Promise<any>;
4312
- } & {
4313
- [x: string]: any;
4314
- getGlobalScopes(): {};
4315
- } & {
4316
- [x: string]: any;
4317
- useUniqueIds: boolean;
4318
- usesUniqueIds(): boolean;
4319
- uniqueIds(): never[];
4320
- setUniqueIds(): void;
4321
- };
4322
- syncChanges: () => (new () => IModel) & IModel & {
4323
- [x: string]: any;
4324
- timestamps: boolean;
4325
- dateFormat: string;
4326
- usesTimestamps(): boolean;
4327
- updateTimestamps(): /*elided*/any;
4328
- getCreatedAtColumn(): any;
4329
- getUpdatedAtColumn(): any;
4330
- setCreatedAt(value: any): /*elided*/any;
4331
- setUpdatedAt(value: any): /*elided*/any;
4332
- freshTimestamp(): Date;
4333
- freshTimestampString(): any;
4334
- } & TGeneric<any, string> & {
4335
- [x: string]: any;
4336
- attributes: TGeneric;
4337
- original: TGeneric;
4338
- casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
4339
- changes: TGeneric;
4340
- appends: any[];
4341
- setAppends(appends: any[]): /*elided*/any;
4342
- append(...keys: any[]): /*elided*/any;
4343
- normalizeCastClassResponse(key: string, value: string): TGeneric;
4344
- syncOriginal(): /*elided*/any;
4345
- syncChanges(): /*elided*/any;
4346
- syncOriginalAttribute(attribute: string): void;
4347
- syncOriginalAttributes(...attributes: string[]): /*elided*/any;
4348
- isDirty(...attributes: string[]): boolean;
4349
- getDirty(): TGeneric;
4350
- originalIsEquivalent(key: string): boolean;
4351
- setAttributes(attributes: TGeneric): void;
4352
- setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
4353
- getAttributes(): {
4354
- [x: string]: any;
4355
- };
4356
- setAttribute(key: string, value: string): /*elided*/any;
4357
- getAttribute(key: string): any;
4358
- castAttribute(key: string, value: string): any;
4359
- attributesToData(): {
4360
- [x: string]: any;
4361
- };
4362
- mutateAttribute(key: string, value: string | null): any;
4363
- mutateAttributeForArray(_key: string, _value: string): void;
4364
- isDateAttribute(key: string): boolean;
4365
- serializeDate(date?: Date | string | null): string | null;
4366
- getDates(): any[];
4367
- getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
4368
- getCastType(key: string): any;
4369
- hasCast(key: string, types?: readonly string[]): boolean;
4370
- withDayjs(date: string): dayjs0.Dayjs;
4371
- isCustomCast(cast: any): boolean;
4372
- isCustomDateTimeCast(cast: any): boolean;
4373
- isDecimalCast(cast: any): boolean;
4374
- isDateCastable(key: string): boolean;
4375
- fromDateTime(value: string): string;
4376
- getDateFormat(): any;
4377
- asDecimal(value: string, decimals: number): string;
4378
- asDateTime(value: any): Date | null;
4379
- asDate(value: string): Date;
4380
- } & {
4381
- [x: string]: any;
4382
- hidden: any[];
4383
- visible: any[];
4384
- makeVisible(...keys: string[]): /*elided*/any;
4385
- makeHidden(key: string[], ...keys: string[]): /*elided*/any;
4386
- getHidden(): any[];
4387
- getVisible(): any[];
4388
- setHidden(hidden: any[]): /*elided*/any;
4389
- setVisible(visible: any[]): /*elided*/any;
4390
- } & {
4391
- [x: string]: any;
4392
- execHooks(hook: any, options: TGeneric): Promise<any>;
4393
- } & {
4394
- [x: string]: any;
4395
- getGlobalScopes(): {};
4396
- } & {
4397
- [x: string]: any;
4398
- useUniqueIds: boolean;
4399
- usesUniqueIds(): boolean;
4400
- uniqueIds(): never[];
4401
- setUniqueIds(): void;
4402
- };
4403
- syncOriginalAttribute: (attribute: string) => void;
4404
- syncOriginalAttributes: (...attributes: string[]) => (new () => IModel) & IModel & {
4405
- [x: string]: any;
4406
- timestamps: boolean;
4407
- dateFormat: string;
4408
- usesTimestamps(): boolean;
4409
- updateTimestamps(): /*elided*/any;
4410
- getCreatedAtColumn(): any;
4411
- getUpdatedAtColumn(): any;
4412
- setCreatedAt(value: any): /*elided*/any;
4413
- setUpdatedAt(value: any): /*elided*/any;
4414
- freshTimestamp(): Date;
4415
- freshTimestampString(): any;
4416
- } & TGeneric<any, string> & {
4417
- [x: string]: any;
4418
- attributes: TGeneric;
4419
- original: TGeneric;
4420
- casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
4421
- changes: TGeneric;
4422
- appends: any[];
4423
- setAppends(appends: any[]): /*elided*/any;
4424
- append(...keys: any[]): /*elided*/any;
4425
- normalizeCastClassResponse(key: string, value: string): TGeneric;
4426
- syncOriginal(): /*elided*/any;
4427
- syncChanges(): /*elided*/any;
4428
- syncOriginalAttribute(attribute: string): void;
4429
- syncOriginalAttributes(...attributes: string[]): /*elided*/any;
4430
- isDirty(...attributes: string[]): boolean;
4431
- getDirty(): TGeneric;
4432
- originalIsEquivalent(key: string): boolean;
4433
- setAttributes(attributes: TGeneric): void;
4434
- setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
4435
- getAttributes(): {
4436
- [x: string]: any;
4437
- };
4438
- setAttribute(key: string, value: string): /*elided*/any;
4439
- getAttribute(key: string): any;
4440
- castAttribute(key: string, value: string): any;
4441
- attributesToData(): {
4442
- [x: string]: any;
4443
- };
4444
- mutateAttribute(key: string, value: string | null): any;
4445
- mutateAttributeForArray(_key: string, _value: string): void;
4446
- isDateAttribute(key: string): boolean;
4447
- serializeDate(date?: Date | string | null): string | null;
4448
- getDates(): any[];
4449
- getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
4450
- getCastType(key: string): any;
4451
- hasCast(key: string, types?: readonly string[]): boolean;
4452
- withDayjs(date: string): dayjs0.Dayjs;
4453
- isCustomCast(cast: any): boolean;
4454
- isCustomDateTimeCast(cast: any): boolean;
4455
- isDecimalCast(cast: any): boolean;
4456
- isDateCastable(key: string): boolean;
4457
- fromDateTime(value: string): string;
4458
- getDateFormat(): any;
4459
- asDecimal(value: string, decimals: number): string;
4460
- asDateTime(value: any): Date | null;
4461
- asDate(value: string): Date;
4462
- } & {
4463
- [x: string]: any;
4464
- hidden: any[];
4465
- visible: any[];
4466
- makeVisible(...keys: string[]): /*elided*/any;
4467
- makeHidden(key: string[], ...keys: string[]): /*elided*/any;
4468
- getHidden(): any[];
4469
- getVisible(): any[];
4470
- setHidden(hidden: any[]): /*elided*/any;
4471
- setVisible(visible: any[]): /*elided*/any;
4472
- } & {
4473
- [x: string]: any;
4474
- execHooks(hook: any, options: TGeneric): Promise<any>;
4475
- } & {
4476
- [x: string]: any;
4477
- getGlobalScopes(): {};
4478
- } & {
4479
- [x: string]: any;
4480
- useUniqueIds: boolean;
4481
- usesUniqueIds(): boolean;
4482
- uniqueIds(): never[];
4483
- setUniqueIds(): void;
4484
- };
4485
- originalIsEquivalent: (key: string) => boolean;
4486
- setAttributes: (attributes: TGeneric) => void;
4487
- setRawAttributes: (attributes: TGeneric, sync?: boolean) => (new () => IModel) & IModel & {
4488
- [x: string]: any;
4489
- timestamps: boolean;
4490
- dateFormat: string;
4491
- usesTimestamps(): boolean;
4492
- updateTimestamps(): /*elided*/any;
4493
- getCreatedAtColumn(): any;
4494
- getUpdatedAtColumn(): any;
4495
- setCreatedAt(value: any): /*elided*/any;
4496
- setUpdatedAt(value: any): /*elided*/any;
4497
- freshTimestamp(): Date;
4498
- freshTimestampString(): any;
4499
- } & TGeneric<any, string> & {
4500
- [x: string]: any;
4501
- attributes: TGeneric;
4502
- original: TGeneric;
4503
- casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
4504
- changes: TGeneric;
4505
- appends: any[];
4506
- setAppends(appends: any[]): /*elided*/any;
4507
- append(...keys: any[]): /*elided*/any;
4508
- normalizeCastClassResponse(key: string, value: string): TGeneric;
4509
- syncOriginal(): /*elided*/any;
4510
- syncChanges(): /*elided*/any;
4511
- syncOriginalAttribute(attribute: string): void;
4512
- syncOriginalAttributes(...attributes: string[]): /*elided*/any;
4513
- isDirty(...attributes: string[]): boolean;
4514
- getDirty(): TGeneric;
4515
- originalIsEquivalent(key: string): boolean;
4516
- setAttributes(attributes: TGeneric): void;
4517
- setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
4518
- getAttributes(): {
4519
- [x: string]: any;
4520
- };
4521
- setAttribute(key: string, value: string): /*elided*/any;
4522
- getAttribute(key: string): any;
4523
- castAttribute(key: string, value: string): any;
4524
- attributesToData(): {
4525
- [x: string]: any;
4526
- };
4527
- mutateAttribute(key: string, value: string | null): any;
4528
- mutateAttributeForArray(_key: string, _value: string): void;
4529
- isDateAttribute(key: string): boolean;
4530
- serializeDate(date?: Date | string | null): string | null;
4531
- getDates(): any[];
4532
- getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
4533
- getCastType(key: string): any;
4534
- hasCast(key: string, types?: readonly string[]): boolean;
4535
- withDayjs(date: string): dayjs0.Dayjs;
4536
- isCustomCast(cast: any): boolean;
4537
- isCustomDateTimeCast(cast: any): boolean;
4538
- isDecimalCast(cast: any): boolean;
4539
- isDateCastable(key: string): boolean;
4540
- fromDateTime(value: string): string;
4541
- getDateFormat(): any;
4542
- asDecimal(value: string, decimals: number): string;
4543
- asDateTime(value: any): Date | null;
4544
- asDate(value: string): Date;
4545
- } & {
4546
- [x: string]: any;
4547
- hidden: any[];
4548
- visible: any[];
4549
- makeVisible(...keys: string[]): /*elided*/any;
4550
- makeHidden(key: string[], ...keys: string[]): /*elided*/any;
4551
- getHidden(): any[];
4552
- getVisible(): any[];
4553
- setHidden(hidden: any[]): /*elided*/any;
4554
- setVisible(visible: any[]): /*elided*/any;
4555
- } & {
4556
- [x: string]: any;
4557
- execHooks(hook: any, options: TGeneric): Promise<any>;
4558
- } & {
4559
- [x: string]: any;
4560
- getGlobalScopes(): {};
4561
- } & {
4562
- [x: string]: any;
4563
- useUniqueIds: boolean;
4564
- usesUniqueIds(): boolean;
4565
- uniqueIds(): never[];
4566
- setUniqueIds(): void;
4567
- };
4568
- castAttribute: (key: string, value: string) => any;
4569
- mutateAttribute: (key: string, value: string | null) => any;
4570
- mutateAttributeForArray: (_key: string, _value: string) => void;
4571
- isDateAttribute: (key: string) => boolean;
4572
- getCasts: () => TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
4573
- getCastType: (key: string) => any;
4574
- hasCast: (key: string, types?: readonly string[]) => boolean;
4575
- withDayjs: (date: string) => dayjs0.Dayjs;
4576
- isCustomCast: (cast: any) => boolean;
4577
- isCustomDateTimeCast: (cast: any) => boolean;
4578
- isDecimalCast: (cast: any) => boolean;
4579
- isDateCastable: (key: string) => boolean;
4580
- asDecimal: (value: string, decimals: number) => string;
4581
- asDateTime: (value: any) => Date | null;
4582
- asDate: (value: string) => Date;
4583
- getHidden: () => any[];
4584
- getVisible: () => any[];
4585
- setHidden: (hidden: any[]) => (new () => IModel) & IModel & {
4586
- [x: string]: any;
4587
- timestamps: boolean;
4588
- dateFormat: string;
4589
- usesTimestamps(): boolean;
4590
- updateTimestamps(): /*elided*/any;
4591
- getCreatedAtColumn(): any;
4592
- getUpdatedAtColumn(): any;
4593
- setCreatedAt(value: any): /*elided*/any;
4594
- setUpdatedAt(value: any): /*elided*/any;
4595
- freshTimestamp(): Date;
4596
- freshTimestampString(): any;
4597
- } & TGeneric<any, string> & {
4598
- [x: string]: any;
4599
- attributes: TGeneric;
4600
- original: TGeneric;
4601
- casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
4602
- changes: TGeneric;
4603
- appends: any[];
4604
- setAppends(appends: any[]): /*elided*/any;
4605
- append(...keys: any[]): /*elided*/any;
4606
- normalizeCastClassResponse(key: string, value: string): TGeneric;
4607
- syncOriginal(): /*elided*/any;
4608
- syncChanges(): /*elided*/any;
4609
- syncOriginalAttribute(attribute: string): void;
4610
- syncOriginalAttributes(...attributes: string[]): /*elided*/any;
4611
- isDirty(...attributes: string[]): boolean;
4612
- getDirty(): TGeneric;
4613
- originalIsEquivalent(key: string): boolean;
4614
- setAttributes(attributes: TGeneric): void;
4615
- setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
4616
- getAttributes(): {
4617
- [x: string]: any;
4618
- };
4619
- setAttribute(key: string, value: string): /*elided*/any;
4620
- getAttribute(key: string): any;
4621
- castAttribute(key: string, value: string): any;
4622
- attributesToData(): {
4623
- [x: string]: any;
4624
- };
4625
- mutateAttribute(key: string, value: string | null): any;
4626
- mutateAttributeForArray(_key: string, _value: string): void;
4627
- isDateAttribute(key: string): boolean;
4628
- serializeDate(date?: Date | string | null): string | null;
4629
- getDates(): any[];
4630
- getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
4631
- getCastType(key: string): any;
4632
- hasCast(key: string, types?: readonly string[]): boolean;
4633
- withDayjs(date: string): dayjs0.Dayjs;
4634
- isCustomCast(cast: any): boolean;
4635
- isCustomDateTimeCast(cast: any): boolean;
4636
- isDecimalCast(cast: any): boolean;
4637
- isDateCastable(key: string): boolean;
4638
- fromDateTime(value: string): string;
4639
- getDateFormat(): any;
4640
- asDecimal(value: string, decimals: number): string;
4641
- asDateTime(value: any): Date | null;
4642
- asDate(value: string): Date;
4643
- } & {
4644
- [x: string]: any;
4645
- hidden: any[];
4646
- visible: any[];
4647
- makeVisible(...keys: string[]): /*elided*/any;
4648
- makeHidden(key: string[], ...keys: string[]): /*elided*/any;
4649
- getHidden(): any[];
4650
- getVisible(): any[];
4651
- setHidden(hidden: any[]): /*elided*/any;
4652
- setVisible(visible: any[]): /*elided*/any;
4653
- } & {
4654
- [x: string]: any;
4655
- execHooks(hook: any, options: TGeneric): Promise<any>;
4656
- } & {
4657
- [x: string]: any;
4658
- getGlobalScopes(): {};
4659
- } & {
4660
- [x: string]: any;
4661
- useUniqueIds: boolean;
4662
- usesUniqueIds(): boolean;
4663
- uniqueIds(): never[];
4664
- setUniqueIds(): void;
4665
- };
4666
- setVisible: (visible: any[]) => (new () => IModel) & IModel & {
4667
- [x: string]: any;
4668
- timestamps: boolean;
4669
- dateFormat: string;
4670
- usesTimestamps(): boolean;
4671
- updateTimestamps(): /*elided*/any;
4672
- getCreatedAtColumn(): any;
4673
- getUpdatedAtColumn(): any;
4674
- setCreatedAt(value: any): /*elided*/any;
4675
- setUpdatedAt(value: any): /*elided*/any;
4676
- freshTimestamp(): Date;
4677
- freshTimestampString(): any;
4678
- } & TGeneric<any, string> & {
4679
- [x: string]: any;
4680
- attributes: TGeneric;
4681
- original: TGeneric;
4682
- casts: TGeneric<typeof CastsAttributes | "int" | "json" | "string" | "date" | "boolean" | "datetime" | "collection">;
4683
- changes: TGeneric;
4684
- appends: any[];
4685
- setAppends(appends: any[]): /*elided*/any;
4686
- append(...keys: any[]): /*elided*/any;
4687
- normalizeCastClassResponse(key: string, value: string): TGeneric;
4688
- syncOriginal(): /*elided*/any;
4689
- syncChanges(): /*elided*/any;
4690
- syncOriginalAttribute(attribute: string): void;
4691
- syncOriginalAttributes(...attributes: string[]): /*elided*/any;
4692
- isDirty(...attributes: string[]): boolean;
4693
- getDirty(): TGeneric;
4694
- originalIsEquivalent(key: string): boolean;
4695
- setAttributes(attributes: TGeneric): void;
4696
- setRawAttributes(attributes: TGeneric, sync?: boolean): /*elided*/any;
4697
- getAttributes(): {
4698
- [x: string]: any;
4699
- };
4700
- setAttribute(key: string, value: string): /*elided*/any;
4701
- getAttribute(key: string): any;
4702
- castAttribute(key: string, value: string): any;
4703
- attributesToData(): {
4704
- [x: string]: any;
4705
- };
4706
- mutateAttribute(key: string, value: string | null): any;
4707
- mutateAttributeForArray(_key: string, _value: string): void;
4708
- isDateAttribute(key: string): boolean;
4709
- serializeDate(date?: Date | string | null): string | null;
4710
- getDates(): any[];
4711
- getCasts(): TGeneric<"string" | "boolean" | typeof CastsAttributes | "int" | "json" | "date" | "datetime" | "collection">;
4712
- getCastType(key: string): any;
4713
- hasCast(key: string, types?: readonly string[]): boolean;
4714
- withDayjs(date: string): dayjs0.Dayjs;
4715
- isCustomCast(cast: any): boolean;
4716
- isCustomDateTimeCast(cast: any): boolean;
4717
- isDecimalCast(cast: any): boolean;
4718
- isDateCastable(key: string): boolean;
4719
- fromDateTime(value: string): string;
4720
- getDateFormat(): any;
4721
- asDecimal(value: string, decimals: number): string;
4722
- asDateTime(value: any): Date | null;
4723
- asDate(value: string): Date;
4724
- } & {
4725
- [x: string]: any;
4726
- hidden: any[];
4727
- visible: any[];
4728
- makeVisible(...keys: string[]): /*elided*/any;
4729
- makeHidden(key: string[], ...keys: string[]): /*elided*/any;
4730
- getHidden(): any[];
4731
- getVisible(): any[];
4732
- setHidden(hidden: any[]): /*elided*/any;
4733
- setVisible(visible: any[]): /*elided*/any;
4734
- } & {
4735
- [x: string]: any;
4736
- execHooks(hook: any, options: TGeneric): Promise<any>;
4737
- } & {
4738
- [x: string]: any;
4739
- getGlobalScopes(): {};
4740
- } & {
4741
- [x: string]: any;
4742
- useUniqueIds: boolean;
4743
- usesUniqueIds(): boolean;
4744
- uniqueIds(): never[];
4745
- setUniqueIds(): void;
4746
- };
4747
- execHooks: (hook: any, options: TGeneric) => Promise<any>;
4748
- getGlobalScopes: () => {};
4749
- useUniqueIds: boolean;
4750
- };
4751
- declare class Model$1 extends BaseModel {
4752
- [key: string]: any;
4753
- protected builder: IBuilder<any, any> | null;
4754
- protected table: string | null;
4755
- protected keyType: string;
4756
- protected incrementing: boolean;
4757
- protected withCount: never[];
4758
- protected primaryKey: string;
4759
- perPage: number;
4760
- static globalScopes: {};
4761
- static pluginInitializers: {};
4762
- static _booted: {};
4763
- static resolver: arquebus;
4764
- connection: TBaseConfig['client'] | null;
4765
- eagerLoad: {};
4766
- exists: boolean;
4767
- with: string | string[] | TGeneric<(...args: any[]) => IBuilder<Model$1>>;
4768
- name: any;
4769
- trx: null;
4770
- constructor(attributes?: {});
4771
- static query(trx?: null): Builder<Model$1, IModel | ICollection<Model$1>>;
4772
- static on(connection?: TBaseConfig['client'] | null): Builder<Model$1, IModel | ICollection<Model$1>>;
4773
- static init(attributes?: {}): Model$1;
4774
- static extend(plugin: TFunction, options: TGeneric): void;
4775
- static make(attributes?: TGeneric): Model$1;
4776
- getConstructor<T extends typeof Model$1>(this: InstanceType<T>): T;
4777
- bootIfNotBooted(this: any): void;
4778
- static booting(): void;
4779
- static boot(): void;
4780
- static booted(): void;
4781
- static setConnectionResolver(resolver: arquebus): void;
4782
- initialize(): void;
4783
- initializePlugins(this: any): void;
4784
- addPluginInitializer(this: any, method: any): void;
4785
- newInstance(this: any, attributes?: TGeneric, exists?: boolean): any;
4786
- newFromBuilder(attributes?: TGeneric, connection?: null): any;
4787
- asProxy(): this;
4788
- getKey(): any;
4789
- getKeyName(): string;
4790
- getForeignKey(): string;
4791
- getConnectionName(): "mysql" | "mysql2" | "sqlite3" | "oracle" | "mariadb" | "pg";
4792
- getTable(): string;
4793
- getConnection(this: any): any;
4794
- setConnection(connection: TBaseConfig['client'] | null): this;
4795
- getKeyType(): string;
4796
- newQuery(trx?: null): Builder<Model$1, IModel | ICollection<Model$1>>;
4797
- newQueryWithoutScopes(trx?: null): Builder<Model$1, IModel | ICollection<Model$1>>;
4798
- newModelQuery(trx?: null): Builder<Model$1, IModel | ICollection<Model$1>>;
4799
- addGlobalScopes(this: any, builder: Builder<Model$1>): Builder<Model$1, IModel | ICollection<Model$1>>;
4800
- hasNamedScope(name: string): boolean;
4801
- callNamedScope(scope: string, parameters: any[]): any;
4802
- setTable(table: string): this;
4803
- newCollection(this: any, models?: never[]): Collection$2<Model$1>;
4804
- load<R extends WithRelationType>(this: any, ...relations: R[]): Promise<any>;
4805
- loadAggregate<R extends WithRelationType>(relations: R[], column: string, callback?: TFunction | string | null): Promise<this>;
4806
- loadCount<R extends WithRelationType>(...relations: R[]): Promise<this>;
4807
- loadMax<R extends WithRelationType>(relations: R[], column: string): Promise<this>;
4808
- loadMin<R extends WithRelationType>(relations: R[], column: string): Promise<this>;
4809
- loadSum<R extends WithRelationType>(relations: R[], column: string): Promise<this>;
4810
- increment(column: string, amount?: number, extra?: TGeneric, options?: TGeneric): Promise<any>;
4811
- decrement(column: string, amount?: number, extra?: TGeneric, options?: TGeneric): Promise<any>;
4812
- incrementOrDecrement(column: string, amount: number, extra: TGeneric, method: string, options: TGeneric): Promise<any>;
4813
- toData(): {
4814
- [x: string]: any;
4815
- [x: number]: any;
4816
- [x: symbol]: any;
4817
- };
4818
- toJSON(): {
4819
- [x: string]: any;
4820
- [x: number]: any;
4821
- [x: symbol]: any;
4822
- };
4823
- toJson(...args: any[]): string;
4824
- toString(): string;
4825
- fill(attributes: TGeneric): this;
4826
- transacting(trx: any): this;
4827
- trashed(): boolean;
4828
- getIncrementing(): boolean;
4829
- setIncrementing(value: boolean): this;
4830
- save(options?: TGeneric): Promise<boolean>;
4831
- update(attributes?: TGeneric, options?: TGeneric): Promise<boolean>;
4832
- delete(options?: {}): Promise<boolean>;
4833
- performDeleteOnModel(options?: TGeneric): Promise<void>;
4834
- setKeysForSaveQuery(query: any): any;
4835
- forceDelete(options?: {}): Promise<boolean>;
4836
- fresh(this: any): any;
4837
- refresh(this: any): Promise<any>;
4838
- newPivot<E extends Model$1>(parent: E, attributes: TGeneric, table: string, exists: boolean, using?: typeof Pivot$1 | null): Pivot$1;
4839
- qualifyColumn(column: string): string;
4840
- getQualifiedKeyName(): string;
4841
- push(options?: {}): Promise<boolean>;
4842
- is(model: any): any;
4843
- isNot(model: any): boolean;
4844
- }
4845
- declare class Pivot$1 extends Model$1 {
4846
- incrementing: boolean;
4847
- guarded: never[];
4848
- pivotParent: Model$1 | null;
4849
- foreignKey: string | null;
4850
- relatedKey: string | null;
4851
- setPivotKeys(foreignKey: string, relatedKey: string): this;
4852
- static fromRawAttributes<E extends Model$1>(parent: E, attributes: TGeneric, table: string, exists?: boolean): Pivot$1;
4853
- static fromAttributes<E extends Model$1>(parent: E, attributes: TGeneric, table: string, exists?: boolean): Pivot$1;
4854
- hasTimestampAttributes(this: any, attributes?: TGeneric | null): boolean;
4855
- }
4856
- //#endregion
4857
- //#region types/generics.d.ts
4858
- type TGeneric<V = any, K extends string = string> = Record<K, V>;
4859
- type XGeneric<V = TGeneric, T = any> = {
4860
- [key: string]: T;
4861
- } & V;
4862
- type Hook = 'creating' | 'created' | 'updating' | 'updated' | 'saving' | 'saved' | 'deleting' | 'deleted' | 'restoring' | 'restored' | 'trashed' | 'forceDeleted';
4863
- type TFunction<TArgs extends any[] = any[], TReturn = any> = (...args: TArgs) => TReturn;
4864
- type PrimitiveValue = string | number | boolean | Date | string[] | number[] | boolean[] | Date[] | null | Buffer;
4865
- type ReturnTypeOfMethod<T, K extends keyof T> = T[K] extends ((...args: any[]) => infer R) ? R : never;
4866
- type SnakeToCamelCase<S extends string> = S extends `${infer T}_${infer U}` ? `${T}${Capitalize<SnakeToCamelCase<U>>}` : S;
4867
- type CamelToSnakeCase<S extends string> = S extends `${infer T}${infer U}` ? U extends Uncapitalize<U> ? `${Uncapitalize<T>}${CamelToSnakeCase<U>}` : `${Uncapitalize<T>}_${CamelToSnakeCase<U>}` : S;
4868
- type FunctionPropertyNames<T> = { [K in keyof T]: T[K] extends ((...args: any[]) => any) ? K : never }[keyof T];
4869
- type RelationNames<T> = FunctionPropertyNames<T> extends infer R ? R extends `relation${infer P}` ? P extends 'sToData' | 'loaded' ? never : CamelToSnakeCase<P> : never : never;
4870
- type MixinConstructor<T = TGeneric> = new (...args: any[]) => T;
4871
- //#endregion
4872
- //#region src/browser/paginator.d.ts
4873
- declare class Paginator<T extends Model, K extends IPaginatorParams = IPaginatorParams> implements IPaginator<T, K> {
4874
- static formatter: (paginator: IPaginator<any>) => any | null;
4875
- _items: Collection<T>;
4876
- _total: number;
4877
- _perPage: number;
4878
- _lastPage: number;
4879
- _currentPage: number;
4880
- hasMore: boolean;
4881
- options: TGeneric;
4882
- constructor(items: T[], total: number, perPage: number, currentPage?: number, options?: TGeneric);
4883
- static setFormatter(formatter: (paginator: IPaginator<any>) => any | null): void;
4884
- setItems(items: T[]): void;
4885
- firstItem(): number | null;
4886
- lastItem(): number | null;
4887
- hasMorePages(): boolean;
4888
- get(index: number): T | null;
4889
- count(): number;
4890
- items(): any;
4891
- map(callback: (value: T, index: number) => T): any;
4892
- currentPage(): number;
4893
- onFirstPage(): boolean;
4894
- perPage(): number;
4895
- lastPage(): number;
4896
- total(): number;
4897
- toData(): any;
4898
- toJSON(): any;
4899
- toJson(...args: any[]): string;
4900
- }
4901
- //#endregion
4902
- //#region src/browser/index.d.ts
4903
- declare const make: (model: Model, data: TGeneric, options?: {
4904
- paginated: IPaginatorParams;
4905
- }) => any;
4906
- declare const makeCollection: (model: Model, data: TGeneric) => Collection<Model>;
4907
- declare const isBrowser = true;
4908
- declare const _default: {
4909
- isBrowser: boolean;
4910
- Paginator: typeof Paginator;
4911
- Collection: typeof Collection;
4912
- Model: typeof Model;
4913
- Pivot: typeof Pivot;
4914
- Attribute: typeof Attribute;
4915
- CastsAttributes: typeof CastsAttributes;
4916
- HasUniqueIds: <TBase extends MixinConstructor>(Model: TBase) => {
4917
- new (...args: any[]): {
4918
- [x: string]: any;
4919
- useUniqueIds: boolean;
4920
- uniqueIds(): any[];
4921
- getKeyType(): any;
4922
- getIncrementing(): any;
4923
- };
4924
- } & TBase;
4925
- make: (model: Model, data: TGeneric, options?: {
4926
- paginated: IPaginatorParams;
4927
- }) => any;
4928
- makeCollection: (model: Model, data: TGeneric) => Collection<Model>;
4929
- makePaginator: (model: Model, data: TGeneric) => Paginator<Model, IPaginatorParams>;
4930
- };
4931
- //#endregion
4932
- export { Attribute, CastsAttributes, Collection, HasUniqueIds, InvalidArgumentError, Model, ModelNotFoundError, Paginator, Pivot, RelationNotFoundError, compose, _default as default, defineConfig, flatten, flattenDeep, getAttrMethod, getAttrName, getGetterMethod, getRelationMethod, getRelationName, getScopeMethod, getScopeName, getSetterMethod, isBrowser, kebabCase, make, makeCollection, now, snakeCase, tap };