This commit is contained in:
2026-01-25 05:36:26 +01:00
parent cda056311b
commit 7169e467cc
5 changed files with 64 additions and 14 deletions
+19 -5
View File
@@ -2933,6 +2933,7 @@ export type APIPathsParams<
putMiddleware?: APIPathsParamsCrudMiddleware<T>;
deleteMiddleware?: APIPathsParamsCrudMiddleware<T>;
postResultsFn?: APIPathsPostResulstsFn<T>;
postResultsFnExtraParameters?: { [k: string]: any };
/** Runs For `POST`, `PUT`, and `DELETE` */
crudMiddleware?: APIPathsParamsCrudMiddleware<T>;
method: "GET" | "POST" | "PUT" | "DELETE";
@@ -2991,11 +2992,24 @@ export type APIPathsParamsCrudMiddleware<
export type APIPathsPostResulstsFn<
T extends { [k: string]: any } = { [k: string]: any },
> = (
params: APIPathsCrudParams<T> & {
res?: APIResponseObject;
},
) => Promise<void>;
P extends { [k: string]: any } = { [k: string]: any },
> = (params: APIPathsPostResulstsFnParams<T, P>) => Promise<void>;
export type APIPathsPostResulstsFnParams<
T extends { [k: string]: any } = { [k: string]: any },
P extends { [k: string]: any } = { [k: string]: any },
> = Omit<
APIPathsCrudParams<T>,
| "postResultsFnExtraParameters"
| "postResultsFn"
| "deleteMiddleware"
| "putMiddleware"
| "postMiddleware"
| "getMiddleware"
| "auth"
> & {
res?: APIResponseObject<T>;
} & P;
export type APIPathsParamsAllowedTable = {
table: string;