@twin.org/api-models 0.0.3-next.21 → 0.0.3-next.23

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 (86) hide show
  1. package/dist/es/errors/forbiddenError.js +23 -0
  2. package/dist/es/errors/forbiddenError.js.map +1 -0
  3. package/dist/es/errors/tooManyRequestsError.js +25 -0
  4. package/dist/es/errors/tooManyRequestsError.js.map +1 -0
  5. package/dist/es/helpers/httpErrorHelper.js +6 -2
  6. package/dist/es/helpers/httpErrorHelper.js.map +1 -1
  7. package/dist/es/index.js +5 -0
  8. package/dist/es/index.js.map +1 -1
  9. package/dist/es/models/httpContextIdKeys.js +21 -0
  10. package/dist/es/models/httpContextIdKeys.js.map +1 -0
  11. package/dist/es/models/responses/errors/IConflictResponse.js.map +1 -1
  12. package/dist/es/models/responses/errors/INotImplementedResponse.js +2 -0
  13. package/dist/es/models/responses/errors/INotImplementedResponse.js.map +1 -0
  14. package/dist/es/models/responses/errors/ITooManyRequestsResponse.js +2 -0
  15. package/dist/es/models/responses/errors/ITooManyRequestsResponse.js.map +1 -0
  16. package/dist/types/errors/forbiddenError.d.ts +20 -0
  17. package/dist/types/errors/tooManyRequestsError.d.ts +22 -0
  18. package/dist/types/index.d.ts +5 -0
  19. package/dist/types/models/httpContextIdKeys.d.ts +21 -0
  20. package/dist/types/models/responses/errors/IConflictResponse.d.ts +1 -6
  21. package/dist/types/models/responses/errors/INotImplementedResponse.d.ts +15 -0
  22. package/dist/types/models/responses/errors/ITooManyRequestsResponse.d.ts +15 -0
  23. package/docs/changelog.md +14 -0
  24. package/docs/reference/classes/ForbiddenError.md +55 -0
  25. package/docs/reference/classes/HttpErrorHelper.md +3 -3
  26. package/docs/reference/classes/HttpParameterHelper.md +4 -4
  27. package/docs/reference/classes/HttpUrlHelper.md +6 -6
  28. package/docs/reference/classes/TooManyRequestsError.md +67 -0
  29. package/docs/reference/index.md +6 -0
  30. package/docs/reference/interfaces/IAcceptedResponse.md +2 -2
  31. package/docs/reference/interfaces/IBadRequestResponse.md +2 -2
  32. package/docs/reference/interfaces/IBaseRestClientConfig.md +9 -9
  33. package/docs/reference/interfaces/IBaseRoute.md +12 -12
  34. package/docs/reference/interfaces/IBaseRouteEntryPoint.md +4 -4
  35. package/docs/reference/interfaces/IBaseRouteProcessor.md +7 -7
  36. package/docs/reference/interfaces/IBaseSocketClientConfig.md +7 -7
  37. package/docs/reference/interfaces/IConflictResponse.md +3 -11
  38. package/docs/reference/interfaces/ICreatedResponse.md +2 -2
  39. package/docs/reference/interfaces/IForbiddenResponse.md +2 -2
  40. package/docs/reference/interfaces/IHealthComponentInfo.md +4 -4
  41. package/docs/reference/interfaces/IHealthInfo.md +3 -3
  42. package/docs/reference/interfaces/IHostingComponent.md +3 -3
  43. package/docs/reference/interfaces/IHttpRequest.md +8 -8
  44. package/docs/reference/interfaces/IHttpRequestContext.md +6 -6
  45. package/docs/reference/interfaces/IHttpRequestPathParams.md +1 -1
  46. package/docs/reference/interfaces/IHttpRequestQuery.md +1 -1
  47. package/docs/reference/interfaces/IHttpResponse.md +6 -6
  48. package/docs/reference/interfaces/IHttpServerRequest.md +11 -11
  49. package/docs/reference/interfaces/IInformationComponent.md +8 -8
  50. package/docs/reference/interfaces/IInternalServerErrorResponse.md +2 -2
  51. package/docs/reference/interfaces/IMimeTypeProcessor.md +2 -2
  52. package/docs/reference/interfaces/INoContentRequest.md +8 -8
  53. package/docs/reference/interfaces/INoContentResponse.md +1 -1
  54. package/docs/reference/interfaces/INotFoundResponse.md +3 -3
  55. package/docs/reference/interfaces/INotImplementedResponse.md +19 -0
  56. package/docs/reference/interfaces/IOkResponse.md +1 -1
  57. package/docs/reference/interfaces/IRestRoute.md +26 -26
  58. package/docs/reference/interfaces/IRestRouteExample.md +3 -3
  59. package/docs/reference/interfaces/IRestRouteProcessor.md +10 -10
  60. package/docs/reference/interfaces/IRestRouteRequestExample.md +4 -4
  61. package/docs/reference/interfaces/IRestRouteResponseAttachmentOptions.md +6 -6
  62. package/docs/reference/interfaces/IRestRouteResponseExample.md +4 -4
  63. package/docs/reference/interfaces/IRestRouteResponseOptions.md +2 -2
  64. package/docs/reference/interfaces/IServerFavIconResponse.md +7 -7
  65. package/docs/reference/interfaces/IServerHealthResponse.md +1 -1
  66. package/docs/reference/interfaces/IServerInfo.md +2 -2
  67. package/docs/reference/interfaces/IServerInfoResponse.md +1 -1
  68. package/docs/reference/interfaces/IServerLivezResponse.md +2 -2
  69. package/docs/reference/interfaces/IServerRootResponse.md +2 -2
  70. package/docs/reference/interfaces/IServerSpecResponse.md +4 -4
  71. package/docs/reference/interfaces/ISocketRequestContext.md +7 -7
  72. package/docs/reference/interfaces/ISocketRoute.md +17 -17
  73. package/docs/reference/interfaces/ISocketRouteProcessor.md +16 -16
  74. package/docs/reference/interfaces/ISocketServerRequest.md +12 -12
  75. package/docs/reference/interfaces/ITag.md +2 -2
  76. package/docs/reference/interfaces/ITenant.md +8 -8
  77. package/docs/reference/interfaces/ITenantAdminComponent.md +7 -7
  78. package/docs/reference/interfaces/ITooManyRequestsResponse.md +19 -0
  79. package/docs/reference/interfaces/IUnauthorizedResponse.md +2 -2
  80. package/docs/reference/interfaces/IUnprocessableEntityResponse.md +2 -2
  81. package/docs/reference/interfaces/IWebServer.md +4 -4
  82. package/docs/reference/interfaces/IWebServerOptions.md +36 -12
  83. package/docs/reference/type-aliases/HttpContextIdKeys.md +5 -0
  84. package/docs/reference/variables/HealthStatus.md +3 -3
  85. package/docs/reference/variables/HttpContextIdKeys.md +25 -0
  86. package/package.json +1 -1
