@twin.org/api-models 0.0.1-next.9 → 0.0.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/dist/cjs/index.cjs +34 -11
- package/dist/esm/index.mjs +34 -14
- package/dist/types/factories/mimeTypeProcessorFactory.d.ts +6 -0
- package/dist/types/factories/restRouteProcessorFactory.d.ts +6 -0
- package/dist/types/factories/socketRouteProcessorFactory.d.ts +6 -0
- package/dist/types/index.d.ts +9 -1
- package/dist/types/models/config/IBaseSocketClientConfig.d.ts +4 -0
- package/dist/types/models/routes/IBaseRouteEntryPoint.d.ts +22 -0
- package/dist/types/models/routes/IRestRouteEntryPoint.d.ts +2 -19
- package/dist/types/models/routes/ISocketRoute.d.ts +6 -8
- package/dist/types/models/routes/ISocketRouteEntryPoint.d.ts +6 -0
- package/dist/types/models/server/IBaseRouteProcessor.d.ts +34 -0
- package/dist/types/models/server/IMimeTypeProcessor.d.ts +17 -0
- package/dist/types/models/server/IRestRouteProcessor.d.ts +22 -0
- package/dist/types/models/server/{IHttpRestRouteProcessor.d.ts → ISocketRouteProcessor.d.ts} +12 -15
- package/dist/types/models/server/IWebServer.d.ts +7 -3
- package/docs/changelog.md +43 -1
- package/docs/reference/classes/HttpErrorHelper.md +19 -9
- package/docs/reference/classes/HttpParameterHelper.md +31 -15
- package/docs/reference/index.md +10 -2
- package/docs/reference/interfaces/IBaseRouteEntryPoint.md +55 -0
- package/docs/reference/interfaces/IBaseRouteProcessor.md +106 -0
- package/docs/reference/interfaces/IBaseSocketClientConfig.md +8 -0
- package/docs/reference/interfaces/IHealthInfo.md +18 -0
- package/docs/reference/interfaces/IHttpRequest.md +3 -1
- package/docs/reference/interfaces/IHttpRequestContext.md +2 -2
- package/docs/reference/interfaces/IHttpRequestPathParams.md +1 -1
- package/docs/reference/interfaces/IHttpRequestQuery.md +1 -1
- package/docs/reference/interfaces/IHttpResponse.md +3 -1
- package/docs/reference/interfaces/IHttpServerRequest.md +3 -1
- package/docs/reference/interfaces/IInformationComponent.md +13 -5
- package/docs/reference/interfaces/IMimeTypeProcessor.md +43 -0
- package/docs/reference/interfaces/IRestRoute.md +30 -4
- package/docs/reference/interfaces/{IHttpRestRouteProcessor.md → IRestRouteProcessor.md} +55 -23
- package/docs/reference/interfaces/IRestRouteRequestExample.md +3 -1
- package/docs/reference/interfaces/IRestRouteResponseExample.md +3 -1
- package/docs/reference/interfaces/ISocketRoute.md +22 -10
- package/docs/reference/interfaces/ISocketRouteProcessor.md +217 -0
- package/docs/reference/interfaces/IWebServer.md +26 -6
- package/docs/reference/type-aliases/HealthStatus.md +1 -1
- package/docs/reference/type-aliases/IRestRouteEntryPoint.md +5 -0
- package/docs/reference/type-aliases/ISocketRouteEntryPoint.md +5 -0
- package/docs/reference/variables/MimeTypeProcessorFactory.md +5 -0
- package/docs/reference/variables/RestRouteProcessorFactory.md +5 -0
- package/docs/reference/variables/SocketRouteProcessorFactory.md +5 -0
- package/package.json +6 -6
- package/docs/reference/interfaces/IRestRouteEntryPoint.md +0 -45
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
# Interface:
|
|
1
|
+
# Interface: IRestRouteProcessor
|
|
2
2
|
|
|
3
3
|
The definition for a processor for handling REST routes.
|
|
4
4
|
|
|
5
5
|
## Extends
|
|
6
6
|
|
|
7
|
-
- `
|
|
7
|
+
- [`IBaseRouteProcessor`](IBaseRouteProcessor.md)\<[`IRestRoute`](IRestRoute.md)\>
|
|
8
8
|
|
|
9
9
|
## Methods
|
|
10
10
|
|
|
@@ -16,23 +16,31 @@ Pre process the REST request for the specified route.
|
|
|
16
16
|
|
|
17
17
|
#### Parameters
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
##### request
|
|
20
|
+
|
|
21
|
+
[`IHttpServerRequest`](IHttpServerRequest.md)
|
|
20
22
|
|
|
21
23
|
The request to handle.
|
|
22
24
|
|
|
23
|
-
|
|
25
|
+
##### response
|
|
26
|
+
|
|
27
|
+
[`IHttpResponse`](IHttpResponse.md)
|
|
24
28
|
|
|
25
29
|
The response data to send if any.
|
|
26
30
|
|
|
27
|
-
|
|
31
|
+
##### route
|
|
28
32
|
|
|
29
33
|
The route being requested, if a matching one was found.
|
|
30
34
|
|
|
31
|
-
|
|
35
|
+
`undefined` | [`IRestRoute`](IRestRoute.md)\<`any`, `any`\>
|
|
36
|
+
|
|
37
|
+
##### requestIdentity
|
|
38
|
+
|
|
39
|
+
[`IHttpRequestIdentity`](IHttpRequestIdentity.md)
|
|
32
40
|
|
|
33
41
|
The identity context for the request.
|
|
34
42
|
|
|
35
|
-
|
|
43
|
+
##### processorState
|
|
36
44
|
|
|
37
45
|
The state handed through the processors.
|
|
38
46
|
|
|
@@ -42,33 +50,45 @@ The state handed through the processors.
|
|
|
42
50
|
|
|
43
51
|
Promise that resolves when the request is processed.
|
|
44
52
|
|
|
53
|
+
#### Inherited from
|
|
54
|
+
|
|
55
|
+
[`IBaseRouteProcessor`](IBaseRouteProcessor.md).[`pre`](IBaseRouteProcessor.md#pre)
|
|
56
|
+
|
|
45
57
|
***
|
|
46
58
|
|
|
47
|
-
###
|
|
59
|
+
### post()?
|
|
48
60
|
|
|
49
|
-
> `optional` **
|
|
61
|
+
> `optional` **post**(`request`, `response`, `route`, `requestIdentity`, `processorState`): `Promise`\<`void`\>
|
|
50
62
|
|
|
51
|
-
|
|
63
|
+
Post process the REST request for the specified route.
|
|
52
64
|
|
|
53
65
|
#### Parameters
|
|
54
66
|
|
|
55
|
-
|
|
67
|
+
##### request
|
|
68
|
+
|
|
69
|
+
[`IHttpServerRequest`](IHttpServerRequest.md)
|
|
56
70
|
|
|
57
71
|
The request to handle.
|
|
58
72
|
|
|
59
|
-
|
|
73
|
+
##### response
|
|
74
|
+
|
|
75
|
+
[`IHttpResponse`](IHttpResponse.md)
|
|
60
76
|
|
|
61
77
|
The response data to send if any.
|
|
62
78
|
|
|
63
|
-
|
|
79
|
+
##### route
|
|
64
80
|
|
|
65
81
|
The route being requested, if a matching one was found.
|
|
66
82
|
|
|
67
|
-
|
|
83
|
+
`undefined` | [`IRestRoute`](IRestRoute.md)\<`any`, `any`\>
|
|
84
|
+
|
|
85
|
+
##### requestIdentity
|
|
86
|
+
|
|
87
|
+
[`IHttpRequestIdentity`](IHttpRequestIdentity.md)
|
|
68
88
|
|
|
69
89
|
The identity context for the request.
|
|
70
90
|
|
|
71
|
-
|
|
91
|
+
##### processorState
|
|
72
92
|
|
|
73
93
|
The state handed through the processors.
|
|
74
94
|
|
|
@@ -78,33 +98,45 @@ The state handed through the processors.
|
|
|
78
98
|
|
|
79
99
|
Promise that resolves when the request is processed.
|
|
80
100
|
|
|
101
|
+
#### Inherited from
|
|
102
|
+
|
|
103
|
+
[`IBaseRouteProcessor`](IBaseRouteProcessor.md).[`post`](IBaseRouteProcessor.md#post)
|
|
104
|
+
|
|
81
105
|
***
|
|
82
106
|
|
|
83
|
-
###
|
|
107
|
+
### process()?
|
|
84
108
|
|
|
85
|
-
> `optional` **
|
|
109
|
+
> `optional` **process**(`request`, `response`, `route`, `requestIdentity`, `processorState`): `Promise`\<`void`\>
|
|
86
110
|
|
|
87
|
-
|
|
111
|
+
Process the REST request for the specified route.
|
|
88
112
|
|
|
89
113
|
#### Parameters
|
|
90
114
|
|
|
91
|
-
|
|
115
|
+
##### request
|
|
116
|
+
|
|
117
|
+
[`IHttpServerRequest`](IHttpServerRequest.md)
|
|
92
118
|
|
|
93
119
|
The request to handle.
|
|
94
120
|
|
|
95
|
-
|
|
121
|
+
##### response
|
|
122
|
+
|
|
123
|
+
[`IHttpResponse`](IHttpResponse.md)
|
|
96
124
|
|
|
97
125
|
The response data to send if any.
|
|
98
126
|
|
|
99
|
-
|
|
127
|
+
##### route
|
|
100
128
|
|
|
101
129
|
The route being requested, if a matching one was found.
|
|
102
130
|
|
|
103
|
-
|
|
131
|
+
`undefined` | [`IRestRoute`](IRestRoute.md)\<`any`, `any`\>
|
|
132
|
+
|
|
133
|
+
##### requestIdentity
|
|
134
|
+
|
|
135
|
+
[`IHttpRequestIdentity`](IHttpRequestIdentity.md)
|
|
104
136
|
|
|
105
137
|
The identity context for the request.
|
|
106
138
|
|
|
107
|
-
|
|
139
|
+
##### processorState
|
|
108
140
|
|
|
109
141
|
The state handed through the processors.
|
|
110
142
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Interface: ISocketRoute
|
|
1
|
+
# Interface: ISocketRoute\<T, U\>
|
|
2
2
|
|
|
3
3
|
Interface which defines a socket route.
|
|
4
4
|
|
|
@@ -6,6 +6,16 @@ Interface which defines a socket route.
|
|
|
6
6
|
|
|
7
7
|
- [`IBaseRoute`](IBaseRoute.md)
|
|
8
8
|
|
|
9
|
+
## Type Parameters
|
|
10
|
+
|
|
11
|
+
### T
|
|
12
|
+
|
|
13
|
+
`T` *extends* [`IHttpRequest`](IHttpRequest.md) = `any`
|
|
14
|
+
|
|
15
|
+
### U
|
|
16
|
+
|
|
17
|
+
`U` *extends* [`IHttpResponse`](IHttpResponse.md) = `any`
|
|
18
|
+
|
|
9
19
|
## Properties
|
|
10
20
|
|
|
11
21
|
### operationId
|
|
@@ -46,28 +56,30 @@ Skips the authentication for this route.
|
|
|
46
56
|
|
|
47
57
|
### handler()
|
|
48
58
|
|
|
49
|
-
> **handler**: (`httpRequestContext`, `
|
|
59
|
+
> **handler**: (`httpRequestContext`, `request`, `emit`) => `void`
|
|
50
60
|
|
|
51
61
|
The handler module.
|
|
52
62
|
|
|
53
63
|
#### Parameters
|
|
54
64
|
|
|
55
|
-
|
|
65
|
+
##### httpRequestContext
|
|
56
66
|
|
|
57
|
-
|
|
67
|
+
[`IHttpRequestContext`](IHttpRequestContext.md)
|
|
58
68
|
|
|
59
|
-
|
|
69
|
+
The request context.
|
|
60
70
|
|
|
61
|
-
|
|
71
|
+
##### request
|
|
62
72
|
|
|
63
|
-
|
|
73
|
+
`T`
|
|
64
74
|
|
|
65
75
|
The request object.
|
|
66
76
|
|
|
67
|
-
|
|
77
|
+
##### emit
|
|
78
|
+
|
|
79
|
+
(`event`, `response`) => `Promise`\<`void`\>
|
|
68
80
|
|
|
69
|
-
|
|
81
|
+
The function to emit an event.
|
|
70
82
|
|
|
71
83
|
#### Returns
|
|
72
84
|
|
|
73
|
-
`
|
|
85
|
+
`void`
|
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
# Interface: ISocketRouteProcessor
|
|
2
|
+
|
|
3
|
+
The definition for a processor for handling socket routes.
|
|
4
|
+
|
|
5
|
+
## Extends
|
|
6
|
+
|
|
7
|
+
- [`IBaseRouteProcessor`](IBaseRouteProcessor.md)\<[`ISocketRoute`](ISocketRoute.md)\>
|
|
8
|
+
|
|
9
|
+
## Methods
|
|
10
|
+
|
|
11
|
+
### pre()?
|
|
12
|
+
|
|
13
|
+
> `optional` **pre**(`request`, `response`, `route`, `requestIdentity`, `processorState`): `Promise`\<`void`\>
|
|
14
|
+
|
|
15
|
+
Pre process the REST request for the specified route.
|
|
16
|
+
|
|
17
|
+
#### Parameters
|
|
18
|
+
|
|
19
|
+
##### request
|
|
20
|
+
|
|
21
|
+
[`IHttpServerRequest`](IHttpServerRequest.md)
|
|
22
|
+
|
|
23
|
+
The request to handle.
|
|
24
|
+
|
|
25
|
+
##### response
|
|
26
|
+
|
|
27
|
+
[`IHttpResponse`](IHttpResponse.md)
|
|
28
|
+
|
|
29
|
+
The response data to send if any.
|
|
30
|
+
|
|
31
|
+
##### route
|
|
32
|
+
|
|
33
|
+
The route being requested, if a matching one was found.
|
|
34
|
+
|
|
35
|
+
`undefined` | [`ISocketRoute`](ISocketRoute.md)\<`any`, `any`\>
|
|
36
|
+
|
|
37
|
+
##### requestIdentity
|
|
38
|
+
|
|
39
|
+
[`IHttpRequestIdentity`](IHttpRequestIdentity.md)
|
|
40
|
+
|
|
41
|
+
The identity context for the request.
|
|
42
|
+
|
|
43
|
+
##### processorState
|
|
44
|
+
|
|
45
|
+
The state handed through the processors.
|
|
46
|
+
|
|
47
|
+
#### Returns
|
|
48
|
+
|
|
49
|
+
`Promise`\<`void`\>
|
|
50
|
+
|
|
51
|
+
Promise that resolves when the request is processed.
|
|
52
|
+
|
|
53
|
+
#### Inherited from
|
|
54
|
+
|
|
55
|
+
[`IBaseRouteProcessor`](IBaseRouteProcessor.md).[`pre`](IBaseRouteProcessor.md#pre)
|
|
56
|
+
|
|
57
|
+
***
|
|
58
|
+
|
|
59
|
+
### post()?
|
|
60
|
+
|
|
61
|
+
> `optional` **post**(`request`, `response`, `route`, `requestIdentity`, `processorState`): `Promise`\<`void`\>
|
|
62
|
+
|
|
63
|
+
Post process the REST request for the specified route.
|
|
64
|
+
|
|
65
|
+
#### Parameters
|
|
66
|
+
|
|
67
|
+
##### request
|
|
68
|
+
|
|
69
|
+
[`IHttpServerRequest`](IHttpServerRequest.md)
|
|
70
|
+
|
|
71
|
+
The request to handle.
|
|
72
|
+
|
|
73
|
+
##### response
|
|
74
|
+
|
|
75
|
+
[`IHttpResponse`](IHttpResponse.md)
|
|
76
|
+
|
|
77
|
+
The response data to send if any.
|
|
78
|
+
|
|
79
|
+
##### route
|
|
80
|
+
|
|
81
|
+
The route being requested, if a matching one was found.
|
|
82
|
+
|
|
83
|
+
`undefined` | [`ISocketRoute`](ISocketRoute.md)\<`any`, `any`\>
|
|
84
|
+
|
|
85
|
+
##### requestIdentity
|
|
86
|
+
|
|
87
|
+
[`IHttpRequestIdentity`](IHttpRequestIdentity.md)
|
|
88
|
+
|
|
89
|
+
The identity context for the request.
|
|
90
|
+
|
|
91
|
+
##### processorState
|
|
92
|
+
|
|
93
|
+
The state handed through the processors.
|
|
94
|
+
|
|
95
|
+
#### Returns
|
|
96
|
+
|
|
97
|
+
`Promise`\<`void`\>
|
|
98
|
+
|
|
99
|
+
Promise that resolves when the request is processed.
|
|
100
|
+
|
|
101
|
+
#### Inherited from
|
|
102
|
+
|
|
103
|
+
[`IBaseRouteProcessor`](IBaseRouteProcessor.md).[`post`](IBaseRouteProcessor.md#post)
|
|
104
|
+
|
|
105
|
+
***
|
|
106
|
+
|
|
107
|
+
### connected()?
|
|
108
|
+
|
|
109
|
+
> `optional` **connected**(`request`, `route`, `processorState`): `Promise`\<`void`\>
|
|
110
|
+
|
|
111
|
+
Process the connected event.
|
|
112
|
+
|
|
113
|
+
#### Parameters
|
|
114
|
+
|
|
115
|
+
##### request
|
|
116
|
+
|
|
117
|
+
[`IHttpServerRequest`](IHttpServerRequest.md)
|
|
118
|
+
|
|
119
|
+
The request to handle.
|
|
120
|
+
|
|
121
|
+
##### route
|
|
122
|
+
|
|
123
|
+
The route being requested, if a matching one was found.
|
|
124
|
+
|
|
125
|
+
`undefined` | [`ISocketRoute`](ISocketRoute.md)\<`any`, `any`\>
|
|
126
|
+
|
|
127
|
+
##### processorState
|
|
128
|
+
|
|
129
|
+
The state handed through the processors.
|
|
130
|
+
|
|
131
|
+
#### Returns
|
|
132
|
+
|
|
133
|
+
`Promise`\<`void`\>
|
|
134
|
+
|
|
135
|
+
Promise that resolves when the request is processed.
|
|
136
|
+
|
|
137
|
+
***
|
|
138
|
+
|
|
139
|
+
### disconnected()?
|
|
140
|
+
|
|
141
|
+
> `optional` **disconnected**(`request`, `route`, `processorState`): `Promise`\<`void`\>
|
|
142
|
+
|
|
143
|
+
Process the disconnected event.
|
|
144
|
+
|
|
145
|
+
#### Parameters
|
|
146
|
+
|
|
147
|
+
##### request
|
|
148
|
+
|
|
149
|
+
[`IHttpServerRequest`](IHttpServerRequest.md)
|
|
150
|
+
|
|
151
|
+
The request to handle.
|
|
152
|
+
|
|
153
|
+
##### route
|
|
154
|
+
|
|
155
|
+
The route being requested, if a matching one was found.
|
|
156
|
+
|
|
157
|
+
`undefined` | [`ISocketRoute`](ISocketRoute.md)\<`any`, `any`\>
|
|
158
|
+
|
|
159
|
+
##### processorState
|
|
160
|
+
|
|
161
|
+
The state handed through the processors.
|
|
162
|
+
|
|
163
|
+
#### Returns
|
|
164
|
+
|
|
165
|
+
`Promise`\<`void`\>
|
|
166
|
+
|
|
167
|
+
Promise that resolves when the request is processed.
|
|
168
|
+
|
|
169
|
+
***
|
|
170
|
+
|
|
171
|
+
### process()?
|
|
172
|
+
|
|
173
|
+
> `optional` **process**(`request`, `response`, `route`, `requestIdentity`, `processorState`, `responseEmitter`): `Promise`\<`void`\>
|
|
174
|
+
|
|
175
|
+
Process the REST request for the specified route.
|
|
176
|
+
|
|
177
|
+
#### Parameters
|
|
178
|
+
|
|
179
|
+
##### request
|
|
180
|
+
|
|
181
|
+
[`IHttpServerRequest`](IHttpServerRequest.md)
|
|
182
|
+
|
|
183
|
+
The request to handle.
|
|
184
|
+
|
|
185
|
+
##### response
|
|
186
|
+
|
|
187
|
+
[`IHttpResponse`](IHttpResponse.md)
|
|
188
|
+
|
|
189
|
+
The response data to send if any.
|
|
190
|
+
|
|
191
|
+
##### route
|
|
192
|
+
|
|
193
|
+
The route being requested, if a matching one was found.
|
|
194
|
+
|
|
195
|
+
`undefined` | [`ISocketRoute`](ISocketRoute.md)\<`any`, `any`\>
|
|
196
|
+
|
|
197
|
+
##### requestIdentity
|
|
198
|
+
|
|
199
|
+
[`IHttpRequestIdentity`](IHttpRequestIdentity.md)
|
|
200
|
+
|
|
201
|
+
The identity context for the request.
|
|
202
|
+
|
|
203
|
+
##### processorState
|
|
204
|
+
|
|
205
|
+
The state handed through the processors.
|
|
206
|
+
|
|
207
|
+
##### responseEmitter
|
|
208
|
+
|
|
209
|
+
(`topic`, `response`) => `Promise`\<`void`\>
|
|
210
|
+
|
|
211
|
+
The function to emit a response.
|
|
212
|
+
|
|
213
|
+
#### Returns
|
|
214
|
+
|
|
215
|
+
`Promise`\<`void`\>
|
|
216
|
+
|
|
217
|
+
Promise that resolves when the request is processed.
|
|
@@ -4,7 +4,9 @@ Interface describing a web server.
|
|
|
4
4
|
|
|
5
5
|
## Type Parameters
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
### T
|
|
8
|
+
|
|
9
|
+
`T`
|
|
8
10
|
|
|
9
11
|
## Methods
|
|
10
12
|
|
|
@@ -24,21 +26,39 @@ The web server instance.
|
|
|
24
26
|
|
|
25
27
|
### build()
|
|
26
28
|
|
|
27
|
-
> **build**(`restRouteProcessors
|
|
29
|
+
> **build**(`restRouteProcessors?`, `restRoutes?`, `socketRouteProcessors?`, `socketRoutes?`, `options?`): `Promise`\<`void`\>
|
|
28
30
|
|
|
29
31
|
Build the server.
|
|
30
32
|
|
|
31
33
|
#### Parameters
|
|
32
34
|
|
|
33
|
-
|
|
35
|
+
##### restRouteProcessors?
|
|
36
|
+
|
|
37
|
+
[`IRestRouteProcessor`](IRestRouteProcessor.md)[]
|
|
34
38
|
|
|
35
|
-
The
|
|
39
|
+
The processors for incoming requests over REST.
|
|
36
40
|
|
|
37
|
-
|
|
41
|
+
##### restRoutes?
|
|
42
|
+
|
|
43
|
+
[`IRestRoute`](IRestRoute.md)\<`any`, `any`\>[]
|
|
38
44
|
|
|
39
45
|
The REST routes.
|
|
40
46
|
|
|
41
|
-
|
|
47
|
+
##### socketRouteProcessors?
|
|
48
|
+
|
|
49
|
+
[`ISocketRouteProcessor`](ISocketRouteProcessor.md)[]
|
|
50
|
+
|
|
51
|
+
The processors for incoming requests over Sockets.
|
|
52
|
+
|
|
53
|
+
##### socketRoutes?
|
|
54
|
+
|
|
55
|
+
[`ISocketRoute`](ISocketRoute.md)\<`any`, `any`\>[]
|
|
56
|
+
|
|
57
|
+
The socket routes.
|
|
58
|
+
|
|
59
|
+
##### options?
|
|
60
|
+
|
|
61
|
+
[`IWebServerOptions`](IWebServerOptions.md)
|
|
42
62
|
|
|
43
63
|
Options for building the server.
|
|
44
64
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# Type Alias: HealthStatus
|
|
2
2
|
|
|
3
|
-
> **HealthStatus
|
|
3
|
+
> **HealthStatus** = *typeof* [`HealthStatus`](../variables/HealthStatus.md)\[keyof *typeof* [`HealthStatus`](../variables/HealthStatus.md)\]
|
|
4
4
|
|
|
5
5
|
The health status of the component.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@twin.org/api-models",
|
|
3
|
-
"version": "0.0.1
|
|
3
|
+
"version": "0.0.1",
|
|
4
4
|
"description": "Contains models and classes for use with APIs",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -14,18 +14,18 @@
|
|
|
14
14
|
"node": ">=20.0.0"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@twin.org/core": "
|
|
18
|
-
"@twin.org/nameof": "
|
|
19
|
-
"@twin.org/web": "
|
|
17
|
+
"@twin.org/core": "^0.0.1",
|
|
18
|
+
"@twin.org/nameof": "^0.0.1",
|
|
19
|
+
"@twin.org/web": "^0.0.1"
|
|
20
20
|
},
|
|
21
21
|
"main": "./dist/cjs/index.cjs",
|
|
22
22
|
"module": "./dist/esm/index.mjs",
|
|
23
23
|
"types": "./dist/types/index.d.ts",
|
|
24
24
|
"exports": {
|
|
25
25
|
".": {
|
|
26
|
+
"types": "./dist/types/index.d.ts",
|
|
26
27
|
"require": "./dist/cjs/index.cjs",
|
|
27
|
-
"import": "./dist/esm/index.mjs"
|
|
28
|
-
"types": "./dist/types/index.d.ts"
|
|
28
|
+
"import": "./dist/esm/index.mjs"
|
|
29
29
|
}
|
|
30
30
|
},
|
|
31
31
|
"files": [
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
# Interface: IRestRouteEntryPoint
|
|
2
|
-
|
|
3
|
-
Route entry points are used for exposing the REST routes from a package.
|
|
4
|
-
|
|
5
|
-
## Properties
|
|
6
|
-
|
|
7
|
-
### name
|
|
8
|
-
|
|
9
|
-
> **name**: `string`
|
|
10
|
-
|
|
11
|
-
The name of the REST routes.
|
|
12
|
-
|
|
13
|
-
***
|
|
14
|
-
|
|
15
|
-
### defaultBaseRoute
|
|
16
|
-
|
|
17
|
-
> **defaultBaseRoute**: `string`
|
|
18
|
-
|
|
19
|
-
The default base route name for the REST routes.
|
|
20
|
-
|
|
21
|
-
***
|
|
22
|
-
|
|
23
|
-
### tags
|
|
24
|
-
|
|
25
|
-
> **tags**: [`ITag`](ITag.md)[]
|
|
26
|
-
|
|
27
|
-
The tags for the REST routes.
|
|
28
|
-
|
|
29
|
-
***
|
|
30
|
-
|
|
31
|
-
### generateRoutes()
|
|
32
|
-
|
|
33
|
-
> **generateRoutes**: (`baseRouteName`, `componentName`) => [`IRestRoute`](IRestRoute.md)\<`any`, `any`\>[]
|
|
34
|
-
|
|
35
|
-
The method to generate the REST routes.
|
|
36
|
-
|
|
37
|
-
#### Parameters
|
|
38
|
-
|
|
39
|
-
• **baseRouteName**: `string`
|
|
40
|
-
|
|
41
|
-
• **componentName**: `string`
|
|
42
|
-
|
|
43
|
-
#### Returns
|
|
44
|
-
|
|
45
|
-
[`IRestRoute`](IRestRoute.md)\<`any`, `any`\>[]
|