@alevnyacow/nzmt 0.36.0 → 0.38.0
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.
|
@@ -25,6 +25,9 @@ export type OnErrorHandler = (request: {
|
|
|
25
25
|
error: ControllerErrorModel;
|
|
26
26
|
req: NextRequest;
|
|
27
27
|
}) => Promise<void>;
|
|
28
|
+
export type Methods<T extends Metadata> = {
|
|
29
|
+
[K in keyof T['schemas']]: (payload: z.infer<T['schemas'][K]['query']> & z.infer<T['schemas'][K]['body']>) => Promise<z.infer<T['schemas'][K]['response']>>;
|
|
30
|
+
};
|
|
28
31
|
type EndpointLogic<T extends ZodAPISchemas> = {
|
|
29
32
|
handler: (payload: (T['query'] extends ZodType ? z.infer<T['query']> : {}) & (T['body'] extends ZodType ? z.infer<T['body']> : {}), request: {
|
|
30
33
|
request: NextRequest;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alevnyacow/nzmt",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.38.0",
|
|
4
4
|
"description": "Next Zod Modules Toolkit",
|
|
5
5
|
"keywords": ["next", "full-stack", "server", "backend", "cli", "scaffolding", "zod", "rest", "contract programming", "contract-first", "react-query", "ddd", "domain-driven"],
|
|
6
6
|
"repository": {
|