@@ -4,7 +4,7 @@ The root text for the server.
4
4
 
5
5
  ## Properties
6
6
 
7
- ### headers
7
+ ### headers {#headers}
8
8
 
9
9
  > **headers**: `object`
10
10
 
@@ -16,7 +16,7 @@ The headers for the response.
16
16
 
17
17
  ***
18
18
 
19
- ### body
19
+ ### body {#body}
20
20
 
21
21
  > **body**: `string`
22
22
 
@@ -4,16 +4,16 @@ The OpenAPI spec for the endpoints.
4
4
 
5
5
  ## Properties
6
6
 
7
- ### statusCode?
7
+ ### statusCode? {#statuscode}
8
8
 
9
- > `optional` **statusCode**: `HttpStatusCode`
9
+ > `optional` **statusCode?**: `HttpStatusCode`
10
10
 
11
11
  Response status code.
12
12
 
13
13
  ***
14
14
 
15
- ### body?
15
+ ### body? {#body}
16
16
 
17
- > `optional` **body**: `unknown`
17
+ > `optional` **body?**: `unknown`
18
18
 
19
19
  The spec for the server.
@@ -8,7 +8,7 @@ Context data from the socket request.
8
8
 
9
9
  ## Properties
10
10
 
11
- ### serverRequest
11
+ ### serverRequest {#serverrequest}
12
12
 
13
13
  > **serverRequest**: [`IHttpServerRequest`](IHttpServerRequest.md)
14
14
 
@@ -20,7 +20,7 @@ The raw HTTP request.
20
20
 
21
21
  ***
22
22
 
23
- ### processorState
23
+ ### processorState {#processorstate}
24
24
 
