express-endpoints-collection 1.0.5 → 1.0.7

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.
Files changed (41) hide show
  1. package/dist/generator.d.ts +7 -0
  2. package/dist/generator.d.ts.map +1 -0
  3. package/dist/generator.js +53 -0
  4. package/dist/generator.js.map +1 -0
  5. package/dist/index.d.ts +27 -0
  6. package/dist/index.d.ts.map +1 -0
  7. package/dist/index.js +136 -0
  8. package/dist/index.js.map +1 -0
  9. package/dist/types/EndpointArgs.d.ts +12 -0
  10. package/dist/types/EndpointArgs.d.ts.map +1 -0
  11. package/dist/types/EndpointArgs.js +3 -0
  12. package/dist/types/EndpointArgs.js.map +1 -0
  13. package/dist/types/EndpointInfo.d.ts +11 -0
  14. package/dist/types/EndpointInfo.d.ts.map +1 -0
  15. package/dist/types/EndpointInfo.js +3 -0
  16. package/dist/types/EndpointInfo.js.map +1 -0
  17. package/dist/types/EndpointInputSchema.d.ts +8 -0
  18. package/dist/types/EndpointInputSchema.d.ts.map +1 -0
  19. package/dist/types/EndpointInputSchema.js +3 -0
  20. package/dist/types/EndpointInputSchema.js.map +1 -0
  21. package/dist/types/EndpointOutputSchema.d.ts +7 -0
  22. package/dist/types/EndpointOutputSchema.d.ts.map +1 -0
  23. package/dist/types/EndpointOutputSchema.js +3 -0
  24. package/dist/types/EndpointOutputSchema.js.map +1 -0
  25. package/dist/types/HttpMethod.d.ts +2 -0
  26. package/dist/types/HttpMethod.d.ts.map +1 -0
  27. package/dist/types/HttpMethod.js +3 -0
  28. package/dist/types/HttpMethod.js.map +1 -0
  29. package/dist/types/TypedRequest.d.ts +10 -0
  30. package/dist/types/TypedRequest.d.ts.map +1 -0
  31. package/dist/types/TypedRequest.js +3 -0
  32. package/dist/types/TypedRequest.js.map +1 -0
  33. package/dist/types/TypedRequestHandler.d.ts +7 -0
  34. package/dist/types/TypedRequestHandler.d.ts.map +1 -0
  35. package/dist/types/TypedRequestHandler.js +3 -0
  36. package/dist/types/TypedRequestHandler.js.map +1 -0
  37. package/dist/types/TypedResponse.d.ts +13 -0
  38. package/dist/types/TypedResponse.d.ts.map +1 -0
  39. package/dist/types/TypedResponse.js +3 -0
  40. package/dist/types/TypedResponse.js.map +1 -0
  41. package/package.json +3 -2
