@zenofolio/hyper-decor 1.0.47 → 1.0.49

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 (56) hide show
  1. package/dist/__internals/creators/request.creator.js +2 -2
  2. package/dist/__internals/creators/routes.creator.d.ts +1 -0
  3. package/dist/__internals/creators/routes.creator.js +2 -0
  4. package/dist/__internals/helpers/prepare.helper.d.ts +11 -0
  5. package/dist/__internals/helpers/prepare.helper.js +248 -0
  6. package/dist/__internals/stores/service.store.d.ts +1 -0
  7. package/dist/__internals/stores/service.store.js +4 -0
  8. package/dist/__internals/utils/function.util.d.ts +1 -4
  9. package/dist/__internals/utils/function.util.js +22 -10
  10. package/dist/decorators/HyperApp.js +2 -209
  11. package/dist/decorators/Scope.js +1 -1
  12. package/dist/decorators/Service.d.ts +1 -5
  13. package/dist/decorators/Service.js +6 -2
  14. package/dist/lib/openapi/collectors/class.collector.d.ts +9 -0
  15. package/dist/lib/openapi/collectors/class.collector.js +53 -0
  16. package/dist/lib/openapi/collectors/index.d.ts +3 -0
  17. package/dist/lib/openapi/collectors/index.js +19 -0
  18. package/dist/lib/openapi/collectors/method.collector.d.ts +3 -0
  19. package/dist/lib/openapi/collectors/method.collector.js +36 -0
  20. package/dist/lib/openapi/collectors/param.collector.d.ts +3 -0
  21. package/dist/lib/openapi/collectors/param.collector.js +27 -0
  22. package/dist/lib/openapi/constants.d.ts +46 -0
  23. package/dist/lib/openapi/constants.js +61 -0
  24. package/dist/lib/openapi/decorators/api-method.decorator.d.ts +3 -0
  25. package/dist/lib/openapi/decorators/api-method.decorator.js +11 -0
  26. package/dist/lib/openapi/decorators/api-parameter.decorator.d.ts +3 -0
  27. package/dist/lib/openapi/decorators/api-parameter.decorator.js +10 -0
  28. package/dist/lib/openapi/decorators/api-request-body.decorator.d.ts +3 -0
  29. package/dist/lib/openapi/decorators/api-request-body.decorator.js +10 -0
  30. package/dist/lib/openapi/decorators/api-response.decodator.d.ts +3 -0
  31. package/dist/lib/openapi/decorators/api-response.decodator.js +10 -0
  32. package/dist/lib/openapi/decorators/api-security.decorator.d.ts +3 -0
  33. package/dist/lib/openapi/decorators/api-security.decorator.js +10 -0
  34. package/dist/lib/openapi/decorators/api-tag.decorator.d.ts +3 -0
  35. package/dist/lib/openapi/decorators/api-tag.decorator.js +10 -0
  36. package/dist/lib/openapi/decorators/index.d.ts +6 -0
  37. package/dist/lib/openapi/decorators/index.js +22 -0
  38. package/dist/lib/openapi/helpers/index.d.ts +6 -0
  39. package/dist/lib/openapi/helpers/index.js +22 -0
  40. package/dist/lib/openapi/helpers/method.helper.d.ts +3 -0
  41. package/dist/lib/openapi/helpers/method.helper.js +20 -0
  42. package/dist/lib/openapi/helpers/parameter.helper.d.ts +3 -0
  43. package/dist/lib/openapi/helpers/parameter.helper.js +16 -0
  44. package/dist/lib/openapi/helpers/request-body.helper.d.ts +3 -0
  45. package/dist/lib/openapi/helpers/request-body.helper.js +9 -0
  46. package/dist/lib/openapi/helpers/response.helper.d.ts +3 -0
  47. package/dist/lib/openapi/helpers/response.helper.js +18 -0
  48. package/dist/lib/openapi/helpers/security.helper.d.ts +3 -0
  49. package/dist/lib/openapi/helpers/security.helper.js +10 -0
  50. package/dist/lib/openapi/helpers/tag.helper.d.ts +3 -0
  51. package/dist/lib/openapi/helpers/tag.helper.js +10 -0
  52. package/dist/lib/openapi/index.d.ts +1 -0
  53. package/dist/lib/openapi/index.js +17 -0
  54. package/dist/lib/openapi/types.d.ts +131 -0
  55. package/dist/lib/openapi/types.js +2 -0
  56. package/package.json +1 -1
