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.
Files changed (116) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +153 -153
  3. package/lib/factories/ProtobufFactory.js +1 -1
  4. package/lib/factories/ProtobufFactory.mjs +1 -1
  5. package/lib/programmers/internal/json_schema_station.d.mts +2 -2
  6. package/lib/programmers/internal/json_schema_station.d.ts +2 -2
  7. package/lib/programmers/llm/LlmApplicationProgrammer.js +5 -1
  8. package/lib/programmers/llm/LlmApplicationProgrammer.js.map +1 -1
  9. package/lib/programmers/llm/LlmApplicationProgrammer.mjs +5 -1
  10. package/lib/programmers/llm/LlmSchemaProgrammer.js +1 -4
  11. package/lib/programmers/llm/LlmSchemaProgrammer.js.map +1 -1
  12. package/lib/programmers/llm/LlmSchemaProgrammer.mjs +1 -35
  13. package/package.json +121 -121
  14. package/src/AssertionGuard.ts +41 -41
  15. package/src/CamelCase.ts +75 -75
  16. package/src/IRandomGenerator.ts +337 -337
  17. package/src/IReadableURLSearchParams.ts +9 -9
  18. package/src/PascalCase.ts +71 -71
  19. package/src/Primitive.ts +90 -90
  20. package/src/Resolved.ts +72 -72
  21. package/src/SnakeCase.ts +127 -127
  22. package/src/TypeGuardError.ts +216 -216
  23. package/src/factories/MetadataCollection.ts +270 -270
  24. package/src/factories/MetadataCommentTagFactory.ts +632 -632
  25. package/src/factories/MetadataFactory.ts +402 -402
  26. package/src/factories/ProtobufFactory.ts +873 -873
  27. package/src/functional.ts +705 -705
  28. package/src/http.ts +972 -972
  29. package/src/internal/_ProtobufReader.ts +188 -188
  30. package/src/internal/_ProtobufSizer.ts +137 -137
  31. package/src/internal/_ProtobufWriter.ts +135 -135
  32. package/src/internal/_jsonStringifyString.ts +42 -42
  33. package/src/json.ts +643 -643
  34. package/src/llm.ts +615 -615
  35. package/src/misc.ts +594 -594
  36. package/src/module.ts +889 -889
  37. package/src/notations.ts +751 -751
  38. package/src/programmers/FeatureProgrammer.ts +605 -605
  39. package/src/programmers/ImportProgrammer.ts +179 -179
  40. package/src/programmers/RandomProgrammer.ts +1195 -1195
  41. package/src/programmers/helpers/ProtobufWire.ts +34 -34
  42. package/src/programmers/internal/check_array_length.ts +43 -43
  43. package/src/programmers/internal/check_bigint.ts +46 -46
  44. package/src/programmers/internal/check_dynamic_key.ts +197 -197
  45. package/src/programmers/internal/check_dynamic_properties.ts +231 -231
  46. package/src/programmers/internal/check_everything.ts +21 -21
  47. package/src/programmers/internal/check_native.ts +23 -23
  48. package/src/programmers/internal/check_number.ts +108 -108
  49. package/src/programmers/internal/check_object.ts +72 -72
  50. package/src/programmers/internal/check_string.ts +46 -46
  51. package/src/programmers/internal/check_template.ts +46 -46
  52. package/src/programmers/internal/check_union_array_like.ts +331 -331
  53. package/src/programmers/internal/decode_union_object.ts +110 -110
  54. package/src/programmers/internal/feature_object_entries.ts +59 -59
  55. package/src/programmers/internal/json_schema_escaped.ts +78 -78
  56. package/src/programmers/internal/json_schema_object.ts +150 -150
  57. package/src/programmers/internal/json_schema_station.ts +2 -2
  58. package/src/programmers/internal/metadata_to_pattern.ts +40 -40
  59. package/src/programmers/internal/postfix_of_tuple.ts +3 -3
  60. package/src/programmers/internal/prune_object_properties.ts +69 -69
  61. package/src/programmers/internal/stringify_dynamic_properties.ts +158 -158
  62. package/src/programmers/internal/stringify_native.ts +5 -5
  63. package/src/programmers/internal/stringify_regular_properties.ts +77 -77
  64. package/src/programmers/internal/template_to_pattern.ts +21 -21
  65. package/src/programmers/internal/wrap_metadata_rest_tuple.ts +21 -21
  66. package/src/programmers/json/JsonStringifyProgrammer.ts +1124 -1124
  67. package/src/programmers/llm/LlmApplicationProgrammer.ts +10 -1
  68. package/src/programmers/llm/LlmSchemaProgrammer.ts +2 -7
  69. package/src/protobuf.ts +820 -820
  70. package/src/reflect.ts +46 -46
  71. package/src/schemas/json/IJsonApplication.ts +77 -77
  72. package/src/schemas/json/IJsonSchemaCollection.ts +212 -212
  73. package/src/schemas/json/IJsonSchemaUnit.ts +263 -263
  74. package/src/schemas/metadata/IMetadataTypeTag.ts +14 -14
  75. package/src/schemas/metadata/Metadata.ts +669 -669
  76. package/src/schemas/metadata/MetadataAliasType.ts +57 -57
  77. package/src/schemas/metadata/MetadataApplication.ts +40 -40
  78. package/src/schemas/metadata/MetadataArray.ts +47 -47
  79. package/src/schemas/metadata/MetadataArrayType.ts +51 -51
  80. package/src/schemas/metadata/MetadataAtomic.ts +85 -85
  81. package/src/schemas/metadata/MetadataEscaped.ts +45 -45
  82. package/src/schemas/metadata/MetadataFunction.ts +45 -45
  83. package/src/schemas/metadata/MetadataObject.ts +46 -46
  84. package/src/schemas/metadata/MetadataObjectType.ts +137 -137
  85. package/src/schemas/metadata/MetadataParameter.ts +52 -52
  86. package/src/schemas/metadata/MetadataProperty.ts +53 -53
  87. package/src/schemas/metadata/MetadataTemplate.ts +78 -78
  88. package/src/schemas/metadata/MetadataTuple.ts +28 -28
  89. package/src/schemas/metadata/MetadataTupleType.ts +61 -61
  90. package/src/tags/Constant.ts +47 -47
  91. package/src/tags/ContentMediaType.ts +27 -27
  92. package/src/tags/Default.ts +52 -52
  93. package/src/tags/Example.ts +56 -56
  94. package/src/tags/Examples.ts +56 -56
  95. package/src/tags/ExclusiveMaximum.ts +44 -44
  96. package/src/tags/ExclusiveMinimum.ts +44 -44
  97. package/src/tags/Format.ts +78 -78
  98. package/src/tags/JsonSchemaPlugin.ts +36 -36
  99. package/src/tags/MaxItems.ts +31 -31
  100. package/src/tags/MaxLength.ts +25 -25
  101. package/src/tags/Maximum.ts +39 -39
  102. package/src/tags/MinItems.ts +31 -31
  103. package/src/tags/MinLength.ts +25 -25
  104. package/src/tags/Minimum.ts +39 -39
  105. package/src/tags/MultipleOf.ts +42 -42
  106. package/src/tags/Pattern.ts +49 -49
  107. package/src/tags/Sequence.ts +37 -37
  108. package/src/tags/TagBase.ts +102 -102
  109. package/src/tags/Type.ts +64 -64
  110. package/src/tags/UniqueItems.ts +34 -34
  111. package/src/tags/internal/FormatCheatSheet.ts +71 -71
  112. package/src/transformers/ITransformOptions.ts +70 -70
  113. package/src/transformers/ImportTransformer.ts +253 -253
  114. package/src/transformers/NoTransformConfigurationError.ts +16 -16
  115. package/src/transformers/features/llm/LlmApplicationTransformer.ts +224 -224
  116. 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
+ // }