typia 9.7.2 → 10.0.0-dev.20251107
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/LICENSE +21 -21
- package/README.md +153 -153
- package/lib/factories/ProtobufFactory.js +1 -1
- package/lib/factories/ProtobufFactory.mjs +1 -1
- package/lib/programmers/internal/json_schema_station.d.mts +2 -2
- package/lib/programmers/internal/json_schema_station.d.ts +2 -2
- package/lib/programmers/llm/LlmApplicationProgrammer.js +5 -1
- package/lib/programmers/llm/LlmApplicationProgrammer.js.map +1 -1
- package/lib/programmers/llm/LlmApplicationProgrammer.mjs +5 -1
- package/lib/programmers/llm/LlmSchemaProgrammer.js +1 -4
- package/lib/programmers/llm/LlmSchemaProgrammer.js.map +1 -1
- package/lib/programmers/llm/LlmSchemaProgrammer.mjs +1 -35
- package/package.json +121 -121
- package/src/AssertionGuard.ts +41 -41
- package/src/CamelCase.ts +75 -75
- package/src/IRandomGenerator.ts +337 -337
- package/src/IReadableURLSearchParams.ts +9 -9
- package/src/PascalCase.ts +71 -71
- package/src/Primitive.ts +90 -90
- package/src/Resolved.ts +72 -72
- package/src/SnakeCase.ts +127 -127
- package/src/TypeGuardError.ts +216 -216
- package/src/factories/MetadataCollection.ts +270 -270
- package/src/factories/MetadataCommentTagFactory.ts +632 -632
- package/src/factories/MetadataFactory.ts +402 -402
- package/src/factories/ProtobufFactory.ts +873 -873
- package/src/functional.ts +705 -705
- package/src/http.ts +972 -972
- package/src/internal/_ProtobufReader.ts +188 -188
- package/src/internal/_ProtobufSizer.ts +137 -137
- package/src/internal/_ProtobufWriter.ts +135 -135
- package/src/internal/_jsonStringifyString.ts +42 -42
- package/src/json.ts +643 -643
- package/src/llm.ts +615 -615
- package/src/misc.ts +594 -594
- package/src/module.ts +889 -889
- package/src/notations.ts +751 -751
- package/src/programmers/FeatureProgrammer.ts +605 -605
- package/src/programmers/ImportProgrammer.ts +179 -179
- package/src/programmers/RandomProgrammer.ts +1195 -1195
- package/src/programmers/helpers/ProtobufWire.ts +34 -34
- package/src/programmers/internal/check_array_length.ts +43 -43
- package/src/programmers/internal/check_bigint.ts +46 -46
- package/src/programmers/internal/check_dynamic_key.ts +197 -197
- package/src/programmers/internal/check_dynamic_properties.ts +231 -231
- package/src/programmers/internal/check_everything.ts +21 -21
- package/src/programmers/internal/check_native.ts +23 -23
- package/src/programmers/internal/check_number.ts +108 -108
- package/src/programmers/internal/check_object.ts +72 -72
- package/src/programmers/internal/check_string.ts +46 -46
- package/src/programmers/internal/check_template.ts +46 -46
- package/src/programmers/internal/check_union_array_like.ts +331 -331
- package/src/programmers/internal/decode_union_object.ts +110 -110
- package/src/programmers/internal/feature_object_entries.ts +59 -59
- package/src/programmers/internal/json_schema_escaped.ts +78 -78
- package/src/programmers/internal/json_schema_object.ts +150 -150
- package/src/programmers/internal/json_schema_station.ts +2 -2
- package/src/programmers/internal/metadata_to_pattern.ts +40 -40
- package/src/programmers/internal/postfix_of_tuple.ts +3 -3
- package/src/programmers/internal/prune_object_properties.ts +69 -69
- package/src/programmers/internal/stringify_dynamic_properties.ts +158 -158
- package/src/programmers/internal/stringify_native.ts +5 -5
- package/src/programmers/internal/stringify_regular_properties.ts +77 -77
- package/src/programmers/internal/template_to_pattern.ts +21 -21
- package/src/programmers/internal/wrap_metadata_rest_tuple.ts +21 -21
- package/src/programmers/json/JsonStringifyProgrammer.ts +1124 -1124
- package/src/programmers/llm/LlmApplicationProgrammer.ts +10 -1
- package/src/programmers/llm/LlmSchemaProgrammer.ts +2 -7
- package/src/protobuf.ts +820 -820
- package/src/reflect.ts +46 -46
- package/src/schemas/json/IJsonApplication.ts +77 -77
- package/src/schemas/json/IJsonSchemaCollection.ts +212 -212
- package/src/schemas/json/IJsonSchemaUnit.ts +263 -263
- package/src/schemas/metadata/IMetadataTypeTag.ts +14 -14
- package/src/schemas/metadata/Metadata.ts +669 -669
- package/src/schemas/metadata/MetadataAliasType.ts +57 -57
- package/src/schemas/metadata/MetadataApplication.ts +40 -40
- package/src/schemas/metadata/MetadataArray.ts +47 -47
- package/src/schemas/metadata/MetadataArrayType.ts +51 -51
- package/src/schemas/metadata/MetadataAtomic.ts +85 -85
- package/src/schemas/metadata/MetadataEscaped.ts +45 -45
- package/src/schemas/metadata/MetadataFunction.ts +45 -45
- package/src/schemas/metadata/MetadataObject.ts +46 -46
- package/src/schemas/metadata/MetadataObjectType.ts +137 -137
- package/src/schemas/metadata/MetadataParameter.ts +52 -52
- package/src/schemas/metadata/MetadataProperty.ts +53 -53
- package/src/schemas/metadata/MetadataTemplate.ts +78 -78
- package/src/schemas/metadata/MetadataTuple.ts +28 -28
- package/src/schemas/metadata/MetadataTupleType.ts +61 -61
- package/src/tags/Constant.ts +47 -47
- package/src/tags/ContentMediaType.ts +27 -27
- package/src/tags/Default.ts +52 -52
- package/src/tags/Example.ts +56 -56
- package/src/tags/Examples.ts +56 -56
- package/src/tags/ExclusiveMaximum.ts +44 -44
- package/src/tags/ExclusiveMinimum.ts +44 -44
- package/src/tags/Format.ts +78 -78
- package/src/tags/JsonSchemaPlugin.ts +36 -36
- package/src/tags/MaxItems.ts +31 -31
- package/src/tags/MaxLength.ts +25 -25
- package/src/tags/Maximum.ts +39 -39
- package/src/tags/MinItems.ts +31 -31
- package/src/tags/MinLength.ts +25 -25
- package/src/tags/Minimum.ts +39 -39
- package/src/tags/MultipleOf.ts +42 -42
- package/src/tags/Pattern.ts +49 -49
- package/src/tags/Sequence.ts +37 -37
- package/src/tags/TagBase.ts +102 -102
- package/src/tags/Type.ts +64 -64
- package/src/tags/UniqueItems.ts +34 -34
- package/src/tags/internal/FormatCheatSheet.ts +71 -71
- package/src/transformers/ITransformOptions.ts +70 -70
- package/src/transformers/ImportTransformer.ts +253 -253
- package/src/transformers/NoTransformConfigurationError.ts +16 -16
- package/src/transformers/features/llm/LlmApplicationTransformer.ts +224 -224
- package/src/typings/Equal.ts +18 -18
package/src/reflect.ts
CHANGED
|
@@ -1,46 +1,46 @@
|
|
|
1
|
-
import { IMetadataApplication } from "./schemas/metadata/IMetadataApplication";
|
|
2
|
-
|
|
3
|
-
import { NoTransformConfigurationError } from "./transformers/NoTransformConfigurationError";
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* > You must configure the generic argument `Types`.
|
|
7
|
-
*
|
|
8
|
-
* Metadata Application.
|
|
9
|
-
*
|
|
10
|
-
* Creates a Metadata application which contains the metadata and components.
|
|
11
|
-
*
|
|
12
|
-
* Note that, all of the collection types like Array, Tuple and Objects are
|
|
13
|
-
* stored in the {@link IMetadataApplication.components} property. Also, alias
|
|
14
|
-
* types are stored in the {@link IMetadataApplication.aliases} property, too.
|
|
15
|
-
*
|
|
16
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
17
|
-
* @template Types Tuple of target types
|
|
18
|
-
* @returns Metadata application
|
|
19
|
-
*/
|
|
20
|
-
export function metadata(): never;
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* Metadata Application.
|
|
24
|
-
*
|
|
25
|
-
* Creates a Metadata application which contains the metadata and components.
|
|
26
|
-
*
|
|
27
|
-
* Note that, all of the collection types like Array, Tuple and Objects are
|
|
28
|
-
* stored in the {@link IMetadataApplication.components} property. Also, alias
|
|
29
|
-
* types are stored in the {@link IMetadataApplication.aliases} property, too.
|
|
30
|
-
*
|
|
31
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
32
|
-
* @template Types Tuple of target types
|
|
33
|
-
* @returns Metadata application
|
|
34
|
-
*/
|
|
35
|
-
export function metadata<Types extends unknown[]>(): IMetadataApplication;
|
|
36
|
-
|
|
37
|
-
/** @internal */
|
|
38
|
-
export function metadata(): never {
|
|
39
|
-
NoTransformConfigurationError("reflect.metadata");
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
export function name<T, Regular extends boolean = false>(): string;
|
|
43
|
-
export function name(): never;
|
|
44
|
-
export function name(): never {
|
|
45
|
-
NoTransformConfigurationError("reflect.name");
|
|
46
|
-
}
|
|
1
|
+
import { IMetadataApplication } from "./schemas/metadata/IMetadataApplication";
|
|
2
|
+
|
|
3
|
+
import { NoTransformConfigurationError } from "./transformers/NoTransformConfigurationError";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* > You must configure the generic argument `Types`.
|
|
7
|
+
*
|
|
8
|
+
* Metadata Application.
|
|
9
|
+
*
|
|
10
|
+
* Creates a Metadata application which contains the metadata and components.
|
|
11
|
+
*
|
|
12
|
+
* Note that, all of the collection types like Array, Tuple and Objects are
|
|
13
|
+
* stored in the {@link IMetadataApplication.components} property. Also, alias
|
|
14
|
+
* types are stored in the {@link IMetadataApplication.aliases} property, too.
|
|
15
|
+
*
|
|
16
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
17
|
+
* @template Types Tuple of target types
|
|
18
|
+
* @returns Metadata application
|
|
19
|
+
*/
|
|
20
|
+
export function metadata(): never;
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Metadata Application.
|
|
24
|
+
*
|
|
25
|
+
* Creates a Metadata application which contains the metadata and components.
|
|
26
|
+
*
|
|
27
|
+
* Note that, all of the collection types like Array, Tuple and Objects are
|
|
28
|
+
* stored in the {@link IMetadataApplication.components} property. Also, alias
|
|
29
|
+
* types are stored in the {@link IMetadataApplication.aliases} property, too.
|
|
30
|
+
*
|
|
31
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
32
|
+
* @template Types Tuple of target types
|
|
33
|
+
* @returns Metadata application
|
|
34
|
+
*/
|
|
35
|
+
export function metadata<Types extends unknown[]>(): IMetadataApplication;
|
|
36
|
+
|
|
37
|
+
/** @internal */
|
|
38
|
+
export function metadata(): never {
|
|
39
|
+
NoTransformConfigurationError("reflect.metadata");
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export function name<T, Regular extends boolean = false>(): string;
|
|
43
|
+
export function name(): never;
|
|
44
|
+
export function name(): never {
|
|
45
|
+
NoTransformConfigurationError("reflect.name");
|
|
46
|
+
}
|
|
@@ -1,77 +1,77 @@
|
|
|
1
|
-
import { IJsonSchemaCollection } from "./IJsonSchemaCollection";
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Collection of JSON schemas.
|
|
5
|
-
*
|
|
6
|
-
* @author Jeongho Nam - https://github.com/samchon
|
|
7
|
-
* @deprecated Use {@link IJsonSchemaCollection} instead please. This interface
|
|
8
|
-
* type would be changed to {@link ILlmApplication} like structure in the
|
|
9
|
-
* future version (maybe next v8 major update).
|
|
10
|
-
* @template Version Version of the OpenAPI specification.
|
|
11
|
-
* @template Types Original TypeScript types used in the JSON schemas.
|
|
12
|
-
*/
|
|
13
|
-
export type IJsonApplication = IJsonSchemaCollection;
|
|
14
|
-
export namespace IJsonApplication {
|
|
15
|
-
export type IV3_0 = IJsonSchemaCollection.IV3_0;
|
|
16
|
-
export type IV3_1 = IJsonSchemaCollection.IV3_1;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
// export interface IJsonApplication<
|
|
20
|
-
// Version extends "3.0" | "3.1" = "3.1",
|
|
21
|
-
// App extends any = object,
|
|
22
|
-
// > {
|
|
23
|
-
// version: Version;
|
|
24
|
-
// components: IJsonApplication.IComponents<IJsonApplication.Schema<Version>>;
|
|
25
|
-
// functions: IJsonApplication.IFunction<IJsonApplication.Schema<Version>>[];
|
|
26
|
-
// __application?: App | undefined;
|
|
27
|
-
// }
|
|
28
|
-
// export namespace IJsonApplication {
|
|
29
|
-
// export type Schema<Version extends "3.0" | "3.1"> = Version extends "3.1"
|
|
30
|
-
// ? OpenApi.IJsonSchema
|
|
31
|
-
// : OpenApiV3.IJsonSchema;
|
|
32
|
-
|
|
33
|
-
// export interface IComponents<
|
|
34
|
-
// Schema extends
|
|
35
|
-
// | OpenApi.IJsonSchema
|
|
36
|
-
// | OpenApiV3.IJsonSchema = OpenApi.IJsonSchema,
|
|
37
|
-
// > {
|
|
38
|
-
// schemas?: Record<string, Schema>;
|
|
39
|
-
// }
|
|
40
|
-
|
|
41
|
-
// export interface IFunction<
|
|
42
|
-
// Schema extends
|
|
43
|
-
// | OpenApi.IJsonSchema
|
|
44
|
-
// | OpenApiV3.IJsonSchema = OpenApi.IJsonSchema,
|
|
45
|
-
// > {
|
|
46
|
-
// async: boolean;
|
|
47
|
-
// name: string;
|
|
48
|
-
// parameters: IParameter<Schema>[];
|
|
49
|
-
// output: IOutput<Schema> | undefined;
|
|
50
|
-
// summary?: string | undefined;
|
|
51
|
-
// description?: string | undefined;
|
|
52
|
-
// deprecated?: boolean;
|
|
53
|
-
// tags?: string[];
|
|
54
|
-
// }
|
|
55
|
-
|
|
56
|
-
// export interface IParameter<
|
|
57
|
-
// Schema extends
|
|
58
|
-
// | OpenApi.IJsonSchema
|
|
59
|
-
// | OpenApiV3.IJsonSchema = OpenApi.IJsonSchema,
|
|
60
|
-
// > {
|
|
61
|
-
// name: string;
|
|
62
|
-
// required: boolean;
|
|
63
|
-
// schema: Schema;
|
|
64
|
-
// title?: string | undefined;
|
|
65
|
-
// description?: string | undefined;
|
|
66
|
-
// }
|
|
67
|
-
|
|
68
|
-
// export interface IOutput<
|
|
69
|
-
// Schema extends
|
|
70
|
-
// | OpenApi.IJsonSchema
|
|
71
|
-
// | OpenApiV3.IJsonSchema = OpenApi.IJsonSchema,
|
|
72
|
-
// > {
|
|
73
|
-
// schema: Schema;
|
|
74
|
-
// required: boolean;
|
|
75
|
-
// description?: string | undefined;
|
|
76
|
-
// }
|
|
77
|
-
// }
|
|
1
|
+
import { IJsonSchemaCollection } from "./IJsonSchemaCollection";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Collection of JSON schemas.
|
|
5
|
+
*
|
|
6
|
+
* @author Jeongho Nam - https://github.com/samchon
|
|
7
|
+
* @deprecated Use {@link IJsonSchemaCollection} instead please. This interface
|
|
8
|
+
* type would be changed to {@link ILlmApplication} like structure in the
|
|
9
|
+
* future version (maybe next v8 major update).
|
|
10
|
+
* @template Version Version of the OpenAPI specification.
|
|
11
|
+
* @template Types Original TypeScript types used in the JSON schemas.
|
|
12
|
+
*/
|
|
13
|
+
export type IJsonApplication = IJsonSchemaCollection;
|
|
14
|
+
export namespace IJsonApplication {
|
|
15
|
+
export type IV3_0 = IJsonSchemaCollection.IV3_0;
|
|
16
|
+
export type IV3_1 = IJsonSchemaCollection.IV3_1;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
// export interface IJsonApplication<
|
|
20
|
+
// Version extends "3.0" | "3.1" = "3.1",
|
|
21
|
+
// App extends any = object,
|
|
22
|
+
// > {
|
|
23
|
+
// version: Version;
|
|
24
|
+
// components: IJsonApplication.IComponents<IJsonApplication.Schema<Version>>;
|
|
25
|
+
// functions: IJsonApplication.IFunction<IJsonApplication.Schema<Version>>[];
|
|
26
|
+
// __application?: App | undefined;
|
|
27
|
+
// }
|
|
28
|
+
// export namespace IJsonApplication {
|
|
29
|
+
// export type Schema<Version extends "3.0" | "3.1"> = Version extends "3.1"
|
|
30
|
+
// ? OpenApi.IJsonSchema
|
|
31
|
+
// : OpenApiV3.IJsonSchema;
|
|
32
|
+
|
|
33
|
+
// export interface IComponents<
|
|
34
|
+
// Schema extends
|
|
35
|
+
// | OpenApi.IJsonSchema
|
|
36
|
+
// | OpenApiV3.IJsonSchema = OpenApi.IJsonSchema,
|
|
37
|
+
// > {
|
|
38
|
+
// schemas?: Record<string, Schema>;
|
|
39
|
+
// }
|
|
40
|
+
|
|
41
|
+
// export interface IFunction<
|
|
42
|
+
// Schema extends
|
|
43
|
+
// | OpenApi.IJsonSchema
|
|
44
|
+
// | OpenApiV3.IJsonSchema = OpenApi.IJsonSchema,
|
|
45
|
+
// > {
|
|
46
|
+
// async: boolean;
|
|
47
|
+
// name: string;
|
|
48
|
+
// parameters: IParameter<Schema>[];
|
|
49
|
+
// output: IOutput<Schema> | undefined;
|
|
50
|
+
// summary?: string | undefined;
|
|
51
|
+
// description?: string | undefined;
|
|
52
|
+
// deprecated?: boolean;
|
|
53
|
+
// tags?: string[];
|
|
54
|
+
// }
|
|
55
|
+
|
|
56
|
+
// export interface IParameter<
|
|
57
|
+
// Schema extends
|
|
58
|
+
// | OpenApi.IJsonSchema
|
|
59
|
+
// | OpenApiV3.IJsonSchema = OpenApi.IJsonSchema,
|
|
60
|
+
// > {
|
|
61
|
+
// name: string;
|
|
62
|
+
// required: boolean;
|
|
63
|
+
// schema: Schema;
|
|
64
|
+
// title?: string | undefined;
|
|
65
|
+
// description?: string | undefined;
|
|
66
|
+
// }
|
|
67
|
+
|
|
68
|
+
// export interface IOutput<
|
|
69
|
+
// Schema extends
|
|
70
|
+
// | OpenApi.IJsonSchema
|
|
71
|
+
// | OpenApiV3.IJsonSchema = OpenApi.IJsonSchema,
|
|
72
|
+
// > {
|
|
73
|
+
// schema: Schema;
|
|
74
|
+
// required: boolean;
|
|
75
|
+
// description?: string | undefined;
|
|
76
|
+
// }
|
|
77
|
+
// }
|