@nxtedition/types 23.0.39 → 23.0.41

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 (243) hide show
  1. package/dist/app.d.ts +0 -51
  2. package/dist/app.js +1 -823
  3. package/dist/common/block.d.ts +6 -13
  4. package/dist/common/block.js +597 -1607
  5. package/dist/common/clone.d.ts +0 -19
  6. package/dist/common/clone.js +1 -602
  7. package/dist/common/date.d.ts +0 -7
  8. package/dist/common/date.js +1 -59
  9. package/dist/common/error.d.ts +0 -7
  10. package/dist/common/error.js +1 -404
  11. package/dist/common/file.d.ts +1 -21
  12. package/dist/common/file.js +782 -2521
  13. package/dist/common/index.d.ts +20 -26
  14. package/dist/common/index.js +20 -134
  15. package/dist/common/location.d.ts +0 -6
  16. package/dist/common/location.js +73 -238
  17. package/dist/common/lock.d.ts +1 -8
  18. package/dist/common/lock.js +1 -211
  19. package/dist/common/media.d.ts +0 -7
  20. package/dist/common/media.js +1 -83
  21. package/dist/common/nxtpression.d.ts +2 -9
  22. package/dist/common/nxtpression.js +1 -277
  23. package/dist/common/pipeline.d.ts +0 -7
  24. package/dist/common/pipeline.js +1 -97
  25. package/dist/common/promoted-tag.d.ts +0 -7
  26. package/dist/common/promoted-tag.js +1 -147
  27. package/dist/common/render-preset.d.ts +2 -15
  28. package/dist/common/render-preset.js +1 -1202
  29. package/dist/common/render-profile.d.ts +0 -19
  30. package/dist/common/render-profile.js +1 -1052
  31. package/dist/common/render-query.d.ts +2 -9
  32. package/dist/common/render-query.js +1 -1754
  33. package/dist/common/render-scene.d.ts +2 -15
  34. package/dist/common/render-scene.js +1 -2230
  35. package/dist/common/rule.d.ts +1 -7
  36. package/dist/common/rule.js +84 -254
  37. package/dist/common/search.d.ts +0 -25
  38. package/dist/common/search.js +1 -1591
  39. package/dist/common/settings.d.ts +128 -121
  40. package/dist/common/settings.js +1 -6936
  41. package/dist/common/subtitle-style.d.ts +25 -0
  42. package/dist/common/user-notification.d.ts +0 -7
  43. package/dist/common/user-notification.js +1 -85
  44. package/dist/index.d.ts +5 -85
  45. package/dist/index.js +5 -187
  46. package/dist/nxtpression.d.ts +732 -344
  47. package/dist/nxtpression.js +1 -323
  48. package/dist/records/domains/asset.d.ts +106 -0
  49. package/dist/records/domains/bundle.d.ts +12 -0
  50. package/dist/records/domains/bundle.js +1 -0
  51. package/dist/records/domains/clone.d.ts +7 -0
  52. package/dist/records/domains/clone.js +1 -0
  53. package/dist/records/domains/comment-reaction.d.ts +8 -0
  54. package/dist/records/domains/comment-reaction.js +1 -0
  55. package/dist/records/domains/comment-read-mark.d.ts +8 -0
  56. package/dist/records/domains/comment-read-mark.js +1 -0
  57. package/dist/records/domains/comment.d.ts +81 -0
  58. package/dist/records/domains/comment.js +19 -0
  59. package/dist/records/domains/connection.d.ts +77 -0
  60. package/dist/records/domains/connection.js +1 -0
  61. package/dist/records/domains/contact.d.ts +9 -0
  62. package/dist/records/domains/contact.js +1 -0
  63. package/dist/records/domains/deepstream.d.ts +7 -0
  64. package/dist/records/domains/deepstream.js +1 -0
  65. package/dist/records/domains/design.d.ts +11 -0
  66. package/dist/records/domains/design.js +1 -0
  67. package/dist/records/domains/edit.d.ts +10 -0
  68. package/dist/records/domains/edit.js +1 -0
  69. package/dist/records/domains/event.d.ts +66 -0
  70. package/dist/records/domains/event.js +1 -0
  71. package/dist/records/domains/file.d.ts +26 -0
  72. package/dist/records/domains/file.js +1 -0
  73. package/dist/records/domains/general.d.ts +41 -0
  74. package/dist/records/domains/general.js +1 -0
  75. package/dist/records/domains/index.d.ts +77 -0
  76. package/dist/records/domains/index.js +38 -0
  77. package/dist/records/domains/media.d.ts +64 -0
  78. package/dist/records/domains/media.js +1 -0
  79. package/dist/records/domains/monitor.d.ts +116 -0
  80. package/dist/records/domains/monitor.js +1 -0
  81. package/dist/records/domains/panel.d.ts +55 -0
  82. package/dist/records/domains/panel.js +1 -0
  83. package/dist/records/domains/permission.d.ts +25 -0
  84. package/dist/records/domains/permission.js +2 -0
  85. package/dist/records/domains/pipeline-preset.d.ts +10 -0
  86. package/dist/records/domains/pipeline-preset.js +1 -0
  87. package/dist/records/domains/pipeline.d.ts +17 -0
  88. package/dist/records/domains/pipeline.js +1 -0
  89. package/dist/records/domains/planning.d.ts +14 -0
  90. package/dist/records/domains/planning.js +1 -0
  91. package/dist/records/domains/prompter.d.ts +18 -0
  92. package/dist/records/domains/prompter.js +1 -0
  93. package/dist/records/domains/publish.d.ts +145 -0
  94. package/dist/records/domains/publish.js +1 -0
  95. package/dist/records/domains/published.d.ts +12 -0
  96. package/dist/records/domains/published.js +1 -0
  97. package/dist/records/domains/render-preset.d.ts +5 -0
  98. package/dist/records/domains/render-preset.js +1 -0
  99. package/dist/records/domains/render.d.ts +115 -0
  100. package/dist/records/domains/render.js +1 -0
  101. package/dist/records/domains/revs.d.ts +6 -0
  102. package/dist/records/domains/revs.js +1 -0
  103. package/dist/records/domains/role.d.ts +6 -0
  104. package/dist/records/domains/role.js +1 -0
  105. package/dist/records/domains/script.d.ts +101 -0
  106. package/dist/records/domains/script.js +1 -0
  107. package/dist/records/domains/search.d.ts +9 -0
  108. package/dist/records/domains/search.js +1 -0
  109. package/dist/records/domains/settings.d.ts +5 -0
  110. package/dist/records/domains/settings.js +1 -0
  111. package/dist/records/domains/storyboard.d.ts +10 -0
  112. package/dist/records/domains/storyboard.js +1 -0
  113. package/dist/records/domains/subtitle-style.d.ts +13 -0
  114. package/dist/records/domains/subtitle-style.js +1 -0
  115. package/dist/records/domains/subtitle.d.ts +12 -0
  116. package/dist/records/domains/subtitle.js +1 -0
  117. package/dist/records/domains/template.d.ts +10 -0
  118. package/dist/records/domains/template.js +1 -0
  119. package/dist/records/domains/user-notification-status.d.ts +30 -0
  120. package/dist/records/domains/user-notification-status.js +1 -0
  121. package/dist/records/domains/user-notification.d.ts +69 -0
  122. package/dist/records/domains/user-notification.js +1 -0
  123. package/dist/records/domains/user.d.ts +23 -0
  124. package/dist/records/domains/user.js +1 -0
  125. package/dist/records/exact/asset.d.ts +83 -0
  126. package/dist/records/exact/asset.js +1 -0
  127. package/dist/records/exact/index.d.ts +36 -0
  128. package/dist/records/exact/index.js +4 -0
  129. package/dist/records/exact/media.d.ts +52 -0
  130. package/dist/records/exact/media.js +1 -0
  131. package/dist/records/exact/monitor.d.ts +46 -0
  132. package/dist/records/exact/monitor.js +1 -0
  133. package/dist/records/exact/storage.d.ts +32 -0
  134. package/dist/records/exact/storage.js +1 -0
  135. package/dist/records/index.d.ts +10 -0
  136. package/dist/records/index.js +2 -0
  137. package/dist/records/utils.d.ts +7 -0
  138. package/dist/records/utils.js +1 -0
  139. package/dist/records/utils.tds.d.ts +1 -0
  140. package/dist/records/utils.tds.js +7 -0
  141. package/dist/records/validate/assert-guard.d.ts +4 -0
  142. package/dist/records/validate/assert-guard.js +15861 -0
  143. package/dist/records/validate/assert.d.ts +4 -0
  144. package/dist/records/validate/assert.js +15990 -0
  145. package/dist/records/validate/is.d.ts +4 -0
  146. package/dist/records/validate/is.js +1017 -0
  147. package/dist/records/validate/schemas.d.ts +9 -0
  148. package/dist/records/validate/schemas.js +12613 -0
  149. package/dist/records/validate/stringify.d.ts +4 -0
  150. package/dist/records/validate/stringify.js +1904 -0
  151. package/dist/records/validate/utils.d.ts +15 -0
  152. package/dist/records/validate/utils.js +18 -0
  153. package/dist/records/validate/utils.test.d.ts +1 -0
  154. package/dist/records/validate/utils.test.js +35 -0
  155. package/dist/records/validate/validate.d.ts +5 -0
  156. package/dist/records/validate/validate.js +14943 -0
  157. package/dist/rpc.d.ts +13 -14
  158. package/dist/rpc.js +126 -511
  159. package/dist/tsdoc-metadata.json +1 -1
  160. package/package.json +26 -15
  161. package/dist/asset.d.ts +0 -72
  162. package/dist/domains/asset.d.ts +0 -227
  163. package/dist/domains/asset.js +0 -2672
  164. package/dist/domains/bundle.d.ts +0 -25
  165. package/dist/domains/bundle.js +0 -512
  166. package/dist/domains/clone.d.ts +0 -14
  167. package/dist/domains/clone.js +0 -192
  168. package/dist/domains/comment-reaction.d.ts +0 -15
  169. package/dist/domains/comment-reaction.js +0 -115
  170. package/dist/domains/comment-read-mark.d.ts +0 -15
  171. package/dist/domains/comment-read-mark.js +0 -115
  172. package/dist/domains/comment.d.ts +0 -153
  173. package/dist/domains/comment.js +0 -5906
  174. package/dist/domains/connection.d.ts +0 -141
  175. package/dist/domains/connection.js +0 -5860
  176. package/dist/domains/contact.d.ts +0 -16
  177. package/dist/domains/contact.js +0 -149
  178. package/dist/domains/deepstream.d.ts +0 -14
  179. package/dist/domains/deepstream.js +0 -139
  180. package/dist/domains/design.d.ts +0 -24
  181. package/dist/domains/design.js +0 -303
  182. package/dist/domains/edit.d.ts +0 -17
  183. package/dist/domains/edit.js +0 -224
  184. package/dist/domains/event.d.ts +0 -42
  185. package/dist/domains/event.js +0 -754
  186. package/dist/domains/file.d.ts +0 -51
  187. package/dist/domains/file.js +0 -2506
  188. package/dist/domains/general.d.ts +0 -84
  189. package/dist/domains/general.js +0 -906
  190. package/dist/domains/index.d.ts +0 -75
  191. package/dist/domains/index.js +0 -37
  192. package/dist/domains/media.d.ts +0 -113
  193. package/dist/domains/media.js +0 -4553
  194. package/dist/domains/monitor.d.ts +0 -416
  195. package/dist/domains/monitor.js +0 -6382
  196. package/dist/domains/panel.d.ts +0 -371
  197. package/dist/domains/panel.js +0 -3198
  198. package/dist/domains/permission.d.ts +0 -61
  199. package/dist/domains/permission.js +0 -1926
  200. package/dist/domains/pipeline-preset.d.ts +0 -17
  201. package/dist/domains/pipeline-preset.js +0 -236
  202. package/dist/domains/pipeline.d.ts +0 -30
  203. package/dist/domains/pipeline.js +0 -460
  204. package/dist/domains/planning.d.ts +0 -33
  205. package/dist/domains/planning.js +0 -324
  206. package/dist/domains/publish.d.ts +0 -1397
  207. package/dist/domains/publish.js +0 -34436
  208. package/dist/domains/published.d.ts +0 -19
  209. package/dist/domains/published.js +0 -204
  210. package/dist/domains/render-preset.d.ts +0 -4
  211. package/dist/domains/render.d.ts +0 -172
  212. package/dist/domains/render.js +0 -4783
  213. package/dist/domains/revs.d.ts +0 -13
  214. package/dist/domains/revs.js +0 -125
  215. package/dist/domains/role.d.ts +0 -13
  216. package/dist/domains/role.js +0 -119
  217. package/dist/domains/script.d.ts +0 -13
  218. package/dist/domains/script.js +0 -125
  219. package/dist/domains/search.d.ts +0 -16
  220. package/dist/domains/search.js +0 -168
  221. package/dist/domains/settings.d.ts +0 -12
  222. package/dist/domains/settings.js +0 -6624
  223. package/dist/domains/storyboard.d.ts +0 -14
  224. package/dist/domains/storyboard.js +0 -125
  225. package/dist/domains/subtitle-style.d.ts +0 -37
  226. package/dist/domains/subtitle-style.js +0 -485
  227. package/dist/domains/subtitle.d.ts +0 -19
  228. package/dist/domains/subtitle.js +0 -212
  229. package/dist/domains/template.d.ts +0 -23
  230. package/dist/domains/template.js +0 -372
  231. package/dist/domains/user-notification-status.d.ts +0 -55
  232. package/dist/domains/user-notification-status.js +0 -715
  233. package/dist/domains/user-notification.d.ts +0 -118
  234. package/dist/domains/user-notification.js +0 -3040
  235. package/dist/domains/user.d.ts +0 -48
  236. package/dist/domains/user.js +0 -481
  237. package/dist/monitor.d.ts +0 -71
  238. package/dist/monitor.js +0 -1942
  239. package/dist/schema.json +0 -9075
  240. package/dist/storage.d.ts +0 -51
  241. package/dist/storage.js +0 -1036
  242. /package/dist/{asset.js → common/subtitle-style.js} +0 -0
  243. /package/dist/{domains/render-preset.js → records/domains/asset.js} +0 -0
