@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
|
@@ -1,105 +1,105 @@
|
|
|
1
|
-
import { OpenApi } from "../openapi/OpenApi";
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Random value generator interface for typia.
|
|
5
|
-
*
|
|
6
|
-
* `IRandomGenerator` defines methods for generating random values of various
|
|
7
|
-
* types. Used by `typia.random<T>()` for mock data generation.
|
|
8
|
-
*
|
|
9
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
10
|
-
*/
|
|
11
|
-
export interface IRandomGenerator {
|
|
12
|
-
/** Generates a random boolean. */
|
|
13
|
-
boolean(): boolean | undefined;
|
|
14
|
-
|
|
15
|
-
/** Generates a random number within schema constraints. */
|
|
16
|
-
number(schema: OpenApi.IJsonSchema.INumber): number;
|
|
17
|
-
|
|
18
|
-
/** Generates a random integer within schema constraints. */
|
|
19
|
-
integer(schema: OpenApi.IJsonSchema.IInteger): number;
|
|
20
|
-
|
|
21
|
-
/** Generates a random bigint within schema constraints. */
|
|
22
|
-
bigint(schema: OpenApi.IJsonSchema.IInteger): bigint;
|
|
23
|
-
|
|
24
|
-
/** Generates a random string within schema constraints. */
|
|
25
|
-
string(schema: OpenApi.IJsonSchema.IString): string;
|
|
26
|
-
|
|
27
|
-
/** Generates a random array with elements from the generator function. */
|
|
28
|
-
array<T>(
|
|
29
|
-
schema: Omit<OpenApi.IJsonSchema.IArray, "items"> & {
|
|
30
|
-
element: (index: number, count: number) => T;
|
|
31
|
-
},
|
|
32
|
-
): T[];
|
|
33
|
-
|
|
34
|
-
/** Generates a random string matching the regex pattern. */
|
|
35
|
-
pattern(regex: RegExp): string;
|
|
36
|
-
|
|
37
|
-
// String format generators
|
|
38
|
-
byte(): string;
|
|
39
|
-
|
|
40
|
-
password(): string;
|
|
41
|
-
|
|
42
|
-
regex(): string;
|
|
43
|
-
|
|
44
|
-
uuid(): string;
|
|
45
|
-
|
|
46
|
-
email(): string;
|
|
47
|
-
|
|
48
|
-
hostname(): string;
|
|
49
|
-
|
|
50
|
-
idnEmail(): string;
|
|
51
|
-
|
|
52
|
-
idnHostname(): string;
|
|
53
|
-
|
|
54
|
-
iri(): string;
|
|
55
|
-
|
|
56
|
-
iriReference(): string;
|
|
57
|
-
|
|
58
|
-
ipv4(): string;
|
|
59
|
-
|
|
60
|
-
ipv6(): string;
|
|
61
|
-
|
|
62
|
-
uri(): string;
|
|
63
|
-
|
|
64
|
-
uriReference(): string;
|
|
65
|
-
|
|
66
|
-
uriTemplate(): string;
|
|
67
|
-
|
|
68
|
-
url(): string;
|
|
69
|
-
|
|
70
|
-
datetime(props?: { minimum?: number; maximum?: number }): string;
|
|
71
|
-
|
|
72
|
-
date(props?: { minimum?: number; maximum?: number }): string;
|
|
73
|
-
|
|
74
|
-
time(): string;
|
|
75
|
-
|
|
76
|
-
duration(): string;
|
|
77
|
-
|
|
78
|
-
jsonPointer(): string;
|
|
79
|
-
|
|
80
|
-
relativeJsonPointer(): string;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
export namespace IRandomGenerator {
|
|
84
|
-
/** Custom generators for specific schema properties. */
|
|
85
|
-
export interface CustomMap {
|
|
86
|
-
string?: (
|
|
87
|
-
schema: OpenApi.IJsonSchema.IString & Record<string, any>,
|
|
88
|
-
) => string;
|
|
89
|
-
number?: (
|
|
90
|
-
schema: OpenApi.IJsonSchema.INumber & Record<string, any>,
|
|
91
|
-
) => number;
|
|
92
|
-
integer?: (
|
|
93
|
-
schema: OpenApi.IJsonSchema.IInteger & Record<string, any>,
|
|
94
|
-
) => number;
|
|
95
|
-
bigint?: (
|
|
96
|
-
schema: OpenApi.IJsonSchema.IInteger & Record<string, any>,
|
|
97
|
-
) => bigint;
|
|
98
|
-
boolean?: (schema: Record<string, any>) => boolean | undefined;
|
|
99
|
-
array?: <T>(
|
|
100
|
-
schema: Omit<OpenApi.IJsonSchema.IArray, "items"> & {
|
|
101
|
-
element: (index: number, count: number) => T;
|
|
102
|
-
} & Record<string, any>,
|
|
103
|
-
) => T[];
|
|
104
|
-
}
|
|
105
|
-
}
|
|
1
|
+
import { OpenApi } from "../openapi/OpenApi";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Random value generator interface for typia.
|
|
5
|
+
*
|
|
6
|
+
* `IRandomGenerator` defines methods for generating random values of various
|
|
7
|
+
* types. Used by `typia.random<T>()` for mock data generation.
|
|
8
|
+
*
|
|
9
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
10
|
+
*/
|
|
11
|
+
export interface IRandomGenerator {
|
|
12
|
+
/** Generates a random boolean. */
|
|
13
|
+
boolean(): boolean | undefined;
|
|
14
|
+
|
|
15
|
+
/** Generates a random number within schema constraints. */
|
|
16
|
+
number(schema: OpenApi.IJsonSchema.INumber): number;
|
|
17
|
+
|
|
18
|
+
/** Generates a random integer within schema constraints. */
|
|
19
|
+
integer(schema: OpenApi.IJsonSchema.IInteger): number;
|
|
20
|
+
|
|
21
|
+
/** Generates a random bigint within schema constraints. */
|
|
22
|
+
bigint(schema: OpenApi.IJsonSchema.IInteger): bigint;
|
|
23
|
+
|
|
24
|
+
/** Generates a random string within schema constraints. */
|
|
25
|
+
string(schema: OpenApi.IJsonSchema.IString): string;
|
|
26
|
+
|
|
27
|
+
/** Generates a random array with elements from the generator function. */
|
|
28
|
+
array<T>(
|
|
29
|
+
schema: Omit<OpenApi.IJsonSchema.IArray, "items"> & {
|
|
30
|
+
element: (index: number, count: number) => T;
|
|
31
|
+
},
|
|
32
|
+
): T[];
|
|
33
|
+
|
|
34
|
+
/** Generates a random string matching the regex pattern. */
|
|
35
|
+
pattern(regex: RegExp): string;
|
|
36
|
+
|
|
37
|
+
// String format generators
|
|
38
|
+
byte(): string;
|
|
39
|
+
|
|
40
|
+
password(): string;
|
|
41
|
+
|
|
42
|
+
regex(): string;
|
|
43
|
+
|
|
44
|
+
uuid(): string;
|
|
45
|
+
|
|
46
|
+
email(): string;
|
|
47
|
+
|
|
48
|
+
hostname(): string;
|
|
49
|
+
|
|
50
|
+
idnEmail(): string;
|
|
51
|
+
|
|
52
|
+
idnHostname(): string;
|
|
53
|
+
|
|
54
|
+
iri(): string;
|
|
55
|
+
|
|
56
|
+
iriReference(): string;
|
|
57
|
+
|
|
58
|
+
ipv4(): string;
|
|
59
|
+
|
|
60
|
+
ipv6(): string;
|
|
61
|
+
|
|
62
|
+
uri(): string;
|
|
63
|
+
|
|
64
|
+
uriReference(): string;
|
|
65
|
+
|
|
66
|
+
uriTemplate(): string;
|
|
67
|
+
|
|
68
|
+
url(): string;
|
|
69
|
+
|
|
70
|
+
datetime(props?: { minimum?: number; maximum?: number }): string;
|
|
71
|
+
|
|
72
|
+
date(props?: { minimum?: number; maximum?: number }): string;
|
|
73
|
+
|
|
74
|
+
time(): string;
|
|
75
|
+
|
|
76
|
+
duration(): string;
|
|
77
|
+
|
|
78
|
+
jsonPointer(): string;
|
|
79
|
+
|
|
80
|
+
relativeJsonPointer(): string;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export namespace IRandomGenerator {
|
|
84
|
+
/** Custom generators for specific schema properties. */
|
|
85
|
+
export interface CustomMap {
|
|
86
|
+
string?: (
|
|
87
|
+
schema: OpenApi.IJsonSchema.IString & Record<string, any>,
|
|
88
|
+
) => string;
|
|
89
|
+
number?: (
|
|
90
|
+
schema: OpenApi.IJsonSchema.INumber & Record<string, any>,
|
|
91
|
+
) => number;
|
|
92
|
+
integer?: (
|
|
93
|
+
schema: OpenApi.IJsonSchema.IInteger & Record<string, any>,
|
|
94
|
+
) => number;
|
|
95
|
+
bigint?: (
|
|
96
|
+
schema: OpenApi.IJsonSchema.IInteger & Record<string, any>,
|
|
97
|
+
) => bigint;
|
|
98
|
+
boolean?: (schema: Record<string, any>) => boolean | undefined;
|
|
99
|
+
array?: <T>(
|
|
100
|
+
schema: Omit<OpenApi.IJsonSchema.IArray, "items"> & {
|
|
101
|
+
element: (index: number, count: number) => T;
|
|
102
|
+
} & Record<string, any>,
|
|
103
|
+
) => T[];
|
|
104
|
+
}
|
|
105
|
+
}
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Minimal interface for reading URL query parameters.
|
|
3
|
-
*
|
|
4
|
-
* `IReadableURLSearchParams` is a subset of the standard {@link URLSearchParams}
|
|
5
|
-
* interface, containing only the read operations needed for query parameter
|
|
6
|
-
* parsing. This interface was designed specifically for compatibility with the
|
|
7
|
-
* [Hono.js](https://hono.dev/) web framework, which provides its own query
|
|
8
|
-
* parameter implementation.
|
|
9
|
-
*
|
|
10
|
-
* The interface exposes:
|
|
11
|
-
*
|
|
12
|
-
* - {@link URLSearchParams.size | size}: Number of parameters
|
|
13
|
-
* - {@link URLSearchParams.get | get}: Retrieve first value for a key
|
|
14
|
-
* - {@link URLSearchParams.getAll | getAll}: Retrieve all values for a key
|
|
15
|
-
*
|
|
16
|
-
* Use this interface when implementing query parameter handling that needs to
|
|
17
|
-
* work with both standard `URLSearchParams` and framework-specific
|
|
18
|
-
* implementations.
|
|
19
|
-
*
|
|
20
|
-
* @author https://github.com/miyaji255
|
|
21
|
-
*/
|
|
22
|
-
export type IReadableURLSearchParams = Pick<
|
|
23
|
-
URLSearchParams,
|
|
24
|
-
"size" | "get" | "getAll"
|
|
25
|
-
>;
|
|
1
|
+
/**
|
|
2
|
+
* Minimal interface for reading URL query parameters.
|
|
3
|
+
*
|
|
4
|
+
* `IReadableURLSearchParams` is a subset of the standard {@link URLSearchParams}
|
|
5
|
+
* interface, containing only the read operations needed for query parameter
|
|
6
|
+
* parsing. This interface was designed specifically for compatibility with the
|
|
7
|
+
* [Hono.js](https://hono.dev/) web framework, which provides its own query
|
|
8
|
+
* parameter implementation.
|
|
9
|
+
*
|
|
10
|
+
* The interface exposes:
|
|
11
|
+
*
|
|
12
|
+
* - {@link URLSearchParams.size | size}: Number of parameters
|
|
13
|
+
* - {@link URLSearchParams.get | get}: Retrieve first value for a key
|
|
14
|
+
* - {@link URLSearchParams.getAll | getAll}: Retrieve all values for a key
|
|
15
|
+
*
|
|
16
|
+
* Use this interface when implementing query parameter handling that needs to
|
|
17
|
+
* work with both standard `URLSearchParams` and framework-specific
|
|
18
|
+
* implementations.
|
|
19
|
+
*
|
|
20
|
+
* @author https://github.com/miyaji255
|
|
21
|
+
*/
|
|
22
|
+
export type IReadableURLSearchParams = Pick<
|
|
23
|
+
URLSearchParams,
|
|
24
|
+
"size" | "get" | "getAll"
|
|
25
|
+
>;
|
package/src/utils/index.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from "./IRandomGenerator";
|
|
2
|
-
export * from "./IReadableURLSearchParams";
|
|
1
|
+
export * from "./IRandomGenerator";
|
|
2
|
+
export * from "./IReadableURLSearchParams";
|