@digitaldefiance/node-express-suite 3.11.32 → 3.12.1
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/README.md +874 -8
- package/package.json +5 -5
- package/src/controllers/openapi.d.ts +67 -0
- package/src/controllers/openapi.d.ts.map +1 -0
- package/src/controllers/openapi.js +89 -0
- package/src/controllers/openapi.js.map +1 -0
- package/src/decorators/auth.d.ts +128 -0
- package/src/decorators/auth.d.ts.map +1 -0
- package/src/decorators/auth.js +230 -0
- package/src/decorators/auth.js.map +1 -0
- package/src/decorators/base-controller.d.ts +144 -6
- package/src/decorators/base-controller.d.ts.map +1 -1
- package/src/decorators/base-controller.js +487 -31
- package/src/decorators/base-controller.js.map +1 -1
- package/src/decorators/controller.d.ts +63 -7
- package/src/decorators/controller.d.ts.map +1 -1
- package/src/decorators/controller.js +70 -39
- package/src/decorators/controller.js.map +1 -1
- package/src/decorators/handler-args.d.ts +68 -0
- package/src/decorators/handler-args.d.ts.map +1 -0
- package/src/decorators/handler-args.js +83 -0
- package/src/decorators/handler-args.js.map +1 -0
- package/src/decorators/http-methods.d.ts +143 -0
- package/src/decorators/http-methods.d.ts.map +1 -0
- package/src/decorators/http-methods.js +265 -0
- package/src/decorators/http-methods.js.map +1 -0
- package/src/decorators/index.d.ts +22 -0
- package/src/decorators/index.d.ts.map +1 -1
- package/src/decorators/index.js +56 -0
- package/src/decorators/index.js.map +1 -1
- package/src/decorators/lifecycle.d.ts +248 -0
- package/src/decorators/lifecycle.d.ts.map +1 -0
- package/src/decorators/lifecycle.js +301 -0
- package/src/decorators/lifecycle.js.map +1 -0
- package/src/decorators/metadata-collector.d.ts +175 -0
- package/src/decorators/metadata-collector.d.ts.map +1 -0
- package/src/decorators/metadata-collector.js +272 -0
- package/src/decorators/metadata-collector.js.map +1 -0
- package/src/decorators/metadata-keys.d.ts +121 -0
- package/src/decorators/metadata-keys.d.ts.map +1 -0
- package/src/decorators/metadata-keys.js +116 -0
- package/src/decorators/metadata-keys.js.map +1 -0
- package/src/decorators/middleware.d.ts +181 -0
- package/src/decorators/middleware.d.ts.map +1 -0
- package/src/decorators/middleware.js +400 -0
- package/src/decorators/middleware.js.map +1 -0
- package/src/decorators/openapi-params.d.ts +192 -0
- package/src/decorators/openapi-params.d.ts.map +1 -0
- package/src/decorators/openapi-params.js +332 -0
- package/src/decorators/openapi-params.js.map +1 -0
- package/src/decorators/openapi.d.ts +201 -0
- package/src/decorators/openapi.d.ts.map +1 -0
- package/src/decorators/openapi.js +334 -0
- package/src/decorators/openapi.js.map +1 -0
- package/src/decorators/params.d.ts +217 -0
- package/src/decorators/params.d.ts.map +1 -0
- package/src/decorators/params.js +323 -0
- package/src/decorators/params.js.map +1 -0
- package/src/decorators/response.d.ts +200 -0
- package/src/decorators/response.d.ts.map +1 -0
- package/src/decorators/response.js +315 -0
- package/src/decorators/response.js.map +1 -0
- package/src/decorators/schema.d.ts +99 -0
- package/src/decorators/schema.d.ts.map +1 -0
- package/src/decorators/schema.js +329 -0
- package/src/decorators/schema.js.map +1 -0
- package/src/decorators/transaction.d.ts +69 -0
- package/src/decorators/transaction.d.ts.map +1 -0
- package/src/decorators/transaction.js +80 -0
- package/src/decorators/transaction.js.map +1 -0
- package/src/decorators/validation.d.ts +188 -0
- package/src/decorators/validation.d.ts.map +1 -0
- package/src/decorators/validation.js +269 -0
- package/src/decorators/validation.js.map +1 -0
- package/src/decorators/zod-validation.d.ts +164 -4
- package/src/decorators/zod-validation.d.ts.map +1 -1
- package/src/decorators/zod-validation.js +692 -13
- package/src/decorators/zod-validation.js.map +1 -1
- package/src/index.d.ts +1 -0
- package/src/index.d.ts.map +1 -1
- package/src/index.js +1 -0
- package/src/index.js.map +1 -1
- package/src/interfaces/openApi/decoratorOptions.d.ts +760 -0
- package/src/interfaces/openApi/decoratorOptions.d.ts.map +1 -0
- package/src/interfaces/openApi/decoratorOptions.js +734 -0
- package/src/interfaces/openApi/decoratorOptions.js.map +1 -0
- package/src/interfaces/openApi/index.d.ts +1 -0
- package/src/interfaces/openApi/index.d.ts.map +1 -1
- package/src/interfaces/openApi/index.js +23 -0
- package/src/interfaces/openApi/index.js.map +1 -1
- package/src/interfaces/openApi/parameter.d.ts +2 -0
- package/src/interfaces/openApi/parameter.d.ts.map +1 -1
- package/src/interfaces/openApi/parameter.js +3 -1
- package/src/interfaces/openApi/parameter.js.map +1 -1
- package/src/interfaces/openApi/parameterSchema.d.ts +2 -0
- package/src/interfaces/openApi/parameterSchema.d.ts.map +1 -1
- package/src/interfaces/openApi/parameterSchema.js +3 -0
- package/src/interfaces/openApi/parameterSchema.js.map +1 -1
- package/src/openapi/builder.d.ts +249 -0
- package/src/openapi/builder.d.ts.map +1 -0
- package/src/openapi/builder.js +352 -0
- package/src/openapi/builder.js.map +1 -0
- package/src/openapi/controller.d.ts +153 -0
- package/src/openapi/controller.d.ts.map +1 -0
- package/src/openapi/controller.js +331 -0
- package/src/openapi/controller.js.map +1 -0
- package/src/openapi/index.d.ts +12 -0
- package/src/openapi/index.d.ts.map +1 -0
- package/src/openapi/index.js +20 -0
- package/src/openapi/index.js.map +1 -0
- package/src/openapi/markdown-generator.d.ts +52 -0
- package/src/openapi/markdown-generator.d.ts.map +1 -0
- package/src/openapi/markdown-generator.js +569 -0
- package/src/openapi/markdown-generator.js.map +1 -0
- package/src/openapi/middleware/index.d.ts +9 -0
- package/src/openapi/middleware/index.d.ts.map +1 -0
- package/src/openapi/middleware/index.js +15 -0
- package/src/openapi/middleware/index.js.map +1 -0
- package/src/openapi/middleware/redoc.d.ts +314 -0
- package/src/openapi/middleware/redoc.d.ts.map +1 -0
- package/src/openapi/middleware/redoc.js +181 -0
- package/src/openapi/middleware/redoc.js.map +1 -0
- package/src/openapi/middleware/swagger-ui.d.ts +123 -0
- package/src/openapi/middleware/swagger-ui.d.ts.map +1 -0
- package/src/openapi/middleware/swagger-ui.js +227 -0
- package/src/openapi/middleware/swagger-ui.js.map +1 -0
- package/src/openapi/schemas.d.ts +170 -0
- package/src/openapi/schemas.d.ts.map +1 -0
- package/src/openapi/schemas.js +340 -0
- package/src/openapi/schemas.js.map +1 -0
- package/src/registry/controller-registry.d.ts +78 -0
- package/src/registry/controller-registry.d.ts.map +1 -0
- package/src/registry/controller-registry.js +86 -0
- package/src/registry/controller-registry.js.map +1 -0
- package/src/registry/index.d.ts +2 -0
- package/src/registry/index.d.ts.map +1 -1
- package/src/registry/index.js +3 -1
- package/src/registry/index.js.map +1 -1
- package/src/routers/api.d.ts +2 -1
- package/src/routers/api.d.ts.map +1 -1
- package/src/routers/api.js +7 -1
- package/src/routers/api.js.map +1 -1
- package/src/types.d.ts +1 -0
- package/src/types.d.ts.map +1 -1
- package/src/types.js +1 -0
- package/src/types.js.map +1 -1
|
@@ -0,0 +1,340 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @fileoverview OpenAPI schema registry for component schemas.
|
|
4
|
+
* Provides a centralized place to register and retrieve OpenAPI schemas.
|
|
5
|
+
* Supports schema validation, removal, and inheritance tracking.
|
|
6
|
+
* @module openapi/schemas
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.CommonSecuritySchemes = exports.CommonSchemas = exports.OpenAPISchemaRegistry = void 0;
|
|
10
|
+
/**
|
|
11
|
+
* Registry for OpenAPI component schemas.
|
|
12
|
+
* Schemas are referenced by name in route metadata and resolved here.
|
|
13
|
+
*/
|
|
14
|
+
class OpenAPISchemaRegistryClass {
|
|
15
|
+
schemas = new Map();
|
|
16
|
+
securitySchemes = new Map();
|
|
17
|
+
/**
|
|
18
|
+
* Register a schema.
|
|
19
|
+
* @param name - Schema name (used in $ref)
|
|
20
|
+
* @param schema - OpenAPI schema object
|
|
21
|
+
* @param options - Optional metadata for the schema
|
|
22
|
+
*/
|
|
23
|
+
registerSchema(name, schema, options) {
|
|
24
|
+
this.schemas.set(name, {
|
|
25
|
+
schema,
|
|
26
|
+
description: options?.description,
|
|
27
|
+
parent: options?.parent,
|
|
28
|
+
autoGenerated: options?.autoGenerated,
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Register multiple schemas at once.
|
|
33
|
+
* @param schemas - Object mapping schema names to schema definitions
|
|
34
|
+
*/
|
|
35
|
+
registerSchemas(schemas) {
|
|
36
|
+
for (const [name, schema] of Object.entries(schemas)) {
|
|
37
|
+
this.schemas.set(name, { schema });
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Unregister a schema.
|
|
42
|
+
* @param name - Schema name to remove
|
|
43
|
+
* @returns True if the schema was removed, false if it didn't exist
|
|
44
|
+
*/
|
|
45
|
+
unregisterSchema(name) {
|
|
46
|
+
return this.schemas.delete(name);
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Get a schema by name.
|
|
50
|
+
* @param name - Schema name
|
|
51
|
+
* @returns The schema or undefined
|
|
52
|
+
*/
|
|
53
|
+
getSchema(name) {
|
|
54
|
+
return this.schemas.get(name)?.schema;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Get a schema definition with metadata.
|
|
58
|
+
* @param name - Schema name
|
|
59
|
+
* @returns The schema definition or undefined
|
|
60
|
+
*/
|
|
61
|
+
getSchemaDefinition(name) {
|
|
62
|
+
return this.schemas.get(name);
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Get all registered schemas.
|
|
66
|
+
* @returns Object mapping schema names to definitions
|
|
67
|
+
*/
|
|
68
|
+
getAllSchemas() {
|
|
69
|
+
const result = {};
|
|
70
|
+
for (const [name, def] of this.schemas) {
|
|
71
|
+
result[name] = def.schema;
|
|
72
|
+
}
|
|
73
|
+
return result;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Get all schema definitions with metadata.
|
|
77
|
+
* @returns Object mapping schema names to full definitions
|
|
78
|
+
*/
|
|
79
|
+
getAllSchemaDefinitions() {
|
|
80
|
+
const result = {};
|
|
81
|
+
for (const [name, def] of this.schemas) {
|
|
82
|
+
result[name] = def;
|
|
83
|
+
}
|
|
84
|
+
return result;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Get schemas that inherit from a parent schema.
|
|
88
|
+
* @param parentName - Parent schema name
|
|
89
|
+
* @returns Array of child schema names
|
|
90
|
+
*/
|
|
91
|
+
getChildSchemas(parentName) {
|
|
92
|
+
const children = [];
|
|
93
|
+
for (const [name, def] of this.schemas) {
|
|
94
|
+
if (def.parent === parentName) {
|
|
95
|
+
children.push(name);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
return children;
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Register a security scheme.
|
|
102
|
+
* @param name - Security scheme name
|
|
103
|
+
* @param scheme - OpenAPI security scheme object
|
|
104
|
+
*/
|
|
105
|
+
registerSecurityScheme(name, scheme) {
|
|
106
|
+
this.securitySchemes.set(name, scheme);
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* Register multiple security schemes at once.
|
|
110
|
+
* @param schemes - Object mapping scheme names to definitions
|
|
111
|
+
*/
|
|
112
|
+
registerSecuritySchemes(schemes) {
|
|
113
|
+
for (const [name, scheme] of Object.entries(schemes)) {
|
|
114
|
+
this.securitySchemes.set(name, scheme);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Unregister a security scheme.
|
|
119
|
+
* @param name - Security scheme name to remove
|
|
120
|
+
* @returns True if the scheme was removed, false if it didn't exist
|
|
121
|
+
*/
|
|
122
|
+
unregisterSecurityScheme(name) {
|
|
123
|
+
return this.securitySchemes.delete(name);
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Get a security scheme by name.
|
|
127
|
+
* @param name - Security scheme name
|
|
128
|
+
* @returns The security scheme or undefined
|
|
129
|
+
*/
|
|
130
|
+
getSecurityScheme(name) {
|
|
131
|
+
return this.securitySchemes.get(name);
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Get all registered security schemes.
|
|
135
|
+
* @returns Object mapping scheme names to definitions
|
|
136
|
+
*/
|
|
137
|
+
getAllSecuritySchemes() {
|
|
138
|
+
const result = {};
|
|
139
|
+
for (const [name, scheme] of this.securitySchemes) {
|
|
140
|
+
result[name] = scheme;
|
|
141
|
+
}
|
|
142
|
+
return result;
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* Clear all registrations (useful for testing).
|
|
146
|
+
*/
|
|
147
|
+
clear() {
|
|
148
|
+
this.schemas.clear();
|
|
149
|
+
this.securitySchemes.clear();
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* Clear only auto-generated schemas.
|
|
153
|
+
* Useful when re-scanning decorated classes.
|
|
154
|
+
*/
|
|
155
|
+
clearAutoGenerated() {
|
|
156
|
+
for (const [name, def] of this.schemas) {
|
|
157
|
+
if (def.autoGenerated) {
|
|
158
|
+
this.schemas.delete(name);
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* Get count of registered schemas.
|
|
164
|
+
*/
|
|
165
|
+
get schemaCount() {
|
|
166
|
+
return this.schemas.size;
|
|
167
|
+
}
|
|
168
|
+
/**
|
|
169
|
+
* Get count of registered security schemes.
|
|
170
|
+
*/
|
|
171
|
+
get securitySchemeCount() {
|
|
172
|
+
return this.securitySchemes.size;
|
|
173
|
+
}
|
|
174
|
+
/**
|
|
175
|
+
* Check if a schema is registered.
|
|
176
|
+
* @param name - Schema name
|
|
177
|
+
* @returns True if the schema is registered
|
|
178
|
+
*/
|
|
179
|
+
hasSchema(name) {
|
|
180
|
+
return this.schemas.has(name);
|
|
181
|
+
}
|
|
182
|
+
/**
|
|
183
|
+
* Check if a security scheme is registered.
|
|
184
|
+
* @param name - Security scheme name
|
|
185
|
+
* @returns True if the security scheme is registered
|
|
186
|
+
*/
|
|
187
|
+
hasSecurityScheme(name) {
|
|
188
|
+
return this.securitySchemes.has(name);
|
|
189
|
+
}
|
|
190
|
+
/**
|
|
191
|
+
* Validate that all schema references can be resolved.
|
|
192
|
+
* @returns Array of unresolved schema references
|
|
193
|
+
*/
|
|
194
|
+
validateSchemaReferences() {
|
|
195
|
+
const unresolvedRefs = [];
|
|
196
|
+
for (const [, def] of this.schemas) {
|
|
197
|
+
const refs = this.extractSchemaRefs(def.schema);
|
|
198
|
+
for (const ref of refs) {
|
|
199
|
+
if (!this.schemas.has(ref)) {
|
|
200
|
+
unresolvedRefs.push(ref);
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
return [...new Set(unresolvedRefs)];
|
|
205
|
+
}
|
|
206
|
+
/**
|
|
207
|
+
* Extract schema references from a schema object.
|
|
208
|
+
* @param schema - Schema object to scan
|
|
209
|
+
* @returns Array of referenced schema names
|
|
210
|
+
*/
|
|
211
|
+
extractSchemaRefs(schema) {
|
|
212
|
+
const refs = [];
|
|
213
|
+
const scan = (obj) => {
|
|
214
|
+
if (!obj || typeof obj !== 'object') {
|
|
215
|
+
return;
|
|
216
|
+
}
|
|
217
|
+
if (Array.isArray(obj)) {
|
|
218
|
+
obj.forEach(scan);
|
|
219
|
+
return;
|
|
220
|
+
}
|
|
221
|
+
const record = obj;
|
|
222
|
+
// Check for $ref
|
|
223
|
+
if (typeof record.$ref === 'string') {
|
|
224
|
+
const match = record.$ref.match(/^#\/components\/schemas\/(.+)$/);
|
|
225
|
+
if (match) {
|
|
226
|
+
refs.push(match[1]);
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
// Recursively scan properties
|
|
230
|
+
for (const value of Object.values(record)) {
|
|
231
|
+
scan(value);
|
|
232
|
+
}
|
|
233
|
+
};
|
|
234
|
+
scan(schema);
|
|
235
|
+
return refs;
|
|
236
|
+
}
|
|
237
|
+
/**
|
|
238
|
+
* Get all schema names.
|
|
239
|
+
* @returns Array of registered schema names
|
|
240
|
+
*/
|
|
241
|
+
getSchemaNames() {
|
|
242
|
+
return Array.from(this.schemas.keys());
|
|
243
|
+
}
|
|
244
|
+
/**
|
|
245
|
+
* Get all security scheme names.
|
|
246
|
+
* @returns Array of registered security scheme names
|
|
247
|
+
*/
|
|
248
|
+
getSecuritySchemeNames() {
|
|
249
|
+
return Array.from(this.securitySchemes.keys());
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
/**
|
|
253
|
+
* Singleton instance of the schema registry.
|
|
254
|
+
*/
|
|
255
|
+
exports.OpenAPISchemaRegistry = new OpenAPISchemaRegistryClass();
|
|
256
|
+
/**
|
|
257
|
+
* Common schemas that are typically needed.
|
|
258
|
+
* Applications can register these or define their own.
|
|
259
|
+
*/
|
|
260
|
+
exports.CommonSchemas = {
|
|
261
|
+
ErrorResponse: {
|
|
262
|
+
type: 'object',
|
|
263
|
+
properties: {
|
|
264
|
+
error: {
|
|
265
|
+
type: 'object',
|
|
266
|
+
properties: {
|
|
267
|
+
code: { type: 'string' },
|
|
268
|
+
message: { type: 'string' },
|
|
269
|
+
details: { type: 'object' },
|
|
270
|
+
requestId: { type: 'string' },
|
|
271
|
+
timestamp: { type: 'string', format: 'date-time' },
|
|
272
|
+
},
|
|
273
|
+
required: ['code', 'message'],
|
|
274
|
+
},
|
|
275
|
+
},
|
|
276
|
+
},
|
|
277
|
+
ValidationError: {
|
|
278
|
+
type: 'object',
|
|
279
|
+
properties: {
|
|
280
|
+
error: {
|
|
281
|
+
type: 'object',
|
|
282
|
+
properties: {
|
|
283
|
+
code: { type: 'string', example: 'VALIDATION_ERROR' },
|
|
284
|
+
message: { type: 'string' },
|
|
285
|
+
fields: {
|
|
286
|
+
type: 'array',
|
|
287
|
+
items: {
|
|
288
|
+
type: 'object',
|
|
289
|
+
properties: {
|
|
290
|
+
field: { type: 'string' },
|
|
291
|
+
message: { type: 'string' },
|
|
292
|
+
value: {},
|
|
293
|
+
},
|
|
294
|
+
required: ['field', 'message'],
|
|
295
|
+
},
|
|
296
|
+
},
|
|
297
|
+
},
|
|
298
|
+
required: ['code', 'message'],
|
|
299
|
+
},
|
|
300
|
+
},
|
|
301
|
+
},
|
|
302
|
+
PaginatedResponse: {
|
|
303
|
+
type: 'object',
|
|
304
|
+
properties: {
|
|
305
|
+
items: {
|
|
306
|
+
type: 'array',
|
|
307
|
+
items: {},
|
|
308
|
+
},
|
|
309
|
+
pagination: {
|
|
310
|
+
type: 'object',
|
|
311
|
+
properties: {
|
|
312
|
+
page: { type: 'integer', minimum: 1 },
|
|
313
|
+
pageSize: { type: 'integer', minimum: 1 },
|
|
314
|
+
total: { type: 'integer', minimum: 0 },
|
|
315
|
+
totalPages: { type: 'integer', minimum: 0 },
|
|
316
|
+
},
|
|
317
|
+
required: ['page', 'pageSize', 'total', 'totalPages'],
|
|
318
|
+
},
|
|
319
|
+
},
|
|
320
|
+
required: ['items', 'pagination'],
|
|
321
|
+
},
|
|
322
|
+
};
|
|
323
|
+
/**
|
|
324
|
+
* Common security schemes.
|
|
325
|
+
*/
|
|
326
|
+
exports.CommonSecuritySchemes = {
|
|
327
|
+
bearerAuth: {
|
|
328
|
+
type: 'http',
|
|
329
|
+
scheme: 'bearer',
|
|
330
|
+
bearerFormat: 'JWT',
|
|
331
|
+
description: 'JWT authentication token',
|
|
332
|
+
},
|
|
333
|
+
apiKey: {
|
|
334
|
+
type: 'apiKey',
|
|
335
|
+
in: 'header',
|
|
336
|
+
name: 'X-API-Key',
|
|
337
|
+
description: 'API key authentication',
|
|
338
|
+
},
|
|
339
|
+
};
|
|
340
|
+
//# sourceMappingURL=schemas.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schemas.js","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-node-express-suite/src/openapi/schemas.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAgBH;;;GAGG;AACH,MAAM,0BAA0B;IACtB,OAAO,GAAkC,IAAI,GAAG,EAAE,CAAC;IACnD,eAAe,GAAyC,IAAI,GAAG,EAAE,CAAC;IAE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AAC,MAAM,EAAE,SAAS,CAAC;aAC9B;SACF;KACF;IACD,iBAAiB,EAAE;QACjB,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,KAAK,EAAE;gBACL,IAAI,EAAE,OAAO;gBACb,KAAK,EAAE,EAAE;aACV;YACD,UAAU,EAAE;gBACV,IAAI,EAAE,QAAQ;gBACd,UAAU,EAAE;oBACV,IAAI,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,EAAE;oBACrC,QAAQ,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,EAAE;oBACzC,KAAK,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,EAAE;oBACtC,UAAU,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,EAAE;iBAC5C;gBACD,QAAQ,EAAE,CAAC,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,YAAY,CAAC;aACtD;SACF;QACD,QAAQ,EAAE,CAAC,OAAO,EAAE,YAAY,CAAC;KAClC;CACF,CAAC;AAEF;;GAEG;AACU,QAAA,qBAAqB,GAA4C;IAC5E,UAAU,EAAE;QACV,IAAI,EAAE,MAAM;QACZ,MAAM,EAAE,QAAQ;QAChB,YAAY,EAAE,KAAK;QACnB,WAAW,EAAE,0BAA0B;KACxC;IACD,MAAM,EAAE;QACN,IAAI,EAAE,QAAQ;QACd,EAAE,EAAE,QAAQ;QACZ,IAAI,EAAE,WAAW;QACjB,WAAW,EAAE,wBAAwB;KACtC;CACF,CAAC"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Controller registry for OpenAPI generation.
|
|
3
|
+
* Collects route definitions from all controllers for automatic OpenAPI spec generation.
|
|
4
|
+
* @module registry/controller-registry
|
|
5
|
+
*/
|
|
6
|
+
import { RouteConfig } from '../types';
|
|
7
|
+
/**
|
|
8
|
+
* Represents a registered controller with its base path and routes
|
|
9
|
+
*/
|
|
10
|
+
export interface RegisteredController {
|
|
11
|
+
/** The base path where the controller is mounted (e.g., '/blocks') */
|
|
12
|
+
basePath: string;
|
|
13
|
+
/** Unique name for the controller */
|
|
14
|
+
controllerName: string;
|
|
15
|
+
/** The route definitions from the controller */
|
|
16
|
+
routeDefinitions: RouteConfig<any, any>[];
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Registry that collects controller route definitions for OpenAPI generation.
|
|
20
|
+
* Controllers register themselves here, and the OpenAPIController uses this
|
|
21
|
+
* to build the OpenAPI specification dynamically.
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* ```typescript
|
|
25
|
+
* // In a controller's initRouteDefinitions:
|
|
26
|
+
* ControllerRegistry.register('/blocks', 'BlocksController', this.routeDefinitions);
|
|
27
|
+
*
|
|
28
|
+
* // In OpenAPIController:
|
|
29
|
+
* const controllers = ControllerRegistry.getAll();
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
32
|
+
declare class ControllerRegistryClass {
|
|
33
|
+
private controllers;
|
|
34
|
+
/**
|
|
35
|
+
* Register a controller with its routes.
|
|
36
|
+
* @param basePath - The base path where the controller is mounted (e.g., '/blocks')
|
|
37
|
+
* @param controllerName - Unique name for the controller
|
|
38
|
+
* @param routeDefinitions - The route definitions from the controller
|
|
39
|
+
*/
|
|
40
|
+
register(basePath: string, controllerName: string, routeDefinitions: RouteConfig<any, any>[]): void;
|
|
41
|
+
/**
|
|
42
|
+
* Unregister a controller (useful for testing).
|
|
43
|
+
* @param controllerName - The name of the controller to unregister
|
|
44
|
+
*/
|
|
45
|
+
unregister(controllerName: string): void;
|
|
46
|
+
/**
|
|
47
|
+
* Get all registered controllers.
|
|
48
|
+
* @returns Array of all registered controllers
|
|
49
|
+
*/
|
|
50
|
+
getAll(): RegisteredController[];
|
|
51
|
+
/**
|
|
52
|
+
* Get a specific controller by name.
|
|
53
|
+
* @param controllerName - The name of the controller
|
|
54
|
+
* @returns The registered controller or undefined
|
|
55
|
+
*/
|
|
56
|
+
get(controllerName: string): RegisteredController | undefined;
|
|
57
|
+
/**
|
|
58
|
+
* Clear all registrations (useful for testing).
|
|
59
|
+
*/
|
|
60
|
+
clear(): void;
|
|
61
|
+
/**
|
|
62
|
+
* Get count of registered controllers.
|
|
63
|
+
*/
|
|
64
|
+
get size(): number;
|
|
65
|
+
/**
|
|
66
|
+
* Check if a controller is registered.
|
|
67
|
+
* @param controllerName - The name of the controller
|
|
68
|
+
* @returns True if the controller is registered
|
|
69
|
+
*/
|
|
70
|
+
has(controllerName: string): boolean;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Singleton instance of the controller registry.
|
|
74
|
+
* Use this to register controllers and retrieve them for OpenAPI generation.
|
|
75
|
+
*/
|
|
76
|
+
export declare const ControllerRegistry: ControllerRegistryClass;
|
|
77
|
+
export {};
|
|
78
|
+
//# sourceMappingURL=controller-registry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"controller-registry.d.ts","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-node-express-suite/src/registry/controller-registry.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAEvC;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,sEAAsE;IACtE,QAAQ,EAAE,MAAM,CAAC;IACjB,qCAAqC;IACrC,cAAc,EAAE,MAAM,CAAC;IACvB,gDAAgD;IAChD,gBAAgB,EAAE,WAAW,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,CAAC;CAC3C;AAED;;;;;;;;;;;;;GAaG;AACH,cAAM,uBAAuB;IAC3B,OAAO,CAAC,WAAW,CAAgD;IAEnE;;;;;OAKG;IACH,QAAQ,CACN,QAAQ,EAAE,MAAM,EAChB,cAAc,EAAE,MAAM,EACtB,gBAAgB,EAAE,WAAW,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,GACxC,IAAI;IAQP;;;OAGG;IACH,UAAU,CAAC,cAAc,EAAE,MAAM,GAAG,IAAI;IAIxC;;;OAGG;IACH,MAAM,IAAI,oBAAoB,EAAE;IAIhC;;;;OAIG;IACH,GAAG,CAAC,cAAc,EAAE,MAAM,GAAG,oBAAoB,GAAG,SAAS;IAI7D;;OAEG;IACH,KAAK,IAAI,IAAI;IAIb;;OAEG;IACH,IAAI,IAAI,IAAI,MAAM,CAEjB;IAED;;;;OAIG;IACH,GAAG,CAAC,cAAc,EAAE,MAAM,GAAG,OAAO;CAGrC;AAED;;;GAGG;AACH,eAAO,MAAM,kBAAkB,yBAAgC,CAAC"}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @fileoverview Controller registry for OpenAPI generation.
|
|
4
|
+
* Collects route definitions from all controllers for automatic OpenAPI spec generation.
|
|
5
|
+
* @module registry/controller-registry
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.ControllerRegistry = void 0;
|
|
9
|
+
/**
|
|
10
|
+
* Registry that collects controller route definitions for OpenAPI generation.
|
|
11
|
+
* Controllers register themselves here, and the OpenAPIController uses this
|
|
12
|
+
* to build the OpenAPI specification dynamically.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```typescript
|
|
16
|
+
* // In a controller's initRouteDefinitions:
|
|
17
|
+
* ControllerRegistry.register('/blocks', 'BlocksController', this.routeDefinitions);
|
|
18
|
+
*
|
|
19
|
+
* // In OpenAPIController:
|
|
20
|
+
* const controllers = ControllerRegistry.getAll();
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
class ControllerRegistryClass {
|
|
24
|
+
controllers = new Map();
|
|
25
|
+
/**
|
|
26
|
+
* Register a controller with its routes.
|
|
27
|
+
* @param basePath - The base path where the controller is mounted (e.g., '/blocks')
|
|
28
|
+
* @param controllerName - Unique name for the controller
|
|
29
|
+
* @param routeDefinitions - The route definitions from the controller
|
|
30
|
+
*/
|
|
31
|
+
register(basePath, controllerName, routeDefinitions) {
|
|
32
|
+
this.controllers.set(controllerName, {
|
|
33
|
+
basePath,
|
|
34
|
+
controllerName,
|
|
35
|
+
routeDefinitions,
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Unregister a controller (useful for testing).
|
|
40
|
+
* @param controllerName - The name of the controller to unregister
|
|
41
|
+
*/
|
|
42
|
+
unregister(controllerName) {
|
|
43
|
+
this.controllers.delete(controllerName);
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Get all registered controllers.
|
|
47
|
+
* @returns Array of all registered controllers
|
|
48
|
+
*/
|
|
49
|
+
getAll() {
|
|
50
|
+
return Array.from(this.controllers.values());
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Get a specific controller by name.
|
|
54
|
+
* @param controllerName - The name of the controller
|
|
55
|
+
* @returns The registered controller or undefined
|
|
56
|
+
*/
|
|
57
|
+
get(controllerName) {
|
|
58
|
+
return this.controllers.get(controllerName);
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Clear all registrations (useful for testing).
|
|
62
|
+
*/
|
|
63
|
+
clear() {
|
|
64
|
+
this.controllers.clear();
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Get count of registered controllers.
|
|
68
|
+
*/
|
|
69
|
+
get size() {
|
|
70
|
+
return this.controllers.size;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Check if a controller is registered.
|
|
74
|
+
* @param controllerName - The name of the controller
|
|
75
|
+
* @returns True if the controller is registered
|
|
76
|
+
*/
|
|
77
|
+
has(controllerName) {
|
|
78
|
+
return this.controllers.has(controllerName);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Singleton instance of the controller registry.
|
|
83
|
+
* Use this to register controllers and retrieve them for OpenAPI generation.
|
|
84
|
+
*/
|
|
85
|
+
exports.ControllerRegistry = new ControllerRegistryClass();
|
|
86
|
+
//# sourceMappingURL=controller-registry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"controller-registry.js","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-node-express-suite/src/registry/controller-registry.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAiBH;;;;;;;;;;;;;GAaG;AACH,MAAM,uBAAuB;IACnB,WAAW,GAAsC,IAAI,GAAG,EAAE,CAAC;IAEnE;;;;;OAKG;IACH,QAAQ,CACN,QAAgB,EAChB,cAAsB,EACtB,gBAAyC;QAEzC,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,cAAc,EAAE;YACnC,QAAQ;YACR,cAAc;YACd,gBAAgB;SACjB,CAAC,CAAC;IACL,CAAC;IAED;;;OAGG;IACH,UAAU,CAAC,cAAsB;QAC/B,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;IAC1C,CAAC;IAED;;;OAGG;IACH,MAAM;QACJ,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,EAAE,CAAC,CAAC;IAC/C,CAAC;IAED;;;;OAIG;IACH,GAAG,CAAC,cAAsB;QACxB,OAAO,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IAC9C,CAAC;IAED;;OAEG;IACH,KAAK;QACH,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE,CAAC;IAC3B,CAAC;IAED;;OAEG;IACH,IAAI,IAAI;QACN,OAAO,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC;IAC/B,CAAC;IAED;;;;OAIG;IACH,GAAG,CAAC,cAAsB;QACxB,OAAO,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IAC9C,CAAC;CACF;AAED;;;GAGG;AACU,QAAA,kBAAkB,GAAG,IAAI,uBAAuB,EAAE,CAAC"}
|
package/src/registry/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-node-express-suite/src/registry/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-node-express-suite/src/registry/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,YAAY,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC"}
|
package/src/registry/index.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.emailServiceRegistry = void 0;
|
|
3
|
+
exports.ControllerRegistry = exports.emailServiceRegistry = void 0;
|
|
4
4
|
var email_service_registry_1 = require("./email-service-registry");
|
|
5
5
|
Object.defineProperty(exports, "emailServiceRegistry", { enumerable: true, get: function () { return email_service_registry_1.emailServiceRegistry; } });
|
|
6
|
+
var controller_registry_1 = require("./controller-registry");
|
|
7
|
+
Object.defineProperty(exports, "ControllerRegistry", { enumerable: true, get: function () { return controller_registry_1.ControllerRegistry; } });
|
|
6
8
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-node-express-suite/src/registry/index.ts"],"names":[],"mappings":";;;AAAA,mEAAgE;AAAvD,8HAAA,oBAAoB,OAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-node-express-suite/src/registry/index.ts"],"names":[],"mappings":";;;AAAA,mEAAgE;AAAvD,8HAAA,oBAAoB,OAAA;AAC7B,6DAA2D;AAAlD,yHAAA,kBAAkB,OAAA"}
|
package/src/routers/api.d.ts
CHANGED
|
@@ -27,6 +27,7 @@ import { CoreLanguageCode } from '@digitaldefiance/i18n-lib';
|
|
|
27
27
|
* @template TApplication Application type
|
|
28
28
|
*/
|
|
29
29
|
export declare class ApiRouter<TID extends PlatformID, TDate extends Date, TLanguage extends CoreLanguageCode, TAccountStatus extends string, TUser extends IUserBase<TID, TDate, TLanguage, TAccountStatus> = IUserBase<TID, TDate, TLanguage, TAccountStatus>, TTokenRole extends ITokenRole<TID, TDate> = ITokenRole<TID, TDate>, TBaseDocument extends IBaseDocument<any, TID> = IBaseDocument<any, TID>, TTokenUser extends ITokenUser = ITokenUser, TConstants extends IConstants = IConstants, TEnvironment extends Environment<TID> = Environment<TID>, TApplication extends IApplication<TID> = IApplication<TID>> extends BaseRouter<TID, TApplication> {
|
|
30
|
+
private readonly openApiController;
|
|
30
31
|
/** User controller for handling user-related API endpoints */
|
|
31
32
|
private readonly userController;
|
|
32
33
|
/** JWT service for token generation and validation */
|
|
@@ -48,7 +49,7 @@ export declare class ApiRouter<TID extends PlatformID, TDate extends Date, TLang
|
|
|
48
49
|
* Registers all required services and initializes the user controller.
|
|
49
50
|
* @param application Application instance with database connection and configuration
|
|
50
51
|
*/
|
|
51
|
-
constructor(application: TApplication);
|
|
52
|
+
constructor(application: TApplication, docsRoute?: string | undefined);
|
|
52
53
|
/**
|
|
53
54
|
* Registers all required services in the application service container.
|
|
54
55
|
* Services are registered as singletons and lazily instantiated.
|
package/src/routers/api.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-node-express-suite/src/routers/api.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAgB,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAC3E,OAAO,EACL,UAAU,EACV,UAAU,EACV,SAAS,EACV,MAAM,i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AE,KAAK,CAAC,EAClE,aAAa,SAAS,aAAa,CAAC,GAAG,EAAE,GAAG,CAAC,GAAG,aAAa,CAAC,GAAG,EAAE,GAAG,CAAC,EACvE,UAAU,SAAS,UAAU,GAAG,UAAU,EAC1C,UAAU,SAAS,UAAU,GAAG,UAAU,EAC1C,YAAY,SAAS,WAAW,CAAC,GAAG,CAAC,GAAG,WAAW,CAAC,GAAG,CAAC,EACxD,YAAY,SAAS,YAAY,CAAC,GAAG,CAAC,GAAG,YAAY,CAAC,GAAG,CAAC,CAC1D,SAAQ,UAAU,CAAC,GAAG,EAAE,YAAY,CAAC;IACrC,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAyB;IAC3D,8DAA8D;IAC9D,OAAO,CAAC,QAAQ,CAAC,cAAc,CAS7B;IACF,sDAAsD;IACtD,OAAO,CAAC,QAAQ,CAAC,UAAU,CAMzB;IACF,uCAAuC;IACvC,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAgB;IAC7C,kDAAkD;IAClD,OAAO,CAAC,QAAQ,CAAC,WAAW,CAY1B;IACF,kDAAkD;IAClD,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAsC;IAClE,yDAAyD;IACzD,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAAqB;IACxD,kDAAkD;IAClD,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAoB;IACjD,qEAAqE;IACrE,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAKhC;IACF;;;;OAIG;gBAED,WAAW,EAAE,YAAY,EACzB,SAAS,GAAE,MAAM,GAAG,SAAsB;IAqC5C;;;;OAIG;IACH,OAAO,CAAC,gBAAgB;CAgFzB"}
|
package/src/routers/api.js
CHANGED
|
@@ -16,6 +16,7 @@ const key_wrapping_1 = require("../services/key-wrapping");
|
|
|
16
16
|
const role_1 = require("../services/role");
|
|
17
17
|
const user_2 = require("../services/user");
|
|
18
18
|
const base_1 = require("./base");
|
|
19
|
+
const openapi_1 = require("../controllers/openapi");
|
|
19
20
|
/**
|
|
20
21
|
* Router for the API endpoints.
|
|
21
22
|
* Manages user controller and registers all required services via dependency injection.
|
|
@@ -32,6 +33,7 @@ const base_1 = require("./base");
|
|
|
32
33
|
* @template TApplication Application type
|
|
33
34
|
*/
|
|
34
35
|
class ApiRouter extends base_1.BaseRouter {
|
|
36
|
+
openApiController;
|
|
35
37
|
/** User controller for handling user-related API endpoints */
|
|
36
38
|
userController;
|
|
37
39
|
/** JWT service for token generation and validation */
|
|
@@ -53,7 +55,7 @@ class ApiRouter extends base_1.BaseRouter {
|
|
|
53
55
|
* Registers all required services and initializes the user controller.
|
|
54
56
|
* @param application Application instance with database connection and configuration
|
|
55
57
|
*/
|
|
56
|
-
constructor(application) {
|
|
58
|
+
constructor(application, docsRoute = '/openapi') {
|
|
57
59
|
super(application);
|
|
58
60
|
this.registerServices();
|
|
59
61
|
this.jwtService = application.services.get(container_1.ServiceKeys.JWT);
|
|
@@ -64,7 +66,11 @@ class ApiRouter extends base_1.BaseRouter {
|
|
|
64
66
|
this.backupCodeService = application.services.get(container_1.ServiceKeys.BACKUP_CODE);
|
|
65
67
|
this.userService = application.services.get(container_1.ServiceKeys.USER);
|
|
66
68
|
this.userController = new user_1.UserController(application, this.jwtService, this.userService, this.backupCodeService, this.roleService, this.eciesService);
|
|
69
|
+
this.openApiController = new openapi_1.OpenApiController(application);
|
|
67
70
|
this.router.use('/user', this.userController.router);
|
|
71
|
+
if (docsRoute !== undefined && docsRoute !== '') {
|
|
72
|
+
this.router.use(docsRoute, this.openApiController.router);
|
|
73
|
+
}
|
|
68
74
|
}
|
|
69
75
|
/**
|
|
70
76
|
* Registers all required services in the application service container.
|
package/src/routers/api.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.js","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-node-express-suite/src/routers/api.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAGH,oEAA2E;AAM3E,4CAA2C;AAC3C,8CAAqD;AAMrD,0CAAmD;AACnD,yDAA4D;AAC5D,yCAA6C;AAC7C,2DAA8D;AAC9D,2CAA+C;AAC/C,2CAA+C;AAC/C,iCAAoC;
|
|
1
|
+
{"version":3,"file":"api.js","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-node-express-suite/src/routers/api.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAGH,oEAA2E;AAM3E,4CAA2C;AAC3C,8CAAqD;AAMrD,0CAAmD;AACnD,yDAA4D;AAC5D,yCAA6C;AAC7C,2DAA8D;AAC9D,2CAA+C;AAC/C,2CAA+C;AAC/C,iCAAoC;AAEpC,oDAA2D;AAE3D;;;;;;;;;;;;;;GAcG;AACH,MAAa,SAiBX,SAAQ,iBAA6B;IACpB,iBAAiB,CAAyB;IAC3D,8DAA8D;IAC7C,cAAc,CAS7B;IACF,sDAAsD;IACrC,UAAU,CAMzB;IACF,uCAAuC;IACtB,YAAY,CAAgB;IAC7C,kDAAkD;IACjC,WAAW,CAY1B;IACF,kDAAkD;IACjC,WAAW,CAAsC;IAClE,yDAAyD;IACxC,kBAAkB,CAAqB;IACxD,kDAAkD;IACjC,YAAY,CAAoB;IACjD,qEAAqE;IACpD,iBAAiB,CAKhC;IACF;;;;OAIG;IACH,YACE,WAAyB,EACzB,YAAgC,UAAU;QAE1C,KAAK,CAAC,WAAW,CAAC,CAAC;QACnB,IAAI,CAAC,gBAAgB,EAAE,CAAC;QACxB,IAAI,CAAC,UAAU,GAAG,WAAW,CAAC,QAAQ,CAAC,GAAG,CAAC,uBAAW,CAAC,GAAG,CAAC,CAAC;QAC5D,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC,QAAQ,CAAC,GAAG,CAAC,uBAAW,CAAC,IAAI,CAAC,CAAC;QAC9D,IAAI,CAAC,YAAY,GAAG,WAAW,CAAC,QAAQ,CAAC,GAAG,CAAC,uBAAW,CAAC,KAAK,CAAC,CAAC;QAChE,IAAI,CAAC,kBAAkB,GAAG,WAAW,CAAC,QAAQ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G,CAAC,SAAS,CAAC,KAAK,CAAC,SAAS,CAAC,IAAI;iBACrD,CAAC;gBACF,OAAO,IAAI,6BAAY,CAAC,MAAM,CAAC,CAAC;YAClC,CAAC,CAAC,CAAC;QACL,CAAC;QACD,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,uBAAW,CAAC,WAAW,CAAC,EAAE,CAAC;YAC/C,GAAG,CAAC,QAAQ,CAAC,QAAQ,CACnB,uBAAW,CAAC,WAAW,EACvB,GAAG,EAAE,CACH,IAAI,+BAAiB,CACnB,GAAG,EACH,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,uBAAW,CAAC,KAAK,CAAC,EACnC,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,uBAAW,CAAC,YAAY,CAAC,EAC1C,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,uBAAW,CAAC,IAAI,CAAC,CACnC,CACJ,CAAC;QACJ,CAAC;QACD,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,uBAAW,CAAC,IAAI,CAAC,EAAE,CAAC;YACxC,GAAG,CAAC,QAAQ,CAAC,QAAQ,CACnB,uBAAW,CAAC,IAAI,EAChB,GAAG,EAAE,CACH,IAAI,kBAAW,CAab,GAAG,EACH,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,uBAAW,CAAC,IAAI,CAAC,EAClC,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,uBAAW,CAAC,KAAK,CAAC,EACnC,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,uBAAW,CAAC,YAAY,CAAC,EAC1C,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,uBAAW,CAAC,WAAW,CAAC,CAC1C,CACJ,CAAC;QACJ,CAAC;IACH,CAAC;CACF;AApMD,8BAoMC"}
|
package/src/types.d.ts
CHANGED
|
@@ -105,6 +105,7 @@ export declare function routeConfig<T extends object, TLanguage extends string>(
|
|
|
105
105
|
validation?: (validationLanguage: TLanguage) => ValidationChain[];
|
|
106
106
|
useAuthentication: boolean;
|
|
107
107
|
useCryptoAuthentication: boolean;
|
|
108
|
+
openapi?: OpenAPIRouteMetadata;
|
|
108
109
|
}): RouteConfig<T, TLanguage>;
|
|
109
110
|
export type THandlerArgs<T extends Array<unknown>> = T;
|
|
110
111
|
export type FlexibleValidationChain<TLanguage extends string> = ValidationChain[] | ((lang: TLanguage) => ValidationChain[]);
|