@adaas/a-server 0.0.19 → 0.0.20

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 (172) hide show
  1. package/dist/index.d.mts +739 -0
  2. package/dist/index.d.ts +739 -36
  3. package/dist/index.js +1904 -102
  4. package/dist/index.js.map +1 -1
  5. package/dist/index.mjs +1862 -0
  6. package/dist/index.mjs.map +1 -0
  7. package/package.json +5 -3
  8. package/src/components/A-ServerLogger/A_ServerLogger.component.ts +1 -1
  9. package/src/index.ts +75 -0
  10. package/tsconfig.build.json +9 -43
  11. package/tsconfig.json +1 -1
  12. package/tsup.config.ts +15 -0
  13. package/dist/src/channels/A-Http/A-Http.channel.constants.d.ts +0 -5
  14. package/dist/src/channels/A-Http/A-Http.channel.constants.js +0 -10
  15. package/dist/src/channels/A-Http/A-Http.channel.constants.js.map +0 -1
  16. package/dist/src/channels/A-Http/A-Http.channel.d.ts +0 -29
  17. package/dist/src/channels/A-Http/A-Http.channel.error.d.ts +0 -4
  18. package/dist/src/channels/A-Http/A-Http.channel.error.js +0 -9
  19. package/dist/src/channels/A-Http/A-Http.channel.error.js.map +0 -1
  20. package/dist/src/channels/A-Http/A-Http.channel.js +0 -154
  21. package/dist/src/channels/A-Http/A-Http.channel.js.map +0 -1
  22. package/dist/src/channels/A-Http/A-Http.channel.types.d.ts +0 -59
  23. package/dist/src/channels/A-Http/A-Http.channel.types.js +0 -3
  24. package/dist/src/channels/A-Http/A-Http.channel.types.js.map +0 -1
  25. package/dist/src/channels/A-Websockets/A-Websockets.channel.d.ts +0 -4
  26. package/dist/src/channels/A-Websockets/A-Websockets.channel.js +0 -22
  27. package/dist/src/channels/A-Websockets/A-Websockets.channel.js.map +0 -1
  28. package/dist/src/components/A-CommandController/A-CommandController.component.d.ts +0 -8
  29. package/dist/src/components/A-CommandController/A-CommandController.component.js +0 -55
  30. package/dist/src/components/A-CommandController/A-CommandController.component.js.map +0 -1
  31. package/dist/src/components/A-Controller/A-Controller.component.d.ts +0 -9
  32. package/dist/src/components/A-Controller/A-Controller.component.js +0 -60
  33. package/dist/src/components/A-Controller/A-Controller.component.js.map +0 -1
  34. package/dist/src/components/A-Controller/A-Controller.component.types.d.ts +0 -0
  35. package/dist/src/components/A-Controller/A-Controller.component.types.js +0 -2
  36. package/dist/src/components/A-Controller/A-Controller.component.types.js.map +0 -1
  37. package/dist/src/components/A-EntityController/A-EntityController.component.d.ts +0 -26
  38. package/dist/src/components/A-EntityController/A-EntityController.component.js +0 -226
  39. package/dist/src/components/A-EntityController/A-EntityController.component.js.map +0 -1
  40. package/dist/src/components/A-EntityController/A-EntityController.component.types.d.ts +0 -0
  41. package/dist/src/components/A-EntityController/A-EntityController.component.types.js +0 -2
  42. package/dist/src/components/A-EntityController/A-EntityController.component.types.js.map +0 -1
  43. package/dist/src/components/A-EntityRepository/A-EntityRepository.component.d.ts +0 -9
  44. package/dist/src/components/A-EntityRepository/A-EntityRepository.component.js +0 -118
  45. package/dist/src/components/A-EntityRepository/A-EntityRepository.component.js.map +0 -1
  46. package/dist/src/components/A-EntityRepository/A-EntityRepository.error.d.ts +0 -0
  47. package/dist/src/components/A-EntityRepository/A-EntityRepository.error.js +0 -2
  48. package/dist/src/components/A-EntityRepository/A-EntityRepository.error.js.map +0 -1
  49. package/dist/src/components/A-EntityRepository/A-EntityRepository.types.d.ts +0 -0
  50. package/dist/src/components/A-EntityRepository/A-EntityRepository.types.js +0 -2
  51. package/dist/src/components/A-EntityRepository/A-EntityRepository.types.js.map +0 -1
  52. package/dist/src/components/A-ListingController/A-ListingController.component.d.ts +0 -10
  53. package/dist/src/components/A-ListingController/A-ListingController.component.js +0 -72
  54. package/dist/src/components/A-ListingController/A-ListingController.component.js.map +0 -1
  55. package/dist/src/components/A-ListingController/A-ListingController.component.types.d.ts +0 -0
  56. package/dist/src/components/A-ListingController/A-ListingController.component.types.js +0 -2
  57. package/dist/src/components/A-ListingController/A-ListingController.component.types.js.map +0 -1
  58. package/dist/src/components/A-Router/A-Router.component.d.ts +0 -63
  59. package/dist/src/components/A-Router/A-Router.component.js +0 -221
  60. package/dist/src/components/A-Router/A-Router.component.js.map +0 -1
  61. package/dist/src/components/A-Router/A-Router.component.types.d.ts +0 -26
  62. package/dist/src/components/A-Router/A-Router.component.types.js +0 -17
  63. package/dist/src/components/A-Router/A-Router.component.types.js.map +0 -1
  64. package/dist/src/components/A-ServerCORS/A_ServerCORS.component.d.ts +0 -9
  65. package/dist/src/components/A-ServerCORS/A_ServerCORS.component.defaults.d.ts +0 -2
  66. package/dist/src/components/A-ServerCORS/A_ServerCORS.component.defaults.js +0 -11
  67. package/dist/src/components/A-ServerCORS/A_ServerCORS.component.defaults.js.map +0 -1
  68. package/dist/src/components/A-ServerCORS/A_ServerCORS.component.js +0 -70
  69. package/dist/src/components/A-ServerCORS/A_ServerCORS.component.js.map +0 -1
  70. package/dist/src/components/A-ServerCORS/A_ServerCORS.component.types.d.ts +0 -7
  71. package/dist/src/components/A-ServerCORS/A_ServerCORS.component.types.js +0 -3
  72. package/dist/src/components/A-ServerCORS/A_ServerCORS.component.types.js.map +0 -1
  73. package/dist/src/components/A-ServerError/A-ServerError.class.d.ts +0 -7
  74. package/dist/src/components/A-ServerError/A-ServerError.class.js +0 -88
  75. package/dist/src/components/A-ServerError/A-ServerError.class.js.map +0 -1
  76. package/dist/src/components/A-ServerError/A-ServerError.constants.d.ts +0 -0
  77. package/dist/src/components/A-ServerError/A-ServerError.constants.js +0 -2
  78. package/dist/src/components/A-ServerError/A-ServerError.constants.js.map +0 -1
  79. package/dist/src/components/A-ServerError/A-ServerError.types.d.ts +0 -13
  80. package/dist/src/components/A-ServerError/A-ServerError.types.js +0 -3
  81. package/dist/src/components/A-ServerError/A-ServerError.types.js.map +0 -1
  82. package/dist/src/components/A-ServerHealthMonitor/A-ServerHealthMonitor.component.d.ts +0 -7
  83. package/dist/src/components/A-ServerHealthMonitor/A-ServerHealthMonitor.component.js +0 -81
  84. package/dist/src/components/A-ServerHealthMonitor/A-ServerHealthMonitor.component.js.map +0 -1
  85. package/dist/src/components/A-ServerHealthMonitor/A-ServerHealthMonitor.component.types.d.ts +0 -0
  86. package/dist/src/components/A-ServerHealthMonitor/A-ServerHealthMonitor.component.types.js +0 -2
  87. package/dist/src/components/A-ServerHealthMonitor/A-ServerHealthMonitor.component.types.js.map +0 -1
  88. package/dist/src/components/A-ServerLogger/A-ServerLogger.constants.d.ts +0 -22
  89. package/dist/src/components/A-ServerLogger/A-ServerLogger.constants.js +0 -31
  90. package/dist/src/components/A-ServerLogger/A-ServerLogger.constants.js.map +0 -1
  91. package/dist/src/components/A-ServerLogger/A_ServerLogger.component.d.ts +0 -43
  92. package/dist/src/components/A-ServerLogger/A_ServerLogger.component.js +0 -167
  93. package/dist/src/components/A-ServerLogger/A_ServerLogger.component.js.map +0 -1
  94. package/dist/src/components/A-ServerLogger/A_ServerLogger.component.types.d.ts +0 -9
  95. package/dist/src/components/A-ServerLogger/A_ServerLogger.component.types.js +0 -3
  96. package/dist/src/components/A-ServerLogger/A_ServerLogger.component.types.js.map +0 -1
  97. package/dist/src/components/A-ServerProxy/A-ServerProxy.component.d.ts +0 -9
  98. package/dist/src/components/A-ServerProxy/A-ServerProxy.component.js +0 -88
  99. package/dist/src/components/A-ServerProxy/A-ServerProxy.component.js.map +0 -1
  100. package/dist/src/components/A-StaticLoader/A-StaticLoader.component.d.ts +0 -12
  101. package/dist/src/components/A-StaticLoader/A-StaticLoader.component.js +0 -126
  102. package/dist/src/components/A-StaticLoader/A-StaticLoader.component.js.map +0 -1
  103. package/dist/src/components/A-StaticLoader/A-StaticLoader.component.types.d.ts +0 -10
  104. package/dist/src/components/A-StaticLoader/A-StaticLoader.component.types.js +0 -109
  105. package/dist/src/components/A-StaticLoader/A-StaticLoader.component.types.js.map +0 -1
  106. package/dist/src/constants/env.constants.d.ts +0 -10
  107. package/dist/src/constants/env.constants.js +0 -20
  108. package/dist/src/constants/env.constants.js.map +0 -1
  109. package/dist/src/containers/A-Service/A-Service.container.d.ts +0 -30
  110. package/dist/src/containers/A-Service/A-Service.container.js +0 -200
  111. package/dist/src/containers/A-Service/A-Service.container.js.map +0 -1
  112. package/dist/src/containers/A-Service/A-Service.container.types.d.ts +0 -36
  113. package/dist/src/containers/A-Service/A-Service.container.types.js +0 -27
  114. package/dist/src/containers/A-Service/A-Service.container.types.js.map +0 -1
  115. package/dist/src/context/A-EntityFactory/A-EntityFactory.context.d.ts +0 -39
  116. package/dist/src/context/A-EntityFactory/A-EntityFactory.context.js +0 -69
  117. package/dist/src/context/A-EntityFactory/A-EntityFactory.context.js.map +0 -1
  118. package/dist/src/context/A-EntityFactory/A-EntityFactory.context.types.d.ts +0 -5
  119. package/dist/src/context/A-EntityFactory/A-EntityFactory.context.types.js +0 -3
  120. package/dist/src/context/A-EntityFactory/A-EntityFactory.context.types.js.map +0 -1
  121. package/dist/src/context/A-HttpChannel/A-HttpChannel.context.d.ts +0 -12
  122. package/dist/src/context/A-HttpChannel/A-HttpChannel.context.js +0 -16
  123. package/dist/src/context/A-HttpChannel/A-HttpChannel.context.js.map +0 -1
  124. package/dist/src/context/A-ListQueryFilter/A_ListQueryFilter.context.d.ts +0 -10
  125. package/dist/src/context/A-ListQueryFilter/A_ListQueryFilter.context.js +0 -30
  126. package/dist/src/context/A-ListQueryFilter/A_ListQueryFilter.context.js.map +0 -1
  127. package/dist/src/context/A-ProxyConfig/A_ProxyConfig.constants.d.ts +0 -2
  128. package/dist/src/context/A-ProxyConfig/A_ProxyConfig.constants.js +0 -12
  129. package/dist/src/context/A-ProxyConfig/A_ProxyConfig.constants.js.map +0 -1
  130. package/dist/src/context/A-ProxyConfig/A_ProxyConfig.context.d.ts +0 -29
  131. package/dist/src/context/A-ProxyConfig/A_ProxyConfig.context.js +0 -60
  132. package/dist/src/context/A-ProxyConfig/A_ProxyConfig.context.js.map +0 -1
  133. package/dist/src/context/A-ProxyConfig/A_ProxyConfig.types.d.ts +0 -18
  134. package/dist/src/context/A-ProxyConfig/A_ProxyConfig.types.js +0 -3
  135. package/dist/src/context/A-ProxyConfig/A_ProxyConfig.types.js.map +0 -1
  136. package/dist/src/context/A-Server/A_Server.context.d.ts +0 -17
  137. package/dist/src/context/A-Server/A_Server.context.js +0 -22
  138. package/dist/src/context/A-Server/A_Server.context.js.map +0 -1
  139. package/dist/src/context/A-Server/A_Server.context.types.d.ts +0 -7
  140. package/dist/src/context/A-Server/A_Server.context.types.js +0 -3
  141. package/dist/src/context/A-Server/A_Server.context.types.js.map +0 -1
  142. package/dist/src/context/A-StaticConfig/A-StaticConfig.context.d.ts +0 -16
  143. package/dist/src/context/A-StaticConfig/A-StaticConfig.context.js +0 -28
  144. package/dist/src/context/A-StaticConfig/A-StaticConfig.context.js.map +0 -1
  145. package/dist/src/context/A-StaticConfig/A-StaticConfig.context.types.d.ts +0 -0
  146. package/dist/src/context/A-StaticConfig/A-StaticConfig.context.types.js +0 -2
  147. package/dist/src/context/A-StaticConfig/A-StaticConfig.context.types.js.map +0 -1
  148. package/dist/src/entities/A-Request/A-Request.entity.d.ts +0 -31
  149. package/dist/src/entities/A-Request/A-Request.entity.js +0 -125
  150. package/dist/src/entities/A-Request/A-Request.entity.js.map +0 -1
  151. package/dist/src/entities/A-Request/A-Request.entity.types.d.ts +0 -21
  152. package/dist/src/entities/A-Request/A-Request.entity.types.js +0 -12
  153. package/dist/src/entities/A-Request/A-Request.entity.types.js.map +0 -1
  154. package/dist/src/entities/A-Response/A-Response.entity.d.ts +0 -28
  155. package/dist/src/entities/A-Response/A-Response.entity.js +0 -141
  156. package/dist/src/entities/A-Response/A-Response.entity.js.map +0 -1
  157. package/dist/src/entities/A-Response/A-Response.entity.types.d.ts +0 -19
  158. package/dist/src/entities/A-Response/A-Response.entity.types.js +0 -12
  159. package/dist/src/entities/A-Response/A-Response.entity.types.js.map +0 -1
  160. package/dist/src/entities/A-Route/A-Route.entity.d.ts +0 -17
  161. package/dist/src/entities/A-Route/A-Route.entity.js +0 -76
  162. package/dist/src/entities/A-Route/A-Route.entity.js.map +0 -1
  163. package/dist/src/entities/A-Route/A-Route.entity.types.d.ts +0 -0
  164. package/dist/src/entities/A-Route/A-Route.entity.types.js +0 -2
  165. package/dist/src/entities/A-Route/A-Route.entity.types.js.map +0 -1
  166. package/dist/src/entities/A_EntityList/A_EntityList.entity.d.ts +0 -46
  167. package/dist/src/entities/A_EntityList/A_EntityList.entity.js +0 -91
  168. package/dist/src/entities/A_EntityList/A_EntityList.entity.js.map +0 -1
  169. package/dist/src/entities/A_EntityList/A_EntityList.entity.types.d.ts +0 -21
  170. package/dist/src/entities/A_EntityList/A_EntityList.entity.types.js +0 -8
  171. package/dist/src/entities/A_EntityList/A_EntityList.entity.types.js.map +0 -1
  172. package/index.ts +0 -75
