@nestia/sdk 3.10.0 → 3.11.0-dev.20240813
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/NestiaSdkApplication.d.ts +1 -3
- package/lib/NestiaSdkApplication.js +138 -136
- package/lib/NestiaSdkApplication.js.map +1 -1
- package/lib/analyses/ConfigAnalyzer.d.ts +2 -2
- package/lib/analyses/ConfigAnalyzer.js +39 -80
- package/lib/analyses/ConfigAnalyzer.js.map +1 -1
- package/lib/analyses/ExceptionAnalyzer.d.ts +0 -16
- package/lib/analyses/ExceptionAnalyzer.js +142 -105
- package/lib/analyses/ExceptionAnalyzer.js.map +1 -1
- package/lib/analyses/GenericAnalyzer.d.ts +1 -2
- package/lib/analyses/GenericAnalyzer.js.map +1 -1
- package/lib/analyses/ImportAnalyzer.d.ts +6 -11
- package/lib/analyses/ImportAnalyzer.js +70 -42
- package/lib/analyses/ImportAnalyzer.js.map +1 -1
- package/lib/analyses/ReflectControllerAnalyzer.d.ts +7 -1
- package/lib/analyses/ReflectControllerAnalyzer.js +28 -99
- package/lib/analyses/ReflectControllerAnalyzer.js.map +1 -1
- package/lib/analyses/ReflectHttpOperationAnalyzer.d.ts +6 -2
- package/lib/analyses/ReflectHttpOperationAnalyzer.js +72 -152
- package/lib/analyses/ReflectHttpOperationAnalyzer.js.map +1 -1
- package/lib/analyses/ReflectHttpOperationParameterAnalyzer.d.ts +15 -0
- package/lib/analyses/ReflectHttpOperationParameterAnalyzer.js +215 -0
- package/lib/analyses/ReflectHttpOperationParameterAnalyzer.js.map +1 -0
- package/lib/analyses/ReflectHttpOperationResponseAnalyzer.d.ts +15 -0
- package/lib/analyses/ReflectHttpOperationResponseAnalyzer.js +81 -0
- package/lib/analyses/ReflectHttpOperationResponseAnalyzer.js.map +1 -0
- package/lib/analyses/ReflectMetadataAnalyzer.d.ts +1 -3
- package/lib/analyses/ReflectMetadataAnalyzer.js +0 -4
- package/lib/analyses/ReflectMetadataAnalyzer.js.map +1 -1
- package/lib/analyses/ReflectWebSocketOperationAnalyzer.d.ts +6 -2
- package/lib/analyses/ReflectWebSocketOperationAnalyzer.js +72 -48
- package/lib/analyses/ReflectWebSocketOperationAnalyzer.js.map +1 -1
- package/lib/analyses/TypedHttpRouteAnalyzer.d.ts +15 -0
- package/lib/analyses/TypedHttpRouteAnalyzer.js +111 -0
- package/lib/analyses/TypedHttpRouteAnalyzer.js.map +1 -0
- package/lib/analyses/TypedWebSocketRouteAnalyzer.d.ts +10 -0
- package/lib/analyses/TypedWebSocketRouteAnalyzer.js +9 -0
- package/lib/analyses/TypedWebSocketRouteAnalyzer.js.map +1 -0
- package/lib/decorators/OperationMetadata.d.ts +2 -0
- package/lib/decorators/OperationMetadata.js +10 -0
- package/lib/decorators/OperationMetadata.js.map +1 -0
- package/lib/executable/internal/NestiaConfigLoader.d.ts +1 -1
- package/lib/executable/internal/NestiaConfigLoader.js +34 -3
- package/lib/executable/internal/NestiaConfigLoader.js.map +1 -1
- package/lib/executable/internal/NestiaSdkCommand.js +1 -1
- package/lib/executable/internal/NestiaSdkCommand.js.map +1 -1
- package/lib/generates/CloneGenerator.d.ts +0 -5
- package/lib/generates/CloneGenerator.js +60 -60
- package/lib/generates/CloneGenerator.js.map +1 -1
- package/lib/generates/E2eGenerator.d.ts +2 -3
- package/lib/generates/E2eGenerator.js +9 -8
- package/lib/generates/E2eGenerator.js.map +1 -1
- package/lib/generates/OpenAiGenerator.d.ts +2 -4
- package/lib/generates/OpenAiGenerator.js +13 -3
- package/lib/generates/OpenAiGenerator.js.map +1 -1
- package/lib/generates/SdkGenerator.d.ts +4 -4
- package/lib/generates/SdkGenerator.js +63 -73
- package/lib/generates/SdkGenerator.js.map +1 -1
- package/lib/generates/SwaggerGenerator.d.ts +6 -18
- package/lib/generates/SwaggerGenerator.js +60 -235
- package/lib/generates/SwaggerGenerator.js.map +1 -1
- package/lib/generates/internal/E2eFileProgrammer.js +5 -9
- package/lib/generates/internal/E2eFileProgrammer.js.map +1 -1
- package/lib/generates/internal/SdkAliasCollection.d.ts +6 -4
- package/lib/generates/internal/SdkAliasCollection.js +33 -31
- package/lib/generates/internal/SdkAliasCollection.js.map +1 -1
- package/lib/generates/internal/SdkDistributionComposer.d.ts +4 -1
- package/lib/generates/internal/SdkDistributionComposer.js +6 -6
- package/lib/generates/internal/SdkDistributionComposer.js.map +1 -1
- package/lib/generates/internal/SdkFileProgrammer.d.ts +2 -4
- package/lib/generates/internal/SdkFileProgrammer.js +6 -6
- package/lib/generates/internal/SdkFileProgrammer.js.map +1 -1
- package/lib/generates/internal/SdkHttpCloneProgrammer.d.ts +0 -12
- package/lib/generates/internal/SdkHttpCloneProgrammer.js +142 -97
- package/lib/generates/internal/SdkHttpCloneProgrammer.js.map +1 -1
- package/lib/generates/internal/SdkHttpFunctionProgrammer.d.ts +4 -3
- package/lib/generates/internal/SdkHttpFunctionProgrammer.js +37 -59
- package/lib/generates/internal/SdkHttpFunctionProgrammer.js.map +1 -1
- package/lib/generates/internal/SdkHttpNamespaceProgrammer.d.ts +4 -3
- package/lib/generates/internal/SdkHttpNamespaceProgrammer.js +31 -48
- package/lib/generates/internal/SdkHttpNamespaceProgrammer.js.map +1 -1
- package/lib/generates/internal/SdkHttpRouteProgrammer.js +7 -3
- package/lib/generates/internal/SdkHttpRouteProgrammer.js.map +1 -1
- package/lib/generates/internal/SdkHttpSimulationProgrammer.d.ts +4 -3
- package/lib/generates/internal/SdkHttpSimulationProgrammer.js +7 -13
- package/lib/generates/internal/SdkHttpSimulationProgrammer.js.map +1 -1
- package/lib/generates/internal/SdkWebSocketNamespaceProgrammer.d.ts +1 -2
- package/lib/generates/internal/SdkWebSocketNamespaceProgrammer.js +11 -16
- package/lib/generates/internal/SdkWebSocketNamespaceProgrammer.js.map +1 -1
- package/lib/generates/internal/SdkWebSocketRouteProgrammer.d.ts +1 -2
- package/lib/generates/internal/SdkWebSocketRouteProgrammer.js +7 -10
- package/lib/generates/internal/SdkWebSocketRouteProgrammer.js.map +1 -1
- package/lib/generates/internal/SwaggerDescriptionComposer.d.ts +23 -0
- package/lib/generates/internal/SwaggerDescriptionComposer.js +44 -0
- package/lib/generates/internal/SwaggerDescriptionComposer.js.map +1 -0
- package/lib/generates/internal/SwaggerOperationComposer.d.ts +12 -0
- package/lib/generates/internal/SwaggerOperationComposer.js +68 -0
- package/lib/generates/internal/SwaggerOperationComposer.js.map +1 -0
- package/lib/generates/internal/SwaggerOperationParameterComposer.d.ts +18 -0
- package/lib/generates/internal/SwaggerOperationParameterComposer.js +99 -0
- package/lib/generates/internal/SwaggerOperationParameterComposer.js.map +1 -0
- package/lib/generates/internal/SwaggerOperationResponseComposer.d.ts +9 -0
- package/lib/generates/internal/SwaggerOperationResponseComposer.js +91 -0
- package/lib/generates/internal/SwaggerOperationResponseComposer.js.map +1 -0
- package/lib/structures/INestiaProject.d.ts +5 -5
- package/lib/structures/INestiaSdkInput.d.ts +20 -0
- package/lib/structures/{ISwaggerError.js → INestiaSdkInput.js} +1 -1
- package/lib/structures/INestiaSdkInput.js.map +1 -0
- package/lib/structures/IReflectApplication.d.ts +6 -0
- package/lib/structures/IReflectApplication.js +3 -0
- package/lib/structures/IReflectApplication.js.map +1 -0
- package/lib/structures/IReflectController.d.ts +3 -5
- package/lib/structures/IReflectHttpOperation.d.ts +13 -65
- package/lib/structures/IReflectHttpOperationException.d.ts +14 -0
- package/lib/structures/IReflectHttpOperationException.js +3 -0
- package/lib/structures/IReflectHttpOperationException.js.map +1 -0
- package/lib/structures/IReflectHttpOperationParameter.d.ts +35 -0
- package/lib/structures/IReflectHttpOperationParameter.js +3 -0
- package/lib/structures/IReflectHttpOperationParameter.js.map +1 -0
- package/lib/structures/IReflectHttpOperationSuccess.d.ts +15 -0
- package/lib/structures/IReflectHttpOperationSuccess.js +3 -0
- package/lib/structures/IReflectHttpOperationSuccess.js.map +1 -0
- package/lib/structures/IReflectOperationError.d.ts +16 -0
- package/lib/structures/IReflectOperationError.js +23 -0
- package/lib/structures/IReflectOperationError.js.map +1 -0
- package/lib/structures/IReflectType.d.ts +4 -0
- package/lib/structures/{IErrorReport.js → IReflectType.js} +1 -1
- package/lib/structures/IReflectType.js.map +1 -0
- package/lib/structures/IReflectTypeImport.d.ts +4 -0
- package/lib/structures/{ISwaggerLazySchema.js → IReflectTypeImport.js} +1 -1
- package/lib/structures/IReflectTypeImport.js.map +1 -0
- package/lib/structures/IReflectWebSocketOperation.d.ts +8 -9
- package/lib/structures/IReflectWebSocketOperationParameter.d.ts +23 -0
- package/lib/structures/IReflectWebSocketOperationParameter.js +3 -0
- package/lib/structures/IReflectWebSocketOperationParameter.js.map +1 -0
- package/lib/structures/ITypedApplication.d.ts +7 -0
- package/lib/structures/{INormalizedInput.js → ITypedApplication.js} +1 -1
- package/lib/structures/ITypedApplication.js.map +1 -0
- package/lib/structures/ITypedHttpRoute.d.ts +14 -42
- package/lib/structures/ITypedHttpRouteException.d.ts +10 -0
- package/lib/structures/ITypedHttpRouteException.js +3 -0
- package/lib/structures/ITypedHttpRouteException.js.map +1 -0
- package/lib/structures/ITypedHttpRouteParameter.d.ts +31 -0
- package/lib/structures/ITypedHttpRouteParameter.js +3 -0
- package/lib/structures/ITypedHttpRouteParameter.js.map +1 -0
- package/lib/structures/ITypedHttpRouteSuccess.d.ts +19 -0
- package/lib/structures/{ISwaggerLazyProperty.js → ITypedHttpRouteSuccess.js} +1 -1
- package/lib/structures/ITypedHttpRouteSuccess.js.map +1 -0
- package/lib/structures/ITypedWebSocketRoute.d.ts +8 -44
- package/lib/structures/ITypedWebSocketRouteParameter.d.ts +2 -0
- package/lib/structures/ITypedWebSocketRouteParameter.js +3 -0
- package/lib/structures/ITypedWebSocketRouteParameter.js.map +1 -0
- package/lib/transform.d.ts +3 -0
- package/lib/transform.js +8 -0
- package/lib/transform.js.map +1 -0
- package/lib/transformers/IOperationMetadata.d.ts +36 -0
- package/lib/transformers/IOperationMetadata.js +3 -0
- package/lib/transformers/IOperationMetadata.js.map +1 -0
- package/lib/transformers/ISdkTransformerContext.d.ts +7 -0
- package/lib/transformers/ISdkTransformerContext.js +3 -0
- package/lib/transformers/ISdkTransformerContext.js.map +1 -0
- package/lib/transformers/SdkMetadataProgrammer.d.ts +11 -0
- package/lib/transformers/SdkMetadataProgrammer.js +159 -0
- package/lib/transformers/SdkMetadataProgrammer.js.map +1 -0
- package/lib/transformers/SdkTransformer.d.ts +4 -0
- package/lib/transformers/SdkTransformer.js +88 -0
- package/lib/transformers/SdkTransformer.js.map +1 -0
- package/lib/transformers/TextPlainValidator.d.ts +4 -0
- package/lib/transformers/TextPlainValidator.js +19 -0
- package/lib/transformers/TextPlainValidator.js.map +1 -0
- package/lib/utils/StringUtil.d.ts +1 -0
- package/lib/utils/StringUtil.js +1 -0
- package/lib/utils/StringUtil.js.map +1 -1
- package/package.json +8 -8
- package/src/NestiaSdkApplication.ts +173 -160
- package/src/analyses/ConfigAnalyzer.ts +50 -98
- package/src/analyses/ExceptionAnalyzer.ts +142 -142
- package/src/analyses/GenericAnalyzer.ts +3 -5
- package/src/analyses/ImportAnalyzer.ts +130 -115
- package/src/analyses/ReflectControllerAnalyzer.ts +63 -115
- package/src/analyses/ReflectHttpOperationAnalyzer.ts +142 -278
- package/src/analyses/ReflectHttpOperationParameterAnalyzer.ts +319 -0
- package/src/analyses/ReflectHttpOperationResponseAnalyzer.ts +117 -0
- package/src/analyses/ReflectMetadataAnalyzer.ts +1 -18
- package/src/analyses/ReflectWebSocketOperationAnalyzer.ts +143 -78
- package/src/analyses/TypedHttpRouteAnalyzer.ts +178 -0
- package/src/analyses/TypedWebSocketRouteAnalyzer.ts +18 -0
- package/src/decorators/OperationMetadata.ts +15 -0
- package/src/executable/internal/NestiaConfigLoader.ts +18 -3
- package/src/executable/internal/NestiaSdkCommand.ts +1 -4
- package/src/generates/CloneGenerator.ts +60 -59
- package/src/generates/E2eGenerator.ts +20 -21
- package/src/generates/OpenAiGenerator.ts +44 -45
- package/src/generates/SdkGenerator.ts +97 -125
- package/src/generates/SwaggerGenerator.ts +114 -416
- package/src/generates/internal/E2eFileProgrammer.ts +5 -14
- package/src/generates/internal/SdkAliasCollection.ts +33 -41
- package/src/generates/internal/SdkDistributionComposer.ts +9 -6
- package/src/generates/internal/SdkFileProgrammer.ts +11 -14
- package/src/generates/internal/SdkHttpCloneProgrammer.ts +142 -142
- package/src/generates/internal/SdkHttpFunctionProgrammer.ts +20 -47
- package/src/generates/internal/SdkHttpNamespaceProgrammer.ts +245 -275
- package/src/generates/internal/SdkHttpRouteProgrammer.ts +7 -7
- package/src/generates/internal/SdkHttpSimulationProgrammer.ts +11 -23
- package/src/generates/internal/SdkWebSocketNamespaceProgrammer.ts +197 -233
- package/src/generates/internal/SdkWebSocketRouteProgrammer.ts +5 -15
- package/src/generates/internal/{SwaggerDescriptionGenerator.ts → SwaggerDescriptionComposer.ts} +25 -5
- package/src/generates/internal/SwaggerOperationComposer.ts +90 -0
- package/src/generates/internal/SwaggerOperationParameterComposer.ts +173 -0
- package/src/generates/internal/SwaggerOperationResponseComposer.ts +110 -0
- package/src/structures/INestiaProject.ts +5 -5
- package/src/structures/INestiaSdkInput.ts +25 -0
- package/src/structures/IReflectApplication.ts +8 -0
- package/src/structures/IReflectController.ts +3 -5
- package/src/structures/IReflectHttpOperation.ts +14 -76
- package/src/structures/IReflectHttpOperationException.ts +19 -0
- package/src/structures/IReflectHttpOperationParameter.ts +81 -0
- package/src/structures/IReflectHttpOperationSuccess.ts +22 -0
- package/src/structures/IReflectOperationError.ts +26 -0
- package/src/structures/IReflectType.ts +4 -0
- package/src/structures/IReflectTypeImport.ts +4 -0
- package/src/structures/IReflectWebSocketOperation.ts +9 -9
- package/src/structures/IReflectWebSocketOperationParameter.ts +38 -0
- package/src/structures/ITypedApplication.ts +8 -0
- package/src/structures/ITypedHttpRoute.ts +15 -45
- package/src/structures/ITypedHttpRouteException.ts +15 -0
- package/src/structures/ITypedHttpRouteParameter.ts +41 -0
- package/src/structures/ITypedHttpRouteSuccess.ts +22 -0
- package/src/structures/ITypedWebSocketRoute.ts +8 -56
- package/src/structures/ITypedWebSocketRouteParameter.ts +3 -0
- package/src/transform.ts +9 -0
- package/src/transformers/IOperationMetadata.ts +38 -0
- package/src/transformers/ISdkTransformerContext.ts +8 -0
- package/src/transformers/SdkMetadataProgrammer.ts +227 -0
- package/src/transformers/SdkTransformer.ts +168 -0
- package/src/transformers/TextPlainValidator.ts +17 -0
- package/src/utils/StringUtil.ts +3 -0
- package/lib/analyses/TypedControllerAnalyzer.d.ts +0 -8
- package/lib/analyses/TypedControllerAnalyzer.js +0 -77
- package/lib/analyses/TypedControllerAnalyzer.js.map +0 -1
- package/lib/analyses/TypedHttpOperationAnalyzer.d.ts +0 -15
- package/lib/analyses/TypedHttpOperationAnalyzer.js +0 -263
- package/lib/analyses/TypedHttpOperationAnalyzer.js.map +0 -1
- package/lib/analyses/TypedWebSocketOperationAnalyzer.d.ts +0 -15
- package/lib/analyses/TypedWebSocketOperationAnalyzer.js +0 -226
- package/lib/analyses/TypedWebSocketOperationAnalyzer.js.map +0 -1
- package/lib/generates/internal/SwaggerDescriptionGenerator.d.ts +0 -14
- package/lib/generates/internal/SwaggerDescriptionGenerator.js +0 -33
- package/lib/generates/internal/SwaggerDescriptionGenerator.js.map +0 -1
- package/lib/generates/internal/SwaggerSchemaGenerator.d.ts +0 -21
- package/lib/generates/internal/SwaggerSchemaGenerator.js +0 -289
- package/lib/generates/internal/SwaggerSchemaGenerator.js.map +0 -1
- package/lib/generates/internal/SwaggerSchemaValidator.d.ts +0 -7
- package/lib/generates/internal/SwaggerSchemaValidator.js +0 -191
- package/lib/generates/internal/SwaggerSchemaValidator.js.map +0 -1
- package/lib/structures/IErrorReport.d.ts +0 -6
- package/lib/structures/IErrorReport.js.map +0 -1
- package/lib/structures/INormalizedInput.d.ts +0 -19
- package/lib/structures/INormalizedInput.js.map +0 -1
- package/lib/structures/ISwaggerError.d.ts +0 -6
- package/lib/structures/ISwaggerError.js.map +0 -1
- package/lib/structures/ISwaggerLazyProperty.d.ts +0 -6
- package/lib/structures/ISwaggerLazyProperty.js.map +0 -1
- package/lib/structures/ISwaggerLazySchema.d.ts +0 -6
- package/lib/structures/ISwaggerLazySchema.js.map +0 -1
- package/lib/structures/ITypeTuple.d.ts +0 -5
- package/lib/structures/ITypeTuple.js +0 -3
- package/lib/structures/ITypeTuple.js.map +0 -1
- package/src/analyses/TypedControllerAnalyzer.ts +0 -92
- package/src/analyses/TypedHttpOperationAnalyzer.ts +0 -365
- package/src/analyses/TypedWebSocketOperationAnalyzer.ts +0 -375
- package/src/generates/internal/SwaggerSchemaGenerator.ts +0 -473
- package/src/generates/internal/SwaggerSchemaValidator.ts +0 -206
- package/src/structures/IErrorReport.ts +0 -6
- package/src/structures/INormalizedInput.ts +0 -20
- package/src/structures/ISwaggerError.ts +0 -8
- package/src/structures/ISwaggerLazyProperty.ts +0 -7
- package/src/structures/ISwaggerLazySchema.ts +0 -7
- package/src/structures/ITypeTuple.ts +0 -6
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { VERSION_NEUTRAL } from "@nestjs/common/interfaces";
|
|
2
|
-
import {
|
|
2
|
+
import { IJsDocTagInfo } from "typia";
|
|
3
|
+
import { IReflectHttpOperationException } from "./IReflectHttpOperationException";
|
|
4
|
+
import { IReflectHttpOperationParameter } from "./IReflectHttpOperationParameter";
|
|
5
|
+
import { IReflectHttpOperationSuccess } from "./IReflectHttpOperationSuccess";
|
|
6
|
+
import { IReflectTypeImport } from "./IReflectTypeImport";
|
|
3
7
|
export interface IReflectHttpOperation {
|
|
4
8
|
protocol: "http";
|
|
5
9
|
function: Function;
|
|
@@ -7,69 +11,13 @@ export interface IReflectHttpOperation {
|
|
|
7
11
|
method: string;
|
|
8
12
|
paths: string[];
|
|
9
13
|
versions: Array<string | typeof VERSION_NEUTRAL> | undefined;
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
type?: string;
|
|
14
|
-
contentType: "application/json" | "text/plain";
|
|
14
|
+
parameters: IReflectHttpOperationParameter[];
|
|
15
|
+
success: IReflectHttpOperationSuccess;
|
|
16
|
+
exceptions: Record<number | "2XX" | "3XX" | "4XX" | "5XX", IReflectHttpOperationException>;
|
|
15
17
|
security: Record<string, string[]>[];
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
export declare namespace IReflectHttpOperation {
|
|
22
|
-
type IParameter = ICommonParameter | IQueryParameter | IHeadersParameter | IBodyParameter | IPathParameter;
|
|
23
|
-
interface ICommonParameter {
|
|
24
|
-
custom: false;
|
|
25
|
-
category: ParamCategory;
|
|
26
|
-
index: number;
|
|
27
|
-
name: string;
|
|
28
|
-
field: string | undefined;
|
|
29
|
-
example?: any;
|
|
30
|
-
examples?: Record<string, any>;
|
|
31
|
-
}
|
|
32
|
-
interface IHeadersParameter {
|
|
33
|
-
custom: true;
|
|
34
|
-
category: "headers";
|
|
35
|
-
index: number;
|
|
36
|
-
name: string;
|
|
37
|
-
field: string | undefined;
|
|
38
|
-
example?: any;
|
|
39
|
-
examples?: Record<string, any>;
|
|
40
|
-
}
|
|
41
|
-
interface IQueryParameter {
|
|
42
|
-
custom: true;
|
|
43
|
-
category: "query";
|
|
44
|
-
index: number;
|
|
45
|
-
name: string;
|
|
46
|
-
field: string | undefined;
|
|
47
|
-
example?: any;
|
|
48
|
-
examples?: Record<string, any>;
|
|
49
|
-
}
|
|
50
|
-
interface IBodyParameter {
|
|
51
|
-
custom: true;
|
|
52
|
-
category: "body";
|
|
53
|
-
index: number;
|
|
54
|
-
name: string;
|
|
55
|
-
field: string | undefined;
|
|
56
|
-
encrypted: boolean;
|
|
57
|
-
contentType: "application/json" | "application/x-www-form-urlencoded" | "multipart/form-data" | "text/plain";
|
|
58
|
-
example?: any;
|
|
59
|
-
examples?: Record<string, any>;
|
|
60
|
-
}
|
|
61
|
-
interface IPathParameter {
|
|
62
|
-
custom: true;
|
|
63
|
-
category: "param";
|
|
64
|
-
index: number;
|
|
65
|
-
name: string;
|
|
66
|
-
field: string | undefined;
|
|
67
|
-
example?: any;
|
|
68
|
-
examples?: Record<string, any>;
|
|
69
|
-
}
|
|
70
|
-
interface IException {
|
|
71
|
-
type: string;
|
|
72
|
-
status: number | "2XX" | "3XX" | "4XX" | "5XX";
|
|
73
|
-
description: string | undefined;
|
|
74
|
-
}
|
|
18
|
+
tags: string[];
|
|
19
|
+
imports: IReflectTypeImport[];
|
|
20
|
+
operationId: string | undefined;
|
|
21
|
+
description: string | null;
|
|
22
|
+
jsDocTags: IJsDocTagInfo[];
|
|
75
23
|
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { MetadataFactory } from "typia/lib/factories/MetadataFactory";
|
|
2
|
+
import { IMetadata } from "typia/lib/schemas/metadata/IMetadata";
|
|
3
|
+
import { IMetadataComponents } from "typia/lib/schemas/metadata/IMetadataComponents";
|
|
4
|
+
import { IReflectType } from "./IReflectType";
|
|
5
|
+
export interface IReflectHttpOperationException {
|
|
6
|
+
status: number | "2XX" | "3XX" | "4XX" | "5XX";
|
|
7
|
+
description: string | null;
|
|
8
|
+
example: any;
|
|
9
|
+
examples: Record<string, any>;
|
|
10
|
+
type: IReflectType;
|
|
11
|
+
metadata: IMetadata;
|
|
12
|
+
components: IMetadataComponents;
|
|
13
|
+
validate: MetadataFactory.Validator;
|
|
14
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IReflectHttpOperationException.js","sourceRoot":"","sources":["../../src/structures/IReflectHttpOperationException.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { IJsDocTagInfo } from "typia";
|
|
2
|
+
import { MetadataFactory } from "typia/lib/factories/MetadataFactory";
|
|
3
|
+
import { IMetadata } from "typia/lib/schemas/metadata/IMetadata";
|
|
4
|
+
import { IMetadataComponents } from "typia/lib/schemas/metadata/IMetadataComponents";
|
|
5
|
+
import { IReflectType } from "./IReflectType";
|
|
6
|
+
export type IReflectHttpOperationParameter = IReflectHttpOperationParameter.IBody | IReflectHttpOperationParameter.IHeaders | IReflectHttpOperationParameter.IParam | IReflectHttpOperationParameter.IQuery;
|
|
7
|
+
export declare namespace IReflectHttpOperationParameter {
|
|
8
|
+
export interface IBody extends IBase<"body"> {
|
|
9
|
+
contentType: "application/json" | "application/x-www-form-urlencoded" | "multipart/form-data" | "text/plain";
|
|
10
|
+
encrypted: boolean;
|
|
11
|
+
}
|
|
12
|
+
export interface IHeaders extends IBase<"headers"> {
|
|
13
|
+
field: string | null;
|
|
14
|
+
}
|
|
15
|
+
export interface IParam extends IBase<"param"> {
|
|
16
|
+
field: string;
|
|
17
|
+
}
|
|
18
|
+
export interface IQuery extends IBase<"query"> {
|
|
19
|
+
field: string | null;
|
|
20
|
+
}
|
|
21
|
+
interface IBase<Category extends string> {
|
|
22
|
+
category: Category;
|
|
23
|
+
name: string;
|
|
24
|
+
index: number;
|
|
25
|
+
type: IReflectType;
|
|
26
|
+
metadata: IMetadata;
|
|
27
|
+
components: IMetadataComponents;
|
|
28
|
+
validate: MetadataFactory.Validator;
|
|
29
|
+
example?: any;
|
|
30
|
+
examples?: Record<string, any>;
|
|
31
|
+
description: string | null;
|
|
32
|
+
jsDocTags: IJsDocTagInfo[];
|
|
33
|
+
}
|
|
34
|
+
export {};
|
|
35
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IReflectHttpOperationParameter.js","sourceRoot":"","sources":["../../src/structures/IReflectHttpOperationParameter.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { MetadataFactory } from "typia/lib/factories/MetadataFactory";
|
|
2
|
+
import { IMetadata } from "typia/lib/schemas/metadata/IMetadata";
|
|
3
|
+
import { IMetadataComponents } from "typia/lib/schemas/metadata/IMetadataComponents";
|
|
4
|
+
import { IReflectType } from "./IReflectType";
|
|
5
|
+
export interface IReflectHttpOperationSuccess {
|
|
6
|
+
type: IReflectType;
|
|
7
|
+
status: number;
|
|
8
|
+
contentType: "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "application/json" | null;
|
|
9
|
+
encrypted: boolean;
|
|
10
|
+
components: IMetadataComponents;
|
|
11
|
+
metadata: IMetadata;
|
|
12
|
+
validate: MetadataFactory.Validator;
|
|
13
|
+
example?: any;
|
|
14
|
+
examples?: Record<string, any>;
|
|
15
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IReflectHttpOperationSuccess.js","sourceRoot":"","sources":["../../src/structures/IReflectHttpOperationSuccess.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { IComparable } from "tstl";
|
|
2
|
+
import { IOperationMetadata } from "../transformers/IOperationMetadata";
|
|
3
|
+
export interface IReflectOperationError {
|
|
4
|
+
file: string;
|
|
5
|
+
class: string;
|
|
6
|
+
function: string | null;
|
|
7
|
+
from: string | null;
|
|
8
|
+
contents: Array<string | IOperationMetadata.IError>;
|
|
9
|
+
}
|
|
10
|
+
export declare namespace IReflectOperationError {
|
|
11
|
+
class Key implements Pick<IComparable<Key>, "less"> {
|
|
12
|
+
readonly error: IReflectOperationError;
|
|
13
|
+
constructor(error: IReflectOperationError);
|
|
14
|
+
less(obj: Key): boolean;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.IReflectOperationError = void 0;
|
|
4
|
+
var IReflectOperationError;
|
|
5
|
+
(function (IReflectOperationError) {
|
|
6
|
+
class Key {
|
|
7
|
+
constructor(error) {
|
|
8
|
+
this.error = error;
|
|
9
|
+
}
|
|
10
|
+
less(obj) {
|
|
11
|
+
var _a, _b, _c, _d;
|
|
12
|
+
if (this.error.file !== obj.error.file)
|
|
13
|
+
return this.error.file < obj.error.file;
|
|
14
|
+
else if (this.error.class !== obj.error.class)
|
|
15
|
+
return this.error.class < obj.error.class;
|
|
16
|
+
else if (this.error.function !== obj.error.function)
|
|
17
|
+
return ((_a = this.error.function) !== null && _a !== void 0 ? _a : "") < ((_b = obj.error.function) !== null && _b !== void 0 ? _b : "");
|
|
18
|
+
return ((_c = this.error.from) !== null && _c !== void 0 ? _c : "") < ((_d = obj.error.from) !== null && _d !== void 0 ? _d : "");
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
IReflectOperationError.Key = Key;
|
|
22
|
+
})(IReflectOperationError || (exports.IReflectOperationError = IReflectOperationError = {}));
|
|
23
|
+
//# sourceMappingURL=IReflectOperationError.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IReflectOperationError.js","sourceRoot":"","sources":["../../src/structures/IReflectOperationError.ts"],"names":[],"mappings":";;;AAWA,IAAiB,sBAAsB,CActC;AAdD,WAAiB,sBAAsB;IACrC,MAAa,GAAG;QACd,YAAmC,KAA6B;YAA7B,UAAK,GAAL,KAAK,CAAwB;QAAG,CAAC;QAE7D,IAAI,CAAC,GAAQ;;YAClB,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,KAAK,GAAG,CAAC,KAAK,CAAC,IAAI;gBACpC,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC;iBACrC,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,KAAK,GAAG,CAAC,KAAK,CAAC,KAAK;gBAC3C,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC;iBACvC,IAAI,IAAI,CAAC,KAAK,CAAC,QAAQ,KAAK,GAAG,CAAC,KAAK,CAAC,QAAQ;gBACjD,OAAO,CAAC,MAAA,IAAI,CAAC,KAAK,CAAC,QAAQ,mCAAI,EAAE,CAAC,GAAG,CAAC,MAAA,GAAG,CAAC,KAAK,CAAC,QAAQ,mCAAI,EAAE,CAAC,CAAC;YAClE,OAAO,CAAC,MAAA,IAAI,CAAC,KAAK,CAAC,IAAI,mCAAI,EAAE,CAAC,GAAG,CAAC,MAAA,GAAG,CAAC,KAAK,CAAC,IAAI,mCAAI,EAAE,CAAC,CAAC;QAC1D,CAAC;KACF;IAZY,0BAAG,MAYf,CAAA;AACH,CAAC,EAdgB,sBAAsB,sCAAtB,sBAAsB,QActC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IReflectType.js","sourceRoot":"","sources":["../../src/structures/IReflectType.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IReflectTypeImport.js","sourceRoot":"","sources":["../../src/structures/IReflectTypeImport.ts"],"names":[],"mappings":""}
|
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
import { VERSION_NEUTRAL } from "@nestjs/common";
|
|
2
|
+
import ts from "typescript";
|
|
3
|
+
import { IReflectTypeImport } from "./IReflectTypeImport";
|
|
4
|
+
import { IReflectWebSocketOperationParameter } from "./IReflectWebSocketOperationParameter";
|
|
2
5
|
export interface IReflectWebSocketOperation {
|
|
3
6
|
protocol: "websocket";
|
|
4
|
-
target: Function;
|
|
5
7
|
name: string;
|
|
6
8
|
paths: string[];
|
|
9
|
+
function: Function;
|
|
7
10
|
versions: Array<string | typeof VERSION_NEUTRAL> | undefined;
|
|
8
|
-
parameters:
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
category: "acceptor" | "driver" | "header" | "param" | "query";
|
|
13
|
-
field: string;
|
|
14
|
-
index: number;
|
|
15
|
-
}
|
|
11
|
+
parameters: IReflectWebSocketOperationParameter[];
|
|
12
|
+
imports: IReflectTypeImport[];
|
|
13
|
+
description: string | null;
|
|
14
|
+
jsDocTags: ts.JSDocTagInfo[];
|
|
16
15
|
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { IJsDocTagInfo } from "typia";
|
|
2
|
+
import { IReflectType } from "./IReflectType";
|
|
3
|
+
import { IReflectTypeImport } from "./IReflectTypeImport";
|
|
4
|
+
export type IReflectWebSocketOperationParameter = IReflectWebSocketOperationParameter.IAcceptor | IReflectWebSocketOperationParameter.IDriver | IReflectWebSocketOperationParameter.IHeader | IReflectWebSocketOperationParameter.IParam | IReflectWebSocketOperationParameter.IQuery;
|
|
5
|
+
export declare namespace IReflectWebSocketOperationParameter {
|
|
6
|
+
export type IAcceptor = IBase<"acceptor">;
|
|
7
|
+
export type IDriver = IBase<"driver">;
|
|
8
|
+
export type IHeader = IBase<"header">;
|
|
9
|
+
export type IQuery = IBase<"query">;
|
|
10
|
+
export interface IParam extends IBase<"param"> {
|
|
11
|
+
field: string;
|
|
12
|
+
}
|
|
13
|
+
interface IBase<Category extends string> {
|
|
14
|
+
category: Category;
|
|
15
|
+
name: string;
|
|
16
|
+
index: number;
|
|
17
|
+
type: IReflectType;
|
|
18
|
+
imports: IReflectTypeImport[];
|
|
19
|
+
description: string | null;
|
|
20
|
+
jsDocTags: IJsDocTagInfo[];
|
|
21
|
+
}
|
|
22
|
+
export {};
|
|
23
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IReflectWebSocketOperationParameter.js","sourceRoot":"","sources":["../../src/structures/IReflectWebSocketOperationParameter.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { INestiaProject } from "./INestiaProject";
|
|
2
|
+
import { ITypedHttpRoute } from "./ITypedHttpRoute";
|
|
3
|
+
import { ITypedWebSocketRoute } from "./ITypedWebSocketRoute";
|
|
4
|
+
export interface ITypedApplication {
|
|
5
|
+
project: INestiaProject;
|
|
6
|
+
routes: Array<ITypedHttpRoute | ITypedWebSocketRoute>;
|
|
7
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ITypedApplication.js","sourceRoot":"","sources":["../../src/structures/ITypedApplication.ts"],"names":[],"mappings":""}
|
|
@@ -1,52 +1,24 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { Metadata } from "typia/lib/schemas/metadata/Metadata";
|
|
1
|
+
import { IJsDocTagInfo } from "typia";
|
|
3
2
|
import { IReflectController } from "./IReflectController";
|
|
4
|
-
import {
|
|
3
|
+
import { IReflectTypeImport } from "./IReflectTypeImport";
|
|
4
|
+
import { ITypedHttpRouteException } from "./ITypedHttpRouteException";
|
|
5
|
+
import { ITypedHttpRouteParameter } from "./ITypedHttpRouteParameter";
|
|
6
|
+
import { ITypedHttpRouteSuccess } from "./ITypedHttpRouteSuccess";
|
|
5
7
|
export interface ITypedHttpRoute {
|
|
6
8
|
protocol: "http";
|
|
7
|
-
controller: IReflectController;
|
|
8
9
|
function: Function;
|
|
10
|
+
controller: IReflectController;
|
|
9
11
|
name: string;
|
|
10
12
|
method: string;
|
|
11
13
|
path: string;
|
|
12
|
-
encrypted: boolean;
|
|
13
|
-
status?: number;
|
|
14
14
|
accessors: string[];
|
|
15
|
-
parameters:
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
location: string;
|
|
19
|
-
description?: string;
|
|
20
|
-
operationId?: string;
|
|
21
|
-
jsDocTags: ts.JSDocTagInfo[];
|
|
22
|
-
setHeaders: Array<{
|
|
23
|
-
type: "setter";
|
|
24
|
-
source: string;
|
|
25
|
-
target?: string;
|
|
26
|
-
} | {
|
|
27
|
-
type: "assigner";
|
|
28
|
-
source: string;
|
|
29
|
-
}>;
|
|
15
|
+
parameters: ITypedHttpRouteParameter[];
|
|
16
|
+
success: ITypedHttpRouteSuccess;
|
|
17
|
+
exceptions: Record<number | "2XX" | "3XX" | "4XX" | "5XX", ITypedHttpRouteException>;
|
|
30
18
|
security: Record<string, string[]>[];
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
export declare namespace ITypedHttpRoute {
|
|
37
|
-
type IParameter = IReflectHttpOperation.IParameter & {
|
|
38
|
-
optional: boolean;
|
|
39
|
-
type: ts.Type;
|
|
40
|
-
typeName: string;
|
|
41
|
-
metadata?: Metadata;
|
|
42
|
-
description?: string;
|
|
43
|
-
jsDocTags: ts.JSDocTagInfo[];
|
|
44
|
-
};
|
|
45
|
-
interface IOutput {
|
|
46
|
-
type: ts.Type;
|
|
47
|
-
typeName: string;
|
|
48
|
-
metadata?: Metadata;
|
|
49
|
-
description?: string;
|
|
50
|
-
contentType: "application/x-www-form-urlencoded" | "application/json" | "text/plain";
|
|
51
|
-
}
|
|
19
|
+
tags: string[];
|
|
20
|
+
imports: IReflectTypeImport[];
|
|
21
|
+
description: string | null;
|
|
22
|
+
jsDocTags: IJsDocTagInfo[];
|
|
23
|
+
operationId: string | undefined;
|
|
52
24
|
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Metadata } from "typia/lib/schemas/metadata/Metadata";
|
|
2
|
+
import { IReflectType } from "./IReflectType";
|
|
3
|
+
export interface ITypedHttpRouteException {
|
|
4
|
+
status: number | "2XX" | "3XX" | "4XX" | "5XX";
|
|
5
|
+
description: string | null;
|
|
6
|
+
example: any;
|
|
7
|
+
examples: Record<string, any>;
|
|
8
|
+
type: IReflectType;
|
|
9
|
+
metadata: Metadata;
|
|
10
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ITypedHttpRouteException.js","sourceRoot":"","sources":["../../src/structures/ITypedHttpRouteException.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { IJsDocTagInfo } from "typia";
|
|
2
|
+
import { Metadata } from "typia/lib/schemas/metadata/Metadata";
|
|
3
|
+
import { IReflectType } from "./IReflectType";
|
|
4
|
+
export type ITypedHttpRouteParameter = ITypedHttpRouteParameter.IBody | ITypedHttpRouteParameter.IHeaders | ITypedHttpRouteParameter.IParam | ITypedHttpRouteParameter.IQuery;
|
|
5
|
+
export declare namespace ITypedHttpRouteParameter {
|
|
6
|
+
export interface IBody extends IBase<"body"> {
|
|
7
|
+
contentType: "application/json" | "application/x-www-form-urlencoded" | "multipart/form-data" | "text/plain";
|
|
8
|
+
encrypted: boolean;
|
|
9
|
+
}
|
|
10
|
+
export interface IHeaders extends IBase<"headers"> {
|
|
11
|
+
field: string | null;
|
|
12
|
+
}
|
|
13
|
+
export interface IParam extends IBase<"param"> {
|
|
14
|
+
field: string;
|
|
15
|
+
}
|
|
16
|
+
export interface IQuery extends IBase<"query"> {
|
|
17
|
+
field: string | null;
|
|
18
|
+
}
|
|
19
|
+
interface IBase<Category extends string> {
|
|
20
|
+
category: Category;
|
|
21
|
+
name: string;
|
|
22
|
+
index: number;
|
|
23
|
+
type: IReflectType;
|
|
24
|
+
metadata: Metadata;
|
|
25
|
+
example?: any;
|
|
26
|
+
examples?: Record<string, any>;
|
|
27
|
+
description: string | null;
|
|
28
|
+
jsDocTags: IJsDocTagInfo[];
|
|
29
|
+
}
|
|
30
|
+
export {};
|
|
31
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ITypedHttpRouteParameter.js","sourceRoot":"","sources":["../../src/structures/ITypedHttpRouteParameter.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Metadata } from "typia/lib/schemas/metadata/Metadata";
|
|
2
|
+
import { IReflectType } from "./IReflectType";
|
|
3
|
+
export interface ITypedHttpRouteSuccess {
|
|
4
|
+
type: IReflectType;
|
|
5
|
+
status: number | null;
|
|
6
|
+
contentType: "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "application/json" | null;
|
|
7
|
+
encrypted: boolean;
|
|
8
|
+
metadata: Metadata;
|
|
9
|
+
example?: any;
|
|
10
|
+
examples?: Record<string, any>;
|
|
11
|
+
setHeaders: Array<{
|
|
12
|
+
type: "setter";
|
|
13
|
+
source: string;
|
|
14
|
+
target?: string;
|
|
15
|
+
} | {
|
|
16
|
+
type: "assigner";
|
|
17
|
+
source: string;
|
|
18
|
+
}>;
|
|
19
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ITypedHttpRouteSuccess.js","sourceRoot":"","sources":["../../src/structures/ITypedHttpRouteSuccess.ts"],"names":[],"mappings":""}
|
|
@@ -1,54 +1,18 @@
|
|
|
1
|
+
import { VERSION_NEUTRAL } from "@nestjs/common";
|
|
1
2
|
import ts from "typescript";
|
|
2
|
-
import { Metadata } from "typia/lib/schemas/metadata/Metadata";
|
|
3
3
|
import { IReflectController } from "./IReflectController";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { IReflectTypeImport } from "./IReflectTypeImport";
|
|
5
|
+
import { ITypedWebSocketRouteParameter } from "./ITypedWebSocketRouteParameter";
|
|
6
6
|
export interface ITypedWebSocketRoute {
|
|
7
7
|
protocol: "websocket";
|
|
8
8
|
controller: IReflectController;
|
|
9
9
|
name: string;
|
|
10
10
|
path: string;
|
|
11
11
|
accessors: string[];
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
function: Function;
|
|
13
|
+
versions: Array<string | typeof VERSION_NEUTRAL> | undefined;
|
|
14
|
+
parameters: ITypedWebSocketRouteParameter[];
|
|
15
|
+
imports: IReflectTypeImport[];
|
|
16
|
+
description: string | null;
|
|
16
17
|
jsDocTags: ts.JSDocTagInfo[];
|
|
17
18
|
}
|
|
18
|
-
export declare namespace ITypedWebSocketRoute {
|
|
19
|
-
type IParameter = IAcceptorParameter | IDriverParameter | IHeaderParameter | IPathParameter | IQueryParameter;
|
|
20
|
-
interface IAcceptorParameter extends Omit<IReflectWebSocketOperation.IParameter, "category"> {
|
|
21
|
-
category: "acceptor";
|
|
22
|
-
name: string;
|
|
23
|
-
header: ITypeTuple;
|
|
24
|
-
provider: ITypeTuple;
|
|
25
|
-
listener: ITypeTuple;
|
|
26
|
-
}
|
|
27
|
-
interface IDriverParameter extends Omit<IReflectWebSocketOperation.IParameter, "category"> {
|
|
28
|
-
category: "driver";
|
|
29
|
-
name: string;
|
|
30
|
-
type: ts.Type;
|
|
31
|
-
typeName: string;
|
|
32
|
-
}
|
|
33
|
-
interface IHeaderParameter extends Omit<IReflectWebSocketOperation.IParameter, "header"> {
|
|
34
|
-
category: "header";
|
|
35
|
-
name: string;
|
|
36
|
-
type: ts.Type;
|
|
37
|
-
typeName: string;
|
|
38
|
-
metadata?: Metadata;
|
|
39
|
-
}
|
|
40
|
-
interface IPathParameter extends Omit<IReflectWebSocketOperation.IParameter, "path"> {
|
|
41
|
-
category: "param";
|
|
42
|
-
name: string;
|
|
43
|
-
type: ts.Type;
|
|
44
|
-
typeName: string;
|
|
45
|
-
metadata?: Metadata;
|
|
46
|
-
}
|
|
47
|
-
interface IQueryParameter extends Omit<IReflectWebSocketOperation.IParameter, "query"> {
|
|
48
|
-
category: "query";
|
|
49
|
-
name: string;
|
|
50
|
-
type: ts.Type;
|
|
51
|
-
typeName: string;
|
|
52
|
-
metadata?: Metadata;
|
|
53
|
-
}
|
|
54
|
-
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ITypedWebSocketRouteParameter.js","sourceRoot":"","sources":["../../src/structures/ITypedWebSocketRouteParameter.ts"],"names":[],"mappings":""}
|
package/lib/transform.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.transform = void 0;
|
|
4
|
+
const SdkTransformer_1 = require("./transformers/SdkTransformer");
|
|
5
|
+
const transform = (program) => SdkTransformer_1.SdkTransformer.transformFile(program.getTypeChecker());
|
|
6
|
+
exports.transform = transform;
|
|
7
|
+
exports.default = exports.transform;
|
|
8
|
+
//# sourceMappingURL=transform.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transform.js","sourceRoot":"","sources":["../src/transform.ts"],"names":[],"mappings":";;;AAEA,kEAA+D;AAExD,MAAM,SAAS,GAAG,CACvB,OAAmB,EACmB,EAAE,CACxC,+BAAc,CAAC,aAAa,CAAC,OAAO,CAAC,cAAc,EAAE,CAAC,CAAC;AAH5C,QAAA,SAAS,aAGmC;AACzD,kBAAe,iBAAS,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { IJsDocTagInfo } from "typia";
|
|
2
|
+
import { IMetadata } from "typia/lib/schemas/metadata/IMetadata";
|
|
3
|
+
import { IMetadataComponents } from "typia/lib/schemas/metadata/IMetadataComponents";
|
|
4
|
+
import { ValidationPipe } from "typia/lib/typings/ValidationPipe";
|
|
5
|
+
import { IReflectType } from "../structures/IReflectType";
|
|
6
|
+
import { IReflectTypeImport } from "../structures/IReflectTypeImport";
|
|
7
|
+
export interface IOperationMetadata {
|
|
8
|
+
parameters: IOperationMetadata.IParameter[];
|
|
9
|
+
success: IOperationMetadata.IResponse;
|
|
10
|
+
exceptions: Record<string, IOperationMetadata.IResponse>;
|
|
11
|
+
description: string | null;
|
|
12
|
+
jsDocTags: IJsDocTagInfo[];
|
|
13
|
+
}
|
|
14
|
+
export declare namespace IOperationMetadata {
|
|
15
|
+
interface IParameter extends IResponse {
|
|
16
|
+
name: string;
|
|
17
|
+
index: number;
|
|
18
|
+
description: string | null;
|
|
19
|
+
jsDocTags: IJsDocTagInfo[];
|
|
20
|
+
}
|
|
21
|
+
interface IResponse {
|
|
22
|
+
type: IReflectType | null;
|
|
23
|
+
imports: IReflectTypeImport[];
|
|
24
|
+
primitive: ValidationPipe<ISchema, IError>;
|
|
25
|
+
resolved: ValidationPipe<ISchema, IError>;
|
|
26
|
+
}
|
|
27
|
+
interface ISchema {
|
|
28
|
+
components: IMetadataComponents;
|
|
29
|
+
metadata: IMetadata;
|
|
30
|
+
}
|
|
31
|
+
interface IError {
|
|
32
|
+
name: string;
|
|
33
|
+
accessor: string | null;
|
|
34
|
+
messages: string[];
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IOperationMetadata.js","sourceRoot":"","sources":["../../src/transformers/IOperationMetadata.ts"],"names":[],"mappings":""}
|