@nestia/sdk 7.0.0-dev.20250606 → 7.0.0-dev.20250607
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/lib/analyses/TypedHttpRouteAnalyzer.js +12 -3
- package/lib/analyses/TypedHttpRouteAnalyzer.js.map +1 -1
- package/lib/analyses/TypedWebSocketRouteAnalyzer.js +4 -1
- package/lib/analyses/TypedWebSocketRouteAnalyzer.js.map +1 -1
- package/lib/generates/SdkGenerator.js +2 -1
- package/lib/generates/SdkGenerator.js.map +1 -1
- package/lib/generates/SwaggerGenerator.js +3 -3
- package/lib/generates/SwaggerGenerator.js.map +1 -1
- package/lib/generates/internal/E2eFileProgrammer.js +17 -22
- package/lib/generates/internal/E2eFileProgrammer.js.map +1 -1
- package/lib/generates/internal/SdkAliasCollection.d.ts +3 -1
- package/lib/generates/internal/SdkAliasCollection.js +23 -12
- package/lib/generates/internal/SdkAliasCollection.js.map +1 -1
- package/lib/generates/internal/SdkFileProgrammer.js +1 -1
- package/lib/generates/internal/SdkFileProgrammer.js.map +1 -1
- package/lib/generates/internal/SdkHttpCloneReferencer.js +2 -1
- package/lib/generates/internal/SdkHttpCloneReferencer.js.map +1 -1
- package/lib/generates/internal/SdkHttpFunctionProgrammer.d.ts +1 -6
- package/lib/generates/internal/SdkHttpFunctionProgrammer.js +33 -48
- package/lib/generates/internal/SdkHttpFunctionProgrammer.js.map +1 -1
- package/lib/generates/internal/SdkHttpNamespaceProgrammer.d.ts +1 -6
- package/lib/generates/internal/SdkHttpNamespaceProgrammer.js +46 -66
- package/lib/generates/internal/SdkHttpNamespaceProgrammer.js.map +1 -1
- package/lib/generates/internal/SdkHttpParameterProgrammer.d.ts +41 -0
- package/lib/generates/internal/SdkHttpParameterProgrammer.js +110 -0
- package/lib/generates/internal/SdkHttpParameterProgrammer.js.map +1 -0
- package/lib/generates/internal/SdkHttpRouteProgrammer.js +6 -18
- package/lib/generates/internal/SdkHttpRouteProgrammer.js.map +1 -1
- package/lib/generates/internal/SdkHttpSimulationProgrammer.d.ts +1 -6
- package/lib/generates/internal/SdkHttpSimulationProgrammer.js +23 -34
- package/lib/generates/internal/SdkHttpSimulationProgrammer.js.map +1 -1
- package/lib/generates/internal/SdkWebSocketNamespaceProgrammer.d.ts +2 -1
- package/lib/generates/internal/SdkWebSocketNamespaceProgrammer.js +33 -27
- package/lib/generates/internal/SdkWebSocketNamespaceProgrammer.js.map +1 -1
- package/lib/generates/internal/SdkWebSocketParameterProgrammer.d.ts +22 -0
- package/lib/generates/internal/SdkWebSocketParameterProgrammer.js +58 -0
- package/lib/generates/internal/SdkWebSocketParameterProgrammer.js.map +1 -0
- package/lib/generates/internal/SdkWebSocketRouteProgrammer.d.ts +2 -1
- package/lib/generates/internal/SdkWebSocketRouteProgrammer.js +65 -51
- package/lib/generates/internal/SdkWebSocketRouteProgrammer.js.map +1 -1
- package/lib/generates/internal/SwaggerOperationComposer.js +9 -6
- package/lib/generates/internal/SwaggerOperationComposer.js.map +1 -1
- package/lib/generates/internal/SwaggerOperationParameterComposer.d.ts +1 -1
- package/lib/generates/internal/SwaggerOperationParameterComposer.js.map +1 -1
- package/lib/structures/ITypedHttpRoute.d.ts +6 -1
- package/lib/structures/ITypedHttpRouteParameter.d.ts +2 -2
- package/lib/structures/ITypedWebSocketRoute.d.ts +5 -1
- package/package.json +5 -5
- package/src/analyses/TypedHttpRouteAnalyzer.ts +28 -10
- package/src/analyses/TypedWebSocketRouteAnalyzer.ts +15 -0
- package/src/generates/SdkGenerator.ts +2 -1
- package/src/generates/SwaggerGenerator.ts +5 -13
- package/src/generates/internal/E2eFileProgrammer.ts +34 -43
- package/src/generates/internal/SdkAliasCollection.ts +46 -17
- package/src/generates/internal/SdkFileProgrammer.ts +1 -1
- package/src/generates/internal/SdkHttpCloneReferencer.ts +5 -1
- package/src/generates/internal/SdkHttpFunctionProgrammer.ts +49 -109
- package/src/generates/internal/SdkHttpNamespaceProgrammer.ts +58 -118
- package/src/generates/internal/SdkHttpParameterProgrammer.ts +178 -0
- package/src/generates/internal/SdkHttpRouteProgrammer.ts +9 -21
- package/src/generates/internal/SdkHttpSimulationProgrammer.ts +23 -77
- package/src/generates/internal/SdkWebSocketNamespaceProgrammer.ts +214 -210
- package/src/generates/internal/SdkWebSocketParameterProgrammer.ts +87 -0
- package/src/generates/internal/SdkWebSocketRouteProgrammer.ts +112 -98
- package/src/generates/internal/SwaggerOperationComposer.ts +9 -9
- package/src/generates/internal/SwaggerOperationParameterComposer.ts +1 -1
- package/src/structures/ITypedHttpRoute.ts +12 -1
- package/src/structures/ITypedHttpRouteParameter.ts +2 -2
- package/src/structures/ITypedWebSocketRoute.ts +5 -1
|
@@ -2,22 +2,24 @@ import ts from "typescript";
|
|
|
2
2
|
import { IJsDocTagInfo } from "typia";
|
|
3
3
|
import { IdentifierFactory } from "typia/lib/factories/IdentifierFactory";
|
|
4
4
|
|
|
5
|
+
import { INestiaProject } from "../../structures/INestiaProject";
|
|
5
6
|
import { ITypedWebSocketRoute } from "../../structures/ITypedWebSocketRoute";
|
|
6
7
|
import { FilePrinter } from "./FilePrinter";
|
|
7
8
|
import { ImportDictionary } from "./ImportDictionary";
|
|
8
|
-
import { SdkAliasCollection } from "./SdkAliasCollection";
|
|
9
9
|
import { SdkImportWizard } from "./SdkImportWizard";
|
|
10
10
|
import { SdkWebSocketNamespaceProgrammer } from "./SdkWebSocketNamespaceProgrammer";
|
|
11
|
+
import { SdkWebSocketParameterProgrammer } from "./SdkWebSocketParameterProgrammer";
|
|
11
12
|
|
|
12
13
|
export namespace SdkWebSocketRouteProgrammer {
|
|
13
14
|
export const write =
|
|
15
|
+
(project: INestiaProject) =>
|
|
14
16
|
(importer: ImportDictionary) =>
|
|
15
17
|
(route: ITypedWebSocketRoute): ts.Statement[] => [
|
|
16
18
|
FilePrinter.description(
|
|
17
|
-
writeFunction(importer)(route),
|
|
19
|
+
writeFunction(project)(importer)(route),
|
|
18
20
|
writeDescription(route),
|
|
19
21
|
),
|
|
20
|
-
SdkWebSocketNamespaceProgrammer.write(importer)(route),
|
|
22
|
+
SdkWebSocketNamespaceProgrammer.write(project)(importer)(route),
|
|
21
23
|
];
|
|
22
24
|
|
|
23
25
|
const writeDescription = (route: ITypedWebSocketRoute): string => {
|
|
@@ -30,7 +32,7 @@ export namespace SdkWebSocketRouteProgrammer {
|
|
|
30
32
|
const tags: IJsDocTagInfo[] = route.jsDocTags.filter(
|
|
31
33
|
(tag) =>
|
|
32
34
|
tag.name !== "param" ||
|
|
33
|
-
route.
|
|
35
|
+
[...route.pathParameters, ...(route.query ? [route.query] : [])]
|
|
34
36
|
.filter((p) => p.category === "param" || p.category === "query")
|
|
35
37
|
.some((p) => p.name === tag.text?.[0]?.text),
|
|
36
38
|
);
|
|
@@ -54,9 +56,10 @@ export namespace SdkWebSocketRouteProgrammer {
|
|
|
54
56
|
};
|
|
55
57
|
|
|
56
58
|
const writeFunction =
|
|
59
|
+
(project: INestiaProject) =>
|
|
57
60
|
(importer: ImportDictionary) =>
|
|
58
|
-
(route: ITypedWebSocketRoute): ts.FunctionDeclaration =>
|
|
59
|
-
ts.factory.createFunctionDeclaration(
|
|
61
|
+
(route: ITypedWebSocketRoute): ts.FunctionDeclaration => {
|
|
62
|
+
return ts.factory.createFunctionDeclaration(
|
|
60
63
|
[
|
|
61
64
|
ts.factory.createModifier(ts.SyntaxKind.ExportKeyword),
|
|
62
65
|
ts.factory.createModifier(ts.SyntaxKind.AsyncKeyword),
|
|
@@ -72,125 +75,136 @@ export namespace SdkWebSocketRouteProgrammer {
|
|
|
72
75
|
[ts.factory.createTypeReferenceNode(`${route.name}.Header`)],
|
|
73
76
|
),
|
|
74
77
|
),
|
|
75
|
-
...
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
? SdkAliasCollection.name(p)
|
|
82
|
-
: ts.factory.createTypeReferenceNode(`${route.name}.Query`),
|
|
83
|
-
),
|
|
84
|
-
),
|
|
85
|
-
IdentifierFactory.parameter(
|
|
86
|
-
"provider",
|
|
87
|
-
ts.factory.createTypeReferenceNode(`${route.name}.Provider`),
|
|
88
|
-
),
|
|
78
|
+
...SdkWebSocketParameterProgrammer.getParameterDeclarations({
|
|
79
|
+
project,
|
|
80
|
+
route,
|
|
81
|
+
provider: true,
|
|
82
|
+
prefix: true,
|
|
83
|
+
}),
|
|
89
84
|
],
|
|
90
85
|
ts.factory.createTypeReferenceNode("Promise", [
|
|
91
|
-
ts.factory.createTypeReferenceNode(`${route.name}.
|
|
86
|
+
ts.factory.createTypeReferenceNode(`${route.name}.Output`),
|
|
92
87
|
]),
|
|
93
|
-
ts.factory.createBlock(
|
|
88
|
+
ts.factory.createBlock(
|
|
89
|
+
writeFunctionBody(project)(importer)(route),
|
|
90
|
+
true,
|
|
91
|
+
),
|
|
94
92
|
);
|
|
93
|
+
};
|
|
95
94
|
|
|
96
95
|
const writeFunctionBody =
|
|
96
|
+
(project: INestiaProject) =>
|
|
97
97
|
(importer: ImportDictionary) =>
|
|
98
|
-
(route: ITypedWebSocketRoute): ts.Statement[] =>
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
ts.factory.createTypeReferenceNode(`${route.name}.Listener`),
|
|
110
|
-
],
|
|
111
|
-
),
|
|
112
|
-
)(
|
|
113
|
-
ts.factory.createNewExpression(
|
|
114
|
-
ts.factory.createIdentifier(
|
|
98
|
+
(route: ITypedWebSocketRoute): ts.Statement[] => {
|
|
99
|
+
const access = (key: string) =>
|
|
100
|
+
project.config.keyword === true
|
|
101
|
+
? ts.factory.createPropertyAccessExpression(
|
|
102
|
+
ts.factory.createIdentifier("props"),
|
|
103
|
+
key,
|
|
104
|
+
)
|
|
105
|
+
: ts.factory.createIdentifier(key);
|
|
106
|
+
return [
|
|
107
|
+
local("connector")(
|
|
108
|
+
ts.factory.createTypeReferenceNode(
|
|
115
109
|
importer.external({
|
|
116
110
|
type: false,
|
|
117
111
|
library: "tgrid",
|
|
118
112
|
instance: "WebSocketConnector",
|
|
119
113
|
}),
|
|
114
|
+
[
|
|
115
|
+
ts.factory.createTypeReferenceNode(`${route.name}.Header`),
|
|
116
|
+
ts.factory.createTypeReferenceNode(`${route.name}.Provider`),
|
|
117
|
+
ts.factory.createTypeReferenceNode(`${route.name}.Listener`),
|
|
118
|
+
],
|
|
120
119
|
),
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
ts.factory.
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
ts.factory.createToken(ts.SyntaxKind.QuestionQuestionToken),
|
|
130
|
-
ts.factory.createObjectLiteralExpression([], false),
|
|
131
|
-
),
|
|
132
|
-
ts.factory.createKeywordTypeNode(ts.SyntaxKind.AnyKeyword),
|
|
133
|
-
),
|
|
134
|
-
ts.factory.createIdentifier("provider"),
|
|
135
|
-
],
|
|
136
|
-
),
|
|
137
|
-
),
|
|
138
|
-
ts.factory.createExpressionStatement(
|
|
139
|
-
ts.factory.createAwaitExpression(
|
|
140
|
-
ts.factory.createCallExpression(
|
|
141
|
-
ts.factory.createPropertyAccessExpression(
|
|
142
|
-
ts.factory.createIdentifier("connector"),
|
|
143
|
-
"connect",
|
|
120
|
+
)(
|
|
121
|
+
ts.factory.createNewExpression(
|
|
122
|
+
ts.factory.createIdentifier(
|
|
123
|
+
importer.external({
|
|
124
|
+
type: false,
|
|
125
|
+
library: "tgrid",
|
|
126
|
+
instance: "WebSocketConnector",
|
|
127
|
+
}),
|
|
144
128
|
),
|
|
145
129
|
undefined,
|
|
146
130
|
[
|
|
147
|
-
|
|
148
|
-
ts.factory.
|
|
131
|
+
ts.factory.createAsExpression(
|
|
132
|
+
ts.factory.createBinaryExpression(
|
|
149
133
|
ts.factory.createPropertyAccessExpression(
|
|
150
|
-
ts.factory.createIdentifier(
|
|
151
|
-
"
|
|
134
|
+
ts.factory.createIdentifier("connection"),
|
|
135
|
+
"headers",
|
|
152
136
|
),
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
.filter(
|
|
156
|
-
(p) => p.category === "param" || p.category === "query",
|
|
157
|
-
)
|
|
158
|
-
.map((x) => ts.factory.createIdentifier(x.name)),
|
|
137
|
+
ts.factory.createToken(ts.SyntaxKind.QuestionQuestionToken),
|
|
138
|
+
ts.factory.createObjectLiteralExpression([], false),
|
|
159
139
|
),
|
|
140
|
+
ts.factory.createKeywordTypeNode(ts.SyntaxKind.AnyKeyword),
|
|
160
141
|
),
|
|
142
|
+
access("provider"),
|
|
161
143
|
],
|
|
162
144
|
),
|
|
163
145
|
),
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
146
|
+
ts.factory.createExpressionStatement(
|
|
147
|
+
ts.factory.createAwaitExpression(
|
|
148
|
+
ts.factory.createCallExpression(
|
|
149
|
+
ts.factory.createPropertyAccessExpression(
|
|
150
|
+
ts.factory.createIdentifier("connector"),
|
|
151
|
+
"connect",
|
|
152
|
+
),
|
|
153
|
+
undefined,
|
|
154
|
+
[
|
|
155
|
+
joinPath(
|
|
156
|
+
ts.factory.createCallExpression(
|
|
157
|
+
ts.factory.createPropertyAccessExpression(
|
|
158
|
+
ts.factory.createIdentifier(route.name),
|
|
159
|
+
"path",
|
|
160
|
+
),
|
|
161
|
+
[],
|
|
162
|
+
project.config.keyword === true &&
|
|
163
|
+
SdkWebSocketParameterProgrammer.isPathEmpty(route) ===
|
|
164
|
+
false
|
|
165
|
+
? [ts.factory.createIdentifier("props")]
|
|
166
|
+
: SdkWebSocketParameterProgrammer.getEntries({
|
|
167
|
+
project,
|
|
168
|
+
route,
|
|
169
|
+
provider: false,
|
|
170
|
+
prefix: true,
|
|
171
|
+
}).map((p) => ts.factory.createIdentifier(p.key)),
|
|
172
|
+
),
|
|
173
|
+
),
|
|
174
|
+
],
|
|
175
|
+
),
|
|
176
|
+
),
|
|
173
177
|
),
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
178
|
+
local("driver")(
|
|
179
|
+
ts.factory.createTypeReferenceNode(
|
|
180
|
+
importer.external({
|
|
181
|
+
type: true,
|
|
182
|
+
library: "tgrid",
|
|
183
|
+
instance: "Driver",
|
|
184
|
+
}),
|
|
185
|
+
[ts.factory.createTypeReferenceNode(`${route.name}.Listener`)],
|
|
186
|
+
),
|
|
187
|
+
)(
|
|
188
|
+
ts.factory.createCallExpression(
|
|
189
|
+
ts.factory.createPropertyAccessExpression(
|
|
190
|
+
ts.factory.createIdentifier("connector"),
|
|
191
|
+
"getDriver",
|
|
192
|
+
),
|
|
193
|
+
undefined,
|
|
194
|
+
undefined,
|
|
179
195
|
),
|
|
180
|
-
undefined,
|
|
181
|
-
undefined,
|
|
182
196
|
),
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
197
|
+
ts.factory.createReturnStatement(
|
|
198
|
+
ts.factory.createObjectLiteralExpression(
|
|
199
|
+
[
|
|
200
|
+
ts.factory.createShorthandPropertyAssignment("connector"),
|
|
201
|
+
ts.factory.createShorthandPropertyAssignment("driver"),
|
|
202
|
+
],
|
|
203
|
+
true,
|
|
204
|
+
),
|
|
191
205
|
),
|
|
192
|
-
|
|
193
|
-
|
|
206
|
+
];
|
|
207
|
+
};
|
|
194
208
|
}
|
|
195
209
|
|
|
196
210
|
const local =
|
|
@@ -4,7 +4,6 @@ import { Metadata } from "typia/lib/schemas/metadata/Metadata";
|
|
|
4
4
|
import { INestiaConfig } from "../../INestiaConfig";
|
|
5
5
|
import { SecurityAnalyzer } from "../../analyses/SecurityAnalyzer";
|
|
6
6
|
import { ITypedHttpRoute } from "../../structures/ITypedHttpRoute";
|
|
7
|
-
import { ITypedHttpRouteParameter } from "../../structures/ITypedHttpRouteParameter";
|
|
8
7
|
import { SwaggerDescriptionComposer } from "./SwaggerDescriptionComposer";
|
|
9
8
|
import { SwaggerOperationParameterComposer } from "./SwaggerOperationParameterComposer";
|
|
10
9
|
import { SwaggerOperationResponseComposer } from "./SwaggerOperationResponseComposer";
|
|
@@ -16,10 +15,6 @@ export namespace SwaggerOperationComposer {
|
|
|
16
15
|
schema: (metadata: Metadata) => OpenApi.IJsonSchema | undefined;
|
|
17
16
|
route: ITypedHttpRoute;
|
|
18
17
|
}): OpenApi.IOperation => {
|
|
19
|
-
// FIND REQUEST BODY
|
|
20
|
-
const body: ITypedHttpRouteParameter.IBody | undefined =
|
|
21
|
-
props.route.parameters.find((param) => param.category === "body");
|
|
22
|
-
|
|
23
18
|
// COMPOSE TAGS
|
|
24
19
|
const tags: Set<string> = new Set([
|
|
25
20
|
...props.route.controller.tags,
|
|
@@ -88,7 +83,12 @@ export namespace SwaggerOperationComposer {
|
|
|
88
83
|
method: props.route.method as "GET",
|
|
89
84
|
path: props.route.path,
|
|
90
85
|
}),
|
|
91
|
-
parameters:
|
|
86
|
+
parameters: [
|
|
87
|
+
...props.route.pathParameters,
|
|
88
|
+
...props.route.queryParameters,
|
|
89
|
+
...(props.route.queryObject ? [props.route.queryObject] : []),
|
|
90
|
+
...(props.route.headerObject ? [props.route.headerObject] : []),
|
|
91
|
+
]
|
|
92
92
|
.map((p) =>
|
|
93
93
|
SwaggerOperationParameterComposer.compose({
|
|
94
94
|
config: props.config,
|
|
@@ -99,11 +99,11 @@ export namespace SwaggerOperationComposer {
|
|
|
99
99
|
}),
|
|
100
100
|
)
|
|
101
101
|
.flat(),
|
|
102
|
-
requestBody: body
|
|
102
|
+
requestBody: props.route.body
|
|
103
103
|
? SwaggerOperationParameterComposer.body({
|
|
104
|
-
schema: props.schema(body.metadata)!,
|
|
104
|
+
schema: props.schema(props.route.body.metadata)!,
|
|
105
105
|
jsDocTags: props.route.jsDocTags,
|
|
106
|
-
parameter: body,
|
|
106
|
+
parameter: props.route.body,
|
|
107
107
|
})
|
|
108
108
|
: undefined,
|
|
109
109
|
responses: SwaggerOperationResponseComposer.compose({
|
|
@@ -53,7 +53,7 @@ export namespace SwaggerOperationParameterComposer {
|
|
|
53
53
|
};
|
|
54
54
|
|
|
55
55
|
export const path = (
|
|
56
|
-
props: Omit<IProps<ITypedHttpRouteParameter.
|
|
56
|
+
props: Omit<IProps<ITypedHttpRouteParameter.IPath>, "config" | "document">,
|
|
57
57
|
): OpenApi.IOperation.IParameter => ({
|
|
58
58
|
name: props.parameter.field,
|
|
59
59
|
in: "path",
|
|
@@ -14,12 +14,23 @@ export interface ITypedHttpRoute {
|
|
|
14
14
|
method: string;
|
|
15
15
|
path: string;
|
|
16
16
|
accessor: string[];
|
|
17
|
-
|
|
17
|
+
|
|
18
|
+
// PARAMETERS
|
|
19
|
+
pathParameters: ITypedHttpRouteParameter.IPath[];
|
|
20
|
+
queryParameters: ITypedHttpRouteParameter.IQuery[];
|
|
21
|
+
headerParameters: ITypedHttpRouteParameter.IHeaders[];
|
|
22
|
+
queryObject: ITypedHttpRouteParameter.IQuery | null;
|
|
23
|
+
headerObject: ITypedHttpRouteParameter.IHeaders | null;
|
|
24
|
+
body: ITypedHttpRouteParameter.IBody | null;
|
|
25
|
+
|
|
26
|
+
// RESPONSES
|
|
18
27
|
success: ITypedHttpRouteSuccess;
|
|
19
28
|
exceptions: Record<
|
|
20
29
|
number | "2XX" | "3XX" | "4XX" | "5XX",
|
|
21
30
|
ITypedHttpRouteException
|
|
22
31
|
>;
|
|
32
|
+
|
|
33
|
+
// ADDITIONAL INFORMATION
|
|
23
34
|
security: Record<string, string[]>[];
|
|
24
35
|
tags: string[];
|
|
25
36
|
imports: IReflectTypeImport[];
|
|
@@ -6,7 +6,7 @@ import { IReflectType } from "./IReflectType";
|
|
|
6
6
|
export type ITypedHttpRouteParameter =
|
|
7
7
|
| ITypedHttpRouteParameter.IBody
|
|
8
8
|
| ITypedHttpRouteParameter.IHeaders
|
|
9
|
-
| ITypedHttpRouteParameter.
|
|
9
|
+
| ITypedHttpRouteParameter.IPath
|
|
10
10
|
| ITypedHttpRouteParameter.IQuery;
|
|
11
11
|
export namespace ITypedHttpRouteParameter {
|
|
12
12
|
export interface IBody extends IBase<"body"> {
|
|
@@ -20,7 +20,7 @@ export namespace ITypedHttpRouteParameter {
|
|
|
20
20
|
export interface IHeaders extends IBase<"headers"> {
|
|
21
21
|
field: string | null;
|
|
22
22
|
}
|
|
23
|
-
export interface
|
|
23
|
+
export interface IPath extends IBase<"param"> {
|
|
24
24
|
field: string;
|
|
25
25
|
}
|
|
26
26
|
export interface IQuery extends IBase<"query"> {
|
|
@@ -13,7 +13,11 @@ export interface ITypedWebSocketRoute {
|
|
|
13
13
|
accessor: string[];
|
|
14
14
|
function: Function;
|
|
15
15
|
versions: Array<string | typeof VERSION_NEUTRAL> | undefined;
|
|
16
|
-
|
|
16
|
+
acceptor: ITypedWebSocketRouteParameter.IAcceptor;
|
|
17
|
+
header: ITypedWebSocketRouteParameter.IHeader | null;
|
|
18
|
+
pathParameters: ITypedWebSocketRouteParameter.IParam[];
|
|
19
|
+
query: ITypedWebSocketRouteParameter.IQuery | null;
|
|
20
|
+
driver: ITypedWebSocketRouteParameter.IDriver | null;
|
|
17
21
|
imports: IReflectTypeImport[];
|
|
18
22
|
description: string | null;
|
|
19
23
|
jsDocTags: ts.JSDocTagInfo[];
|