@typia/interface 12.0.0-dev.20260316 → 12.0.0

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.
@@ -1,165 +1,165 @@
1
- import { OpenApi } from "../openapi/OpenApi";
2
-
3
- /**
4
- * HTTP route converted from OpenAPI operation.
5
- *
6
- * `IHttpMigrateRoute` represents a single API endpoint with all
7
- * request/response schemas resolved and ready for code generation. Contains
8
- * {@link parameters} for URL path variables, {@link query} for query strings,
9
- * {@link headers}, {@link body} for request payload, and
10
- * {@link success}/{@link exceptions} for responses.
11
- *
12
- * @author Jeongho Nam - https://github.com/samchon
13
- */
14
- export interface IHttpMigrateRoute {
15
- /** HTTP method. */
16
- method: "head" | "get" | "post" | "put" | "patch" | "delete" | "query";
17
-
18
- /** Original path from OpenAPI document. */
19
- path: string;
20
-
21
- /** Emended path with `:param` format, always starts with `/`. */
22
- emendedPath: string;
23
-
24
- /**
25
- * Accessor path for generated RPC function.
26
- *
27
- * Namespaces from static path segments, function name from method +
28
- * parameters. `delete` becomes `erase` to avoid reserved keyword.
29
- */
30
- accessor: string[];
31
-
32
- /** Path parameters only. */
33
- parameters: IHttpMigrateRoute.IParameter[];
34
-
35
- /** Combined headers as single object. Null if none. */
36
- headers: IHttpMigrateRoute.IHeaders | null;
37
-
38
- /** Combined query parameters as single object. Null if none. */
39
- query: IHttpMigrateRoute.IQuery | null;
40
-
41
- /** Request body metadata. Null if none. */
42
- body: IHttpMigrateRoute.IBody | null;
43
-
44
- /** Success response (200/201). Null if void return. */
45
- success: IHttpMigrateRoute.ISuccess | null;
46
-
47
- /** Exception responses keyed by status code. */
48
- exceptions: Record<string, IHttpMigrateRoute.IException>;
49
-
50
- /** Returns description comment for the RPC function. */
51
- comment: () => string;
52
-
53
- /** Returns source {@link OpenApi.IOperation}. */
54
- operation: () => OpenApi.IOperation;
55
- }
56
- export namespace IHttpMigrateRoute {
57
- /** Path parameter metadata. */
58
- export interface IParameter {
59
- /** Parameter name in path template. */
60
- name: string;
61
-
62
- /** Parameter variable key. */
63
- key: string;
64
-
65
- /** Parameter type schema. */
66
- schema: OpenApi.IJsonSchema;
67
-
68
- /** Returns source parameter definition. */
69
- parameter: () => OpenApi.IOperation.IParameter;
70
- }
71
-
72
- /** Headers metadata. */
73
- export interface IHeaders {
74
- /** Combined headers parameter name. */
75
- name: string;
76
-
77
- /** Headers variable key. */
78
- key: string;
79
-
80
- /** Combined headers schema. */
81
- schema: OpenApi.IJsonSchema;
82
-
83
- /** Returns title. */
84
- title: () => string | undefined;
85
-
86
- /** Returns description. */
87
- description: () => string | undefined;
88
-
89
- /** Returns example value. */
90
- example: () => any | undefined;
91
-
92
- /** Returns named examples. */
93
- examples: () => Record<string, any> | undefined;
94
- }
95
-
96
- /** Query parameters metadata. */
97
- export interface IQuery {
98
- /** Combined query parameter name. */
99
- name: string;
100
-
101
- /** Query variable key. */
102
- key: string;
103
-
104
- /** Combined query schema. */
105
- schema: OpenApi.IJsonSchema;
106
-
107
- /** Returns title. */
108
- title: () => string | undefined;
109
-
110
- /** Returns description. */
111
- description: () => string | undefined;
112
-
113
- /** Returns example value. */
114
- example: () => any | undefined;
115
-
116
- /** Returns named examples. */
117
- examples: () => Record<string, any> | undefined;
118
- }
119
-
120
- /** Request body metadata. */
121
- export interface IBody {
122
- /** Body parameter name. */
123
- name: string;
124
-
125
- /** Body variable key. */
126
- key: string;
127
-
128
- /** Content media type. */
129
- type:
130
- | "text/plain"
131
- | "application/json"
132
- | "application/x-www-form-urlencoded"
133
- | "multipart/form-data";
134
-
135
- /** Body type schema. */
136
- schema: OpenApi.IJsonSchema;
137
-
138
- /** Returns description. */
139
- description: () => string | undefined;
140
-
141
- /** Returns source media type definition. */
142
- media: () => OpenApi.IOperation.IMediaType;
143
-
144
- /** Nestia encryption flag. */
145
- "x-nestia-encrypted"?: boolean;
146
- }
147
-
148
- /** Success response metadata. */
149
- export interface ISuccess extends IBody {
150
- /** HTTP status code. */
151
- status: string;
152
- }
153
-
154
- /** Exception response metadata. */
155
- export interface IException {
156
- /** Exception type schema. */
157
- schema: OpenApi.IJsonSchema;
158
-
159
- /** Returns source response definition. */
160
- response: () => OpenApi.IOperation.IResponse;
161
-
162
- /** Returns source media type definition. */
163
- media: () => OpenApi.IOperation.IMediaType;
164
- }
165
- }
1
+ import { OpenApi } from "../openapi/OpenApi";
2
+
3
+ /**
4
+ * HTTP route converted from OpenAPI operation.
5
+ *
6
+ * `IHttpMigrateRoute` represents a single API endpoint with all
7
+ * request/response schemas resolved and ready for code generation. Contains
8
+ * {@link parameters} for URL path variables, {@link query} for query strings,
9
+ * {@link headers}, {@link body} for request payload, and
10
+ * {@link success}/{@link exceptions} for responses.
11
+ *
12
+ * @author Jeongho Nam - https://github.com/samchon
13
+ */
14
+ export interface IHttpMigrateRoute {
15
+ /** HTTP method. */
16
+ method: "head" | "get" | "post" | "put" | "patch" | "delete" | "query";
17
+
18
+ /** Original path from OpenAPI document. */
19
+ path: string;
20
+
21
+ /** Emended path with `:param` format, always starts with `/`. */
22
+ emendedPath: string;
23
+
24
+ /**
25
+ * Accessor path for generated RPC function.
26
+ *
27
+ * Namespaces from static path segments, function name from method +
28
+ * parameters. `delete` becomes `erase` to avoid reserved keyword.
29
+ */
30
+ accessor: string[];
31
+
32
+ /** Path parameters only. */
33
+ parameters: IHttpMigrateRoute.IParameter[];
34
+
35
+ /** Combined headers as single object. Null if none. */
36
+ headers: IHttpMigrateRoute.IHeaders | null;
37
+
38
+ /** Combined query parameters as single object. Null if none. */
39
+ query: IHttpMigrateRoute.IQuery | null;
40
+
41
+ /** Request body metadata. Null if none. */
42
+ body: IHttpMigrateRoute.IBody | null;
43
+
44
+ /** Success response (200/201). Null if void return. */
45
+ success: IHttpMigrateRoute.ISuccess | null;
46
+
47
+ /** Exception responses keyed by status code. */
48
+ exceptions: Record<string, IHttpMigrateRoute.IException>;
49
+
50
+ /** Returns description comment for the RPC function. */
51
+ comment: () => string;
52
+
53
+ /** Returns source {@link OpenApi.IOperation}. */
54
+ operation: () => OpenApi.IOperation;
55
+ }
56
+ export namespace IHttpMigrateRoute {
57
+ /** Path parameter metadata. */
58
+ export interface IParameter {
59
+ /** Parameter name in path template. */
60
+ name: string;
61
+
62
+ /** Parameter variable key. */
63
+ key: string;
64
+
65
+ /** Parameter type schema. */
66
+ schema: OpenApi.IJsonSchema;
67
+
68
+ /** Returns source parameter definition. */
69
+ parameter: () => OpenApi.IOperation.IParameter;
70
+ }
71
+
72
+ /** Headers metadata. */
73
+ export interface IHeaders {
74
+ /** Combined headers parameter name. */
75
+ name: string;
76
+
77
+ /** Headers variable key. */
78
+ key: string;
79
+
80
+ /** Combined headers schema. */
81
+ schema: OpenApi.IJsonSchema;
82
+
83
+ /** Returns title. */
84
+ title: () => string | undefined;
85
+
86
+ /** Returns description. */
87
+ description: () => string | undefined;
88
+
89
+ /** Returns example value. */
90
+ example: () => any | undefined;
91
+
92
+ /** Returns named examples. */
93
+ examples: () => Record<string, any> | undefined;
94
+ }
95
+
96
+ /** Query parameters metadata. */
97
+ export interface IQuery {
98
+ /** Combined query parameter name. */
99
+ name: string;
100
+
101
+ /** Query variable key. */
102
+ key: string;
103
+
104
+ /** Combined query schema. */
105
+ schema: OpenApi.IJsonSchema;
106
+
107
+ /** Returns title. */
108
+ title: () => string | undefined;
109
+
110
+ /** Returns description. */
111
+ description: () => string | undefined;
112
+
113
+ /** Returns example value. */
114
+ example: () => any | undefined;
115
+
116
+ /** Returns named examples. */
117
+ examples: () => Record<string, any> | undefined;
118
+ }
119
+
120
+ /** Request body metadata. */
121
+ export interface IBody {
122
+ /** Body parameter name. */
123
+ name: string;
124
+
125
+ /** Body variable key. */
126
+ key: string;
127
+
128
+ /** Content media type. */
129
+ type:
130
+ | "text/plain"
131
+ | "application/json"
132
+ | "application/x-www-form-urlencoded"
133
+ | "multipart/form-data";
134
+
135
+ /** Body type schema. */
136
+ schema: OpenApi.IJsonSchema;
137
+
138
+ /** Returns description. */
139
+ description: () => string | undefined;
140
+
141
+ /** Returns source media type definition. */
142
+ media: () => OpenApi.IOperation.IMediaType;
143
+
144
+ /** Nestia encryption flag. */
145
+ "x-nestia-encrypted"?: boolean;
146
+ }
147
+
148
+ /** Success response metadata. */
149
+ export interface ISuccess extends IBody {
150
+ /** HTTP status code. */
151
+ status: string;
152
+ }
153
+
154
+ /** Exception response metadata. */
155
+ export interface IException {
156
+ /** Exception type schema. */
157
+ schema: OpenApi.IJsonSchema;
158
+
159
+ /** Returns source response definition. */
160
+ response: () => OpenApi.IOperation.IResponse;
161
+
162
+ /** Returns source media type definition. */
163
+ media: () => OpenApi.IOperation.IMediaType;
164
+ }
165
+ }