@@ -0,0 +1,739 @@
1
+ import { A_Component, A_Fragment, A_Error, A_TYPES__Entity_Serialized, A_TYPES__Error_Init, A_TYPES__Error_Serialized, A_Entity, A_Scope, A_Container, ASEID, A_TYPES__ComponentMeta } from '@adaas/a-concept';
2
+ import { A_Channel, A_Logger, A_Config } from '@adaas/a-utils';
3
+ import * as http from 'http';
4
+ import { IncomingMessage, IncomingHttpHeaders, ServerResponse } from 'http';
5
+ import { A_TYPES__Required } from '@adaas/a-concept/dist/src/types/A_Common.types';
6
+ import { A_TYPES__ConceptENVVariables } from '@adaas/a-concept/dist/src/constants/env.constants';
7
+
8
+ type A_SERVER_TYPES__ServerFeatures = [
9
+ A_SERVER_TYPES__ServerFeature.beforeStart,
10
+ A_SERVER_TYPES__ServerFeature.afterStart,
11
+ A_SERVER_TYPES__ServerFeature.beforeStop,
12
+ A_SERVER_TYPES__ServerFeature.afterStop,
13
+ A_SERVER_TYPES__ServerFeature.onRequest
14
+ ];
15
+ declare enum A_SERVER_TYPES__ServerFeature {
16
+ beforeStart = "beforeStart",
17
+ afterStart = "afterStart",
18
+ beforeStop = "beforeStop",
19
+ afterStop = "afterStop",
20
+ beforeRequest = "beforeRequest",
21
+ onRequest = "onRequest",
22
+ afterRequest = "afterRequest"
23
+ }
24
+ type A_SERVER_TYPES__ServerConstructor$1 = {
25
+ name: string;
26
+ version: string;
27
+ controllers: Array<A_Component>;
28
+ entities: Array<A_Fragment>;
29
+ extensions: Array<A_Component>;
30
+ };
31
+ declare enum A_SERVER_TYPES__ServerMethod {
32
+ GET = "GET",
33
+ POST = "POST",
34
+ PUT = "PUT",
35
+ DELETE = "DELETE",
36
+ PATCH = "PATCH",
37
+ OPTIONS = "OPTIONS",
38
+ HEAD = "HEAD",
39
+ CONNECT = "CONNECT",
40
+ TRACE = "TRACE",
41
+ DEFAULT = "DEFAULT"
42
+ }
43
+
44
+ type A_SERVER_TYPES__HttpChannelSendParams<M extends Record<string, any> = any> = {
45
+ /**
46
+ * HTTP Method
47
+ */
48
+ method: A_SERVER_TYPES__ServerMethod;
49
+ /**
50
+ * Request URL
51
+ */
52
+ url: string;
53
+ /**
54
+ * Request Body or Query Parameters
55
+ */
56
+ data?: any;
57
+ /**
58
+ * Request Configuration
59
+ */
60
+ config?: Partial<A_SERVER_TYPES__HttpChannelRequestConfig<M>>;
61
+ };
62
+ type A_SERVER_TYPES__HttpChannelRequestParams<M extends Record<string, any> = any> = {
63
+ /**
64
+ * HTTP Method
65
+ */
66
+ method: A_SERVER_TYPES__ServerMethod;
67
+ /**
68
+ * Request URL
69
+ */
70
+ url: string;
71
+ /**
72
+ * Request Body or Query Parameters
73
+ */
74
+ data?: any;
75
+ /**
76
+ * Request Configuration
77
+ */
78
+ config?: Partial<A_SERVER_TYPES__HttpChannelRequestConfig<M>>;
79
+ };
80
+ type A_SERVER_TYPES__HttpChannelRequestConfig<M extends Record<string, any> = any> = {
81
+ /**
82
+ * Response Type
83
+ */
84
+ responseType: "json" | "text" | "blob";
85
+ /**
86
+ * Request Headers
87
+ */
88
+ headers: Record<string, string>;
89
+ /**
90
+ * Query Parameters
91
+ */
92
+ params: Record<string, any>;
93
+ /**
94
+ * Metadata
95
+ */
96
+ meta: M;
97
+ /**
98
+ * Throw on Error
99
+ */
100
+ throwOnError: boolean;
101
+ };
102
+
103
+ declare class A_HTTPChannel_RequestContext<T extends any = any> extends A_Fragment {
104
+ url: string;
105
+ method: A_SERVER_TYPES__ServerMethod;
106
+ data?: any;
107
+ config?: Partial<A_SERVER_TYPES__HttpChannelRequestParams['config']>;
108
+ constructor(params: A_SERVER_TYPES__HttpChannelRequestParams);
109
+ result?: T;
110
+ error?: any;
111
+ }
112
+
113
+ declare class A_HTTPChannel extends A_Channel {
114
+ protected baseUrl?: string;
115
+ connect(): Promise<void>;
116
+ /**
117
+ * Allows to send an HTTP request without expecting a response
118
+ *
119
+ * @param params
120
+ */
121
+ send(params: A_SERVER_TYPES__HttpChannelSendParams): Promise<void>;
122
+ /**
123
+ * Makes an HTTP request
124
+ *
125
+ * @param params
126
+ * @returns
127
+ */
128
+ request<T = any, M extends Record<string, any> = any>(
129
+ /**
130
+ * Provide request parameters
131
+ */
132
+ params: A_SERVER_TYPES__HttpChannelRequestParams<M>): Promise<A_HTTPChannel_RequestContext<T>>;
133
+ post<T, M extends Record<string, any> = any>(url: string, body?: any, config?: Partial<A_SERVER_TYPES__HttpChannelRequestConfig>): Promise<A_HTTPChannel_RequestContext<T>>;
134
+ get<T, M extends Record<string, any> = any>(url: string, params?: any, config?: Partial<A_SERVER_TYPES__HttpChannelRequestConfig>): Promise<A_HTTPChannel_RequestContext<T>>;
135
+ put<T, M extends Record<string, any> = any>(url: string, body?: any, config?: Partial<A_SERVER_TYPES__HttpChannelRequestConfig>): Promise<A_HTTPChannel_RequestContext<T>>;
136
+ delete<T, M extends Record<string, any> = any>(url: string, params?: any, config?: Partial<A_SERVER_TYPES__HttpChannelRequestConfig>): Promise<A_HTTPChannel_RequestContext<T>>;
137
+ protected buildURL(path?: string, params?: Record<string, any>): string;
138
+ }
139
+
140
+ declare class A_HTTPChannelError extends A_Error {
141
+ static readonly HttpRequestError = "HTTP Channel Request Error";
142
+ }
143
+
144
+ declare const A_SERVER_CONSTANTS__DEFAULT_ENV_VARIABLES: {
145
+ /**
146
+ * Port for the server to listen on
147
+ * [!] Default is 3000
148
+ * @default 3000
149
+ */
150
+ readonly A_SERVER_PORT: "A_SERVER_PORT";
151
+ };
152
+ type A_TYPES__ServerENVVariables = (typeof A_SERVER_CONSTANTS__DEFAULT_ENV_VARIABLES)[keyof typeof A_SERVER_CONSTANTS__DEFAULT_ENV_VARIABLES][];
153
+ declare const A_SERVER_CONSTANTS__DEFAULT_ENV_VARIABLES_ARRAY: readonly ["A_SERVER_PORT"];
154
+
155
+ type A_SERVER_TYPES__RequestConstructor = {
156
+ /**
157
+ * Should correspond to Response id
158
+ */
159
+ id: string;
160
+ request: IncomingMessage;
161
+ scope: string;
162
+ };
163
+ type A_SERVER_TYPES__RequestSerialized = {} & A_TYPES__Entity_Serialized;
164
+ type A_SERVER_TYPES__RequestMethods = 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH' | 'OPTIONS' | 'HEAD' | 'CONNECT' | 'TRACE' | 'DEFAULT';
165
+ declare enum A_SERVER_TYPES__RequestEvent {
166
+ Error = "error",
167
+ Finish = "finish",
168
+ Data = "data",
169
+ End = "end",
170
+ Close = "close"
171
+ }
172
+ type A_SERVER_TYPES__RequestEventCallback = (request: A_Request) => void;
173
+
174
+ declare class A_Route {
175
+ url: string;
176
+ method: A_SERVER_TYPES__RequestMethods;
177
+ constructor(url: string | RegExp, method: A_SERVER_TYPES__RequestMethods);
178
+ constructor(url: string | RegExp);
179
+ /**
180
+ * returns path only without query and hash
181
+ */
182
+ get path(): string;
183
+ get params(): string[];
184
+ extractParams(url: string): Record<string, string>;
185
+ extractQuery(url: string): Record<string, string>;
186
+ toString(): string;
187
+ toRegExp(): RegExp;
188
+ toAFeatureExtension(extensionScope?: Array<string>): RegExp;
189
+ }
190
+
191
+ type A_SERVER_TYPES__ServerError_Init = {
192
+ /**
193
+ * HTTP Status Code of the error
194
+ */
195
+ status?: number;
196
+ } & A_TYPES__Error_Init;
197
+ type A_SERVER_TYPES__ServerError_Serialized = {
198
+ /**
199
+ * HTTP Status Code of the error
200
+ */
201
+ status: number;
202
+ } & A_TYPES__Error_Serialized;
203
+
204
+ declare class A_ServerError extends A_Error<A_SERVER_TYPES__ServerError_Init, A_SERVER_TYPES__ServerError_Serialized> {
205
+ status: number;
206
+ protected fromConstructor(params: A_SERVER_TYPES__ServerError_Init): void;
207
+ toJSON(): A_SERVER_TYPES__ServerError_Serialized;
208
+ }
209
+
210
+ declare class A_Request<_ReqBodyType = any, _ResponseType = any, _ParamsType extends Record<string, string> = any, _QueryType = any> extends A_Entity<A_SERVER_TYPES__RequestConstructor, A_SERVER_TYPES__RequestSerialized> {
211
+ static get namespace(): string;
212
+ req: IncomingMessage;
213
+ body: _ReqBodyType;
214
+ params: _ParamsType;
215
+ query: _QueryType;
216
+ response?: _ResponseType;
217
+ error?: A_ServerError;
218
+ /**
219
+ * Duration of the request in milliseconds
220
+ */
221
+ duration: number;
222
+ fromNew(newEntity: A_SERVER_TYPES__RequestConstructor): void;
223
+ get startedAt(): Date | undefined;
224
+ get url(): string;
225
+ get method(): A_SERVER_TYPES__RequestMethods;
226
+ get headers(): IncomingHttpHeaders;
227
+ get route(): A_Route;
228
+ pipe(destination: NodeJS.WritableStream, options?: {
229
+ end?: boolean | undefined;
230
+ }): NodeJS.WritableStream;
231
+ init(): Promise<void>;
232
+ extractParams(url: string): Record<string, string>;
233
+ extractQuery(url: string): Record<string, string>;
234
+ parseBody(): Promise<any>;
235
+ }
236
+
237
+ type A_SERVER_TYPES__ResponseConstructor = {
238
+ /**
239
+ * Should correspond to Request id
240
+ */
241
+ id: string;
242
+ scope: string;
243
+ response: ServerResponse;
244
+ };
245
+ declare enum A_SERVER_TYPES__ResponseEvent {
246
+ Error = "error",
247
+ Finish = "finish",
248
+ Data = "data",
249
+ End = "end",
250
+ Close = "close"
251
+ }
252
+ type A_SERVER_TYPES__ResponseSerialized = A_TYPES__Entity_Serialized;
253
+ type A_SERVER_TYPES__SendResponseObject<_ResponseType = any> = Record<string, _ResponseType>;
254
+
255
+ declare class A_Response<_ResponseType = any> extends A_Entity<A_SERVER_TYPES__ResponseConstructor, A_SERVER_TYPES__ResponseSerialized> {
256
+ /**
257
+ * Duration of the request in milliseconds
258
+ */
259
+ duration: number;
260
+ private res;
261
+ private data;
262
+ error?: A_ServerError;
263
+ fromNew(newEntity: A_SERVER_TYPES__ResponseConstructor): void;
264
+ get headersSent(): boolean;
265
+ get original(): ServerResponse<http.IncomingMessage>;
266
+ get statusCode(): number;
267
+ init(): Promise<void>;
268
+ failed(error: A_ServerError | A_Error | Error | any): void;
269
+ send(data?: string | object): void;
270
+ destroy(error: Error | unknown, scope?: A_Scope): Promise<any>;
271
+ json(data?: object): void;
272
+ status(code: number): this;
273
+ writeHead(statusCode: number, headers?: Record<string, string> | IncomingHttpHeaders | any): void;
274
+ setHeader(key: string, value: string): void;
275
+ getHeader(key: string): string | number | string[] | undefined;
276
+ add(key: string, data: _ResponseType): void;
277
+ toResponse(): A_SERVER_TYPES__SendResponseObject<_ResponseType>;
278
+ }
279
+
280
+ /**
281
+ * A-Service is a container that can run different types of services, such as HTTP servers, workers, etc.
282
+ * Depending on the provided config and configuration, it will load the necessary components and start the service.
283
+ *
284
+ */
285
+ declare class A_Service extends A_Container {
286
+ private server;
287
+ port: number;
288
+ load(): Promise<void>;
289
+ protected listen(): Promise<void>;
290
+ protected close(): Promise<void>;
291
+ start(): Promise<void>;
292
+ beforeStart(): Promise<void>;
293
+ afterStart(): Promise<void>;
294
+ stop(): Promise<void>;
295
+ beforeRequest(scope: A_Scope): Promise<void>;
296
+ afterRequest(scope: A_Scope): Promise<void>;
297
+ onRequest(request: IncomingMessage, response: ServerResponse): Promise<void>;
298
+ protected convertToAServer(request: IncomingMessage, response: ServerResponse): Promise<{
299
+ req: A_Request;
300
+ res: A_Response;
301
+ }>;
302
+ protected generateRequestId(method: string, url: string): string;
303
+ beforeStop(): Promise<void>;
304
+ afterStop(): Promise<void>;
305
+ }
306
+
307
+ type A_SERVER_TYPES__ServerConstructor = {
308
+ name: string;
309
+ version: string;
310
+ routes: A_Route[];
311
+ port: number;
312
+ };
313
+
314
+ declare class A_Server extends A_Fragment {
315
+ port: number;
316
+ version: string;
317
+ protected _routes: A_Route[];
318
+ constructor(params: A_TYPES__Required<Partial<A_SERVER_TYPES__ServerConstructor>, [
319
+ 'port',
320
+ 'name'
321
+ ]>);
322
+ /**
323
+ * A list of routes that the server will listen to
324
+ */
325
+ get routes(): A_Route[];
326
+ }
327
+
328
+ type A_SERVER_TYPES__ProxyConfigConstructor = Record<string, string | Partial<A_SERVER_TYPES__ProxyConfigConstructorConfig>>;
329
+ type A_SERVER_TYPES__ProxyConfigConstructorConfig = {
330
+ hostname: string;
331
+ protocol: 'http' | 'https' | string;
332
+ port: number;
333
+ path: string;
334
+ method: A_SERVER_TYPES__RequestMethods;
335
+ headers: Record<string, string>;
336
+ };
337
+ type A_SERVER_TYPES__RoutesConfig = {
338
+ route: A_Route;
339
+ protocol: 'http' | 'https' | string;
340
+ hostname: string;
341
+ port: number;
342
+ headers: Record<string, string>;
343
+ };
344
+
345
+ declare class A_ProxyConfig extends A_Fragment {
346
+ protected readonly _configs: Array<A_SERVER_TYPES__RoutesConfig>;
347
+ constructor(
348
+ /**
349
+ * Setup proxy configs, where key is the path to match, and value is either a full URL or a partial config object
350
+ */
351
+ configs?: A_SERVER_TYPES__ProxyConfigConstructor);
352
+ /**
353
+ * Returns all configured proxy configs
354
+ *
355
+ */
356
+ get configs(): Array<A_SERVER_TYPES__RoutesConfig>;
357
+ /**
358
+ * Checks if a given path is configured in the proxy
359
+ *
360
+ * @param path
361
+ * @returns
362
+ */
363
+ has(path: string): boolean;
364
+ /**
365
+ * Returns the proxy configuration for a given path, if exists
366
+ *
367
+ * @param path
368
+ * @returns
369
+ */
370
+ config(path: string): A_SERVER_TYPES__RoutesConfig | undefined;
371
+ }
372
+
373
+ declare class A_StaticConfig extends A_Fragment {
374
+ readonly directories: Array<string>;
375
+ constructor(
376
+ /**
377
+ * Setup directories to serve static files from, comma separated
378
+ */
379
+ directories?: string[]);
380
+ /**
381
+ * Checks if a given path is configured in the proxy
382
+ *
383
+ * @param path
384
+ * @returns
385
+ */
386
+ has(path: string): false | string;
387
+ }
388
+
389
+ declare class A_ListQueryFilter<FilterFields extends string[]> extends A_Fragment {
390
+ protected _query: string | Partial<Record<FilterFields[number], string>>;
391
+ protected defaults: Partial<Record<FilterFields[number], string>>;
392
+ protected parsedQuery: Record<FilterFields[number], string>;
393
+ constructor(_query?: string | Partial<Record<FilterFields[number], string>>, defaults?: Partial<Record<FilterFields[number], string>>);
394
+ get query(): string | Partial<Record<FilterFields[number], string>>;
395
+ get(property: FilterFields[number], defaultValue?: string): string;
396
+ protected parseQueryString(value?: string | Partial<Record<FilterFields[number], string>>): Record<FilterFields[number], string>;
397
+ }
398
+
399
+ type A_SERVER_TYPES__AEntityFactoryConstructor1 = {
400
+ [Key in string]: typeof A_Entity;
401
+ };
402
+ type A_SERVER_TYPES__AEntityFactoryConstructor2 = Array<typeof A_Entity>;
403
+
404
+ declare class A_EntityFactory extends A_Fragment {
405
+ private _entities;
406
+ constructor(map: A_SERVER_TYPES__AEntityFactoryConstructor1);
407
+ constructor(entities: A_SERVER_TYPES__AEntityFactoryConstructor2);
408
+ constructor(map: A_SERVER_TYPES__AEntityFactoryConstructor1, entities: A_SERVER_TYPES__AEntityFactoryConstructor2);
409
+ protected _setEntities(entities?: A_SERVER_TYPES__AEntityFactoryConstructor2 | A_SERVER_TYPES__AEntityFactoryConstructor1): void;
410
+ add(key: string, entity: typeof A_Entity): void;
411
+ add(entity: typeof A_Entity): void;
412
+ has(aseid: ASEID): boolean;
413
+ has(
414
+ /**
415
+ * The name of the entity
416
+ */
417
+ entity: string): boolean;
418
+ has(
419
+ /**
420
+ * The ASEID of the entity
421
+ */
422
+ aseid: string): boolean;
423
+ /**
424
+ * Resolves the entity constructor by the entity name
425
+ *
426
+ * @param entity
427
+ */
428
+ resolve(entity: string): {
429
+ new (...args: any[]): A_Entity;
430
+ } | undefined;
431
+ resolve(aseid: string): {
432
+ new (...args: any[]): A_Entity;
433
+ } | undefined;
434
+ resolve(aseid: ASEID): {
435
+ new (...args: any[]): A_Entity;
436
+ } | undefined;
437
+ resolveByName(name: string): {
438
+ new (...args: any[]): A_Entity;
439
+ } | undefined;
440
+ }
441
+
442
+ type A_SERVER_TYPES__A_EntityListConstructor = {
443
+ name: string;
444
+ scope: string;
445
+ constructor: {
446
+ new (...args: any[]): A_Entity;
447
+ };
448
+ };
449
+ type A_SERVER_TYPES__A_EntityListSerialized<EntityTypes extends A_Entity = A_Entity> = {
450
+ items: Array<ReturnType<EntityTypes['toJSON']>>;
451
+ type: string;
452
+ pagination: A_SERVER_TYPES__A_EntityListPagination;
453
+ } & A_TYPES__Entity_Serialized;
454
+ type A_SERVER_TYPES__A_EntityListPagination = {
455
+ total: number;
456
+ page: number;
457
+ pageSize: number;
458
+ };
459
+
460
+ /**
461
+ * A-EntityList
462
+ *
463
+ * Entity that represents a list of entities with pagination of particular type
464
+ */
465
+ declare class A_EntityList<EntityType extends A_Entity = A_Entity> extends A_Entity<A_SERVER_TYPES__A_EntityListConstructor, A_SERVER_TYPES__A_EntityListSerialized> {
466
+ static get scope(): string;
467
+ protected _entityConstructor: new (...args: ConstructorParameters<typeof A_Entity>) => EntityType;
468
+ protected _items: Array<EntityType>;
469
+ protected _pagination: A_SERVER_TYPES__A_EntityListPagination;
470
+ /**
471
+ * Returns the entity constructor used for the list
472
+ */
473
+ get entityConstructor(): new (...args: ConstructorParameters<typeof A_Entity>) => EntityType;
474
+ /**
475
+ * Returns the list of items contained in the entity list
476
+ */
477
+ get items(): Array<EntityType>;
478
+ /**
479
+ * Returns pagination information about the entity list
480
+ */
481
+ get pagination(): A_SERVER_TYPES__A_EntityListPagination;
482
+ /**
483
+ * Creates a new instance of A_EntityList
484
+ *
485
+ * @param newEntity
486
+ */
487
+ fromNew(newEntity: A_SERVER_TYPES__A_EntityListConstructor): void;
488
+ /**
489
+ * Allows to convert Repository Response data to EntityList instance
490
+ *
491
+ * [!] This method does not load the data from the repository, it only converts the data to the EntityList instance
492
+ *
493
+ * @param items
494
+ * @param pagination
495
+ */
496
+ fromList(items: Array<EntityType> | Array<ReturnType<EntityType['toJSON']>>, pagination?: A_SERVER_TYPES__A_EntityListPagination): void;
497
+ /**
498
+ * Serializes the EntityList to a JSON object
499
+ *
500
+ * @returns
501
+ */
502
+ toJSON(): A_SERVER_TYPES__A_EntityListSerialized<EntityType>;
503
+ }
504
+
505
+ declare const A_SERVER__A_SERVER_LOGGER_ENV_VARIABLES: {
506
+ /**
507
+ * Enable logging of 200 responses
508
+ */
509
+ readonly SERVER_IGNORE_LOG_200: "SERVER_IGNORE_LOG_200";
510
+ /**
511
+ * Enable logging of 404 responses
512
+ */
513
+ readonly SERVER_IGNORE_LOG_404: "SERVER_IGNORE_LOG_404";
514
+ /**
515
+ * Enable logging of 500 responses
516
+ */
517
+ readonly SERVER_IGNORE_LOG_500: "SERVER_IGNORE_LOG_500";
518
+ /**
519
+ * Enable logging of 400 responses
520
+ */
521
+ readonly SERVER_IGNORE_LOG_400: "SERVER_IGNORE_LOG_400";
522
+ /**
523
+ * Enable logging of default responses
524
+ */
525
+ readonly SERVER_IGNORE_LOG_DEFAULT: "SERVER_IGNORE_LOG_DEFAULT";
526
+ };
527
+
528
+ type A_SERVER_TYPES__ServerLoggerRouteParams = {
529
+ method: string;
530
+ url: string;
531
+ status: number;
532
+ responseTime: number;
533
+ };
534
+ type A_SERVER_TYPES__ServerLoggerEnvVariables = Array<keyof typeof A_SERVER__A_SERVER_LOGGER_ENV_VARIABLES> | A_TYPES__ConceptENVVariables;
535
+
536
+ declare class A_ServerLogger extends A_Logger {
537
+ protected config: A_Config<A_SERVER_TYPES__ServerLoggerEnvVariables>;
538
+ onRequestEnd(request: A_Request, response: A_Response): Promise<void>;
539
+ onRequestError(request: A_Request): Promise<void>;
540
+ logStart(container: A_Service): void;
541
+ logStop(server: A_Server): void;
542
+ metrics(): void;
543
+ routes(routes: Array<A_Route>): void;
544
+ /**
545
+ * Logs the route information based on status code
546
+ *
547
+ * @param route
548
+ */
549
+ route(route: A_SERVER_TYPES__ServerLoggerRouteParams): void;
550
+ log200(route: A_SERVER_TYPES__ServerLoggerRouteParams): void;
551
+ log404(route: A_SERVER_TYPES__ServerLoggerRouteParams): void;
552
+ log500(route: A_SERVER_TYPES__ServerLoggerRouteParams): void;
553
+ log400(route: A_SERVER_TYPES__ServerLoggerRouteParams): void;
554
+ logDefault(route: A_SERVER_TYPES__ServerLoggerRouteParams): void;
555
+ serverReady(params: {
556
+ port: number;
557
+ app: {
558
+ name: string;
559
+ version?: string;
560
+ };
561
+ }): void;
562
+ /**
563
+ * Displays a proxy routes
564
+ *
565
+ * @param params
566
+ */
567
+ proxy(params: {
568
+ original: string;
569
+ destination: string;
570
+ }): void;
571
+ }
572
+
573
+ declare class A_EntityController extends A_Component {
574
+ list(request: A_Request<any, any, {
575
+ type: string;
576
+ }>, response: A_Response, factory: A_EntityFactory, scope: A_Scope, config: A_Config<['A_LIST_ITEMS_PER_PAGE', 'A_LIST_PAGE']>): Promise<void>;
577
+ load(request: A_Request<any, any, {
578
+ aseid: string;
579
+ }>, response: A_Response, scope: A_Scope): Promise<void>;
580
+ create(request: A_Request<any, any, {
581
+ aseid: string;
582
+ }>, factory: A_EntityFactory, scope: A_Scope): Promise<void>;
583
+ update(request: A_Request<any, any, {
584
+ aseid: string;
585
+ }>, response: A_Response, factory: A_EntityFactory, scope: A_Scope): Promise<void>;
586
+ delete(request: A_Request<any, any, {
587
+ aseid: string;
588
+ }>, response: A_Response, factory: A_EntityFactory, scope: A_Scope): Promise<void>;
589
+ callEntity(request: A_Request<any, any, {
590
+ aseid: string;
591
+ action: string;
592
+ }>, response: A_Response, factory: A_EntityFactory, scope: A_Scope): Promise<void>;
593
+ }
594
+
595
+ declare enum A_SERVER_TYPES__RouterMethod {
596
+ POST = "POST",
597
+ GET = "GET",
598
+ PUT = "PUT",
599
+ DELETE = "DELETE",
600
+ PATCH = "PATCH",
601
+ DEFAULT = "DEFAULT"
602
+ }
603
+ type A_TYPES__ARouterComponentMeta = {
604
+ [A_SERVER_TYPES__ARouterComponentMetaKey.ROUTES]: Map<string, A_TYPES__ARouterDefineRoute>;
605
+ } & A_TYPES__ComponentMeta;
606
+ type A_TYPES__ARouterDefineRoute = {
607
+ component: A_Component;
608
+ handler: string;
609
+ route: A_Route;
610
+ };
611
+ declare enum A_SERVER_TYPES__ARouterComponentMetaKey {
612
+ ROUTES = "ROUTES"
613
+ }
614
+ type A_SERVER_TYPES__ARouterRouteConfig = {
615
+ path: string | RegExp;
616
+ version: string;
617
+ prefix: string;
618
+ };
619
+
620
+ declare class A_Router extends A_Component {
621
+ /**
622
+ * Allows to define a custom route for POST requests
623
+ *
624
+ * @param path
625
+ * @returns
626
+ */
627
+ static Post(path: string | A_Route | RegExp | A_TYPES__Required<Partial<A_SERVER_TYPES__ARouterRouteConfig>, ['path']>): (target: A_Component, propertyKey: string, descriptor: PropertyDescriptor) => any;
628
+ /**
629
+ * Allows to define a custom route for GET requests
630
+ *
631
+ * @param path
632
+ * @returns
633
+ */
634
+ static Get(path: string | A_Route | RegExp | A_TYPES__Required<Partial<A_SERVER_TYPES__ARouterRouteConfig>, ['path']>): (target: A_Component, propertyKey: string, descriptor: PropertyDescriptor) => any;
635
+ /**
636
+ * Allows to define a custom route for PUT requests
637
+ *
638
+ * @param path
639
+ * @returns
640
+ */
641
+ static Put(path: string | A_Route | RegExp | A_TYPES__Required<Partial<A_SERVER_TYPES__ARouterRouteConfig>, ['path']>): (target: A_Component, propertyKey: string, descriptor: PropertyDescriptor) => any;
642
+ /**
643
+ * Allows to define a custom route for DELETE requests
644
+ *
645
+ * @param path
646
+ * @returns
647
+ */
648
+ static Delete(path: string | A_Route | RegExp | A_TYPES__Required<Partial<A_SERVER_TYPES__ARouterRouteConfig>, ['path']>): (target: A_Component, propertyKey: string, descriptor: PropertyDescriptor) => any;
649
+ /**
650
+ * Allows to define a custom route for PATCH requests
651
+ *
652
+ * @param path
653
+ * @returns
654
+ */
655
+ static Patch(path: string | A_Route | RegExp | A_TYPES__Required<Partial<A_SERVER_TYPES__ARouterRouteConfig>, ['path']>): (target: A_Component, propertyKey: string, descriptor: PropertyDescriptor) => any;
656
+ /**
657
+ * Allows to define a custom route for DEFAULT requests
658
+ *
659
+ * @param path
660
+ * @returns
661
+ */
662
+ static Default(path: string | A_Route | RegExp | A_TYPES__Required<Partial<A_SERVER_TYPES__ARouterRouteConfig>, ['path']>): (target: A_Component, propertyKey: string, descriptor: PropertyDescriptor) => any;
663
+ static routes: Array<A_Route>;
664
+ /**
665
+ * Private method to have the same signature for all route methods
666
+ *
667
+ * @param method
668
+ * @param path
669
+ * @returns
670
+ */
671
+ private static defineRoute;
672
+ protected load(logger: A_ServerLogger): Promise<void>;
673
+ identifyRoute(request: A_Request, response: A_Response, scope: A_Scope, config: A_Config, logger: A_Logger): Promise<void>;
674
+ }
675
+
676
+ declare class A_ServerHealthMonitor extends A_Component {
677
+ get(config: A_Config<['VERSION_PATH', 'EXPOSED_PROPERTIES']>, request: A_Request, response: A_Response, logger: A_Logger): Promise<any>;
678
+ }
679
+
680
+ declare class A_ServerProxy extends A_Component {
681
+ load(logger: A_Logger, config: A_ProxyConfig): Promise<void>;
682
+ onRequest(req: A_Request, res: A_Response, proxyConfig: A_ProxyConfig, logger: A_Logger): Promise<void>;
683
+ }
684
+
685
+ declare class A_ServerCORS extends A_Component {
686
+ private config;
687
+ init(config: A_Config<['ORIGIN', 'METHODS', 'HEADERS', 'CREDENTIALS', 'MAX_AGE']>): Promise<void>;
688
+ apply(aReq: A_Request, aRes: A_Response): void;
689
+ }
690
+
691
+ declare class A_StaticLoader extends A_Component {
692
+ load(logger: A_Logger, config: A_StaticConfig): Promise<void>;
693
+ onRequest(req: A_Request, res: A_Response, logger: A_Logger, config: A_StaticConfig): Promise<void>;
694
+ protected getMimeType(ext: string): string;
695
+ protected safeFilePath(staticDir: string, reqUrl: string, host?: string): string;
696
+ protected serveFile(filePath: string, res: A_Response): Promise<void>;
697
+ }
698
+
699
+ declare class A_Controller extends A_Component {
700
+ callEntityMethod(request: A_Request<any, any, {
701
+ component: string;
702
+ operation: string;
703
+ }>, response: A_Response, scope: A_Scope): Promise<void>;
704
+ }
705
+
706
+ declare class A_ListingController extends A_Component {
707
+ list(request: A_Request<any, any, {
708
+ type: string;
709
+ }>, response: A_Response, factory: A_EntityFactory, scope: A_Scope, config: A_Config<['A_LIST_ITEMS_PER_PAGE', 'A_LIST_PAGE']>): Promise<void>;
710
+ }
711
+
712
+ declare class A_CommandController extends A_Component {
713
+ handleCommand(req: A_Request<any, any, {
714
+ command: string;
715
+ }>, res: A_Response, scope: A_Scope, container: A_Container): Promise<void>;
716
+ }
717
+
718
+ declare class A_EntityRepository extends A_Component {
719
+ list(channel: A_HTTPChannel, entity: A_EntityList, scope: A_Scope): Promise<void>;
720
+ load(channel: A_HTTPChannel, entity: A_Entity, scope: A_Scope): Promise<void>;
721
+ save(channel: A_HTTPChannel, entity: A_Entity, scope: A_Scope): Promise<void>;
722
+ destroy(channel: A_HTTPChannel, entity: A_Entity, scope: A_Scope): Promise<void>;
723
+ }
724
+
725
+ type A_SERVER_TYPES__CorsConfig = {
726
+ origin: string;
727
+ methods: string[];
728
+ headers: string[];
729
+ credentials: boolean;
730
+ maxAge: number;
731
+ };
732
+
733
+ declare enum A_SERVER_CONSTANTS__A_HttpChannel_Lifecycle {
734
+ onAfterRequest = "onAfterHttpChannelRequest",
735
+ onError = "onHttpChannelError",
736
+ onBeforeRequest = "onBeforeHttpChannelRequest"
737
+ }
738
+
739
+ export { A_CommandController, A_Controller, A_EntityController, A_EntityFactory, A_EntityList, A_EntityRepository, A_HTTPChannel, A_HTTPChannelError, A_HTTPChannel_RequestContext, A_ListQueryFilter, A_ListingController, A_ProxyConfig, A_Request, A_Response, A_Route, A_Router, A_SERVER_CONSTANTS__A_HttpChannel_Lifecycle, A_SERVER_CONSTANTS__DEFAULT_ENV_VARIABLES, A_SERVER_CONSTANTS__DEFAULT_ENV_VARIABLES_ARRAY, type A_SERVER_TYPES__AEntityFactoryConstructor1, type A_SERVER_TYPES__AEntityFactoryConstructor2, A_SERVER_TYPES__ARouterComponentMetaKey, type A_SERVER_TYPES__ARouterRouteConfig, type A_SERVER_TYPES__CorsConfig, type A_SERVER_TYPES__HttpChannelRequestConfig, type A_SERVER_TYPES__HttpChannelRequestParams, type A_SERVER_TYPES__HttpChannelSendParams, type A_SERVER_TYPES__ProxyConfigConstructor, type A_SERVER_TYPES__ProxyConfigConstructorConfig, type A_SERVER_TYPES__RequestConstructor, A_SERVER_TYPES__RequestEvent, type A_SERVER_TYPES__RequestEventCallback, type A_SERVER_TYPES__RequestMethods, type A_SERVER_TYPES__RequestSerialized, type A_SERVER_TYPES__ResponseConstructor, A_SERVER_TYPES__ResponseEvent, type A_SERVER_TYPES__ResponseSerialized, A_SERVER_TYPES__RouterMethod, type A_SERVER_TYPES__RoutesConfig, type A_SERVER_TYPES__SendResponseObject, type A_SERVER_TYPES__ServerConstructor$1 as A_SERVER_TYPES__ServerConstructor, type A_SERVER_TYPES__ServerError_Init, type A_SERVER_TYPES__ServerError_Serialized, A_SERVER_TYPES__ServerFeature, type A_SERVER_TYPES__ServerFeatures, A_SERVER_TYPES__ServerMethod, A_Server, A_ServerCORS, A_ServerError, A_ServerHealthMonitor, A_ServerLogger, A_ServerProxy, A_Service, A_StaticConfig, A_StaticLoader, type A_TYPES__ARouterComponentMeta, type A_TYPES__ARouterDefineRoute, type A_TYPES__ServerENVVariables };