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