25
25
  > **processorState**: `object`
26
26
 
@@ -36,9 +36,9 @@ The state handed through the processors.
36
36
 
37
37
  ***
38
38
 
39
- ### loggingComponentType?
39
+ ### loggingComponentType? {#loggingcomponenttype}
40
40
 
41
- > `optional` **loggingComponentType**: `string`
41
+ > `optional` **loggingComponentType?**: `string`
42
42
 
43
43
  Logging component type for the request.
44
44
 
@@ -48,9 +48,9 @@ Logging component type for the request.
48
48
 
49
49
  ***
50
50
 
51
- ### hostingComponentType?
51
+ ### hostingComponentType? {#hostingcomponenttype}
52
52
 
53
- > `optional` **hostingComponentType**: `string`
53
+ > `optional` **hostingComponentType?**: `string`
54
54
 
55
55
  Hosting component type for the request.
56
56
 
@@ -60,7 +60,7 @@ Hosting component type for the request.
60
60
 
61
61
  ***
62
62
 
63
- ### socketId
63
+ ### socketId {#socketid}
64
64
 
65
65
  > **socketId**: `string`
66
66
 
@@ -18,7 +18,7 @@ Interface which defines a socket route.
18
18
 
19
19
  ## Properties
20
20
 
21
- ### operationId
21
+ ### operationId {#operationid}
22
22
 
23
23
  > **operationId**: `string`
24
24
 
@@ -30,7 +30,7 @@ The id of the operation.
30
30
 
31
31
  ***
32
32
 
33
- ### path
33
+ ### path {#path}
34
34
 
35
35
  > **path**: `string`
36
36
 
@@ -42,9 +42,9 @@ The path to use for routing.
42
42
 
43
43
  ***
44
44
 
45
- ### skipAuth?
45
+ ### skipAuth? {#skipauth}
46
46
 
47
- > `optional` **skipAuth**: `boolean`
47
+ > `optional` **skipAuth?**: `boolean`
48
48
 
49
49
  Skips the authentication requirement for this route.
50
50
 
@@ -54,9 +54,9 @@ Skips the authentication requirement for this route.
54
54
 
55
55
  ***
56
56
 
57
- ### skipTenant?
57
+ ### skipTenant? {#skiptenant}
58
58
 
59
- > `optional` **skipTenant**: `boolean`
59
+ > `optional` **skipTenant?**: `boolean`
60
60
 
61
61
  Skips the tenant requirement for this route.
62
62
 
@@ -66,9 +66,9 @@ Skips the tenant requirement for this route.
66
66
 
67
67
  ***
68
68
 
69
- ### requiredScope?
69
+ ### requiredScope? {#requiredscope}
70
70
 
71
- > `optional` **requiredScope**: `string`[]
71
+ > `optional` **requiredScope?**: `string`[]
72
72
 
73
73
  The user must have one of the specified scopes to access the route.
74
74
 
@@ -78,9 +78,9 @@ The user must have one of the specified scopes to access the route.
78
78
 
79
79
  ***
80
80
 
81
- ### processorFeatures?
81
+ ### processorFeatures? {#processorfeatures}
82
82
 
83
- > `optional` **processorFeatures**: `string`[]
83
+ > `optional` **processorFeatures?**: `string`[]
84
84
 
85
85
  The features supported by additional processors to run for this route.
86
86
 
@@ -90,9 +90,9 @@ The features supported by additional processors to run for this route.
90
90
 
91
91
  ***
92
92
 
93
- ### processorData?
93
+ ### processorData? {#processordata}
94
94
 
95
- > `optional` **processorData**: `object`
95
+ > `optional` **processorData?**: `object`
96
96
 
97
97
  The data for additional processors to run for this route.
98
98
 
@@ -106,7 +106,7 @@ The data for additional processors to run for this route.
106
106
 
107
107
  ***
108
108
 
109
- ### handler()
109
+ ### handler {#handler}
110
110
 
111
111
  > **handler**: (`socketRequestContext`, `request`, `emit`) => `void`
112
112
 
@@ -138,9 +138,9 @@ The function to emit an event.
138
138
 
139
139
  ***
140
140
 
141
- ### connected()?
141
+ ### connected? {#connected}
142
142
 
143
- > `optional` **connected**: (`socketRequestContext`) => `void`
143
+ > `optional` **connected?**: (`socketRequestContext`) => `void`
144
144
 
