typia 3.4.15 → 3.5.0-dev.20221222

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 (169) hide show
  1. package/README.md +48 -7
  2. package/lib/factories/MetadataCollection.d.ts +1 -9
  3. package/lib/factories/MetadataCollection.js +2 -75
  4. package/lib/factories/MetadataCollection.js.map +1 -1
  5. package/lib/factories/ProtocolFactory.d.ts +8 -0
  6. package/lib/factories/ProtocolFactory.js +119 -0
  7. package/lib/factories/ProtocolFactory.js.map +1 -0
  8. package/lib/factories/internal/protocols/ProtocolMetadataUtil.d.ts +11 -0
  9. package/lib/factories/internal/protocols/ProtocolMetadataUtil.js +76 -0
  10. package/lib/factories/internal/protocols/ProtocolMetadataUtil.js.map +1 -0
  11. package/lib/factories/internal/protocols/emplace_protocol_object.d.ts +3 -0
  12. package/lib/factories/internal/protocols/emplace_protocol_object.js +47 -0
  13. package/lib/factories/internal/protocols/emplace_protocol_object.js.map +1 -0
  14. package/lib/factories/internal/protocols/emplace_protocol_property.d.ts +4 -0
  15. package/lib/factories/internal/protocols/emplace_protocol_property.js +20 -0
  16. package/lib/factories/internal/protocols/emplace_protocol_property.js.map +1 -0
  17. package/lib/factories/internal/protocols/iterate_protocol_atomic.d.ts +3 -0
  18. package/lib/factories/internal/protocols/iterate_protocol_atomic.js +69 -0
  19. package/lib/factories/internal/protocols/iterate_protocol_atomic.js.map +1 -0
  20. package/lib/factories/internal/protocols/iterate_protocol_constant.d.ts +2 -0
  21. package/lib/factories/internal/protocols/iterate_protocol_constant.js +30 -0
  22. package/lib/factories/internal/protocols/iterate_protocol_constant.js.map +1 -0
  23. package/lib/factories/internal/protocols/iterate_protocol_main.d.ts +3 -0
  24. package/lib/factories/internal/protocols/iterate_protocol_main.js +17 -0
  25. package/lib/factories/internal/protocols/iterate_protocol_main.js.map +1 -0
  26. package/lib/factories/internal/protocols/iterate_protocol_map.d.ts +3 -0
  27. package/lib/factories/internal/protocols/iterate_protocol_map.js +71 -0
  28. package/lib/factories/internal/protocols/iterate_protocol_map.js.map +1 -0
  29. package/lib/factories/internal/protocols/iterate_protocol_metadata.d.ts +5 -0
  30. package/lib/factories/internal/protocols/iterate_protocol_metadata.js +192 -0
  31. package/lib/factories/internal/protocols/iterate_protocol_metadata.js.map +1 -0
  32. package/lib/factories/internal/protocols/iterate_protocol_native.d.ts +2 -0
  33. package/lib/factories/internal/protocols/iterate_protocol_native.js +33 -0
  34. package/lib/factories/internal/protocols/iterate_protocol_native.js.map +1 -0
  35. package/lib/factories/internal/protocols/iterate_protocol_repeated.d.ts +4 -0
  36. package/lib/factories/internal/protocols/iterate_protocol_repeated.js +24 -0
  37. package/lib/factories/internal/protocols/iterate_protocol_repeated.js.map +1 -0
  38. package/lib/factories/internal/protocols/iterate_protocol_tuple.d.ts +3 -0
  39. package/lib/factories/internal/protocols/iterate_protocol_tuple.js +46 -0
  40. package/lib/factories/internal/protocols/iterate_protocol_tuple.js.map +1 -0
  41. package/lib/functional/$proto_bytes.d.ts +2 -0
  42. package/lib/functional/$proto_bytes.js +37 -0
  43. package/lib/functional/$proto_bytes.js.map +1 -0
  44. package/lib/functional/$proto_field.d.ts +10 -0
  45. package/lib/functional/$proto_field.js +42 -0
  46. package/lib/functional/$proto_field.js.map +1 -0
  47. package/lib/functional/$proto_float.d.ts +4 -0
  48. package/lib/functional/$proto_float.js +28 -0
  49. package/lib/functional/$proto_float.js.map +1 -0
  50. package/lib/functional/$proto_i32.d.ts +2 -0
  51. package/lib/functional/$proto_i32.js +23 -0
  52. package/lib/functional/$proto_i32.js.map +1 -0
  53. package/lib/functional/$proto_i64.d.ts +2 -0
  54. package/lib/functional/$proto_i64.js +31 -0
  55. package/lib/functional/$proto_i64.js.map +1 -0
  56. package/lib/functional/$proto_size.d.ts +6 -0
  57. package/lib/functional/$proto_size.js +76 -0
  58. package/lib/functional/$proto_size.js.map +1 -0
  59. package/lib/functional/$proto_string.d.ts +2 -0
  60. package/lib/functional/$proto_string.js +34 -0
  61. package/lib/functional/$proto_string.js.map +1 -0
  62. package/lib/functional/$varint.d.ts +6 -0
  63. package/lib/functional/$varint.js +99 -0
  64. package/lib/functional/$varint.js.map +1 -0
  65. package/lib/functional/$zigzag.d.ts +4 -0
  66. package/lib/functional/$zigzag.js +34 -0
  67. package/lib/functional/$zigzag.js.map +1 -0
  68. package/lib/messages/IProtocolMessage.d.ts +5 -0
  69. package/lib/messages/IProtocolMessage.js +3 -0
  70. package/lib/messages/IProtocolMessage.js.map +1 -0
  71. package/lib/messages/IProtocolProperty.d.ts +11 -0
  72. package/lib/messages/IProtocolProperty.js +3 -0
  73. package/lib/messages/IProtocolProperty.js.map +1 -0
  74. package/lib/metadata/IMetadataTag.d.ts +7 -3
  75. package/lib/metadata/Metadata.js +1 -1
  76. package/lib/metadata/Metadata.js.map +1 -1
  77. package/lib/module.d.ts +2 -0
  78. package/lib/module.js +5 -1
  79. package/lib/module.js.map +1 -1
  80. package/lib/programmers/MessageProgrammer.d.ts +5 -0
  81. package/lib/programmers/MessageProgrammer.js +134 -0
  82. package/lib/programmers/MessageProgrammer.js.map +1 -0
  83. package/lib/programmers/internal/application_object.js +9 -9
  84. package/lib/programmers/internal/application_object.js.map +1 -1
  85. package/lib/programmers/internal/application_schema.js +5 -3
  86. package/lib/programmers/internal/application_schema.js.map +1 -1
  87. package/lib/transformers/CallExpressionTransformer.js +3 -1
  88. package/lib/transformers/CallExpressionTransformer.js.map +1 -1
  89. package/lib/transformers/features/miscellaneous/ApplicationTransformer.js +1 -3
  90. package/lib/transformers/features/miscellaneous/ApplicationTransformer.js.map +1 -1
  91. package/lib/transformers/features/protocols/MessageTransformer.d.ts +5 -0
  92. package/lib/transformers/features/protocols/MessageTransformer.js +17 -0
  93. package/lib/transformers/features/protocols/MessageTransformer.js.map +1 -0
  94. package/lib/utils/NameEncoder.d.ts +4 -0
  95. package/lib/utils/NameEncoder.js +89 -0
  96. package/lib/utils/NameEncoder.js.map +1 -0
  97. package/package.json +2 -3
  98. package/src/executable/internal/TypiaSetupWizard.ts +173 -173
  99. package/src/factories/MetadataCollection.ts +83 -122
  100. package/src/factories/MetadataFactory.ts +47 -47
  101. package/src/factories/MetadataTagFactory.ts +351 -351
  102. package/src/factories/ProtocolFactory.ts +92 -0
  103. package/src/factories/internal/metadata/MetadataHelper.ts +12 -12
  104. package/src/factories/internal/metadata/emplace_metadata_object.ts +140 -140
  105. package/src/factories/internal/metadata/explore_metadata.ts +92 -92
  106. package/src/factories/internal/metadata/iterate_metadata.ts +80 -80
  107. package/src/factories/internal/metadata/iterate_metadata_array.ts +29 -29
  108. package/src/factories/internal/metadata/iterate_metadata_atomic.ts +59 -59
  109. package/src/factories/internal/metadata/iterate_metadata_coalesce.ts +33 -33
  110. package/src/factories/internal/metadata/iterate_metadata_constant.ts +58 -58
  111. package/src/factories/internal/metadata/iterate_metadata_map.ts +41 -41
  112. package/src/factories/internal/metadata/iterate_metadata_native.ts +227 -227
  113. package/src/factories/internal/metadata/iterate_metadata_object.ts +48 -48
  114. package/src/factories/internal/metadata/iterate_metadata_resolve.ts +27 -27
  115. package/src/factories/internal/metadata/iterate_metadata_set.ts +33 -33
  116. package/src/factories/internal/metadata/iterate_metadata_template.ts +38 -38
  117. package/src/factories/internal/metadata/iterate_metadata_tuple.ts +45 -45
  118. package/src/factories/internal/metadata/iterate_metadata_union.ts +59 -59
  119. package/src/factories/internal/protocols/ProtocolMetadataUtil.ts +81 -0
  120. package/src/factories/internal/protocols/emplace_protocol_object.ts +25 -0
  121. package/src/factories/internal/protocols/emplace_protocol_property.ts +12 -0
  122. package/src/factories/internal/protocols/iterate_protocol_atomic.ts +34 -0
  123. package/src/factories/internal/protocols/iterate_protocol_constant.ts +27 -0
  124. package/src/factories/internal/protocols/iterate_protocol_main.ts +19 -0
  125. package/src/factories/internal/protocols/iterate_protocol_map.ts +38 -0
  126. package/src/factories/internal/protocols/iterate_protocol_metadata.ts +76 -0
  127. package/src/factories/internal/protocols/iterate_protocol_native.ts +34 -0
  128. package/src/factories/internal/protocols/iterate_protocol_repeated.ts +25 -0
  129. package/src/factories/internal/protocols/iterate_protocol_tuple.ts +25 -0
  130. package/src/functional/$number.ts +12 -12
  131. package/src/functional/$proto_bytes.ts +25 -0
  132. package/src/functional/$proto_field.ts +30 -0
  133. package/src/functional/$proto_float.ts +37 -0
  134. package/src/functional/$proto_i32.ts +29 -0
  135. package/src/functional/$proto_i64.ts +37 -0
  136. package/src/functional/$proto_size.ts +82 -0
  137. package/src/functional/$proto_string.ts +24 -0
  138. package/src/functional/$varint.ts +130 -0
  139. package/src/functional/$zigzag.ts +39 -0
  140. package/src/messages/IProtocolMessage.ts +6 -0
  141. package/src/messages/IProtocolProperty.ts +11 -0
  142. package/src/metadata/IMetadataTag.ts +137 -122
  143. package/src/metadata/Metadata.ts +479 -477
  144. package/src/module.ts +1547 -1535
  145. package/src/programmers/AssertParseProgrammer.ts +55 -55
  146. package/src/programmers/AssertProgrammer.ts +445 -445
  147. package/src/programmers/AssertStringifyProgrammer.ts +65 -65
  148. package/src/programmers/CheckerProgrammer.ts +810 -810
  149. package/src/programmers/IsParseProgrammer.ts +61 -61
  150. package/src/programmers/IsProgrammer.ts +175 -175
  151. package/src/programmers/IsStringifyProgrammer.ts +69 -69
  152. package/src/programmers/MessageProgrammer.ts +116 -0
  153. package/src/programmers/StringifyProgrammer.ts +762 -762
  154. package/src/programmers/ValidateParseProgrammer.ts +59 -59
  155. package/src/programmers/ValidateProgrammer.ts +237 -237
  156. package/src/programmers/ValidateStringifyProgrammer.ts +80 -80
  157. package/src/programmers/helpers/OptionPredicator.ts +15 -15
  158. package/src/programmers/internal/application_default.ts +17 -17
  159. package/src/programmers/internal/application_object.ts +5 -5
  160. package/src/programmers/internal/application_schema.ts +231 -228
  161. package/src/programmers/internal/check_bigint.ts +85 -85
  162. package/src/programmers/internal/check_number.ts +175 -175
  163. package/src/schemas/IJsonSchema.ts +90 -90
  164. package/src/transformers/CallExpressionTransformer.ts +131 -124
  165. package/src/transformers/ITransformOptions.ts +47 -47
  166. package/src/transformers/features/miscellaneous/ApplicationTransformer.ts +117 -119
  167. package/src/transformers/features/protocols/MessageTransformer.ts +32 -0
  168. package/src/transformers/features/stringifiers/StringifyTransformer.ts +46 -46
  169. package/src/utils/NameEncoder.ts +32 -0
