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/db-reset.cjs
CHANGED
|
@@ -233,11 +233,32 @@ function getPrismaProvider(rootDir) {
|
|
|
233
233
|
}
|
|
234
234
|
function parseModelRelations(schemaContent) {
|
|
235
235
|
const models = [];
|
|
236
|
-
const
|
|
236
|
+
const modelStartRegex = /model\s+(\w+)\s*\{/g;
|
|
237
237
|
let modelMatch;
|
|
238
|
-
while ((modelMatch =
|
|
238
|
+
while ((modelMatch = modelStartRegex.exec(schemaContent)) !== null) {
|
|
239
239
|
const modelName = modelMatch[1];
|
|
240
|
-
const
|
|
240
|
+
const bodyStart = modelMatch.index + modelMatch[0].length;
|
|
241
|
+
let depth = 1;
|
|
242
|
+
let i = bodyStart;
|
|
243
|
+
let inString = false;
|
|
244
|
+
let stringChar = "";
|
|
245
|
+
while (i < schemaContent.length && depth > 0) {
|
|
246
|
+
const ch = schemaContent[i];
|
|
247
|
+
if (inString) {
|
|
248
|
+
if (ch === stringChar && schemaContent[i - 1] !== "\\") inString = false;
|
|
249
|
+
} else {
|
|
250
|
+
if (ch === '"' || ch === "'") {
|
|
251
|
+
inString = true;
|
|
252
|
+
stringChar = ch;
|
|
253
|
+
} else if (ch === "{") {
|
|
254
|
+
depth++;
|
|
255
|
+
} else if (ch === "}") {
|
|
256
|
+
depth--;
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
i++;
|
|
260
|
+
}
|
|
261
|
+
const modelBody = schemaContent.slice(bodyStart, i - 1);
|
|
241
262
|
const relations = [];
|
|
242
263
|
const lines = modelBody.split("\n");
|
|
243
264
|
for (const line of lines) {
|
|
@@ -297,13 +318,33 @@ ${entries.join(",\n")}
|
|
|
297
318
|
};`;
|
|
298
319
|
}
|
|
299
320
|
function getRelationModelMap(rootDir) {
|
|
321
|
+
const dmmfResult = getRelationModelMapFromDMMF(rootDir);
|
|
322
|
+
if (dmmfResult) return dmmfResult;
|
|
300
323
|
const resolution = resolveSchemaPath(rootDir);
|
|
301
|
-
if (!resolution)
|
|
302
|
-
return null;
|
|
303
|
-
}
|
|
324
|
+
if (!resolution) return null;
|
|
304
325
|
const models = parseModelRelations(resolution.content);
|
|
305
326
|
return generateRelationModelMap(models);
|
|
306
327
|
}
|
|
328
|
+
function getRelationModelMapFromDMMF(rootDir) {
|
|
329
|
+
try {
|
|
330
|
+
const clientPath = getPrismaClientPath(rootDir);
|
|
331
|
+
const resolvedPath = clientPath.startsWith("/") ? clientPath : require.resolve(clientPath, { paths: [rootDir] });
|
|
332
|
+
const prismaModule = require(resolvedPath);
|
|
333
|
+
const dmmf = prismaModule?.Prisma?.dmmf ?? prismaModule?.dmmf;
|
|
334
|
+
if (!dmmf?.datamodel?.models) return null;
|
|
335
|
+
const models = dmmf.datamodel.models.map((model) => ({
|
|
336
|
+
name: model.name,
|
|
337
|
+
relations: model.fields.filter((f) => f.kind === "object").map((f) => ({
|
|
338
|
+
fieldName: f.name,
|
|
339
|
+
targetModel: f.type,
|
|
340
|
+
isArray: f.isList
|
|
341
|
+
}))
|
|
342
|
+
}));
|
|
343
|
+
return generateRelationModelMap(models);
|
|
344
|
+
} catch {
|
|
345
|
+
return null;
|
|
346
|
+
}
|
|
347
|
+
}
|
|
307
348
|
|
|
308
349
|
// src/cli/templates/type-helpers.ts
|
|
309
350
|
function generateTypeHelpers(options = {}) {
|
|
@@ -549,6 +590,11 @@ ${exportKeyword}type ColumnChangeCallback<T extends ModelName = ModelName> = (
|
|
|
549
590
|
/**
|
|
550
591
|
* Options for column change hooks (afterChange)
|
|
551
592
|
*/
|
|
593
|
+
${exportKeyword}interface HookOptions {
|
|
594
|
+
/** Tag to group hooks. Tagged hooks can be disabled/enabled via hookRegistry.disable(tag)/enable(tag). */
|
|
595
|
+
tag?: string;
|
|
596
|
+
}
|
|
597
|
+
|
|
552
598
|
${exportKeyword}interface ColumnChangeOptions<T extends ModelName = ModelName> {
|
|
553
599
|
/**
|
|
554
600
|
* Additional fields to include when fetching records for this hook.
|
|
@@ -556,6 +602,8 @@ ${exportKeyword}interface ColumnChangeOptions<T extends ModelName = ModelName> {
|
|
|
556
602
|
* Use this when your callback needs access to other fields.
|
|
557
603
|
*/
|
|
558
604
|
includeFields?: FieldName<T>[];
|
|
605
|
+
/** Tag to group hooks. Tagged hooks can be disabled/enabled via hookRegistry.disable(tag)/enable(tag). */
|
|
606
|
+
tag?: string;
|
|
559
607
|
}
|
|
560
608
|
`.trimStart();
|
|
561
609
|
}
|
|
@@ -565,53 +613,53 @@ var FLARE_BUILDER_METHODS = {
|
|
|
565
613
|
whereConditions: [
|
|
566
614
|
{
|
|
567
615
|
name: "where",
|
|
568
|
-
signature: "(condition: WhereInput<T>):
|
|
616
|
+
signature: "(condition: WhereInput<T>): this"
|
|
569
617
|
},
|
|
570
618
|
{
|
|
571
619
|
name: "andWhere",
|
|
572
|
-
signature: "(condition: WhereInput<T>):
|
|
620
|
+
signature: "(condition: WhereInput<T>): this"
|
|
573
621
|
},
|
|
574
622
|
{
|
|
575
623
|
name: "orWhere",
|
|
576
|
-
signature: "(condition: WhereInput<T>):
|
|
624
|
+
signature: "(condition: WhereInput<T>): this"
|
|
577
625
|
},
|
|
578
626
|
{
|
|
579
627
|
name: "whereGroup",
|
|
580
|
-
signature: "(callback: (builder: FlareBuilder<T, Record<string, never>>) => FlareBuilder<T, any>, mode?: 'AND' | 'OR'):
|
|
628
|
+
signature: "(callback: (builder: FlareBuilder<T, Record<string, never>>) => FlareBuilder<T, any>, mode?: 'AND' | 'OR'): this"
|
|
581
629
|
},
|
|
582
630
|
{
|
|
583
631
|
name: "orWhereGroup",
|
|
584
|
-
signature: "(callback: (builder: FlareBuilder<T, Record<string, never>>) => FlareBuilder<T, any>):
|
|
632
|
+
signature: "(callback: (builder: FlareBuilder<T, Record<string, never>>) => FlareBuilder<T, any>): this"
|
|
585
633
|
},
|
|
586
634
|
{
|
|
587
635
|
name: "withId",
|
|
588
|
-
signature: "(id: number | string):
|
|
636
|
+
signature: "(id: number | string): this"
|
|
589
637
|
}
|
|
590
638
|
],
|
|
591
639
|
orderingAndLimiting: [
|
|
592
640
|
{
|
|
593
641
|
name: "order",
|
|
594
|
-
signature: "(orderBy: OrderByInput<T>):
|
|
642
|
+
signature: "(orderBy: OrderByInput<T>): this"
|
|
595
643
|
},
|
|
596
644
|
{
|
|
597
645
|
name: "first",
|
|
598
|
-
signature: "(key?: keyof RecordType<T> | string):
|
|
646
|
+
signature: "(key?: keyof RecordType<T> | string): this"
|
|
599
647
|
},
|
|
600
648
|
{
|
|
601
649
|
name: "last",
|
|
602
|
-
signature: "(key?: keyof RecordType<T> | string):
|
|
650
|
+
signature: "(key?: keyof RecordType<T> | string): this"
|
|
603
651
|
},
|
|
604
652
|
{
|
|
605
653
|
name: "limit",
|
|
606
|
-
signature: "(count: number):
|
|
654
|
+
signature: "(count: number): this"
|
|
607
655
|
},
|
|
608
656
|
{
|
|
609
657
|
name: "skip",
|
|
610
|
-
signature: "(count: number):
|
|
658
|
+
signature: "(count: number): this"
|
|
611
659
|
},
|
|
612
660
|
{
|
|
613
661
|
name: "distinct",
|
|
614
|
-
signature: "(fields: DistinctInput<T>):
|
|
662
|
+
signature: "(fields: DistinctInput<T>): this"
|
|
615
663
|
}
|
|
616
664
|
],
|
|
617
665
|
selection: [
|
|
@@ -723,7 +771,7 @@ var FLARE_BUILDER_METHODS = {
|
|
|
723
771
|
pagination: [
|
|
724
772
|
{
|
|
725
773
|
name: "paginate",
|
|
726
|
-
signature:
|
|
774
|
+
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'>>>`
|
|
727
775
|
}
|
|
728
776
|
],
|
|
729
777
|
existence: [
|
|
@@ -735,11 +783,11 @@ var FLARE_BUILDER_METHODS = {
|
|
|
735
783
|
utilities: [
|
|
736
784
|
{
|
|
737
785
|
name: "when",
|
|
738
|
-
signature: "(condition: boolean | (() => boolean), callback: (qb:
|
|
786
|
+
signature: "(condition: boolean | (() => boolean), callback: (qb: this) => void): this"
|
|
739
787
|
},
|
|
740
788
|
{
|
|
741
789
|
name: "chunk",
|
|
742
|
-
signature:
|
|
790
|
+
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>`
|
|
743
791
|
},
|
|
744
792
|
{
|
|
745
793
|
name: "clone",
|
|
@@ -938,9 +986,10 @@ import {
|
|
|
938
986
|
*/
|
|
939
987
|
export function beforeCreate<T extends ModelName>(
|
|
940
988
|
model: T,
|
|
941
|
-
callback: BeforeHookCallback<T
|
|
989
|
+
callback: BeforeHookCallback<T>,
|
|
990
|
+
options?: HookOptions
|
|
942
991
|
): void {
|
|
943
|
-
_beforeCreate(model as any, callback as any);
|
|
992
|
+
_beforeCreate(model as any, callback as any, options);
|
|
944
993
|
}
|
|
945
994
|
|
|
946
995
|
/**
|
|
@@ -948,9 +997,10 @@ export function beforeCreate<T extends ModelName>(
|
|
|
948
997
|
*/
|
|
949
998
|
export function afterCreate<T extends ModelName>(
|
|
950
999
|
model: T,
|
|
951
|
-
callback: AfterHookCallback<T
|
|
1000
|
+
callback: AfterHookCallback<T>,
|
|
1001
|
+
options?: HookOptions
|
|
952
1002
|
): void {
|
|
953
|
-
_afterCreate(model as any, callback as any);
|
|
1003
|
+
_afterCreate(model as any, callback as any, options);
|
|
954
1004
|
}
|
|
955
1005
|
|
|
956
1006
|
/**
|
|
@@ -958,9 +1008,10 @@ export function afterCreate<T extends ModelName>(
|
|
|
958
1008
|
*/
|
|
959
1009
|
export function beforeUpdate<T extends ModelName>(
|
|
960
1010
|
model: T,
|
|
961
|
-
callback: BeforeHookCallback<T
|
|
1011
|
+
callback: BeforeHookCallback<T>,
|
|
1012
|
+
options?: HookOptions
|
|
962
1013
|
): void {
|
|
963
|
-
_beforeUpdate(model as any, callback as any);
|
|
1014
|
+
_beforeUpdate(model as any, callback as any, options);
|
|
964
1015
|
}
|
|
965
1016
|
|
|
966
1017
|
/**
|
|
@@ -968,9 +1019,10 @@ export function beforeUpdate<T extends ModelName>(
|
|
|
968
1019
|
*/
|
|
969
1020
|
export function afterUpdate<T extends ModelName>(
|
|
970
1021
|
model: T,
|
|
971
|
-
callback: AfterHookCallback<T
|
|
1022
|
+
callback: AfterHookCallback<T>,
|
|
1023
|
+
options?: HookOptions
|
|
972
1024
|
): void {
|
|
973
|
-
_afterUpdate(model as any, callback as any);
|
|
1025
|
+
_afterUpdate(model as any, callback as any, options);
|
|
974
1026
|
}
|
|
975
1027
|
|
|
976
1028
|
/**
|
|
@@ -978,9 +1030,10 @@ export function afterUpdate<T extends ModelName>(
|
|
|
978
1030
|
*/
|
|
979
1031
|
export function beforeDelete<T extends ModelName>(
|
|
980
1032
|
model: T,
|
|
981
|
-
callback: BeforeHookCallback<T
|
|
1033
|
+
callback: BeforeHookCallback<T>,
|
|
1034
|
+
options?: HookOptions
|
|
982
1035
|
): void {
|
|
983
|
-
_beforeDelete(model as any, callback as any);
|
|
1036
|
+
_beforeDelete(model as any, callback as any, options);
|
|
984
1037
|
}
|
|
985
1038
|
|
|
986
1039
|
/**
|
|
@@ -988,9 +1041,10 @@ export function beforeDelete<T extends ModelName>(
|
|
|
988
1041
|
*/
|
|
989
1042
|
export function afterDelete<T extends ModelName>(
|
|
990
1043
|
model: T,
|
|
991
|
-
callback: AfterHookCallback<T
|
|
1044
|
+
callback: AfterHookCallback<T>,
|
|
1045
|
+
options?: HookOptions
|
|
992
1046
|
): void {
|
|
993
|
-
_afterDelete(model as any, callback as any);
|
|
1047
|
+
_afterDelete(model as any, callback as any, options);
|
|
994
1048
|
}
|
|
995
1049
|
|
|
996
1050
|
/**
|
|
@@ -1010,9 +1064,10 @@ export function afterChange<T extends ModelName>(
|
|
|
1010
1064
|
*/
|
|
1011
1065
|
export function afterUpsert<T extends ModelName>(
|
|
1012
1066
|
model: T,
|
|
1013
|
-
callback: AfterHookCallback<T
|
|
1067
|
+
callback: AfterHookCallback<T>,
|
|
1068
|
+
options?: HookOptions
|
|
1014
1069
|
): void {
|
|
1015
|
-
_afterUpsert(model as any, callback as any);
|
|
1070
|
+
_afterUpsert(model as any, callback as any, options);
|
|
1016
1071
|
}
|
|
1017
1072
|
|
|
1018
1073
|
// Re-export hookRegistry for advanced use cases
|
|
@@ -1092,7 +1147,8 @@ import {
|
|
|
1092
1147
|
*/
|
|
1093
1148
|
export declare function beforeCreate<T extends ModelName>(
|
|
1094
1149
|
model: T,
|
|
1095
|
-
callback: BeforeHookCallback<T
|
|
1150
|
+
callback: BeforeHookCallback<T>,
|
|
1151
|
+
options?: HookOptions
|
|
1096
1152
|
): void;
|
|
1097
1153
|
|
|
1098
1154
|
/**
|
|
@@ -1100,7 +1156,8 @@ export declare function beforeCreate<T extends ModelName>(
|
|
|
1100
1156
|
*/
|
|
1101
1157
|
export declare function afterCreate<T extends ModelName>(
|
|
1102
1158
|
model: T,
|
|
1103
|
-
callback: AfterHookCallback<T
|
|
1159
|
+
callback: AfterHookCallback<T>,
|
|
1160
|
+
options?: HookOptions
|
|
1104
1161
|
): void;
|
|
1105
1162
|
|
|
1106
1163
|
/**
|
|
@@ -1108,7 +1165,8 @@ export declare function afterCreate<T extends ModelName>(
|
|
|
1108
1165
|
*/
|
|
1109
1166
|
export declare function beforeUpdate<T extends ModelName>(
|
|
1110
1167
|
model: T,
|
|
1111
|
-
callback: BeforeHookCallback<T
|
|
1168
|
+
callback: BeforeHookCallback<T>,
|
|
1169
|
+
options?: HookOptions
|
|
1112
1170
|
): void;
|
|
1113
1171
|
|
|
1114
1172
|
/**
|
|
@@ -1116,7 +1174,8 @@ export declare function beforeUpdate<T extends ModelName>(
|
|
|
1116
1174
|
*/
|
|
1117
1175
|
export declare function afterUpdate<T extends ModelName>(
|
|
1118
1176
|
model: T,
|
|
1119
|
-
callback: AfterHookCallback<T
|
|
1177
|
+
callback: AfterHookCallback<T>,
|
|
1178
|
+
options?: HookOptions
|
|
1120
1179
|
): void;
|
|
1121
1180
|
|
|
1122
1181
|
/**
|
|
@@ -1124,7 +1183,8 @@ export declare function afterUpdate<T extends ModelName>(
|
|
|
1124
1183
|
*/
|
|
1125
1184
|
export declare function beforeDelete<T extends ModelName>(
|
|
1126
1185
|
model: T,
|
|
1127
|
-
callback: BeforeHookCallback<T
|
|
1186
|
+
callback: BeforeHookCallback<T>,
|
|
1187
|
+
options?: HookOptions
|
|
1128
1188
|
): void;
|
|
1129
1189
|
|
|
1130
1190
|
/**
|
|
@@ -1132,7 +1192,8 @@ export declare function beforeDelete<T extends ModelName>(
|
|
|
1132
1192
|
*/
|
|
1133
1193
|
export declare function afterDelete<T extends ModelName>(
|
|
1134
1194
|
model: T,
|
|
1135
|
-
callback: AfterHookCallback<T
|
|
1195
|
+
callback: AfterHookCallback<T>,
|
|
1196
|
+
options?: HookOptions
|
|
1136
1197
|
): void;
|
|
1137
1198
|
|
|
1138
1199
|
/**
|
|
@@ -1150,7 +1211,8 @@ export declare function afterChange<T extends ModelName>(
|
|
|
1150
1211
|
*/
|
|
1151
1212
|
export declare function afterUpsert<T extends ModelName>(
|
|
1152
1213
|
model: T,
|
|
1153
|
-
callback: AfterHookCallback<T
|
|
1214
|
+
callback: AfterHookCallback<T>,
|
|
1215
|
+
options?: HookOptions
|
|
1154
1216
|
): void;
|
|
1155
1217
|
|
|
1156
1218
|
// Re-export hookRegistry for advanced use cases
|
|
@@ -1274,6 +1336,7 @@ import type {
|
|
|
1274
1336
|
AfterHookCallback,
|
|
1275
1337
|
ColumnChangeCallback,
|
|
1276
1338
|
ColumnChangeOptions,
|
|
1339
|
+
HookOptions,
|
|
1277
1340
|
FieldName,
|
|
1278
1341
|
HookConfig
|
|
1279
1342
|
} from 'prisma-flare';
|
|
@@ -1322,7 +1385,8 @@ export declare class FlareClient extends BasePrismaClient {
|
|
|
1322
1385
|
*/
|
|
1323
1386
|
export declare function beforeCreate<T extends ModelName>(
|
|
1324
1387
|
model: T,
|
|
1325
|
-
callback: BeforeHookCallback<T
|
|
1388
|
+
callback: BeforeHookCallback<T>,
|
|
1389
|
+
options?: HookOptions
|
|
1326
1390
|
): void;
|
|
1327
1391
|
|
|
1328
1392
|
/**
|
|
@@ -1330,7 +1394,8 @@ export declare function beforeCreate<T extends ModelName>(
|
|
|
1330
1394
|
*/
|
|
1331
1395
|
export declare function afterCreate<T extends ModelName>(
|
|
1332
1396
|
model: T,
|
|
1333
|
-
callback: AfterHookCallback<T
|
|
1397
|
+
callback: AfterHookCallback<T>,
|
|
1398
|
+
options?: HookOptions
|
|
1334
1399
|
): void;
|
|
1335
1400
|
|
|
1336
1401
|
/**
|
|
@@ -1338,7 +1403,8 @@ export declare function afterCreate<T extends ModelName>(
|
|
|
1338
1403
|
*/
|
|
1339
1404
|
export declare function beforeUpdate<T extends ModelName>(
|
|
1340
1405
|
model: T,
|
|
1341
|
-
callback: BeforeHookCallback<T
|
|
1406
|
+
callback: BeforeHookCallback<T>,
|
|
1407
|
+
options?: HookOptions
|
|
1342
1408
|
): void;
|
|
1343
1409
|
|
|
1344
1410
|
/**
|
|
@@ -1346,7 +1412,8 @@ export declare function beforeUpdate<T extends ModelName>(
|
|
|
1346
1412
|
*/
|
|
1347
1413
|
export declare function afterUpdate<T extends ModelName>(
|
|
1348
1414
|
model: T,
|
|
1349
|
-
callback: AfterHookCallback<T
|
|
1415
|
+
callback: AfterHookCallback<T>,
|
|
1416
|
+
options?: HookOptions
|
|
1350
1417
|
): void;
|
|
1351
1418
|
|
|
1352
1419
|
/**
|
|
@@ -1354,7 +1421,8 @@ export declare function afterUpdate<T extends ModelName>(
|
|
|
1354
1421
|
*/
|
|
1355
1422
|
export declare function beforeDelete<T extends ModelName>(
|
|
1356
1423
|
model: T,
|
|
1357
|
-
callback: BeforeHookCallback<T
|
|
1424
|
+
callback: BeforeHookCallback<T>,
|
|
1425
|
+
options?: HookOptions
|
|
1358
1426
|
): void;
|
|
1359
1427
|
|
|
1360
1428
|
/**
|
|
@@ -1362,7 +1430,8 @@ export declare function beforeDelete<T extends ModelName>(
|
|
|
1362
1430
|
*/
|
|
1363
1431
|
export declare function afterDelete<T extends ModelName>(
|
|
1364
1432
|
model: T,
|
|
1365
|
-
callback: AfterHookCallback<T
|
|
1433
|
+
callback: AfterHookCallback<T>,
|
|
1434
|
+
options?: HookOptions
|
|
1366
1435
|
): void;
|
|
1367
1436
|
|
|
1368
1437
|
/**
|
|
@@ -1380,7 +1449,8 @@ export declare function afterChange<T extends ModelName>(
|
|
|
1380
1449
|
*/
|
|
1381
1450
|
export declare function afterUpsert<T extends ModelName>(
|
|
1382
1451
|
model: T,
|
|
1383
|
-
callback: AfterHookCallback<T
|
|
1452
|
+
callback: AfterHookCallback<T>,
|
|
1453
|
+
options?: HookOptions
|
|
1384
1454
|
): void;
|
|
1385
1455
|
|
|
1386
1456
|
// Re-export hookRegistry for advanced use cases
|