145
145
  The connected handler.
146
146
 
@@ -158,9 +158,9 @@ The request context.
158
158
 
159
159
  ***
160
160
 
161
- ### disconnected()?
161
+ ### disconnected? {#disconnected}
162
162
 
163
- > `optional` **disconnected**: (`socketRequestContext`) => `void`
163
+ > `optional` **disconnected?**: (`socketRequestContext`) => `void`
164
164
 
165
165
  The disconnected handler.
166
166
 
@@ -8,7 +8,7 @@ The definition for a processor for handling socket routes.
8
8
 
9
9
  ## Methods
10
10
 
11
- ### features()?
11
+ ### features()? {#features}
12
12
 
13
13
  > `optional` **features**(): `string`[]
14
14
 
@@ -28,7 +28,7 @@ The features supported by this processor.
28
28
 
29
29
  ***
30
30
 
31
- ### pre()?
31
+ ### pre()? {#pre}
32
32
 
33
33
  > `optional` **pre**(`request`, `response`, `route`, `contextIds`, `processorState`, `componentTypes?`): `Promise`\<`void`\>
34
34
 
@@ -50,9 +50,9 @@ The response data to send if any.
50
50
 
51
51
  ##### route
52
52
 
53
- The route being requested, if a matching one was found.
53
+ [`ISocketRoute`](ISocketRoute.md)\<`any`, `any`\> \| `undefined`
54
54
 
55
- [`ISocketRoute`](ISocketRoute.md)\<`any`, `any`\> | `undefined`
55
+ The route being requested, if a matching one was found.
56
56
 
57
57
  ##### contextIds
58
58
 
@@ -92,7 +92,7 @@ Promise that resolves when the request is processed.
92
92
 
93
93
  ***
94
94
 
95
- ### post()?
95
+ ### post()? {#post}
96
96
 
97
97
  > `optional` **post**(`request`, `response`, `route`, `contextIds`, `processorState`, `componentTypes?`): `Promise`\<`void`\>
98
98
 
@@ -114,9 +114,9 @@ The response data to send if any.
114
114
 
115
115
  ##### route
116
116
 
117
- The route being requested, if a matching one was found.
117
+ [`ISocketRoute`](ISocketRoute.md)\<`any`, `any`\> \| `undefined`
118
118
 
119
- [`ISocketRoute`](ISocketRoute.md)\<`any`, `any`\> | `undefined`
119
+ The route being requested, if a matching one was found.
120
120
 
121
121
  ##### contextIds
122
122
 
@@ -156,7 +156,7 @@ Promise that resolves when the request is processed.
156
156
 
157
157
  ***
158
158
 
159
- ### connected()?
159
+ ### connected()? {#connected}
160
160
 
161
161
  > `optional` **connected**(`request`, `route`, `loggingComponentType?`): `Promise`\<`void`\>
162
162
 
@@ -172,9 +172,9 @@ The server request object containing the socket id and other parameters.
172
172
 
173
173
  ##### route
174
174
 
175
- The route being requested, if a matching one was found.
175
+ [`ISocketRoute`](ISocketRoute.md)\<`any`, `any`\> \| `undefined`
176
176
 
177
- [`ISocketRoute`](ISocketRoute.md)\<`any`, `any`\> | `undefined`
177
+ The route being requested, if a matching one was found.
178
178
 
179
179
  ##### loggingComponentType?
180
180
 
@@ -190,7 +190,7 @@ Promise that resolves when the request is processed.
190
190
 
191
191
  ***
192
192
 
193
- ### disconnected()?
193
+ ### disconnected()? {#disconnected}
194
194
 
195
195
  > `optional` **disconnected**(`request`, `route`, `loggingComponentType?`): `Promise`\<`void`\>
196
196
 
@@ -206,9 +206,9 @@ The server request object containing the socket id and other parameters.
206
206
 
207
207
  ##### route
208
208
 
209
- The route being requested, if a matching one was found.
209
+ [`ISocketRoute`](ISocketRoute.md)\<`any`, `any`\> \| `undefined`
210
210
 
211
- [`ISocketRoute`](ISocketRoute.md)\<`any`, `any`\> | `undefined`
211
+ The route being requested, if a matching one was found.
212
212
 
213
213
  ##### loggingComponentType?
214
214
 
@@ -224,7 +224,7 @@ Promise that resolves when the request is processed.
224
224
 