@@ -1,122 +1,137 @@
1
- export type IMetadataTag =
2
- // ARRAY
3
- | IMetadataTag.IItems
4
- | IMetadataTag.IMinItems
5
- | IMetadataTag.IMaxItems
6
- // STRING
7
- | IMetadataTag.IFormat
8
- | IMetadataTag.IPattern
9
- | IMetadataTag.ILength
10
- | IMetadataTag.IMinLength
11
- | IMetadataTag.IMaxLength
12
- // NUMBER
13
- | IMetadataTag.IType
14
- | IMetadataTag.IRange
15
- | IMetadataTag.IMinimum
16
- | IMetadataTag.IMaximum
17
- | IMetadataTag.IExclusiveMinimum
18
- | IMetadataTag.IExclusiveMaximum
19
- | IMetadataTag.IMultipleOf
20
- | IMetadataTag.IStep;
21
-
22
- export namespace IMetadataTag {
23
- /* -----------------------------------------------------------
24
- ARRAY
25
- ----------------------------------------------------------- */
26
- export interface IItems {
27
- kind: "items";
28
- minimum?: ISign;
29
- maximum?: ISign;
30
- }
31
-
32
- export interface IMinItems {
33
- kind: "minItems";
34
- value: number;
35
- }
36
-
37
- export interface IMaxItems {
38
- kind: "maxItems";
39
- value: number;
40
- }
41
-
42
- /* -----------------------------------------------------------
43
- STRING
44
- ----------------------------------------------------------- */
45
- export interface IFormat {
46
- kind: "format";
47
- value: "uuid" | "email" | "url" | "ipv4" | "ipv6";
48
- }
49
-
50
- export interface IPattern {
51
- kind: "pattern";
52
- value: string;
53
- }
54
-
55
- export interface ILength {
56
- kind: "length";
57
- minimum?: ISign;
58
- maximum?: ISign;
59
- }
60
-
61
- export interface IMinLength {
62
- kind: "minLength";
63
- value: number;
64
- }
65
-
66
- export interface IMaxLength {
67
- kind: "maxLength";
68
- value: number;
69
- }
70
-
71
- /* -----------------------------------------------------------
72
- NUMBER
73
- ----------------------------------------------------------- */
74
- export interface IType {
75
- kind: "type";
76
- value: "int" | "uint";
77
- }
78
-
79
- export interface IRange {
80
- kind: "range";
81
- minimum?: ISign;
82
- maximum?: ISign;
83
- }
84
-
85
- export interface IMinimum {
86
- kind: "minimum";
87
- value: number;
88
- }
89
-
90
- export interface IMaximum {
91
- kind: "maximum";
92
- value: number;
93
- }
94
-
95
- export interface IExclusiveMinimum {
96
- kind: "exclusiveMinimum";
97
- value: number;
98
- }
99
-
100
- export interface IExclusiveMaximum {
101
- kind: "exclusiveMaximum";
102
- value: number;
103
- }
104
-
105
- export interface IMultipleOf {
106
- kind: "multipleOf";
107
- value: number;
108
- }
109
-
110
- export interface IStep {
111
- kind: "step";
112
- value: number;
113
- }
114
-
115
- /* -----------------------------------------------------------
116
- MISCELLANEOUS
117
- ----------------------------------------------------------- */
118
- export interface ISign {
119
- include: boolean;
120
- value: number;
121
- }
122
- }
1
+ export type IMetadataTag =
2
+ // ARRAY
3
+ | IMetadataTag.IItems
4
+ | IMetadataTag.IMinItems
5
+ | IMetadataTag.IMaxItems
6
+ // STRING
7
+ | IMetadataTag.IFormat
8
+ | IMetadataTag.IPattern
9
+ | IMetadataTag.ILength
10
+ | IMetadataTag.IMinLength
11
+ | IMetadataTag.IMaxLength
12
+ // NUMBER
13
+ | IMetadataTag.INumberType
14
+ | IMetadataTag.IRange
15
+ | IMetadataTag.IMinimum
16
+ | IMetadataTag.IMaximum
17
+ | IMetadataTag.IExclusiveMinimum
18
+ | IMetadataTag.IExclusiveMaximum
19
+ | IMetadataTag.IMultipleOf
20
+ | IMetadataTag.IStep
21
+ // BIGINT
22
+ | IMetadataTag.IBigintType;
23
+
24
+ export namespace IMetadataTag {
25
+ /* -----------------------------------------------------------
26
+ ARRAY
27
+ ----------------------------------------------------------- */
28
+ export interface IItems {
29
+ kind: "items";
30
+ minimum?: ISign;
31
+ maximum?: ISign;
32
+ }
33
+
34
+ export interface IMinItems {
35
+ kind: "minItems";
36
+ value: number;
37
+ }
38
+
39
+ export interface IMaxItems {
40
+ kind: "maxItems";
41
+ value: number;
42
+ }
43
+
44
+ /* -----------------------------------------------------------
45
+ STRING
46
+ ----------------------------------------------------------- */
47
+ export interface IFormat {
48
+ kind: "format";
49
+ value: "uuid" | "email" | "url" | "ipv4" | "ipv6";
50
+ }
51
+
52
+ export interface IPattern {
53
+ kind: "pattern";
54
+ value: string;
55
+ }
56
+
57
+ export interface ILength {
58
+ kind: "length";
59
+ minimum?: ISign;
60
+ maximum?: ISign;
61
+ }
62
+
63
+ export interface IMinLength {
64
+ kind: "minLength";
65
+ value: number;
66
+ }
67
+
68
+ export interface IMaxLength {
69
+ kind: "maxLength";
70
+ value: number;
71
+ }
72
+
73
+ /* -----------------------------------------------------------
74
+ NUMBER
75
+ ----------------------------------------------------------- */
76
+ export interface INumberType {
77
+ kind: "type";
78
+ value:
79
+ | "int"
80
+ | "uint"
81
+ | "int32"
82
+ | "uint32"
83
+ | "int64"
84
+ | "uint64"
85
+ | "float"
86
+ | "double";
87
+ }
88
+
89
+ export interface IRange {
90
+ kind: "range";
91
+ minimum?: ISign;
92
+ maximum?: ISign;
93
+ }
94
+
95
+ export interface IMinimum {
96
+ kind: "minimum";
97
+ value: number;
98
+ }
99
+
100
+ export interface IMaximum {
101
+ kind: "maximum";
102
+ value: number;
103
+ }
104
+
105
+ export interface IExclusiveMinimum {
106
+ kind: "exclusiveMinimum";
107
+ value: number;
108
+ }
109
+
110
+ export interface IExclusiveMaximum {
111
+ kind: "exclusiveMaximum";
112
+ value: number;
113
+ }
114
+
115
+ export interface IMultipleOf {
116
+ kind: "multipleOf";
117
+ value: number;
118
+ }
119
+
120
+ export interface IStep {
121
+ kind: "step";
122
+ value: number;
123
+ }
124
+
125
+ /* -----------------------------------------------------------
126
+ MISCELLANEOUS
127
+ ----------------------------------------------------------- */
128
+ export interface IBigintType {
129
+ kind: "type";
130
+ value: "int64" | "uint64";
131
+ }
132
+
133
+ export interface ISign {
134
+ include: boolean;
135
+ value: number;
136
+ }
137
+ }