@typia/interface 12.0.0-dev.20260307-2 → 12.0.0-dev.20260310
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/http/IHttpLlmController.d.ts +5 -5
- package/lib/schema/IJsonParseResult.d.ts +1 -3
- package/lib/schema/ILlmApplication.d.ts +1 -1
- package/lib/schema/ILlmController.d.ts +2 -5
- package/lib/schema/ILlmFunction.d.ts +35 -9
- package/package.json +1 -1
- package/src/http/IHttpConnection.ts +200 -200
- package/src/http/IHttpLlmApplication.ts +72 -72
- package/src/http/IHttpLlmController.ts +96 -96
- package/src/http/IHttpLlmFunction.ts +34 -34
- package/src/http/IHttpMigrateApplication.ts +48 -48
- package/src/http/IHttpMigrateRoute.ts +165 -165
- package/src/http/IHttpResponse.ts +42 -42
- package/src/http/index.ts +7 -7
- package/src/index.ts +9 -9
- package/src/metadata/IJsDocTagInfo.ts +25 -25
- package/src/metadata/IMetadataComponents.ts +24 -24
- package/src/metadata/IMetadataSchema.ts +293 -293
- package/src/metadata/IMetadataSchemaCollection.ts +20 -20
- package/src/metadata/IMetadataSchemaUnit.ts +20 -20
- package/src/metadata/IMetadataTypeTag.ts +39 -39
- package/src/metadata/index.ts +6 -6
- package/src/openapi/OpenApi.ts +643 -643
- package/src/openapi/OpenApiV3.ts +655 -655
- package/src/openapi/OpenApiV3_1.ts +735 -735
- package/src/openapi/SwaggerV2.ts +559 -559
- package/src/openapi/index.ts +4 -4
- package/src/protobuf/ProtobufWire.ts +51 -51
- package/src/protobuf/index.ts +1 -1
- package/src/schema/IJsonParseResult.ts +134 -136
- package/src/schema/IJsonSchemaApplication.ts +274 -274
- package/src/schema/IJsonSchemaAttribute.ts +158 -158
- package/src/schema/IJsonSchemaCollection.ts +123 -123
- package/src/schema/IJsonSchemaTransformError.ts +86 -86
- package/src/schema/IJsonSchemaUnit.ts +120 -120
- package/src/schema/ILlmApplication.ts +99 -99
- package/src/schema/ILlmController.ts +54 -57
- package/src/schema/ILlmFunction.ts +145 -118
- package/src/schema/ILlmSchema.ts +484 -484
- package/src/schema/IResult.ts +84 -84
- package/src/schema/IValidation.ts +134 -134
- package/src/schema/index.ts +14 -14
- package/src/tags/Constant.ts +49 -49
- package/src/tags/ContentMediaType.ts +40 -40
- package/src/tags/Default.ts +50 -50
- package/src/tags/Example.ts +48 -48
- package/src/tags/Examples.ts +50 -50
- package/src/tags/ExclusiveMaximum.ts +46 -46
- package/src/tags/ExclusiveMinimum.ts +46 -46
- package/src/tags/Format.ts +76 -76
- package/src/tags/JsonSchemaPlugin.ts +45 -45
- package/src/tags/MaxItems.ts +39 -39
- package/src/tags/MaxLength.ts +37 -37
- package/src/tags/Maximum.ts +44 -44
- package/src/tags/MinItems.ts +39 -39
- package/src/tags/MinLength.ts +37 -37
- package/src/tags/Minimum.ts +44 -44
- package/src/tags/MultipleOf.ts +54 -54
- package/src/tags/Pattern.ts +59 -59
- package/src/tags/Sequence.ts +43 -43
- package/src/tags/TagBase.ts +131 -131
- package/src/tags/Type.ts +70 -70
- package/src/tags/UniqueItems.ts +44 -44
- package/src/tags/index.ts +21 -21
- package/src/typings/AssertionGuard.ts +12 -12
- package/src/typings/Atomic.ts +21 -21
- package/src/typings/CamelCase.ts +75 -75
- package/src/typings/ClassProperties.ts +15 -15
- package/src/typings/DeepPartial.ts +39 -39
- package/src/typings/OmitNever.ts +12 -12
- package/src/typings/PascalCase.ts +71 -71
- package/src/typings/Primitive.ts +71 -71
- package/src/typings/ProtobufAtomic.ts +30 -30
- package/src/typings/Resolved.ts +58 -58
- package/src/typings/SnakeCase.ts +126 -126
- package/src/typings/SpecialFields.ts +13 -13
- package/src/typings/ValidationPipe.ts +20 -20
- package/src/typings/index.ts +14 -14
- package/src/typings/internal/Equal.ts +14 -14
- package/src/typings/internal/IsTuple.ts +17 -17
- package/src/typings/internal/NativeClass.ts +31 -31
- package/src/typings/internal/ValueOf.ts +29 -29
- package/src/utils/IRandomGenerator.ts +105 -105
- package/src/utils/IReadableURLSearchParams.ts +25 -25
- package/src/utils/index.ts +2 -2
package/src/openapi/index.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from "./OpenApi";
|
|
2
|
-
export * from "./OpenApiV3";
|
|
3
|
-
export * from "./OpenApiV3_1";
|
|
4
|
-
export * from "./SwaggerV2";
|
|
1
|
+
export * from "./OpenApi";
|
|
2
|
+
export * from "./OpenApiV3";
|
|
3
|
+
export * from "./OpenApiV3_1";
|
|
4
|
+
export * from "./SwaggerV2";
|
|
@@ -1,51 +1,51 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Protocol Buffers wire types.
|
|
3
|
-
*
|
|
4
|
-
* `ProtobufWire` defines the wire types used in Protocol Buffers binary
|
|
5
|
-
* encoding. Each type determines how the value is serialized on the wire.
|
|
6
|
-
*
|
|
7
|
-
* Wire types:
|
|
8
|
-
*
|
|
9
|
-
* - {@link VARIANT} (0): Varints (int32, int64, uint32, uint64, sint32, sint64,
|
|
10
|
-
* bool, enum)
|
|
11
|
-
* - {@link I64} (1): 64-bit (fixed64, sfixed64, double)
|
|
12
|
-
* - {@link LEN} (2): Length-delimited (string, bytes, embedded messages, packed
|
|
13
|
-
* repeated)
|
|
14
|
-
* - {@link I32} (5): 32-bit (fixed32, sfixed32, float)
|
|
15
|
-
*
|
|
16
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
17
|
-
*/
|
|
18
|
-
export const enum ProtobufWire {
|
|
19
|
-
/**
|
|
20
|
-
* - Integers
|
|
21
|
-
* - Bool
|
|
22
|
-
* - Enum
|
|
23
|
-
*/
|
|
24
|
-
VARIANT = 0,
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* - Fixed64
|
|
28
|
-
* - Sfixed64
|
|
29
|
-
* - Double
|
|
30
|
-
*/
|
|
31
|
-
I64 = 1,
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* - String
|
|
35
|
-
* - Bytes
|
|
36
|
-
* - Embedded messages
|
|
37
|
-
* - Packed repeated fields
|
|
38
|
-
*/
|
|
39
|
-
LEN = 2,
|
|
40
|
-
|
|
41
|
-
START_GROUP = 3,
|
|
42
|
-
|
|
43
|
-
END_GROUP = 4,
|
|
44
|
-
|
|
45
|
-
/**
|
|
46
|
-
* - Fixed
|
|
47
|
-
* - Sfixed32
|
|
48
|
-
* - Float
|
|
49
|
-
*/
|
|
50
|
-
I32 = 5,
|
|
51
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* Protocol Buffers wire types.
|
|
3
|
+
*
|
|
4
|
+
* `ProtobufWire` defines the wire types used in Protocol Buffers binary
|
|
5
|
+
* encoding. Each type determines how the value is serialized on the wire.
|
|
6
|
+
*
|
|
7
|
+
* Wire types:
|
|
8
|
+
*
|
|
9
|
+
* - {@link VARIANT} (0): Varints (int32, int64, uint32, uint64, sint32, sint64,
|
|
10
|
+
* bool, enum)
|
|
11
|
+
* - {@link I64} (1): 64-bit (fixed64, sfixed64, double)
|
|
12
|
+
* - {@link LEN} (2): Length-delimited (string, bytes, embedded messages, packed
|
|
13
|
+
* repeated)
|
|
14
|
+
* - {@link I32} (5): 32-bit (fixed32, sfixed32, float)
|
|
15
|
+
*
|
|
16
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
17
|
+
*/
|
|
18
|
+
export const enum ProtobufWire {
|
|
19
|
+
/**
|
|
20
|
+
* - Integers
|
|
21
|
+
* - Bool
|
|
22
|
+
* - Enum
|
|
23
|
+
*/
|
|
24
|
+
VARIANT = 0,
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* - Fixed64
|
|
28
|
+
* - Sfixed64
|
|
29
|
+
* - Double
|
|
30
|
+
*/
|
|
31
|
+
I64 = 1,
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* - String
|
|
35
|
+
* - Bytes
|
|
36
|
+
* - Embedded messages
|
|
37
|
+
* - Packed repeated fields
|
|
38
|
+
*/
|
|
39
|
+
LEN = 2,
|
|
40
|
+
|
|
41
|
+
START_GROUP = 3,
|
|
42
|
+
|
|
43
|
+
END_GROUP = 4,
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* - Fixed
|
|
47
|
+
* - Sfixed32
|
|
48
|
+
* - Float
|
|
49
|
+
*/
|
|
50
|
+
I32 = 5,
|
|
51
|
+
}
|
package/src/protobuf/index.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "./ProtobufWire";
|
|
1
|
+
export * from "./ProtobufWire";
|
|
@@ -1,136 +1,134 @@
|
|
|
1
|
-
import { DeepPartial } from "../typings/DeepPartial";
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Result of lenient JSON parsing.
|
|
5
|
-
*
|
|
6
|
-
* `IJsonParseResult<T>` represents the result of parsing JSON that may be
|
|
7
|
-
* incomplete, malformed, or contain non-standard syntax (e.g., unquoted keys,
|
|
8
|
-
* trailing commas, missing quotes).
|
|
9
|
-
*
|
|
10
|
-
* Unlike standard JSON parsing which fails on any syntax error, lenient parsing
|
|
11
|
-
* attempts to recover as much data as possible while reporting issues.
|
|
12
|
-
*
|
|
13
|
-
* Check the {@link IJsonParseResult.success} discriminator:
|
|
14
|
-
*
|
|
15
|
-
* - `true` → {@link IJsonParseResult.ISuccess} with parsed
|
|
16
|
-
* {@link IJsonParseResult.ISuccess.data}
|
|
17
|
-
* - `false` → {@link IJsonParseResult.IFailure} with partial
|
|
18
|
-
* {@link IJsonParseResult.IFailure.data} and
|
|
19
|
-
* {@link IJsonParseResult.IFailure.errors}
|
|
20
|
-
*
|
|
21
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
22
|
-
* @template T The expected type after successful parsing
|
|
23
|
-
*/
|
|
24
|
-
export type IJsonParseResult<T = unknown> =
|
|
25
|
-
| IJsonParseResult.ISuccess<T>
|
|
26
|
-
| IJsonParseResult.IFailure<T>;
|
|
27
|
-
|
|
28
|
-
export namespace IJsonParseResult {
|
|
29
|
-
/**
|
|
30
|
-
* Successful parsing result.
|
|
31
|
-
*
|
|
32
|
-
* Indicates the JSON was parsed without any errors. The data may still have
|
|
33
|
-
* been recovered from non-standard syntax (e.g., unquoted keys, trailing
|
|
34
|
-
* commas), but no information was lost.
|
|
35
|
-
*
|
|
36
|
-
* @template T The parsed type
|
|
37
|
-
*/
|
|
38
|
-
export interface ISuccess<T = unknown> {
|
|
39
|
-
/**
|
|
40
|
-
* Success discriminator.
|
|
41
|
-
*
|
|
42
|
-
* Always `true` for successful parsing.
|
|
43
|
-
*/
|
|
44
|
-
success: true;
|
|
45
|
-
|
|
46
|
-
/** The parsed data with correct type. */
|
|
47
|
-
data: T;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
/**
|
|
51
|
-
* Failed parsing result with partial data and errors.
|
|
52
|
-
*
|
|
53
|
-
* Indicates the JSON had syntax errors that could not be fully recovered. The
|
|
54
|
-
* {@link data} contains whatever could be parsed, and {@link errors} describes
|
|
55
|
-
* what went wrong.
|
|
56
|
-
*
|
|
57
|
-
* @template T The expected type (data may be partial)
|
|
58
|
-
*/
|
|
59
|
-
export interface IFailure<T = unknown> {
|
|
60
|
-
/**
|
|
61
|
-
* Success discriminator.
|
|
62
|
-
*
|
|
63
|
-
* Always `false` for failed parsing.
|
|
64
|
-
*/
|
|
65
|
-
success: false;
|
|
66
|
-
|
|
67
|
-
/**
|
|
68
|
-
* Partially parsed data.
|
|
69
|
-
*
|
|
70
|
-
* Contains whatever could be recovered from the malformed JSON. May be
|
|
71
|
-
* incomplete or have missing properties.
|
|
72
|
-
*/
|
|
73
|
-
data: DeepPartial<T>;
|
|
74
|
-
|
|
75
|
-
/**
|
|
76
|
-
* The original input string that was parsed.
|
|
77
|
-
*
|
|
78
|
-
* Preserved for debugging or error correction purposes.
|
|
79
|
-
*/
|
|
80
|
-
input: string;
|
|
81
|
-
|
|
82
|
-
/**
|
|
83
|
-
* Array of parsing errors encountered.
|
|
84
|
-
*
|
|
85
|
-
* Each error describes a specific issue found during parsing, with location
|
|
86
|
-
* and suggested fix.
|
|
87
|
-
*/
|
|
88
|
-
errors: IError[];
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
/**
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
*
|
|
97
|
-
*
|
|
98
|
-
*
|
|
99
|
-
*
|
|
100
|
-
*
|
|
101
|
-
*
|
|
102
|
-
*
|
|
103
|
-
*
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
*
|
|
111
|
-
*
|
|
112
|
-
*
|
|
113
|
-
*
|
|
114
|
-
*
|
|
115
|
-
*
|
|
116
|
-
*
|
|
117
|
-
*
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
*
|
|
125
|
-
*
|
|
126
|
-
*
|
|
127
|
-
*
|
|
128
|
-
*
|
|
129
|
-
*
|
|
130
|
-
*
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
}
|
|
136
|
-
}
|
|
1
|
+
import { DeepPartial } from "../typings/DeepPartial";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Result of lenient JSON parsing.
|
|
5
|
+
*
|
|
6
|
+
* `IJsonParseResult<T>` represents the result of parsing JSON that may be
|
|
7
|
+
* incomplete, malformed, or contain non-standard syntax (e.g., unquoted keys,
|
|
8
|
+
* trailing commas, missing quotes).
|
|
9
|
+
*
|
|
10
|
+
* Unlike standard JSON parsing which fails on any syntax error, lenient parsing
|
|
11
|
+
* attempts to recover as much data as possible while reporting issues.
|
|
12
|
+
*
|
|
13
|
+
* Check the {@link IJsonParseResult.success} discriminator:
|
|
14
|
+
*
|
|
15
|
+
* - `true` → {@link IJsonParseResult.ISuccess} with parsed
|
|
16
|
+
* {@link IJsonParseResult.ISuccess.data}
|
|
17
|
+
* - `false` → {@link IJsonParseResult.IFailure} with partial
|
|
18
|
+
* {@link IJsonParseResult.IFailure.data} and
|
|
19
|
+
* {@link IJsonParseResult.IFailure.errors}
|
|
20
|
+
*
|
|
21
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
22
|
+
* @template T The expected type after successful parsing
|
|
23
|
+
*/
|
|
24
|
+
export type IJsonParseResult<T = unknown> =
|
|
25
|
+
| IJsonParseResult.ISuccess<T>
|
|
26
|
+
| IJsonParseResult.IFailure<T>;
|
|
27
|
+
|
|
28
|
+
export namespace IJsonParseResult {
|
|
29
|
+
/**
|
|
30
|
+
* Successful parsing result.
|
|
31
|
+
*
|
|
32
|
+
* Indicates the JSON was parsed without any errors. The data may still have
|
|
33
|
+
* been recovered from non-standard syntax (e.g., unquoted keys, trailing
|
|
34
|
+
* commas), but no information was lost.
|
|
35
|
+
*
|
|
36
|
+
* @template T The parsed type
|
|
37
|
+
*/
|
|
38
|
+
export interface ISuccess<T = unknown> {
|
|
39
|
+
/**
|
|
40
|
+
* Success discriminator.
|
|
41
|
+
*
|
|
42
|
+
* Always `true` for successful parsing.
|
|
43
|
+
*/
|
|
44
|
+
success: true;
|
|
45
|
+
|
|
46
|
+
/** The parsed data with correct type. */
|
|
47
|
+
data: T;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Failed parsing result with partial data and errors.
|
|
52
|
+
*
|
|
53
|
+
* Indicates the JSON had syntax errors that could not be fully recovered. The
|
|
54
|
+
* {@link data} contains whatever could be parsed, and {@link errors} describes
|
|
55
|
+
* what went wrong.
|
|
56
|
+
*
|
|
57
|
+
* @template T The expected type (data may be partial)
|
|
58
|
+
*/
|
|
59
|
+
export interface IFailure<T = unknown> {
|
|
60
|
+
/**
|
|
61
|
+
* Success discriminator.
|
|
62
|
+
*
|
|
63
|
+
* Always `false` for failed parsing.
|
|
64
|
+
*/
|
|
65
|
+
success: false;
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Partially parsed data.
|
|
69
|
+
*
|
|
70
|
+
* Contains whatever could be recovered from the malformed JSON. May be
|
|
71
|
+
* incomplete or have missing properties.
|
|
72
|
+
*/
|
|
73
|
+
data: DeepPartial<T>;
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* The original input string that was parsed.
|
|
77
|
+
*
|
|
78
|
+
* Preserved for debugging or error correction purposes.
|
|
79
|
+
*/
|
|
80
|
+
input: string;
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Array of parsing errors encountered.
|
|
84
|
+
*
|
|
85
|
+
* Each error describes a specific issue found during parsing, with location
|
|
86
|
+
* and suggested fix.
|
|
87
|
+
*/
|
|
88
|
+
errors: IError[];
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/** Detailed information about a parsing error. */
|
|
92
|
+
export interface IError {
|
|
93
|
+
/**
|
|
94
|
+
* Property path to the error location.
|
|
95
|
+
*
|
|
96
|
+
* A dot-notation path from the root to the error location. Uses `$input` as
|
|
97
|
+
* the root.
|
|
98
|
+
*
|
|
99
|
+
* @example
|
|
100
|
+
* $input.user.email;
|
|
101
|
+
*
|
|
102
|
+
* @example
|
|
103
|
+
* $input.items[0].price;
|
|
104
|
+
*/
|
|
105
|
+
path: string;
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* What was expected at this location.
|
|
109
|
+
*
|
|
110
|
+
* @example
|
|
111
|
+
* JSON value (string, number, boolean, null, object, or array)
|
|
112
|
+
*
|
|
113
|
+
* @example
|
|
114
|
+
* quoted string
|
|
115
|
+
*
|
|
116
|
+
* @example
|
|
117
|
+
* ":";
|
|
118
|
+
*/
|
|
119
|
+
expected: string;
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* Description of what was actually found.
|
|
123
|
+
*
|
|
124
|
+
* Human/AI-readable message explaining the issue.
|
|
125
|
+
*
|
|
126
|
+
* @example
|
|
127
|
+
* unquoted string 'abc' - did you forget quotes?
|
|
128
|
+
*
|
|
129
|
+
* @example
|
|
130
|
+
* missing opening quote for 'hello'
|
|
131
|
+
*/
|
|
132
|
+
value: unknown;
|
|
133
|
+
}
|
|
134
|
+
}
|