225
225
  ***
226
226
 
227
- ### process()?
227
+ ### process()? {#process}
228
228
 
229
229
  > `optional` **process**(`request`, `response`, `route`, `processorState`, `responseEmitter`, `loggingComponentType?`): `Promise`\<`void`\>
230
230
 
@@ -246,9 +246,9 @@ The response data to send if any.
246
246
 
247
247
  ##### route
248
248
 
249
- The route being requested, if a matching one was found.
249
+ [`ISocketRoute`](ISocketRoute.md)\<`any`, `any`\> \| `undefined`
250
250
 
251
- [`ISocketRoute`](ISocketRoute.md)\<`any`, `any`\> | `undefined`
251
+ The route being requested, if a matching one was found.
252
252
 
253
253
  ##### processorState
254
254
 
@@ -14,9 +14,9 @@ Model for the standard parameters for an http request.
14
14
 
15
15
  ## Properties
16
16
 
17
- ### headers?
17
+ ### headers? {#headers}
18
18
 
19
- > `optional` **headers**: `IHttpHeaders`
19
+ > `optional` **headers?**: `IHttpHeaders`
20
20
 
21
21
  Incoming Http Headers.
22
22
 
@@ -26,9 +26,9 @@ Incoming Http Headers.
26
26
 
27
27
  ***
28
28
 
29
- ### pathParams?
29
+ ### pathParams? {#pathparams}
30
30
 
31
- > `optional` **pathParams**: [`IHttpRequestPathParams`](IHttpRequestPathParams.md)
31
+ > `optional` **pathParams?**: [`IHttpRequestPathParams`](IHttpRequestPathParams.md)
32
32
 
33
33
  The path parameters.
34
34
 
@@ -38,9 +38,9 @@ The path parameters.
38
38
 
39
39
  ***
40
40
 
41
- ### query?
41
+ ### query? {#query}
42
42
 
43
- > `optional` **query**: [`IHttpRequestQuery`](IHttpRequestQuery.md)
43
+ > `optional` **query?**: [`IHttpRequestQuery`](IHttpRequestQuery.md)
44
44
 
45
45
  The query parameters.
46
46
 
@@ -50,9 +50,9 @@ The query parameters.
50
50
 
51
51
  ***
52
52
 
53
- ### body?
53
+ ### body? {#body}
54
54
 
55
- > `optional` **body**: `T`
55
+ > `optional` **body?**: `T`
56
56
 
57
57
  Data to return send as the body.
58
58
 
@@ -62,7 +62,7 @@ Data to return send as the body.
62
62
 
63
63
  ***
64
64
 
65
- ### url
65
+ ### url {#url}
66
66
 
67
67
  > **url**: `string`
68
68
 
@@ -74,9 +74,9 @@ The request url.
74
74
 
75
75
  ***
76
76
 
77
- ### method?
77
+ ### method? {#method}
78
78
 
79
- > `optional` **method**: `HttpMethod`
79
+ > `optional` **method?**: `HttpMethod`
80
80
 
81
81
  The request method.
82
82
 
@@ -86,7 +86,7 @@ The request method.
86
86
 
87
87
  ***
88
88
 
89
- ### socketId
89
+ ### socketId {#socketid}
90
90
 
91
91
  > **socketId**: `string`
92
92
 
@@ -4,7 +4,7 @@ Tag for routes used to generate OpenAPI information.
4
4
 
5
5
  ## Properties
6
6
 
7
- ### name
7
+ ### name {#name}
8
8
 
9
9
  > **name**: `string`
10
10
 
@@ -12,7 +12,7 @@ The name of the tag.
12
12
 
13
13
  ***
14
14
 
15
- ### description
15
+ ### description {#description}
16
16
 
17
17
  > **description**: `string`
18
18
 
@@ -4,7 +4,7 @@ Model defining the tenant.
4
4
 
5
5
  ## Properties
6
6
 
7
- ### id
7
+ ### id {#id}
8
8
 
9
9
  > **id**: `string`
10
10
 
@@ -12,7 +12,7 @@ The unique identifier for the tenant.
12
12
 
13
13
  ***
14
14
 
15
- ### apiKey
15
+ ### apiKey {#apikey}
16
16
 
17
17
  > **apiKey**: `string`
18
18
 
@@ -20,7 +20,7 @@ The api key for the tenant.
20
20
 