@@ -1,1609 +1,599 @@
1
- import __typia from "typia";
2
- export const isBlock = input => {
3
- const $io0 = input => "string" === typeof input.id && /^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.id) && ("string" === typeof input.file && /^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.file)) && ("string" === typeof input.location && /^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.location)) && ("number" === typeof input.offset && (0 <= input.offset && (Math.floor(input.offset) === input.offset && 0 <= input.offset && input.offset <= 18446744073709552000))) && (null === input.size || "number" === typeof input.size && (0 <= input.size && (Math.floor(input.size) === input.size && 0 <= input.size && input.size <= 18446744073709552000))) && (null === input.hash || "string" === typeof input.hash && /^([A-Fa-f0-9]{32})?$/.test(input.hash)) && (null === input.btime || "number" === typeof input.btime && (0 <= input.btime && (Math.floor(input.btime) === input.btime && 0 <= input.btime && input.btime <= 18446744073709552000))) && (null === input.path || "string" === typeof input.path) && (undefined !== input.error && (null === input.error || (Array.isArray(input.error) && input.error.every(elem => "object" === typeof elem && null !== elem && $io1(elem)) || "object" === typeof input.error && null !== input.error && $io1(input.error))));
4
- const $io1 = input => "string" === typeof input.message && (undefined === input.type || "string" === typeof input.type) && (undefined === input.code || "string" === typeof input.code) && (undefined === input.exitCode || "number" === typeof input.exitCode) && (undefined === input.signalCode || "number" === typeof input.signalCode) && (undefined === input.statusCode || "number" === typeof input.statusCode) && (undefined === input.headers || "object" === typeof input.headers && null !== input.headers && false === Array.isArray(input.headers) && $io2(input.headers)) && (undefined === input.data || "object" === typeof input.data && null !== input.data && false === Array.isArray(input.data) && $io3(input.data)) && (null === input.cause || undefined === input.cause || "object" === typeof input.cause && null !== input.cause && $io1(input.cause)) && (null === input.errors || undefined === input.errors || Array.isArray(input.errors) && input.errors.every(elem => "object" === typeof elem && null !== elem && $io1(elem)));
5
- const $io2 = input => Object.keys(input).every(key => {
6
- const value = input[key];
7
- if (undefined === value)
8
- return true;
9
- return "string" === typeof value;
10
- });
11
- const $io3 = input => true;
12
- return "object" === typeof input && null !== input && $io0(input);
13
- };
14
- export const assertBlock = (input, errorFactory) => {
15
- const __is = input => {
16
- const $io0 = input => "string" === typeof input.id && /^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.id) && ("string" === typeof input.file && /^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.file)) && ("string" === typeof input.location && /^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.location)) && ("number" === typeof input.offset && (0 <= input.offset && (Math.floor(input.offset) === input.offset && 0 <= input.offset && input.offset <= 18446744073709552000))) && (null === input.size || "number" === typeof input.size && (0 <= input.size && (Math.floor(input.size) === input.size && 0 <= input.size && input.size <= 18446744073709552000))) && (null === input.hash || "string" === typeof input.hash && /^([A-Fa-f0-9]{32})?$/.test(input.hash)) && (null === input.btime || "number" === typeof input.btime && (0 <= input.btime && (Math.floor(input.btime) === input.btime && 0 <= input.btime && input.btime <= 18446744073709552000))) && (null === input.path || "string" === typeof input.path) && (undefined !== input.error && (null === input.error || (Array.isArray(input.error) && input.error.every(elem => "object" === typeof elem && null !== elem && $io1(elem)) || "object" === typeof input.error && null !== input.error && $io1(input.error))));
17
- const $io1 = input => "string" === typeof input.message && (undefined === input.type || "string" === typeof input.type) && (undefined === input.code || "string" === typeof input.code) && (undefined === input.exitCode || "number" === typeof input.exitCode) && (undefined === input.signalCode || "number" === typeof input.signalCode) && (undefined === input.statusCode || "number" === typeof input.statusCode) && (undefined === input.headers || "object" === typeof input.headers && null !== input.headers && false === Array.isArray(input.headers) && $io2(input.headers)) && (undefined === input.data || "object" === typeof input.data && null !== input.data && false === Array.isArray(input.data) && $io3(input.data)) && (null === input.cause || undefined === input.cause || "object" === typeof input.cause && null !== input.cause && $io1(input.cause)) && (null === input.errors || undefined === input.errors || Array.isArray(input.errors) && input.errors.every(elem => "object" === typeof elem && null !== elem && $io1(elem)));
18
- const $io2 = input => Object.keys(input).every(key => {
19
- const value = input[key];
20
- if (undefined === value)
21
- return true;
22
- return "string" === typeof value;
23
- });
24
- const $io3 = input => true;
25
- return "object" === typeof input && null !== input && $io0(input);
26
- };
27
- if (false === __is(input))
28
- ((input, _path, _exceptionable = true) => {
29
- const $guard = __typia.createAssert.guard;
30
- const $join = __typia.createAssert.join;
31
- const $ao0 = (input, _path, _exceptionable = true) => ("string" === typeof input.id && (/^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.id) || $guard(_exceptionable, {
32
- path: _path + ".id",
33
- expected: "string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">",
34
- value: input.id
35
- }, errorFactory)) || $guard(_exceptionable, {
36
- path: _path + ".id",
37
- expected: "(string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">)",
38
- value: input.id
39
- }, errorFactory)) && ("string" === typeof input.file && (/^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.file) || $guard(_exceptionable, {
40
- path: _path + ".file",
41
- expected: "string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">",
42
- value: input.file
43
- }, errorFactory)) || $guard(_exceptionable, {
44
- path: _path + ".file",
45
- expected: "(string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">)",
46
- value: input.file
47
- }, errorFactory)) && ("string" === typeof input.location && (/^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.location) || $guard(_exceptionable, {
48
- path: _path + ".location",
49
- expected: "string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">",
50
- value: input.location
51
- }, errorFactory)) || $guard(_exceptionable, {
52
- path: _path + ".location",
53
- expected: "(string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">)",
54
- value: input.location
55
- }, errorFactory)) && ("number" === typeof input.offset && (0 <= input.offset || $guard(_exceptionable, {
56
- path: _path + ".offset",
57
- expected: "number & Minimum<0>",
58
- value: input.offset
59
- }, errorFactory)) && (Math.floor(input.offset) === input.offset && 0 <= input.offset && input.offset <= 18446744073709552000 || $guard(_exceptionable, {
60
- path: _path + ".offset",
61
- expected: "number & Type<\"uint64\">",
62
- value: input.offset
63
- }, errorFactory)) || $guard(_exceptionable, {
64
- path: _path + ".offset",
65
- expected: "(number & Minimum<0> & Type<\"uint64\">)",
66
- value: input.offset
67
- }, errorFactory)) && (null === input.size || "number" === typeof input.size && (0 <= input.size || $guard(_exceptionable, {
68
- path: _path + ".size",
69
- expected: "number & Minimum<0>",
70
- value: input.size
71
- }, errorFactory)) && (Math.floor(input.size) === input.size && 0 <= input.size && input.size <= 18446744073709552000 || $guard(_exceptionable, {
72
- path: _path + ".size",
73
- expected: "number & Type<\"uint64\">",
74
- value: input.size
75
- }, errorFactory)) || $guard(_exceptionable, {
76
- path: _path + ".size",
77
- expected: "((number & Minimum<0> & Type<\"uint64\">) | null)",
78
- value: input.size
79
- }, errorFactory)) && (null === input.hash || "string" === typeof input.hash && (/^([A-Fa-f0-9]{32})?$/.test(input.hash) || $guard(_exceptionable, {
80
- path: _path + ".hash",
81
- expected: "string & Pattern<\"^([A-Fa-f0-9]{32})?$\">",
82
- value: input.hash
83
- }, errorFactory)) || $guard(_exceptionable, {
84
- path: _path + ".hash",
85
- expected: "((string & Pattern<\"^([A-Fa-f0-9]{32})?$\">) | null)",
86
- value: input.hash
87
- }, errorFactory)) && (null === input.btime || "number" === typeof input.btime && (0 <= input.btime || $guard(_exceptionable, {
88
- path: _path + ".btime",
89
- expected: "number & Minimum<0>",
90
- value: input.btime
91
- }, errorFactory)) && (Math.floor(input.btime) === input.btime && 0 <= input.btime && input.btime <= 18446744073709552000 || $guard(_exceptionable, {
92
- path: _path + ".btime",
93
- expected: "number & Type<\"uint64\">",
94
- value: input.btime
95
- }, errorFactory)) || $guard(_exceptionable, {
96
- path: _path + ".btime",
97
- expected: "((number & Minimum<0> & Type<\"uint64\">) | null)",
98
- value: input.btime
99
- }, errorFactory)) && (null === input.path || "string" === typeof input.path || $guard(_exceptionable, {
100
- path: _path + ".path",
101
- expected: "(null | string)",
102
- value: input.path
103
- }, errorFactory)) && ((undefined !== input.error || $guard(_exceptionable, {
104
- path: _path + ".error",
105
- expected: "(Array<NxtError> | NxtError | null)",
106
- value: input.error
107
- }, errorFactory)) && (null === input.error || (Array.isArray(input.error) && input.error.every((elem, _index1) => ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
108
- path: _path + ".error[" + _index1 + "]",
109
- expected: "NxtError",
110
- value: elem
111
- }, errorFactory)) && $ao1(elem, _path + ".error[" + _index1 + "]", true && _exceptionable) || $guard(_exceptionable, {
112
- path: _path + ".error[" + _index1 + "]",
113
- expected: "NxtError",
114
- value: elem
115
- }, errorFactory)) || "object" === typeof input.error && null !== input.error && $ao1(input.error, _path + ".error", true && _exceptionable) || $guard(_exceptionable, {
116
- path: _path + ".error",
117
- expected: "(Array<NxtError> | NxtError | null)",
118
- value: input.error
119
- }, errorFactory)) || $guard(_exceptionable, {
120
- path: _path + ".error",
121
- expected: "(Array<NxtError> | NxtError | null)",
122
- value: input.error
123
- }, errorFactory)));
124
- const $ao1 = (input, _path, _exceptionable = true) => ("string" === typeof input.message || $guard(_exceptionable, {
125
- path: _path + ".message",
126
- expected: "string",
127
- value: input.message
128
- }, errorFactory)) && (undefined === input.type || "string" === typeof input.type || $guard(_exceptionable, {
129
- path: _path + ".type",
130
- expected: "(string | undefined)",
131
- value: input.type
132
- }, errorFactory)) && (undefined === input.code || "string" === typeof input.code || $guard(_exceptionable, {
133
- path: _path + ".code",
134
- expected: "(string | undefined)",
135
- value: input.code
136
- }, errorFactory)) && (undefined === input.exitCode || "number" === typeof input.exitCode || $guard(_exceptionable, {
137
- path: _path + ".exitCode",
138
- expected: "(number | undefined)",
139
- value: input.exitCode
140
- }, errorFactory)) && (undefined === input.signalCode || "number" === typeof input.signalCode || $guard(_exceptionable, {
141
- path: _path + ".signalCode",
142
- expected: "(number | undefined)",
143
- value: input.signalCode
144
- }, errorFactory)) && (undefined === input.statusCode || "number" === typeof input.statusCode || $guard(_exceptionable, {
145
- path: _path + ".statusCode",
146
- expected: "(number | undefined)",
147
- value: input.statusCode
148
- }, errorFactory)) && (undefined === input.headers || ("object" === typeof input.headers && null !== input.headers && false === Array.isArray(input.headers) || $guard(_exceptionable, {
149
- path: _path + ".headers",
150
- expected: "(Record<string, string> | undefined)",
151
- value: input.headers
152
- }, errorFactory)) && $ao2(input.headers, _path + ".headers", true && _exceptionable) || $guard(_exceptionable, {
153
- path: _path + ".headers",
154
- expected: "(Record<string, string> | undefined)",
155
- value: input.headers
156
- }, errorFactory)) && (undefined === input.data || ("object" === typeof input.data && null !== input.data && false === Array.isArray(input.data) || $guard(_exceptionable, {
157
- path: _path + ".data",
158
- expected: "(object | undefined)",
159
- value: input.data
160
- }, errorFactory)) && $ao3(input.data, _path + ".data", true && _exceptionable) || $guard(_exceptionable, {
161
- path: _path + ".data",
162
- expected: "(object | undefined)",
163
- value: input.data
164
- }, errorFactory)) && (null === input.cause || undefined === input.cause || ("object" === typeof input.cause && null !== input.cause || $guard(_exceptionable, {
165
- path: _path + ".cause",
166
- expected: "(NxtError | null | undefined)",
167
- value: input.cause
168
- }, errorFactory)) && $ao1(input.cause, _path + ".cause", true && _exceptionable) || $guard(_exceptionable, {
169
- path: _path + ".cause",
170
- expected: "(NxtError | null | undefined)",
171
- value: input.cause
172
- }, errorFactory)) && (null === input.errors || undefined === input.errors || (Array.isArray(input.errors) || $guard(_exceptionable, {
173
- path: _path + ".errors",
174
- expected: "(Array<NxtError> | null | undefined)",
175
- value: input.errors
176
- }, errorFactory)) && input.errors.every((elem, _index2) => ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
177
- path: _path + ".errors[" + _index2 + "]",
178
- expected: "NxtError",
179
- value: elem
180
- }, errorFactory)) && $ao1(elem, _path + ".errors[" + _index2 + "]", true && _exceptionable) || $guard(_exceptionable, {
181
- path: _path + ".errors[" + _index2 + "]",
182
- expected: "NxtError",
183
- value: elem
184
- }, errorFactory)) || $guard(_exceptionable, {
185
- path: _path + ".errors",
186
- expected: "(Array<NxtError> | null | undefined)",
187
- value: input.errors
188
- }, errorFactory));
189
- const $ao2 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every(key => {
190
- const value = input[key];
191
- if (undefined === value)
192
- return true;
193
- return "string" === typeof value || $guard(_exceptionable, {
194
- path: _path + $join(key),
195
- expected: "string",
196
- value: value
197
- }, errorFactory);
198
- });
199
- const $ao3 = (input, _path, _exceptionable = true) => true;
200
- return ("object" === typeof input && null !== input || $guard(true, {
201
- path: _path + "",
202
- expected: "Block",
203
- value: input
204
- }, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
205
- path: _path + "",
206
- expected: "Block",
207
- value: input
208
- }, errorFactory);
209
- })(input, "$input", true);
210
- return input;
211
- };
212
- export const randomBlock = generator => {
213
- const $generator = __typia.createRandom.generator;
214
- const $pick = __typia.createRandom.pick;
215
- const $ro0 = (_recursive = false, _depth = 0) => ({
216
- id: (generator?.customs ?? $generator.customs)?.string?.([
217
- {
218
- name: "Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">",
219
- kind: "pattern",
220
- value: "^[0-9A-Za-z~][0-9A-Za-z~._: -]*$"
221
- }
222
- ]) ?? (generator?.pattern ?? $generator.pattern)(/^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/),
223
- file: (generator?.customs ?? $generator.customs)?.string?.([
224
- {
225
- name: "Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">",
226
- kind: "pattern",
227
- value: "^[0-9A-Za-z~][0-9A-Za-z~._: -]*$"
228
- }
229
- ]) ?? (generator?.pattern ?? $generator.pattern)(/^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/),
230
- location: (generator?.customs ?? $generator.customs)?.string?.([
231
- {
232
- name: "Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">",
233
- kind: "pattern",
234
- value: "^[0-9A-Za-z~][0-9A-Za-z~._: -]*$"
235
- }
236
- ]) ?? (generator?.pattern ?? $generator.pattern)(/^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/),
237
- offset: (generator?.customs ?? $generator.customs)?.number?.([
238
- {
239
- name: "Minimum<0>",
240
- kind: "minimum",
241
- value: 0
242
- },
243
- {
244
- name: "Type<\"uint64\">",
245
- kind: "type",
246
- value: "uint64"
247
- }
248
- ]) ?? (generator?.integer ?? $generator.integer)(0, 10),
249
- size: $pick([
250
- () => null,
251
- () => (generator?.customs ?? $generator.customs)?.number?.([
252
- {
253
- name: "Minimum<0>",
254
- kind: "minimum",
255
- value: 0
256
- },
257
- {
258
- name: "Type<\"uint64\">",
259
- kind: "type",
260
- value: "uint64"
261
- }
262
- ]) ?? (generator?.integer ?? $generator.integer)(0, 10)
263
- ])(),
264
- hash: $pick([
265
- () => null,
266
- () => (generator?.customs ?? $generator.customs)?.string?.([
267
- {
268
- name: "Pattern<\"^([A-Fa-f0-9]{32})?$\">",
269
- kind: "pattern",
270
- value: "^([A-Fa-f0-9]{32})?$"
271
- }
272
- ]) ?? (generator?.pattern ?? $generator.pattern)(/^([A-Fa-f0-9]{32})?$/)
273
- ])(),
274
- btime: $pick([
275
- () => null,
276
- () => (generator?.customs ?? $generator.customs)?.number?.([
277
- {
278
- name: "Minimum<0>",
279
- kind: "minimum",
280
- value: 0
281
- },
282
- {
283
- name: "Type<\"uint64\">",
284
- kind: "type",
285
- value: "uint64"
286
- }
287
- ]) ?? (generator?.integer ?? $generator.integer)(0, 10)
288
- ])(),
289
- path: $pick([
290
- () => null,
291
- () => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
292
- ])(),
293
- error: $pick([
294
- () => null,
295
- () => (generator?.array ?? $generator.array)(() => $ro1(_recursive, _recursive ? 1 + _depth : _depth)),
296
- () => $ro1(_recursive, _recursive ? 1 + _depth : _depth)
297
- ])()
298
- });
299
- const $ro1 = (_recursive = true, _depth = 0) => ({
300
- message: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
301
- type: $pick([
302
- () => undefined,
303
- () => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
304
- ])(),
305
- code: $pick([
306
- () => undefined,
307
- () => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
308
- ])(),
309
- exitCode: $pick([
310
- () => undefined,
311
- () => (generator?.customs ?? $generator.customs)?.number?.([]) ?? (generator?.number ?? $generator.number)(0, 100)
312
- ])(),
313
- signalCode: $pick([
314
- () => undefined,
315
- () => (generator?.customs ?? $generator.customs)?.number?.([]) ?? (generator?.number ?? $generator.number)(0, 100)
316
- ])(),
317
- statusCode: $pick([
318
- () => undefined,
319
- () => (generator?.customs ?? $generator.customs)?.number?.([]) ?? (generator?.number ?? $generator.number)(0, 100)
320
- ])(),
321
- headers: $pick([
322
- () => undefined,
323
- () => $ro2(true, _recursive ? 1 + _depth : _depth)
324
- ])(),
325
- data: $pick([
326
- () => undefined,
327
- () => $ro3(true, _recursive ? 1 + _depth : _depth)
328
- ])(),
329
- cause: $pick([
330
- () => undefined,
331
- () => null,
332
- () => $ro1(true, _recursive ? 1 + _depth : _depth)
333
- ])(),
334
- errors: $pick([
335
- () => undefined,
336
- () => null,
337
- () => _recursive && 5 < _depth ? [] : 5 >= _depth ? (generator?.array ?? $generator.array)(() => $ro1(true, _recursive ? 1 + _depth : _depth)) : []
338
- ])()
339
- });
340
- const $ro2 = (_recursive = false, _depth = 0) => {
341
- const output = {};
342
- (generator?.array ?? $generator.array)(() => output[(generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()] = (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(), (generator?.integer ?? $generator.integer)(0, 3));
343
- return output;
344
- };
345
- const $ro3 = (_recursive = false, _depth = 0) => {};
346
- return $ro0();
347
- };
348
- export const assertGuardBlock = (input, errorFactory) => {
349
- const __is = input => {
350
- const $io0 = input => "string" === typeof input.id && /^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.id) && ("string" === typeof input.file && /^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.file)) && ("string" === typeof input.location && /^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.location)) && ("number" === typeof input.offset && (0 <= input.offset && (Math.floor(input.offset) === input.offset && 0 <= input.offset && input.offset <= 18446744073709552000))) && (null === input.size || "number" === typeof input.size && (0 <= input.size && (Math.floor(input.size) === input.size && 0 <= input.size && input.size <= 18446744073709552000))) && (null === input.hash || "string" === typeof input.hash && /^([A-Fa-f0-9]{32})?$/.test(input.hash)) && (null === input.btime || "number" === typeof input.btime && (0 <= input.btime && (Math.floor(input.btime) === input.btime && 0 <= input.btime && input.btime <= 18446744073709552000))) && (null === input.path || "string" === typeof input.path) && (undefined !== input.error && (null === input.error || (Array.isArray(input.error) && input.error.every(elem => "object" === typeof elem && null !== elem && $io1(elem)) || "object" === typeof input.error && null !== input.error && $io1(input.error))));
351
- const $io1 = input => "string" === typeof input.message && (undefined === input.type || "string" === typeof input.type) && (undefined === input.code || "string" === typeof input.code) && (undefined === input.exitCode || "number" === typeof input.exitCode) && (undefined === input.signalCode || "number" === typeof input.signalCode) && (undefined === input.statusCode || "number" === typeof input.statusCode) && (undefined === input.headers || "object" === typeof input.headers && null !== input.headers && false === Array.isArray(input.headers) && $io2(input.headers)) && (undefined === input.data || "object" === typeof input.data && null !== input.data && false === Array.isArray(input.data) && $io3(input.data)) && (null === input.cause || undefined === input.cause || "object" === typeof input.cause && null !== input.cause && $io1(input.cause)) && (null === input.errors || undefined === input.errors || Array.isArray(input.errors) && input.errors.every(elem => "object" === typeof elem && null !== elem && $io1(elem)));
352
- const $io2 = input => Object.keys(input).every(key => {
353
- const value = input[key];
354
- if (undefined === value)
355
- return true;
356
- return "string" === typeof value;
357
- });
358
- const $io3 = input => true;
359
- return "object" === typeof input && null !== input && $io0(input);
360
- };
361
- if (false === __is(input))
362
- ((input, _path, _exceptionable = true) => {
363
- const $guard = __typia.createAssertGuard.guard;
364
- const $join = __typia.createAssertGuard.join;
365
- const $ao0 = (input, _path, _exceptionable = true) => ("string" === typeof input.id && (/^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.id) || $guard(_exceptionable, {
366
- path: _path + ".id",
367
- expected: "string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">",
368
- value: input.id
369
- }, errorFactory)) || $guard(_exceptionable, {
370
- path: _path + ".id",
371
- expected: "(string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">)",
372
- value: input.id
373
- }, errorFactory)) && ("string" === typeof input.file && (/^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.file) || $guard(_exceptionable, {
374
- path: _path + ".file",
375
- expected: "string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">",
376
- value: input.file
377
- }, errorFactory)) || $guard(_exceptionable, {
378
- path: _path + ".file",
379
- expected: "(string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">)",
380
- value: input.file
381
- }, errorFactory)) && ("string" === typeof input.location && (/^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.location) || $guard(_exceptionable, {
382
- path: _path + ".location",
383
- expected: "string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">",
384
- value: input.location
385
- }, errorFactory)) || $guard(_exceptionable, {
386
- path: _path + ".location",
387
- expected: "(string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">)",
388
- value: input.location
389
- }, errorFactory)) && ("number" === typeof input.offset && (0 <= input.offset || $guard(_exceptionable, {
390
- path: _path + ".offset",
391
- expected: "number & Minimum<0>",
392
- value: input.offset
393
- }, errorFactory)) && (Math.floor(input.offset) === input.offset && 0 <= input.offset && input.offset <= 18446744073709552000 || $guard(_exceptionable, {
394
- path: _path + ".offset",
395
- expected: "number & Type<\"uint64\">",
396
- value: input.offset
397
- }, errorFactory)) || $guard(_exceptionable, {
398
- path: _path + ".offset",
399
- expected: "(number & Minimum<0> & Type<\"uint64\">)",
400
- value: input.offset
401
- }, errorFactory)) && (null === input.size || "number" === typeof input.size && (0 <= input.size || $guard(_exceptionable, {
402
- path: _path + ".size",
403
- expected: "number & Minimum<0>",
404
- value: input.size
405
- }, errorFactory)) && (Math.floor(input.size) === input.size && 0 <= input.size && input.size <= 18446744073709552000 || $guard(_exceptionable, {
406
- path: _path + ".size",
407
- expected: "number & Type<\"uint64\">",
408
- value: input.size
409
- }, errorFactory)) || $guard(_exceptionable, {
410
- path: _path + ".size",
411
- expected: "((number & Minimum<0> & Type<\"uint64\">) | null)",
412
- value: input.size
413
- }, errorFactory)) && (null === input.hash || "string" === typeof input.hash && (/^([A-Fa-f0-9]{32})?$/.test(input.hash) || $guard(_exceptionable, {
414
- path: _path + ".hash",
415
- expected: "string & Pattern<\"^([A-Fa-f0-9]{32})?$\">",
416
- value: input.hash
417
- }, errorFactory)) || $guard(_exceptionable, {
418
- path: _path + ".hash",
419
- expected: "((string & Pattern<\"^([A-Fa-f0-9]{32})?$\">) | null)",
420
- value: input.hash
421
- }, errorFactory)) && (null === input.btime || "number" === typeof input.btime && (0 <= input.btime || $guard(_exceptionable, {
422
- path: _path + ".btime",
423
- expected: "number & Minimum<0>",
424
- value: input.btime
425
- }, errorFactory)) && (Math.floor(input.btime) === input.btime && 0 <= input.btime && input.btime <= 18446744073709552000 || $guard(_exceptionable, {
426
- path: _path + ".btime",
427
- expected: "number & Type<\"uint64\">",
428
- value: input.btime
429
- }, errorFactory)) || $guard(_exceptionable, {
430
- path: _path + ".btime",
431
- expected: "((number & Minimum<0> & Type<\"uint64\">) | null)",
432
- value: input.btime
433
- }, errorFactory)) && (null === input.path || "string" === typeof input.path || $guard(_exceptionable, {
434
- path: _path + ".path",
435
- expected: "(null | string)",
436
- value: input.path
437
- }, errorFactory)) && ((undefined !== input.error || $guard(_exceptionable, {
438
- path: _path + ".error",
439
- expected: "(Array<NxtError> | NxtError | null)",
440
- value: input.error
441
- }, errorFactory)) && (null === input.error || (Array.isArray(input.error) && input.error.every((elem, _index1) => ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
442
- path: _path + ".error[" + _index1 + "]",
443
- expected: "NxtError",
444
- value: elem
445
- }, errorFactory)) && $ao1(elem, _path + ".error[" + _index1 + "]", true && _exceptionable) || $guard(_exceptionable, {
446
- path: _path + ".error[" + _index1 + "]",
447
- expected: "NxtError",
448
- value: elem
449
- }, errorFactory)) || "object" === typeof input.error && null !== input.error && $ao1(input.error, _path + ".error", true && _exceptionable) || $guard(_exceptionable, {
450
- path: _path + ".error",
451
- expected: "(Array<NxtError> | NxtError | null)",
452
- value: input.error
453
- }, errorFactory)) || $guard(_exceptionable, {
454
- path: _path + ".error",
455
- expected: "(Array<NxtError> | NxtError | null)",
456
- value: input.error
457
- }, errorFactory)));
458
- const $ao1 = (input, _path, _exceptionable = true) => ("string" === typeof input.message || $guard(_exceptionable, {
459
- path: _path + ".message",
460
- expected: "string",
461
- value: input.message
462
- }, errorFactory)) && (undefined === input.type || "string" === typeof input.type || $guard(_exceptionable, {
463
- path: _path + ".type",
464
- expected: "(string | undefined)",
465
- value: input.type
466
- }, errorFactory)) && (undefined === input.code || "string" === typeof input.code || $guard(_exceptionable, {
467
- path: _path + ".code",
468
- expected: "(string | undefined)",
469
- value: input.code
470
- }, errorFactory)) && (undefined === input.exitCode || "number" === typeof input.exitCode || $guard(_exceptionable, {
471
- path: _path + ".exitCode",
472
- expected: "(number | undefined)",
473
- value: input.exitCode
474
- }, errorFactory)) && (undefined === input.signalCode || "number" === typeof input.signalCode || $guard(_exceptionable, {
475
- path: _path + ".signalCode",
476
- expected: "(number | undefined)",
477
- value: input.signalCode
478
- }, errorFactory)) && (undefined === input.statusCode || "number" === typeof input.statusCode || $guard(_exceptionable, {
479
- path: _path + ".statusCode",
480
- expected: "(number | undefined)",
481
- value: input.statusCode
482
- }, errorFactory)) && (undefined === input.headers || ("object" === typeof input.headers && null !== input.headers && false === Array.isArray(input.headers) || $guard(_exceptionable, {
483
- path: _path + ".headers",
484
- expected: "(Record<string, string> | undefined)",
485
- value: input.headers
486
- }, errorFactory)) && $ao2(input.headers, _path + ".headers", true && _exceptionable) || $guard(_exceptionable, {
487
- path: _path + ".headers",
488
- expected: "(Record<string, string> | undefined)",
489
- value: input.headers
490
- }, errorFactory)) && (undefined === input.data || ("object" === typeof input.data && null !== input.data && false === Array.isArray(input.data) || $guard(_exceptionable, {
491
- path: _path + ".data",
492
- expected: "(object | undefined)",
493
- value: input.data
494
- }, errorFactory)) && $ao3(input.data, _path + ".data", true && _exceptionable) || $guard(_exceptionable, {
495
- path: _path + ".data",
496
- expected: "(object | undefined)",
497
- value: input.data
498
- }, errorFactory)) && (null === input.cause || undefined === input.cause || ("object" === typeof input.cause && null !== input.cause || $guard(_exceptionable, {
499
- path: _path + ".cause",
500
- expected: "(NxtError | null | undefined)",
501
- value: input.cause
502
- }, errorFactory)) && $ao1(input.cause, _path + ".cause", true && _exceptionable) || $guard(_exceptionable, {
503
- path: _path + ".cause",
504
- expected: "(NxtError | null | undefined)",
505
- value: input.cause
506
- }, errorFactory)) && (null === input.errors || undefined === input.errors || (Array.isArray(input.errors) || $guard(_exceptionable, {
507
- path: _path + ".errors",
508
- expected: "(Array<NxtError> | null | undefined)",
509
- value: input.errors
510
- }, errorFactory)) && input.errors.every((elem, _index2) => ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
511
- path: _path + ".errors[" + _index2 + "]",
512
- expected: "NxtError",
513
- value: elem
514
- }, errorFactory)) && $ao1(elem, _path + ".errors[" + _index2 + "]", true && _exceptionable) || $guard(_exceptionable, {
515
- path: _path + ".errors[" + _index2 + "]",
516
- expected: "NxtError",
517
- value: elem
518
- }, errorFactory)) || $guard(_exceptionable, {
519
- path: _path + ".errors",
520
- expected: "(Array<NxtError> | null | undefined)",
521
- value: input.errors
522
- }, errorFactory));
523
- const $ao2 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every(key => {
524
- const value = input[key];
525
- if (undefined === value)
526
- return true;
527
- return "string" === typeof value || $guard(_exceptionable, {
528
- path: _path + $join(key),
529
- expected: "string",
530
- value: value
531
- }, errorFactory);
532
- });
533
- const $ao3 = (input, _path, _exceptionable = true) => true;
534
- return ("object" === typeof input && null !== input || $guard(true, {
535
- path: _path + "",
536
- expected: "Block",
537
- value: input
538
- }, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
539
- path: _path + "",
540
- expected: "Block",
541
- value: input
542
- }, errorFactory);
543
- })(input, "$input", true);
544
- };
545
- export const stringifyBlock = input => {
546
- const $io1 = input => "string" === typeof input.message && (undefined === input.type || "string" === typeof input.type) && (undefined === input.code || "string" === typeof input.code) && (undefined === input.exitCode || "number" === typeof input.exitCode) && (undefined === input.signalCode || "number" === typeof input.signalCode) && (undefined === input.statusCode || "number" === typeof input.statusCode) && (undefined === input.headers || "object" === typeof input.headers && null !== input.headers && false === Array.isArray(input.headers) && $io2(input.headers)) && (undefined === input.data || "object" === typeof input.data && null !== input.data && false === Array.isArray(input.data) && $io3(input.data)) && (null === input.cause || undefined === input.cause || "object" === typeof input.cause && null !== input.cause && $io1(input.cause)) && (null === input.errors || undefined === input.errors || Array.isArray(input.errors) && input.errors.every(elem => "object" === typeof elem && null !== elem && $io1(elem)));
547
- const $io2 = input => Object.keys(input).every(key => {
548
- const value = input[key];
549
- if (undefined === value)
550
- return true;
551
- return "string" === typeof value;
552
- });
553
- const $io3 = input => true;
554
- const $string = __typia.json.createStringify.string;
555
- const $throws = __typia.json.createStringify.throws;
556
- const $so0 = input => `{"id":${$string(input.id)},"file":${$string(input.file)},"location":${$string(input.location)},"offset":${input.offset},"size":${null !== input.size ? input.size : "null"},"hash":${null !== input.hash ? $string(input.hash) : "null"},"btime":${null !== input.btime ? input.btime : "null"},"path":${null !== input.path ? $string(input.path) : "null"},"error":${null !== input.error ? (() => {
557
- if (Array.isArray(input.error))
558
- return `[${input.error.map(elem => $so1(elem)).join(",")}]`;
559
- if ("object" === typeof input.error && null !== input.error)
560
- return $so1(input.error);
561
- $throws({
562
- expected: "(Array<NxtError> | NxtError | null)",
563
- value: input.error
564
- });
565
- })() : "null"}}`;
566
- const $so1 = input => `{${undefined === input.type ? "" : `"type":${undefined !== input.type ? $string(input.type) : undefined},`}${undefined === input.code ? "" : `"code":${undefined !== input.code ? $string(input.code) : undefined},`}${undefined === input.exitCode ? "" : `"exitCode":${undefined !== input.exitCode ? input.exitCode : undefined},`}${undefined === input.signalCode ? "" : `"signalCode":${undefined !== input.signalCode ? input.signalCode : undefined},`}${undefined === input.statusCode ? "" : `"statusCode":${undefined !== input.statusCode ? input.statusCode : undefined},`}${undefined === input.headers ? "" : `"headers":${undefined !== input.headers ? $so2(input.headers) : undefined},`}${undefined === input.data ? "" : `"data":${undefined !== input.data ? "{}" : undefined},`}${undefined === input.cause ? "" : `"cause":${undefined !== input.cause ? null !== input.cause ? $so1(input.cause) : "null" : undefined},`}${undefined === input.errors ? "" : `"errors":${undefined !== input.errors ? null !== input.errors ? `[${input.errors.map(elem => $so1(elem)).join(",")}]` : "null" : undefined},`}"message":${$string(input.message)}}`;
567
- const $so2 = input => `{${Object.entries(input).map(([key, value]) => { if (undefined === value)
568
- return ""; return `${JSON.stringify(key)}:${$string(value)}`; }).filter(str => "" !== str).join(",")}}`;
569
- return $so0(input);
570
- };
571
- export const assertStringifyBlock = (input, errorFactory) => { const assert = (input, errorFactory) => {
572
- const __is = input => {
573
- const $io0 = input => "string" === typeof input.id && /^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.id) && ("string" === typeof input.file && /^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.file)) && ("string" === typeof input.location && /^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.location)) && ("number" === typeof input.offset && (0 <= input.offset && (Math.floor(input.offset) === input.offset && 0 <= input.offset && input.offset <= 18446744073709552000))) && (null === input.size || "number" === typeof input.size && (0 <= input.size && (Math.floor(input.size) === input.size && 0 <= input.size && input.size <= 18446744073709552000))) && (null === input.hash || "string" === typeof input.hash && /^([A-Fa-f0-9]{32})?$/.test(input.hash)) && (null === input.btime || "number" === typeof input.btime && (0 <= input.btime && (Math.floor(input.btime) === input.btime && 0 <= input.btime && input.btime <= 18446744073709552000))) && (null === input.path || "string" === typeof input.path) && (undefined !== input.error && (null === input.error || (Array.isArray(input.error) && input.error.every(elem => "object" === typeof elem && null !== elem && $io1(elem)) || "object" === typeof input.error && null !== input.error && $io1(input.error))));
574
- const $io1 = input => "string" === typeof input.message && (undefined === input.type || "string" === typeof input.type) && (undefined === input.code || "string" === typeof input.code) && (undefined === input.exitCode || "number" === typeof input.exitCode && !Number.isNaN(input.exitCode)) && (undefined === input.signalCode || "number" === typeof input.signalCode && !Number.isNaN(input.signalCode)) && (undefined === input.statusCode || "number" === typeof input.statusCode && !Number.isNaN(input.statusCode)) && (undefined === input.headers || "object" === typeof input.headers && null !== input.headers && false === Array.isArray(input.headers) && $io2(input.headers)) && (undefined === input.data || "object" === typeof input.data && null !== input.data && false === Array.isArray(input.data) && $io3(input.data)) && (null === input.cause || undefined === input.cause || "object" === typeof input.cause && null !== input.cause && $io1(input.cause)) && (null === input.errors || undefined === input.errors || Array.isArray(input.errors) && input.errors.every(elem => "object" === typeof elem && null !== elem && $io1(elem)));
575
- const $io2 = input => Object.keys(input).every(key => {
576
- const value = input[key];
577
- if (undefined === value)
578
- return true;
579
- return "string" === typeof value;
580
- });
581
- const $io3 = input => true;
582
- return "object" === typeof input && null !== input && $io0(input);
583
- };
584
- if (false === __is(input))
585
- ((input, _path, _exceptionable = true) => {
586
- const $guard = __typia.json.createAssertStringify.guard;
587
- const $join = __typia.json.createAssertStringify.join;
588
- const $ao0 = (input, _path, _exceptionable = true) => ("string" === typeof input.id && (/^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.id) || $guard(_exceptionable, {
589
- path: _path + ".id",
590
- expected: "string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">",
591
- value: input.id
592
- }, errorFactory)) || $guard(_exceptionable, {
593
- path: _path + ".id",
594
- expected: "(string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">)",
595
- value: input.id
596
- }, errorFactory)) && ("string" === typeof input.file && (/^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.file) || $guard(_exceptionable, {
597
- path: _path + ".file",
598
- expected: "string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">",
599
- value: input.file
600
- }, errorFactory)) || $guard(_exceptionable, {
601
- path: _path + ".file",
602
- expected: "(string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">)",
603
- value: input.file
604
- }, errorFactory)) && ("string" === typeof input.location && (/^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.location) || $guard(_exceptionable, {
605
- path: _path + ".location",
606
- expected: "string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">",
607
- value: input.location
608
- }, errorFactory)) || $guard(_exceptionable, {
609
- path: _path + ".location",
610
- expected: "(string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">)",
611
- value: input.location
612
- }, errorFactory)) && ("number" === typeof input.offset && (0 <= input.offset || $guard(_exceptionable, {
613
- path: _path + ".offset",
614
- expected: "number & Minimum<0>",
615
- value: input.offset
616
- }, errorFactory)) && (Math.floor(input.offset) === input.offset && 0 <= input.offset && input.offset <= 18446744073709552000 || $guard(_exceptionable, {
617
- path: _path + ".offset",
618
- expected: "number & Type<\"uint64\">",
619
- value: input.offset
620
- }, errorFactory)) || $guard(_exceptionable, {
621
- path: _path + ".offset",
622
- expected: "(number & Minimum<0> & Type<\"uint64\">)",
623
- value: input.offset
624
- }, errorFactory)) && (null === input.size || "number" === typeof input.size && (0 <= input.size || $guard(_exceptionable, {
625
- path: _path + ".size",
626
- expected: "number & Minimum<0>",
627
- value: input.size
628
- }, errorFactory)) && (Math.floor(input.size) === input.size && 0 <= input.size && input.size <= 18446744073709552000 || $guard(_exceptionable, {
629
- path: _path + ".size",
630
- expected: "number & Type<\"uint64\">",
631
- value: input.size
632
- }, errorFactory)) || $guard(_exceptionable, {
633
- path: _path + ".size",
634
- expected: "((number & Minimum<0> & Type<\"uint64\">) | null)",
635
- value: input.size
636
- }, errorFactory)) && (null === input.hash || "string" === typeof input.hash && (/^([A-Fa-f0-9]{32})?$/.test(input.hash) || $guard(_exceptionable, {
637
- path: _path + ".hash",
638
- expected: "string & Pattern<\"^([A-Fa-f0-9]{32})?$\">",
639
- value: input.hash
640
- }, errorFactory)) || $guard(_exceptionable, {
641
- path: _path + ".hash",
642
- expected: "((string & Pattern<\"^([A-Fa-f0-9]{32})?$\">) | null)",
643
- value: input.hash
644
- }, errorFactory)) && (null === input.btime || "number" === typeof input.btime && (0 <= input.btime || $guard(_exceptionable, {
645
- path: _path + ".btime",
646
- expected: "number & Minimum<0>",
647
- value: input.btime
648
- }, errorFactory)) && (Math.floor(input.btime) === input.btime && 0 <= input.btime && input.btime <= 18446744073709552000 || $guard(_exceptionable, {
649
- path: _path + ".btime",
650
- expected: "number & Type<\"uint64\">",
651
- value: input.btime
652
- }, errorFactory)) || $guard(_exceptionable, {
653
- path: _path + ".btime",
654
- expected: "((number & Minimum<0> & Type<\"uint64\">) | null)",
655
- value: input.btime
656
- }, errorFactory)) && (null === input.path || "string" === typeof input.path || $guard(_exceptionable, {
657
- path: _path + ".path",
658
- expected: "(null | string)",
659
- value: input.path
660
- }, errorFactory)) && ((undefined !== input.error || $guard(_exceptionable, {
661
- path: _path + ".error",
662
- expected: "(Array<NxtError> | NxtError | null)",
663
- value: input.error
664
- }, errorFactory)) && (null === input.error || (Array.isArray(input.error) && input.error.every((elem, _index1) => ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
665
- path: _path + ".error[" + _index1 + "]",
666
- expected: "NxtError",
667
- value: elem
668
- }, errorFactory)) && $ao1(elem, _path + ".error[" + _index1 + "]", true && _exceptionable) || $guard(_exceptionable, {
669
- path: _path + ".error[" + _index1 + "]",
670
- expected: "NxtError",
671
- value: elem
672
- }, errorFactory)) || "object" === typeof input.error && null !== input.error && $ao1(input.error, _path + ".error", true && _exceptionable) || $guard(_exceptionable, {
673
- path: _path + ".error",
674
- expected: "(Array<NxtError> | NxtError | null)",
675
- value: input.error
676
- }, errorFactory)) || $guard(_exceptionable, {
677
- path: _path + ".error",
678
- expected: "(Array<NxtError> | NxtError | null)",
679
- value: input.error
680
- }, errorFactory)));
681
- const $ao1 = (input, _path, _exceptionable = true) => ("string" === typeof input.message || $guard(_exceptionable, {
682
- path: _path + ".message",
683
- expected: "string",
684
- value: input.message
685
- }, errorFactory)) && (undefined === input.type || "string" === typeof input.type || $guard(_exceptionable, {
686
- path: _path + ".type",
687
- expected: "(string | undefined)",
688
- value: input.type
689
- }, errorFactory)) && (undefined === input.code || "string" === typeof input.code || $guard(_exceptionable, {
690
- path: _path + ".code",
691
- expected: "(string | undefined)",
692
- value: input.code
693
- }, errorFactory)) && (undefined === input.exitCode || "number" === typeof input.exitCode && !Number.isNaN(input.exitCode) || $guard(_exceptionable, {
694
- path: _path + ".exitCode",
695
- expected: "(number | undefined)",
696
- value: input.exitCode
697
- }, errorFactory)) && (undefined === input.signalCode || "number" === typeof input.signalCode && !Number.isNaN(input.signalCode) || $guard(_exceptionable, {
698
- path: _path + ".signalCode",
699
- expected: "(number | undefined)",
700
- value: input.signalCode
701
- }, errorFactory)) && (undefined === input.statusCode || "number" === typeof input.statusCode && !Number.isNaN(input.statusCode) || $guard(_exceptionable, {
702
- path: _path + ".statusCode",
703
- expected: "(number | undefined)",
704
- value: input.statusCode
705
- }, errorFactory)) && (undefined === input.headers || ("object" === typeof input.headers && null !== input.headers && false === Array.isArray(input.headers) || $guard(_exceptionable, {
706
- path: _path + ".headers",
707
- expected: "(Record<string, string> | undefined)",
708
- value: input.headers
709
- }, errorFactory)) && $ao2(input.headers, _path + ".headers", true && _exceptionable) || $guard(_exceptionable, {
710
- path: _path + ".headers",
711
- expected: "(Record<string, string> | undefined)",
712
- value: input.headers
713
- }, errorFactory)) && (undefined === input.data || ("object" === typeof input.data && null !== input.data && false === Array.isArray(input.data) || $guard(_exceptionable, {
714
- path: _path + ".data",
715
- expected: "(object | undefined)",
716
- value: input.data
717
- }, errorFactory)) && $ao3(input.data, _path + ".data", true && _exceptionable) || $guard(_exceptionable, {
718
- path: _path + ".data",
719
- expected: "(object | undefined)",
720
- value: input.data
721
- }, errorFactory)) && (null === input.cause || undefined === input.cause || ("object" === typeof input.cause && null !== input.cause || $guard(_exceptionable, {
722
- path: _path + ".cause",
723
- expected: "(NxtError | null | undefined)",
724
- value: input.cause
725
- }, errorFactory)) && $ao1(input.cause, _path + ".cause", true && _exceptionable) || $guard(_exceptionable, {
726
- path: _path + ".cause",
727
- expected: "(NxtError | null | undefined)",
728
- value: input.cause
729
- }, errorFactory)) && (null === input.errors || undefined === input.errors || (Array.isArray(input.errors) || $guard(_exceptionable, {
730
- path: _path + ".errors",
731
- expected: "(Array<NxtError> | null | undefined)",
732
- value: input.errors
733
- }, errorFactory)) && input.errors.every((elem, _index2) => ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
734
- path: _path + ".errors[" + _index2 + "]",
735
- expected: "NxtError",
736
- value: elem
737
- }, errorFactory)) && $ao1(elem, _path + ".errors[" + _index2 + "]", true && _exceptionable) || $guard(_exceptionable, {
738
- path: _path + ".errors[" + _index2 + "]",
739
- expected: "NxtError",
740
- value: elem
741
- }, errorFactory)) || $guard(_exceptionable, {
742
- path: _path + ".errors",
743
- expected: "(Array<NxtError> | null | undefined)",
744
- value: input.errors
745
- }, errorFactory));
746
- const $ao2 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every(key => {
747
- const value = input[key];
748
- if (undefined === value)
749
- return true;
750
- return "string" === typeof value || $guard(_exceptionable, {
751
- path: _path + $join(key),
752
- expected: "string",
753
- value: value
754
- }, errorFactory);
755
- });
756
- const $ao3 = (input, _path, _exceptionable = true) => true;
757
- return ("object" === typeof input && null !== input || $guard(true, {
758
- path: _path + "",
759
- expected: "Block",
760
- value: input
761
- }, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
762
- path: _path + "",
763
- expected: "Block",
764
- value: input
765
- }, errorFactory);
766
- })(input, "$input", true);
767
- return input;
768
- }; const stringify = input => {
769
- const $io1 = input => "string" === typeof input.message && (undefined === input.type || "string" === typeof input.type) && (undefined === input.code || "string" === typeof input.code) && (undefined === input.exitCode || "number" === typeof input.exitCode) && (undefined === input.signalCode || "number" === typeof input.signalCode) && (undefined === input.statusCode || "number" === typeof input.statusCode) && (undefined === input.headers || "object" === typeof input.headers && null !== input.headers && false === Array.isArray(input.headers) && $io2(input.headers)) && (undefined === input.data || "object" === typeof input.data && null !== input.data && false === Array.isArray(input.data) && $io3(input.data)) && (null === input.cause || undefined === input.cause || "object" === typeof input.cause && null !== input.cause && $io1(input.cause)) && (null === input.errors || undefined === input.errors || Array.isArray(input.errors) && input.errors.every(elem => "object" === typeof elem && null !== elem && $io1(elem)));
770
- const $io2 = input => Object.keys(input).every(key => {
771
- const value = input[key];
772
- if (undefined === value)
773
- return true;
774
- return "string" === typeof value;
775
- });
776
- const $io3 = input => true;
777
- const $string = __typia.json.createAssertStringify.string;
778
- const $throws = __typia.json.createAssertStringify.throws;
779
- const $so0 = input => `{"id":${$string(input.id)},"file":${$string(input.file)},"location":${$string(input.location)},"offset":${input.offset},"size":${null !== input.size ? input.size : "null"},"hash":${null !== input.hash ? $string(input.hash) : "null"},"btime":${null !== input.btime ? input.btime : "null"},"path":${null !== input.path ? $string(input.path) : "null"},"error":${null !== input.error ? (() => {
780
- if (Array.isArray(input.error))
781
- return `[${input.error.map(elem => $so1(elem)).join(",")}]`;
782
- if ("object" === typeof input.error && null !== input.error)
783
- return $so1(input.error);
784
- $throws({
785
- expected: "(Array<NxtError> | NxtError | null)",
786
- value: input.error
787
- });
788
- })() : "null"}}`;
789
- const $so1 = input => `{${undefined === input.type ? "" : `"type":${undefined !== input.type ? $string(input.type) : undefined},`}${undefined === input.code ? "" : `"code":${undefined !== input.code ? $string(input.code) : undefined},`}${undefined === input.exitCode ? "" : `"exitCode":${undefined !== input.exitCode ? input.exitCode : undefined},`}${undefined === input.signalCode ? "" : `"signalCode":${undefined !== input.signalCode ? input.signalCode : undefined},`}${undefined === input.statusCode ? "" : `"statusCode":${undefined !== input.statusCode ? input.statusCode : undefined},`}${undefined === input.headers ? "" : `"headers":${undefined !== input.headers ? $so2(input.headers) : undefined},`}${undefined === input.data ? "" : `"data":${undefined !== input.data ? "{}" : undefined},`}${undefined === input.cause ? "" : `"cause":${undefined !== input.cause ? null !== input.cause ? $so1(input.cause) : "null" : undefined},`}${undefined === input.errors ? "" : `"errors":${undefined !== input.errors ? null !== input.errors ? `[${input.errors.map(elem => $so1(elem)).join(",")}]` : "null" : undefined},`}"message":${$string(input.message)}}`;
790
- const $so2 = input => `{${Object.entries(input).map(([key, value]) => { if (undefined === value)
791
- return ""; return `${JSON.stringify(key)}:${$string(value)}`; }).filter(str => "" !== str).join(",")}}`;
792
- return $so0(input);
793
- }; return stringify(assert(input, errorFactory)); };
794
- export const isBlocks = input => {
795
- const $io0 = input => "string" === typeof input.id && /^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.id) && ("string" === typeof input.file && /^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.file)) && ("string" === typeof input.location && /^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.location)) && ("number" === typeof input.offset && (0 <= input.offset && (Math.floor(input.offset) === input.offset && 0 <= input.offset && input.offset <= 18446744073709552000))) && (null === input.size || "number" === typeof input.size && (0 <= input.size && (Math.floor(input.size) === input.size && 0 <= input.size && input.size <= 18446744073709552000))) && (null === input.hash || "string" === typeof input.hash && /^([A-Fa-f0-9]{32})?$/.test(input.hash)) && (null === input.btime || "number" === typeof input.btime && (0 <= input.btime && (Math.floor(input.btime) === input.btime && 0 <= input.btime && input.btime <= 18446744073709552000))) && (null === input.path || "string" === typeof input.path) && (undefined !== input.error && (null === input.error || (Array.isArray(input.error) && input.error.every(elem => "object" === typeof elem && null !== elem && $io1(elem)) || "object" === typeof input.error && null !== input.error && $io1(input.error))));
796
- const $io1 = input => "string" === typeof input.message && (undefined === input.type || "string" === typeof input.type) && (undefined === input.code || "string" === typeof input.code) && (undefined === input.exitCode || "number" === typeof input.exitCode) && (undefined === input.signalCode || "number" === typeof input.signalCode) && (undefined === input.statusCode || "number" === typeof input.statusCode) && (undefined === input.headers || "object" === typeof input.headers && null !== input.headers && false === Array.isArray(input.headers) && $io2(input.headers)) && (undefined === input.data || "object" === typeof input.data && null !== input.data && false === Array.isArray(input.data) && $io3(input.data)) && (null === input.cause || undefined === input.cause || "object" === typeof input.cause && null !== input.cause && $io1(input.cause)) && (null === input.errors || undefined === input.errors || Array.isArray(input.errors) && input.errors.every(elem => "object" === typeof elem && null !== elem && $io1(elem)));
797
- const $io2 = input => Object.keys(input).every(key => {
798
- const value = input[key];
799
- if (undefined === value)
800
- return true;
801
- return "string" === typeof value;
802
- });
803
- const $io3 = input => true;
804
- return Array.isArray(input) && input.every(elem => "object" === typeof elem && null !== elem && $io0(elem));
805
- };
806
- export const assertBlocks = (input, errorFactory) => {
807
- const __is = input => {
808
- const $io0 = input => "string" === typeof input.id && /^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.id) && ("string" === typeof input.file && /^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.file)) && ("string" === typeof input.location && /^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.location)) && ("number" === typeof input.offset && (0 <= input.offset && (Math.floor(input.offset) === input.offset && 0 <= input.offset && input.offset <= 18446744073709552000))) && (null === input.size || "number" === typeof input.size && (0 <= input.size && (Math.floor(input.size) === input.size && 0 <= input.size && input.size <= 18446744073709552000))) && (null === input.hash || "string" === typeof input.hash && /^([A-Fa-f0-9]{32})?$/.test(input.hash)) && (null === input.btime || "number" === typeof input.btime && (0 <= input.btime && (Math.floor(input.btime) === input.btime && 0 <= input.btime && input.btime <= 18446744073709552000))) && (null === input.path || "string" === typeof input.path) && (undefined !== input.error && (null === input.error || (Array.isArray(input.error) && input.error.every(elem => "object" === typeof elem && null !== elem && $io1(elem)) || "object" === typeof input.error && null !== input.error && $io1(input.error))));
809
- const $io1 = input => "string" === typeof input.message && (undefined === input.type || "string" === typeof input.type) && (undefined === input.code || "string" === typeof input.code) && (undefined === input.exitCode || "number" === typeof input.exitCode) && (undefined === input.signalCode || "number" === typeof input.signalCode) && (undefined === input.statusCode || "number" === typeof input.statusCode) && (undefined === input.headers || "object" === typeof input.headers && null !== input.headers && false === Array.isArray(input.headers) && $io2(input.headers)) && (undefined === input.data || "object" === typeof input.data && null !== input.data && false === Array.isArray(input.data) && $io3(input.data)) && (null === input.cause || undefined === input.cause || "object" === typeof input.cause && null !== input.cause && $io1(input.cause)) && (null === input.errors || undefined === input.errors || Array.isArray(input.errors) && input.errors.every(elem => "object" === typeof elem && null !== elem && $io1(elem)));
810
- const $io2 = input => Object.keys(input).every(key => {
811
- const value = input[key];
812
- if (undefined === value)
813
- return true;
814
- return "string" === typeof value;
815
- });
816
- const $io3 = input => true;
817
- return Array.isArray(input) && input.every(elem => "object" === typeof elem && null !== elem && $io0(elem));
818
- };
819
- if (false === __is(input))
820
- ((input, _path, _exceptionable = true) => {
821
- const $guard = __typia.createAssert.guard;
822
- const $join = __typia.createAssert.join;
823
- const $ao0 = (input, _path, _exceptionable = true) => ("string" === typeof input.id && (/^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.id) || $guard(_exceptionable, {
824
- path: _path + ".id",
825
- expected: "string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">",
826
- value: input.id
827
- }, errorFactory)) || $guard(_exceptionable, {
828
- path: _path + ".id",
829
- expected: "(string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">)",
830
- value: input.id
831
- }, errorFactory)) && ("string" === typeof input.file && (/^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.file) || $guard(_exceptionable, {
832
- path: _path + ".file",
833
- expected: "string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">",
834
- value: input.file
835
- }, errorFactory)) || $guard(_exceptionable, {
836
- path: _path + ".file",
837
- expected: "(string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">)",
838
- value: input.file
839
- }, errorFactory)) && ("string" === typeof input.location && (/^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.location) || $guard(_exceptionable, {
840
- path: _path + ".location",
841
- expected: "string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">",
842
- value: input.location
843
- }, errorFactory)) || $guard(_exceptionable, {
844
- path: _path + ".location",
845
- expected: "(string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">)",
846
- value: input.location
847
- }, errorFactory)) && ("number" === typeof input.offset && (0 <= input.offset || $guard(_exceptionable, {
848
- path: _path + ".offset",
849
- expected: "number & Minimum<0>",
850
- value: input.offset
851
- }, errorFactory)) && (Math.floor(input.offset) === input.offset && 0 <= input.offset && input.offset <= 18446744073709552000 || $guard(_exceptionable, {
852
- path: _path + ".offset",
853
- expected: "number & Type<\"uint64\">",
854
- value: input.offset
855
- }, errorFactory)) || $guard(_exceptionable, {
856
- path: _path + ".offset",
857
- expected: "(number & Minimum<0> & Type<\"uint64\">)",
858
- value: input.offset
859
- }, errorFactory)) && (null === input.size || "number" === typeof input.size && (0 <= input.size || $guard(_exceptionable, {
860
- path: _path + ".size",
861
- expected: "number & Minimum<0>",
862
- value: input.size
863
- }, errorFactory)) && (Math.floor(input.size) === input.size && 0 <= input.size && input.size <= 18446744073709552000 || $guard(_exceptionable, {
864
- path: _path + ".size",
865
- expected: "number & Type<\"uint64\">",
866
- value: input.size
867
- }, errorFactory)) || $guard(_exceptionable, {
868
- path: _path + ".size",
869
- expected: "((number & Minimum<0> & Type<\"uint64\">) | null)",
870
- value: input.size
871
- }, errorFactory)) && (null === input.hash || "string" === typeof input.hash && (/^([A-Fa-f0-9]{32})?$/.test(input.hash) || $guard(_exceptionable, {
872
- path: _path + ".hash",
873
- expected: "string & Pattern<\"^([A-Fa-f0-9]{32})?$\">",
874
- value: input.hash
875
- }, errorFactory)) || $guard(_exceptionable, {
876
- path: _path + ".hash",
877
- expected: "((string & Pattern<\"^([A-Fa-f0-9]{32})?$\">) | null)",
878
- value: input.hash
879
- }, errorFactory)) && (null === input.btime || "number" === typeof input.btime && (0 <= input.btime || $guard(_exceptionable, {
880
- path: _path + ".btime",
881
- expected: "number & Minimum<0>",
882
- value: input.btime
883
- }, errorFactory)) && (Math.floor(input.btime) === input.btime && 0 <= input.btime && input.btime <= 18446744073709552000 || $guard(_exceptionable, {
884
- path: _path + ".btime",
885
- expected: "number & Type<\"uint64\">",
886
- value: input.btime
887
- }, errorFactory)) || $guard(_exceptionable, {
888
- path: _path + ".btime",
889
- expected: "((number & Minimum<0> & Type<\"uint64\">) | null)",
890
- value: input.btime
891
- }, errorFactory)) && (null === input.path || "string" === typeof input.path || $guard(_exceptionable, {
892
- path: _path + ".path",
893
- expected: "(null | string)",
894
- value: input.path
895
- }, errorFactory)) && ((undefined !== input.error || $guard(_exceptionable, {
896
- path: _path + ".error",
897
- expected: "(Array<NxtError> | NxtError | null)",
898
- value: input.error
899
- }, errorFactory)) && (null === input.error || (Array.isArray(input.error) && input.error.every((elem, _index2) => ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
900
- path: _path + ".error[" + _index2 + "]",
901
- expected: "NxtError",
902
- value: elem
903
- }, errorFactory)) && $ao1(elem, _path + ".error[" + _index2 + "]", true && _exceptionable) || $guard(_exceptionable, {
904
- path: _path + ".error[" + _index2 + "]",
905
- expected: "NxtError",
906
- value: elem
907
- }, errorFactory)) || "object" === typeof input.error && null !== input.error && $ao1(input.error, _path + ".error", true && _exceptionable) || $guard(_exceptionable, {
908
- path: _path + ".error",
909
- expected: "(Array<NxtError> | NxtError | null)",
910
- value: input.error
911
- }, errorFactory)) || $guard(_exceptionable, {
912
- path: _path + ".error",
913
- expected: "(Array<NxtError> | NxtError | null)",
914
- value: input.error
915
- }, errorFactory)));
916
- const $ao1 = (input, _path, _exceptionable = true) => ("string" === typeof input.message || $guard(_exceptionable, {
917
- path: _path + ".message",
918
- expected: "string",
919
- value: input.message
920
- }, errorFactory)) && (undefined === input.type || "string" === typeof input.type || $guard(_exceptionable, {
921
- path: _path + ".type",
922
- expected: "(string | undefined)",
923
- value: input.type
924
- }, errorFactory)) && (undefined === input.code || "string" === typeof input.code || $guard(_exceptionable, {
925
- path: _path + ".code",
926
- expected: "(string | undefined)",
927
- value: input.code
928
- }, errorFactory)) && (undefined === input.exitCode || "number" === typeof input.exitCode || $guard(_exceptionable, {
929
- path: _path + ".exitCode",
930
- expected: "(number | undefined)",
931
- value: input.exitCode
932
- }, errorFactory)) && (undefined === input.signalCode || "number" === typeof input.signalCode || $guard(_exceptionable, {
933
- path: _path + ".signalCode",
934
- expected: "(number | undefined)",
935
- value: input.signalCode
936
- }, errorFactory)) && (undefined === input.statusCode || "number" === typeof input.statusCode || $guard(_exceptionable, {
937
- path: _path + ".statusCode",
938
- expected: "(number | undefined)",
939
- value: input.statusCode
940
- }, errorFactory)) && (undefined === input.headers || ("object" === typeof input.headers && null !== input.headers && false === Array.isArray(input.headers) || $guard(_exceptionable, {
941
- path: _path + ".headers",
942
- expected: "(Record<string, string> | undefined)",
943
- value: input.headers
944
- }, errorFactory)) && $ao2(input.headers, _path + ".headers", true && _exceptionable) || $guard(_exceptionable, {
945
- path: _path + ".headers",
946
- expected: "(Record<string, string> | undefined)",
947
- value: input.headers
948
- }, errorFactory)) && (undefined === input.data || ("object" === typeof input.data && null !== input.data && false === Array.isArray(input.data) || $guard(_exceptionable, {
949
- path: _path + ".data",
950
- expected: "(object | undefined)",
951
- value: input.data
952
- }, errorFactory)) && $ao3(input.data, _path + ".data", true && _exceptionable) || $guard(_exceptionable, {
953
- path: _path + ".data",
954
- expected: "(object | undefined)",
955
- value: input.data
956
- }, errorFactory)) && (null === input.cause || undefined === input.cause || ("object" === typeof input.cause && null !== input.cause || $guard(_exceptionable, {
957
- path: _path + ".cause",
958
- expected: "(NxtError | null | undefined)",
959
- value: input.cause
960
- }, errorFactory)) && $ao1(input.cause, _path + ".cause", true && _exceptionable) || $guard(_exceptionable, {
961
- path: _path + ".cause",
962
- expected: "(NxtError | null | undefined)",
963
- value: input.cause
964
- }, errorFactory)) && (null === input.errors || undefined === input.errors || (Array.isArray(input.errors) || $guard(_exceptionable, {
965
- path: _path + ".errors",
966
- expected: "(Array<NxtError> | null | undefined)",
967
- value: input.errors
968
- }, errorFactory)) && input.errors.every((elem, _index3) => ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
969
- path: _path + ".errors[" + _index3 + "]",
970
- expected: "NxtError",
971
- value: elem
972
- }, errorFactory)) && $ao1(elem, _path + ".errors[" + _index3 + "]", true && _exceptionable) || $guard(_exceptionable, {
973
- path: _path + ".errors[" + _index3 + "]",
974
- expected: "NxtError",
975
- value: elem
976
- }, errorFactory)) || $guard(_exceptionable, {
977
- path: _path + ".errors",
978
- expected: "(Array<NxtError> | null | undefined)",
979
- value: input.errors
980
- }, errorFactory));
981
- const $ao2 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every(key => {
982
- const value = input[key];
983
- if (undefined === value)
984
- return true;
985
- return "string" === typeof value || $guard(_exceptionable, {
986
- path: _path + $join(key),
987
- expected: "string",
988
- value: value
989
- }, errorFactory);
990
- });
991
- const $ao3 = (input, _path, _exceptionable = true) => true;
992
- return (Array.isArray(input) || $guard(true, {
993
- path: _path + "",
994
- expected: "Blocks",
995
- value: input
996
- }, errorFactory)) && input.every((elem, _index1) => ("object" === typeof elem && null !== elem || $guard(true, {
997
- path: _path + "[" + _index1 + "]",
998
- expected: "Block",
999
- value: elem
1000
- }, errorFactory)) && $ao0(elem, _path + "[" + _index1 + "]", true) || $guard(true, {
1001
- path: _path + "[" + _index1 + "]",
1002
- expected: "Block",
1003
- value: elem
1004
- }, errorFactory)) || $guard(true, {
1005
- path: _path + "",
1006
- expected: "Blocks",
1007
- value: input
1008
- }, errorFactory);
1009
- })(input, "$input", true);
1010
- return input;
1011
- };
1012
- export const randomBlocks = generator => {
1013
- const $generator = __typia.createRandom.generator;
1014
- const $pick = __typia.createRandom.pick;
1015
- const $ro0 = (_recursive = false, _depth = 0) => ({
1016
- id: (generator?.customs ?? $generator.customs)?.string?.([
1017
- {
1018
- name: "Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">",
1019
- kind: "pattern",
1020
- value: "^[0-9A-Za-z~][0-9A-Za-z~._: -]*$"
1021
- }
1022
- ]) ?? (generator?.pattern ?? $generator.pattern)(/^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/),
1023
- file: (generator?.customs ?? $generator.customs)?.string?.([
1024
- {
1025
- name: "Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">",
1026
- kind: "pattern",
1027
- value: "^[0-9A-Za-z~][0-9A-Za-z~._: -]*$"
1028
- }
1029
- ]) ?? (generator?.pattern ?? $generator.pattern)(/^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/),
1030
- location: (generator?.customs ?? $generator.customs)?.string?.([
1031
- {
1032
- name: "Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">",
1033
- kind: "pattern",
1034
- value: "^[0-9A-Za-z~][0-9A-Za-z~._: -]*$"
1035
- }
1036
- ]) ?? (generator?.pattern ?? $generator.pattern)(/^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/),
1037
- offset: (generator?.customs ?? $generator.customs)?.number?.([
1038
- {
1039
- name: "Minimum<0>",
1040
- kind: "minimum",
1041
- value: 0
1042
- },
1043
- {
1044
- name: "Type<\"uint64\">",
1045
- kind: "type",
1046
- value: "uint64"
1047
- }
1048
- ]) ?? (generator?.integer ?? $generator.integer)(0, 10),
1049
- size: $pick([
1050
- () => null,
1051
- () => (generator?.customs ?? $generator.customs)?.number?.([
1052
- {
1053
- name: "Minimum<0>",
1054
- kind: "minimum",
1055
- value: 0
1056
- },
1057
- {
1058
- name: "Type<\"uint64\">",
1059
- kind: "type",
1060
- value: "uint64"
1061
- }
1062
- ]) ?? (generator?.integer ?? $generator.integer)(0, 10)
1063
- ])(),
1064
- hash: $pick([
1065
- () => null,
1066
- () => (generator?.customs ?? $generator.customs)?.string?.([
1067
- {
1068
- name: "Pattern<\"^([A-Fa-f0-9]{32})?$\">",
1069
- kind: "pattern",
1070
- value: "^([A-Fa-f0-9]{32})?$"
1071
- }
1072
- ]) ?? (generator?.pattern ?? $generator.pattern)(/^([A-Fa-f0-9]{32})?$/)
1073
- ])(),
1074
- btime: $pick([
1075
- () => null,
1076
- () => (generator?.customs ?? $generator.customs)?.number?.([
1077
- {
1078
- name: "Minimum<0>",
1079
- kind: "minimum",
1080
- value: 0
1081
- },
1082
- {
1083
- name: "Type<\"uint64\">",
1084
- kind: "type",
1085
- value: "uint64"
1086
- }
1087
- ]) ?? (generator?.integer ?? $generator.integer)(0, 10)
1088
- ])(),
1089
- path: $pick([
1090
- () => null,
1091
- () => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
1092
- ])(),
1093
- error: $pick([
1094
- () => null,
1095
- () => (generator?.array ?? $generator.array)(() => $ro1(_recursive, _recursive ? 1 + _depth : _depth)),
1096
- () => $ro1(_recursive, _recursive ? 1 + _depth : _depth)
1097
- ])()
1098
- });
1099
- const $ro1 = (_recursive = true, _depth = 0) => ({
1100
- message: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
1101
- type: $pick([
1102
- () => undefined,
1103
- () => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
1104
- ])(),
1105
- code: $pick([
1106
- () => undefined,
1107
- () => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
1108
- ])(),
1109
- exitCode: $pick([
1110
- () => undefined,
1111
- () => (generator?.customs ?? $generator.customs)?.number?.([]) ?? (generator?.number ?? $generator.number)(0, 100)
1112
- ])(),
1113
- signalCode: $pick([
1114
- () => undefined,
1115
- () => (generator?.customs ?? $generator.customs)?.number?.([]) ?? (generator?.number ?? $generator.number)(0, 100)
1116
- ])(),
1117
- statusCode: $pick([
1118
- () => undefined,
1119
- () => (generator?.customs ?? $generator.customs)?.number?.([]) ?? (generator?.number ?? $generator.number)(0, 100)
1120
- ])(),
1121
- headers: $pick([
1122
- () => undefined,
1123
- () => $ro2(true, _recursive ? 1 + _depth : _depth)
1124
- ])(),
1125
- data: $pick([
1126
- () => undefined,
1127
- () => $ro3(true, _recursive ? 1 + _depth : _depth)
1128
- ])(),
1129
- cause: $pick([
1130
- () => undefined,
1131
- () => null,
1132
- () => $ro1(true, _recursive ? 1 + _depth : _depth)
1133
- ])(),
1134
- errors: $pick([
1135
- () => undefined,
1136
- () => null,
1137
- () => _recursive && 5 < _depth ? [] : 5 >= _depth ? (generator?.array ?? $generator.array)(() => $ro1(true, _recursive ? 1 + _depth : _depth)) : []
1138
- ])()
1139
- });
1140
- const $ro2 = (_recursive = false, _depth = 0) => {
1141
- const output = {};
1142
- (generator?.array ?? $generator.array)(() => output[(generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()] = (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(), (generator?.integer ?? $generator.integer)(0, 3));
1143
- return output;
1144
- };
1145
- const $ro3 = (_recursive = false, _depth = 0) => {};
1146
- return (generator?.array ?? $generator.array)(() => $ro0());
1147
- };
1148
- export const assertGuardBlocks = (input, errorFactory) => {
1149
- const __is = input => {
1150
- const $io0 = input => "string" === typeof input.id && /^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.id) && ("string" === typeof input.file && /^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.file)) && ("string" === typeof input.location && /^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.location)) && ("number" === typeof input.offset && (0 <= input.offset && (Math.floor(input.offset) === input.offset && 0 <= input.offset && input.offset <= 18446744073709552000))) && (null === input.size || "number" === typeof input.size && (0 <= input.size && (Math.floor(input.size) === input.size && 0 <= input.size && input.size <= 18446744073709552000))) && (null === input.hash || "string" === typeof input.hash && /^([A-Fa-f0-9]{32})?$/.test(input.hash)) && (null === input.btime || "number" === typeof input.btime && (0 <= input.btime && (Math.floor(input.btime) === input.btime && 0 <= input.btime && input.btime <= 18446744073709552000))) && (null === input.path || "string" === typeof input.path) && (undefined !== input.error && (null === input.error || (Array.isArray(input.error) && input.error.every(elem => "object" === typeof elem && null !== elem && $io1(elem)) || "object" === typeof input.error && null !== input.error && $io1(input.error))));
1151
- const $io1 = input => "string" === typeof input.message && (undefined === input.type || "string" === typeof input.type) && (undefined === input.code || "string" === typeof input.code) && (undefined === input.exitCode || "number" === typeof input.exitCode) && (undefined === input.signalCode || "number" === typeof input.signalCode) && (undefined === input.statusCode || "number" === typeof input.statusCode) && (undefined === input.headers || "object" === typeof input.headers && null !== input.headers && false === Array.isArray(input.headers) && $io2(input.headers)) && (undefined === input.data || "object" === typeof input.data && null !== input.data && false === Array.isArray(input.data) && $io3(input.data)) && (null === input.cause || undefined === input.cause || "object" === typeof input.cause && null !== input.cause && $io1(input.cause)) && (null === input.errors || undefined === input.errors || Array.isArray(input.errors) && input.errors.every(elem => "object" === typeof elem && null !== elem && $io1(elem)));
1152
- const $io2 = input => Object.keys(input).every(key => {
1153
- const value = input[key];
1154
- if (undefined === value)
1155
- return true;
1156
- return "string" === typeof value;
1157
- });
1158
- const $io3 = input => true;
1159
- return Array.isArray(input) && input.every(elem => "object" === typeof elem && null !== elem && $io0(elem));
1160
- };
1161
- if (false === __is(input))
1162
- ((input, _path, _exceptionable = true) => {
1163
- const $guard = __typia.createAssertGuard.guard;
1164
- const $join = __typia.createAssertGuard.join;
1165
- const $ao0 = (input, _path, _exceptionable = true) => ("string" === typeof input.id && (/^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.id) || $guard(_exceptionable, {
1166
- path: _path + ".id",
1167
- expected: "string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">",
1168
- value: input.id
1169
- }, errorFactory)) || $guard(_exceptionable, {
1170
- path: _path + ".id",
1171
- expected: "(string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">)",
1172
- value: input.id
1173
- }, errorFactory)) && ("string" === typeof input.file && (/^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.file) || $guard(_exceptionable, {
1174
- path: _path + ".file",
1175
- expected: "string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">",
1176
- value: input.file
1177
- }, errorFactory)) || $guard(_exceptionable, {
1178
- path: _path + ".file",
1179
- expected: "(string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">)",
1180
- value: input.file
1181
- }, errorFactory)) && ("string" === typeof input.location && (/^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.location) || $guard(_exceptionable, {
1182
- path: _path + ".location",
1183
- expected: "string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">",
1184
- value: input.location
1185
- }, errorFactory)) || $guard(_exceptionable, {
1186
- path: _path + ".location",
1187
- expected: "(string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">)",
1188
- value: input.location
1189
- }, errorFactory)) && ("number" === typeof input.offset && (0 <= input.offset || $guard(_exceptionable, {
1190
- path: _path + ".offset",
1191
- expected: "number & Minimum<0>",
1192
- value: input.offset
1193
- }, errorFactory)) && (Math.floor(input.offset) === input.offset && 0 <= input.offset && input.offset <= 18446744073709552000 || $guard(_exceptionable, {
1194
- path: _path + ".offset",
1195
- expected: "number & Type<\"uint64\">",
1196
- value: input.offset
1197
- }, errorFactory)) || $guard(_exceptionable, {
1198
- path: _path + ".offset",
1199
- expected: "(number & Minimum<0> & Type<\"uint64\">)",
1200
- value: input.offset
1201
- }, errorFactory)) && (null === input.size || "number" === typeof input.size && (0 <= input.size || $guard(_exceptionable, {
1202
- path: _path + ".size",
1203
- expected: "number & Minimum<0>",
1204
- value: input.size
1205
- }, errorFactory)) && (Math.floor(input.size) === input.size && 0 <= input.size && input.size <= 18446744073709552000 || $guard(_exceptionable, {
1206
- path: _path + ".size",
1207
- expected: "number & Type<\"uint64\">",
1208
- value: input.size
1209
- }, errorFactory)) || $guard(_exceptionable, {
1210
- path: _path + ".size",
1211
- expected: "((number & Minimum<0> & Type<\"uint64\">) | null)",
1212
- value: input.size
1213
- }, errorFactory)) && (null === input.hash || "string" === typeof input.hash && (/^([A-Fa-f0-9]{32})?$/.test(input.hash) || $guard(_exceptionable, {
1214
- path: _path + ".hash",
1215
- expected: "string & Pattern<\"^([A-Fa-f0-9]{32})?$\">",
1216
- value: input.hash
1217
- }, errorFactory)) || $guard(_exceptionable, {
1218
- path: _path + ".hash",
1219
- expected: "((string & Pattern<\"^([A-Fa-f0-9]{32})?$\">) | null)",
1220
- value: input.hash
1221
- }, errorFactory)) && (null === input.btime || "number" === typeof input.btime && (0 <= input.btime || $guard(_exceptionable, {
1222
- path: _path + ".btime",
1223
- expected: "number & Minimum<0>",
1224
- value: input.btime
1225
- }, errorFactory)) && (Math.floor(input.btime) === input.btime && 0 <= input.btime && input.btime <= 18446744073709552000 || $guard(_exceptionable, {
1226
- path: _path + ".btime",
1227
- expected: "number & Type<\"uint64\">",
1228
- value: input.btime
1229
- }, errorFactory)) || $guard(_exceptionable, {
1230
- path: _path + ".btime",
1231
- expected: "((number & Minimum<0> & Type<\"uint64\">) | null)",
1232
- value: input.btime
1233
- }, errorFactory)) && (null === input.path || "string" === typeof input.path || $guard(_exceptionable, {
1234
- path: _path + ".path",
1235
- expected: "(null | string)",
1236
- value: input.path
1237
- }, errorFactory)) && ((undefined !== input.error || $guard(_exceptionable, {
1238
- path: _path + ".error",
1239
- expected: "(Array<NxtError> | NxtError | null)",
1240
- value: input.error
1241
- }, errorFactory)) && (null === input.error || (Array.isArray(input.error) && input.error.every((elem, _index2) => ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
1242
- path: _path + ".error[" + _index2 + "]",
1243
- expected: "NxtError",
1244
- value: elem
1245
- }, errorFactory)) && $ao1(elem, _path + ".error[" + _index2 + "]", true && _exceptionable) || $guard(_exceptionable, {
1246
- path: _path + ".error[" + _index2 + "]",
1247
- expected: "NxtError",
1248
- value: elem
1249
- }, errorFactory)) || "object" === typeof input.error && null !== input.error && $ao1(input.error, _path + ".error", true && _exceptionable) || $guard(_exceptionable, {
1250
- path: _path + ".error",
1251
- expected: "(Array<NxtError> | NxtError | null)",
1252
- value: input.error
1253
- }, errorFactory)) || $guard(_exceptionable, {
1254
- path: _path + ".error",
1255
- expected: "(Array<NxtError> | NxtError | null)",
1256
- value: input.error
1257
- }, errorFactory)));
1258
- const $ao1 = (input, _path, _exceptionable = true) => ("string" === typeof input.message || $guard(_exceptionable, {
1259
- path: _path + ".message",
1260
- expected: "string",
1261
- value: input.message
1262
- }, errorFactory)) && (undefined === input.type || "string" === typeof input.type || $guard(_exceptionable, {
1263
- path: _path + ".type",
1264
- expected: "(string | undefined)",
1265
- value: input.type
1266
- }, errorFactory)) && (undefined === input.code || "string" === typeof input.code || $guard(_exceptionable, {
1267
- path: _path + ".code",
1268
- expected: "(string | undefined)",
1269
- value: input.code
1270
- }, errorFactory)) && (undefined === input.exitCode || "number" === typeof input.exitCode || $guard(_exceptionable, {
1271
- path: _path + ".exitCode",
1272
- expected: "(number | undefined)",
1273
- value: input.exitCode
1274
- }, errorFactory)) && (undefined === input.signalCode || "number" === typeof input.signalCode || $guard(_exceptionable, {
1275
- path: _path + ".signalCode",
1276
- expected: "(number | undefined)",
1277
- value: input.signalCode
1278
- }, errorFactory)) && (undefined === input.statusCode || "number" === typeof input.statusCode || $guard(_exceptionable, {
1279
- path: _path + ".statusCode",
1280
- expected: "(number | undefined)",
1281
- value: input.statusCode
1282
- }, errorFactory)) && (undefined === input.headers || ("object" === typeof input.headers && null !== input.headers && false === Array.isArray(input.headers) || $guard(_exceptionable, {
1283
- path: _path + ".headers",
1284
- expected: "(Record<string, string> | undefined)",
1285
- value: input.headers
1286
- }, errorFactory)) && $ao2(input.headers, _path + ".headers", true && _exceptionable) || $guard(_exceptionable, {
1287
- path: _path + ".headers",
1288
- expected: "(Record<string, string> | undefined)",
1289
- value: input.headers
1290
- }, errorFactory)) && (undefined === input.data || ("object" === typeof input.data && null !== input.data && false === Array.isArray(input.data) || $guard(_exceptionable, {
1291
- path: _path + ".data",
1292
- expected: "(object | undefined)",
1293
- value: input.data
1294
- }, errorFactory)) && $ao3(input.data, _path + ".data", true && _exceptionable) || $guard(_exceptionable, {
1295
- path: _path + ".data",
1296
- expected: "(object | undefined)",
1297
- value: input.data
1298
- }, errorFactory)) && (null === input.cause || undefined === input.cause || ("object" === typeof input.cause && null !== input.cause || $guard(_exceptionable, {
1299
- path: _path + ".cause",
1300
- expected: "(NxtError | null | undefined)",
1301
- value: input.cause
1302
- }, errorFactory)) && $ao1(input.cause, _path + ".cause", true && _exceptionable) || $guard(_exceptionable, {
1303
- path: _path + ".cause",
1304
- expected: "(NxtError | null | undefined)",
1305
- value: input.cause
1306
- }, errorFactory)) && (null === input.errors || undefined === input.errors || (Array.isArray(input.errors) || $guard(_exceptionable, {
1307
- path: _path + ".errors",
1308
- expected: "(Array<NxtError> | null | undefined)",
1309
- value: input.errors
1310
- }, errorFactory)) && input.errors.every((elem, _index3) => ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
1311
- path: _path + ".errors[" + _index3 + "]",
1312
- expected: "NxtError",
1313
- value: elem
1314
- }, errorFactory)) && $ao1(elem, _path + ".errors[" + _index3 + "]", true && _exceptionable) || $guard(_exceptionable, {
1315
- path: _path + ".errors[" + _index3 + "]",
1316
- expected: "NxtError",
1317
- value: elem
1318
- }, errorFactory)) || $guard(_exceptionable, {
1319
- path: _path + ".errors",
1320
- expected: "(Array<NxtError> | null | undefined)",
1321
- value: input.errors
1322
- }, errorFactory));
1323
- const $ao2 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every(key => {
1324
- const value = input[key];
1325
- if (undefined === value)
1326
- return true;
1327
- return "string" === typeof value || $guard(_exceptionable, {
1328
- path: _path + $join(key),
1329
- expected: "string",
1330
- value: value
1331
- }, errorFactory);
1332
- });
1333
- const $ao3 = (input, _path, _exceptionable = true) => true;
1334
- return (Array.isArray(input) || $guard(true, {
1335
- path: _path + "",
1336
- expected: "Blocks",
1337
- value: input
1338
- }, errorFactory)) && input.every((elem, _index1) => ("object" === typeof elem && null !== elem || $guard(true, {
1339
- path: _path + "[" + _index1 + "]",
1340
- expected: "Block",
1341
- value: elem
1342
- }, errorFactory)) && $ao0(elem, _path + "[" + _index1 + "]", true) || $guard(true, {
1343
- path: _path + "[" + _index1 + "]",
1344
- expected: "Block",
1345
- value: elem
1346
- }, errorFactory)) || $guard(true, {
1347
- path: _path + "",
1348
- expected: "Blocks",
1349
- value: input
1350
- }, errorFactory);
1351
- })(input, "$input", true);
1352
- };
1353
- export const stringifyBlocks = input => {
1354
- const $io1 = input => "string" === typeof input.message && (undefined === input.type || "string" === typeof input.type) && (undefined === input.code || "string" === typeof input.code) && (undefined === input.exitCode || "number" === typeof input.exitCode) && (undefined === input.signalCode || "number" === typeof input.signalCode) && (undefined === input.statusCode || "number" === typeof input.statusCode) && (undefined === input.headers || "object" === typeof input.headers && null !== input.headers && false === Array.isArray(input.headers) && $io2(input.headers)) && (undefined === input.data || "object" === typeof input.data && null !== input.data && false === Array.isArray(input.data) && $io3(input.data)) && (null === input.cause || undefined === input.cause || "object" === typeof input.cause && null !== input.cause && $io1(input.cause)) && (null === input.errors || undefined === input.errors || Array.isArray(input.errors) && input.errors.every(elem => "object" === typeof elem && null !== elem && $io1(elem)));
1355
- const $io2 = input => Object.keys(input).every(key => {
1356
- const value = input[key];
1357
- if (undefined === value)
1358
- return true;
1359
- return "string" === typeof value;
1360
- });
1361
- const $io3 = input => true;
1362
- const $string = __typia.json.createStringify.string;
1363
- const $throws = __typia.json.createStringify.throws;
1364
- const $so0 = input => `{"id":${$string(input.id)},"file":${$string(input.file)},"location":${$string(input.location)},"offset":${input.offset},"size":${null !== input.size ? input.size : "null"},"hash":${null !== input.hash ? $string(input.hash) : "null"},"btime":${null !== input.btime ? input.btime : "null"},"path":${null !== input.path ? $string(input.path) : "null"},"error":${null !== input.error ? (() => {
1365
- if (Array.isArray(input.error))
1366
- return `[${input.error.map(elem => $so1(elem)).join(",")}]`;
1367
- if ("object" === typeof input.error && null !== input.error)
1368
- return $so1(input.error);
1369
- $throws({
1370
- expected: "(Array<NxtError> | NxtError | null)",
1371
- value: input.error
1372
- });
1373
- })() : "null"}}`;
1374
- const $so1 = input => `{${undefined === input.type ? "" : `"type":${undefined !== input.type ? $string(input.type) : undefined},`}${undefined === input.code ? "" : `"code":${undefined !== input.code ? $string(input.code) : undefined},`}${undefined === input.exitCode ? "" : `"exitCode":${undefined !== input.exitCode ? input.exitCode : undefined},`}${undefined === input.signalCode ? "" : `"signalCode":${undefined !== input.signalCode ? input.signalCode : undefined},`}${undefined === input.statusCode ? "" : `"statusCode":${undefined !== input.statusCode ? input.statusCode : undefined},`}${undefined === input.headers ? "" : `"headers":${undefined !== input.headers ? $so2(input.headers) : undefined},`}${undefined === input.data ? "" : `"data":${undefined !== input.data ? "{}" : undefined},`}${undefined === input.cause ? "" : `"cause":${undefined !== input.cause ? null !== input.cause ? $so1(input.cause) : "null" : undefined},`}${undefined === input.errors ? "" : `"errors":${undefined !== input.errors ? null !== input.errors ? `[${input.errors.map(elem => $so1(elem)).join(",")}]` : "null" : undefined},`}"message":${$string(input.message)}}`;
1375
- const $so2 = input => `{${Object.entries(input).map(([key, value]) => { if (undefined === value)
1376
- return ""; return `${JSON.stringify(key)}:${$string(value)}`; }).filter(str => "" !== str).join(",")}}`;
1377
- return `[${input.map(elem => $so0(elem)).join(",")}]`;
1378
- };
1379
- export const assertStringifyBlocks = (input, errorFactory) => { const assert = (input, errorFactory) => {
1380
- const __is = input => {
1381
- const $io0 = input => "string" === typeof input.id && /^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.id) && ("string" === typeof input.file && /^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.file)) && ("string" === typeof input.location && /^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.location)) && ("number" === typeof input.offset && (0 <= input.offset && (Math.floor(input.offset) === input.offset && 0 <= input.offset && input.offset <= 18446744073709552000))) && (null === input.size || "number" === typeof input.size && (0 <= input.size && (Math.floor(input.size) === input.size && 0 <= input.size && input.size <= 18446744073709552000))) && (null === input.hash || "string" === typeof input.hash && /^([A-Fa-f0-9]{32})?$/.test(input.hash)) && (null === input.btime || "number" === typeof input.btime && (0 <= input.btime && (Math.floor(input.btime) === input.btime && 0 <= input.btime && input.btime <= 18446744073709552000))) && (null === input.path || "string" === typeof input.path) && (undefined !== input.error && (null === input.error || (Array.isArray(input.error) && input.error.every(elem => "object" === typeof elem && null !== elem && $io1(elem)) || "object" === typeof input.error && null !== input.error && $io1(input.error))));
1382
- const $io1 = input => "string" === typeof input.message && (undefined === input.type || "string" === typeof input.type) && (undefined === input.code || "string" === typeof input.code) && (undefined === input.exitCode || "number" === typeof input.exitCode && !Number.isNaN(input.exitCode)) && (undefined === input.signalCode || "number" === typeof input.signalCode && !Number.isNaN(input.signalCode)) && (undefined === input.statusCode || "number" === typeof input.statusCode && !Number.isNaN(input.statusCode)) && (undefined === input.headers || "object" === typeof input.headers && null !== input.headers && false === Array.isArray(input.headers) && $io2(input.headers)) && (undefined === input.data || "object" === typeof input.data && null !== input.data && false === Array.isArray(input.data) && $io3(input.data)) && (null === input.cause || undefined === input.cause || "object" === typeof input.cause && null !== input.cause && $io1(input.cause)) && (null === input.errors || undefined === input.errors || Array.isArray(input.errors) && input.errors.every(elem => "object" === typeof elem && null !== elem && $io1(elem)));
1383
- const $io2 = input => Object.keys(input).every(key => {
1384
- const value = input[key];
1385
- if (undefined === value)
1386
- return true;
1387
- return "string" === typeof value;
1388
- });
1389
- const $io3 = input => true;
1390
- return Array.isArray(input) && input.every(elem => "object" === typeof elem && null !== elem && $io0(elem));
1391
- };
1392
- if (false === __is(input))
1393
- ((input, _path, _exceptionable = true) => {
1394
- const $guard = __typia.json.createAssertStringify.guard;
1395
- const $join = __typia.json.createAssertStringify.join;
1396
- const $ao0 = (input, _path, _exceptionable = true) => ("string" === typeof input.id && (/^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.id) || $guard(_exceptionable, {
1397
- path: _path + ".id",
1398
- expected: "string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">",
1399
- value: input.id
1400
- }, errorFactory)) || $guard(_exceptionable, {
1401
- path: _path + ".id",
1402
- expected: "(string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">)",
1403
- value: input.id
1404
- }, errorFactory)) && ("string" === typeof input.file && (/^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.file) || $guard(_exceptionable, {
1405
- path: _path + ".file",
1406
- expected: "string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">",
1407
- value: input.file
1408
- }, errorFactory)) || $guard(_exceptionable, {
1409
- path: _path + ".file",
1410
- expected: "(string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">)",
1411
- value: input.file
1412
- }, errorFactory)) && ("string" === typeof input.location && (/^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.location) || $guard(_exceptionable, {
1413
- path: _path + ".location",
1414
- expected: "string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">",
1415
- value: input.location
1416
- }, errorFactory)) || $guard(_exceptionable, {
1417
- path: _path + ".location",
1418
- expected: "(string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">)",
1419
- value: input.location
1420
- }, errorFactory)) && ("number" === typeof input.offset && (0 <= input.offset || $guard(_exceptionable, {
1421
- path: _path + ".offset",
1422
- expected: "number & Minimum<0>",
1423
- value: input.offset
1424
- }, errorFactory)) && (Math.floor(input.offset) === input.offset && 0 <= input.offset && input.offset <= 18446744073709552000 || $guard(_exceptionable, {
1425
- path: _path + ".offset",
1426
- expected: "number & Type<\"uint64\">",
1427
- value: input.offset
1428
- }, errorFactory)) || $guard(_exceptionable, {
1429
- path: _path + ".offset",
1430
- expected: "(number & Minimum<0> & Type<\"uint64\">)",
1431
- value: input.offset
1432
- }, errorFactory)) && (null === input.size || "number" === typeof input.size && (0 <= input.size || $guard(_exceptionable, {
1433
- path: _path + ".size",
1434
- expected: "number & Minimum<0>",
1435
- value: input.size
1436
- }, errorFactory)) && (Math.floor(input.size) === input.size && 0 <= input.size && input.size <= 18446744073709552000 || $guard(_exceptionable, {
1437
- path: _path + ".size",
1438
- expected: "number & Type<\"uint64\">",
1439
- value: input.size
1440
- }, errorFactory)) || $guard(_exceptionable, {
1441
- path: _path + ".size",
1442
- expected: "((number & Minimum<0> & Type<\"uint64\">) | null)",
1443
- value: input.size
1444
- }, errorFactory)) && (null === input.hash || "string" === typeof input.hash && (/^([A-Fa-f0-9]{32})?$/.test(input.hash) || $guard(_exceptionable, {
1445
- path: _path + ".hash",
1446
- expected: "string & Pattern<\"^([A-Fa-f0-9]{32})?$\">",
1447
- value: input.hash
1448
- }, errorFactory)) || $guard(_exceptionable, {
1449
- path: _path + ".hash",
1450
- expected: "((string & Pattern<\"^([A-Fa-f0-9]{32})?$\">) | null)",
1451
- value: input.hash
1452
- }, errorFactory)) && (null === input.btime || "number" === typeof input.btime && (0 <= input.btime || $guard(_exceptionable, {
1453
- path: _path + ".btime",
1454
- expected: "number & Minimum<0>",
1455
- value: input.btime
1456
- }, errorFactory)) && (Math.floor(input.btime) === input.btime && 0 <= input.btime && input.btime <= 18446744073709552000 || $guard(_exceptionable, {
1457
- path: _path + ".btime",
1458
- expected: "number & Type<\"uint64\">",
1459
- value: input.btime
1460
- }, errorFactory)) || $guard(_exceptionable, {
1461
- path: _path + ".btime",
1462
- expected: "((number & Minimum<0> & Type<\"uint64\">) | null)",
1463
- value: input.btime
1464
- }, errorFactory)) && (null === input.path || "string" === typeof input.path || $guard(_exceptionable, {
1465
- path: _path + ".path",
1466
- expected: "(null | string)",
1467
- value: input.path
1468
- }, errorFactory)) && ((undefined !== input.error || $guard(_exceptionable, {
1469
- path: _path + ".error",
1470
- expected: "(Array<NxtError> | NxtError | null)",
1471
- value: input.error
1472
- }, errorFactory)) && (null === input.error || (Array.isArray(input.error) && input.error.every((elem, _index2) => ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
1473
- path: _path + ".error[" + _index2 + "]",
1474
- expected: "NxtError",
1475
- value: elem
1476
- }, errorFactory)) && $ao1(elem, _path + ".error[" + _index2 + "]", true && _exceptionable) || $guard(_exceptionable, {
1477
- path: _path + ".error[" + _index2 + "]",
1478
- expected: "NxtError",
1479
- value: elem
1480
- }, errorFactory)) || "object" === typeof input.error && null !== input.error && $ao1(input.error, _path + ".error", true && _exceptionable) || $guard(_exceptionable, {
1481
- path: _path + ".error",
1482
- expected: "(Array<NxtError> | NxtError | null)",
1483
- value: input.error
1484
- }, errorFactory)) || $guard(_exceptionable, {
1485
- path: _path + ".error",
1486
- expected: "(Array<NxtError> | NxtError | null)",
1487
- value: input.error
1488
- }, errorFactory)));
1489
- const $ao1 = (input, _path, _exceptionable = true) => ("string" === typeof input.message || $guard(_exceptionable, {
1490
- path: _path + ".message",
1491
- expected: "string",
1492
- value: input.message
1493
- }, errorFactory)) && (undefined === input.type || "string" === typeof input.type || $guard(_exceptionable, {
1494
- path: _path + ".type",
1495
- expected: "(string | undefined)",
1496
- value: input.type
1497
- }, errorFactory)) && (undefined === input.code || "string" === typeof input.code || $guard(_exceptionable, {
1498
- path: _path + ".code",
1499
- expected: "(string | undefined)",
1500
- value: input.code
1501
- }, errorFactory)) && (undefined === input.exitCode || "number" === typeof input.exitCode && !Number.isNaN(input.exitCode) || $guard(_exceptionable, {
1502
- path: _path + ".exitCode",
1503
- expected: "(number | undefined)",
1504
- value: input.exitCode
1505
- }, errorFactory)) && (undefined === input.signalCode || "number" === typeof input.signalCode && !Number.isNaN(input.signalCode) || $guard(_exceptionable, {
1506
- path: _path + ".signalCode",
1507
- expected: "(number | undefined)",
1508
- value: input.signalCode
1509
- }, errorFactory)) && (undefined === input.statusCode || "number" === typeof input.statusCode && !Number.isNaN(input.statusCode) || $guard(_exceptionable, {
1510
- path: _path + ".statusCode",
1511
- expected: "(number | undefined)",
1512
- value: input.statusCode
1513
- }, errorFactory)) && (undefined === input.headers || ("object" === typeof input.headers && null !== input.headers && false === Array.isArray(input.headers) || $guard(_exceptionable, {
1514
- path: _path + ".headers",
1515
- expected: "(Record<string, string> | undefined)",
1516
- value: input.headers
1517
- }, errorFactory)) && $ao2(input.headers, _path + ".headers", true && _exceptionable) || $guard(_exceptionable, {
1518
- path: _path + ".headers",
1519
- expected: "(Record<string, string> | undefined)",
1520
- value: input.headers
1521
- }, errorFactory)) && (undefined === input.data || ("object" === typeof input.data && null !== input.data && false === Array.isArray(input.data) || $guard(_exceptionable, {
1522
- path: _path + ".data",
1523
- expected: "(object | undefined)",
1524
- value: input.data
1525
- }, errorFactory)) && $ao3(input.data, _path + ".data", true && _exceptionable) || $guard(_exceptionable, {
1526
- path: _path + ".data",
1527
- expected: "(object | undefined)",
1528
- value: input.data
1529
- }, errorFactory)) && (null === input.cause || undefined === input.cause || ("object" === typeof input.cause && null !== input.cause || $guard(_exceptionable, {
1530
- path: _path + ".cause",
1531
- expected: "(NxtError | null | undefined)",
1532
- value: input.cause
1533
- }, errorFactory)) && $ao1(input.cause, _path + ".cause", true && _exceptionable) || $guard(_exceptionable, {
1534
- path: _path + ".cause",
1535
- expected: "(NxtError | null | undefined)",
1536
- value: input.cause
1537
- }, errorFactory)) && (null === input.errors || undefined === input.errors || (Array.isArray(input.errors) || $guard(_exceptionable, {
1538
- path: _path + ".errors",
1539
- expected: "(Array<NxtError> | null | undefined)",
1540
- value: input.errors
1541
- }, errorFactory)) && input.errors.every((elem, _index3) => ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
1542
- path: _path + ".errors[" + _index3 + "]",
1543
- expected: "NxtError",
1544
- value: elem
1545
- }, errorFactory)) && $ao1(elem, _path + ".errors[" + _index3 + "]", true && _exceptionable) || $guard(_exceptionable, {
1546
- path: _path + ".errors[" + _index3 + "]",
1547
- expected: "NxtError",
1548
- value: elem
1549
- }, errorFactory)) || $guard(_exceptionable, {
1550
- path: _path + ".errors",
1551
- expected: "(Array<NxtError> | null | undefined)",
1552
- value: input.errors
1553
- }, errorFactory));
1554
- const $ao2 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every(key => {
1555
- const value = input[key];
1556
- if (undefined === value)
1557
- return true;
1558
- return "string" === typeof value || $guard(_exceptionable, {
1559
- path: _path + $join(key),
1560
- expected: "string",
1561
- value: value
1562
- }, errorFactory);
1563
- });
1564
- const $ao3 = (input, _path, _exceptionable = true) => true;
1565
- return (Array.isArray(input) || $guard(true, {
1566
- path: _path + "",
1567
- expected: "Blocks",
1568
- value: input
1569
- }, errorFactory)) && input.every((elem, _index1) => ("object" === typeof elem && null !== elem || $guard(true, {
1570
- path: _path + "[" + _index1 + "]",
1571
- expected: "Block",
1572
- value: elem
1573
- }, errorFactory)) && $ao0(elem, _path + "[" + _index1 + "]", true) || $guard(true, {
1574
- path: _path + "[" + _index1 + "]",
1575
- expected: "Block",
1576
- value: elem
1577
- }, errorFactory)) || $guard(true, {
1578
- path: _path + "",
1579
- expected: "Blocks",
1580
- value: input
1581
- }, errorFactory);
1582
- })(input, "$input", true);
1
+ import * as __typia_transform__isTypeUint64 from "typia/lib/internal/_isTypeUint64.js";
2
+ import * as __typia_transform__assertGuard from "typia/lib/internal/_assertGuard.js";
3
+ import * as __typia_transform__accessExpressionAsString from "typia/lib/internal/_accessExpressionAsString.js";
4
+ import * as __typia_transform__randomPattern from "typia/lib/internal/_randomPattern.js";
5
+ import * as __typia_transform__randomInteger from "typia/lib/internal/_randomInteger.js";
6
+ import * as __typia_transform__randomPick from "typia/lib/internal/_randomPick.js";
7
+ import * as __typia_transform__randomString from "typia/lib/internal/_randomString.js";
8
+ import * as __typia_transform__randomArray from "typia/lib/internal/_randomArray.js";
9
+ import * as __typia_transform__randomNumber from "typia/lib/internal/_randomNumber.js";
10
+ import * as __typia_transform__jsonStringifyString from "typia/lib/internal/_jsonStringifyString.js";
11
+ import * as __typia_transform__throwTypeGuardError from "typia/lib/internal/_throwTypeGuardError.js";
12
+ import typia from 'typia';
13
+ export const assertBlock = (() => { const _io0 = input => "string" === typeof input.id && RegExp("^[0-9A-Za-z~][0-9A-Za-z~._: -]*$").test(input.id) && ("string" === typeof input.file && RegExp("^[0-9A-Za-z~][0-9A-Za-z~._: -]*$").test(input.file)) && ("string" === typeof input.location && RegExp("^[0-9A-Za-z~][0-9A-Za-z~._: -]*$").test(input.location)) && ("number" === typeof input.offset && (0 <= input.offset && __typia_transform__isTypeUint64._isTypeUint64(input.offset))) && (null === input.size || "number" === typeof input.size && (0 <= input.size && __typia_transform__isTypeUint64._isTypeUint64(input.size))) && (null === input.hash || "string" === typeof input.hash && RegExp("^([A-Fa-f0-9]{32})?$").test(input.hash)) && (null === input.btime || "number" === typeof input.btime && (0 <= input.btime && __typia_transform__isTypeUint64._isTypeUint64(input.btime))) && (null === input.path || "string" === typeof input.path) && (undefined !== input.error && (null === input.error || (Array.isArray(input.error) && input.error.every(elem => "object" === typeof elem && null !== elem && _io1(elem)) || "object" === typeof input.error && null !== input.error && _io1(input.error)))); const _io1 = input => "string" === typeof input.message && (undefined === input.type || "string" === typeof input.type) && (undefined === input.code || "string" === typeof input.code) && (undefined === input.exitCode || "number" === typeof input.exitCode) && (undefined === input.signalCode || "number" === typeof input.signalCode) && (undefined === input.statusCode || "number" === typeof input.statusCode) && (undefined === input.headers || "object" === typeof input.headers && null !== input.headers && false === Array.isArray(input.headers) && _io2(input.headers)) && (undefined === input.data || "object" === typeof input.data && null !== input.data && false === Array.isArray(input.data) && _io3(input.data)) && (null === input.cause || undefined === input.cause || "object" === typeof input.cause && null !== input.cause && _io1(input.cause)) && (null === input.errors || undefined === input.errors || Array.isArray(input.errors) && input.errors.every(elem => "object" === typeof elem && null !== elem && _io1(elem))); const _io2 = input => Object.keys(input).every(key => {
14
+ const value = input[key];
15
+ if (undefined === value)
16
+ return true;
17
+ return "string" === typeof value;
18
+ }); const _io3 = input => true; const _ao0 = (input, _path, _exceptionable = true) => ("string" === typeof input.id && (RegExp("^[0-9A-Za-z~][0-9A-Za-z~._: -]*$").test(input.id) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
19
+ method: "typia.createAssert",
20
+ path: _path + ".id",
21
+ expected: "string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">",
22
+ value: input.id
23
+ }, _errorFactory)) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
24
+ method: "typia.createAssert",
25
+ path: _path + ".id",
26
+ expected: "(string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">)",
27
+ value: input.id
28
+ }, _errorFactory)) && ("string" === typeof input.file && (RegExp("^[0-9A-Za-z~][0-9A-Za-z~._: -]*$").test(input.file) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
29
+ method: "typia.createAssert",
30
+ path: _path + ".file",
31
+ expected: "string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">",
32
+ value: input.file
33
+ }, _errorFactory)) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
34
+ method: "typia.createAssert",
35
+ path: _path + ".file",
36
+ expected: "(string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">)",
37
+ value: input.file
38
+ }, _errorFactory)) && ("string" === typeof input.location && (RegExp("^[0-9A-Za-z~][0-9A-Za-z~._: -]*$").test(input.location) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
39
+ method: "typia.createAssert",
40
+ path: _path + ".location",
41
+ expected: "string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">",
42
+ value: input.location
43
+ }, _errorFactory)) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
44
+ method: "typia.createAssert",
45
+ path: _path + ".location",
46
+ expected: "(string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">)",
47
+ value: input.location
48
+ }, _errorFactory)) && ("number" === typeof input.offset && (0 <= input.offset || __typia_transform__assertGuard._assertGuard(_exceptionable, {
49
+ method: "typia.createAssert",
50
+ path: _path + ".offset",
51
+ expected: "number & Minimum<0>",
52
+ value: input.offset
53
+ }, _errorFactory)) && (__typia_transform__isTypeUint64._isTypeUint64(input.offset) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
54
+ method: "typia.createAssert",
55
+ path: _path + ".offset",
56
+ expected: "number & Type<\"uint64\">",
57
+ value: input.offset
58
+ }, _errorFactory)) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
59
+ method: "typia.createAssert",
60
+ path: _path + ".offset",
61
+ expected: "(number & Minimum<0> & Type<\"uint64\">)",
62
+ value: input.offset
63
+ }, _errorFactory)) && (null === input.size || "number" === typeof input.size && (0 <= input.size || __typia_transform__assertGuard._assertGuard(_exceptionable, {
64
+ method: "typia.createAssert",
65
+ path: _path + ".size",
66
+ expected: "number & Minimum<0>",
67
+ value: input.size
68
+ }, _errorFactory)) && (__typia_transform__isTypeUint64._isTypeUint64(input.size) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
69
+ method: "typia.createAssert",
70
+ path: _path + ".size",
71
+ expected: "number & Type<\"uint64\">",
72
+ value: input.size
73
+ }, _errorFactory)) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
74
+ method: "typia.createAssert",
75
+ path: _path + ".size",
76
+ expected: "((number & Minimum<0> & Type<\"uint64\">) | null)",
77
+ value: input.size
78
+ }, _errorFactory)) && (null === input.hash || "string" === typeof input.hash && (RegExp("^([A-Fa-f0-9]{32})?$").test(input.hash) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
79
+ method: "typia.createAssert",
80
+ path: _path + ".hash",
81
+ expected: "string & Pattern<\"^([A-Fa-f0-9]{32})?$\">",
82
+ value: input.hash
83
+ }, _errorFactory)) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
84
+ method: "typia.createAssert",
85
+ path: _path + ".hash",
86
+ expected: "((string & Pattern<\"^([A-Fa-f0-9]{32})?$\">) | null)",
87
+ value: input.hash
88
+ }, _errorFactory)) && (null === input.btime || "number" === typeof input.btime && (0 <= input.btime || __typia_transform__assertGuard._assertGuard(_exceptionable, {
89
+ method: "typia.createAssert",
90
+ path: _path + ".btime",
91
+ expected: "number & Minimum<0>",
92
+ value: input.btime
93
+ }, _errorFactory)) && (__typia_transform__isTypeUint64._isTypeUint64(input.btime) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
94
+ method: "typia.createAssert",
95
+ path: _path + ".btime",
96
+ expected: "number & Type<\"uint64\">",
97
+ value: input.btime
98
+ }, _errorFactory)) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
99
+ method: "typia.createAssert",
100
+ path: _path + ".btime",
101
+ expected: "((number & Minimum<0> & Type<\"uint64\">) | null)",
102
+ value: input.btime
103
+ }, _errorFactory)) && (null === input.path || "string" === typeof input.path || __typia_transform__assertGuard._assertGuard(_exceptionable, {
104
+ method: "typia.createAssert",
105
+ path: _path + ".path",
106
+ expected: "(null | string)",
107
+ value: input.path
108
+ }, _errorFactory)) && ((undefined !== input.error || __typia_transform__assertGuard._assertGuard(_exceptionable, {
109
+ method: "typia.createAssert",
110
+ path: _path + ".error",
111
+ expected: "(Array<NxtError> | NxtError | null)",
112
+ value: input.error
113
+ }, _errorFactory)) && (null === input.error || (Array.isArray(input.error) && input.error.every((elem, _index3) => ("object" === typeof elem && null !== elem || __typia_transform__assertGuard._assertGuard(_exceptionable, {
114
+ method: "typia.createAssert",
115
+ path: _path + ".error[" + _index3 + "]",
116
+ expected: "NxtError",
117
+ value: elem
118
+ }, _errorFactory)) && _ao1(elem, _path + ".error[" + _index3 + "]", true && _exceptionable) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
119
+ method: "typia.createAssert",
120
+ path: _path + ".error[" + _index3 + "]",
121
+ expected: "NxtError",
122
+ value: elem
123
+ }, _errorFactory)) || "object" === typeof input.error && null !== input.error && _ao1(input.error, _path + ".error", true && _exceptionable) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
124
+ method: "typia.createAssert",
125
+ path: _path + ".error",
126
+ expected: "(Array<NxtError> | NxtError | null)",
127
+ value: input.error
128
+ }, _errorFactory)) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
129
+ method: "typia.createAssert",
130
+ path: _path + ".error",
131
+ expected: "(Array<NxtError> | NxtError | null)",
132
+ value: input.error
133
+ }, _errorFactory))); const _ao1 = (input, _path, _exceptionable = true) => ("string" === typeof input.message || __typia_transform__assertGuard._assertGuard(_exceptionable, {
134
+ method: "typia.createAssert",
135
+ path: _path + ".message",
136
+ expected: "string",
137
+ value: input.message
138
+ }, _errorFactory)) && (undefined === input.type || "string" === typeof input.type || __typia_transform__assertGuard._assertGuard(_exceptionable, {
139
+ method: "typia.createAssert",
140
+ path: _path + ".type",
141
+ expected: "(string | undefined)",
142
+ value: input.type
143
+ }, _errorFactory)) && (undefined === input.code || "string" === typeof input.code || __typia_transform__assertGuard._assertGuard(_exceptionable, {
144
+ method: "typia.createAssert",
145
+ path: _path + ".code",
146
+ expected: "(string | undefined)",
147
+ value: input.code
148
+ }, _errorFactory)) && (undefined === input.exitCode || "number" === typeof input.exitCode || __typia_transform__assertGuard._assertGuard(_exceptionable, {
149
+ method: "typia.createAssert",
150
+ path: _path + ".exitCode",
151
+ expected: "(number | undefined)",
152
+ value: input.exitCode
153
+ }, _errorFactory)) && (undefined === input.signalCode || "number" === typeof input.signalCode || __typia_transform__assertGuard._assertGuard(_exceptionable, {
154
+ method: "typia.createAssert",
155
+ path: _path + ".signalCode",
156
+ expected: "(number | undefined)",
157
+ value: input.signalCode
158
+ }, _errorFactory)) && (undefined === input.statusCode || "number" === typeof input.statusCode || __typia_transform__assertGuard._assertGuard(_exceptionable, {
159
+ method: "typia.createAssert",
160
+ path: _path + ".statusCode",
161
+ expected: "(number | undefined)",
162
+ value: input.statusCode
163
+ }, _errorFactory)) && (undefined === input.headers || ("object" === typeof input.headers && null !== input.headers && false === Array.isArray(input.headers) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
164
+ method: "typia.createAssert",
165
+ path: _path + ".headers",
166
+ expected: "(Record<string, string> | undefined)",
167
+ value: input.headers
168
+ }, _errorFactory)) && _ao2(input.headers, _path + ".headers", true && _exceptionable) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
169
+ method: "typia.createAssert",
170
+ path: _path + ".headers",
171
+ expected: "(Record<string, string> | undefined)",
172
+ value: input.headers
173
+ }, _errorFactory)) && (undefined === input.data || ("object" === typeof input.data && null !== input.data && false === Array.isArray(input.data) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
174
+ method: "typia.createAssert",
175
+ path: _path + ".data",
176
+ expected: "(object | undefined)",
177
+ value: input.data
178
+ }, _errorFactory)) && _ao3(input.data, _path + ".data", true && _exceptionable) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
179
+ method: "typia.createAssert",
180
+ path: _path + ".data",
181
+ expected: "(object | undefined)",
182
+ value: input.data
183
+ }, _errorFactory)) && (null === input.cause || undefined === input.cause || ("object" === typeof input.cause && null !== input.cause || __typia_transform__assertGuard._assertGuard(_exceptionable, {
184
+ method: "typia.createAssert",
185
+ path: _path + ".cause",
186
+ expected: "(NxtError | null | undefined)",
187
+ value: input.cause
188
+ }, _errorFactory)) && _ao1(input.cause, _path + ".cause", true && _exceptionable) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
189
+ method: "typia.createAssert",
190
+ path: _path + ".cause",
191
+ expected: "(NxtError | null | undefined)",
192
+ value: input.cause
193
+ }, _errorFactory)) && (null === input.errors || undefined === input.errors || (Array.isArray(input.errors) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
194
+ method: "typia.createAssert",
195
+ path: _path + ".errors",
196
+ expected: "(Array<NxtError> | null | undefined)",
197
+ value: input.errors
198
+ }, _errorFactory)) && input.errors.every((elem, _index4) => ("object" === typeof elem && null !== elem || __typia_transform__assertGuard._assertGuard(_exceptionable, {
199
+ method: "typia.createAssert",
200
+ path: _path + ".errors[" + _index4 + "]",
201
+ expected: "NxtError",
202
+ value: elem
203
+ }, _errorFactory)) && _ao1(elem, _path + ".errors[" + _index4 + "]", true && _exceptionable) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
204
+ method: "typia.createAssert",
205
+ path: _path + ".errors[" + _index4 + "]",
206
+ expected: "NxtError",
207
+ value: elem
208
+ }, _errorFactory)) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
209
+ method: "typia.createAssert",
210
+ path: _path + ".errors",
211
+ expected: "(Array<NxtError> | null | undefined)",
212
+ value: input.errors
213
+ }, _errorFactory)); const _ao2 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every(key => {
214
+ const value = input[key];
215
+ if (undefined === value)
216
+ return true;
217
+ return "string" === typeof value || __typia_transform__assertGuard._assertGuard(_exceptionable, {
218
+ method: "typia.createAssert",
219
+ path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
220
+ expected: "string",
221
+ value: value
222
+ }, _errorFactory);
223
+ }); const _ao3 = (input, _path, _exceptionable = true) => true; const __is = input => "object" === typeof input && null !== input && _io0(input); let _errorFactory; return (input, errorFactory) => {
224
+ if (false === __is(input)) {
225
+ _errorFactory = errorFactory;
226
+ ((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || __typia_transform__assertGuard._assertGuard(true, {
227
+ method: "typia.createAssert",
228
+ path: _path + "",
229
+ expected: "Block",
230
+ value: input
231
+ }, _errorFactory)) && _ao0(input, _path + "", true) || __typia_transform__assertGuard._assertGuard(true, {
232
+ method: "typia.createAssert",
233
+ path: _path + "",
234
+ expected: "Block",
235
+ value: input
236
+ }, _errorFactory))(input, "$input", true);
237
+ }
1583
238
  return input;
1584
- }; const stringify = input => {
1585
- const $io1 = input => "string" === typeof input.message && (undefined === input.type || "string" === typeof input.type) && (undefined === input.code || "string" === typeof input.code) && (undefined === input.exitCode || "number" === typeof input.exitCode) && (undefined === input.signalCode || "number" === typeof input.signalCode) && (undefined === input.statusCode || "number" === typeof input.statusCode) && (undefined === input.headers || "object" === typeof input.headers && null !== input.headers && false === Array.isArray(input.headers) && $io2(input.headers)) && (undefined === input.data || "object" === typeof input.data && null !== input.data && false === Array.isArray(input.data) && $io3(input.data)) && (null === input.cause || undefined === input.cause || "object" === typeof input.cause && null !== input.cause && $io1(input.cause)) && (null === input.errors || undefined === input.errors || Array.isArray(input.errors) && input.errors.every(elem => "object" === typeof elem && null !== elem && $io1(elem)));
1586
- const $io2 = input => Object.keys(input).every(key => {
1587
- const value = input[key];
1588
- if (undefined === value)
1589
- return true;
1590
- return "string" === typeof value;
239
+ }; })();
240
+ export const isBlock = (() => { const _io0 = input => "string" === typeof input.id && RegExp("^[0-9A-Za-z~][0-9A-Za-z~._: -]*$").test(input.id) && ("string" === typeof input.file && RegExp("^[0-9A-Za-z~][0-9A-Za-z~._: -]*$").test(input.file)) && ("string" === typeof input.location && RegExp("^[0-9A-Za-z~][0-9A-Za-z~._: -]*$").test(input.location)) && ("number" === typeof input.offset && (0 <= input.offset && __typia_transform__isTypeUint64._isTypeUint64(input.offset))) && (null === input.size || "number" === typeof input.size && (0 <= input.size && __typia_transform__isTypeUint64._isTypeUint64(input.size))) && (null === input.hash || "string" === typeof input.hash && RegExp("^([A-Fa-f0-9]{32})?$").test(input.hash)) && (null === input.btime || "number" === typeof input.btime && (0 <= input.btime && __typia_transform__isTypeUint64._isTypeUint64(input.btime))) && (null === input.path || "string" === typeof input.path) && (undefined !== input.error && (null === input.error || (Array.isArray(input.error) && input.error.every(elem => "object" === typeof elem && null !== elem && _io1(elem)) || "object" === typeof input.error && null !== input.error && _io1(input.error)))); const _io1 = input => "string" === typeof input.message && (undefined === input.type || "string" === typeof input.type) && (undefined === input.code || "string" === typeof input.code) && (undefined === input.exitCode || "number" === typeof input.exitCode) && (undefined === input.signalCode || "number" === typeof input.signalCode) && (undefined === input.statusCode || "number" === typeof input.statusCode) && (undefined === input.headers || "object" === typeof input.headers && null !== input.headers && false === Array.isArray(input.headers) && _io2(input.headers)) && (undefined === input.data || "object" === typeof input.data && null !== input.data && false === Array.isArray(input.data) && _io3(input.data)) && (null === input.cause || undefined === input.cause || "object" === typeof input.cause && null !== input.cause && _io1(input.cause)) && (null === input.errors || undefined === input.errors || Array.isArray(input.errors) && input.errors.every(elem => "object" === typeof elem && null !== elem && _io1(elem))); const _io2 = input => Object.keys(input).every(key => {
241
+ const value = input[key];
242
+ if (undefined === value)
243
+ return true;
244
+ return "string" === typeof value;
245
+ }); const _io3 = input => true; return input => "object" === typeof input && null !== input && _io0(input); })();
246
+ export const randomBlock = (() => { const _ro0 = (_recursive = false, _depth = 0) => ({
247
+ id: (_generator?.pattern ?? __typia_transform__randomPattern._randomPattern)(new RegExp("^[0-9A-Za-z~][0-9A-Za-z~._: -]*$")),
248
+ file: (_generator?.pattern ?? __typia_transform__randomPattern._randomPattern)(new RegExp("^[0-9A-Za-z~][0-9A-Za-z~._: -]*$")),
249
+ location: (_generator?.pattern ?? __typia_transform__randomPattern._randomPattern)(new RegExp("^[0-9A-Za-z~][0-9A-Za-z~._: -]*$")),
250
+ offset: (_generator?.integer ?? __typia_transform__randomInteger._randomInteger)({
251
+ type: "integer",
252
+ minimum: 0
253
+ }),
254
+ size: __typia_transform__randomPick._randomPick([
255
+ () => null,
256
+ () => (_generator?.integer ?? __typia_transform__randomInteger._randomInteger)({
257
+ type: "integer",
258
+ minimum: 0
259
+ })
260
+ ])(),
261
+ hash: __typia_transform__randomPick._randomPick([
262
+ () => null,
263
+ () => (_generator?.pattern ?? __typia_transform__randomPattern._randomPattern)(new RegExp("^([A-Fa-f0-9]{32})?$"))
264
+ ])(),
265
+ btime: __typia_transform__randomPick._randomPick([
266
+ () => null,
267
+ () => (_generator?.integer ?? __typia_transform__randomInteger._randomInteger)({
268
+ type: "integer",
269
+ minimum: 0
270
+ })
271
+ ])(),
272
+ path: __typia_transform__randomPick._randomPick([
273
+ () => null,
274
+ () => (_generator?.string ?? __typia_transform__randomString._randomString)({
275
+ type: "string"
276
+ })
277
+ ])(),
278
+ error: __typia_transform__randomPick._randomPick([
279
+ () => null,
280
+ () => (_generator?.array ?? __typia_transform__randomArray._randomArray)({
281
+ type: "array",
282
+ element: () => _ro1(_recursive, _recursive ? 1 + _depth : _depth)
283
+ }),
284
+ () => _ro1(_recursive, _recursive ? 1 + _depth : _depth)
285
+ ])()
286
+ }); const _ro1 = (_recursive = true, _depth = 0) => ({
287
+ message: (_generator?.string ?? __typia_transform__randomString._randomString)({
288
+ type: "string"
289
+ }),
290
+ type: __typia_transform__randomPick._randomPick([
291
+ () => undefined,
292
+ () => (_generator?.string ?? __typia_transform__randomString._randomString)({
293
+ type: "string"
294
+ })
295
+ ])(),
296
+ code: __typia_transform__randomPick._randomPick([
297
+ () => undefined,
298
+ () => (_generator?.string ?? __typia_transform__randomString._randomString)({
299
+ type: "string"
300
+ })
301
+ ])(),
302
+ exitCode: __typia_transform__randomPick._randomPick([
303
+ () => undefined,
304
+ () => (_generator?.number ?? __typia_transform__randomNumber._randomNumber)({
305
+ type: "number"
306
+ })
307
+ ])(),
308
+ signalCode: __typia_transform__randomPick._randomPick([
309
+ () => undefined,
310
+ () => (_generator?.number ?? __typia_transform__randomNumber._randomNumber)({
311
+ type: "number"
312
+ })
313
+ ])(),
314
+ statusCode: __typia_transform__randomPick._randomPick([
315
+ () => undefined,
316
+ () => (_generator?.number ?? __typia_transform__randomNumber._randomNumber)({
317
+ type: "number"
318
+ })
319
+ ])(),
320
+ headers: __typia_transform__randomPick._randomPick([
321
+ () => undefined,
322
+ () => _ro2(true, _recursive ? 1 + _depth : _depth)
323
+ ])(),
324
+ data: __typia_transform__randomPick._randomPick([
325
+ () => undefined,
326
+ () => _ro3(true, _recursive ? 1 + _depth : _depth)
327
+ ])(),
328
+ cause: __typia_transform__randomPick._randomPick([
329
+ () => undefined,
330
+ () => null,
331
+ () => _ro1(true, _recursive ? 1 + _depth : _depth)
332
+ ])(),
333
+ errors: __typia_transform__randomPick._randomPick([
334
+ () => undefined,
335
+ () => null,
336
+ () => 5 >= _depth ? (_generator?.array ?? __typia_transform__randomArray._randomArray)({
337
+ type: "array",
338
+ element: () => _ro1(true, _recursive ? 1 + _depth : _depth)
339
+ }) : []
340
+ ])()
341
+ }); const _ro2 = (_recursive = false, _depth = 0) => ({
342
+ ...Object.fromEntries((_generator?.array ?? __typia_transform__randomArray._randomArray)({
343
+ type: "array",
344
+ element: () => [
345
+ (_generator?.string ?? __typia_transform__randomString._randomString)({
346
+ type: "string"
347
+ }),
348
+ (_generator?.string ?? __typia_transform__randomString._randomString)({
349
+ type: "string"
350
+ })
351
+ ]
352
+ }))
353
+ }); const _ro3 = (_recursive = false, _depth = 0) => ({}); let _generator; return generator => {
354
+ _generator = generator;
355
+ return _ro0();
356
+ }; })();
357
+ export const stringifyBlocks = (() => { const _so0 = input => `{"id":${__typia_transform__jsonStringifyString._jsonStringifyString(input.id)},"file":${__typia_transform__jsonStringifyString._jsonStringifyString(input.file)},"location":${__typia_transform__jsonStringifyString._jsonStringifyString(input.location)},"offset":${input.offset},"size":${null !== input.size ? input.size : "null"},"hash":${null !== input.hash ? __typia_transform__jsonStringifyString._jsonStringifyString(input.hash) : "null"},"btime":${null !== input.btime ? input.btime : "null"},"path":${null !== input.path ? __typia_transform__jsonStringifyString._jsonStringifyString(input.path) : "null"},"error":${null !== input.error ? (() => {
358
+ if (Array.isArray(input.error))
359
+ return `[${input.error.map(elem => _so1(elem)).join(",")}]`;
360
+ if ("object" === typeof input.error && null !== input.error)
361
+ return _so1(input.error);
362
+ __typia_transform__throwTypeGuardError._throwTypeGuardError({
363
+ method: "typia.json.createStringify",
364
+ expected: "(Array<NxtError> | NxtError | null)",
365
+ value: input.error
1591
366
  });
1592
- const $io3 = input => true;
1593
- const $string = __typia.json.createAssertStringify.string;
1594
- const $throws = __typia.json.createAssertStringify.throws;
1595
- const $so0 = input => `{"id":${$string(input.id)},"file":${$string(input.file)},"location":${$string(input.location)},"offset":${input.offset},"size":${null !== input.size ? input.size : "null"},"hash":${null !== input.hash ? $string(input.hash) : "null"},"btime":${null !== input.btime ? input.btime : "null"},"path":${null !== input.path ? $string(input.path) : "null"},"error":${null !== input.error ? (() => {
1596
- if (Array.isArray(input.error))
1597
- return `[${input.error.map(elem => $so1(elem)).join(",")}]`;
1598
- if ("object" === typeof input.error && null !== input.error)
1599
- return $so1(input.error);
1600
- $throws({
1601
- expected: "(Array<NxtError> | NxtError | null)",
1602
- value: input.error
1603
- });
1604
- })() : "null"}}`;
1605
- const $so1 = input => `{${undefined === input.type ? "" : `"type":${undefined !== input.type ? $string(input.type) : undefined},`}${undefined === input.code ? "" : `"code":${undefined !== input.code ? $string(input.code) : undefined},`}${undefined === input.exitCode ? "" : `"exitCode":${undefined !== input.exitCode ? input.exitCode : undefined},`}${undefined === input.signalCode ? "" : `"signalCode":${undefined !== input.signalCode ? input.signalCode : undefined},`}${undefined === input.statusCode ? "" : `"statusCode":${undefined !== input.statusCode ? input.statusCode : undefined},`}${undefined === input.headers ? "" : `"headers":${undefined !== input.headers ? $so2(input.headers) : undefined},`}${undefined === input.data ? "" : `"data":${undefined !== input.data ? "{}" : undefined},`}${undefined === input.cause ? "" : `"cause":${undefined !== input.cause ? null !== input.cause ? $so1(input.cause) : "null" : undefined},`}${undefined === input.errors ? "" : `"errors":${undefined !== input.errors ? null !== input.errors ? `[${input.errors.map(elem => $so1(elem)).join(",")}]` : "null" : undefined},`}"message":${$string(input.message)}}`;
1606
- const $so2 = input => `{${Object.entries(input).map(([key, value]) => { if (undefined === value)
1607
- return ""; return `${JSON.stringify(key)}:${$string(value)}`; }).filter(str => "" !== str).join(",")}}`;
1608
- return `[${input.map(elem => $so0(elem)).join(",")}]`;
1609
- }; return stringify(assert(input, errorFactory)); };
367
+ })() : "null"}}`; const _so1 = input => `{${undefined === input.type ? "" : `"type":${undefined !== input.type ? __typia_transform__jsonStringifyString._jsonStringifyString(input.type) : undefined},`}${undefined === input.code ? "" : `"code":${undefined !== input.code ? __typia_transform__jsonStringifyString._jsonStringifyString(input.code) : undefined},`}${undefined === input.exitCode ? "" : `"exitCode":${undefined !== input.exitCode ? input.exitCode : undefined},`}${undefined === input.signalCode ? "" : `"signalCode":${undefined !== input.signalCode ? input.signalCode : undefined},`}${undefined === input.statusCode ? "" : `"statusCode":${undefined !== input.statusCode ? input.statusCode : undefined},`}${undefined === input.headers ? "" : `"headers":${undefined !== input.headers ? _so2(input.headers) : undefined},`}${undefined === input.data ? "" : `"data":${undefined !== input.data ? _so3(input.data) : undefined},`}${undefined === input.cause ? "" : `"cause":${undefined !== input.cause ? null !== input.cause ? _so1(input.cause) : "null" : undefined},`}${undefined === input.errors ? "" : `"errors":${undefined !== input.errors ? null !== input.errors ? `[${input.errors.map(elem => _so1(elem)).join(",")}]` : "null" : undefined},`}"message":${__typia_transform__jsonStringifyString._jsonStringifyString(input.message)}}`; const _so2 = input => `{${Object.entries(input).map(([key, value]) => { if (undefined === value)
368
+ return ""; return `${JSON.stringify(key)}:${__typia_transform__jsonStringifyString._jsonStringifyString(value)}`; }).filter(str => "" !== str).join(",")}}`; const _so3 = input => "{}"; const _io1 = input => "string" === typeof input.message && (undefined === input.type || "string" === typeof input.type) && (undefined === input.code || "string" === typeof input.code) && (undefined === input.exitCode || "number" === typeof input.exitCode) && (undefined === input.signalCode || "number" === typeof input.signalCode) && (undefined === input.statusCode || "number" === typeof input.statusCode) && (undefined === input.headers || "object" === typeof input.headers && null !== input.headers && false === Array.isArray(input.headers) && _io2(input.headers)) && (undefined === input.data || "object" === typeof input.data && null !== input.data && false === Array.isArray(input.data) && _io3(input.data)) && (null === input.cause || undefined === input.cause || "object" === typeof input.cause && null !== input.cause && _io1(input.cause)) && (null === input.errors || undefined === input.errors || Array.isArray(input.errors) && input.errors.every(elem => "object" === typeof elem && null !== elem && _io1(elem))); const _io2 = input => Object.keys(input).every(key => {
369
+ const value = input[key];
370
+ if (undefined === value)
371
+ return true;
372
+ return "string" === typeof value;
373
+ }); const _io3 = input => true; return input => `[${input.map(elem => _so0(elem)).join(",")}]`; })();
374
+ export const assertGuardBlock = (() => { const _io0 = input => "string" === typeof input.id && RegExp("^[0-9A-Za-z~][0-9A-Za-z~._: -]*$").test(input.id) && ("string" === typeof input.file && RegExp("^[0-9A-Za-z~][0-9A-Za-z~._: -]*$").test(input.file)) && ("string" === typeof input.location && RegExp("^[0-9A-Za-z~][0-9A-Za-z~._: -]*$").test(input.location)) && ("number" === typeof input.offset && (0 <= input.offset && __typia_transform__isTypeUint64._isTypeUint64(input.offset))) && (null === input.size || "number" === typeof input.size && (0 <= input.size && __typia_transform__isTypeUint64._isTypeUint64(input.size))) && (null === input.hash || "string" === typeof input.hash && RegExp("^([A-Fa-f0-9]{32})?$").test(input.hash)) && (null === input.btime || "number" === typeof input.btime && (0 <= input.btime && __typia_transform__isTypeUint64._isTypeUint64(input.btime))) && (null === input.path || "string" === typeof input.path) && (undefined !== input.error && (null === input.error || (Array.isArray(input.error) && input.error.every(elem => "object" === typeof elem && null !== elem && _io1(elem)) || "object" === typeof input.error && null !== input.error && _io1(input.error)))); const _io1 = input => "string" === typeof input.message && (undefined === input.type || "string" === typeof input.type) && (undefined === input.code || "string" === typeof input.code) && (undefined === input.exitCode || "number" === typeof input.exitCode) && (undefined === input.signalCode || "number" === typeof input.signalCode) && (undefined === input.statusCode || "number" === typeof input.statusCode) && (undefined === input.headers || "object" === typeof input.headers && null !== input.headers && false === Array.isArray(input.headers) && _io2(input.headers)) && (undefined === input.data || "object" === typeof input.data && null !== input.data && false === Array.isArray(input.data) && _io3(input.data)) && (null === input.cause || undefined === input.cause || "object" === typeof input.cause && null !== input.cause && _io1(input.cause)) && (null === input.errors || undefined === input.errors || Array.isArray(input.errors) && input.errors.every(elem => "object" === typeof elem && null !== elem && _io1(elem))); const _io2 = input => Object.keys(input).every(key => {
375
+ const value = input[key];
376
+ if (undefined === value)
377
+ return true;
378
+ return "string" === typeof value;
379
+ }); const _io3 = input => true; const _ao0 = (input, _path, _exceptionable = true) => ("string" === typeof input.id && (RegExp("^[0-9A-Za-z~][0-9A-Za-z~._: -]*$").test(input.id) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
380
+ method: "typia.createAssertGuard",
381
+ path: _path + ".id",
382
+ expected: "string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">",
383
+ value: input.id
384
+ }, _errorFactory)) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
385
+ method: "typia.createAssertGuard",
386
+ path: _path + ".id",
387
+ expected: "(string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">)",
388
+ value: input.id
389
+ }, _errorFactory)) && ("string" === typeof input.file && (RegExp("^[0-9A-Za-z~][0-9A-Za-z~._: -]*$").test(input.file) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
390
+ method: "typia.createAssertGuard",
391
+ path: _path + ".file",
392
+ expected: "string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">",
393
+ value: input.file
394
+ }, _errorFactory)) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
395
+ method: "typia.createAssertGuard",
396
+ path: _path + ".file",
397
+ expected: "(string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">)",
398
+ value: input.file
399
+ }, _errorFactory)) && ("string" === typeof input.location && (RegExp("^[0-9A-Za-z~][0-9A-Za-z~._: -]*$").test(input.location) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
400
+ method: "typia.createAssertGuard",
401
+ path: _path + ".location",
402
+ expected: "string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">",
403
+ value: input.location
404
+ }, _errorFactory)) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
405
+ method: "typia.createAssertGuard",
406
+ path: _path + ".location",
407
+ expected: "(string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">)",
408
+ value: input.location
409
+ }, _errorFactory)) && ("number" === typeof input.offset && (0 <= input.offset || __typia_transform__assertGuard._assertGuard(_exceptionable, {
410
+ method: "typia.createAssertGuard",
411
+ path: _path + ".offset",
412
+ expected: "number & Minimum<0>",
413
+ value: input.offset
414
+ }, _errorFactory)) && (__typia_transform__isTypeUint64._isTypeUint64(input.offset) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
415
+ method: "typia.createAssertGuard",
416
+ path: _path + ".offset",
417
+ expected: "number & Type<\"uint64\">",
418
+ value: input.offset
419
+ }, _errorFactory)) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
420
+ method: "typia.createAssertGuard",
421
+ path: _path + ".offset",
422
+ expected: "(number & Minimum<0> & Type<\"uint64\">)",
423
+ value: input.offset
424
+ }, _errorFactory)) && (null === input.size || "number" === typeof input.size && (0 <= input.size || __typia_transform__assertGuard._assertGuard(_exceptionable, {
425
+ method: "typia.createAssertGuard",
426
+ path: _path + ".size",
427
+ expected: "number & Minimum<0>",
428
+ value: input.size
429
+ }, _errorFactory)) && (__typia_transform__isTypeUint64._isTypeUint64(input.size) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
430
+ method: "typia.createAssertGuard",
431
+ path: _path + ".size",
432
+ expected: "number & Type<\"uint64\">",
433
+ value: input.size
434
+ }, _errorFactory)) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
435
+ method: "typia.createAssertGuard",
436
+ path: _path + ".size",
437
+ expected: "((number & Minimum<0> & Type<\"uint64\">) | null)",
438
+ value: input.size
439
+ }, _errorFactory)) && (null === input.hash || "string" === typeof input.hash && (RegExp("^([A-Fa-f0-9]{32})?$").test(input.hash) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
440
+ method: "typia.createAssertGuard",
441
+ path: _path + ".hash",
442
+ expected: "string & Pattern<\"^([A-Fa-f0-9]{32})?$\">",
443
+ value: input.hash
444
+ }, _errorFactory)) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
445
+ method: "typia.createAssertGuard",
446
+ path: _path + ".hash",
447
+ expected: "((string & Pattern<\"^([A-Fa-f0-9]{32})?$\">) | null)",
448
+ value: input.hash
449
+ }, _errorFactory)) && (null === input.btime || "number" === typeof input.btime && (0 <= input.btime || __typia_transform__assertGuard._assertGuard(_exceptionable, {
450
+ method: "typia.createAssertGuard",
451
+ path: _path + ".btime",
452
+ expected: "number & Minimum<0>",
453
+ value: input.btime
454
+ }, _errorFactory)) && (__typia_transform__isTypeUint64._isTypeUint64(input.btime) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
455
+ method: "typia.createAssertGuard",
456
+ path: _path + ".btime",
457
+ expected: "number & Type<\"uint64\">",
458
+ value: input.btime
459
+ }, _errorFactory)) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
460
+ method: "typia.createAssertGuard",
461
+ path: _path + ".btime",
462
+ expected: "((number & Minimum<0> & Type<\"uint64\">) | null)",
463
+ value: input.btime
464
+ }, _errorFactory)) && (null === input.path || "string" === typeof input.path || __typia_transform__assertGuard._assertGuard(_exceptionable, {
465
+ method: "typia.createAssertGuard",
466
+ path: _path + ".path",
467
+ expected: "(null | string)",
468
+ value: input.path
469
+ }, _errorFactory)) && ((undefined !== input.error || __typia_transform__assertGuard._assertGuard(_exceptionable, {
470
+ method: "typia.createAssertGuard",
471
+ path: _path + ".error",
472
+ expected: "(Array<NxtError> | NxtError | null)",
473
+ value: input.error
474
+ }, _errorFactory)) && (null === input.error || (Array.isArray(input.error) && input.error.every((elem, _index3) => ("object" === typeof elem && null !== elem || __typia_transform__assertGuard._assertGuard(_exceptionable, {
475
+ method: "typia.createAssertGuard",
476
+ path: _path + ".error[" + _index3 + "]",
477
+ expected: "NxtError",
478
+ value: elem
479
+ }, _errorFactory)) && _ao1(elem, _path + ".error[" + _index3 + "]", true && _exceptionable) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
480
+ method: "typia.createAssertGuard",
481
+ path: _path + ".error[" + _index3 + "]",
482
+ expected: "NxtError",
483
+ value: elem
484
+ }, _errorFactory)) || "object" === typeof input.error && null !== input.error && _ao1(input.error, _path + ".error", true && _exceptionable) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
485
+ method: "typia.createAssertGuard",
486
+ path: _path + ".error",
487
+ expected: "(Array<NxtError> | NxtError | null)",
488
+ value: input.error
489
+ }, _errorFactory)) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
490
+ method: "typia.createAssertGuard",
491
+ path: _path + ".error",
492
+ expected: "(Array<NxtError> | NxtError | null)",
493
+ value: input.error
494
+ }, _errorFactory))); const _ao1 = (input, _path, _exceptionable = true) => ("string" === typeof input.message || __typia_transform__assertGuard._assertGuard(_exceptionable, {
495
+ method: "typia.createAssertGuard",
496
+ path: _path + ".message",
497
+ expected: "string",
498
+ value: input.message
499
+ }, _errorFactory)) && (undefined === input.type || "string" === typeof input.type || __typia_transform__assertGuard._assertGuard(_exceptionable, {
500
+ method: "typia.createAssertGuard",
501
+ path: _path + ".type",
502
+ expected: "(string | undefined)",
503
+ value: input.type
504
+ }, _errorFactory)) && (undefined === input.code || "string" === typeof input.code || __typia_transform__assertGuard._assertGuard(_exceptionable, {
505
+ method: "typia.createAssertGuard",
506
+ path: _path + ".code",
507
+ expected: "(string | undefined)",
508
+ value: input.code
509
+ }, _errorFactory)) && (undefined === input.exitCode || "number" === typeof input.exitCode || __typia_transform__assertGuard._assertGuard(_exceptionable, {
510
+ method: "typia.createAssertGuard",
511
+ path: _path + ".exitCode",
512
+ expected: "(number | undefined)",
513
+ value: input.exitCode
514
+ }, _errorFactory)) && (undefined === input.signalCode || "number" === typeof input.signalCode || __typia_transform__assertGuard._assertGuard(_exceptionable, {
515
+ method: "typia.createAssertGuard",
516
+ path: _path + ".signalCode",
517
+ expected: "(number | undefined)",
518
+ value: input.signalCode
519
+ }, _errorFactory)) && (undefined === input.statusCode || "number" === typeof input.statusCode || __typia_transform__assertGuard._assertGuard(_exceptionable, {
520
+ method: "typia.createAssertGuard",
521
+ path: _path + ".statusCode",
522
+ expected: "(number | undefined)",
523
+ value: input.statusCode
524
+ }, _errorFactory)) && (undefined === input.headers || ("object" === typeof input.headers && null !== input.headers && false === Array.isArray(input.headers) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
525
+ method: "typia.createAssertGuard",
526
+ path: _path + ".headers",
527
+ expected: "(Record<string, string> | undefined)",
528
+ value: input.headers
529
+ }, _errorFactory)) && _ao2(input.headers, _path + ".headers", true && _exceptionable) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
530
+ method: "typia.createAssertGuard",
531
+ path: _path + ".headers",
532
+ expected: "(Record<string, string> | undefined)",
533
+ value: input.headers
534
+ }, _errorFactory)) && (undefined === input.data || ("object" === typeof input.data && null !== input.data && false === Array.isArray(input.data) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
535
+ method: "typia.createAssertGuard",
536
+ path: _path + ".data",
537
+ expected: "(object | undefined)",
538
+ value: input.data
539
+ }, _errorFactory)) && _ao3(input.data, _path + ".data", true && _exceptionable) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
540
+ method: "typia.createAssertGuard",
541
+ path: _path + ".data",
542
+ expected: "(object | undefined)",
543
+ value: input.data
544
+ }, _errorFactory)) && (null === input.cause || undefined === input.cause || ("object" === typeof input.cause && null !== input.cause || __typia_transform__assertGuard._assertGuard(_exceptionable, {
545
+ method: "typia.createAssertGuard",
546
+ path: _path + ".cause",
547
+ expected: "(NxtError | null | undefined)",
548
+ value: input.cause
549
+ }, _errorFactory)) && _ao1(input.cause, _path + ".cause", true && _exceptionable) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
550
+ method: "typia.createAssertGuard",
551
+ path: _path + ".cause",
552
+ expected: "(NxtError | null | undefined)",
553
+ value: input.cause
554
+ }, _errorFactory)) && (null === input.errors || undefined === input.errors || (Array.isArray(input.errors) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
555
+ method: "typia.createAssertGuard",
556
+ path: _path + ".errors",
557
+ expected: "(Array<NxtError> | null | undefined)",
558
+ value: input.errors
559
+ }, _errorFactory)) && input.errors.every((elem, _index4) => ("object" === typeof elem && null !== elem || __typia_transform__assertGuard._assertGuard(_exceptionable, {
560
+ method: "typia.createAssertGuard",
561
+ path: _path + ".errors[" + _index4 + "]",
562
+ expected: "NxtError",
563
+ value: elem
564
+ }, _errorFactory)) && _ao1(elem, _path + ".errors[" + _index4 + "]", true && _exceptionable) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
565
+ method: "typia.createAssertGuard",
566
+ path: _path + ".errors[" + _index4 + "]",
567
+ expected: "NxtError",
568
+ value: elem
569
+ }, _errorFactory)) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
570
+ method: "typia.createAssertGuard",
571
+ path: _path + ".errors",
572
+ expected: "(Array<NxtError> | null | undefined)",
573
+ value: input.errors
574
+ }, _errorFactory)); const _ao2 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every(key => {
575
+ const value = input[key];
576
+ if (undefined === value)
577
+ return true;
578
+ return "string" === typeof value || __typia_transform__assertGuard._assertGuard(_exceptionable, {
579
+ method: "typia.createAssertGuard",
580
+ path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
581
+ expected: "string",
582
+ value: value
583
+ }, _errorFactory);
584
+ }); const _ao3 = (input, _path, _exceptionable = true) => true; const __is = input => "object" === typeof input && null !== input && _io0(input); let _errorFactory; return (input, errorFactory) => {
585
+ if (false === __is(input)) {
586
+ _errorFactory = errorFactory;
587
+ ((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || __typia_transform__assertGuard._assertGuard(true, {
588
+ method: "typia.createAssertGuard",
589
+ path: _path + "",
590
+ expected: "Block",
591
+ value: input
592
+ }, _errorFactory)) && _ao0(input, _path + "", true) || __typia_transform__assertGuard._assertGuard(true, {
593
+ method: "typia.createAssertGuard",
594
+ path: _path + "",
595
+ expected: "Block",
596
+ value: input
597
+ }, _errorFactory))(input, "$input", true);
598
+ }
599
+ }; })();