@h3ravel/arquebus 0.6.9 → 0.6.11

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