@nxtedition/types 23.0.40 → 23.0.42

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 -33
  2. package/dist/app.js +1 -655
  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 +4 -17
  28. package/dist/common/render-preset.js +1 -1202
  29. package/dist/common/render-profile.d.ts +3 -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 -1843
  33. package/dist/common/render-scene.d.ts +3 -16
  34. package/dist/common/render-scene.js +1 -2408
  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 +113 -125
  40. package/dist/common/settings.js +1 -7504
  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 -108
  45. package/dist/index.js +5 -469
  46. package/dist/nxtpression.d.ts +538 -337
  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 +8 -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 +149 -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 +23 -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 +11 -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 +16068 -0
  143. package/dist/records/validate/assert.d.ts +4 -0
  144. package/dist/records/validate/assert.js +16198 -0
  145. package/dist/records/validate/is.d.ts +4 -0
  146. package/dist/records/validate/is.js +1027 -0
  147. package/dist/records/validate/schemas.d.ts +9 -0
  148. package/dist/records/validate/schemas.js +12862 -0
  149. package/dist/records/validate/stringify.d.ts +4 -0
  150. package/dist/records/validate/stringify.js +1915 -0
  151. package/dist/records/validate/utils.d.ts +15 -0
  152. package/dist/records/validate/utils.js +26 -0
  153. package/dist/records/validate/validate-equals.d.ts +5 -0
  154. package/dist/records/validate/validate-equals.js +24363 -0
  155. package/dist/records/validate/validate.d.ts +5 -0
  156. package/dist/records/validate/validate.js +15127 -0
  157. package/dist/rpc.d.ts +5 -15
  158. package/dist/rpc.js +126 -511
  159. package/dist/tsdoc-metadata.json +1 -1
  160. package/package.json +25 -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 -170
  185. package/dist/domains/event.js +0 -2779
  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 -4642
  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 -1452
  207. package/dist/domains/publish.js +0 -35415
  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 -158
  212. package/dist/domains/render.js +0 -4452
  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 -263
  218. package/dist/domains/script.js +0 -6777
  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 -7180
  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 -42
  226. package/dist/domains/subtitle-style.js +0 -574
  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 -9836
  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,2506 +0,0 @@