21
21
  ***
22
22
 
23
- ### label
23
+ ### label {#label}
24
24
 
25
25
  > **label**: `string`
26
26
 
@@ -28,7 +28,7 @@ The label of the tenant.
28
28
 
29
29
  ***
30
30
 
31
- ### dateCreated
31
+ ### dateCreated {#datecreated}
32
32
 
33
33
  > **dateCreated**: `string`
34
34
 
@@ -36,7 +36,7 @@ The date the tenant was created.
36
36
 
37
37
  ***
38
38
 
39
- ### dateModified
39
+ ### dateModified {#datemodified}
40
40
 
41
41
  > **dateModified**: `string`
42
42
 
@@ -44,15 +44,15 @@ The date the tenant was modified.
44
44
 
45
45
  ***
46
46
 
47
- ### publicOrigin?
47
+ ### publicOrigin? {#publicorigin}
48
48
 
49
- > `optional` **publicOrigin**: `string`
49
+ > `optional` **publicOrigin?**: `string`
50
50
 
51
51
  The public origin available to the public for accessing the API.
52
52
 
53
53
  ***
54
54
 
55
- ### isNodeTenant
55
+ ### isNodeTenant {#isnodetenant}
56
56
 
57
57
  > **isNodeTenant**: `boolean`
58
58
 
@@ -8,7 +8,7 @@ Configuration for the tenant admin component
8
8
 
9
9
  ## Methods
10
10
 
11
- ### create()
11
+ ### create() {#create}
12
12
 
13
13
  > **create**(`tenant`): `Promise`\<`string`\>
14
14
 
@@ -30,7 +30,7 @@ The tenant id.
30
30
 
31
31
  ***
32
32
 
33
- ### update()
33
+ ### update() {#update}
34
34
 
35
35
  > **update**(`tenant`): `Promise`\<`void`\>
36
36
 
@@ -52,7 +52,7 @@ Nothing.
52
52
 
53
53
  ***
54
54
 
55
- ### get()
55
+ ### get() {#get}
56
56
 
57
57
  > **get**(`tenantId`): `Promise`\<[`ITenant`](ITenant.md)\>
58
58
 
@@ -78,7 +78,7 @@ Error if the tenant is not found.
78
78
 
79
79
  ***
80
80
 
81
- ### getByApiKey()
81
+ ### getByApiKey() {#getbyapikey}
82
82
 
83
83
  > **getByApiKey**(`apiKey`): `Promise`\<[`ITenant`](ITenant.md)\>
84
84
 
@@ -104,7 +104,7 @@ Error if the tenant is not found.
104
104
 
105
105
  ***
106
106
 
107
- ### getByPublicOrigin()
107
+ ### getByPublicOrigin() {#getbypublicorigin}
108
108
 
109
109
  > **getByPublicOrigin**(`publicOrigin`): `Promise`\<[`ITenant`](ITenant.md)\>
110
110
 
@@ -130,7 +130,7 @@ Error if the tenant is not found.
130
130
 
131
131
  ***
132
132
 
133
- ### remove()
133
+ ### remove() {#remove}
134
134
 
135
135
  > **remove**(`tenantId`): `Promise`\<`void`\>
136
136
 
@@ -156,7 +156,7 @@ Error if the tenant is not found.
156
156
 
157
157
  ***
158
158
 
159
- ### query()
159
+ ### query() {#query}
160
160
 
161
161
  > **query**(`options?`, `cursor?`, `limit?`): `Promise`\<\{ `tenants`: [`ITenant`](ITenant.md)[]; `cursor?`: `string`; \}\>
162
162
 
@@ -0,0 +1,19 @@
1
+ # Interface: ITooManyRequestsResponse
2
+
3
+ The request resulted in too many requests, see the content for more details.
4
+
5
+ ## Properties
6
+
7
+ ### statusCode {#statuscode}
8
+
9
+ > **statusCode**: `429`
10
+
11
+ Response status code.
12
+
13
+ ***
14
+
15
+ ### body {#body}
16
+
17
+ > **body**: `IError`
18
+
19
+ The body which contains the error.
@@ -4,7 +4,7 @@ You are not authorized to use the API or no credentials were supplied, see the c
4
4
 
5
5
  ## Properties
6
6
 
7
- ### statusCode
7
+ ### statusCode {#statuscode}
8
8
 
