@h3ravel/arquebus 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +94 -0
- package/bin/cli.js +203 -0
- package/bin/utils.js +141 -0
- package/dist/browser/index.cjs +1405 -0
- package/dist/browser/index.cjs.map +1 -0
- package/dist/browser/index.d.cts +229 -0
- package/dist/browser/index.d.ts +227 -0
- package/dist/browser/index.js +1341 -0
- package/dist/browser/index.js.map +1 -0
- package/dist/index.cjs +4585 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +457 -0
- package/dist/index.d.ts +457 -0
- package/dist/index.js +4513 -0
- package/dist/index.js.map +1 -0
- package/package.json +151 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,457 @@
|
|
|
1
|
+
import Knex from 'knex';
|
|
2
|
+
import { Collection as Collection$1 } from 'collect.js';
|
|
3
|
+
|
|
4
|
+
declare class ModelNotFoundError extends BaseError {
|
|
5
|
+
model: any;
|
|
6
|
+
ids: any;
|
|
7
|
+
setModel(model: any, ids?: any[]): this;
|
|
8
|
+
getModel(): any;
|
|
9
|
+
getIds(): any;
|
|
10
|
+
}
|
|
11
|
+
declare class RelationNotFoundError extends BaseError {
|
|
12
|
+
}
|
|
13
|
+
declare class InvalidArgumentError extends BaseError {
|
|
14
|
+
}
|
|
15
|
+
declare class BaseError extends Error {
|
|
16
|
+
constructor(message: any, entity: any);
|
|
17
|
+
message: any;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Compose functional mixins
|
|
22
|
+
*
|
|
23
|
+
* @param Base
|
|
24
|
+
* @param mixins
|
|
25
|
+
* @returns
|
|
26
|
+
*/
|
|
27
|
+
declare function compose(Base: any, ...mixins: any[]): any;
|
|
28
|
+
declare function now(format?: string): string;
|
|
29
|
+
declare function getRelationName(relationMethod: any): string;
|
|
30
|
+
declare function getScopeName(scopeMethod: any): string;
|
|
31
|
+
declare function getRelationMethod(relation: any): string;
|
|
32
|
+
declare function getScopeMethod(scope: any): string;
|
|
33
|
+
declare function getAttrMethod(attr: any): string;
|
|
34
|
+
declare function getGetterMethod(attr: any): string;
|
|
35
|
+
declare function getSetterMethod(attr: any): string;
|
|
36
|
+
declare function getAttrName(attrMethod: any): any;
|
|
37
|
+
declare function tap(instance: any, callback: any): any;
|
|
38
|
+
declare function flattenDeep(arr: any): any;
|
|
39
|
+
declare function kebabCase(str: any): string;
|
|
40
|
+
declare function snakeCase(str: any): string;
|
|
41
|
+
|
|
42
|
+
declare class arquebus {
|
|
43
|
+
static connectorFactory: null;
|
|
44
|
+
static instance: null;
|
|
45
|
+
static getInstance(): null;
|
|
46
|
+
static connection(connection?: null): any;
|
|
47
|
+
static setConnectorFactory(connectorFactory: any): void;
|
|
48
|
+
static getConnectorFactory(): typeof Knex;
|
|
49
|
+
static addConnection(config: any, name?: string): any;
|
|
50
|
+
static beginTransaction(connection?: null): any;
|
|
51
|
+
static transaction(callback: any, connection?: null): any;
|
|
52
|
+
static table(name: any, connection?: null): any;
|
|
53
|
+
static schema(connection?: null): any;
|
|
54
|
+
static destroyAll(): Promise<void>;
|
|
55
|
+
static createModel(name: any, options: any): any;
|
|
56
|
+
manager: {};
|
|
57
|
+
connections: {};
|
|
58
|
+
models: {};
|
|
59
|
+
connection(connection?: null): any;
|
|
60
|
+
getConnection(name?: null): any;
|
|
61
|
+
addConnection(config: any, name?: string): void;
|
|
62
|
+
beginTransaction(connection?: null): any;
|
|
63
|
+
transaction(callback: any, connection?: null): any;
|
|
64
|
+
table(name: any, connection?: null): any;
|
|
65
|
+
schema(connection?: null): any;
|
|
66
|
+
destroyAll(): Promise<void>;
|
|
67
|
+
createModel(name: any, options?: {}): any;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
declare class Paginator {
|
|
71
|
+
static formatter: null;
|
|
72
|
+
static setFormatter(formatter: any): void;
|
|
73
|
+
constructor(items: any, total: any, perPage: any, currentPage?: null, options?: {});
|
|
74
|
+
_items: any;
|
|
75
|
+
_total: any;
|
|
76
|
+
_perPage: number;
|
|
77
|
+
_lastPage: number;
|
|
78
|
+
_currentPage: any;
|
|
79
|
+
options: {};
|
|
80
|
+
setItems(items: any): void;
|
|
81
|
+
hasMore: boolean | undefined;
|
|
82
|
+
firstItem(): number | null;
|
|
83
|
+
lastItem(): number | null;
|
|
84
|
+
hasMorePages(): boolean;
|
|
85
|
+
get(index: any): any;
|
|
86
|
+
count(): any;
|
|
87
|
+
items(): any;
|
|
88
|
+
map(callback: any): any;
|
|
89
|
+
currentPage(): any;
|
|
90
|
+
onFirstPage(): boolean;
|
|
91
|
+
perPage(): number;
|
|
92
|
+
lastPage(): number;
|
|
93
|
+
total(): any;
|
|
94
|
+
toData(): any;
|
|
95
|
+
toJSON(): any;
|
|
96
|
+
toJson(...args: any[]): string;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
declare class Collection extends Collection$1<any> {
|
|
100
|
+
constructor(collection?: Object | any[] | undefined);
|
|
101
|
+
load(...relations: any[]): Promise<any>;
|
|
102
|
+
loadAggregate(relations: any, column: any, action?: null): Promise<this>;
|
|
103
|
+
loadCount(relations: any): Promise<this>;
|
|
104
|
+
loadMax(relation: any, column: any): Promise<this>;
|
|
105
|
+
loadMin(relation: any, column: any): Promise<this>;
|
|
106
|
+
loadSum(relation: any, column: any): Promise<this>;
|
|
107
|
+
loadAvg(relation: any, column: any): Promise<this>;
|
|
108
|
+
mapThen(callback: any): Promise<any[]>;
|
|
109
|
+
modelKeys(): any[];
|
|
110
|
+
contains(key: any, operator?: null, value?: null, ...args: any[]): boolean;
|
|
111
|
+
diff(items: any): any;
|
|
112
|
+
except(keys: any): any;
|
|
113
|
+
intersect(items: any): any;
|
|
114
|
+
unique(key?: null, strict?: boolean): any;
|
|
115
|
+
find(key: any, defaultValue?: null): any;
|
|
116
|
+
fresh(...args: any[]): Promise<any>;
|
|
117
|
+
makeVisible(attributes: any): this;
|
|
118
|
+
makeHidden(attributes: any): this;
|
|
119
|
+
append(attributes: any): this;
|
|
120
|
+
only(keys: any): any;
|
|
121
|
+
getDictionary(items?: null): {};
|
|
122
|
+
toQuery(): any;
|
|
123
|
+
toData(): any[];
|
|
124
|
+
toJSON(): any[];
|
|
125
|
+
toJson(...args: any[]): string;
|
|
126
|
+
[Symbol.iterator](): {
|
|
127
|
+
next(): {
|
|
128
|
+
value: any;
|
|
129
|
+
done: boolean;
|
|
130
|
+
} | {
|
|
131
|
+
done: boolean;
|
|
132
|
+
value?: undefined;
|
|
133
|
+
};
|
|
134
|
+
};
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
declare class QueryBuilder {
|
|
138
|
+
constructor(config: any, connector: any);
|
|
139
|
+
connector: null;
|
|
140
|
+
asProxy(): any;
|
|
141
|
+
beginTransaction(): Promise<QueryBuilder>;
|
|
142
|
+
table(table: any): QueryBuilder;
|
|
143
|
+
transaction(callback: any): any;
|
|
144
|
+
find(id: any, columns?: string[]): Promise<any>;
|
|
145
|
+
get(columns?: string[]): Promise<null>;
|
|
146
|
+
exists(): Promise<boolean>;
|
|
147
|
+
skip(...args: any[]): any;
|
|
148
|
+
take(...args: any[]): any;
|
|
149
|
+
chunk(count: any, callback: any): Promise<boolean>;
|
|
150
|
+
paginate(page?: number, perPage?: number): Promise<Paginator>;
|
|
151
|
+
forPage(page?: number, perPage?: number): any;
|
|
152
|
+
toSQL(...args: any[]): any;
|
|
153
|
+
count(column: any): Promise<number>;
|
|
154
|
+
min(column: any): Promise<number>;
|
|
155
|
+
max(column: any): Promise<number>;
|
|
156
|
+
sum(column: any): Promise<number>;
|
|
157
|
+
avg(column: any): Promise<number>;
|
|
158
|
+
clone(): QueryBuilder;
|
|
159
|
+
delete(): Promise<any>;
|
|
160
|
+
insert(...args: any[]): Promise<any>;
|
|
161
|
+
update(...args: any[]): Promise<any>;
|
|
162
|
+
destroy(...args: any[]): any;
|
|
163
|
+
get _statements(): any;
|
|
164
|
+
get _single(): any;
|
|
165
|
+
get from(): any;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
declare class Builder {
|
|
169
|
+
constructor(query: any);
|
|
170
|
+
query: any;
|
|
171
|
+
connection: any;
|
|
172
|
+
model: any;
|
|
173
|
+
actions: any;
|
|
174
|
+
localMacros: {};
|
|
175
|
+
eagerLoad: {};
|
|
176
|
+
globalScopes: {};
|
|
177
|
+
asProxy(): any;
|
|
178
|
+
orWhere(...args: any[]): this;
|
|
179
|
+
chunk(count: any, callback: any): Promise<boolean>;
|
|
180
|
+
enforceOrderBy(): void;
|
|
181
|
+
clone(): any;
|
|
182
|
+
forPage(page: any, perPage?: number): any;
|
|
183
|
+
insert(...args: any[]): any;
|
|
184
|
+
update(values: any): any;
|
|
185
|
+
increment(column: any, amount?: number, extra?: {}): any;
|
|
186
|
+
decrement(column: any, amount?: number, extra?: {}): any;
|
|
187
|
+
addUpdatedAtColumn(values: any): any;
|
|
188
|
+
delete(): any;
|
|
189
|
+
onDelete(callback: any): void;
|
|
190
|
+
onDeleteCallback: any;
|
|
191
|
+
forceDelete(): any;
|
|
192
|
+
create(attributes?: {}): Promise<any>;
|
|
193
|
+
newModelInstance(attributes?: {}): any;
|
|
194
|
+
getQuery(): any;
|
|
195
|
+
getModel(): any;
|
|
196
|
+
setModel(model: any): this;
|
|
197
|
+
qualifyColumn(column: any): any;
|
|
198
|
+
setTable(table: any): this;
|
|
199
|
+
applyScopes(): this;
|
|
200
|
+
hasNamedScope(name: any): any;
|
|
201
|
+
callNamedScope(scope: any, parameters: any): any;
|
|
202
|
+
callScope(scope: any, parameters?: any[]): any;
|
|
203
|
+
scopes(scopes: any): this;
|
|
204
|
+
withGlobalScope(identifier: any, scope: any): this;
|
|
205
|
+
withoutGlobalScope(scope: any): this;
|
|
206
|
+
macro(name: any, callback: any): void;
|
|
207
|
+
hasMacro(name: any): boolean;
|
|
208
|
+
getMacro(name: any): any;
|
|
209
|
+
with(...args: any[]): this;
|
|
210
|
+
has(relation: any, operator?: string, count?: number, boolean?: string, callback?: null): any;
|
|
211
|
+
orHas(relation: any, operator?: string, count?: number): any;
|
|
212
|
+
doesntHave(relation: any, boolean?: string, callback?: null): any;
|
|
213
|
+
orDoesntHave(relation: any): any;
|
|
214
|
+
whereHas(relation: any, callback?: null, operator?: string, count?: number): any;
|
|
215
|
+
orWhereHas(relation: any, callback?: null, operator?: string, count?: number): any;
|
|
216
|
+
whereRelation(relation: any, ...args: any[]): any;
|
|
217
|
+
orWhereRelation(relation: any, ...args: any[]): any;
|
|
218
|
+
hasNested(relations: any, operator?: string, count?: number, boolean?: string, callback?: null): any;
|
|
219
|
+
canUseExistsForExistenceCheck(operator: any, count: any): boolean;
|
|
220
|
+
addHasWhere(hasQuery: any, relation: any, operator: any, count: any, boolean: any): any;
|
|
221
|
+
addWhereExistsQuery(query: any, boolean?: string, not?: boolean): this;
|
|
222
|
+
addWhereCountQuery(query: any, operator?: string, count?: number, boolean?: string): any;
|
|
223
|
+
withAggregate(relations: any, column: any, action?: null): this;
|
|
224
|
+
toSql(): any;
|
|
225
|
+
mergeConstraintsFrom(from: any): any;
|
|
226
|
+
selectSub(query: any, as: any): any;
|
|
227
|
+
createSub(query: any): any[];
|
|
228
|
+
parseSub(query: any): any[];
|
|
229
|
+
prependDatabaseNameIfCrossDatabaseQuery(query: any): any;
|
|
230
|
+
getRelationWithoutConstraints(relation: any): any;
|
|
231
|
+
withCount(...args: any[]): this;
|
|
232
|
+
withMax(relation: any, column: any): this;
|
|
233
|
+
withMin(relation: any, column: any): this;
|
|
234
|
+
withAvg(relation: any, column: any): this;
|
|
235
|
+
withSum(relation: any, column: any): this;
|
|
236
|
+
withExists(relation: any): this;
|
|
237
|
+
parseWithRelations(relations: any): {};
|
|
238
|
+
addNestedWiths(name: any, results: any): any;
|
|
239
|
+
prepareNestedWithRelationships(relations: any, prefix?: string): {};
|
|
240
|
+
combineConstraints(constraints: any): (builder: any) => any;
|
|
241
|
+
parseNameAndAttributeSelectionConstraint(name: any, value: any): any[];
|
|
242
|
+
createSelectWithConstraint(name: any): any[];
|
|
243
|
+
related(relation: any): any;
|
|
244
|
+
take(...args: any[]): any;
|
|
245
|
+
skip(...args: any[]): any;
|
|
246
|
+
first(...columns: any[]): Promise<any>;
|
|
247
|
+
firstOrFail(...columns: any[]): Promise<any>;
|
|
248
|
+
findOrFail(ids: any, columns?: string): Promise<any>;
|
|
249
|
+
findOrNew(id: any, columns?: string[]): Promise<any>;
|
|
250
|
+
firstOrNew(attributes?: {}, values?: {}): Promise<any>;
|
|
251
|
+
firstOrCreate(attributes?: {}, values?: {}): Promise<any>;
|
|
252
|
+
updateOrCreate(attributes: any, values?: {}): Promise<any>;
|
|
253
|
+
latest(column?: null): this;
|
|
254
|
+
oldest(column?: null): this;
|
|
255
|
+
find(id: any, columns?: string): Promise<any>;
|
|
256
|
+
findMany(ids: any, columns?: string): Promise<any>;
|
|
257
|
+
pluck(column: any): Promise<Collection>;
|
|
258
|
+
destroy(ids: any, ...args: any[]): Promise<number>;
|
|
259
|
+
get(columns?: string): Promise<Collection>;
|
|
260
|
+
all(columns?: string): Promise<any>;
|
|
261
|
+
paginate(page: any, perPage: any): Promise<Paginator>;
|
|
262
|
+
getModels(...columns: any[]): Promise<any[]>;
|
|
263
|
+
getRelation(name: any): any;
|
|
264
|
+
relationsNestedUnder(relation: any): {};
|
|
265
|
+
isNestedUnder(relation: any, name: any): any;
|
|
266
|
+
eagerLoadRelation(models: any, name: any, constraints: any): Promise<any>;
|
|
267
|
+
eagerLoadRelations(models: any): Promise<any>;
|
|
268
|
+
hydrate(items: any): Collection;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
declare const Model_base: any;
|
|
272
|
+
declare class Model extends Model_base {
|
|
273
|
+
[x: string]: any;
|
|
274
|
+
static globalScopes: {};
|
|
275
|
+
static pluginInitializers: {};
|
|
276
|
+
static _booted: {};
|
|
277
|
+
static resolver: null;
|
|
278
|
+
static query(trx?: null): any;
|
|
279
|
+
static on(connection?: null): any;
|
|
280
|
+
static init(attributes?: {}): Model;
|
|
281
|
+
static extend(plugin: any, options: any): void;
|
|
282
|
+
static make(attributes?: {}): Model;
|
|
283
|
+
static booting(): void;
|
|
284
|
+
static boot(): void;
|
|
285
|
+
static booted(): void;
|
|
286
|
+
static setConnectionResolver(resolver: any): void;
|
|
287
|
+
constructor(attributes?: {});
|
|
288
|
+
primaryKey: string;
|
|
289
|
+
builder: null;
|
|
290
|
+
table: null;
|
|
291
|
+
connection: null;
|
|
292
|
+
keyType: string;
|
|
293
|
+
incrementing: boolean;
|
|
294
|
+
perPage: number;
|
|
295
|
+
exists: boolean;
|
|
296
|
+
eagerLoad: {};
|
|
297
|
+
with: any[];
|
|
298
|
+
withCount: any[];
|
|
299
|
+
trx: null;
|
|
300
|
+
bootIfNotBooted(): void;
|
|
301
|
+
initialize(): void;
|
|
302
|
+
initializePlugins(): void;
|
|
303
|
+
addPluginInitializer(method: any): void;
|
|
304
|
+
newInstance(attributes?: {}, exists?: boolean): any;
|
|
305
|
+
newFromBuilder(attributes?: {}, connection?: null): any;
|
|
306
|
+
asProxy(): any;
|
|
307
|
+
getKey(): any;
|
|
308
|
+
getKeyName(): string;
|
|
309
|
+
getForeignKey(): string;
|
|
310
|
+
getConnectionName(): null;
|
|
311
|
+
getTable(): string;
|
|
312
|
+
getConnection(): any;
|
|
313
|
+
setConnection(connection: any): this;
|
|
314
|
+
getKeyType(): string;
|
|
315
|
+
newQuery(trx?: null): any;
|
|
316
|
+
newQueryWithoutScopes(trx?: null): Builder;
|
|
317
|
+
newModelQuery(trx?: null): Builder;
|
|
318
|
+
addGlobalScopes(builder: any): any;
|
|
319
|
+
hasNamedScope(name: any): boolean;
|
|
320
|
+
callNamedScope(scope: any, parameters: any): any;
|
|
321
|
+
setTable(table: any): this;
|
|
322
|
+
newCollection(models?: any[]): Collection;
|
|
323
|
+
load(...relations: any[]): Promise<this>;
|
|
324
|
+
loadAggregate(relations: any, column: any, callback?: null): Promise<this>;
|
|
325
|
+
loadCount(...relations: any[]): Promise<this>;
|
|
326
|
+
loadMax(relations: any, column: any): Promise<this>;
|
|
327
|
+
loadMin(relations: any, column: any): Promise<this>;
|
|
328
|
+
loadSum(relations: any, column: any): Promise<this>;
|
|
329
|
+
increment(column: any, amount?: number, extra?: {}, options?: {}): Promise<any>;
|
|
330
|
+
decrement(column: any, amount?: number, extra?: {}, options?: {}): Promise<any>;
|
|
331
|
+
incrementOrDecrement(column: any, amount: any, extra: any, method: any, options: any): Promise<any>;
|
|
332
|
+
toData(): {
|
|
333
|
+
[x: string]: any;
|
|
334
|
+
[x: number]: any;
|
|
335
|
+
[x: symbol]: any;
|
|
336
|
+
};
|
|
337
|
+
toJSON(): {
|
|
338
|
+
[x: string]: any;
|
|
339
|
+
[x: number]: any;
|
|
340
|
+
[x: symbol]: any;
|
|
341
|
+
};
|
|
342
|
+
toJson(...args: any[]): string;
|
|
343
|
+
toString(): string;
|
|
344
|
+
fill(attributes: any): this;
|
|
345
|
+
transacting(trx: any): this;
|
|
346
|
+
trashed(): boolean;
|
|
347
|
+
getIncrementing(): boolean;
|
|
348
|
+
setIncrementing(value: any): this;
|
|
349
|
+
save(options?: {}): Promise<boolean>;
|
|
350
|
+
update(attributes?: {}, options?: {}): Promise<boolean>;
|
|
351
|
+
delete(options?: {}): Promise<boolean>;
|
|
352
|
+
performDeleteOnModel(options?: {}): Promise<void>;
|
|
353
|
+
setKeysForSaveQuery(query: any): any;
|
|
354
|
+
forceDelete(options?: {}): Promise<boolean>;
|
|
355
|
+
fresh(): any;
|
|
356
|
+
refresh(): Promise<this | undefined>;
|
|
357
|
+
attributes: any;
|
|
358
|
+
newPivot(parent: any, attributes: any, table: any, exists: any, using?: null): any;
|
|
359
|
+
qualifyColumn(column: any): any;
|
|
360
|
+
getQualifiedKeyName(): any;
|
|
361
|
+
push(options?: {}): Promise<boolean>;
|
|
362
|
+
is(model: any): any;
|
|
363
|
+
isNot(model: any): boolean;
|
|
364
|
+
}
|
|
365
|
+
declare class Pivot extends Model {
|
|
366
|
+
static fromRawAttributes(parent: any, attributes: any, table: any, exists?: boolean): Pivot;
|
|
367
|
+
static fromAttributes(parent: any, attributes: any, table: any, exists?: boolean): Pivot;
|
|
368
|
+
guarded: any[];
|
|
369
|
+
pivotParent: null;
|
|
370
|
+
foreignKey: null;
|
|
371
|
+
relatedKey: null;
|
|
372
|
+
setPivotKeys(foreignKey: any, relatedKey: any): this;
|
|
373
|
+
hasTimestampAttributes(attributes?: null): boolean;
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
declare class Attribute {
|
|
377
|
+
static make(get?: null, set?: null): Attribute;
|
|
378
|
+
static get(get: any): Attribute;
|
|
379
|
+
static set(set: any): Attribute;
|
|
380
|
+
constructor({ get, set }: {
|
|
381
|
+
get?: null | undefined;
|
|
382
|
+
set?: null | undefined;
|
|
383
|
+
});
|
|
384
|
+
get: any;
|
|
385
|
+
set: any;
|
|
386
|
+
withCaching: boolean;
|
|
387
|
+
withObjectCaching: boolean;
|
|
388
|
+
withoutObjectCaching(): this;
|
|
389
|
+
shouldCache(): this;
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
declare class CastsAttributes {
|
|
393
|
+
static get(): void;
|
|
394
|
+
static set(): void;
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
declare class Migration {
|
|
398
|
+
connection: any;
|
|
399
|
+
withinTransaction: boolean;
|
|
400
|
+
getConnection(): any;
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
declare class Scope {
|
|
404
|
+
apply(builder: any, model: any): void;
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
declare function softDeletes(Model: any): {
|
|
408
|
+
new (): {
|
|
409
|
+
[x: string]: any;
|
|
410
|
+
forceDeleting: boolean;
|
|
411
|
+
initialize(): void;
|
|
412
|
+
initializeSoftDeletes(): void;
|
|
413
|
+
forceDelete(): Promise<any>;
|
|
414
|
+
forceDeleteQuietly(): any;
|
|
415
|
+
performDeleteOnModel(options?: {}): Promise<any>;
|
|
416
|
+
exists: boolean | undefined;
|
|
417
|
+
runSoftDelete(options?: {}): Promise<void>;
|
|
418
|
+
restore(options?: {}): Promise<any>;
|
|
419
|
+
restoreQuietly(): any;
|
|
420
|
+
trashed(): boolean;
|
|
421
|
+
isForceDeleting(): boolean;
|
|
422
|
+
getDeletedAtColumn(): any;
|
|
423
|
+
getQualifiedDeletedAtColumn(): any;
|
|
424
|
+
};
|
|
425
|
+
[x: string]: any;
|
|
426
|
+
bootSoftDeletes(): void;
|
|
427
|
+
softDeleted(callback: any): void;
|
|
428
|
+
restoring(callback: any): void;
|
|
429
|
+
restored(callback: any): void;
|
|
430
|
+
forceDeleting(callback: any): void;
|
|
431
|
+
forceDeleted(callback: any): void;
|
|
432
|
+
};
|
|
433
|
+
|
|
434
|
+
declare function HasUniqueIds(Model: any): {
|
|
435
|
+
new (): {
|
|
436
|
+
[x: string]: any;
|
|
437
|
+
useUniqueIds: boolean;
|
|
438
|
+
uniqueIds(): any[];
|
|
439
|
+
getKeyType(): any;
|
|
440
|
+
getIncrementing(): any;
|
|
441
|
+
};
|
|
442
|
+
[x: string]: any;
|
|
443
|
+
};
|
|
444
|
+
|
|
445
|
+
declare function migrateRun(config: any, options?: {}, destroyAll?: boolean): Promise<void>;
|
|
446
|
+
declare function migrateRollback(config: any, options?: {}, destroyAll?: boolean): Promise<void>;
|
|
447
|
+
declare function migrateStatus(config: any, options?: {}, destroyAll?: boolean): Promise<{
|
|
448
|
+
name: string;
|
|
449
|
+
ran: any;
|
|
450
|
+
batch: any;
|
|
451
|
+
}[]>;
|
|
452
|
+
|
|
453
|
+
declare function make(model: any, data: any, options?: {}): any;
|
|
454
|
+
declare function makeCollection(model: any, data: any): Collection;
|
|
455
|
+
declare function makePaginator(model: any, data: any): Paginator;
|
|
456
|
+
|
|
457
|
+
export { Attribute, Builder, CastsAttributes, Collection, HasUniqueIds, InvalidArgumentError, Migration, Model, ModelNotFoundError, Paginator, Pivot, QueryBuilder, RelationNotFoundError, Scope, softDeletes as SoftDeletes, arquebus, compose, flattenDeep, getAttrMethod, getAttrName, getGetterMethod, getRelationMethod, getRelationName, getScopeMethod, getScopeName, getSetterMethod, kebabCase, make, makeCollection, makePaginator, migrateRollback, migrateRun, migrateStatus, now, snakeCase, tap };
|