@@ -0,0 +1,7 @@
1
+ import { EndpointInfo } from "./types/EndpointInfo";
2
+ export declare function generateOpenAPI({ title, version, endpoints, }: {
3
+ title: string;
4
+ version: string;
5
+ endpoints: EndpointInfo[];
6
+ }): import("openapi3-ts/oas30").OpenAPIObject;
7
+ //# sourceMappingURL=generator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generator.d.ts","sourceRoot":"","sources":["../src/generator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAWpD,wBAAgB,eAAe,CAAC,EAC9B,KAAK,EACL,OAAO,EACP,SAAS,GACV,EAAE;IACD,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,YAAY,EAAE,CAAC;CAC3B,6CAmDA"}
@@ -0,0 +1,53 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.generateOpenAPI = generateOpenAPI;
4
+ const zod_to_openapi_1 = require("@asteasolutions/zod-to-openapi");
5
+ const zod_1 = require("zod");
6
+ (0, zod_to_openapi_1.extendZodWithOpenApi)(zod_1.z);
7
+ function generateOpenAPI({ title, version, endpoints, }) {
8
+ const registry = new zod_to_openapi_1.OpenAPIRegistry();
9
+ endpoints.forEach((endpoint) => {
10
+ const openapiPath = endpoint.path.replace(/:(\w+)/g, "{$1}");
11
+ const responses = {};
12
+ for (const outputSchema of endpoint.outputSchema) {
13
+ responses[outputSchema.status.toString()] = {
14
+ description: outputSchema.description ||
15
+ `Response for status code ${outputSchema.status}`,
16
+ content: outputSchema.body
17
+ ? {
18
+ "application/json": {
19
+ schema: outputSchema.body,
20
+ },
21
+ }
22
+ : undefined,
23
+ };
24
+ }
25
+ registry.registerPath({
26
+ method: endpoint.method,
27
+ path: openapiPath,
28
+ summary: endpoint.summary || "",
29
+ request: {
30
+ params: endpoint.inputSchema?.params,
31
+ query: endpoint.inputSchema?.query,
32
+ body: endpoint.inputSchema?.body
33
+ ? {
34
+ content: {
35
+ "application/json": { schema: endpoint.inputSchema.body },
36
+ },
37
+ }
38
+ : undefined,
39
+ headers: endpoint.inputSchema?.headers,
40
+ },
41
+ responses,
42
+ });
43
+ });
44
+ const generator = new zod_to_openapi_1.OpenApiGeneratorV3(registry.definitions);
45
+ return generator.generateDocument({
46
+ openapi: "3.0.0",
47
+ info: {
48
+ title,
49
+ version,
50
+ },
51
+ });
52
+ }
53
+ //# sourceMappingURL=generator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generator.js","sourceRoot":"","sources":["../src/generator.ts"],"names":[],"mappings":";;AAWA,0CA2DC;AArED,mEAKwC;AACxC,6BAAwB;AAExB,IAAA,qCAAoB,EAAC,OAAC,CAAC,CAAC;AAExB,SAAgB,eAAe,CAAC,EAC9B,KAAK,EACL,OAAO,EACP,SAAS,GAKV;IACC,MAAM,QAAQ,GAAG,IAAI,gCAAe,EAAE,CAAC;IAEvC,SAAS,CAAC,OAAO,CAAC,CAAC,QAAQ,EAAE,EAAE;QAC7B,MAAM,WAAW,GAAG,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;QAC7D,MAAM,SAAS,GAAmC,EAAE,CAAC;QAErD,KAAK,MAAM,YAAY,IAAI,QAAQ,CAAC,YAAY,EAAE,CAAC;YACjD,SAAS,CAAC,YAAY,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC,GAAG;gBAC1C,WAAW,EACT,YAAY,CAAC,WAAW;oBACxB,4BAA4B,YAAY,CAAC,MAAM,EAAE;gBACnD,OAAO,EAAE,YAAY,CAAC,IAAI;oBACxB,CAAC,CAAC;wBACE,kBAAkB,EAAE;4BAClB,MAAM,EAAE,YAAY,CAAC,IAAI;yBAC1B;qBACF;oBACH,CAAC,CAAC,SAAS;aACd,CAAC;QACJ,CAAC;QAED,QAAQ,CAAC,YAAY,CAAC;YACpB,MAAM,EAAE,QAAQ,CAAC,MAAM;YACvB,IAAI,EAAE,WAAW;YACjB,OAAO,EAAE,QAAQ,CAAC,OAAO,IAAI,EAAE;YAC/B,OAAO,EAAE;gBACP,MAAM,EAAE,QAAQ,CAAC,WAAW,EAAE,MAAM;gBACpC,KAAK,EAAE,QAAQ,CAAC,WAAW,EAAE,KAAK;gBAClC,IAAI,EAAE,QAAQ,CAAC,WAAW,EAAE,IAAI;oBAC9B,CAAC,CAAC;wBACE,OAAO,EAAE;4BACP,kBAAkB,EAAE,EAAE,MAAM,EAAE,QAAQ,CAAC,WAAW,CAAC,IAAI,EAAE;yBAC1D;qBACF;oBACH,CAAC,CAAC,SAAS;gBACb,OAAO,EAAE,QAAQ,CAAC,WAAW,EAAE,OAAO;aACvC;YACD,SAAS;SACV,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,MAAM,SAAS,GAAG,IAAI,mCAAkB,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;IAE/D,OAAO,SAAS,CAAC,gBAAgB,CAAC;QAChC,OAAO,EAAE,OAAO;QAChB,IAAI,EAAE;YACJ,KAAK;YACL,OAAO;SACR;KACF,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,27 @@
1
+ import { RequestHandler } from "express";
2
+ import { EndpointInputSchema } from "./types/EndpointInputSchema";
3
+ import { EndpointOutputSchema } from "./types/EndpointOutputSchema";
4
+ import { EndpointInfo } from "./types/EndpointInfo";
5
+ import { EndpointArgs } from "./types/EndpointArgs";
6
+ import { HttpMethod } from "./types/HttpMethod";
7
+ import { TypedRequestHandler } from "./types/TypedRequestHandler";
8
+ export declare class EndpointsCollection {
9
+ private endpoints;
10
+ private router;
11
+ constructor();
12
+ private static validateInput;
13
+ private static coerceAll;
14
+ private static coerce;
15
+ callOriginal(method: HttpMethod, path: string, { inputSchema, outputSchema, summary, beforeResponse, afterInputValidation, beforeInputValidation, }: EndpointArgs<EndpointInputSchema, EndpointOutputSchema>, handlers: RequestHandler | RequestHandler[] | TypedRequestHandler<any, any>): import("express-serve-static-core").Router;
16
+ get<TInput extends EndpointInputSchema, TOutput extends EndpointOutputSchema>(path: string, args: EndpointArgs<TInput, TOutput>, handlers: TypedRequestHandler<TInput, TOutput>): import("express-serve-static-core").Router;
17
+ post<TInput extends EndpointInputSchema, TOutput extends EndpointOutputSchema>(path: string, args: EndpointArgs<TInput, TOutput>, handler: TypedRequestHandler<TInput, TOutput>): import("express-serve-static-core").Router;
18
+ put<TInput extends EndpointInputSchema, TOutput extends EndpointOutputSchema>(path: string, args: EndpointArgs<TInput, TOutput>, handlers: TypedRequestHandler<TInput, TOutput>): import("express-serve-static-core").Router;
19
+ delete<TInput extends EndpointInputSchema, TOutput extends EndpointOutputSchema>(path: string, args: EndpointArgs<TInput, TOutput>, handlers: TypedRequestHandler<TInput, TOutput>): import("express-serve-static-core").Router;
20
+ patch<TInput extends EndpointInputSchema, TOutput extends EndpointOutputSchema>(path: string, args: EndpointArgs<TInput, TOutput>, handlers: TypedRequestHandler<TInput, TOutput>): import("express-serve-static-core").Router;
21
+ options<TInput extends EndpointInputSchema, TOutput extends EndpointOutputSchema>(path: string, args: EndpointArgs<TInput, TOutput>, handlers: TypedRequestHandler<TInput, TOutput>): import("express-serve-static-core").Router;
22
+ head<TInput extends EndpointInputSchema, TOutput extends EndpointOutputSchema>(path: string, args: EndpointArgs<TInput, TOutput>, handlers: TypedRequestHandler<TInput, TOutput>): import("express-serve-static-core").Router;
23
+ trace<TInput extends EndpointInputSchema, TOutput extends EndpointOutputSchema>(path: string, args: EndpointArgs<TInput, TOutput>, handlers: TypedRequestHandler<TInput, TOutput>): import("express-serve-static-core").Router;
24
+ getEndpoints(): EndpointInfo[];
25
+ getRouter(): import("express-serve-static-core").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MAAM,EACZ,IAAI,EAAE,YAAY,CAAC,MAAM,EAAE,OAAO,CAAC,EACnC,QAAQ,EAAE,mBAAmB,CAAC,MAAM,EAAE,OAAO,CAAC;IAKzC,YAAY;IAIZ,SAAS;CAGjB"}
package/dist/index.js ADDED
@@ -0,0 +1,136 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.EndpointsCollection = void 0;
4
+ const express_1 = require("express");
5
+ const zod_1 = require("zod");
6
+ class EndpointsCollection {
7
+ constructor() {
8
+ this.endpoints = [];
9
+ this.router = (0, express_1.Router)();
10
+ }
11
+ static validateInput(schema) {
12
+ return (req, res, next) => {
13
+ try {
14
+ if (schema.query) {
15
+ this.coerceAll(schema.query, req.query);
16
+ const querySchemaCoerced = zod_1.z.object(schema.query?.shape || {});
17
+ req.query = querySchemaCoerced.parse(req.query);
18
+ }
19
+ if (schema.body) {
20
+ this.coerceAll(schema.body, req.body);
21
+ const bodySchemaCoerced = zod_1.z.object(schema.body?.shape || {});
22
+ req.body = bodySchemaCoerced.parse(req.body);
23
+ }
24
+ if (schema.params) {
25
+ this.coerceAll(schema.params, req.params);
26
+ const paramsSchemaCoerced = zod_1.z.object(schema.params?.shape || {});
27
+ req.params = paramsSchemaCoerced.parse(req.params);
28
+ }
29
+ if (schema.headers) {
30
+ this.coerceAll(schema.headers, req.headers);
31
+ const headersSchemaCoerced = zod_1.z.object(schema.headers?.shape || {});
32
+ req.headers = headersSchemaCoerced.parse(req.headers);
33
+ }
34
+ next();
35
+ }
36
+ catch (error) {
37
+ if (error instanceof zod_1.z.ZodError) {
38
+ return res.status(400).json({
39
+ error: error.errors,
40
+ });
41
+ }
42
+ next(error);
43
+ }
44
+ };
45
+ }
46
+ static coerceAll(schema, data) {
47
+ for (const key in schema.shape) {
48
+ data[key] = EndpointsCollection.coerce(schema.shape[key], data[key]);
49
+ }
50
+ }
51
+ static coerce(schema, data) {
52
+ if (schema instanceof zod_1.z.ZodNumber) {
53
+ return Number(data);
54
+ }
55
+ else if (schema instanceof zod_1.z.ZodBoolean) {
56
+ return data === "true" || data === "1" || data === true;
57
+ }
58
+ else if (schema instanceof zod_1.z.ZodString) {
59
+ return String(data);
60
+ }
61
+ else if (schema instanceof zod_1.z.ZodDate) {
62
+ return new Date(data);
63
+ }
64
+ else if (schema instanceof zod_1.z.ZodArray) {
65
+ return Array.isArray(data) ? data : [data];
66
+ }
67
+ else if (schema instanceof zod_1.z.ZodRecord) {
68
+ return data;
69
+ }
70
+ else if (schema instanceof zod_1.z.ZodObject) {
71
+ const result = {};
72
+ for (const key in schema.shape) {
73
+ result[key] = EndpointsCollection.coerce(schema.shape[key], data[key]);
74
+ }
75
+ }
76
+ else {
77
+ return data;
78
+ }
79
+ }
80
+ callOriginal(method, path, { inputSchema, outputSchema, summary, beforeResponse = [], afterInputValidation = [], beforeInputValidation = [], }, handlers) {
81
+ this.endpoints.push({
82
+ path,
83
+ method: method,
84
+ inputSchema,
85
+ outputSchema,
86
+ summary,
87
+ });
88
+ const combinedHandlers = [];
89
+ if (beforeInputValidation) {
90
+ combinedHandlers.push(beforeInputValidation);
91
+ }
92
+ if (inputSchema) {
93
+ combinedHandlers.push(EndpointsCollection.validateInput(inputSchema));
94
+ }
95
+ if (afterInputValidation) {
96
+ combinedHandlers.push(afterInputValidation);
97
+ }
98
+ combinedHandlers.push(handlers);
99
+ if (beforeResponse) {
100
+ combinedHandlers.push(beforeResponse);
101
+ }
102
+ return this.router[method](path, ...combinedHandlers);
103
+ }
104
+ get(path, args, handlers) {
105
+ return this.callOriginal("get", path, args, handlers);
106
+ }
107
+ post(path, args, handler) {
108
+ return this.callOriginal("post", path, args, handler);
109
+ }
110
+ put(path, args, handlers) {
111
+ return this.callOriginal("put", path, args, handlers);
112
+ }
113
+ delete(path, args, handlers) {
114
+ return this.callOriginal("delete", path, args, handlers);
115
+ }
116
+ patch(path, args, handlers) {
117
+ return this.callOriginal("patch", path, args, handlers);
118
+ }
119
+ options(path, args, handlers) {
120
+ return this.callOriginal("options", path, args, handlers);
121
+ }
122
+ head(path, args, handlers) {
123
+ return this.callOriginal("head", path, args, handlers);
124
+ }
125
+ trace(path, args, handlers) {
126
+ return this.callOriginal("trace", path, args, handlers);
127
+ }
128
+ getEndpoints() {
129
+ return this.endpoints;
130
+ }
131
+ getRouter() {
132
+ return this.router;
133
+ }
134
+ }
135
+ exports.EndpointsCollection = EndpointsCollection;
136
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,qCAMiB;AAMjB,6BAAsC;AAGtC,MAAa,mBAAmB;IAI9B;QAHQ,cAAS,GAAmB,EAAE,CAAC;QAC/B,WAAM,GAAG,IAAA,gBAAM,GAAE,CAAC;IAEJ,CAAC;IAEf,MAAM,CAAC,aAAa,CAAC,MAA2B;QACtD,OAAO,CAAC,GAAY,EAAE,GAAa,EAAE,IAAkB,EAAE,EAAE;YACzD,IAAI,CAAC;gBACH,IAAI,MAAM,CAAC,KAAK,EAAE,CAAC;oBACjB,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,KAAK,EAAE,GAAG,CAAC,KAAK,CAAC,CAAC;oBACxC,MAAM,kBAAkB,GAAG,OAAC,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,EAAE,KAAK,IAAI,EAAE,CAAC,CAAC;oBAC/D,GAAG,CAAC,KAAK,GAAG,kBAAkB,CAAC,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;gBAClD,CAAC;gBACD,IAAI,MAAM,CAAC,IAAI,EAAE,CAAC;oBAChB,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,EAAE,GAAG,CAAC,IAAI,CAAC,CAAC;oBACtC,MAAM,iBAAiB,GAAG,OAAC,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,IAAI,EAAE,CAAC,CAAC;oBAC7D,GAAG,CAAC,IAAI,GAAG,i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 import { RequestHandler } from "express";
4
+ export type EndpointArgs<TInput extends EndpointInputSchema, TOutput extends EndpointOutputSchema> = {
5
+ inputSchema?: TInput;
6
+ outputSchema: TOutput;
7
+ summary?: string;
8
+ beforeInputValidation?: RequestHandler | RequestHandler[];
9
+ afterInputValidation?: RequestHandler | RequestHandler[];
10
+ beforeResponse?: RequestHandler | RequestHandler[];
11
+ };
12
+ //# sourceMappingURL=EndpointArgs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EndpointArgs.d.ts","sourceRoot":"","sources":["../../src/types/EndpointArgs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAEzC,MAAM,MAAM,YAAY,CACtB,MAAM,SAAS,mBAAmB,EAClC,OAAO,SAAS,oBAAoB,IAClC;IACF,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,OAAO,CAAC;IACtB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,qBAAqB,CAAC,EAAE,cAAc,GAAG,cAAc,EAAE,CAAC;IAC1D,oBAAoB,CAAC,EAAE,cAAc,GAAG,cAAc,EAAE,CAAC;IACzD,cAAc,CAAC,EAAE,cAAc,GAAG,cAAc,EAAE,CAAC;CACpD,CAAC"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=EndpointArgs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EndpointArgs.js","sourceRoot":"","sources":["../../src/types/EndpointArgs.ts"],"names":[],"mappings":""}
@@ -0,0 +1,11 @@
1
+ import { EndpointInputSchema } from "./EndpointInputSchema";
2
+ import { EndpointOutputSchema } from "./EndpointOutputSchema";
3
+ import { HttpMethod } from "./HttpMethod";
4
+ export type EndpointInfo = {
5
+ path: string;
6
+ method: HttpMethod;
7
+ inputSchema?: EndpointInputSchema;
8
+ outputSchema: EndpointOutputSchema;
9
+ summary?: string;
10
+ };
11
+ //# sourceMappingURL=EndpointInfo.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EndpointInfo.d.ts","sourceRoot":"","sources":["../../src/types/EndpointInfo.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,MAAM,MAAM,YAAY,GAAG;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,UAAU,CAAC;IACnB,WAAW,CAAC,EAAE,mBAAmB,CAAC;IAClC,YAAY,EAAE,oBAAoB,CAAC;IACnC,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=EndpointInfo.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EndpointInfo.js","sourceRoot":"","sources":["../../src/types/EndpointInfo.ts"],"names":[],"mappings":""}
@@ -0,0 +1,8 @@
1
+ import { AnyZodObject } from "zod";
2
+ export type EndpointInputSchema = {
3
+ query?: AnyZodObject;
4
+ body?: AnyZodObject;
5
+ params?: AnyZodObject;
6
+ headers?: AnyZodObject;
7
+ };
8
+ //# sourceMappingURL=EndpointInputSchema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EndpointInputSchema.d.ts","sourceRoot":"","sources":["../../src/types/EndpointInputSchema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,KAAK,CAAC;AAEnC,MAAM,MAAM,mBAAmB,GAAG;IAChC,KAAK,CAAC,EAAE,YAAY,CAAC;IACrB,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,OAAO,CAAC,EAAE,YAAY,CAAC;CACxB,CAAC"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=EndpointInputSchema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EndpointInputSchema.js","sourceRoot":"","sources":["../../src/types/EndpointInputSchema.ts"],"names":[],"mappings":""}
@@ -0,0 +1,7 @@
1
+ import { AnyZodObject } from "zod";
2
+ export type EndpointOutputSchema = {
3
+ status: number;
4
+ description?: string;
5
+ body?: AnyZodObject;
6
+ }[];
7
+ //# sourceMappingURL=EndpointOutputSchema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EndpointOutputSchema.d.ts","sourceRoot":"","sources":["../../src/types/EndpointOutputSchema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,KAAK,CAAC;AAEnC,MAAM,MAAM,oBAAoB,GAAG;IACjC,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,YAAY,CAAC;CACrB,EAAE,CAAC"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=EndpointOutputSchema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EndpointOutputSchema.js","sourceRoot":"","sources":["../../src/types/EndpointOutputSchema.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export type HttpMethod = "get" | "post" | "put" | "delete" | "patch" | "options" | "head" | "trace";
2
+ //# sourceMappingURL=HttpMethod.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HttpMethod.d.ts","sourceRoot":"","sources":["../../src/types/HttpMethod.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,UAAU,GAClB,KAAK,GACL,MAAM,GACN,KAAK,GACL,QAAQ,GACR,OAAO,GACP,SAAS,GACT,MAAM,GACN,OAAO,CAAC"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=HttpMethod.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HttpMethod.js","sourceRoot":"","sources":["../../src/types/HttpMethod.ts"],"names":[],"mappings":""}
@@ -0,0 +1,10 @@
1
+ import { EndpointInputSchema } from "./EndpointInputSchema";
2
+ import { z } from "zod";
3
+ import { Request } from "express";
4
+ export type TypedRequest<T extends EndpointInputSchema> = Omit<Request, "body" | "query" | "params" | "headers"> & {
5
+ body: z.infer<NonNullable<T["body"]>>;
6
+ query: z.infer<NonNullable<T["query"]>>;
7
+ params: z.infer<NonNullable<T["params"]>>;
8
+ headers: z.infer<NonNullable<T["headers"]>>;
9
+ };
10
+ //# sourceMappingURL=TypedRequest.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TypedRequest.d.ts","sourceRoot":"","sources":["../../src/types/TypedRequest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAElC,MAAM,MAAM,YAAY,CAAC,CAAC,SAAS,mBAAmB,IAAI,IAAI,CAC5D,OAAO,EACP,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,SAAS,CACxC,GAAG;IACF,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;IACtC,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;IACxC,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;IAC1C,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;CAC7C,CAAC"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=TypedRequest.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TypedRequest.js","sourceRoot":"","sources":["../../src/types/TypedRequest.ts"],"names":[],"mappings":""}
@@ -0,0 +1,7 @@
1
+ import { EndpointInputSchema } from "./EndpointInputSchema";
2
+ import { EndpointOutputSchema } from "./EndpointOutputSchema";
3
+ import { TypedRequest } from "./TypedRequest";
4
+ import { TypedResponse } from "./TypedResponse";
5
+ import { NextFunction } from "express";
6
+ export type TypedRequestHandler<TInput extends EndpointInputSchema, TOutput extends EndpointOutputSchema> = (req: TypedRequest<TInput>, res: TypedResponse<TOutput>, next: NextFunction) => void | Promise<void>;
7
+ //# sourceMappingURL=TypedRequestHandler.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TypedRequestHandler.d.ts","sourceRoot":"","sources":["../../src/types/TypedRequestHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEvC,MAAM,MAAM,mBAAmB,CAC7B,MAAM,SAAS,mBAAmB,EAClC,OAAO,SAAS,oBAAoB,IAClC,CACF,GAAG,EAAE,YAAY,CAAC,MAAM,CAAC,EACzB,GAAG,EAAE,aAAa,CAAC,OAAO,CAAC,EAC3B,IAAI,EAAE,YAAY,KACf,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=TypedRequestHandler.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TypedRequestHandler.js","sourceRoot":"","sources":["../../src/types/TypedRequestHandler.ts"],"names":[],"mappings":""}
@@ -0,0 +1,13 @@
1
+ import { EndpointOutputSchema } from "./EndpointOutputSchema";
2
+ import { z } from "zod";
3
+ import { Response } from "express";
4
+ export type TypedResponse<T extends EndpointOutputSchema> = Omit<Response, "json" | "status" | "sendStatus"> & {
5
+ json: (data: z.infer<NonNullable<T[number]["body"]>>) => void;
6
+ status: <S extends T[number]["status"]>(code: S) => Omit<TypedResponse<T>, "status"> & {
7
+ json: (data: z.infer<NonNullable<Extract<T[number], {
8
+ status: S;
9
+ }>["body"]>>) => void;
10
+ };
11
+ sendStatus: <S extends T[number]["status"]>(code: S) => void;
12
+ };
13
+ //# sourceMappingURL=TypedResponse.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TypedResponse.d.ts","sourceRoot":"","sources":["../../src/types/TypedResponse.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAEnC,MAAM,MAAM,aAAa,CAAC,CAAC,SAAS,oBAAoB,IAAI,IAAI,CAC9D,QAAQ,EACR,MAAM,GAAG,QAAQ,GAAG,YAAY,CACjC,GAAG;IACF,IAAI,EAAE,CAAC,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC;IAC9D,MAAM,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,EACpC,IAAI,EAAE,CAAC,KACJ,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,QAAQ,CAAC,GAAG;QACtC,IAAI,EAAE,CACJ,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE;YAAE,MAAM,EAAE,CAAC,CAAA;SAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,KAClE,IAAI,CAAC;KACX,CAAC;IACF,UAAU,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,CAAC,KAAK,IAAI,CAAC;CAC9D,CAAC"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=TypedResponse.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TypedResponse.js","sourceRoot":"","sources":["../../src/types/TypedResponse.ts"],"names":[],"mappings":""}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "express-endpoints-collection",
3
- "version": "1.0.5",
3
+ "version": "1.0.7",
4
4
  "main": "./dist/index.js",
5
5
  "repository": "https://github.com/pilotpirxie/express-endpoints-collection.git",
6
6
  "author": "pilotpirxie <10637666+pilotpirxie@users.noreply.github.com>",
@@ -21,7 +21,8 @@
21
21
  "prettier": "prettier --write .",
22
22
  "dev": "ts-node ./example/app.ts",
23
23
  "minimal": "ts-node ./example/minimal.ts",
24
- "build": "tsc"
24
+ "build": "tsc",
25
+ "prepare": "tsc"
25
26
  },
26
27
  "dependencies": {
27
28
  "@asteasolutions/zod-to-openapi": "^7.1.1",