1
- import __typia from "typia";
2
- export const isFileReplicateRecord = input => {
3
- const $io0 = input => Array.isArray(input.replicas) && input.replicas.every(elem => "string" === typeof elem) && (null === input.error || "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 assertFileReplicateRecord = (input, errorFactory) => {
15
- const __is = input => {
16
- const $io0 = input => Array.isArray(input.replicas) && input.replicas.every(elem => "string" === typeof elem) && (null === input.error || "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) => ((Array.isArray(input.replicas) || $guard(_exceptionable, {
32
- path: _path + ".replicas",
33
- expected: "Array<string>",
34
- value: input.replicas
35
- }, errorFactory)) && input.replicas.every((elem, _index1) => "string" === typeof elem || $guard(_exceptionable, {
36
- path: _path + ".replicas[" + _index1 + "]",
37
- expected: "string",
38
- value: elem
39
- }, errorFactory)) || $guard(_exceptionable, {
40
- path: _path + ".replicas",
41
- expected: "Array<string>",
42
- value: input.replicas
43
- }, errorFactory)) && (null === input.error || ("object" === typeof input.error && null !== input.error || $guard(_exceptionable, {
44
- path: _path + ".error",
45
- expected: "(NxtError | null)",
46
- value: input.error
47
- }, errorFactory)) && $ao1(input.error, _path + ".error", true && _exceptionable) || $guard(_exceptionable, {
48
- path: _path + ".error",
49
- expected: "(NxtError | null)",
50
- value: input.error
51
- }, errorFactory));
52
- const $ao1 = (input, _path, _exceptionable = true) => ("string" === typeof input.message || $guard(_exceptionable, {
53
- path: _path + ".message",
54
- expected: "string",
55
- value: input.message
56
- }, errorFactory)) && (undefined === input.type || "string" === typeof input.type || $guard(_exceptionable, {
57
- path: _path + ".type",
58
- expected: "(string | undefined)",
59
- value: input.type
60
- }, errorFactory)) && (undefined === input.code || "string" === typeof input.code || $guard(_exceptionable, {
61
- path: _path + ".code",
62
- expected: "(string | undefined)",
63
- value: input.code
64
- }, errorFactory)) && (undefined === input.exitCode || "number" === typeof input.exitCode || $guard(_exceptionable, {
65
- path: _path + ".exitCode",
66
- expected: "(number | undefined)",
67
- value: input.exitCode
68
- }, errorFactory)) && (undefined === input.signalCode || "number" === typeof input.signalCode || $guard(_exceptionable, {
69
- path: _path + ".signalCode",
70
- expected: "(number | undefined)",
71
- value: input.signalCode
72
- }, errorFactory)) && (undefined === input.statusCode || "number" === typeof input.statusCode || $guard(_exceptionable, {
73
- path: _path + ".statusCode",
74
- expected: "(number | undefined)",
75
- value: input.statusCode
76
- }, errorFactory)) && (undefined === input.headers || ("object" === typeof input.headers && null !== input.headers && false === Array.isArray(input.headers) || $guard(_exceptionable, {
77
- path: _path + ".headers",
78
- expected: "(Record<string, string> | undefined)",
79
- value: input.headers
80
- }, errorFactory)) && $ao2(input.headers, _path + ".headers", true && _exceptionable) || $guard(_exceptionable, {
81
- path: _path + ".headers",
82
- expected: "(Record<string, string> | undefined)",
83
- value: input.headers
84
- }, errorFactory)) && (undefined === input.data || ("object" === typeof input.data && null !== input.data && false === Array.isArray(input.data) || $guard(_exceptionable, {
85
- path: _path + ".data",
86
- expected: "(object | undefined)",
87
- value: input.data
88
- }, errorFactory)) && $ao3(input.data, _path + ".data", true && _exceptionable) || $guard(_exceptionable, {
89
- path: _path + ".data",
90
- expected: "(object | undefined)",
91
- value: input.data
92
- }, errorFactory)) && (null === input.cause || undefined === input.cause || ("object" === typeof input.cause && null !== input.cause || $guard(_exceptionable, {
93
- path: _path + ".cause",
94
- expected: "(NxtError | null | undefined)",
95
- value: input.cause
96
- }, errorFactory)) && $ao1(input.cause, _path + ".cause", true && _exceptionable) || $guard(_exceptionable, {
97
- path: _path + ".cause",
98
- expected: "(NxtError | null | undefined)",
99
- value: input.cause
100
- }, errorFactory)) && (null === input.errors || undefined === input.errors || (Array.isArray(input.errors) || $guard(_exceptionable, {
101
- path: _path + ".errors",
102
- expected: "(Array<NxtError> | null | undefined)",
103
- value: input.errors
104
- }, errorFactory)) && input.errors.every((elem, _index2) => ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
105
- path: _path + ".errors[" + _index2 + "]",
106
- expected: "NxtError",
107
- value: elem
108
- }, errorFactory)) && $ao1(elem, _path + ".errors[" + _index2 + "]", true && _exceptionable) || $guard(_exceptionable, {
109
- path: _path + ".errors[" + _index2 + "]",
110
- expected: "NxtError",
111
- value: elem
112
- }, errorFactory)) || $guard(_exceptionable, {
113
- path: _path + ".errors",
114
- expected: "(Array<NxtError> | null | undefined)",
115
- value: input.errors
116
- }, errorFactory));
117
- const $ao2 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every(key => {
118
- const value = input[key];
119
- if (undefined === value)
120
- return true;
121
- return "string" === typeof value || $guard(_exceptionable, {
122
- path: _path + $join(key),
123
- expected: "string",
124
- value: value
125
- }, errorFactory);
126
- });
127
- const $ao3 = (input, _path, _exceptionable = true) => true;
128
- return ("object" === typeof input && null !== input || $guard(true, {
129
- path: _path + "",
130
- expected: "FileReplicateRecord",
131
- value: input
132
- }, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
133
- path: _path + "",
134
- expected: "FileReplicateRecord",
135
- value: input
136
- }, errorFactory);
137
- })(input, "$input", true);
138
- return input;
139
- };
140
- export const randomFileReplicateRecord = generator => {
141
- const $generator = __typia.createRandom.generator;
142
- const $pick = __typia.createRandom.pick;
143
- const $ro0 = (_recursive = false, _depth = 0) => ({
144
- replicas: (generator?.array ?? $generator.array)(() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()),
145
- error: $pick([
146
- () => null,
147
- () => $ro1(_recursive, _recursive ? 1 + _depth : _depth)
148
- ])()
149
- });
150
- const $ro1 = (_recursive = true, _depth = 0) => ({
151
- message: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
152
- type: $pick([
153
- () => undefined,
154
- () => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
155
- ])(),
156
- code: $pick([
157
- () => undefined,
158
- () => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
159
- ])(),
160
- exitCode: $pick([
161
- () => undefined,
162
- () => (generator?.customs ?? $generator.customs)?.number?.([]) ?? (generator?.number ?? $generator.number)(0, 100)
163
- ])(),
164
- signalCode: $pick([
165
- () => undefined,
166
- () => (generator?.customs ?? $generator.customs)?.number?.([]) ?? (generator?.number ?? $generator.number)(0, 100)
167
- ])(),
168
- statusCode: $pick([
169
- () => undefined,
170
- () => (generator?.customs ?? $generator.customs)?.number?.([]) ?? (generator?.number ?? $generator.number)(0, 100)
171
- ])(),
172
- headers: $pick([
173
- () => undefined,
174
- () => $ro2(true, _recursive ? 1 + _depth : _depth)
175
- ])(),
176
- data: $pick([
177
- () => undefined,
178
- () => $ro3(true, _recursive ? 1 + _depth : _depth)
179
- ])(),
180
- cause: $pick([
181
- () => undefined,
182
- () => null,
183
- () => $ro1(true, _recursive ? 1 + _depth : _depth)
184
- ])(),
185
- errors: $pick([
186
- () => undefined,
187
- () => null,
188
- () => _recursive && 5 < _depth ? [] : 5 >= _depth ? (generator?.array ?? $generator.array)(() => $ro1(true, _recursive ? 1 + _depth : _depth)) : []
189
- ])()
190
- });
191
- const $ro2 = (_recursive = false, _depth = 0) => {
192
- const output = {};
193
- (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));
194
- return output;
195
- };
196
- const $ro3 = (_recursive = false, _depth = 0) => {};
197
- return $ro0();
198
- };
199
- export const assertGuardFileReplicateRecord = (input, errorFactory) => {
200
- const __is = input => {
201
- const $io0 = input => Array.isArray(input.replicas) && input.replicas.every(elem => "string" === typeof elem) && (null === input.error || "object" === typeof input.error && null !== input.error && $io1(input.error));
202
- 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)));
203
- const $io2 = input => Object.keys(input).every(key => {
204
- const value = input[key];
205
- if (undefined === value)
206
- return true;
207
- return "string" === typeof value;
208
- });
209
- const $io3 = input => true;
210
- return "object" === typeof input && null !== input && $io0(input);
211
- };
212
- if (false === __is(input))
213
- ((input, _path, _exceptionable = true) => {
214
- const $guard = __typia.createAssertGuard.guard;
215
- const $join = __typia.createAssertGuard.join;
216
- const $ao0 = (input, _path, _exceptionable = true) => ((Array.isArray(input.replicas) || $guard(_exceptionable, {
217
- path: _path + ".replicas",
218
- expected: "Array<string>",
219
- value: input.replicas
220
- }, errorFactory)) && input.replicas.every((elem, _index1) => "string" === typeof elem || $guard(_exceptionable, {
221
- path: _path + ".replicas[" + _index1 + "]",
222
- expected: "string",
223
- value: elem
224
- }, errorFactory)) || $guard(_exceptionable, {
225
- path: _path + ".replicas",
226
- expected: "Array<string>",
227
- value: input.replicas
228
- }, errorFactory)) && (null === input.error || ("object" === typeof input.error && null !== input.error || $guard(_exceptionable, {
229
- path: _path + ".error",
230
- expected: "(NxtError | null)",
231
- value: input.error
232
- }, errorFactory)) && $ao1(input.error, _path + ".error", true && _exceptionable) || $guard(_exceptionable, {
233
- path: _path + ".error",
234
- expected: "(NxtError | null)",
235
- value: input.error
236
- }, errorFactory));
237
- const $ao1 = (input, _path, _exceptionable = true) => ("string" === typeof input.message || $guard(_exceptionable, {
238
- path: _path + ".message",
239
- expected: "string",
240
- value: input.message
241
- }, errorFactory)) && (undefined === input.type || "string" === typeof input.type || $guard(_exceptionable, {
242
- path: _path + ".type",
243
- expected: "(string | undefined)",
244
- value: input.type
245
- }, errorFactory)) && (undefined === input.code || "string" === typeof input.code || $guard(_exceptionable, {
246
- path: _path + ".code",
247
- expected: "(string | undefined)",
248
- value: input.code
249
- }, errorFactory)) && (undefined === input.exitCode || "number" === typeof input.exitCode || $guard(_exceptionable, {
250
- path: _path + ".exitCode",
251
- expected: "(number | undefined)",
252
- value: input.exitCode
253
- }, errorFactory)) && (undefined === input.signalCode || "number" === typeof input.signalCode || $guard(_exceptionable, {
254
- path: _path + ".signalCode",
255
- expected: "(number | undefined)",
256
- value: input.signalCode
257
- }, errorFactory)) && (undefined === input.statusCode || "number" === typeof input.statusCode || $guard(_exceptionable, {
258
- path: _path + ".statusCode",
259
- expected: "(number | undefined)",
260
- value: input.statusCode
261
- }, errorFactory)) && (undefined === input.headers || ("object" === typeof input.headers && null !== input.headers && false === Array.isArray(input.headers) || $guard(_exceptionable, {
262
- path: _path + ".headers",
263
- expected: "(Record<string, string> | undefined)",
264
- value: input.headers
265
- }, errorFactory)) && $ao2(input.headers, _path + ".headers", true && _exceptionable) || $guard(_exceptionable, {
266
- path: _path + ".headers",
267
- expected: "(Record<string, string> | undefined)",
268
- value: input.headers
269
- }, errorFactory)) && (undefined === input.data || ("object" === typeof input.data && null !== input.data && false === Array.isArray(input.data) || $guard(_exceptionable, {
270
- path: _path + ".data",
271
- expected: "(object | undefined)",
272
- value: input.data
273
- }, errorFactory)) && $ao3(input.data, _path + ".data", true && _exceptionable) || $guard(_exceptionable, {
274
- path: _path + ".data",
275
- expected: "(object | undefined)",
276
- value: input.data
277
- }, errorFactory)) && (null === input.cause || undefined === input.cause || ("object" === typeof input.cause && null !== input.cause || $guard(_exceptionable, {
278
- path: _path + ".cause",
279
- expected: "(NxtError | null | undefined)",
280
- value: input.cause
281
- }, errorFactory)) && $ao1(input.cause, _path + ".cause", true && _exceptionable) || $guard(_exceptionable, {
282
- path: _path + ".cause",
283
- expected: "(NxtError | null | undefined)",
284
- value: input.cause
285
- }, errorFactory)) && (null === input.errors || undefined === input.errors || (Array.isArray(input.errors) || $guard(_exceptionable, {
286
- path: _path + ".errors",
287
- expected: "(Array<NxtError> | null | undefined)",
288
- value: input.errors
289
- }, errorFactory)) && input.errors.every((elem, _index2) => ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
290
- path: _path + ".errors[" + _index2 + "]",
291
- expected: "NxtError",
292
- value: elem
293
- }, errorFactory)) && $ao1(elem, _path + ".errors[" + _index2 + "]", true && _exceptionable) || $guard(_exceptionable, {
294
- path: _path + ".errors[" + _index2 + "]",
295
- expected: "NxtError",
296
- value: elem
297
- }, errorFactory)) || $guard(_exceptionable, {
298
- path: _path + ".errors",
299
- expected: "(Array<NxtError> | null | undefined)",
300
- value: input.errors
301
- }, errorFactory));
302
- const $ao2 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every(key => {
303
- const value = input[key];
304
- if (undefined === value)
305
- return true;
306
- return "string" === typeof value || $guard(_exceptionable, {
307
- path: _path + $join(key),
308
- expected: "string",
309
- value: value
310
- }, errorFactory);
311
- });
312
- const $ao3 = (input, _path, _exceptionable = true) => true;
313
- return ("object" === typeof input && null !== input || $guard(true, {
314
- path: _path + "",
315
- expected: "FileReplicateRecord",
316
- value: input
317
- }, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
318
- path: _path + "",
319
- expected: "FileReplicateRecord",
320
- value: input
321
- }, errorFactory);
322
- })(input, "$input", true);
323
- };
324
- export const stringifyFileReplicateRecord = input => {
325
- 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)));
326
- const $io2 = input => Object.keys(input).every(key => {
327
- const value = input[key];
328
- if (undefined === value)
329
- return true;
330
- return "string" === typeof value;
331
- });
332
- const $io3 = input => true;
333
- const $string = __typia.json.createStringify.string;
334
- const $so0 = input => `{"replicas":${`[${input.replicas.map(elem => $string(elem)).join(",")}]`},"error":${null !== input.error ? $so1(input.error) : "null"}}`;
335
- 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)}}`;
336
- const $so2 = input => `{${Object.entries(input).map(([key, value]) => { if (undefined === value)
337
- return ""; return `${JSON.stringify(key)}:${$string(value)}`; }).filter(str => "" !== str).join(",")}}`;
338
- return $so0(input);
339
- };
340
- export const assertStringifyFileReplicateRecord = (input, errorFactory) => { const assert = (input, errorFactory) => {
341
- const __is = input => {
342
- const $io0 = input => Array.isArray(input.replicas) && input.replicas.every(elem => "string" === typeof elem) && (null === input.error || "object" === typeof input.error && null !== input.error && $io1(input.error));
343
- 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)));
344
- const $io2 = input => Object.keys(input).every(key => {
345
- const value = input[key];
346
- if (undefined === value)
347
- return true;
348
- return "string" === typeof value;
349
- });
350
- const $io3 = input => true;
351
- return "object" === typeof input && null !== input && $io0(input);
352
- };
353
- if (false === __is(input))
354
- ((input, _path, _exceptionable = true) => {
355
- const $guard = __typia.json.createAssertStringify.guard;
356
- const $join = __typia.json.createAssertStringify.join;
357
- const $ao0 = (input, _path, _exceptionable = true) => ((Array.isArray(input.replicas) || $guard(_exceptionable, {
358
- path: _path + ".replicas",
359
- expected: "Array<string>",
360
- value: input.replicas
361
- }, errorFactory)) && input.replicas.every((elem, _index1) => "string" === typeof elem || $guard(_exceptionable, {
362
- path: _path + ".replicas[" + _index1 + "]",
363
- expected: "string",
364
- value: elem
365
- }, errorFactory)) || $guard(_exceptionable, {
366
- path: _path + ".replicas",
367
- expected: "Array<string>",
368
- value: input.replicas
369
- }, errorFactory)) && (null === input.error || ("object" === typeof input.error && null !== input.error || $guard(_exceptionable, {
370
- path: _path + ".error",
371
- expected: "(NxtError | null)",
372
- value: input.error
373
- }, errorFactory)) && $ao1(input.error, _path + ".error", true && _exceptionable) || $guard(_exceptionable, {
374
- path: _path + ".error",
375
- expected: "(NxtError | null)",
376
- value: input.error
377
- }, errorFactory));
378
- const $ao1 = (input, _path, _exceptionable = true) => ("string" === typeof input.message || $guard(_exceptionable, {
379
- path: _path + ".message",
380
- expected: "string",
381
- value: input.message
382
- }, errorFactory)) && (undefined === input.type || "string" === typeof input.type || $guard(_exceptionable, {
383
- path: _path + ".type",
384
- expected: "(string | undefined)",
385
- value: input.type
386
- }, errorFactory)) && (undefined === input.code || "string" === typeof input.code || $guard(_exceptionable, {
387
- path: _path + ".code",
388
- expected: "(string | undefined)",
389
- value: input.code
390
- }, errorFactory)) && (undefined === input.exitCode || "number" === typeof input.exitCode && !Number.isNaN(input.exitCode) || $guard(_exceptionable, {
391
- path: _path + ".exitCode",
392
- expected: "(number | undefined)",
393
- value: input.exitCode
394
- }, errorFactory)) && (undefined === input.signalCode || "number" === typeof input.signalCode && !Number.isNaN(input.signalCode) || $guard(_exceptionable, {
395
- path: _path + ".signalCode",
396
- expected: "(number | undefined)",
397
- value: input.signalCode
398
- }, errorFactory)) && (undefined === input.statusCode || "number" === typeof input.statusCode && !Number.isNaN(input.statusCode) || $guard(_exceptionable, {
399
- path: _path + ".statusCode",
400
- expected: "(number | undefined)",
401
- value: input.statusCode
402
- }, errorFactory)) && (undefined === input.headers || ("object" === typeof input.headers && null !== input.headers && false === Array.isArray(input.headers) || $guard(_exceptionable, {
403
- path: _path + ".headers",
404
- expected: "(Record<string, string> | undefined)",
405
- value: input.headers
406
- }, errorFactory)) && $ao2(input.headers, _path + ".headers", true && _exceptionable) || $guard(_exceptionable, {
407
- path: _path + ".headers",
408
- expected: "(Record<string, string> | undefined)",
409
- value: input.headers
410
- }, errorFactory)) && (undefined === input.data || ("object" === typeof input.data && null !== input.data && false === Array.isArray(input.data) || $guard(_exceptionable, {
411
- path: _path + ".data",
412
- expected: "(object | undefined)",
413
- value: input.data
414
- }, errorFactory)) && $ao3(input.data, _path + ".data", true && _exceptionable) || $guard(_exceptionable, {
415
- path: _path + ".data",
416
- expected: "(object | undefined)",
417
- value: input.data
418
- }, errorFactory)) && (null === input.cause || undefined === input.cause || ("object" === typeof input.cause && null !== input.cause || $guard(_exceptionable, {
419
- path: _path + ".cause",
420
- expected: "(NxtError | null | undefined)",
421
- value: input.cause
422
- }, errorFactory)) && $ao1(input.cause, _path + ".cause", true && _exceptionable) || $guard(_exceptionable, {
423
- path: _path + ".cause",
424
- expected: "(NxtError | null | undefined)",
425
- value: input.cause
426
- }, errorFactory)) && (null === input.errors || undefined === input.errors || (Array.isArray(input.errors) || $guard(_exceptionable, {
427
- path: _path + ".errors",
428
- expected: "(Array<NxtError> | null | undefined)",
429
- value: input.errors
430
- }, errorFactory)) && input.errors.every((elem, _index2) => ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
431
- path: _path + ".errors[" + _index2 + "]",
432
- expected: "NxtError",
433
- value: elem
434
- }, errorFactory)) && $ao1(elem, _path + ".errors[" + _index2 + "]", true && _exceptionable) || $guard(_exceptionable, {
435
- path: _path + ".errors[" + _index2 + "]",
436
- expected: "NxtError",
437
- value: elem
438
- }, errorFactory)) || $guard(_exceptionable, {
439
- path: _path + ".errors",
440
- expected: "(Array<NxtError> | null | undefined)",
441
- value: input.errors
442
- }, errorFactory));
443
- const $ao2 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every(key => {
444
- const value = input[key];
445
- if (undefined === value)
446
- return true;
447
- return "string" === typeof value || $guard(_exceptionable, {
448
- path: _path + $join(key),
449
- expected: "string",
450
- value: value
451
- }, errorFactory);
452
- });
453
- const $ao3 = (input, _path, _exceptionable = true) => true;
454
- return ("object" === typeof input && null !== input || $guard(true, {
455
- path: _path + "",
456
- expected: "FileReplicateRecord",
457
- value: input
458
- }, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
459
- path: _path + "",
460
- expected: "FileReplicateRecord",
461
- value: input
462
- }, errorFactory);
463
- })(input, "$input", true);
464
- return input;
465
- }; const stringify = input => {
466
- 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)));
467
- const $io2 = input => Object.keys(input).every(key => {
468
- const value = input[key];
469
- if (undefined === value)
470
- return true;
471
- return "string" === typeof value;
472
- });
473
- const $io3 = input => true;
474
- const $string = __typia.json.createAssertStringify.string;
475
- const $so0 = input => `{"replicas":${`[${input.replicas.map(elem => $string(elem)).join(",")}]`},"error":${null !== input.error ? $so1(input.error) : "null"}}`;
476
- 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)}}`;
477
- const $so2 = input => `{${Object.entries(input).map(([key, value]) => { if (undefined === value)
478
- return ""; return `${JSON.stringify(key)}:${$string(value)}`; }).filter(str => "" !== str).join(",")}}`;
479
- return $so0(input);
480
- }; return stringify(assert(input, errorFactory)); };
481
- export const isFileReplica = input => {
482
- const $io0 = input => "string" === typeof input.name && ("ok" === input.status || "error" === input.status) && (null === input.error || "object" === typeof input.error && null !== input.error && $io1(input.error));
483
- 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)));
484
- const $io2 = input => Object.keys(input).every(key => {
485
- const value = input[key];
486
- if (undefined === value)
487
- return true;
488
- return "string" === typeof value;
489
- });
490
- const $io3 = input => true;
491
- return "object" === typeof input && null !== input && $io0(input);
492
- };
493
- export const assertFileReplica = (input, errorFactory) => {
494
- const __is = input => {
495
- const $io0 = input => "string" === typeof input.name && ("ok" === input.status || "error" === input.status) && (null === input.error || "object" === typeof input.error && null !== input.error && $io1(input.error));
496
- 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)));
497
- const $io2 = input => Object.keys(input).every(key => {
498
- const value = input[key];
499
- if (undefined === value)
500
- return true;
501
- return "string" === typeof value;
502
- });
503
- const $io3 = input => true;
504
- return "object" === typeof input && null !== input && $io0(input);
505
- };
506
- if (false === __is(input))
507
- ((input, _path, _exceptionable = true) => {
508
- const $guard = __typia.createAssert.guard;
509
- const $join = __typia.createAssert.join;
510
- const $ao0 = (input, _path, _exceptionable = true) => ("string" === typeof input.name || $guard(_exceptionable, {
511
- path: _path + ".name",
512
- expected: "string",
513
- value: input.name
514
- }, errorFactory)) && ("ok" === input.status || "error" === input.status || $guard(_exceptionable, {
515
- path: _path + ".status",
516
- expected: "(\"error\" | \"ok\")",
517
- value: input.status
518
- }, errorFactory)) && (null === input.error || ("object" === typeof input.error && null !== input.error || $guard(_exceptionable, {
519
- path: _path + ".error",
520
- expected: "(NxtError | null)",
521
- value: input.error
522
- }, errorFactory)) && $ao1(input.error, _path + ".error", true && _exceptionable) || $guard(_exceptionable, {
523
- path: _path + ".error",
524
- expected: "(NxtError | null)",
525
- value: input.error
526
- }, errorFactory));
527
- const $ao1 = (input, _path, _exceptionable = true) => ("string" === typeof input.message || $guard(_exceptionable, {
528
- path: _path + ".message",
529
- expected: "string",
530
- value: input.message
531
- }, errorFactory)) && (undefined === input.type || "string" === typeof input.type || $guard(_exceptionable, {
532
- path: _path + ".type",
533
- expected: "(string | undefined)",
534
- value: input.type
535
- }, errorFactory)) && (undefined === input.code || "string" === typeof input.code || $guard(_exceptionable, {
536
- path: _path + ".code",
537
- expected: "(string | undefined)",
538
- value: input.code
539
- }, errorFactory)) && (undefined === input.exitCode || "number" === typeof input.exitCode || $guard(_exceptionable, {
540
- path: _path + ".exitCode",
541
- expected: "(number | undefined)",
542
- value: input.exitCode
543
- }, errorFactory)) && (undefined === input.signalCode || "number" === typeof input.signalCode || $guard(_exceptionable, {
544
- path: _path + ".signalCode",
545
- expected: "(number | undefined)",
546
- value: input.signalCode
547
- }, errorFactory)) && (undefined === input.statusCode || "number" === typeof input.statusCode || $guard(_exceptionable, {
548
- path: _path + ".statusCode",
549
- expected: "(number | undefined)",
550
- value: input.statusCode
551
- }, errorFactory)) && (undefined === input.headers || ("object" === typeof input.headers && null !== input.headers && false === Array.isArray(input.headers) || $guard(_exceptionable, {
552
- path: _path + ".headers",
553
- expected: "(Record<string, string> | undefined)",
554
- value: input.headers
555
- }, errorFactory)) && $ao2(input.headers, _path + ".headers", true && _exceptionable) || $guard(_exceptionable, {
556
- path: _path + ".headers",
557
- expected: "(Record<string, string> | undefined)",
558
- value: input.headers
559
- }, errorFactory)) && (undefined === input.data || ("object" === typeof input.data && null !== input.data && false === Array.isArray(input.data) || $guard(_exceptionable, {
560
- path: _path + ".data",
561
- expected: "(object | undefined)",
562
- value: input.data
563
- }, errorFactory)) && $ao3(input.data, _path + ".data", true && _exceptionable) || $guard(_exceptionable, {
564
- path: _path + ".data",
565
- expected: "(object | undefined)",
566
- value: input.data
567
- }, errorFactory)) && (null === input.cause || undefined === input.cause || ("object" === typeof input.cause && null !== input.cause || $guard(_exceptionable, {
568
- path: _path + ".cause",
569
- expected: "(NxtError | null | undefined)",
570
- value: input.cause
571
- }, errorFactory)) && $ao1(input.cause, _path + ".cause", true && _exceptionable) || $guard(_exceptionable, {
572
- path: _path + ".cause",
573
- expected: "(NxtError | null | undefined)",
574
- value: input.cause
575
- }, errorFactory)) && (null === input.errors || undefined === input.errors || (Array.isArray(input.errors) || $guard(_exceptionable, {
576
- path: _path + ".errors",
577
- expected: "(Array<NxtError> | null | undefined)",
578
- value: input.errors
579
- }, errorFactory)) && input.errors.every((elem, _index1) => ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
580
- path: _path + ".errors[" + _index1 + "]",
581
- expected: "NxtError",
582
- value: elem
583
- }, errorFactory)) && $ao1(elem, _path + ".errors[" + _index1 + "]", true && _exceptionable) || $guard(_exceptionable, {
584
- path: _path + ".errors[" + _index1 + "]",
585
- expected: "NxtError",
586
- value: elem
587
- }, errorFactory)) || $guard(_exceptionable, {
588
- path: _path + ".errors",
589
- expected: "(Array<NxtError> | null | undefined)",
590
- value: input.errors
591
- }, errorFactory));
592
- const $ao2 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every(key => {
593
- const value = input[key];
594
- if (undefined === value)
595
- return true;
596
- return "string" === typeof value || $guard(_exceptionable, {
597
- path: _path + $join(key),
598
- expected: "string",
599
- value: value
600
- }, errorFactory);
601
- });
602
- const $ao3 = (input, _path, _exceptionable = true) => true;
603
- return ("object" === typeof input && null !== input || $guard(true, {
604
- path: _path + "",
605
- expected: "FileReplica",
606
- value: input
607
- }, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
608
- path: _path + "",
609
- expected: "FileReplica",
610
- value: input
611
- }, errorFactory);
612
- })(input, "$input", true);
613
- return input;
614
- };
615
- export const randomFileReplica = generator => {
616
- const $generator = __typia.createRandom.generator;
617
- const $pick = __typia.createRandom.pick;
618
- const $ro0 = (_recursive = false, _depth = 0) => ({
619
- name: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
620
- status: $pick([
621
- () => "ok",
622
- () => "error"
623
- ])(),
624
- error: $pick([
625
- () => null,
626
- () => $ro1(_recursive, _recursive ? 1 + _depth : _depth)
627
- ])()
628
- });
629
- const $ro1 = (_recursive = true, _depth = 0) => ({
630
- message: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
631
- type: $pick([
632
- () => undefined,
633
- () => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
634
- ])(),
635
- code: $pick([
636
- () => undefined,
637
- () => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
638
- ])(),
639
- exitCode: $pick([
640
- () => undefined,
641
- () => (generator?.customs ?? $generator.customs)?.number?.([]) ?? (generator?.number ?? $generator.number)(0, 100)
642
- ])(),
643
- signalCode: $pick([
644
- () => undefined,
645
- () => (generator?.customs ?? $generator.customs)?.number?.([]) ?? (generator?.number ?? $generator.number)(0, 100)
646
- ])(),
647
- statusCode: $pick([
648
- () => undefined,
649
- () => (generator?.customs ?? $generator.customs)?.number?.([]) ?? (generator?.number ?? $generator.number)(0, 100)
650
- ])(),
651
- headers: $pick([
652
- () => undefined,
653
- () => $ro2(true, _recursive ? 1 + _depth : _depth)
654
- ])(),
655
- data: $pick([
656
- () => undefined,
657
- () => $ro3(true, _recursive ? 1 + _depth : _depth)
658
- ])(),
659
- cause: $pick([
660
- () => undefined,
661
- () => null,
662
- () => $ro1(true, _recursive ? 1 + _depth : _depth)
663
- ])(),
664
- errors: $pick([
665
- () => undefined,
666
- () => null,
667
- () => _recursive && 5 < _depth ? [] : 5 >= _depth ? (generator?.array ?? $generator.array)(() => $ro1(true, _recursive ? 1 + _depth : _depth)) : []
668
- ])()
669
- });
670
- const $ro2 = (_recursive = false, _depth = 0) => {
671
- const output = {};
672
- (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));
673
- return output;
674
- };
675
- const $ro3 = (_recursive = false, _depth = 0) => {};
676
- return $ro0();
677
- };
678
- export const assertGuardFileReplica = (input, errorFactory) => {
679
- const __is = input => {
680
- const $io0 = input => "string" === typeof input.name && ("ok" === input.status || "error" === input.status) && (null === input.error || "object" === typeof input.error && null !== input.error && $io1(input.error));
681
- 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)));
682
- const $io2 = input => Object.keys(input).every(key => {
683
- const value = input[key];
684
- if (undefined === value)
685
- return true;
686
- return "string" === typeof value;
687
- });
688
- const $io3 = input => true;
689
- return "object" === typeof input && null !== input && $io0(input);
690
- };
691
- if (false === __is(input))
692
- ((input, _path, _exceptionable = true) => {
693
- const $guard = __typia.createAssertGuard.guard;
694
- const $join = __typia.createAssertGuard.join;
695
- const $ao0 = (input, _path, _exceptionable = true) => ("string" === typeof input.name || $guard(_exceptionable, {
696
- path: _path + ".name",
697
- expected: "string",
698
- value: input.name
699
- }, errorFactory)) && ("ok" === input.status || "error" === input.status || $guard(_exceptionable, {
700
- path: _path + ".status",
701
- expected: "(\"error\" | \"ok\")",
702
- value: input.status
703
- }, errorFactory)) && (null === input.error || ("object" === typeof input.error && null !== input.error || $guard(_exceptionable, {
704
- path: _path + ".error",
705
- expected: "(NxtError | null)",
706
- value: input.error
707
- }, errorFactory)) && $ao1(input.error, _path + ".error", true && _exceptionable) || $guard(_exceptionable, {
708
- path: _path + ".error",
709
- expected: "(NxtError | null)",
710
- value: input.error
711
- }, errorFactory));
712
- const $ao1 = (input, _path, _exceptionable = true) => ("string" === typeof input.message || $guard(_exceptionable, {
713
- path: _path + ".message",
714
- expected: "string",
715
- value: input.message
716
- }, errorFactory)) && (undefined === input.type || "string" === typeof input.type || $guard(_exceptionable, {
717
- path: _path + ".type",
718
- expected: "(string | undefined)",
719
- value: input.type
720
- }, errorFactory)) && (undefined === input.code || "string" === typeof input.code || $guard(_exceptionable, {
721
- path: _path + ".code",
722
- expected: "(string | undefined)",
723
- value: input.code
724
- }, errorFactory)) && (undefined === input.exitCode || "number" === typeof input.exitCode || $guard(_exceptionable, {
725
- path: _path + ".exitCode",
726
- expected: "(number | undefined)",
727
- value: input.exitCode
728
- }, errorFactory)) && (undefined === input.signalCode || "number" === typeof input.signalCode || $guard(_exceptionable, {
729
- path: _path + ".signalCode",
730
- expected: "(number | undefined)",
731
- value: input.signalCode
732
- }, errorFactory)) && (undefined === input.statusCode || "number" === typeof input.statusCode || $guard(_exceptionable, {
733
- path: _path + ".statusCode",
734
- expected: "(number | undefined)",
735
- value: input.statusCode
736
- }, errorFactory)) && (undefined === input.headers || ("object" === typeof input.headers && null !== input.headers && false === Array.isArray(input.headers) || $guard(_exceptionable, {
737
- path: _path + ".headers",
738
- expected: "(Record<string, string> | undefined)",
739
- value: input.headers
740
- }, errorFactory)) && $ao2(input.headers, _path + ".headers", true && _exceptionable) || $guard(_exceptionable, {
741
- path: _path + ".headers",
742
- expected: "(Record<string, string> | undefined)",
743
- value: input.headers
744
- }, errorFactory)) && (undefined === input.data || ("object" === typeof input.data && null !== input.data && false === Array.isArray(input.data) || $guard(_exceptionable, {
745
- path: _path + ".data",
746
- expected: "(object | undefined)",
747
- value: input.data
748
- }, errorFactory)) && $ao3(input.data, _path + ".data", true && _exceptionable) || $guard(_exceptionable, {
749
- path: _path + ".data",
750
- expected: "(object | undefined)",
751
- value: input.data
752
- }, errorFactory)) && (null === input.cause || undefined === input.cause || ("object" === typeof input.cause && null !== input.cause || $guard(_exceptionable, {
753
- path: _path + ".cause",
754
- expected: "(NxtError | null | undefined)",
755
- value: input.cause
756
- }, errorFactory)) && $ao1(input.cause, _path + ".cause", true && _exceptionable) || $guard(_exceptionable, {
757
- path: _path + ".cause",
758
- expected: "(NxtError | null | undefined)",
759
- value: input.cause
760
- }, errorFactory)) && (null === input.errors || undefined === input.errors || (Array.isArray(input.errors) || $guard(_exceptionable, {
761
- path: _path + ".errors",
762
- expected: "(Array<NxtError> | null | undefined)",
763
- value: input.errors
764
- }, errorFactory)) && input.errors.every((elem, _index1) => ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
765
- path: _path + ".errors[" + _index1 + "]",
766
- expected: "NxtError",
767
- value: elem
768
- }, errorFactory)) && $ao1(elem, _path + ".errors[" + _index1 + "]", true && _exceptionable) || $guard(_exceptionable, {
769
- path: _path + ".errors[" + _index1 + "]",
770
- expected: "NxtError",
771
- value: elem
772
- }, errorFactory)) || $guard(_exceptionable, {
773
- path: _path + ".errors",
774
- expected: "(Array<NxtError> | null | undefined)",
775
- value: input.errors
776
- }, errorFactory));
777
- const $ao2 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every(key => {
778
- const value = input[key];
779
- if (undefined === value)
780
- return true;
781
- return "string" === typeof value || $guard(_exceptionable, {
782
- path: _path + $join(key),
783
- expected: "string",
784
- value: value
785
- }, errorFactory);
786
- });
787
- const $ao3 = (input, _path, _exceptionable = true) => true;
788
- return ("object" === typeof input && null !== input || $guard(true, {
789
- path: _path + "",
790
- expected: "FileReplica",
791
- value: input
792
- }, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
793
- path: _path + "",
794
- expected: "FileReplica",
795
- value: input
796
- }, errorFactory);
797
- })(input, "$input", true);
798
- };
799
- export const stringifyFileReplica = input => {
800
- 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)));
801
- const $io2 = input => Object.keys(input).every(key => {
802
- const value = input[key];
803
- if (undefined === value)
804
- return true;
805
- return "string" === typeof value;
806
- });
807
- const $io3 = input => true;
808
- const $string = __typia.json.createStringify.string;
809
- const $throws = __typia.json.createStringify.throws;
810
- const $so0 = input => `{"name":${$string(input.name)},"status":${(() => {
811
- if ("string" === typeof input.status)
812
- return $string(input.status);
813
- if ("string" === typeof input.status)
814
- return "\"" + input.status + "\"";
815
- $throws({
816
- expected: "(\"error\" | \"ok\")",
817
- value: input.status
818
- });
819
- })()},"error":${null !== input.error ? $so1(input.error) : "null"}}`;
820
- 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)}}`;
821
- const $so2 = input => `{${Object.entries(input).map(([key, value]) => { if (undefined === value)
822
- return ""; return `${JSON.stringify(key)}:${$string(value)}`; }).filter(str => "" !== str).join(",")}}`;
823
- return $so0(input);
824
- };
825
- export const assertStringifyFileReplica = (input, errorFactory) => { const assert = (input, errorFactory) => {
826
- const __is = input => {
827
- const $io0 = input => "string" === typeof input.name && ("ok" === input.status || "error" === input.status) && (null === input.error || "object" === typeof input.error && null !== input.error && $io1(input.error));
828
- 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)));
829
- const $io2 = input => Object.keys(input).every(key => {
830
- const value = input[key];
831
- if (undefined === value)
832
- return true;
833
- return "string" === typeof value;
834
- });
835
- const $io3 = input => true;
836
- return "object" === typeof input && null !== input && $io0(input);
837
- };
838
- if (false === __is(input))
839
- ((input, _path, _exceptionable = true) => {
840
- const $guard = __typia.json.createAssertStringify.guard;
841
- const $join = __typia.json.createAssertStringify.join;
842
- const $ao0 = (input, _path, _exceptionable = true) => ("string" === typeof input.name || $guard(_exceptionable, {
843
- path: _path + ".name",
844
- expected: "string",
845
- value: input.name
846
- }, errorFactory)) && ("ok" === input.status || "error" === input.status || $guard(_exceptionable, {
847
- path: _path + ".status",
848
- expected: "(\"error\" | \"ok\")",
849
- value: input.status
850
- }, errorFactory)) && (null === input.error || ("object" === typeof input.error && null !== input.error || $guard(_exceptionable, {
851
- path: _path + ".error",
852
- expected: "(NxtError | null)",
853
- value: input.error
854
- }, errorFactory)) && $ao1(input.error, _path + ".error", true && _exceptionable) || $guard(_exceptionable, {
855
- path: _path + ".error",
856
- expected: "(NxtError | null)",
857
- value: input.error
858
- }, errorFactory));
859
- const $ao1 = (input, _path, _exceptionable = true) => ("string" === typeof input.message || $guard(_exceptionable, {
860
- path: _path + ".message",
861
- expected: "string",
862
- value: input.message
863
- }, errorFactory)) && (undefined === input.type || "string" === typeof input.type || $guard(_exceptionable, {
864
- path: _path + ".type",
865
- expected: "(string | undefined)",
866
- value: input.type
867
- }, errorFactory)) && (undefined === input.code || "string" === typeof input.code || $guard(_exceptionable, {
868
- path: _path + ".code",
869
- expected: "(string | undefined)",
870
- value: input.code
871
- }, errorFactory)) && (undefined === input.exitCode || "number" === typeof input.exitCode && !Number.isNaN(input.exitCode) || $guard(_exceptionable, {
872
- path: _path + ".exitCode",
873
- expected: "(number | undefined)",
874
- value: input.exitCode
875
- }, errorFactory)) && (undefined === input.signalCode || "number" === typeof input.signalCode && !Number.isNaN(input.signalCode) || $guard(_exceptionable, {
876
- path: _path + ".signalCode",
877
- expected: "(number | undefined)",
878
- value: input.signalCode
879
- }, errorFactory)) && (undefined === input.statusCode || "number" === typeof input.statusCode && !Number.isNaN(input.statusCode) || $guard(_exceptionable, {
880
- path: _path + ".statusCode",
881
- expected: "(number | undefined)",
882
- value: input.statusCode
883
- }, errorFactory)) && (undefined === input.headers || ("object" === typeof input.headers && null !== input.headers && false === Array.isArray(input.headers) || $guard(_exceptionable, {
884
- path: _path + ".headers",
885
- expected: "(Record<string, string> | undefined)",
886
- value: input.headers
887
- }, errorFactory)) && $ao2(input.headers, _path + ".headers", true && _exceptionable) || $guard(_exceptionable, {
888
- path: _path + ".headers",
889
- expected: "(Record<string, string> | undefined)",
890
- value: input.headers
891
- }, errorFactory)) && (undefined === input.data || ("object" === typeof input.data && null !== input.data && false === Array.isArray(input.data) || $guard(_exceptionable, {
892
- path: _path + ".data",
893
- expected: "(object | undefined)",
894
- value: input.data
895
- }, errorFactory)) && $ao3(input.data, _path + ".data", true && _exceptionable) || $guard(_exceptionable, {
896
- path: _path + ".data",
897
- expected: "(object | undefined)",
898
- value: input.data
899
- }, errorFactory)) && (null === input.cause || undefined === input.cause || ("object" === typeof input.cause && null !== input.cause || $guard(_exceptionable, {
900
- path: _path + ".cause",
901
- expected: "(NxtError | null | undefined)",
902
- value: input.cause
903
- }, errorFactory)) && $ao1(input.cause, _path + ".cause", true && _exceptionable) || $guard(_exceptionable, {
904
- path: _path + ".cause",
905
- expected: "(NxtError | null | undefined)",
906
- value: input.cause
907
- }, errorFactory)) && (null === input.errors || undefined === input.errors || (Array.isArray(input.errors) || $guard(_exceptionable, {
908
- path: _path + ".errors",
909
- expected: "(Array<NxtError> | null | undefined)",
910
- value: input.errors
911
- }, errorFactory)) && input.errors.every((elem, _index1) => ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
912
- path: _path + ".errors[" + _index1 + "]",
913
- expected: "NxtError",
914
- value: elem
915
- }, errorFactory)) && $ao1(elem, _path + ".errors[" + _index1 + "]", true && _exceptionable) || $guard(_exceptionable, {
916
- path: _path + ".errors[" + _index1 + "]",
917
- expected: "NxtError",
918
- value: elem
919
- }, errorFactory)) || $guard(_exceptionable, {
920
- path: _path + ".errors",
921
- expected: "(Array<NxtError> | null | undefined)",
922
- value: input.errors
923
- }, errorFactory));
924
- const $ao2 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every(key => {
925
- const value = input[key];
926
- if (undefined === value)
927
- return true;
928
- return "string" === typeof value || $guard(_exceptionable, {
929
- path: _path + $join(key),
930
- expected: "string",
931
- value: value
932
- }, errorFactory);
933
- });
934
- const $ao3 = (input, _path, _exceptionable = true) => true;
935
- return ("object" === typeof input && null !== input || $guard(true, {
936
- path: _path + "",
937
- expected: "FileReplica",
938
- value: input
939
- }, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
940
- path: _path + "",
941
- expected: "FileReplica",
942
- value: input
943
- }, errorFactory);
944
- })(input, "$input", true);
945
- return input;
946
- }; const stringify = input => {
947
- 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)));
948
- const $io2 = input => Object.keys(input).every(key => {
949
- const value = input[key];
950
- if (undefined === value)
951
- return true;
952
- return "string" === typeof value;
953
- });
954
- const $io3 = input => true;
955
- const $string = __typia.json.createAssertStringify.string;
956
- const $throws = __typia.json.createAssertStringify.throws;
957
- const $so0 = input => `{"name":${$string(input.name)},"status":${(() => {
958
- if ("string" === typeof input.status)
959
- return $string(input.status);
960
- if ("string" === typeof input.status)
961
- return "\"" + input.status + "\"";
962
- $throws({
963
- expected: "(\"error\" | \"ok\")",
964
- value: input.status
965
- });
966
- })()},"error":${null !== input.error ? $so1(input.error) : "null"}}`;
967
- 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)}}`;
968
- const $so2 = input => `{${Object.entries(input).map(([key, value]) => { if (undefined === value)
969
- return ""; return `${JSON.stringify(key)}:${$string(value)}`; }).filter(str => "" !== str).join(",")}}`;
970
- return $so0(input);
971
- }; return stringify(assert(input, errorFactory)); };
972
- export const isFileRestrictionsRecord = input => {
973
- const $io0 = input => Object.keys(input).every(key => {
974
- const value = input[key];
975
- if (undefined === value)
976
- return true;
977
- return "object" === typeof value && null !== value && ("string" === typeof value.asset && "string" === typeof value.date && "string" === typeof value.user && "string" === typeof value.text && "number" === typeof value.start && "number" === typeof value.end);
978
- });
979
- return "object" === typeof input && null !== input && false === Array.isArray(input) && $io0(input);
980
- };
981
- export const assertFileRestrictionsRecord = (input, errorFactory) => {
982
- const __is = input => {
983
- const $io0 = input => Object.keys(input).every(key => {
984
- const value = input[key];
985
- if (undefined === value)
986
- return true;
987
- return "object" === typeof value && null !== value && ("string" === typeof value.asset && "string" === typeof value.date && "string" === typeof value.user && "string" === typeof value.text && "number" === typeof value.start && "number" === typeof value.end);
988
- });
989
- return "object" === typeof input && null !== input && false === Array.isArray(input) && $io0(input);
990
- };
991
- if (false === __is(input))
992
- ((input, _path, _exceptionable = true) => {
993
- const $guard = __typia.createAssert.guard;
994
- const $join = __typia.createAssert.join;
995
- const $ao0 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every(key => {
996
- const value = input[key];
997
- if (undefined === value)
998
- return true;
999
- return ("object" === typeof value && null !== value || $guard(_exceptionable, {
1000
- path: _path + $join(key),
1001
- expected: "__type",
1002
- value: value
1003
- }, errorFactory)) && $ao1(value, _path + $join(key), true && _exceptionable) || $guard(_exceptionable, {
1004
- path: _path + $join(key),
1005
- expected: "__type",
1006
- value: value
1007
- }, errorFactory);
1008
- });
1009
- const $ao1 = (input, _path, _exceptionable = true) => ("string" === typeof input.asset || $guard(_exceptionable, {
1010
- path: _path + ".asset",
1011
- expected: "string",
1012
- value: input.asset
1013
- }, errorFactory)) && ("string" === typeof input.date || $guard(_exceptionable, {
1014
- path: _path + ".date",
1015
- expected: "string",
1016
- value: input.date
1017
- }, errorFactory)) && ("string" === typeof input.user || $guard(_exceptionable, {
1018
- path: _path + ".user",
1019
- expected: "string",
1020
- value: input.user
1021
- }, errorFactory)) && ("string" === typeof input.text || $guard(_exceptionable, {
1022
- path: _path + ".text",
1023
- expected: "string",
1024
- value: input.text
1025
- }, errorFactory)) && ("number" === typeof input.start || $guard(_exceptionable, {
1026
- path: _path + ".start",
1027
- expected: "number",
1028
- value: input.start
1029
- }, errorFactory)) && ("number" === typeof input.end || $guard(_exceptionable, {
1030
- path: _path + ".end",
1031
- expected: "number",
1032
- value: input.end
1033
- }, errorFactory));
1034
- return ("object" === typeof input && null !== input && false === Array.isArray(input) || $guard(true, {
1035
- path: _path + "",
1036
- expected: "FileRestrictionsRecord",
1037
- value: input
1038
- }, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
1039
- path: _path + "",
1040
- expected: "FileRestrictionsRecord",
1041
- value: input
1042
- }, errorFactory);
1043
- })(input, "$input", true);
1044
- return input;
1045
- };
1046
- export const randomFileRestrictionsRecord = generator => {
1047
- const $generator = __typia.createRandom.generator;
1048
- const $ro0 = (_recursive = false, _depth = 0) => {
1049
- const output = {};
1050
- (generator?.array ?? $generator.array)(() => output[(generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()] = $ro1(_recursive, _recursive ? 1 + _depth : _depth), (generator?.integer ?? $generator.integer)(0, 3));
1051
- return output;
1052
- };
1053
- const $ro1 = (_recursive = false, _depth = 0) => ({
1054
- asset: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
1055
- date: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
1056
- user: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
1057
- text: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
1058
- start: (generator?.customs ?? $generator.customs)?.number?.([]) ?? (generator?.number ?? $generator.number)(0, 100),
1059
- end: (generator?.customs ?? $generator.customs)?.number?.([]) ?? (generator?.number ?? $generator.number)(0, 100)
1060
- });
1061
- return $ro0();
1062
- };
1063
- export const assertGuardFileRestrictionsRecord = (input, errorFactory) => {
1064
- const __is = input => {
1065
- const $io0 = input => Object.keys(input).every(key => {
1066
- const value = input[key];
1067
- if (undefined === value)
1068
- return true;
1069
- return "object" === typeof value && null !== value && ("string" === typeof value.asset && "string" === typeof value.date && "string" === typeof value.user && "string" === typeof value.text && "number" === typeof value.start && "number" === typeof value.end);
1070
- });
1071
- return "object" === typeof input && null !== input && false === Array.isArray(input) && $io0(input);
1072
- };
1073
- if (false === __is(input))
1074
- ((input, _path, _exceptionable = true) => {
1075
- const $guard = __typia.createAssertGuard.guard;
1076
- const $join = __typia.createAssertGuard.join;
1077
- const $ao0 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every(key => {
1078
- const value = input[key];
1079
- if (undefined === value)
1080
- return true;
1081
- return ("object" === typeof value && null !== value || $guard(_exceptionable, {
1082
- path: _path + $join(key),
1083
- expected: "__type",
1084
- value: value
1085
- }, errorFactory)) && $ao1(value, _path + $join(key), true && _exceptionable) || $guard(_exceptionable, {
1086
- path: _path + $join(key),
1087
- expected: "__type",
1088
- value: value
1089
- }, errorFactory);
1090
- });
1091
- const $ao1 = (input, _path, _exceptionable = true) => ("string" === typeof input.asset || $guard(_exceptionable, {
1092
- path: _path + ".asset",
1093
- expected: "string",
1094
- value: input.asset
1095
- }, errorFactory)) && ("string" === typeof input.date || $guard(_exceptionable, {
1096
- path: _path + ".date",
1097
- expected: "string",
1098
- value: input.date
1099
- }, errorFactory)) && ("string" === typeof input.user || $guard(_exceptionable, {
1100
- path: _path + ".user",
1101
- expected: "string",
1102
- value: input.user
1103
- }, errorFactory)) && ("string" === typeof input.text || $guard(_exceptionable, {
1104
- path: _path + ".text",
1105
- expected: "string",
1106
- value: input.text
1107
- }, errorFactory)) && ("number" === typeof input.start || $guard(_exceptionable, {
1108
- path: _path + ".start",
1109
- expected: "number",
1110
- value: input.start
1111
- }, errorFactory)) && ("number" === typeof input.end || $guard(_exceptionable, {
1112
- path: _path + ".end",
1113
- expected: "number",
1114
- value: input.end
1115
- }, errorFactory));
1116
- return ("object" === typeof input && null !== input && false === Array.isArray(input) || $guard(true, {
1117
- path: _path + "",
1118
- expected: "FileRestrictionsRecord",
1119
- value: input
1120
- }, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
1121
- path: _path + "",
1122
- expected: "FileRestrictionsRecord",
1123
- value: input
1124
- }, errorFactory);
1125
- })(input, "$input", true);
1126
- };
1127
- export const stringifyFileRestrictionsRecord = input => {
1128
- const $io1 = input => "string" === typeof input.asset && "string" === typeof input.date && "string" === typeof input.user && "string" === typeof input.text && "number" === typeof input.start && "number" === typeof input.end;
1129
- const $string = __typia.json.createStringify.string;
1130
- const $so0 = input => `{${Object.entries(input).map(([key, value]) => { if (undefined === value)
1131
- return ""; return `${JSON.stringify(key)}:${`{"asset":${$string(value.asset)},"date":${$string(value.date)},"user":${$string(value.user)},"text":${$string(value.text)},"start":${value.start},"end":${value.end}}`}`; }).filter(str => "" !== str).join(",")}}`;
1132
- return $so0(input);
1133
- };
1134
- export const assertStringifyFileRestrictionsRecord = (input, errorFactory) => { const assert = (input, errorFactory) => {
1135
- const __is = input => {
1136
- const $io0 = input => Object.keys(input).every(key => {
1137
- const value = input[key];
1138
- if (undefined === value)
1139
- return true;
1140
- return "object" === typeof value && null !== value && ("string" === typeof value.asset && "string" === typeof value.date && "string" === typeof value.user && "string" === typeof value.text && ("number" === typeof value.start && !Number.isNaN(value.start)) && ("number" === typeof value.end && !Number.isNaN(value.end)));
1141
- });
1142
- return "object" === typeof input && null !== input && false === Array.isArray(input) && $io0(input);
1143
- };
1144
- if (false === __is(input))
1145
- ((input, _path, _exceptionable = true) => {
1146
- const $guard = __typia.json.createAssertStringify.guard;
1147
- const $join = __typia.json.createAssertStringify.join;
1148
- const $ao0 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every(key => {
1149
- const value = input[key];
1150
- if (undefined === value)
1151
- return true;
1152
- return ("object" === typeof value && null !== value || $guard(_exceptionable, {
1153
- path: _path + $join(key),
1154
- expected: "__type",
1155
- value: value
1156
- }, errorFactory)) && $ao1(value, _path + $join(key), true && _exceptionable) || $guard(_exceptionable, {
1157
- path: _path + $join(key),
1158
- expected: "__type",
1159
- value: value
1160
- }, errorFactory);
1161
- });
1162
- const $ao1 = (input, _path, _exceptionable = true) => ("string" === typeof input.asset || $guard(_exceptionable, {
1163
- path: _path + ".asset",
1164
- expected: "string",
1165
- value: input.asset
1166
- }, errorFactory)) && ("string" === typeof input.date || $guard(_exceptionable, {
1167
- path: _path + ".date",
1168
- expected: "string",
1169
- value: input.date
1170
- }, errorFactory)) && ("string" === typeof input.user || $guard(_exceptionable, {
1171
- path: _path + ".user",
1172
- expected: "string",
1173
- value: input.user
1174
- }, errorFactory)) && ("string" === typeof input.text || $guard(_exceptionable, {
1175
- path: _path + ".text",
1176
- expected: "string",
1177
- value: input.text
1178
- }, errorFactory)) && ("number" === typeof input.start && !Number.isNaN(input.start) || $guard(_exceptionable, {
1179
- path: _path + ".start",
1180
- expected: "number",
1181
- value: input.start
1182
- }, errorFactory)) && ("number" === typeof input.end && !Number.isNaN(input.end) || $guard(_exceptionable, {
1183
- path: _path + ".end",
1184
- expected: "number",
1185
- value: input.end
1186
- }, errorFactory));
1187
- return ("object" === typeof input && null !== input && false === Array.isArray(input) || $guard(true, {
1188
- path: _path + "",
1189
- expected: "FileRestrictionsRecord",
1190
- value: input
1191
- }, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
1192
- path: _path + "",
1193
- expected: "FileRestrictionsRecord",
1194
- value: input
1195
- }, errorFactory);
1196
- })(input, "$input", true);
1197
- return input;
1198
- }; const stringify = input => {
1199
- const $io1 = input => "string" === typeof input.asset && "string" === typeof input.date && "string" === typeof input.user && "string" === typeof input.text && "number" === typeof input.start && "number" === typeof input.end;
1200
- const $string = __typia.json.createAssertStringify.string;
1201
- const $so0 = input => `{${Object.entries(input).map(([key, value]) => { if (undefined === value)
1202
- return ""; return `${JSON.stringify(key)}:${`{"asset":${$string(value.asset)},"date":${$string(value.date)},"user":${$string(value.user)},"text":${$string(value.text)},"start":${value.start},"end":${value.end}}`}`; }).filter(str => "" !== str).join(",")}}`;
1203
- return $so0(input);
1204
- }; return stringify(assert(input, errorFactory)); };
1205
- export const isFileDomainStatsRecord = input => {
1206
- const $io0 = input => (null === input.position || "number" === typeof input.position && (0 <= input.position && (Math.floor(input.position) === input.position && 0 <= input.position && input.position <= 18446744073709552000))) && (null === input.uploading || "boolean" === typeof input.uploading) && (Array.isArray(input.zones) && input.zones.every(elem => "string" === typeof elem)) && (Array.isArray(input.replicas) && input.replicas.every(elem => "string" === typeof elem)) && (Array.isArray(input.locations) && input.locations.every(elem => "string" === typeof elem)) && (Array.isArray(input.ranges) && input.ranges.every(elem => Array.isArray(elem) && (elem.length === 2 && ("number" === typeof elem[0] && 0 <= elem[0]) && ("number" === typeof elem[1] && 0 <= elem[1])))) && (undefined === input.progress || "number" === typeof input.progress && (0 <= input.progress && input.progress <= 1)) && (undefined === input.speed || "number" === typeof input.speed && 0 <= input.speed) && ("string" === typeof input.id && /^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.id)) && (null === input.size || "number" === typeof input.size && (0 <= input.size && (Math.floor(input.size) === input.size && 0 <= input.size && input.size <= 18446744073709552000))) && "boolean" === typeof input.seekable && "boolean" === typeof input.deleted && (Array.isArray(input.refs) && input.refs.every(elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && $io1(elem))) && (Array.isArray(input.tags) && input.tags.every(elem => "string" === typeof elem)) && "string" === typeof input.resumable && "string" === typeof input.mimeType && "string" === typeof input.encoding && ("string" === typeof input.hash && /^([A-Fa-f0-9]{32})?$/.test(input.hash)) && ("number" === typeof input.btime && (0 <= input.btime && (Math.floor(input.btime) === input.btime && 0 <= input.btime && input.btime <= 18446744073709552000))) && "boolean" === typeof input.completed && (undefined !== input.error && (null === input.error || (Array.isArray(input.error) && input.error.every(elem => "object" === typeof elem && null !== elem && $io2(elem)) || "object" === typeof input.error && null !== input.error && $io2(input.error))));
1207
- const $io1 = input => (undefined === input.file || "string" === typeof input.file) && (undefined === input.offset || "number" === typeof input.offset) && (undefined === input.start || "number" === typeof input.start) && (undefined === input.end || "number" === typeof input.end);
1208
- const $io2 = 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) && $io3(input.headers)) && (undefined === input.data || "object" === typeof input.data && null !== input.data && false === Array.isArray(input.data) && $io4(input.data)) && (null === input.cause || undefined === input.cause || "object" === typeof input.cause && null !== input.cause && $io2(input.cause)) && (null === input.errors || undefined === input.errors || Array.isArray(input.errors) && input.errors.every(elem => "object" === typeof elem && null !== elem && $io2(elem)));
1209
- const $io3 = input => Object.keys(input).every(key => {
1210
- const value = input[key];
1211
- if (undefined === value)
1212
- return true;
1213
- return "string" === typeof value;
1214
- });
1215
- const $io4 = input => true;
1216
- return "object" === typeof input && null !== input && $io0(input);
1217
- };
1218
- export const assertFileDomainStatsRecord = (input, errorFactory) => {
1219
- const __is = input => {
1220
- const $io0 = input => (null === input.position || "number" === typeof input.position && (0 <= input.position && (Math.floor(input.position) === input.position && 0 <= input.position && input.position <= 18446744073709552000))) && (null === input.uploading || "boolean" === typeof input.uploading) && (Array.isArray(input.zones) && input.zones.every(elem => "string" === typeof elem)) && (Array.isArray(input.replicas) && input.replicas.every(elem => "string" === typeof elem)) && (Array.isArray(input.locations) && input.locations.every(elem => "string" === typeof elem)) && (Array.isArray(input.ranges) && input.ranges.every(elem => Array.isArray(elem) && (elem.length === 2 && ("number" === typeof elem[0] && 0 <= elem[0]) && ("number" === typeof elem[1] && 0 <= elem[1])))) && (undefined === input.progress || "number" === typeof input.progress && (0 <= input.progress && input.progress <= 1)) && (undefined === input.speed || "number" === typeof input.speed && 0 <= input.speed) && ("string" === typeof input.id && /^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.id)) && (null === input.size || "number" === typeof input.size && (0 <= input.size && (Math.floor(input.size) === input.size && 0 <= input.size && input.size <= 18446744073709552000))) && "boolean" === typeof input.seekable && "boolean" === typeof input.deleted && (Array.isArray(input.refs) && input.refs.every(elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && $io1(elem))) && (Array.isArray(input.tags) && input.tags.every(elem => "string" === typeof elem)) && "string" === typeof input.resumable && "string" === typeof input.mimeType && "string" === typeof input.encoding && ("string" === typeof input.hash && /^([A-Fa-f0-9]{32})?$/.test(input.hash)) && ("number" === typeof input.btime && (0 <= input.btime && (Math.floor(input.btime) === input.btime && 0 <= input.btime && input.btime <= 18446744073709552000))) && "boolean" === typeof input.completed && (undefined !== input.error && (null === input.error || (Array.isArray(input.error) && input.error.every(elem => "object" === typeof elem && null !== elem && $io2(elem)) || "object" === typeof input.error && null !== input.error && $io2(input.error))));
1221
- const $io1 = input => (undefined === input.file || "string" === typeof input.file) && (undefined === input.offset || "number" === typeof input.offset) && (undefined === input.start || "number" === typeof input.start) && (undefined === input.end || "number" === typeof input.end);
1222
- const $io2 = 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) && $io3(input.headers)) && (undefined === input.data || "object" === typeof input.data && null !== input.data && false === Array.isArray(input.data) && $io4(input.data)) && (null === input.cause || undefined === input.cause || "object" === typeof input.cause && null !== input.cause && $io2(input.cause)) && (null === input.errors || undefined === input.errors || Array.isArray(input.errors) && input.errors.every(elem => "object" === typeof elem && null !== elem && $io2(elem)));
1223
- const $io3 = input => Object.keys(input).every(key => {
1224
- const value = input[key];
1225
- if (undefined === value)
1226
- return true;
1227
- return "string" === typeof value;
1228
- });
1229
- const $io4 = input => true;
1230
- return "object" === typeof input && null !== input && $io0(input);
1231
- };
1232
- if (false === __is(input))
1233
- ((input, _path, _exceptionable = true) => {
1234
- const $guard = __typia.createAssert.guard;
1235
- const $join = __typia.createAssert.join;
1236
- const $ao0 = (input, _path, _exceptionable = true) => (null === input.position || "number" === typeof input.position && (0 <= input.position || $guard(_exceptionable, {
1237
- path: _path + ".position",
1238
- expected: "number & Minimum<0>",
1239
- value: input.position
1240
- }, errorFactory)) && (Math.floor(input.position) === input.position && 0 <= input.position && input.position <= 18446744073709552000 || $guard(_exceptionable, {
1241
- path: _path + ".position",
1242
- expected: "number & Type<\"uint64\">",
1243
- value: input.position
1244
- }, errorFactory)) || $guard(_exceptionable, {
1245
- path: _path + ".position",
1246
- expected: "((number & Minimum<0> & Type<\"uint64\">) | null)",
1247
- value: input.position
1248
- }, errorFactory)) && (null === input.uploading || "boolean" === typeof input.uploading || $guard(_exceptionable, {
1249
- path: _path + ".uploading",
1250
- expected: "(boolean | null)",
1251
- value: input.uploading
1252
- }, errorFactory)) && ((Array.isArray(input.zones) || $guard(_exceptionable, {
1253
- path: _path + ".zones",
1254
- expected: "Array<string>",
1255
- value: input.zones
1256
- }, errorFactory)) && input.zones.every((elem, _index1) => "string" === typeof elem || $guard(_exceptionable, {
1257
- path: _path + ".zones[" + _index1 + "]",
1258
- expected: "string",
1259
- value: elem
1260
- }, errorFactory)) || $guard(_exceptionable, {
1261
- path: _path + ".zones",
1262
- expected: "Array<string>",
1263
- value: input.zones
1264
- }, errorFactory)) && ((Array.isArray(input.replicas) || $guard(_exceptionable, {
1265
- path: _path + ".replicas",
1266
- expected: "Array<string>",
1267
- value: input.replicas
1268
- }, errorFactory)) && input.replicas.every((elem, _index2) => "string" === typeof elem || $guard(_exceptionable, {
1269
- path: _path + ".replicas[" + _index2 + "]",
1270
- expected: "string",
1271
- value: elem
1272
- }, errorFactory)) || $guard(_exceptionable, {
1273
- path: _path + ".replicas",
1274
- expected: "Array<string>",
1275
- value: input.replicas
1276
- }, errorFactory)) && ((Array.isArray(input.locations) || $guard(_exceptionable, {
1277
- path: _path + ".locations",
1278
- expected: "Array<string>",
1279
- value: input.locations
1280
- }, errorFactory)) && input.locations.every((elem, _index3) => "string" === typeof elem || $guard(_exceptionable, {
1281
- path: _path + ".locations[" + _index3 + "]",
1282
- expected: "string",
1283
- value: elem
1284
- }, errorFactory)) || $guard(_exceptionable, {
1285
- path: _path + ".locations",
1286
- expected: "Array<string>",
1287
- value: input.locations
1288
- }, errorFactory)) && ((Array.isArray(input.ranges) || $guard(_exceptionable, {
1289
- path: _path + ".ranges",
1290
- expected: "Array<[start: number & Minimum<0>, end: number & Minimum<0>]>",
1291
- value: input.ranges
1292
- }, errorFactory)) && input.ranges.every((elem, _index4) => (Array.isArray(elem) || $guard(_exceptionable, {
1293
- path: _path + ".ranges[" + _index4 + "]",
1294
- expected: "[start: number & Minimum<0>, end: number & Minimum<0>]",
1295
- value: elem
1296
- }, errorFactory)) && ((elem.length === 2 || $guard(_exceptionable, {
1297
- path: _path + ".ranges[" + _index4 + "]",
1298
- expected: "[(number & Minimum<0>), (number & Minimum<0>)]",
1299
- value: elem
1300
- }, errorFactory)) && ("number" === typeof elem[0] && (0 <= elem[0] || $guard(_exceptionable, {
1301
- path: _path + ".ranges[" + _index4 + "][0]",
1302
- expected: "number & Minimum<0>",
1303
- value: elem[0]
1304
- }, errorFactory)) || $guard(_exceptionable, {
1305
- path: _path + ".ranges[" + _index4 + "][0]",
1306
- expected: "(number & Minimum<0>)",
1307
- value: elem[0]
1308
- }, errorFactory)) && ("number" === typeof elem[1] && (0 <= elem[1] || $guard(_exceptionable, {
1309
- path: _path + ".ranges[" + _index4 + "][1]",
1310
- expected: "number & Minimum<0>",
1311
- value: elem[1]
1312
- }, errorFactory)) || $guard(_exceptionable, {
1313
- path: _path + ".ranges[" + _index4 + "][1]",
1314
- expected: "(number & Minimum<0>)",
1315
- value: elem[1]
1316
- }, errorFactory))) || $guard(_exceptionable, {
1317
- path: _path + ".ranges[" + _index4 + "]",
1318
- expected: "[start: number & Minimum<0>, end: number & Minimum<0>]",
1319
- value: elem
1320
- }, errorFactory)) || $guard(_exceptionable, {
1321
- path: _path + ".ranges",
1322
- expected: "Array<[start: number & Minimum<0>, end: number & Minimum<0>]>",
1323
- value: input.ranges
1324
- }, errorFactory)) && (undefined === input.progress || "number" === typeof input.progress && (0 <= input.progress || $guard(_exceptionable, {
1325
- path: _path + ".progress",
1326
- expected: "number & Minimum<0>",
1327
- value: input.progress
1328
- }, errorFactory)) && (input.progress <= 1 || $guard(_exceptionable, {
1329
- path: _path + ".progress",
1330
- expected: "number & Maximum<1>",
1331
- value: input.progress
1332
- }, errorFactory)) || $guard(_exceptionable, {
1333
- path: _path + ".progress",
1334
- expected: "((number & Minimum<0> & Maximum<1>) | undefined)",
1335
- value: input.progress
1336
- }, errorFactory)) && (undefined === input.speed || "number" === typeof input.speed && (0 <= input.speed || $guard(_exceptionable, {
1337
- path: _path + ".speed",
1338
- expected: "number & Minimum<0>",
1339
- value: input.speed
1340
- }, errorFactory)) || $guard(_exceptionable, {
1341
- path: _path + ".speed",
1342
- expected: "((number & Minimum<0>) | undefined)",
1343
- value: input.speed
1344
- }, errorFactory)) && ("string" === typeof input.id && (/^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.id) || $guard(_exceptionable, {
1345
- path: _path + ".id",
1346
- expected: "string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">",
1347
- value: input.id
1348
- }, errorFactory)) || $guard(_exceptionable, {
1349
- path: _path + ".id",
1350
- expected: "(string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">)",
1351
- value: input.id
1352
- }, errorFactory)) && (null === input.size || "number" === typeof input.size && (0 <= input.size || $guard(_exceptionable, {
1353
- path: _path + ".size",
1354
- expected: "number & Minimum<0>",
1355
- value: input.size
1356
- }, errorFactory)) && (Math.floor(input.size) === input.size && 0 <= input.size && input.size <= 18446744073709552000 || $guard(_exceptionable, {
1357
- path: _path + ".size",
1358
- expected: "number & Type<\"uint64\">",
1359
- value: input.size
1360
- }, errorFactory)) || $guard(_exceptionable, {
1361
- path: _path + ".size",
1362
- expected: "((number & Minimum<0> & Type<\"uint64\">) | null)",
1363
- value: input.size
1364
- }, errorFactory)) && ("boolean" === typeof input.seekable || $guard(_exceptionable, {
1365
- path: _path + ".seekable",
1366
- expected: "boolean",
1367
- value: input.seekable
1368
- }, errorFactory)) && ("boolean" === typeof input.deleted || $guard(_exceptionable, {
1369
- path: _path + ".deleted",
1370
- expected: "boolean",
1371
- value: input.deleted
1372
- }, errorFactory)) && ((Array.isArray(input.refs) || $guard(_exceptionable, {
1373
- path: _path + ".refs",
1374
- expected: "FileRefs",
1375
- value: input.refs
1376
- }, errorFactory)) && input.refs.every((elem, _index5) => ("object" === typeof elem && null !== elem && false === Array.isArray(elem) || $guard(_exceptionable, {
1377
- path: _path + ".refs[" + _index5 + "]",
1378
- expected: "FileRef",
1379
- value: elem
1380
- }, errorFactory)) && $ao1(elem, _path + ".refs[" + _index5 + "]", true && _exceptionable) || $guard(_exceptionable, {
1381
- path: _path + ".refs[" + _index5 + "]",
1382
- expected: "FileRef",
1383
- value: elem
1384
- }, errorFactory)) || $guard(_exceptionable, {
1385
- path: _path + ".refs",
1386
- expected: "FileRefs",
1387
- value: input.refs
1388
- }, errorFactory)) && ((Array.isArray(input.tags) || $guard(_exceptionable, {
1389
- path: _path + ".tags",
1390
- expected: "Array<string>",
1391
- value: input.tags
1392
- }, errorFactory)) && input.tags.every((elem, _index6) => "string" === typeof elem || $guard(_exceptionable, {
1393
- path: _path + ".tags[" + _index6 + "]",
1394
- expected: "string",
1395
- value: elem
1396
- }, errorFactory)) || $guard(_exceptionable, {
1397
- path: _path + ".tags",
1398
- expected: "Array<string>",
1399
- value: input.tags
1400
- }, errorFactory)) && ("string" === typeof input.resumable || $guard(_exceptionable, {
1401
- path: _path + ".resumable",
1402
- expected: "string",
1403
- value: input.resumable
1404
- }, errorFactory)) && ("string" === typeof input.mimeType || $guard(_exceptionable, {
1405
- path: _path + ".mimeType",
1406
- expected: "string",
1407
- value: input.mimeType
1408
- }, errorFactory)) && ("string" === typeof input.encoding || $guard(_exceptionable, {
1409
- path: _path + ".encoding",
1410
- expected: "string",
1411
- value: input.encoding
1412
- }, errorFactory)) && ("string" === typeof input.hash && (/^([A-Fa-f0-9]{32})?$/.test(input.hash) || $guard(_exceptionable, {
1413
- path: _path + ".hash",
1414
- expected: "string & Pattern<\"^([A-Fa-f0-9]{32})?$\">",
1415
- value: input.hash
1416
- }, errorFactory)) || $guard(_exceptionable, {
1417
- path: _path + ".hash",
1418
- expected: "(string & Pattern<\"^([A-Fa-f0-9]{32})?$\">)",
1419
- value: input.hash
1420
- }, errorFactory)) && ("number" === typeof input.btime && (0 <= input.btime || $guard(_exceptionable, {
1421
- path: _path + ".btime",
1422
- expected: "number & Minimum<0>",
1423
- value: input.btime
1424
- }, errorFactory)) && (Math.floor(input.btime) === input.btime && 0 <= input.btime && input.btime <= 18446744073709552000 || $guard(_exceptionable, {
1425
- path: _path + ".btime",
1426
- expected: "number & Type<\"uint64\">",
1427
- value: input.btime
1428
- }, errorFactory)) || $guard(_exceptionable, {
1429
- path: _path + ".btime",
1430
- expected: "(number & Minimum<0> & Type<\"uint64\">)",
1431
- value: input.btime
1432
- }, errorFactory)) && ("boolean" === typeof input.completed || $guard(_exceptionable, {
1433
- path: _path + ".completed",
1434
- expected: "boolean",
1435
- value: input.completed
1436
- }, errorFactory)) && ((undefined !== input.error || $guard(_exceptionable, {
1437
- path: _path + ".error",
1438
- expected: "(Array<NxtError> | NxtError | null)",
1439
- value: input.error
1440
- }, errorFactory)) && (null === input.error || (Array.isArray(input.error) && input.error.every((elem, _index7) => ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
1441
- path: _path + ".error[" + _index7 + "]",
1442
- expected: "NxtError",
1443
- value: elem
1444
- }, errorFactory)) && $ao2(elem, _path + ".error[" + _index7 + "]", true && _exceptionable) || $guard(_exceptionable, {
1445
- path: _path + ".error[" + _index7 + "]",
1446
- expected: "NxtError",
1447
- value: elem
1448
- }, errorFactory)) || "object" === typeof input.error && null !== input.error && $ao2(input.error, _path + ".error", true && _exceptionable) || $guard(_exceptionable, {
1449
- path: _path + ".error",
1450
- expected: "(Array<NxtError> | NxtError | null)",
1451
- value: input.error
1452
- }, errorFactory)) || $guard(_exceptionable, {
1453
- path: _path + ".error",
1454
- expected: "(Array<NxtError> | NxtError | null)",
1455
- value: input.error
1456
- }, errorFactory)));
1457
- const $ao1 = (input, _path, _exceptionable = true) => (undefined === input.file || "string" === typeof input.file || $guard(_exceptionable, {
1458
- path: _path + ".file",
1459
- expected: "(string | undefined)",
1460
- value: input.file
1461
- }, errorFactory)) && (undefined === input.offset || "number" === typeof input.offset || $guard(_exceptionable, {
1462
- path: _path + ".offset",
1463
- expected: "(number | undefined)",
1464
- value: input.offset
1465
- }, errorFactory)) && (undefined === input.start || "number" === typeof input.start || $guard(_exceptionable, {
1466
- path: _path + ".start",
1467
- expected: "(number | undefined)",
1468
- value: input.start
1469
- }, errorFactory)) && (undefined === input.end || "number" === typeof input.end || $guard(_exceptionable, {
1470
- path: _path + ".end",
1471
- expected: "(number | undefined)",
1472
- value: input.end
1473
- }, errorFactory));
1474
- const $ao2 = (input, _path, _exceptionable = true) => ("string" === typeof input.message || $guard(_exceptionable, {
1475
- path: _path + ".message",
1476
- expected: "string",
1477
- value: input.message
1478
- }, errorFactory)) && (undefined === input.type || "string" === typeof input.type || $guard(_exceptionable, {
1479
- path: _path + ".type",
1480
- expected: "(string | undefined)",
1481
- value: input.type
1482
- }, errorFactory)) && (undefined === input.code || "string" === typeof input.code || $guard(_exceptionable, {
1483
- path: _path + ".code",
1484
- expected: "(string | undefined)",
1485
- value: input.code
1486
- }, errorFactory)) && (undefined === input.exitCode || "number" === typeof input.exitCode || $guard(_exceptionable, {
1487
- path: _path + ".exitCode",
1488
- expected: "(number | undefined)",
1489
- value: input.exitCode
1490
- }, errorFactory)) && (undefined === input.signalCode || "number" === typeof input.signalCode || $guard(_exceptionable, {
1491
- path: _path + ".signalCode",
1492
- expected: "(number | undefined)",
1493
- value: input.signalCode
1494
- }, errorFactory)) && (undefined === input.statusCode || "number" === typeof input.statusCode || $guard(_exceptionable, {
1495
- path: _path + ".statusCode",
1496
- expected: "(number | undefined)",
1497
- value: input.statusCode
1498
- }, errorFactory)) && (undefined === input.headers || ("object" === typeof input.headers && null !== input.headers && false === Array.isArray(input.headers) || $guard(_exceptionable, {
1499
- path: _path + ".headers",
1500
- expected: "(Record<string, string> | undefined)",
1501
- value: input.headers
1502
- }, errorFactory)) && $ao3(input.headers, _path + ".headers", true && _exceptionable) || $guard(_exceptionable, {
1503
- path: _path + ".headers",
1504
- expected: "(Record<string, string> | undefined)",
1505
- value: input.headers
1506
- }, errorFactory)) && (undefined === input.data || ("object" === typeof input.data && null !== input.data && false === Array.isArray(input.data) || $guard(_exceptionable, {
1507
- path: _path + ".data",
1508
- expected: "(object | undefined)",
1509
- value: input.data
1510
- }, errorFactory)) && $ao4(input.data, _path + ".data", true && _exceptionable) || $guard(_exceptionable, {
1511
- path: _path + ".data",
1512
- expected: "(object | undefined)",
1513
- value: input.data
1514
- }, errorFactory)) && (null === input.cause || undefined === input.cause || ("object" === typeof input.cause && null !== input.cause || $guard(_exceptionable, {
1515
- path: _path + ".cause",
1516
- expected: "(NxtError | null | undefined)",
1517
- value: input.cause
1518
- }, errorFactory)) && $ao2(input.cause, _path + ".cause", true && _exceptionable) || $guard(_exceptionable, {
1519
- path: _path + ".cause",
1520
- expected: "(NxtError | null | undefined)",
1521
- value: input.cause
1522
- }, errorFactory)) && (null === input.errors || undefined === input.errors || (Array.isArray(input.errors) || $guard(_exceptionable, {
1523
- path: _path + ".errors",
1524
- expected: "(Array<NxtError> | null | undefined)",
1525
- value: input.errors
1526
- }, errorFactory)) && input.errors.every((elem, _index8) => ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
1527
- path: _path + ".errors[" + _index8 + "]",
1528
- expected: "NxtError",
1529
- value: elem
1530
- }, errorFactory)) && $ao2(elem, _path + ".errors[" + _index8 + "]", true && _exceptionable) || $guard(_exceptionable, {
1531
- path: _path + ".errors[" + _index8 + "]",
1532
- expected: "NxtError",
1533
- value: elem
1534
- }, errorFactory)) || $guard(_exceptionable, {
1535
- path: _path + ".errors",
1536
- expected: "(Array<NxtError> | null | undefined)",
1537
- value: input.errors
1538
- }, errorFactory));
1539
- const $ao3 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every(key => {
1540
- const value = input[key];
1541
- if (undefined === value)
1542
- return true;
1543
- return "string" === typeof value || $guard(_exceptionable, {
1544
- path: _path + $join(key),
1545
- expected: "string",
1546
- value: value
1547
- }, errorFactory);
1548
- });
1549
- const $ao4 = (input, _path, _exceptionable = true) => true;
1550
- return ("object" === typeof input && null !== input || $guard(true, {
1551
- path: _path + "",
1552
- expected: "FileStats",
1553
- value: input
1554
- }, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
1555
- path: _path + "",
1556
- expected: "FileStats",
1557
- value: input
1558
- }, errorFactory);
1559
- })(input, "$input", true);
1560
- return input;
1561
- };
1562
- export const randomFileDomainStatsRecord = generator => {
1563
- const $generator = __typia.createRandom.generator;
1564
- const $pick = __typia.createRandom.pick;
1565
- const $ro0 = (_recursive = false, _depth = 0) => ({
1566
- position: $pick([
1567
- () => null,
1568
- () => (generator?.customs ?? $generator.customs)?.number?.([
1569
- {
1570
- name: "Minimum<0>",
1571
- kind: "minimum",
1572
- value: 0
1573
- },
1574
- {
1575
- name: "Type<\"uint64\">",
1576
- kind: "type",
1577
- value: "uint64"
1578
- }
1579
- ]) ?? (generator?.integer ?? $generator.integer)(0, 10)
1580
- ])(),
1581
- uploading: $pick([
1582
- () => null,
1583
- () => (generator?.boolean ?? $generator.boolean)()
1584
- ])(),
1585
- zones: (generator?.array ?? $generator.array)(() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()),
1586
- replicas: (generator?.array ?? $generator.array)(() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()),
1587
- locations: (generator?.array ?? $generator.array)(() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()),
1588
- ranges: (generator?.array ?? $generator.array)(() => [
1589
- (generator?.customs ?? $generator.customs)?.number?.([
1590
- {
1591
- name: "Minimum<0>",
1592
- kind: "minimum",
1593
- value: 0
1594
- }
1595
- ]) ?? (generator?.number ?? $generator.number)(0, 10),
1596
- (generator?.customs ?? $generator.customs)?.number?.([
1597
- {
1598
- name: "Minimum<0>",
1599
- kind: "minimum",
1600
- value: 0
1601
- }
1602
- ]) ?? (generator?.number ?? $generator.number)(0, 10)
1603
- ]),
1604
- progress: $pick([
1605
- () => undefined,
1606
- () => (generator?.customs ?? $generator.customs)?.number?.([
1607
- {
1608
- name: "Minimum<0>",
1609
- kind: "minimum",
1610
- value: 0
1611
- },
1612
- {
1613
- name: "Maximum<1>",
1614
- kind: "maximum",
1615
- value: 1
1616
- }
1617
- ]) ?? (generator?.number ?? $generator.number)(0, 1)
1618
- ])(),
1619
- speed: $pick([
1620
- () => undefined,
1621
- () => (generator?.customs ?? $generator.customs)?.number?.([
1622
- {
1623
- name: "Minimum<0>",
1624
- kind: "minimum",
1625
- value: 0
1626
- }
1627
- ]) ?? (generator?.number ?? $generator.number)(0, 10)
1628
- ])(),
1629
- id: (generator?.customs ?? $generator.customs)?.string?.([
1630
- {
1631
- name: "Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">",
1632
- kind: "pattern",
1633
- value: "^[0-9A-Za-z~][0-9A-Za-z~._: -]*$"
1634
- }
1635
- ]) ?? (generator?.pattern ?? $generator.pattern)(/^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/),
1636
- size: $pick([
1637
- () => null,
1638
- () => (generator?.customs ?? $generator.customs)?.number?.([
1639
- {
1640
- name: "Minimum<0>",
1641
- kind: "minimum",
1642
- value: 0
1643
- },
1644
- {
1645
- name: "Type<\"uint64\">",
1646
- kind: "type",
1647
- value: "uint64"
1648
- }
1649
- ]) ?? (generator?.integer ?? $generator.integer)(0, 10)
1650
- ])(),
1651
- seekable: (generator?.boolean ?? $generator.boolean)(),
1652
- deleted: (generator?.boolean ?? $generator.boolean)(),
1653
- refs: (generator?.array ?? $generator.array)(() => $ro1(_recursive, _recursive ? 1 + _depth : _depth)),
1654
- tags: (generator?.array ?? $generator.array)(() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()),
1655
- resumable: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
1656
- mimeType: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
1657
- encoding: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
1658
- hash: (generator?.customs ?? $generator.customs)?.string?.([
1659
- {
1660
- name: "Pattern<\"^([A-Fa-f0-9]{32})?$\">",
1661
- kind: "pattern",
1662
- value: "^([A-Fa-f0-9]{32})?$"
1663
- }
1664
- ]) ?? (generator?.pattern ?? $generator.pattern)(/^([A-Fa-f0-9]{32})?$/),
1665
- btime: (generator?.customs ?? $generator.customs)?.number?.([
1666
- {
1667
- name: "Minimum<0>",
1668
- kind: "minimum",
1669
- value: 0
1670
- },
1671
- {
1672
- name: "Type<\"uint64\">",
1673
- kind: "type",
1674
- value: "uint64"
1675
- }
1676
- ]) ?? (generator?.integer ?? $generator.integer)(0, 10),
1677
- completed: (generator?.boolean ?? $generator.boolean)(),
1678
- error: $pick([
1679
- () => null,
1680
- () => (generator?.array ?? $generator.array)(() => $ro2(_recursive, _recursive ? 1 + _depth : _depth)),
1681
- () => $ro2(_recursive, _recursive ? 1 + _depth : _depth)
1682
- ])()
1683
- });
1684
- const $ro1 = (_recursive = false, _depth = 0) => ({
1685
- file: $pick([
1686
- () => undefined,
1687
- () => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
1688
- ])(),
1689
- offset: $pick([
1690
- () => undefined,
1691
- () => (generator?.customs ?? $generator.customs)?.number?.([]) ?? (generator?.number ?? $generator.number)(0, 100)
1692
- ])(),
1693
- start: $pick([
1694
- () => undefined,
1695
- () => (generator?.customs ?? $generator.customs)?.number?.([]) ?? (generator?.number ?? $generator.number)(0, 100)
1696
- ])(),
1697
- end: $pick([
1698
- () => undefined,
1699
- () => (generator?.customs ?? $generator.customs)?.number?.([]) ?? (generator?.number ?? $generator.number)(0, 100)
1700
- ])()
1701
- });
1702
- const $ro2 = (_recursive = true, _depth = 0) => ({
1703
- message: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
1704
- type: $pick([
1705
- () => undefined,
1706
- () => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
1707
- ])(),
1708
- code: $pick([
1709
- () => undefined,
1710
- () => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
1711
- ])(),
1712
- exitCode: $pick([
1713
- () => undefined,
1714
- () => (generator?.customs ?? $generator.customs)?.number?.([]) ?? (generator?.number ?? $generator.number)(0, 100)
1715
- ])(),
1716
- signalCode: $pick([
1717
- () => undefined,
1718
- () => (generator?.customs ?? $generator.customs)?.number?.([]) ?? (generator?.number ?? $generator.number)(0, 100)
1719
- ])(),
1720
- statusCode: $pick([
1721
- () => undefined,
1722
- () => (generator?.customs ?? $generator.customs)?.number?.([]) ?? (generator?.number ?? $generator.number)(0, 100)
1723
- ])(),
1724
- headers: $pick([
1725
- () => undefined,
1726
- () => $ro3(true, _recursive ? 1 + _depth : _depth)
1727
- ])(),
1728
- data: $pick([
1729
- () => undefined,
1730
- () => $ro4(true, _recursive ? 1 + _depth : _depth)
1731
- ])(),
1732
- cause: $pick([
1733
- () => undefined,
1734
- () => null,
1735
- () => $ro2(true, _recursive ? 1 + _depth : _depth)
1736
- ])(),
1737
- errors: $pick([
1738
- () => undefined,
1739
- () => null,
1740
- () => _recursive && 5 < _depth ? [] : 5 >= _depth ? (generator?.array ?? $generator.array)(() => $ro2(true, _recursive ? 1 + _depth : _depth)) : []
1741
- ])()
1742
- });
1743
- const $ro3 = (_recursive = false, _depth = 0) => {
1744
- const output = {};
1745
- (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));
1746
- return output;
1747
- };
1748
- const $ro4 = (_recursive = false, _depth = 0) => {};
1749
- return $ro0();
1750
- };
1751
- export const assertGuardFileDomainStatsRecord = (input, errorFactory) => {
1752
- const __is = input => {
1753
- const $io0 = input => (null === input.position || "number" === typeof input.position && (0 <= input.position && (Math.floor(input.position) === input.position && 0 <= input.position && input.position <= 18446744073709552000))) && (null === input.uploading || "boolean" === typeof input.uploading) && (Array.isArray(input.zones) && input.zones.every(elem => "string" === typeof elem)) && (Array.isArray(input.replicas) && input.replicas.every(elem => "string" === typeof elem)) && (Array.isArray(input.locations) && input.locations.every(elem => "string" === typeof elem)) && (Array.isArray(input.ranges) && input.ranges.every(elem => Array.isArray(elem) && (elem.length === 2 && ("number" === typeof elem[0] && 0 <= elem[0]) && ("number" === typeof elem[1] && 0 <= elem[1])))) && (undefined === input.progress || "number" === typeof input.progress && (0 <= input.progress && input.progress <= 1)) && (undefined === input.speed || "number" === typeof input.speed && 0 <= input.speed) && ("string" === typeof input.id && /^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.id)) && (null === input.size || "number" === typeof input.size && (0 <= input.size && (Math.floor(input.size) === input.size && 0 <= input.size && input.size <= 18446744073709552000))) && "boolean" === typeof input.seekable && "boolean" === typeof input.deleted && (Array.isArray(input.refs) && input.refs.every(elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && $io1(elem))) && (Array.isArray(input.tags) && input.tags.every(elem => "string" === typeof elem)) && "string" === typeof input.resumable && "string" === typeof input.mimeType && "string" === typeof input.encoding && ("string" === typeof input.hash && /^([A-Fa-f0-9]{32})?$/.test(input.hash)) && ("number" === typeof input.btime && (0 <= input.btime && (Math.floor(input.btime) === input.btime && 0 <= input.btime && input.btime <= 18446744073709552000))) && "boolean" === typeof input.completed && (undefined !== input.error && (null === input.error || (Array.isArray(input.error) && input.error.every(elem => "object" === typeof elem && null !== elem && $io2(elem)) || "object" === typeof input.error && null !== input.error && $io2(input.error))));
1754
- const $io1 = input => (undefined === input.file || "string" === typeof input.file) && (undefined === input.offset || "number" === typeof input.offset) && (undefined === input.start || "number" === typeof input.start) && (undefined === input.end || "number" === typeof input.end);
1755
- const $io2 = 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) && $io3(input.headers)) && (undefined === input.data || "object" === typeof input.data && null !== input.data && false === Array.isArray(input.data) && $io4(input.data)) && (null === input.cause || undefined === input.cause || "object" === typeof input.cause && null !== input.cause && $io2(input.cause)) && (null === input.errors || undefined === input.errors || Array.isArray(input.errors) && input.errors.every(elem => "object" === typeof elem && null !== elem && $io2(elem)));
1756
- const $io3 = input => Object.keys(input).every(key => {
1757
- const value = input[key];
1758
- if (undefined === value)
1759
- return true;
1760
- return "string" === typeof value;
1761
- });
1762
- const $io4 = input => true;
1763
- return "object" === typeof input && null !== input && $io0(input);
1764
- };
1765
- if (false === __is(input))
1766
- ((input, _path, _exceptionable = true) => {
1767
- const $guard = __typia.createAssertGuard.guard;
1768
- const $join = __typia.createAssertGuard.join;
1769
- const $ao0 = (input, _path, _exceptionable = true) => (null === input.position || "number" === typeof input.position && (0 <= input.position || $guard(_exceptionable, {
1770
- path: _path + ".position",
1771
- expected: "number & Minimum<0>",
1772
- value: input.position
1773
- }, errorFactory)) && (Math.floor(input.position) === input.position && 0 <= input.position && input.position <= 18446744073709552000 || $guard(_exceptionable, {
1774
- path: _path + ".position",
1775
- expected: "number & Type<\"uint64\">",
1776
- value: input.position
1777
- }, errorFactory)) || $guard(_exceptionable, {
1778
- path: _path + ".position",
1779
- expected: "((number & Minimum<0> & Type<\"uint64\">) | null)",
1780
- value: input.position
1781
- }, errorFactory)) && (null === input.uploading || "boolean" === typeof input.uploading || $guard(_exceptionable, {
1782
- path: _path + ".uploading",
1783
- expected: "(boolean | null)",
1784
- value: input.uploading
1785
- }, errorFactory)) && ((Array.isArray(input.zones) || $guard(_exceptionable, {
1786
- path: _path + ".zones",
1787
- expected: "Array<string>",
1788
- value: input.zones
1789
- }, errorFactory)) && input.zones.every((elem, _index1) => "string" === typeof elem || $guard(_exceptionable, {
1790
- path: _path + ".zones[" + _index1 + "]",
1791
- expected: "string",
1792
- value: elem
1793
- }, errorFactory)) || $guard(_exceptionable, {
1794
- path: _path + ".zones",
1795
- expected: "Array<string>",
1796
- value: input.zones
1797
- }, errorFactory)) && ((Array.isArray(input.replicas) || $guard(_exceptionable, {
1798
- path: _path + ".replicas",
1799
- expected: "Array<string>",
1800
- value: input.replicas
1801
- }, errorFactory)) && input.replicas.every((elem, _index2) => "string" === typeof elem || $guard(_exceptionable, {
1802
- path: _path + ".replicas[" + _index2 + "]",
1803
- expected: "string",
1804
- value: elem
1805
- }, errorFactory)) || $guard(_exceptionable, {
1806
- path: _path + ".replicas",
1807
- expected: "Array<string>",
1808
- value: input.replicas
1809
- }, errorFactory)) && ((Array.isArray(input.locations) || $guard(_exceptionable, {
1810
- path: _path + ".locations",
1811
- expected: "Array<string>",
1812
- value: input.locations
1813
- }, errorFactory)) && input.locations.every((elem, _index3) => "string" === typeof elem || $guard(_exceptionable, {
1814
- path: _path + ".locations[" + _index3 + "]",
1815
- expected: "string",
1816
- value: elem
1817
- }, errorFactory)) || $guard(_exceptionable, {
1818
- path: _path + ".locations",
1819
- expected: "Array<string>",
1820
- value: input.locations
1821
- }, errorFactory)) && ((Array.isArray(input.ranges) || $guard(_exceptionable, {
1822
- path: _path + ".ranges",
1823
- expected: "Array<[start: number & Minimum<0>, end: number & Minimum<0>]>",
1824
- value: input.ranges
1825
- }, errorFactory)) && input.ranges.every((elem, _index4) => (Array.isArray(elem) || $guard(_exceptionable, {
1826
- path: _path + ".ranges[" + _index4 + "]",
1827
- expected: "[start: number & Minimum<0>, end: number & Minimum<0>]",
1828
- value: elem
1829
- }, errorFactory)) && ((elem.length === 2 || $guard(_exceptionable, {
1830
- path: _path + ".ranges[" + _index4 + "]",
1831
- expected: "[(number & Minimum<0>), (number & Minimum<0>)]",
1832
- value: elem
1833
- }, errorFactory)) && ("number" === typeof elem[0] && (0 <= elem[0] || $guard(_exceptionable, {
1834
- path: _path + ".ranges[" + _index4 + "][0]",
1835
- expected: "number & Minimum<0>",
1836
- value: elem[0]
1837
- }, errorFactory)) || $guard(_exceptionable, {
1838
- path: _path + ".ranges[" + _index4 + "][0]",
1839
- expected: "(number & Minimum<0>)",
1840
- value: elem[0]
1841
- }, errorFactory)) && ("number" === typeof elem[1] && (0 <= elem[1] || $guard(_exceptionable, {
1842
- path: _path + ".ranges[" + _index4 + "][1]",
1843
- expected: "number & Minimum<0>",
1844
- value: elem[1]
1845
- }, errorFactory)) || $guard(_exceptionable, {
1846
- path: _path + ".ranges[" + _index4 + "][1]",
1847
- expected: "(number & Minimum<0>)",
1848
- value: elem[1]
1849
- }, errorFactory))) || $guard(_exceptionable, {
1850
- path: _path + ".ranges[" + _index4 + "]",
1851
- expected: "[start: number & Minimum<0>, end: number & Minimum<0>]",
1852
- value: elem
1853
- }, errorFactory)) || $guard(_exceptionable, {
1854
- path: _path + ".ranges",
1855
- expected: "Array<[start: number & Minimum<0>, end: number & Minimum<0>]>",
1856
- value: input.ranges
1857
- }, errorFactory)) && (undefined === input.progress || "number" === typeof input.progress && (0 <= input.progress || $guard(_exceptionable, {
1858
- path: _path + ".progress",
1859
- expected: "number & Minimum<0>",
1860
- value: input.progress
1861
- }, errorFactory)) && (input.progress <= 1 || $guard(_exceptionable, {
1862
- path: _path + ".progress",
1863
- expected: "number & Maximum<1>",
1864
- value: input.progress
1865
- }, errorFactory)) || $guard(_exceptionable, {
1866
- path: _path + ".progress",
1867
- expected: "((number & Minimum<0> & Maximum<1>) | undefined)",
1868
- value: input.progress
1869
- }, errorFactory)) && (undefined === input.speed || "number" === typeof input.speed && (0 <= input.speed || $guard(_exceptionable, {
1870
- path: _path + ".speed",
1871
- expected: "number & Minimum<0>",
1872
- value: input.speed
1873
- }, errorFactory)) || $guard(_exceptionable, {
1874
- path: _path + ".speed",
1875
- expected: "((number & Minimum<0>) | undefined)",
1876
- value: input.speed
1877
- }, errorFactory)) && ("string" === typeof input.id && (/^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.id) || $guard(_exceptionable, {
1878
- path: _path + ".id",
1879
- expected: "string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">",
1880
- value: input.id
1881
- }, errorFactory)) || $guard(_exceptionable, {
1882
- path: _path + ".id",
1883
- expected: "(string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">)",
1884
- value: input.id
1885
- }, errorFactory)) && (null === input.size || "number" === typeof input.size && (0 <= input.size || $guard(_exceptionable, {
1886
- path: _path + ".size",
1887
- expected: "number & Minimum<0>",
1888
- value: input.size
1889
- }, errorFactory)) && (Math.floor(input.size) === input.size && 0 <= input.size && input.size <= 18446744073709552000 || $guard(_exceptionable, {
1890
- path: _path + ".size",
1891
- expected: "number & Type<\"uint64\">",
1892
- value: input.size
1893
- }, errorFactory)) || $guard(_exceptionable, {
1894
- path: _path + ".size",
1895
- expected: "((number & Minimum<0> & Type<\"uint64\">) | null)",
1896
- value: input.size
1897
- }, errorFactory)) && ("boolean" === typeof input.seekable || $guard(_exceptionable, {
1898
- path: _path + ".seekable",
1899
- expected: "boolean",
1900
- value: input.seekable
1901
- }, errorFactory)) && ("boolean" === typeof input.deleted || $guard(_exceptionable, {
1902
- path: _path + ".deleted",
1903
- expected: "boolean",
1904
- value: input.deleted
1905
- }, errorFactory)) && ((Array.isArray(input.refs) || $guard(_exceptionable, {
1906
- path: _path + ".refs",
1907
- expected: "FileRefs",
1908
- value: input.refs
1909
- }, errorFactory)) && input.refs.every((elem, _index5) => ("object" === typeof elem && null !== elem && false === Array.isArray(elem) || $guard(_exceptionable, {
1910
- path: _path + ".refs[" + _index5 + "]",
1911
- expected: "FileRef",
1912
- value: elem
1913
- }, errorFactory)) && $ao1(elem, _path + ".refs[" + _index5 + "]", true && _exceptionable) || $guard(_exceptionable, {
1914
- path: _path + ".refs[" + _index5 + "]",
1915
- expected: "FileRef",
1916
- value: elem
1917
- }, errorFactory)) || $guard(_exceptionable, {
1918
- path: _path + ".refs",
1919
- expected: "FileRefs",
1920
- value: input.refs
1921
- }, errorFactory)) && ((Array.isArray(input.tags) || $guard(_exceptionable, {
1922
- path: _path + ".tags",
1923
- expected: "Array<string>",
1924
- value: input.tags
1925
- }, errorFactory)) && input.tags.every((elem, _index6) => "string" === typeof elem || $guard(_exceptionable, {
1926
- path: _path + ".tags[" + _index6 + "]",
1927
- expected: "string",
1928
- value: elem
1929
- }, errorFactory)) || $guard(_exceptionable, {
1930
- path: _path + ".tags",
1931
- expected: "Array<string>",
1932
- value: input.tags
1933
- }, errorFactory)) && ("string" === typeof input.resumable || $guard(_exceptionable, {
1934
- path: _path + ".resumable",
1935
- expected: "string",
1936
- value: input.resumable
1937
- }, errorFactory)) && ("string" === typeof input.mimeType || $guard(_exceptionable, {
1938
- path: _path + ".mimeType",
1939
- expected: "string",
1940
- value: input.mimeType
1941
- }, errorFactory)) && ("string" === typeof input.encoding || $guard(_exceptionable, {
1942
- path: _path + ".encoding",
1943
- expected: "string",
1944
- value: input.encoding
1945
- }, errorFactory)) && ("string" === typeof input.hash && (/^([A-Fa-f0-9]{32})?$/.test(input.hash) || $guard(_exceptionable, {
1946
- path: _path + ".hash",
1947
- expected: "string & Pattern<\"^([A-Fa-f0-9]{32})?$\">",
1948
- value: input.hash
1949
- }, errorFactory)) || $guard(_exceptionable, {
1950
- path: _path + ".hash",
1951
- expected: "(string & Pattern<\"^([A-Fa-f0-9]{32})?$\">)",
1952
- value: input.hash
1953
- }, errorFactory)) && ("number" === typeof input.btime && (0 <= input.btime || $guard(_exceptionable, {
1954
- path: _path + ".btime",
1955
- expected: "number & Minimum<0>",
1956
- value: input.btime
1957
- }, errorFactory)) && (Math.floor(input.btime) === input.btime && 0 <= input.btime && input.btime <= 18446744073709552000 || $guard(_exceptionable, {
1958
- path: _path + ".btime",
1959
- expected: "number & Type<\"uint64\">",
1960
- value: input.btime
1961
- }, errorFactory)) || $guard(_exceptionable, {
1962
- path: _path + ".btime",
1963
- expected: "(number & Minimum<0> & Type<\"uint64\">)",
1964
- value: input.btime
1965
- }, errorFactory)) && ("boolean" === typeof input.completed || $guard(_exceptionable, {
1966
- path: _path + ".completed",
1967
- expected: "boolean",
1968
- value: input.completed
1969
- }, errorFactory)) && ((undefined !== input.error || $guard(_exceptionable, {
1970
- path: _path + ".error",
1971
- expected: "(Array<NxtError> | NxtError | null)",
1972
- value: input.error
1973
- }, errorFactory)) && (null === input.error || (Array.isArray(input.error) && input.error.every((elem, _index7) => ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
1974
- path: _path + ".error[" + _index7 + "]",
1975
- expected: "NxtError",
1976
- value: elem
1977
- }, errorFactory)) && $ao2(elem, _path + ".error[" + _index7 + "]", true && _exceptionable) || $guard(_exceptionable, {
1978
- path: _path + ".error[" + _index7 + "]",
1979
- expected: "NxtError",
1980
- value: elem
1981
- }, errorFactory)) || "object" === typeof input.error && null !== input.error && $ao2(input.error, _path + ".error", true && _exceptionable) || $guard(_exceptionable, {
1982
- path: _path + ".error",
1983
- expected: "(Array<NxtError> | NxtError | null)",
1984
- value: input.error
1985
- }, errorFactory)) || $guard(_exceptionable, {
1986
- path: _path + ".error",
1987
- expected: "(Array<NxtError> | NxtError | null)",
1988
- value: input.error
1989
- }, errorFactory)));
1990
- const $ao1 = (input, _path, _exceptionable = true) => (undefined === input.file || "string" === typeof input.file || $guard(_exceptionable, {
1991
- path: _path + ".file",
1992
- expected: "(string | undefined)",
1993
- value: input.file
1994
- }, errorFactory)) && (undefined === input.offset || "number" === typeof input.offset || $guard(_exceptionable, {
1995
- path: _path + ".offset",
1996
- expected: "(number | undefined)",
1997
- value: input.offset
1998
- }, errorFactory)) && (undefined === input.start || "number" === typeof input.start || $guard(_exceptionable, {
1999
- path: _path + ".start",
2000
- expected: "(number | undefined)",
2001
- value: input.start
2002
- }, errorFactory)) && (undefined === input.end || "number" === typeof input.end || $guard(_exceptionable, {
2003
- path: _path + ".end",
2004
- expected: "(number | undefined)",
2005
- value: input.end
2006
- }, errorFactory));
2007
- const $ao2 = (input, _path, _exceptionable = true) => ("string" === typeof input.message || $guard(_exceptionable, {
2008
- path: _path + ".message",
2009
- expected: "string",
2010
- value: input.message
2011
- }, errorFactory)) && (undefined === input.type || "string" === typeof input.type || $guard(_exceptionable, {
2012
- path: _path + ".type",
2013
- expected: "(string | undefined)",
2014
- value: input.type
2015
- }, errorFactory)) && (undefined === input.code || "string" === typeof input.code || $guard(_exceptionable, {
2016
- path: _path + ".code",
2017
- expected: "(string | undefined)",
2018
- value: input.code
2019
- }, errorFactory)) && (undefined === input.exitCode || "number" === typeof input.exitCode || $guard(_exceptionable, {
2020
- path: _path + ".exitCode",
2021
- expected: "(number | undefined)",
2022
- value: input.exitCode
2023
- }, errorFactory)) && (undefined === input.signalCode || "number" === typeof input.signalCode || $guard(_exceptionable, {
2024
- path: _path + ".signalCode",
2025
- expected: "(number | undefined)",
2026
- value: input.signalCode
2027
- }, errorFactory)) && (undefined === input.statusCode || "number" === typeof input.statusCode || $guard(_exceptionable, {
2028
- path: _path + ".statusCode",
2029
- expected: "(number | undefined)",
2030
- value: input.statusCode
2031
- }, errorFactory)) && (undefined === input.headers || ("object" === typeof input.headers && null !== input.headers && false === Array.isArray(input.headers) || $guard(_exceptionable, {
2032
- path: _path + ".headers",
2033
- expected: "(Record<string, string> | undefined)",
2034
- value: input.headers
2035
- }, errorFactory)) && $ao3(input.headers, _path + ".headers", true && _exceptionable) || $guard(_exceptionable, {
2036
- path: _path + ".headers",
2037
- expected: "(Record<string, string> | undefined)",
2038
- value: input.headers
2039
- }, errorFactory)) && (undefined === input.data || ("object" === typeof input.data && null !== input.data && false === Array.isArray(input.data) || $guard(_exceptionable, {
2040
- path: _path + ".data",
2041
- expected: "(object | undefined)",
2042
- value: input.data
2043
- }, errorFactory)) && $ao4(input.data, _path + ".data", true && _exceptionable) || $guard(_exceptionable, {
2044
- path: _path + ".data",
2045
- expected: "(object | undefined)",
2046
- value: input.data
2047
- }, errorFactory)) && (null === input.cause || undefined === input.cause || ("object" === typeof input.cause && null !== input.cause || $guard(_exceptionable, {
2048
- path: _path + ".cause",
2049
- expected: "(NxtError | null | undefined)",
2050
- value: input.cause
2051
- }, errorFactory)) && $ao2(input.cause, _path + ".cause", true && _exceptionable) || $guard(_exceptionable, {
2052
- path: _path + ".cause",
2053
- expected: "(NxtError | null | undefined)",
2054
- value: input.cause
2055
- }, errorFactory)) && (null === input.errors || undefined === input.errors || (Array.isArray(input.errors) || $guard(_exceptionable, {
2056
- path: _path + ".errors",
2057
- expected: "(Array<NxtError> | null | undefined)",
2058
- value: input.errors
2059
- }, errorFactory)) && input.errors.every((elem, _index8) => ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
2060
- path: _path + ".errors[" + _index8 + "]",
2061
- expected: "NxtError",
2062
- value: elem
2063
- }, errorFactory)) && $ao2(elem, _path + ".errors[" + _index8 + "]", true && _exceptionable) || $guard(_exceptionable, {
2064
- path: _path + ".errors[" + _index8 + "]",
2065
- expected: "NxtError",
2066
- value: elem
2067
- }, errorFactory)) || $guard(_exceptionable, {
2068
- path: _path + ".errors",
2069
- expected: "(Array<NxtError> | null | undefined)",
2070
- value: input.errors
2071
- }, errorFactory));
2072
- const $ao3 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every(key => {
2073
- const value = input[key];
2074
- if (undefined === value)
2075
- return true;
2076
- return "string" === typeof value || $guard(_exceptionable, {
2077
- path: _path + $join(key),
2078
- expected: "string",
2079
- value: value
2080
- }, errorFactory);
2081
- });
2082
- const $ao4 = (input, _path, _exceptionable = true) => true;
2083
- return ("object" === typeof input && null !== input || $guard(true, {
2084
- path: _path + "",
2085
- expected: "FileStats",
2086
- value: input
2087
- }, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
2088
- path: _path + "",
2089
- expected: "FileStats",
2090
- value: input
2091
- }, errorFactory);
2092
- })(input, "$input", true);
2093
- };
2094
- export const stringifyFileDomainStatsRecord = input => {
2095
- const $io1 = input => (undefined === input.file || "string" === typeof input.file) && (undefined === input.offset || "number" === typeof input.offset) && (undefined === input.start || "number" === typeof input.start) && (undefined === input.end || "number" === typeof input.end);
2096
- const $io2 = 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) && $io3(input.headers)) && (undefined === input.data || "object" === typeof input.data && null !== input.data && false === Array.isArray(input.data) && $io4(input.data)) && (null === input.cause || undefined === input.cause || "object" === typeof input.cause && null !== input.cause && $io2(input.cause)) && (null === input.errors || undefined === input.errors || Array.isArray(input.errors) && input.errors.every(elem => "object" === typeof elem && null !== elem && $io2(elem)));
2097
- const $io3 = input => Object.keys(input).every(key => {
2098
- const value = input[key];
2099
- if (undefined === value)
2100
- return true;
2101
- return "string" === typeof value;
2102
- });
2103
- const $io4 = input => true;
2104
- const $string = __typia.json.createStringify.string;
2105
- const $throws = __typia.json.createStringify.throws;
2106
- const $tail = __typia.json.createStringify.tail;
2107
- const $so0 = input => `{${undefined === input.progress ? "" : `"progress":${undefined !== input.progress ? input.progress : undefined},`}${undefined === input.speed ? "" : `"speed":${undefined !== input.speed ? input.speed : undefined},`}"position":${null !== input.position ? input.position : "null"},"uploading":${null !== input.uploading ? input.uploading : "null"},"zones":${`[${input.zones.map(elem => $string(elem)).join(",")}]`},"replicas":${`[${input.replicas.map(elem => $string(elem)).join(",")}]`},"locations":${`[${input.locations.map(elem => $string(elem)).join(",")}]`},"ranges":${`[${input.ranges.map(elem => `[${elem[0]},${elem[1]}]`).join(",")}]`},"id":${$string(input.id)},"size":${null !== input.size ? input.size : "null"},"seekable":${input.seekable},"deleted":${input.deleted},"refs":${`[${input.refs.map(elem => $so1(elem)).join(",")}]`},"tags":${`[${input.tags.map(elem => $string(elem)).join(",")}]`},"resumable":${$string(input.resumable)},"mimeType":${$string(input.mimeType)},"encoding":${$string(input.encoding)},"hash":${$string(input.hash)},"btime":${input.btime},"completed":${input.completed},"error":${null !== input.error ? (() => {
2108
- if (Array.isArray(input.error))
2109
- return `[${input.error.map(elem => $so2(elem)).join(",")}]`;
2110
- if ("object" === typeof input.error && null !== input.error)
2111
- return $so2(input.error);
2112
- $throws({
2113
- expected: "(Array<NxtError> | NxtError | null)",
2114
- value: input.error
2115
- });
2116
- })() : "null"}}`;
2117
- const $so1 = input => `{${$tail(`${undefined === input.file ? "" : `"file":${undefined !== input.file ? $string(input.file) : undefined},`}${undefined === input.offset ? "" : `"offset":${undefined !== input.offset ? input.offset : undefined},`}${undefined === input.start ? "" : `"start":${undefined !== input.start ? input.start : undefined},`}${undefined === input.end ? "" : `"end":${undefined !== input.end ? input.end : undefined}`}`)}}`;
2118
- const $so2 = 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 ? $so3(input.headers) : undefined},`}${undefined === input.data ? "" : `"data":${undefined !== input.data ? "{}" : undefined},`}${undefined === input.cause ? "" : `"cause":${undefined !== input.cause ? null !== input.cause ? $so2(input.cause) : "null" : undefined},`}${undefined === input.errors ? "" : `"errors":${undefined !== input.errors ? null !== input.errors ? `[${input.errors.map(elem => $so2(elem)).join(",")}]` : "null" : undefined},`}"message":${$string(input.message)}}`;
2119
- const $so3 = input => `{${Object.entries(input).map(([key, value]) => { if (undefined === value)
2120
- return ""; return `${JSON.stringify(key)}:${$string(value)}`; }).filter(str => "" !== str).join(",")}}`;
2121
- return $so0(input);
2122
- };
2123
- export const assertStringifyFileDomainStatsRecord = (input, errorFactory) => { const assert = (input, errorFactory) => {
2124
- const __is = input => {
2125
- const $io0 = input => (null === input.position || "number" === typeof input.position && (0 <= input.position && (Math.floor(input.position) === input.position && 0 <= input.position && input.position <= 18446744073709552000))) && (null === input.uploading || "boolean" === typeof input.uploading) && (Array.isArray(input.zones) && input.zones.every(elem => "string" === typeof elem)) && (Array.isArray(input.replicas) && input.replicas.every(elem => "string" === typeof elem)) && (Array.isArray(input.locations) && input.locations.every(elem => "string" === typeof elem)) && (Array.isArray(input.ranges) && input.ranges.every(elem => Array.isArray(elem) && (elem.length === 2 && ("number" === typeof elem[0] && (!Number.isNaN(elem[0]) && 0 <= elem[0])) && ("number" === typeof elem[1] && (!Number.isNaN(elem[1]) && 0 <= elem[1]))))) && (undefined === input.progress || "number" === typeof input.progress && (0 <= input.progress && input.progress <= 1)) && (undefined === input.speed || "number" === typeof input.speed && (!Number.isNaN(input.speed) && 0 <= input.speed)) && ("string" === typeof input.id && /^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.id)) && (null === input.size || "number" === typeof input.size && (0 <= input.size && (Math.floor(input.size) === input.size && 0 <= input.size && input.size <= 18446744073709552000))) && "boolean" === typeof input.seekable && "boolean" === typeof input.deleted && (Array.isArray(input.refs) && input.refs.every(elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && $io1(elem))) && (Array.isArray(input.tags) && input.tags.every(elem => "string" === typeof elem)) && "string" === typeof input.resumable && "string" === typeof input.mimeType && "string" === typeof input.encoding && ("string" === typeof input.hash && /^([A-Fa-f0-9]{32})?$/.test(input.hash)) && ("number" === typeof input.btime && (0 <= input.btime && (Math.floor(input.btime) === input.btime && 0 <= input.btime && input.btime <= 18446744073709552000))) && "boolean" === typeof input.completed && (undefined !== input.error && (null === input.error || (Array.isArray(input.error) && input.error.every(elem => "object" === typeof elem && null !== elem && $io2(elem)) || "object" === typeof input.error && null !== input.error && $io2(input.error))));
2126
- const $io1 = input => (undefined === input.file || "string" === typeof input.file) && (undefined === input.offset || "number" === typeof input.offset && !Number.isNaN(input.offset)) && (undefined === input.start || "number" === typeof input.start && !Number.isNaN(input.start)) && (undefined === input.end || "number" === typeof input.end && !Number.isNaN(input.end));
2127
- const $io2 = 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) && $io3(input.headers)) && (undefined === input.data || "object" === typeof input.data && null !== input.data && false === Array.isArray(input.data) && $io4(input.data)) && (null === input.cause || undefined === input.cause || "object" === typeof input.cause && null !== input.cause && $io2(input.cause)) && (null === input.errors || undefined === input.errors || Array.isArray(input.errors) && input.errors.every(elem => "object" === typeof elem && null !== elem && $io2(elem)));
2128
- const $io3 = input => Object.keys(input).every(key => {
2129
- const value = input[key];
2130
- if (undefined === value)
2131
- return true;
2132
- return "string" === typeof value;
2133
- });
2134
- const $io4 = input => true;
2135
- return "object" === typeof input && null !== input && $io0(input);
2136
- };
2137
- if (false === __is(input))
2138
- ((input, _path, _exceptionable = true) => {
2139
- const $guard = __typia.json.createAssertStringify.guard;
2140
- const $join = __typia.json.createAssertStringify.join;
2141
- const $ao0 = (input, _path, _exceptionable = true) => (null === input.position || "number" === typeof input.position && (0 <= input.position || $guard(_exceptionable, {
2142
- path: _path + ".position",
2143
- expected: "number & Minimum<0>",
2144
- value: input.position
2145
- }, errorFactory)) && (Math.floor(input.position) === input.position && 0 <= input.position && input.position <= 18446744073709552000 || $guard(_exceptionable, {
2146
- path: _path + ".position",
2147
- expected: "number & Type<\"uint64\">",
2148
- value: input.position
2149
- }, errorFactory)) || $guard(_exceptionable, {
2150
- path: _path + ".position",
2151
- expected: "((number & Minimum<0> & Type<\"uint64\">) | null)",
2152
- value: input.position
2153
- }, errorFactory)) && (null === input.uploading || "boolean" === typeof input.uploading || $guard(_exceptionable, {
2154
- path: _path + ".uploading",
2155
- expected: "(boolean | null)",
2156
- value: input.uploading
2157
- }, errorFactory)) && ((Array.isArray(input.zones) || $guard(_exceptionable, {
2158
- path: _path + ".zones",
2159
- expected: "Array<string>",
2160
- value: input.zones
2161
- }, errorFactory)) && input.zones.every((elem, _index1) => "string" === typeof elem || $guard(_exceptionable, {
2162
- path: _path + ".zones[" + _index1 + "]",
2163
- expected: "string",
2164
- value: elem
2165
- }, errorFactory)) || $guard(_exceptionable, {
2166
- path: _path + ".zones",
2167
- expected: "Array<string>",
2168
- value: input.zones
2169
- }, errorFactory)) && ((Array.isArray(input.replicas) || $guard(_exceptionable, {
2170
- path: _path + ".replicas",
2171
- expected: "Array<string>",
2172
- value: input.replicas
2173
- }, errorFactory)) && input.replicas.every((elem, _index2) => "string" === typeof elem || $guard(_exceptionable, {
2174
- path: _path + ".replicas[" + _index2 + "]",
2175
- expected: "string",
2176
- value: elem
2177
- }, errorFactory)) || $guard(_exceptionable, {
2178
- path: _path + ".replicas",
2179
- expected: "Array<string>",
2180
- value: input.replicas
2181
- }, errorFactory)) && ((Array.isArray(input.locations) || $guard(_exceptionable, {
2182
- path: _path + ".locations",
2183
- expected: "Array<string>",
2184
- value: input.locations
2185
- }, errorFactory)) && input.locations.every((elem, _index3) => "string" === typeof elem || $guard(_exceptionable, {
2186
- path: _path + ".locations[" + _index3 + "]",
2187
- expected: "string",
2188
- value: elem
2189
- }, errorFactory)) || $guard(_exceptionable, {
2190
- path: _path + ".locations",
2191
- expected: "Array<string>",
2192
- value: input.locations
2193
- }, errorFactory)) && ((Array.isArray(input.ranges) || $guard(_exceptionable, {
2194
- path: _path + ".ranges",
2195
- expected: "Array<[start: number & Minimum<0>, end: number & Minimum<0>]>",
2196
- value: input.ranges
2197
- }, errorFactory)) && input.ranges.every((elem, _index4) => (Array.isArray(elem) || $guard(_exceptionable, {
2198
- path: _path + ".ranges[" + _index4 + "]",
2199
- expected: "[start: number & Minimum<0>, end: number & Minimum<0>]",
2200
- value: elem
2201
- }, errorFactory)) && ((elem.length === 2 || $guard(_exceptionable, {
2202
- path: _path + ".ranges[" + _index4 + "]",
2203
- expected: "[(number & Minimum<0>), (number & Minimum<0>)]",
2204
- value: elem
2205
- }, errorFactory)) && ("number" === typeof elem[0] && (!Number.isNaN(elem[0]) || $guard(_exceptionable, {
2206
- path: _path + ".ranges[" + _index4 + "][0]",
2207
- expected: "number",
2208
- value: elem[0]
2209
- }, errorFactory)) && (0 <= elem[0] || $guard(_exceptionable, {
2210
- path: _path + ".ranges[" + _index4 + "][0]",
2211
- expected: "number & Minimum<0>",
2212
- value: elem[0]
2213
- }, errorFactory)) || $guard(_exceptionable, {
2214
- path: _path + ".ranges[" + _index4 + "][0]",
2215
- expected: "(number & Minimum<0>)",
2216
- value: elem[0]
2217
- }, errorFactory)) && ("number" === typeof elem[1] && (!Number.isNaN(elem[1]) || $guard(_exceptionable, {
2218
- path: _path + ".ranges[" + _index4 + "][1]",
2219
- expected: "number",
2220
- value: elem[1]
2221
- }, errorFactory)) && (0 <= elem[1] || $guard(_exceptionable, {
2222
- path: _path + ".ranges[" + _index4 + "][1]",
2223
- expected: "number & Minimum<0>",
2224
- value: elem[1]
2225
- }, errorFactory)) || $guard(_exceptionable, {
2226
- path: _path + ".ranges[" + _index4 + "][1]",
2227
- expected: "(number & Minimum<0>)",
2228
- value: elem[1]
2229
- }, errorFactory))) || $guard(_exceptionable, {
2230
- path: _path + ".ranges[" + _index4 + "]",
2231
- expected: "[start: number & Minimum<0>, end: number & Minimum<0>]",
2232
- value: elem
2233
- }, errorFactory)) || $guard(_exceptionable, {
2234
- path: _path + ".ranges",
2235
- expected: "Array<[start: number & Minimum<0>, end: number & Minimum<0>]>",
2236
- value: input.ranges
2237
- }, errorFactory)) && (undefined === input.progress || "number" === typeof input.progress && (0 <= input.progress || $guard(_exceptionable, {
2238
- path: _path + ".progress",
2239
- expected: "number & Minimum<0>",
2240
- value: input.progress
2241
- }, errorFactory)) && (input.progress <= 1 || $guard(_exceptionable, {
2242
- path: _path + ".progress",
2243
- expected: "number & Maximum<1>",
2244
- value: input.progress
2245
- }, errorFactory)) || $guard(_exceptionable, {
2246
- path: _path + ".progress",
2247
- expected: "((number & Minimum<0> & Maximum<1>) | undefined)",
2248
- value: input.progress
2249
- }, errorFactory)) && (undefined === input.speed || "number" === typeof input.speed && (!Number.isNaN(input.speed) || $guard(_exceptionable, {
2250
- path: _path + ".speed",
2251
- expected: "number",
2252
- value: input.speed
2253
- }, errorFactory)) && (0 <= input.speed || $guard(_exceptionable, {
2254
- path: _path + ".speed",
2255
- expected: "number & Minimum<0>",
2256
- value: input.speed
2257
- }, errorFactory)) || $guard(_exceptionable, {
2258
- path: _path + ".speed",
2259
- expected: "((number & Minimum<0>) | undefined)",
2260
- value: input.speed
2261
- }, errorFactory)) && ("string" === typeof input.id && (/^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.id) || $guard(_exceptionable, {
2262
- path: _path + ".id",
2263
- expected: "string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">",
2264
- value: input.id
2265
- }, errorFactory)) || $guard(_exceptionable, {
2266
- path: _path + ".id",
2267
- expected: "(string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">)",
2268
- value: input.id
2269
- }, errorFactory)) && (null === input.size || "number" === typeof input.size && (0 <= input.size || $guard(_exceptionable, {
2270
- path: _path + ".size",
2271
- expected: "number & Minimum<0>",
2272
- value: input.size
2273
- }, errorFactory)) && (Math.floor(input.size) === input.size && 0 <= input.size && input.size <= 18446744073709552000 || $guard(_exceptionable, {
2274
- path: _path + ".size",
2275
- expected: "number & Type<\"uint64\">",
2276
- value: input.size
2277
- }, errorFactory)) || $guard(_exceptionable, {
2278
- path: _path + ".size",
2279
- expected: "((number & Minimum<0> & Type<\"uint64\">) | null)",
2280
- value: input.size
2281
- }, errorFactory)) && ("boolean" === typeof input.seekable || $guard(_exceptionable, {
2282
- path: _path + ".seekable",
2283
- expected: "boolean",
2284
- value: input.seekable
2285
- }, errorFactory)) && ("boolean" === typeof input.deleted || $guard(_exceptionable, {
2286
- path: _path + ".deleted",
2287
- expected: "boolean",
2288
- value: input.deleted
2289
- }, errorFactory)) && ((Array.isArray(input.refs) || $guard(_exceptionable, {
2290
- path: _path + ".refs",
2291
- expected: "FileRefs",
2292
- value: input.refs
2293
- }, errorFactory)) && input.refs.every((elem, _index5) => ("object" === typeof elem && null !== elem && false === Array.isArray(elem) || $guard(_exceptionable, {
2294
- path: _path + ".refs[" + _index5 + "]",
2295
- expected: "FileRef",
2296
- value: elem
2297
- }, errorFactory)) && $ao1(elem, _path + ".refs[" + _index5 + "]", true && _exceptionable) || $guard(_exceptionable, {
2298
- path: _path + ".refs[" + _index5 + "]",
2299
- expected: "FileRef",
2300
- value: elem
2301
- }, errorFactory)) || $guard(_exceptionable, {
2302
- path: _path + ".refs",
2303
- expected: "FileRefs",
2304
- value: input.refs
2305
- }, errorFactory)) && ((Array.isArray(input.tags) || $guard(_exceptionable, {
2306
- path: _path + ".tags",
2307
- expected: "Array<string>",
2308
- value: input.tags
2309
- }, errorFactory)) && input.tags.every((elem, _index6) => "string" === typeof elem || $guard(_exceptionable, {
2310
- path: _path + ".tags[" + _index6 + "]",
2311
- expected: "string",
2312
- value: elem
2313
- }, errorFactory)) || $guard(_exceptionable, {
2314
- path: _path + ".tags",
2315
- expected: "Array<string>",
2316
- value: input.tags
2317
- }, errorFactory)) && ("string" === typeof input.resumable || $guard(_exceptionable, {
2318
- path: _path + ".resumable",
2319
- expected: "string",
2320
- value: input.resumable
2321
- }, errorFactory)) && ("string" === typeof input.mimeType || $guard(_exceptionable, {
2322
- path: _path + ".mimeType",
2323
- expected: "string",
2324
- value: input.mimeType
2325
- }, errorFactory)) && ("string" === typeof input.encoding || $guard(_exceptionable, {
2326
- path: _path + ".encoding",
2327
- expected: "string",
2328
- value: input.encoding
2329
- }, errorFactory)) && ("string" === typeof input.hash && (/^([A-Fa-f0-9]{32})?$/.test(input.hash) || $guard(_exceptionable, {
2330
- path: _path + ".hash",
2331
- expected: "string & Pattern<\"^([A-Fa-f0-9]{32})?$\">",
2332
- value: input.hash
2333
- }, errorFactory)) || $guard(_exceptionable, {
2334
- path: _path + ".hash",
2335
- expected: "(string & Pattern<\"^([A-Fa-f0-9]{32})?$\">)",
2336
- value: input.hash
2337
- }, errorFactory)) && ("number" === typeof input.btime && (0 <= input.btime || $guard(_exceptionable, {
2338
- path: _path + ".btime",
2339
- expected: "number & Minimum<0>",
2340
- value: input.btime
2341
- }, errorFactory)) && (Math.floor(input.btime) === input.btime && 0 <= input.btime && input.btime <= 18446744073709552000 || $guard(_exceptionable, {
2342
- path: _path + ".btime",
2343
- expected: "number & Type<\"uint64\">",
2344
- value: input.btime
2345
- }, errorFactory)) || $guard(_exceptionable, {
2346
- path: _path + ".btime",
2347
- expected: "(number & Minimum<0> & Type<\"uint64\">)",
2348
- value: input.btime
2349
- }, errorFactory)) && ("boolean" === typeof input.completed || $guard(_exceptionable, {
2350
- path: _path + ".completed",
2351
- expected: "boolean",
2352
- value: input.completed
2353
- }, errorFactory)) && ((undefined !== input.error || $guard(_exceptionable, {
2354
- path: _path + ".error",
2355
- expected: "(Array<NxtError> | NxtError | null)",
2356
- value: input.error
2357
- }, errorFactory)) && (null === input.error || (Array.isArray(input.error) && input.error.every((elem, _index7) => ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
2358
- path: _path + ".error[" + _index7 + "]",
2359
- expected: "NxtError",
2360
- value: elem
2361
- }, errorFactory)) && $ao2(elem, _path + ".error[" + _index7 + "]", true && _exceptionable) || $guard(_exceptionable, {
2362
- path: _path + ".error[" + _index7 + "]",
2363
- expected: "NxtError",
2364
- value: elem
2365
- }, errorFactory)) || "object" === typeof input.error && null !== input.error && $ao2(input.error, _path + ".error", true && _exceptionable) || $guard(_exceptionable, {
2366
- path: _path + ".error",
2367
- expected: "(Array<NxtError> | NxtError | null)",
2368
- value: input.error
2369
- }, errorFactory)) || $guard(_exceptionable, {
2370
- path: _path + ".error",
2371
- expected: "(Array<NxtError> | NxtError | null)",
2372
- value: input.error
2373
- }, errorFactory)));
2374
- const $ao1 = (input, _path, _exceptionable = true) => (undefined === input.file || "string" === typeof input.file || $guard(_exceptionable, {
2375
- path: _path + ".file",
2376
- expected: "(string | undefined)",
2377
- value: input.file
2378
- }, errorFactory)) && (undefined === input.offset || "number" === typeof input.offset && !Number.isNaN(input.offset) || $guard(_exceptionable, {
2379
- path: _path + ".offset",
2380
- expected: "(number | undefined)",
2381
- value: input.offset
2382
- }, errorFactory)) && (undefined === input.start || "number" === typeof input.start && !Number.isNaN(input.start) || $guard(_exceptionable, {
2383
- path: _path + ".start",
2384
- expected: "(number | undefined)",
2385
- value: input.start
2386
- }, errorFactory)) && (undefined === input.end || "number" === typeof input.end && !Number.isNaN(input.end) || $guard(_exceptionable, {
2387
- path: _path + ".end",
2388
- expected: "(number | undefined)",
2389
- value: input.end
2390
- }, errorFactory));
2391
- const $ao2 = (input, _path, _exceptionable = true) => ("string" === typeof input.message || $guard(_exceptionable, {
2392
- path: _path + ".message",
2393
- expected: "string",
2394
- value: input.message
2395
- }, errorFactory)) && (undefined === input.type || "string" === typeof input.type || $guard(_exceptionable, {
2396
- path: _path + ".type",
2397
- expected: "(string | undefined)",
2398
- value: input.type
2399
- }, errorFactory)) && (undefined === input.code || "string" === typeof input.code || $guard(_exceptionable, {
2400
- path: _path + ".code",
2401
- expected: "(string | undefined)",
2402
- value: input.code
2403
- }, errorFactory)) && (undefined === input.exitCode || "number" === typeof input.exitCode && !Number.isNaN(input.exitCode) || $guard(_exceptionable, {
2404
- path: _path + ".exitCode",
2405
- expected: "(number | undefined)",
2406
- value: input.exitCode
2407
- }, errorFactory)) && (undefined === input.signalCode || "number" === typeof input.signalCode && !Number.isNaN(input.signalCode) || $guard(_exceptionable, {
2408
- path: _path + ".signalCode",
2409
- expected: "(number | undefined)",
2410
- value: input.signalCode
2411
- }, errorFactory)) && (undefined === input.statusCode || "number" === typeof input.statusCode && !Number.isNaN(input.statusCode) || $guard(_exceptionable, {
2412
- path: _path + ".statusCode",
2413
- expected: "(number | undefined)",
2414
- value: input.statusCode
2415
- }, errorFactory)) && (undefined === input.headers || ("object" === typeof input.headers && null !== input.headers && false === Array.isArray(input.headers) || $guard(_exceptionable, {
2416
- path: _path + ".headers",
2417
- expected: "(Record<string, string> | undefined)",
2418
- value: input.headers
2419
- }, errorFactory)) && $ao3(input.headers, _path + ".headers", true && _exceptionable) || $guard(_exceptionable, {
2420
- path: _path + ".headers",
2421
- expected: "(Record<string, string> | undefined)",
2422
- value: input.headers
2423
- }, errorFactory)) && (undefined === input.data || ("object" === typeof input.data && null !== input.data && false === Array.isArray(input.data) || $guard(_exceptionable, {
2424
- path: _path + ".data",
2425
- expected: "(object | undefined)",
2426
- value: input.data
2427
- }, errorFactory)) && $ao4(input.data, _path + ".data", true && _exceptionable) || $guard(_exceptionable, {
2428
- path: _path + ".data",
2429
- expected: "(object | undefined)",
2430
- value: input.data
2431
- }, errorFactory)) && (null === input.cause || undefined === input.cause || ("object" === typeof input.cause && null !== input.cause || $guard(_exceptionable, {
2432
- path: _path + ".cause",
2433
- expected: "(NxtError | null | undefined)",
2434
- value: input.cause
2435
- }, errorFactory)) && $ao2(input.cause, _path + ".cause", true && _exceptionable) || $guard(_exceptionable, {
2436
- path: _path + ".cause",
2437
- expected: "(NxtError | null | undefined)",
2438
- value: input.cause
2439
- }, errorFactory)) && (null === input.errors || undefined === input.errors || (Array.isArray(input.errors) || $guard(_exceptionable, {
2440
- path: _path + ".errors",
2441
- expected: "(Array<NxtError> | null | undefined)",
2442
- value: input.errors
2443
- }, errorFactory)) && input.errors.every((elem, _index8) => ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
2444
- path: _path + ".errors[" + _index8 + "]",
2445
- expected: "NxtError",
2446
- value: elem
2447
- }, errorFactory)) && $ao2(elem, _path + ".errors[" + _index8 + "]", true && _exceptionable) || $guard(_exceptionable, {
2448
- path: _path + ".errors[" + _index8 + "]",
2449
- expected: "NxtError",
2450
- value: elem
2451
- }, errorFactory)) || $guard(_exceptionable, {
2452
- path: _path + ".errors",
2453
- expected: "(Array<NxtError> | null | undefined)",
2454
- value: input.errors
2455
- }, errorFactory));
2456
- const $ao3 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every(key => {
2457
- const value = input[key];
2458
- if (undefined === value)
2459
- return true;
2460
- return "string" === typeof value || $guard(_exceptionable, {
2461
- path: _path + $join(key),
2462
- expected: "string",
2463
- value: value
2464
- }, errorFactory);
2465
- });
2466
- const $ao4 = (input, _path, _exceptionable = true) => true;
2467
- return ("object" === typeof input && null !== input || $guard(true, {
2468
- path: _path + "",
2469
- expected: "FileStats",
2470
- value: input
2471
- }, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
2472
- path: _path + "",
2473
- expected: "FileStats",
2474
- value: input
2475
- }, errorFactory);
2476
- })(input, "$input", true);
2477
- return input;
2478
- }; const stringify = input => {
2479
- const $io1 = input => (undefined === input.file || "string" === typeof input.file) && (undefined === input.offset || "number" === typeof input.offset) && (undefined === input.start || "number" === typeof input.start) && (undefined === input.end || "number" === typeof input.end);
2480
- const $io2 = 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) && $io3(input.headers)) && (undefined === input.data || "object" === typeof input.data && null !== input.data && false === Array.isArray(input.data) && $io4(input.data)) && (null === input.cause || undefined === input.cause || "object" === typeof input.cause && null !== input.cause && $io2(input.cause)) && (null === input.errors || undefined === input.errors || Array.isArray(input.errors) && input.errors.every(elem => "object" === typeof elem && null !== elem && $io2(elem)));
2481
- const $io3 = input => Object.keys(input).every(key => {
2482
- const value = input[key];
2483
- if (undefined === value)
2484
- return true;
2485
- return "string" === typeof value;
2486
- });
2487
- const $io4 = input => true;
2488
- const $string = __typia.json.createAssertStringify.string;
2489
- const $throws = __typia.json.createAssertStringify.throws;
2490
- const $tail = __typia.json.createAssertStringify.tail;
2491
- const $so0 = input => `{${undefined === input.progress ? "" : `"progress":${undefined !== input.progress ? input.progress : undefined},`}${undefined === input.speed ? "" : `"speed":${undefined !== input.speed ? input.speed : undefined},`}"position":${null !== input.position ? input.position : "null"},"uploading":${null !== input.uploading ? input.uploading : "null"},"zones":${`[${input.zones.map(elem => $string(elem)).join(",")}]`},"replicas":${`[${input.replicas.map(elem => $string(elem)).join(",")}]`},"locations":${`[${input.locations.map(elem => $string(elem)).join(",")}]`},"ranges":${`[${input.ranges.map(elem => `[${elem[0]},${elem[1]}]`).join(",")}]`},"id":${$string(input.id)},"size":${null !== input.size ? input.size : "null"},"seekable":${input.seekable},"deleted":${input.deleted},"refs":${`[${input.refs.map(elem => $so1(elem)).join(",")}]`},"tags":${`[${input.tags.map(elem => $string(elem)).join(",")}]`},"resumable":${$string(input.resumable)},"mimeType":${$string(input.mimeType)},"encoding":${$string(input.encoding)},"hash":${$string(input.hash)},"btime":${input.btime},"completed":${input.completed},"error":${null !== input.error ? (() => {
2492
- if (Array.isArray(input.error))
2493
- return `[${input.error.map(elem => $so2(elem)).join(",")}]`;
2494
- if ("object" === typeof input.error && null !== input.error)
2495
- return $so2(input.error);
2496
- $throws({
2497
- expected: "(Array<NxtError> | NxtError | null)",
2498
- value: input.error
2499
- });
2500
- })() : "null"}}`;
2501
- const $so1 = input => `{${$tail(`${undefined === input.file ? "" : `"file":${undefined !== input.file ? $string(input.file) : undefined},`}${undefined === input.offset ? "" : `"offset":${undefined !== input.offset ? input.offset : undefined},`}${undefined === input.start ? "" : `"start":${undefined !== input.start ? input.start : undefined},`}${undefined === input.end ? "" : `"end":${undefined !== input.end ? input.end : undefined}`}`)}}`;
2502
- const $so2 = 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 ? $so3(input.headers) : undefined},`}${undefined === input.data ? "" : `"data":${undefined !== input.data ? "{}" : undefined},`}${undefined === input.cause ? "" : `"cause":${undefined !== input.cause ? null !== input.cause ? $so2(input.cause) : "null" : undefined},`}${undefined === input.errors ? "" : `"errors":${undefined !== input.errors ? null !== input.errors ? `[${input.errors.map(elem => $so2(elem)).join(",")}]` : "null" : undefined},`}"message":${$string(input.message)}}`;
2503
- const $so3 = input => `{${Object.entries(input).map(([key, value]) => { if (undefined === value)
2504
- return ""; return `${JSON.stringify(key)}:${$string(value)}`; }).filter(str => "" !== str).join(",")}}`;
2505
- return $so0(input);
2506
- }; return stringify(assert(input, errorFactory)); };