9
9
  > **statusCode**: `401`
10
10
 
@@ -12,7 +12,7 @@ Response status code.
12
12
 
13
13
  ***
14
14
 
15
- ### body
15
+ ### body {#body}
16
16
 
17
17
  > **body**: `IError`
18
18
 
@@ -4,7 +4,7 @@ The server cannot process the request, see the content for more details.
4
4
 
5
5
  ## Properties
6
6
 
7
- ### statusCode
7
+ ### statusCode {#statuscode}
8
8
 
9
9
  > **statusCode**: `422`
10
10
 
@@ -12,7 +12,7 @@ Response status code.
12
12
 
13
13
  ***
14
14
 
15
- ### body
15
+ ### body {#body}
16
16
 
17
17
  > **body**: `IError`
18
18
 
@@ -10,7 +10,7 @@ Interface describing a web server.
10
10
 
11
11
  ## Methods
12
12
 
13
- ### getInstance()
13
+ ### getInstance() {#getinstance}
14
14
 
15
15
  > **getInstance**(): `T`
16
16
 
@@ -24,7 +24,7 @@ The web server instance.
24
24
 
25
25
  ***
26
26
 
27
- ### build()
27
+ ### build() {#build}
28
28
 
29
29
  > **build**(`restRouteProcessors?`, `restRoutes?`, `socketRouteProcessors?`, `socketRoutes?`, `options?`): `Promise`\<`void`\>
30
30
 
@@ -70,7 +70,7 @@ Nothing.
70
70
 
71
71
  ***
72
72
 
73
- ### start()
73
+ ### start() {#start}
74
74
 
75
75
  > **start**(): `Promise`\<`void`\>
76
76
 
@@ -84,7 +84,7 @@ Nothing.
84
84
 
85
85
  ***
86
86
 
87
- ### stop()
87
+ ### stop() {#stop}
88
88
 
89
89
  > **stop**(): `Promise`\<`void`\>
90
90
 
@@ -4,48 +4,72 @@ Options for the web server.
4
4
 
5
5
  ## Properties
6
6
 
7
- ### port?
7
+ ### port? {#port}
8
8
 
9
- > `optional` **port**: `number`
9
+ > `optional` **port?**: `number`
10
10
 
11
11
  The port to bind the web server to.
12
12
 
13
+ #### Default
14
+
15
+ ```ts
16
+ 3000
17
+ ```
18
+
13
19
  ***
14
20
 
15
- ### host?
21
+ ### host? {#host}
16
22
 
17
- > `optional` **host**: `string`
23
+ > `optional` **host?**: `string`
18
24
 
19
25
  The address to bind the web server to.
20
26
 
27
+ #### Default
28
+
29
+ ```ts
30
+ localhost
31
+ ```
32
+
21
33
  ***
22
34
 
23
- ### methods?
35
+ ### methods? {#methods}
24
36
 
25
- > `optional` **methods**: `HttpMethod`[]
37
+ > `optional` **methods?**: `HttpMethod`[]
26
38
 
27
39
  The methods that the server accepts.
28
40
 
41
+ #### Default
42
+
43
+ ```ts
44
+ ["GET", "PUT", "POST", "DELETE", "OPTIONS"]
45
+ ```
46
+
29
47
  ***
30
48
 
31
- ### allowedHeaders?
49
+ ### allowedHeaders? {#allowedheaders}
32
50
 
33
- > `optional` **allowedHeaders**: `string`[]
51
+ > `optional` **allowedHeaders?**: `string`[]
34
52
 
35
53
  Any additional allowed headers.
36
54
 
37
55
  ***
38
56
 
39
- ### exposedHeaders?
57
+ ### exposedHeaders? {#exposedheaders}
40
58
 
41
- > `optional` **exposedHeaders**: `string`[]
59
+ > `optional` **exposedHeaders?**: `string`[]
42
60
 
43
61
  And additional exposed headers.
44
62
 
45
63
  ***
46
64
 
47
- ### corsOrigins?
65
+ ### corsOrigins? {#corsorigins}
48
66
 
49
- > `optional` **corsOrigins**: `string` \| `string`[]
67
+ > `optional` **corsOrigins?**: `string` \| `string`[]
50
68
 
51
69
  The allowed CORS domains.
70
+
71
+ #### Default
72
+
73
+ ```ts
74
+ ["*"]
75
+ ```