prisma-flare 1.3.0 → 1.3.2
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/dist/cli/db-migrate.cjs +119 -49
- package/dist/cli/db-migrate.js +125 -49
- package/dist/cli/db-reset.cjs +119 -49
- package/dist/cli/db-reset.js +125 -49
- package/dist/cli/index.cjs +119 -49
- package/dist/cli/index.js +125 -49
- package/dist/core/flareBuilder.d.cts +17 -45
- package/dist/core/flareBuilder.d.ts +17 -45
- package/dist/core/hooks.cjs +44 -22
- package/dist/core/hooks.d.cts +8 -8
- package/dist/core/hooks.d.ts +8 -8
- package/dist/core/hooks.js +44 -22
- package/dist/{hookRegistry-CjujesJK.d.cts → hookRegistry-B8oyCNJ9.d.cts} +14 -2
- package/dist/{hookRegistry--2l0ARPy.d.ts → hookRegistry-C2bTS4YN.d.ts} +14 -2
- package/dist/hooks.cjs +44 -22
- package/dist/hooks.d.cts +2 -2
- package/dist/hooks.d.ts +2 -2
- package/dist/hooks.js +44 -22
- package/dist/index.cjs +30 -8
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +30 -8
- package/dist/{prisma.types-CIEFXVL-.d.cts → prisma.types-WBv5kOSl.d.cts} +18 -1
- package/dist/{prisma.types-CIEFXVL-.d.ts → prisma.types-WBv5kOSl.d.ts} +18 -1
- package/package.json +2 -2
package/dist/cli/index.cjs
CHANGED
|
@@ -230,11 +230,32 @@ function getPrismaProvider(rootDir) {
|
|
|
230
230
|
}
|
|
231
231
|
function parseModelRelations(schemaContent) {
|
|
232
232
|
const models = [];
|
|
233
|
-
const
|
|
233
|
+
const modelStartRegex = /model\s+(\w+)\s*\{/g;
|
|
234
234
|
let modelMatch;
|
|
235
|
-
while ((modelMatch =
|
|
235
|
+
while ((modelMatch = modelStartRegex.exec(schemaContent)) !== null) {
|
|
236
236
|
const modelName = modelMatch[1];
|
|
237
|
-
const
|
|
237
|
+
const bodyStart = modelMatch.index + modelMatch[0].length;
|
|
238
|
+
let depth = 1;
|
|
239
|
+
let i = bodyStart;
|
|
240
|
+
let inString = false;
|
|
241
|
+
let stringChar = "";
|
|
242
|
+
while (i < schemaContent.length && depth > 0) {
|
|
243
|
+
const ch = schemaContent[i];
|
|
244
|
+
if (inString) {
|
|
245
|
+
if (ch === stringChar && schemaContent[i - 1] !== "\\") inString = false;
|
|
246
|
+
} else {
|
|
247
|
+
if (ch === '"' || ch === "'") {
|
|
248
|
+
inString = true;
|
|
249
|
+
stringChar = ch;
|
|
250
|
+
} else if (ch === "{") {
|
|
251
|
+
depth++;
|
|
252
|
+
} else if (ch === "}") {
|
|
253
|
+
depth--;
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
i++;
|
|
257
|
+
}
|
|
258
|
+
const modelBody = schemaContent.slice(bodyStart, i - 1);
|
|
238
259
|
const relations = [];
|
|
239
260
|
const lines = modelBody.split("\n");
|
|
240
261
|
for (const line of lines) {
|
|
@@ -294,13 +315,33 @@ ${entries.join(",\n")}
|
|
|
294
315
|
};`;
|
|
295
316
|
}
|
|
296
317
|
function getRelationModelMap(rootDir) {
|
|
318
|
+
const dmmfResult = getRelationModelMapFromDMMF(rootDir);
|
|
319
|
+
if (dmmfResult) return dmmfResult;
|
|
297
320
|
const resolution = resolveSchemaPath(rootDir);
|
|
298
|
-
if (!resolution)
|
|
299
|
-
return null;
|
|
300
|
-
}
|
|
321
|
+
if (!resolution) return null;
|
|
301
322
|
const models = parseModelRelations(resolution.content);
|
|
302
323
|
return generateRelationModelMap(models);
|
|
303
324
|
}
|
|
325
|
+
function getRelationModelMapFromDMMF(rootDir) {
|
|
326
|
+
try {
|
|
327
|
+
const clientPath = getPrismaClientPath(rootDir);
|
|
328
|
+
const resolvedPath = clientPath.startsWith("/") ? clientPath : require.resolve(clientPath, { paths: [rootDir] });
|
|
329
|
+
const prismaModule = require(resolvedPath);
|
|
330
|
+
const dmmf = prismaModule?.Prisma?.dmmf ?? prismaModule?.dmmf;
|
|
331
|
+
if (!dmmf?.datamodel?.models) return null;
|
|
332
|
+
const models = dmmf.datamodel.models.map((model) => ({
|
|
333
|
+
name: model.name,
|
|
334
|
+
relations: model.fields.filter((f) => f.kind === "object").map((f) => ({
|
|
335
|
+
fieldName: f.name,
|
|
336
|
+
targetModel: f.type,
|
|
337
|
+
isArray: f.isList
|
|
338
|
+
}))
|
|
339
|
+
}));
|
|
340
|
+
return generateRelationModelMap(models);
|
|
341
|
+
} catch {
|
|
342
|
+
return null;
|
|
343
|
+
}
|
|
344
|
+
}
|
|
304
345
|
|
|
305
346
|
// src/cli/generate-queries.ts
|
|
306
347
|
function toCamelCase(str) {
|
|
@@ -811,6 +852,11 @@ ${exportKeyword}type ColumnChangeCallback<T extends ModelName = ModelName> = (
|
|
|
811
852
|
/**
|
|
812
853
|
* Options for column change hooks (afterChange)
|
|
813
854
|
*/
|
|
855
|
+
${exportKeyword}interface HookOptions {
|
|
856
|
+
/** Tag to group hooks. Tagged hooks can be disabled/enabled via hookRegistry.disable(tag)/enable(tag). */
|
|
857
|
+
tag?: string;
|
|
858
|
+
}
|
|
859
|
+
|
|
814
860
|
${exportKeyword}interface ColumnChangeOptions<T extends ModelName = ModelName> {
|
|
815
861
|
/**
|
|
816
862
|
* Additional fields to include when fetching records for this hook.
|
|
@@ -818,6 +864,8 @@ ${exportKeyword}interface ColumnChangeOptions<T extends ModelName = ModelName> {
|
|
|
818
864
|
* Use this when your callback needs access to other fields.
|
|
819
865
|
*/
|
|
820
866
|
includeFields?: FieldName<T>[];
|
|
867
|
+
/** Tag to group hooks. Tagged hooks can be disabled/enabled via hookRegistry.disable(tag)/enable(tag). */
|
|
868
|
+
tag?: string;
|
|
821
869
|
}
|
|
822
870
|
`.trimStart();
|
|
823
871
|
}
|
|
@@ -827,53 +875,53 @@ var FLARE_BUILDER_METHODS = {
|
|
|
827
875
|
whereConditions: [
|
|
828
876
|
{
|
|
829
877
|
name: "where",
|
|
830
|
-
signature: "(condition: WhereInput<T>):
|
|
878
|
+
signature: "(condition: WhereInput<T>): this"
|
|
831
879
|
},
|
|
832
880
|
{
|
|
833
881
|
name: "andWhere",
|
|
834
|
-
signature: "(condition: WhereInput<T>):
|
|
882
|
+
signature: "(condition: WhereInput<T>): this"
|
|
835
883
|
},
|
|
836
884
|
{
|
|
837
885
|
name: "orWhere",
|
|
838
|
-
signature: "(condition: WhereInput<T>):
|
|
886
|
+
signature: "(condition: WhereInput<T>): this"
|
|
839
887
|
},
|
|
840
888
|
{
|
|
841
889
|
name: "whereGroup",
|
|
842
|
-
signature: "(callback: (builder: FlareBuilder<T, Record<string, never>>) => FlareBuilder<T, any>, mode?: 'AND' | 'OR'):
|
|
890
|
+
signature: "(callback: (builder: FlareBuilder<T, Record<string, never>>) => FlareBuilder<T, any>, mode?: 'AND' | 'OR'): this"
|
|
843
891
|
},
|
|
844
892
|
{
|
|
845
893
|
name: "orWhereGroup",
|
|
846
|
-
signature: "(callback: (builder: FlareBuilder<T, Record<string, never>>) => FlareBuilder<T, any>):
|
|
894
|
+
signature: "(callback: (builder: FlareBuilder<T, Record<string, never>>) => FlareBuilder<T, any>): this"
|
|
847
895
|
},
|
|
848
896
|
{
|
|
849
897
|
name: "withId",
|
|
850
|
-
signature: "(id: number | string):
|
|
898
|
+
signature: "(id: number | string): this"
|
|
851
899
|
}
|
|
852
900
|
],
|
|
853
901
|
orderingAndLimiting: [
|
|
854
902
|
{
|
|
855
903
|
name: "order",
|
|
856
|
-
signature: "(orderBy: OrderByInput<T>):
|
|
904
|
+
signature: "(orderBy: OrderByInput<T>): this"
|
|
857
905
|
},
|
|
858
906
|
{
|
|
859
907
|
name: "first",
|
|
860
|
-
signature: "(key?: keyof RecordType<T> | string):
|
|
908
|
+
signature: "(key?: keyof RecordType<T> | string): this"
|
|
861
909
|
},
|
|
862
910
|
{
|
|
863
911
|
name: "last",
|
|
864
|
-
signature: "(key?: keyof RecordType<T> | string):
|
|
912
|
+
signature: "(key?: keyof RecordType<T> | string): this"
|
|
865
913
|
},
|
|
866
914
|
{
|
|
867
915
|
name: "limit",
|
|
868
|
-
signature: "(count: number):
|
|
916
|
+
signature: "(count: number): this"
|
|
869
917
|
},
|
|
870
918
|
{
|
|
871
919
|
name: "skip",
|
|
872
|
-
signature: "(count: number):
|
|
920
|
+
signature: "(count: number): this"
|
|
873
921
|
},
|
|
874
922
|
{
|
|
875
923
|
name: "distinct",
|
|
876
|
-
signature: "(fields: DistinctInput<T>):
|
|
924
|
+
signature: "(fields: DistinctInput<T>): this"
|
|
877
925
|
}
|
|
878
926
|
],
|
|
879
927
|
selection: [
|
|
@@ -985,7 +1033,7 @@ var FLARE_BUILDER_METHODS = {
|
|
|
985
1033
|
pagination: [
|
|
986
1034
|
{
|
|
987
1035
|
name: "paginate",
|
|
988
|
-
signature:
|
|
1036
|
+
signature: (ns, useFlareResult) => useFlareResult ? `(page?: number, perPage?: number): Promise<PaginatedResult<FlareResult<T, Args>>>` : `(page?: number, perPage?: number): Promise<PaginatedResult<${ns}.Result<ModelDelegate<T>, Args, 'findFirstOrThrow'>>>`
|
|
989
1037
|
}
|
|
990
1038
|
],
|
|
991
1039
|
existence: [
|
|
@@ -997,11 +1045,11 @@ var FLARE_BUILDER_METHODS = {
|
|
|
997
1045
|
utilities: [
|
|
998
1046
|
{
|
|
999
1047
|
name: "when",
|
|
1000
|
-
signature: "(condition: boolean | (() => boolean), callback: (qb:
|
|
1048
|
+
signature: "(condition: boolean | (() => boolean), callback: (qb: this) => void): this"
|
|
1001
1049
|
},
|
|
1002
1050
|
{
|
|
1003
1051
|
name: "chunk",
|
|
1004
|
-
signature:
|
|
1052
|
+
signature: (ns, useFlareResult) => useFlareResult ? `(size: number, callback: (results: FlareResultMany<T, Args>) => Promise<void> | void): Promise<void>` : `(size: number, callback: (results: ${ns}.Result<ModelDelegate<T>, Args, 'findMany'>) => Promise<void> | void): Promise<void>`
|
|
1005
1053
|
},
|
|
1006
1054
|
{
|
|
1007
1055
|
name: "clone",
|
|
@@ -1200,9 +1248,10 @@ import {
|
|
|
1200
1248
|
*/
|
|
1201
1249
|
export function beforeCreate<T extends ModelName>(
|
|
1202
1250
|
model: T,
|
|
1203
|
-
callback: BeforeHookCallback<T
|
|
1251
|
+
callback: BeforeHookCallback<T>,
|
|
1252
|
+
options?: HookOptions
|
|
1204
1253
|
): void {
|
|
1205
|
-
_beforeCreate(model as any, callback as any);
|
|
1254
|
+
_beforeCreate(model as any, callback as any, options);
|
|
1206
1255
|
}
|
|
1207
1256
|
|
|
1208
1257
|
/**
|
|
@@ -1210,9 +1259,10 @@ export function beforeCreate<T extends ModelName>(
|
|
|
1210
1259
|
*/
|
|
1211
1260
|
export function afterCreate<T extends ModelName>(
|
|
1212
1261
|
model: T,
|
|
1213
|
-
callback: AfterHookCallback<T
|
|
1262
|
+
callback: AfterHookCallback<T>,
|
|
1263
|
+
options?: HookOptions
|
|
1214
1264
|
): void {
|
|
1215
|
-
_afterCreate(model as any, callback as any);
|
|
1265
|
+
_afterCreate(model as any, callback as any, options);
|
|
1216
1266
|
}
|
|
1217
1267
|
|
|
1218
1268
|
/**
|
|
@@ -1220,9 +1270,10 @@ export function afterCreate<T extends ModelName>(
|
|
|
1220
1270
|
*/
|
|
1221
1271
|
export function beforeUpdate<T extends ModelName>(
|
|
1222
1272
|
model: T,
|
|
1223
|
-
callback: BeforeHookCallback<T
|
|
1273
|
+
callback: BeforeHookCallback<T>,
|
|
1274
|
+
options?: HookOptions
|
|
1224
1275
|
): void {
|
|
1225
|
-
_beforeUpdate(model as any, callback as any);
|
|
1276
|
+
_beforeUpdate(model as any, callback as any, options);
|
|
1226
1277
|
}
|
|
1227
1278
|
|
|
1228
1279
|
/**
|
|
@@ -1230,9 +1281,10 @@ export function beforeUpdate<T extends ModelName>(
|
|
|
1230
1281
|
*/
|
|
1231
1282
|
export function afterUpdate<T extends ModelName>(
|
|
1232
1283
|
model: T,
|
|
1233
|
-
callback: AfterHookCallback<T
|
|
1284
|
+
callback: AfterHookCallback<T>,
|
|
1285
|
+
options?: HookOptions
|
|
1234
1286
|
): void {
|
|
1235
|
-
_afterUpdate(model as any, callback as any);
|
|
1287
|
+
_afterUpdate(model as any, callback as any, options);
|
|
1236
1288
|
}
|
|
1237
1289
|
|
|
1238
1290
|
/**
|
|
@@ -1240,9 +1292,10 @@ export function afterUpdate<T extends ModelName>(
|
|
|
1240
1292
|
*/
|
|
1241
1293
|
export function beforeDelete<T extends ModelName>(
|
|
1242
1294
|
model: T,
|
|
1243
|
-
callback: BeforeHookCallback<T
|
|
1295
|
+
callback: BeforeHookCallback<T>,
|
|
1296
|
+
options?: HookOptions
|
|
1244
1297
|
): void {
|
|
1245
|
-
_beforeDelete(model as any, callback as any);
|
|
1298
|
+
_beforeDelete(model as any, callback as any, options);
|
|
1246
1299
|
}
|
|
1247
1300
|
|
|
1248
1301
|
/**
|
|
@@ -1250,9 +1303,10 @@ export function beforeDelete<T extends ModelName>(
|
|
|
1250
1303
|
*/
|
|
1251
1304
|
export function afterDelete<T extends ModelName>(
|
|
1252
1305
|
model: T,
|
|
1253
|
-
callback: AfterHookCallback<T
|
|
1306
|
+
callback: AfterHookCallback<T>,
|
|
1307
|
+
options?: HookOptions
|
|
1254
1308
|
): void {
|
|
1255
|
-
_afterDelete(model as any, callback as any);
|
|
1309
|
+
_afterDelete(model as any, callback as any, options);
|
|
1256
1310
|
}
|
|
1257
1311
|
|
|
1258
1312
|
/**
|
|
@@ -1272,9 +1326,10 @@ export function afterChange<T extends ModelName>(
|
|
|
1272
1326
|
*/
|
|
1273
1327
|
export function afterUpsert<T extends ModelName>(
|
|
1274
1328
|
model: T,
|
|
1275
|
-
callback: AfterHookCallback<T
|
|
1329
|
+
callback: AfterHookCallback<T>,
|
|
1330
|
+
options?: HookOptions
|
|
1276
1331
|
): void {
|
|
1277
|
-
_afterUpsert(model as any, callback as any);
|
|
1332
|
+
_afterUpsert(model as any, callback as any, options);
|
|
1278
1333
|
}
|
|
1279
1334
|
|
|
1280
1335
|
// Re-export hookRegistry for advanced use cases
|
|
@@ -1354,7 +1409,8 @@ import {
|
|
|
1354
1409
|
*/
|
|
1355
1410
|
export declare function beforeCreate<T extends ModelName>(
|
|
1356
1411
|
model: T,
|
|
1357
|
-
callback: BeforeHookCallback<T
|
|
1412
|
+
callback: BeforeHookCallback<T>,
|
|
1413
|
+
options?: HookOptions
|
|
1358
1414
|
): void;
|
|
1359
1415
|
|
|
1360
1416
|
/**
|
|
@@ -1362,7 +1418,8 @@ export declare function beforeCreate<T extends ModelName>(
|
|
|
1362
1418
|
*/
|
|
1363
1419
|
export declare function afterCreate<T extends ModelName>(
|
|
1364
1420
|
model: T,
|
|
1365
|
-
callback: AfterHookCallback<T
|
|
1421
|
+
callback: AfterHookCallback<T>,
|
|
1422
|
+
options?: HookOptions
|
|
1366
1423
|
): void;
|
|
1367
1424
|
|
|
1368
1425
|
/**
|
|
@@ -1370,7 +1427,8 @@ export declare function afterCreate<T extends ModelName>(
|
|
|
1370
1427
|
*/
|
|
1371
1428
|
export declare function beforeUpdate<T extends ModelName>(
|
|
1372
1429
|
model: T,
|
|
1373
|
-
callback: BeforeHookCallback<T
|
|
1430
|
+
callback: BeforeHookCallback<T>,
|
|
1431
|
+
options?: HookOptions
|
|
1374
1432
|
): void;
|
|
1375
1433
|
|
|
1376
1434
|
/**
|
|
@@ -1378,7 +1436,8 @@ export declare function beforeUpdate<T extends ModelName>(
|
|
|
1378
1436
|
*/
|
|
1379
1437
|
export declare function afterUpdate<T extends ModelName>(
|
|
1380
1438
|
model: T,
|
|
1381
|
-
callback: AfterHookCallback<T
|
|
1439
|
+
callback: AfterHookCallback<T>,
|
|
1440
|
+
options?: HookOptions
|
|
1382
1441
|
): void;
|
|
1383
1442
|
|
|
1384
1443
|
/**
|
|
@@ -1386,7 +1445,8 @@ export declare function afterUpdate<T extends ModelName>(
|
|
|
1386
1445
|
*/
|
|
1387
1446
|
export declare function beforeDelete<T extends ModelName>(
|
|
1388
1447
|
model: T,
|
|
1389
|
-
callback: BeforeHookCallback<T
|
|
1448
|
+
callback: BeforeHookCallback<T>,
|
|
1449
|
+
options?: HookOptions
|
|
1390
1450
|
): void;
|
|
1391
1451
|
|
|
1392
1452
|
/**
|
|
@@ -1394,7 +1454,8 @@ export declare function beforeDelete<T extends ModelName>(
|
|
|
1394
1454
|
*/
|
|
1395
1455
|
export declare function afterDelete<T extends ModelName>(
|
|
1396
1456
|
model: T,
|
|
1397
|
-
callback: AfterHookCallback<T
|
|
1457
|
+
callback: AfterHookCallback<T>,
|
|
1458
|
+
options?: HookOptions
|
|
1398
1459
|
): void;
|
|
1399
1460
|
|
|
1400
1461
|
/**
|
|
@@ -1412,7 +1473,8 @@ export declare function afterChange<T extends ModelName>(
|
|
|
1412
1473
|
*/
|
|
1413
1474
|
export declare function afterUpsert<T extends ModelName>(
|
|
1414
1475
|
model: T,
|
|
1415
|
-
callback: AfterHookCallback<T
|
|
1476
|
+
callback: AfterHookCallback<T>,
|
|
1477
|
+
options?: HookOptions
|
|
1416
1478
|
): void;
|
|
1417
1479
|
|
|
1418
1480
|
// Re-export hookRegistry for advanced use cases
|
|
@@ -1536,6 +1598,7 @@ import type {
|
|
|
1536
1598
|
AfterHookCallback,
|
|
1537
1599
|
ColumnChangeCallback,
|
|
1538
1600
|
ColumnChangeOptions,
|
|
1601
|
+
HookOptions,
|
|
1539
1602
|
FieldName,
|
|
1540
1603
|
HookConfig
|
|
1541
1604
|
} from 'prisma-flare';
|
|
@@ -1584,7 +1647,8 @@ export declare class FlareClient extends BasePrismaClient {
|
|
|
1584
1647
|
*/
|
|
1585
1648
|
export declare function beforeCreate<T extends ModelName>(
|
|
1586
1649
|
model: T,
|
|
1587
|
-
callback: BeforeHookCallback<T
|
|
1650
|
+
callback: BeforeHookCallback<T>,
|
|
1651
|
+
options?: HookOptions
|
|
1588
1652
|
): void;
|
|
1589
1653
|
|
|
1590
1654
|
/**
|
|
@@ -1592,7 +1656,8 @@ export declare function beforeCreate<T extends ModelName>(
|
|
|
1592
1656
|
*/
|
|
1593
1657
|
export declare function afterCreate<T extends ModelName>(
|
|
1594
1658
|
model: T,
|
|
1595
|
-
callback: AfterHookCallback<T
|
|
1659
|
+
callback: AfterHookCallback<T>,
|
|
1660
|
+
options?: HookOptions
|
|
1596
1661
|
): void;
|
|
1597
1662
|
|
|
1598
1663
|
/**
|
|
@@ -1600,7 +1665,8 @@ export declare function afterCreate<T extends ModelName>(
|
|
|
1600
1665
|
*/
|
|
1601
1666
|
export declare function beforeUpdate<T extends ModelName>(
|
|
1602
1667
|
model: T,
|
|
1603
|
-
callback: BeforeHookCallback<T
|
|
1668
|
+
callback: BeforeHookCallback<T>,
|
|
1669
|
+
options?: HookOptions
|
|
1604
1670
|
): void;
|
|
1605
1671
|
|
|
1606
1672
|
/**
|
|
@@ -1608,7 +1674,8 @@ export declare function beforeUpdate<T extends ModelName>(
|
|
|
1608
1674
|
*/
|
|
1609
1675
|
export declare function afterUpdate<T extends ModelName>(
|
|
1610
1676
|
model: T,
|
|
1611
|
-
callback: AfterHookCallback<T
|
|
1677
|
+
callback: AfterHookCallback<T>,
|
|
1678
|
+
options?: HookOptions
|
|
1612
1679
|
): void;
|
|
1613
1680
|
|
|
1614
1681
|
/**
|
|
@@ -1616,7 +1683,8 @@ export declare function afterUpdate<T extends ModelName>(
|
|
|
1616
1683
|
*/
|
|
1617
1684
|
export declare function beforeDelete<T extends ModelName>(
|
|
1618
1685
|
model: T,
|
|
1619
|
-
callback: BeforeHookCallback<T
|
|
1686
|
+
callback: BeforeHookCallback<T>,
|
|
1687
|
+
options?: HookOptions
|
|
1620
1688
|
): void;
|
|
1621
1689
|
|
|
1622
1690
|
/**
|
|
@@ -1624,7 +1692,8 @@ export declare function beforeDelete<T extends ModelName>(
|
|
|
1624
1692
|
*/
|
|
1625
1693
|
export declare function afterDelete<T extends ModelName>(
|
|
1626
1694
|
model: T,
|
|
1627
|
-
callback: AfterHookCallback<T
|
|
1695
|
+
callback: AfterHookCallback<T>,
|
|
1696
|
+
options?: HookOptions
|
|
1628
1697
|
): void;
|
|
1629
1698
|
|
|
1630
1699
|
/**
|
|
@@ -1642,7 +1711,8 @@ export declare function afterChange<T extends ModelName>(
|
|
|
1642
1711
|
*/
|
|
1643
1712
|
export declare function afterUpsert<T extends ModelName>(
|
|
1644
1713
|
model: T,
|
|
1645
|
-
callback: AfterHookCallback<T
|
|
1714
|
+
callback: AfterHookCallback<T>,
|
|
1715
|
+
options?: HookOptions
|
|
1646
1716
|
): void;
|
|
1647
1717
|
|
|
1648
1718
|
// Re-export hookRegistry for advanced use cases
|