@@ -0,0 +1,131 @@
1
+ export interface OpenAPIDocument {
2
+ openapi: string;
3
+ info: Info;
4
+ paths: Paths;
5
+ components?: Components;
6
+ security?: SecurityRequirement[];
7
+ tags?: Tag[];
8
+ }
9
+ export interface Info {
10
+ title: string;
11
+ description?: string;
12
+ termsOfService?: string;
13
+ contact?: Contact;
14
+ license?: License;
15
+ version: string;
16
+ }
17
+ export interface Contact {
18
+ name?: string;
19
+ url?: string;
20
+ email?: string;
21
+ }
22
+ export interface License {
23
+ name: string;
24
+ url?: string;
25
+ }
26
+ export interface Paths {
27
+ [path: string]: PathItem;
28
+ }
29
+ export interface PathItem {
30
+ get?: Operation;
31
+ post?: Operation;
32
+ put?: Operation;
33
+ delete?: Operation;
34
+ patch?: Operation;
35
+ head?: Operation;
36
+ options?: Operation;
37
+ trace?: Operation;
38
+ }
39
+ export interface Operation {
40
+ summary?: string;
41
+ description?: string;
42
+ operationId?: string;
43
+ tags?: Tag[];
44
+ parameters?: Parameter[];
45
+ requestBody?: RequestBody;
46
+ responses: Responses;
47
+ security?: SecurityRequirement[];
48
+ }
49
+ export interface Parameter {
50
+ name: string;
51
+ in: "query" | "header" | "path" | "cookie";
52
+ description?: string;
53
+ required?: boolean;
54
+ deprecated?: boolean;
55
+ allowEmptyValue?: boolean;
56
+ schema: Schema;
57
+ }
58
+ export interface RequestBody {
59
+ description?: string;
60
+ content: {
61
+ [mediaType: string]: MediaType;
62
+ };
63
+ }
64
+ export interface MediaType {
65
+ schema: Schema;
66
+ }
67
+ export interface Responses {
68
+ [statusCode: string]: Response;
69
+ }
70
+ export interface Response {
71
+ description: string;
72
+ content?: {
73
+ [mediaType: string]: MediaType;
74
+ };
75
+ headers?: {
76
+ [name: string]: Header;
77
+ };
78
+ }
79
+ export interface Header {
80
+ description?: string;
81
+ required?: boolean;
82
+ schema: Schema;
83
+ }
84
+ export interface Schema {
85
+ type: string;
86
+ format?: string;
87
+ items?: Schema;
88
+ properties?: {
89
+ [key: string]: Schema;
90
+ };
91
+ additionalProperties?: boolean;
92
+ example?: any;
93
+ }
94
+ export interface SecurityRequirement {
95
+ [securityScheme: string]: string[];
96
+ }
97
+ export interface Tag {
98
+ name: string;
99
+ description?: string;
100
+ }
101
+ export interface Components {
102
+ schemas?: {
103
+ [schemaName: string]: Schema;
104
+ };
105
+ responses?: {
106
+ [responseName: string]: Response;
107
+ };
108
+ parameters?: {
109
+ [parameterName: string]: Parameter;
110
+ };
111
+ securitySchemes?: {
112
+ [schemeName: string]: SecurityScheme;
113
+ };
114
+ }
115
+ export interface SecurityScheme {
116
+ type: "apiKey" | "http" | "oauth2" | "openIdConnect";
117
+ in?: "header" | "query" | "cookie";
118
+ name?: string;
119
+ scheme?: string;
120
+ bearerFormat?: string;
121
+ openIdConnectUrl?: string;
122
+ oauth2?: OAuth2Scheme;
123
+ }
124
+ export interface OAuth2Scheme {
125
+ authorizationUrl: string;
126
+ tokenUrl: string;
127
+ refreshUrl?: string;
128
+ scopes: {
129
+ [scope: string]: string;
130
+ };
131
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zenofolio/hyper-decor",
3
- "version": "1.0.47",
3
+ "version": "1.0.49",
4
4
  "description": "Project core with utilities and features",
5
5
  "main": "dist/index.js",
6
6
  "author": "zenozaga",