@nxtedition/types 1.2.0 → 1.2.1

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.
@@ -1,63 +1,71 @@
1
1
  import __typia from "typia";
2
2
  export const isBlock = input => {
3
- const $io0 = input => "string" === typeof input.fileId && 1 <= input.fileId.length && ("string" === typeof input.locationId && 1 <= input.locationId.length) && ("string" === typeof input.blockId && 1 <= input.blockId.length) && (null === input.offset || "number" === typeof input.offset && 0 <= input.offset) && (null === input.position || "number" === typeof input.position && 0 <= input.position) && (null === input.size || "number" === typeof input.size && 0 <= input.size) && (null === input.hash || "string" === typeof input.hash && (input.hash.length <= 0 || /^[A-Fa-f0-9]{32}$/.test(input.hash))) && (null === input.btime || "number" === typeof input.btime && 0 <= input.btime);
3
+ const $io0 = input => "string" === typeof input.id && /^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.id) && ("string" === typeof input.file && /^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.file)) && ("string" === typeof input.location && /^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.location)) && ("string" === typeof input.block && /^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.block)) && (null === input.offset || "number" === typeof input.offset && (0 <= input.offset && (Math.floor(input.offset) === input.offset && 0 <= input.offset && input.offset <= 4294967295))) && (null === input.size || "number" === typeof input.size && (0 <= input.size && (Math.floor(input.size) === input.size && 0 <= input.size && input.size <= 4294967295))) && (null === input.hash || "string" === typeof input.hash && (input.hash.length <= 0 || /^[A-Fa-f0-9]{32}$/.test(input.hash))) && (null === input.btime || "number" === typeof input.btime && (0 <= input.btime && (Math.floor(input.btime) === input.btime && 0 <= input.btime && input.btime <= 4294967295)));
4
4
  return "object" === typeof input && null !== input && $io0(input);
5
5
  };
6
6
  export const assertBlock = (input, errorFactory) => {
7
7
  const __is = input => {
8
- const $io0 = input => "string" === typeof input.fileId && 1 <= input.fileId.length && ("string" === typeof input.locationId && 1 <= input.locationId.length) && ("string" === typeof input.blockId && 1 <= input.blockId.length) && (null === input.offset || "number" === typeof input.offset && 0 <= input.offset) && (null === input.position || "number" === typeof input.position && 0 <= input.position) && (null === input.size || "number" === typeof input.size && 0 <= input.size) && (null === input.hash || "string" === typeof input.hash && (input.hash.length <= 0 || /^[A-Fa-f0-9]{32}$/.test(input.hash))) && (null === input.btime || "number" === typeof input.btime && 0 <= input.btime);
8
+ const $io0 = input => "string" === typeof input.id && /^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.id) && ("string" === typeof input.file && /^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.file)) && ("string" === typeof input.location && /^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.location)) && ("string" === typeof input.block && /^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.block)) && (null === input.offset || "number" === typeof input.offset && (0 <= input.offset && (Math.floor(input.offset) === input.offset && 0 <= input.offset && input.offset <= 4294967295))) && (null === input.size || "number" === typeof input.size && (0 <= input.size && (Math.floor(input.size) === input.size && 0 <= input.size && input.size <= 4294967295))) && (null === input.hash || "string" === typeof input.hash && (input.hash.length <= 0 || /^[A-Fa-f0-9]{32}$/.test(input.hash))) && (null === input.btime || "number" === typeof input.btime && (0 <= input.btime && (Math.floor(input.btime) === input.btime && 0 <= input.btime && input.btime <= 4294967295)));
9
9
  return "object" === typeof input && null !== input && $io0(input);
10
10
  };
11
11
  if (false === __is(input))
12
12
  ((input, _path, _exceptionable = true) => {
13
13
  const $guard = __typia.createAssert.guard;
14
- const $ao0 = (input, _path, _exceptionable = true) => ("string" === typeof input.fileId && (1 <= input.fileId.length || $guard(_exceptionable, {
15
- path: _path + ".fileId",
16
- expected: "string & MinLength<1>",
17
- value: input.fileId
18
- }, errorFactory)) || $guard(_exceptionable, {
19
- path: _path + ".fileId",
20
- expected: "(string & MinLength<1>)",
21
- value: input.fileId
22
- }, errorFactory)) && ("string" === typeof input.locationId && (1 <= input.locationId.length || $guard(_exceptionable, {
23
- path: _path + ".locationId",
24
- expected: "string & MinLength<1>",
25
- value: input.locationId
26
- }, errorFactory)) || $guard(_exceptionable, {
27
- path: _path + ".locationId",
28
- expected: "(string & MinLength<1>)",
29
- value: input.locationId
30
- }, errorFactory)) && ("string" === typeof input.blockId && (1 <= input.blockId.length || $guard(_exceptionable, {
31
- path: _path + ".blockId",
32
- expected: "string & MinLength<1>",
33
- value: input.blockId
34
- }, errorFactory)) || $guard(_exceptionable, {
35
- path: _path + ".blockId",
36
- expected: "(string & MinLength<1>)",
37
- value: input.blockId
14
+ const $ao0 = (input, _path, _exceptionable = true) => ("string" === typeof input.id && (/^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.id) || $guard(_exceptionable, {
15
+ path: _path + ".id",
16
+ expected: "string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">",
17
+ value: input.id
18
+ }, errorFactory)) || $guard(_exceptionable, {
19
+ path: _path + ".id",
20
+ expected: "(string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">)",
21
+ value: input.id
22
+ }, errorFactory)) && ("string" === typeof input.file && (/^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.file) || $guard(_exceptionable, {
23
+ path: _path + ".file",
24
+ expected: "string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">",
25
+ value: input.file
26
+ }, errorFactory)) || $guard(_exceptionable, {
27
+ path: _path + ".file",
28
+ expected: "(string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">)",
29
+ value: input.file
30
+ }, errorFactory)) && ("string" === typeof input.location && (/^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.location) || $guard(_exceptionable, {
31
+ path: _path + ".location",
32
+ expected: "string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">",
33
+ value: input.location
34
+ }, errorFactory)) || $guard(_exceptionable, {
35
+ path: _path + ".location",
36
+ expected: "(string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">)",
37
+ value: input.location
38
+ }, errorFactory)) && ("string" === typeof input.block && (/^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.block) || $guard(_exceptionable, {
39
+ path: _path + ".block",
40
+ expected: "string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">",
41
+ value: input.block
42
+ }, errorFactory)) || $guard(_exceptionable, {
43
+ path: _path + ".block",
44
+ expected: "(string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">)",
45
+ value: input.block
38
46
  }, errorFactory)) && (null === input.offset || "number" === typeof input.offset && (0 <= input.offset || $guard(_exceptionable, {
39
47
  path: _path + ".offset",
40
48
  expected: "number & Minimum<0>",
41
49
  value: input.offset
42
- }, errorFactory)) || $guard(_exceptionable, {
50
+ }, errorFactory)) && (Math.floor(input.offset) === input.offset && 0 <= input.offset && input.offset <= 4294967295 || $guard(_exceptionable, {
43
51
  path: _path + ".offset",
44
- expected: "((number & Minimum<0>) | null)",
52
+ expected: "number & Type<\"uint32\">",
45
53
  value: input.offset
46
- }, errorFactory)) && (null === input.position || "number" === typeof input.position && (0 <= input.position || $guard(_exceptionable, {
47
- path: _path + ".position",
48
- expected: "number & Minimum<0>",
49
- value: input.position
50
54
  }, errorFactory)) || $guard(_exceptionable, {
51
- path: _path + ".position",
52
- expected: "((number & Minimum<0>) | null)",
53
- value: input.position
55
+ path: _path + ".offset",
56
+ expected: "((number & Minimum<0> & Type<\"uint32\">) | null)",
57
+ value: input.offset
54
58
  }, errorFactory)) && (null === input.size || "number" === typeof input.size && (0 <= input.size || $guard(_exceptionable, {
55
59
  path: _path + ".size",
56
60
  expected: "number & Minimum<0>",
57
61
  value: input.size
62
+ }, errorFactory)) && (Math.floor(input.size) === input.size && 0 <= input.size && input.size <= 4294967295 || $guard(_exceptionable, {
63
+ path: _path + ".size",
64
+ expected: "number & Type<\"uint32\">",
65
+ value: input.size
58
66
  }, errorFactory)) || $guard(_exceptionable, {
59
67
  path: _path + ".size",
60
- expected: "((number & Minimum<0>) | null)",
68
+ expected: "((number & Minimum<0> & Type<\"uint32\">) | null)",
61
69
  value: input.size
62
70
  }, errorFactory)) && (null === input.hash || "string" === typeof input.hash && (input.hash.length <= 0 || /^[A-Fa-f0-9]{32}$/.test(input.hash) || $guard(_exceptionable, {
63
71
  path: _path + ".hash",
@@ -71,9 +79,13 @@ export const assertBlock = (input, errorFactory) => {
71
79
  path: _path + ".btime",
72
80
  expected: "number & Minimum<0>",
73
81
  value: input.btime
82
+ }, errorFactory)) && (Math.floor(input.btime) === input.btime && 0 <= input.btime && input.btime <= 4294967295 || $guard(_exceptionable, {
83
+ path: _path + ".btime",
84
+ expected: "number & Type<\"uint32\">",
85
+ value: input.btime
74
86
  }, errorFactory)) || $guard(_exceptionable, {
75
87
  path: _path + ".btime",
76
- expected: "((number & Minimum<0>) | null)",
88
+ expected: "((number & Minimum<0> & Type<\"uint32\">) | null)",
77
89
  value: input.btime
78
90
  }, errorFactory));
79
91
  return ("object" === typeof input && null !== input || $guard(true, {
@@ -92,27 +104,34 @@ export const randomBlock = generator => {
92
104
  const $generator = __typia.createRandom.generator;
93
105
  const $pick = __typia.createRandom.pick;
94
106
  const $ro0 = (_recursive = false, _depth = 0) => ({
95
- fileId: (generator?.customs ?? $generator.customs)?.string?.([
107
+ id: (generator?.customs ?? $generator.customs)?.string?.([
96
108
  {
97
- name: "MinLength<1>",
98
- kind: "minLength",
99
- value: 1
109
+ name: "Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">",
110
+ kind: "pattern",
111
+ value: "^[0-9A-Za-z~][0-9A-Za-z~._: -]*$"
100
112
  }
101
- ]) ?? (generator?.string ?? $generator.string)((generator?.integer ?? $generator.integer)(1, 25)),
102
- locationId: (generator?.customs ?? $generator.customs)?.string?.([
113
+ ]) ?? (generator?.pattern ?? $generator.pattern)(/^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/),
114
+ file: (generator?.customs ?? $generator.customs)?.string?.([
103
115
  {
104
- name: "MinLength<1>",
105
- kind: "minLength",
106
- value: 1
116
+ name: "Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">",
117
+ kind: "pattern",
118
+ value: "^[0-9A-Za-z~][0-9A-Za-z~._: -]*$"
107
119
  }
108
- ]) ?? (generator?.string ?? $generator.string)((generator?.integer ?? $generator.integer)(1, 25)),
109
- blockId: (generator?.customs ?? $generator.customs)?.string?.([
120
+ ]) ?? (generator?.pattern ?? $generator.pattern)(/^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/),
121
+ location: (generator?.customs ?? $generator.customs)?.string?.([
110
122
  {
111
- name: "MinLength<1>",
112
- kind: "minLength",
113
- value: 1
123
+ name: "Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">",
124
+ kind: "pattern",
125
+ value: "^[0-9A-Za-z~][0-9A-Za-z~._: -]*$"
114
126
  }
115
- ]) ?? (generator?.string ?? $generator.string)((generator?.integer ?? $generator.integer)(1, 25)),
127
+ ]) ?? (generator?.pattern ?? $generator.pattern)(/^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/),
128
+ block: (generator?.customs ?? $generator.customs)?.string?.([
129
+ {
130
+ name: "Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">",
131
+ kind: "pattern",
132
+ value: "^[0-9A-Za-z~][0-9A-Za-z~._: -]*$"
133
+ }
134
+ ]) ?? (generator?.pattern ?? $generator.pattern)(/^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/),
116
135
  offset: $pick([
117
136
  () => null,
118
137
  () => (generator?.customs ?? $generator.customs)?.number?.([
@@ -120,18 +139,13 @@ export const randomBlock = generator => {
120
139
  name: "Minimum<0>",
121
140
  kind: "minimum",
122
141
  value: 0
123
- }
124
- ]) ?? (generator?.number ?? $generator.number)(0, 10)
125
- ])(),
126
- position: $pick([
127
- () => null,
128
- () => (generator?.customs ?? $generator.customs)?.number?.([
142
+ },
129
143
  {
130
- name: "Minimum<0>",
131
- kind: "minimum",
132
- value: 0
144
+ name: "Type<\"uint32\">",
145
+ kind: "type",
146
+ value: "uint32"
133
147
  }
134
- ]) ?? (generator?.number ?? $generator.number)(0, 10)
148
+ ]) ?? (generator?.integer ?? $generator.integer)(0, 10)
135
149
  ])(),
136
150
  size: $pick([
137
151
  () => null,
@@ -140,8 +154,13 @@ export const randomBlock = generator => {
140
154
  name: "Minimum<0>",
141
155
  kind: "minimum",
142
156
  value: 0
157
+ },
158
+ {
159
+ name: "Type<\"uint32\">",
160
+ kind: "type",
161
+ value: "uint32"
143
162
  }
144
- ]) ?? (generator?.number ?? $generator.number)(0, 10)
163
+ ]) ?? (generator?.integer ?? $generator.integer)(0, 10)
145
164
  ])(),
146
165
  hash: $pick([
147
166
  () => null,
@@ -167,67 +186,80 @@ export const randomBlock = generator => {
167
186
  name: "Minimum<0>",
168
187
  kind: "minimum",
169
188
  value: 0
189
+ },
190
+ {
191
+ name: "Type<\"uint32\">",
192
+ kind: "type",
193
+ value: "uint32"
170
194
  }
171
- ]) ?? (generator?.number ?? $generator.number)(0, 10)
195
+ ]) ?? (generator?.integer ?? $generator.integer)(0, 10)
172
196
  ])()
173
197
  });
174
198
  return $ro0();
175
199
  };
176
200
  export const assertGuardBlock = (input, errorFactory) => {
177
201
  const __is = input => {
178
- const $io0 = input => "string" === typeof input.fileId && 1 <= input.fileId.length && ("string" === typeof input.locationId && 1 <= input.locationId.length) && ("string" === typeof input.blockId && 1 <= input.blockId.length) && (null === input.offset || "number" === typeof input.offset && 0 <= input.offset) && (null === input.position || "number" === typeof input.position && 0 <= input.position) && (null === input.size || "number" === typeof input.size && 0 <= input.size) && (null === input.hash || "string" === typeof input.hash && (input.hash.length <= 0 || /^[A-Fa-f0-9]{32}$/.test(input.hash))) && (null === input.btime || "number" === typeof input.btime && 0 <= input.btime);
202
+ const $io0 = input => "string" === typeof input.id && /^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.id) && ("string" === typeof input.file && /^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.file)) && ("string" === typeof input.location && /^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.location)) && ("string" === typeof input.block && /^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.block)) && (null === input.offset || "number" === typeof input.offset && (0 <= input.offset && (Math.floor(input.offset) === input.offset && 0 <= input.offset && input.offset <= 4294967295))) && (null === input.size || "number" === typeof input.size && (0 <= input.size && (Math.floor(input.size) === input.size && 0 <= input.size && input.size <= 4294967295))) && (null === input.hash || "string" === typeof input.hash && (input.hash.length <= 0 || /^[A-Fa-f0-9]{32}$/.test(input.hash))) && (null === input.btime || "number" === typeof input.btime && (0 <= input.btime && (Math.floor(input.btime) === input.btime && 0 <= input.btime && input.btime <= 4294967295)));
179
203
  return "object" === typeof input && null !== input && $io0(input);
180
204
  };
181
205
  if (false === __is(input))
182
206
  ((input, _path, _exceptionable = true) => {
183
207
  const $guard = __typia.createAssertGuard.guard;
184
- const $ao0 = (input, _path, _exceptionable = true) => ("string" === typeof input.fileId && (1 <= input.fileId.length || $guard(_exceptionable, {
185
- path: _path + ".fileId",
186
- expected: "string & MinLength<1>",
187
- value: input.fileId
188
- }, errorFactory)) || $guard(_exceptionable, {
189
- path: _path + ".fileId",
190
- expected: "(string & MinLength<1>)",
191
- value: input.fileId
192
- }, errorFactory)) && ("string" === typeof input.locationId && (1 <= input.locationId.length || $guard(_exceptionable, {
193
- path: _path + ".locationId",
194
- expected: "string & MinLength<1>",
195
- value: input.locationId
196
- }, errorFactory)) || $guard(_exceptionable, {
197
- path: _path + ".locationId",
198
- expected: "(string & MinLength<1>)",
199
- value: input.locationId
200
- }, errorFactory)) && ("string" === typeof input.blockId && (1 <= input.blockId.length || $guard(_exceptionable, {
201
- path: _path + ".blockId",
202
- expected: "string & MinLength<1>",
203
- value: input.blockId
204
- }, errorFactory)) || $guard(_exceptionable, {
205
- path: _path + ".blockId",
206
- expected: "(string & MinLength<1>)",
207
- value: input.blockId
208
+ const $ao0 = (input, _path, _exceptionable = true) => ("string" === typeof input.id && (/^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.id) || $guard(_exceptionable, {
209
+ path: _path + ".id",
210
+ expected: "string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">",
211
+ value: input.id
212
+ }, errorFactory)) || $guard(_exceptionable, {
213
+ path: _path + ".id",
214
+ expected: "(string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">)",
215
+ value: input.id
216
+ }, errorFactory)) && ("string" === typeof input.file && (/^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.file) || $guard(_exceptionable, {
217
+ path: _path + ".file",
218
+ expected: "string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">",
219
+ value: input.file
220
+ }, errorFactory)) || $guard(_exceptionable, {
221
+ path: _path + ".file",
222
+ expected: "(string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">)",
223
+ value: input.file
224
+ }, errorFactory)) && ("string" === typeof input.location && (/^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.location) || $guard(_exceptionable, {
225
+ path: _path + ".location",
226
+ expected: "string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">",
227
+ value: input.location
228
+ }, errorFactory)) || $guard(_exceptionable, {
229
+ path: _path + ".location",
230
+ expected: "(string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">)",
231
+ value: input.location
232
+ }, errorFactory)) && ("string" === typeof input.block && (/^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.block) || $guard(_exceptionable, {
233
+ path: _path + ".block",
234
+ expected: "string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">",
235
+ value: input.block
236
+ }, errorFactory)) || $guard(_exceptionable, {
237
+ path: _path + ".block",
238
+ expected: "(string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">)",
239
+ value: input.block
208
240
  }, errorFactory)) && (null === input.offset || "number" === typeof input.offset && (0 <= input.offset || $guard(_exceptionable, {
209
241
  path: _path + ".offset",
210
242
  expected: "number & Minimum<0>",
211
243
  value: input.offset
212
- }, errorFactory)) || $guard(_exceptionable, {
244
+ }, errorFactory)) && (Math.floor(input.offset) === input.offset && 0 <= input.offset && input.offset <= 4294967295 || $guard(_exceptionable, {
213
245
  path: _path + ".offset",
214
- expected: "((number & Minimum<0>) | null)",
246
+ expected: "number & Type<\"uint32\">",
215
247
  value: input.offset
216
- }, errorFactory)) && (null === input.position || "number" === typeof input.position && (0 <= input.position || $guard(_exceptionable, {
217
- path: _path + ".position",
218
- expected: "number & Minimum<0>",
219
- value: input.position
220
248
  }, errorFactory)) || $guard(_exceptionable, {
221
- path: _path + ".position",
222
- expected: "((number & Minimum<0>) | null)",
223
- value: input.position
249
+ path: _path + ".offset",
250
+ expected: "((number & Minimum<0> & Type<\"uint32\">) | null)",
251
+ value: input.offset
224
252
  }, errorFactory)) && (null === input.size || "number" === typeof input.size && (0 <= input.size || $guard(_exceptionable, {
225
253
  path: _path + ".size",
226
254
  expected: "number & Minimum<0>",
227
255
  value: input.size
256
+ }, errorFactory)) && (Math.floor(input.size) === input.size && 0 <= input.size && input.size <= 4294967295 || $guard(_exceptionable, {
257
+ path: _path + ".size",
258
+ expected: "number & Type<\"uint32\">",
259
+ value: input.size
228
260
  }, errorFactory)) || $guard(_exceptionable, {
229
261
  path: _path + ".size",
230
- expected: "((number & Minimum<0>) | null)",
262
+ expected: "((number & Minimum<0> & Type<\"uint32\">) | null)",
231
263
  value: input.size
232
264
  }, errorFactory)) && (null === input.hash || "string" === typeof input.hash && (input.hash.length <= 0 || /^[A-Fa-f0-9]{32}$/.test(input.hash) || $guard(_exceptionable, {
233
265
  path: _path + ".hash",
@@ -241,9 +273,13 @@ export const assertGuardBlock = (input, errorFactory) => {
241
273
  path: _path + ".btime",
242
274
  expected: "number & Minimum<0>",
243
275
  value: input.btime
276
+ }, errorFactory)) && (Math.floor(input.btime) === input.btime && 0 <= input.btime && input.btime <= 4294967295 || $guard(_exceptionable, {
277
+ path: _path + ".btime",
278
+ expected: "number & Type<\"uint32\">",
279
+ value: input.btime
244
280
  }, errorFactory)) || $guard(_exceptionable, {
245
281
  path: _path + ".btime",
246
- expected: "((number & Minimum<0>) | null)",
282
+ expected: "((number & Minimum<0> & Type<\"uint32\">) | null)",
247
283
  value: input.btime
248
284
  }, errorFactory));
249
285
  return ("object" === typeof input && null !== input || $guard(true, {
@@ -259,76 +295,410 @@ export const assertGuardBlock = (input, errorFactory) => {
259
295
  };
260
296
  export const stringifyBlock = input => {
261
297
  const $string = __typia.json.createStringify.string;
262
- const $so0 = input => `{"fileId":${$string(input.fileId)},"locationId":${$string(input.locationId)},"blockId":${$string(input.blockId)},"offset":${null !== input.offset ? input.offset : "null"},"position":${null !== input.position ? input.position : "null"},"size":${null !== input.size ? input.size : "null"},"hash":${null !== input.hash ? $string(input.hash) : "null"},"btime":${null !== input.btime ? input.btime : "null"}}`;
298
+ const $so0 = input => `{"id":${$string(input.id)},"file":${$string(input.file)},"location":${$string(input.location)},"block":${$string(input.block)},"offset":${null !== input.offset ? input.offset : "null"},"size":${null !== input.size ? input.size : "null"},"hash":${null !== input.hash ? $string(input.hash) : "null"},"btime":${null !== input.btime ? input.btime : "null"}}`;
263
299
  return $so0(input);
264
300
  };
265
301
  export const assertStringifyBlock = (input, errorFactory) => { const assert = (input, errorFactory) => {
266
302
  const __is = input => {
267
- const $io0 = input => "string" === typeof input.fileId && 1 <= input.fileId.length && ("string" === typeof input.locationId && 1 <= input.locationId.length) && ("string" === typeof input.blockId && 1 <= input.blockId.length) && (null === input.offset || "number" === typeof input.offset && (!Number.isNaN(input.offset) && 0 <= input.offset)) && (null === input.position || "number" === typeof input.position && (!Number.isNaN(input.position) && 0 <= input.position)) && (null === input.size || "number" === typeof input.size && (!Number.isNaN(input.size) && 0 <= input.size)) && (null === input.hash || "string" === typeof input.hash && (input.hash.length <= 0 || /^[A-Fa-f0-9]{32}$/.test(input.hash))) && (null === input.btime || "number" === typeof input.btime && (!Number.isNaN(input.btime) && 0 <= input.btime));
303
+ const $io0 = input => "string" === typeof input.id && /^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.id) && ("string" === typeof input.file && /^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.file)) && ("string" === typeof input.location && /^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.location)) && ("string" === typeof input.block && /^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.block)) && (null === input.offset || "number" === typeof input.offset && (0 <= input.offset && (Math.floor(input.offset) === input.offset && 0 <= input.offset && input.offset <= 4294967295))) && (null === input.size || "number" === typeof input.size && (0 <= input.size && (Math.floor(input.size) === input.size && 0 <= input.size && input.size <= 4294967295))) && (null === input.hash || "string" === typeof input.hash && (input.hash.length <= 0 || /^[A-Fa-f0-9]{32}$/.test(input.hash))) && (null === input.btime || "number" === typeof input.btime && (0 <= input.btime && (Math.floor(input.btime) === input.btime && 0 <= input.btime && input.btime <= 4294967295)));
268
304
  return "object" === typeof input && null !== input && $io0(input);
269
305
  };
270
306
  if (false === __is(input))
271
307
  ((input, _path, _exceptionable = true) => {
272
308
  const $guard = __typia.json.createAssertStringify.guard;
273
- const $ao0 = (input, _path, _exceptionable = true) => ("string" === typeof input.fileId && (1 <= input.fileId.length || $guard(_exceptionable, {
274
- path: _path + ".fileId",
275
- expected: "string & MinLength<1>",
276
- value: input.fileId
277
- }, errorFactory)) || $guard(_exceptionable, {
278
- path: _path + ".fileId",
279
- expected: "(string & MinLength<1>)",
280
- value: input.fileId
281
- }, errorFactory)) && ("string" === typeof input.locationId && (1 <= input.locationId.length || $guard(_exceptionable, {
282
- path: _path + ".locationId",
283
- expected: "string & MinLength<1>",
284
- value: input.locationId
285
- }, errorFactory)) || $guard(_exceptionable, {
286
- path: _path + ".locationId",
287
- expected: "(string & MinLength<1>)",
288
- value: input.locationId
289
- }, errorFactory)) && ("string" === typeof input.blockId && (1 <= input.blockId.length || $guard(_exceptionable, {
290
- path: _path + ".blockId",
291
- expected: "string & MinLength<1>",
292
- value: input.blockId
293
- }, errorFactory)) || $guard(_exceptionable, {
294
- path: _path + ".blockId",
295
- expected: "(string & MinLength<1>)",
296
- value: input.blockId
297
- }, errorFactory)) && (null === input.offset || "number" === typeof input.offset && (!Number.isNaN(input.offset) || $guard(_exceptionable, {
309
+ const $ao0 = (input, _path, _exceptionable = true) => ("string" === typeof input.id && (/^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.id) || $guard(_exceptionable, {
310
+ path: _path + ".id",
311
+ expected: "string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">",
312
+ value: input.id
313
+ }, errorFactory)) || $guard(_exceptionable, {
314
+ path: _path + ".id",
315
+ expected: "(string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">)",
316
+ value: input.id
317
+ }, errorFactory)) && ("string" === typeof input.file && (/^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.file) || $guard(_exceptionable, {
318
+ path: _path + ".file",
319
+ expected: "string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">",
320
+ value: input.file
321
+ }, errorFactory)) || $guard(_exceptionable, {
322
+ path: _path + ".file",
323
+ expected: "(string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">)",
324
+ value: input.file
325
+ }, errorFactory)) && ("string" === typeof input.location && (/^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.location) || $guard(_exceptionable, {
326
+ path: _path + ".location",
327
+ expected: "string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">",
328
+ value: input.location
329
+ }, errorFactory)) || $guard(_exceptionable, {
330
+ path: _path + ".location",
331
+ expected: "(string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">)",
332
+ value: input.location
333
+ }, errorFactory)) && ("string" === typeof input.block && (/^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.block) || $guard(_exceptionable, {
334
+ path: _path + ".block",
335
+ expected: "string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">",
336
+ value: input.block
337
+ }, errorFactory)) || $guard(_exceptionable, {
338
+ path: _path + ".block",
339
+ expected: "(string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">)",
340
+ value: input.block
341
+ }, errorFactory)) && (null === input.offset || "number" === typeof input.offset && (0 <= input.offset || $guard(_exceptionable, {
298
342
  path: _path + ".offset",
299
- expected: "number",
343
+ expected: "number & Minimum<0>",
300
344
  value: input.offset
301
- }, errorFactory)) && (0 <= input.offset || $guard(_exceptionable, {
345
+ }, errorFactory)) && (Math.floor(input.offset) === input.offset && 0 <= input.offset && input.offset <= 4294967295 || $guard(_exceptionable, {
302
346
  path: _path + ".offset",
303
- expected: "number & Minimum<0>",
347
+ expected: "number & Type<\"uint32\">",
304
348
  value: input.offset
305
349
  }, errorFactory)) || $guard(_exceptionable, {
306
350
  path: _path + ".offset",
307
- expected: "((number & Minimum<0>) | null)",
351
+ expected: "((number & Minimum<0> & Type<\"uint32\">) | null)",
308
352
  value: input.offset
309
- }, errorFactory)) && (null === input.position || "number" === typeof input.position && (!Number.isNaN(input.position) || $guard(_exceptionable, {
353
+ }, errorFactory)) && (null === input.size || "number" === typeof input.size && (0 <= input.size || $guard(_exceptionable, {
354
+ path: _path + ".size",
355
+ expected: "number & Minimum<0>",
356
+ value: input.size
357
+ }, errorFactory)) && (Math.floor(input.size) === input.size && 0 <= input.size && input.size <= 4294967295 || $guard(_exceptionable, {
358
+ path: _path + ".size",
359
+ expected: "number & Type<\"uint32\">",
360
+ value: input.size
361
+ }, errorFactory)) || $guard(_exceptionable, {
362
+ path: _path + ".size",
363
+ expected: "((number & Minimum<0> & Type<\"uint32\">) | null)",
364
+ value: input.size
365
+ }, errorFactory)) && (null === input.hash || "string" === typeof input.hash && (input.hash.length <= 0 || /^[A-Fa-f0-9]{32}$/.test(input.hash) || $guard(_exceptionable, {
366
+ path: _path + ".hash",
367
+ expected: "(string & (MaxLength<0> | Pattern<\"^[A-Fa-f0-9]{32}$\">))",
368
+ value: input.hash
369
+ }, errorFactory)) || $guard(_exceptionable, {
370
+ path: _path + ".hash",
371
+ expected: "((string & (MaxLength<0> | Pattern<\"^[A-Fa-f0-9]{32}$\">)) | null)",
372
+ value: input.hash
373
+ }, errorFactory)) && (null === input.btime || "number" === typeof input.btime && (0 <= input.btime || $guard(_exceptionable, {
374
+ path: _path + ".btime",
375
+ expected: "number & Minimum<0>",
376
+ value: input.btime
377
+ }, errorFactory)) && (Math.floor(input.btime) === input.btime && 0 <= input.btime && input.btime <= 4294967295 || $guard(_exceptionable, {
378
+ path: _path + ".btime",
379
+ expected: "number & Type<\"uint32\">",
380
+ value: input.btime
381
+ }, errorFactory)) || $guard(_exceptionable, {
382
+ path: _path + ".btime",
383
+ expected: "((number & Minimum<0> & Type<\"uint32\">) | null)",
384
+ value: input.btime
385
+ }, errorFactory));
386
+ return ("object" === typeof input && null !== input || $guard(true, {
387
+ path: _path + "",
388
+ expected: "Block",
389
+ value: input
390
+ }, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
391
+ path: _path + "",
392
+ expected: "Block",
393
+ value: input
394
+ }, errorFactory);
395
+ })(input, "$input", true);
396
+ return input;
397
+ }; const stringify = input => {
398
+ const $string = __typia.json.createAssertStringify.string;
399
+ const $so0 = input => `{"id":${$string(input.id)},"file":${$string(input.file)},"location":${$string(input.location)},"block":${$string(input.block)},"offset":${null !== input.offset ? input.offset : "null"},"size":${null !== input.size ? input.size : "null"},"hash":${null !== input.hash ? $string(input.hash) : "null"},"btime":${null !== input.btime ? input.btime : "null"}}`;
400
+ return $so0(input);
401
+ }; return stringify(assert(input, errorFactory)); };
402
+ export const isBlockStats = input => {
403
+ const $io0 = input => (null === input.position || "number" === typeof input.position && (0 <= input.position && (Math.floor(input.position) === input.position && 0 <= input.position && input.position <= 4294967295))) && ("string" === typeof input.id && /^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.id)) && ("string" === typeof input.file && /^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.file)) && ("string" === typeof input.location && /^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.location)) && ("string" === typeof input.block && /^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.block)) && (null === input.offset || "number" === typeof input.offset && (0 <= input.offset && (Math.floor(input.offset) === input.offset && 0 <= input.offset && input.offset <= 4294967295))) && (null === input.size || "number" === typeof input.size && (0 <= input.size && (Math.floor(input.size) === input.size && 0 <= input.size && input.size <= 4294967295))) && (null === input.hash || "string" === typeof input.hash && (input.hash.length <= 0 || /^[A-Fa-f0-9]{32}$/.test(input.hash))) && (null === input.btime || "number" === typeof input.btime && (0 <= input.btime && (Math.floor(input.btime) === input.btime && 0 <= input.btime && input.btime <= 4294967295)));
404
+ return "object" === typeof input && null !== input && $io0(input);
405
+ };
406
+ export const assertBlockStats = (input, errorFactory) => {
407
+ const __is = input => {
408
+ const $io0 = input => (null === input.position || "number" === typeof input.position && (0 <= input.position && (Math.floor(input.position) === input.position && 0 <= input.position && input.position <= 4294967295))) && ("string" === typeof input.id && /^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.id)) && ("string" === typeof input.file && /^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.file)) && ("string" === typeof input.location && /^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.location)) && ("string" === typeof input.block && /^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.block)) && (null === input.offset || "number" === typeof input.offset && (0 <= input.offset && (Math.floor(input.offset) === input.offset && 0 <= input.offset && input.offset <= 4294967295))) && (null === input.size || "number" === typeof input.size && (0 <= input.size && (Math.floor(input.size) === input.size && 0 <= input.size && input.size <= 4294967295))) && (null === input.hash || "string" === typeof input.hash && (input.hash.length <= 0 || /^[A-Fa-f0-9]{32}$/.test(input.hash))) && (null === input.btime || "number" === typeof input.btime && (0 <= input.btime && (Math.floor(input.btime) === input.btime && 0 <= input.btime && input.btime <= 4294967295)));
409
+ return "object" === typeof input && null !== input && $io0(input);
410
+ };
411
+ if (false === __is(input))
412
+ ((input, _path, _exceptionable = true) => {
413
+ const $guard = __typia.createAssert.guard;
414
+ const $ao0 = (input, _path, _exceptionable = true) => (null === input.position || "number" === typeof input.position && (0 <= input.position || $guard(_exceptionable, {
310
415
  path: _path + ".position",
311
- expected: "number",
416
+ expected: "number & Minimum<0>",
312
417
  value: input.position
313
- }, errorFactory)) && (0 <= input.position || $guard(_exceptionable, {
418
+ }, errorFactory)) && (Math.floor(input.position) === input.position && 0 <= input.position && input.position <= 4294967295 || $guard(_exceptionable, {
314
419
  path: _path + ".position",
315
- expected: "number & Minimum<0>",
420
+ expected: "number & Type<\"uint32\">",
316
421
  value: input.position
317
422
  }, errorFactory)) || $guard(_exceptionable, {
318
423
  path: _path + ".position",
319
- expected: "((number & Minimum<0>) | null)",
424
+ expected: "((number & Minimum<0> & Type<\"uint32\">) | null)",
320
425
  value: input.position
321
- }, errorFactory)) && (null === input.size || "number" === typeof input.size && (!Number.isNaN(input.size) || $guard(_exceptionable, {
426
+ }, errorFactory)) && ("string" === typeof input.id && (/^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.id) || $guard(_exceptionable, {
427
+ path: _path + ".id",
428
+ expected: "string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">",
429
+ value: input.id
430
+ }, errorFactory)) || $guard(_exceptionable, {
431
+ path: _path + ".id",
432
+ expected: "(string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">)",
433
+ value: input.id
434
+ }, errorFactory)) && ("string" === typeof input.file && (/^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.file) || $guard(_exceptionable, {
435
+ path: _path + ".file",
436
+ expected: "string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">",
437
+ value: input.file
438
+ }, errorFactory)) || $guard(_exceptionable, {
439
+ path: _path + ".file",
440
+ expected: "(string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">)",
441
+ value: input.file
442
+ }, errorFactory)) && ("string" === typeof input.location && (/^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.location) || $guard(_exceptionable, {
443
+ path: _path + ".location",
444
+ expected: "string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">",
445
+ value: input.location
446
+ }, errorFactory)) || $guard(_exceptionable, {
447
+ path: _path + ".location",
448
+ expected: "(string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">)",
449
+ value: input.location
450
+ }, errorFactory)) && ("string" === typeof input.block && (/^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.block) || $guard(_exceptionable, {
451
+ path: _path + ".block",
452
+ expected: "string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">",
453
+ value: input.block
454
+ }, errorFactory)) || $guard(_exceptionable, {
455
+ path: _path + ".block",
456
+ expected: "(string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">)",
457
+ value: input.block
458
+ }, errorFactory)) && (null === input.offset || "number" === typeof input.offset && (0 <= input.offset || $guard(_exceptionable, {
459
+ path: _path + ".offset",
460
+ expected: "number & Minimum<0>",
461
+ value: input.offset
462
+ }, errorFactory)) && (Math.floor(input.offset) === input.offset && 0 <= input.offset && input.offset <= 4294967295 || $guard(_exceptionable, {
463
+ path: _path + ".offset",
464
+ expected: "number & Type<\"uint32\">",
465
+ value: input.offset
466
+ }, errorFactory)) || $guard(_exceptionable, {
467
+ path: _path + ".offset",
468
+ expected: "((number & Minimum<0> & Type<\"uint32\">) | null)",
469
+ value: input.offset
470
+ }, errorFactory)) && (null === input.size || "number" === typeof input.size && (0 <= input.size || $guard(_exceptionable, {
471
+ path: _path + ".size",
472
+ expected: "number & Minimum<0>",
473
+ value: input.size
474
+ }, errorFactory)) && (Math.floor(input.size) === input.size && 0 <= input.size && input.size <= 4294967295 || $guard(_exceptionable, {
475
+ path: _path + ".size",
476
+ expected: "number & Type<\"uint32\">",
477
+ value: input.size
478
+ }, errorFactory)) || $guard(_exceptionable, {
322
479
  path: _path + ".size",
323
- expected: "number",
480
+ expected: "((number & Minimum<0> & Type<\"uint32\">) | null)",
324
481
  value: input.size
325
- }, errorFactory)) && (0 <= input.size || $guard(_exceptionable, {
482
+ }, errorFactory)) && (null === input.hash || "string" === typeof input.hash && (input.hash.length <= 0 || /^[A-Fa-f0-9]{32}$/.test(input.hash) || $guard(_exceptionable, {
483
+ path: _path + ".hash",
484
+ expected: "(string & (MaxLength<0> | Pattern<\"^[A-Fa-f0-9]{32}$\">))",
485
+ value: input.hash
486
+ }, errorFactory)) || $guard(_exceptionable, {
487
+ path: _path + ".hash",
488
+ expected: "((string & (MaxLength<0> | Pattern<\"^[A-Fa-f0-9]{32}$\">)) | null)",
489
+ value: input.hash
490
+ }, errorFactory)) && (null === input.btime || "number" === typeof input.btime && (0 <= input.btime || $guard(_exceptionable, {
491
+ path: _path + ".btime",
492
+ expected: "number & Minimum<0>",
493
+ value: input.btime
494
+ }, errorFactory)) && (Math.floor(input.btime) === input.btime && 0 <= input.btime && input.btime <= 4294967295 || $guard(_exceptionable, {
495
+ path: _path + ".btime",
496
+ expected: "number & Type<\"uint32\">",
497
+ value: input.btime
498
+ }, errorFactory)) || $guard(_exceptionable, {
499
+ path: _path + ".btime",
500
+ expected: "((number & Minimum<0> & Type<\"uint32\">) | null)",
501
+ value: input.btime
502
+ }, errorFactory));
503
+ return ("object" === typeof input && null !== input || $guard(true, {
504
+ path: _path + "",
505
+ expected: "BlockStats",
506
+ value: input
507
+ }, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
508
+ path: _path + "",
509
+ expected: "BlockStats",
510
+ value: input
511
+ }, errorFactory);
512
+ })(input, "$input", true);
513
+ return input;
514
+ };
515
+ export const randomBlockStats = generator => {
516
+ const $generator = __typia.createRandom.generator;
517
+ const $pick = __typia.createRandom.pick;
518
+ const $ro0 = (_recursive = false, _depth = 0) => ({
519
+ position: $pick([
520
+ () => null,
521
+ () => (generator?.customs ?? $generator.customs)?.number?.([
522
+ {
523
+ name: "Minimum<0>",
524
+ kind: "minimum",
525
+ value: 0
526
+ },
527
+ {
528
+ name: "Type<\"uint32\">",
529
+ kind: "type",
530
+ value: "uint32"
531
+ }
532
+ ]) ?? (generator?.integer ?? $generator.integer)(0, 10)
533
+ ])(),
534
+ id: (generator?.customs ?? $generator.customs)?.string?.([
535
+ {
536
+ name: "Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">",
537
+ kind: "pattern",
538
+ value: "^[0-9A-Za-z~][0-9A-Za-z~._: -]*$"
539
+ }
540
+ ]) ?? (generator?.pattern ?? $generator.pattern)(/^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/),
541
+ file: (generator?.customs ?? $generator.customs)?.string?.([
542
+ {
543
+ name: "Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">",
544
+ kind: "pattern",
545
+ value: "^[0-9A-Za-z~][0-9A-Za-z~._: -]*$"
546
+ }
547
+ ]) ?? (generator?.pattern ?? $generator.pattern)(/^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/),
548
+ location: (generator?.customs ?? $generator.customs)?.string?.([
549
+ {
550
+ name: "Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">",
551
+ kind: "pattern",
552
+ value: "^[0-9A-Za-z~][0-9A-Za-z~._: -]*$"
553
+ }
554
+ ]) ?? (generator?.pattern ?? $generator.pattern)(/^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/),
555
+ block: (generator?.customs ?? $generator.customs)?.string?.([
556
+ {
557
+ name: "Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">",
558
+ kind: "pattern",
559
+ value: "^[0-9A-Za-z~][0-9A-Za-z~._: -]*$"
560
+ }
561
+ ]) ?? (generator?.pattern ?? $generator.pattern)(/^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/),
562
+ offset: $pick([
563
+ () => null,
564
+ () => (generator?.customs ?? $generator.customs)?.number?.([
565
+ {
566
+ name: "Minimum<0>",
567
+ kind: "minimum",
568
+ value: 0
569
+ },
570
+ {
571
+ name: "Type<\"uint32\">",
572
+ kind: "type",
573
+ value: "uint32"
574
+ }
575
+ ]) ?? (generator?.integer ?? $generator.integer)(0, 10)
576
+ ])(),
577
+ size: $pick([
578
+ () => null,
579
+ () => (generator?.customs ?? $generator.customs)?.number?.([
580
+ {
581
+ name: "Minimum<0>",
582
+ kind: "minimum",
583
+ value: 0
584
+ },
585
+ {
586
+ name: "Type<\"uint32\">",
587
+ kind: "type",
588
+ value: "uint32"
589
+ }
590
+ ]) ?? (generator?.integer ?? $generator.integer)(0, 10)
591
+ ])(),
592
+ hash: $pick([
593
+ () => null,
594
+ () => (generator?.customs ?? $generator.customs)?.string?.([
595
+ {
596
+ name: "MaxLength<0>",
597
+ kind: "maxLength",
598
+ value: 0
599
+ }
600
+ ]) ?? (generator?.string ?? $generator.string)((generator?.integer ?? $generator.integer)(0, 0)),
601
+ () => (generator?.customs ?? $generator.customs)?.string?.([
602
+ {
603
+ name: "Pattern<\"^[A-Fa-f0-9]{32}$\">",
604
+ kind: "pattern",
605
+ value: "^[A-Fa-f0-9]{32}$"
606
+ }
607
+ ]) ?? (generator?.pattern ?? $generator.pattern)(/^[A-Fa-f0-9]{32}$/)
608
+ ])(),
609
+ btime: $pick([
610
+ () => null,
611
+ () => (generator?.customs ?? $generator.customs)?.number?.([
612
+ {
613
+ name: "Minimum<0>",
614
+ kind: "minimum",
615
+ value: 0
616
+ },
617
+ {
618
+ name: "Type<\"uint32\">",
619
+ kind: "type",
620
+ value: "uint32"
621
+ }
622
+ ]) ?? (generator?.integer ?? $generator.integer)(0, 10)
623
+ ])()
624
+ });
625
+ return $ro0();
626
+ };
627
+ export const assertGuardBlockStats = (input, errorFactory) => {
628
+ const __is = input => {
629
+ const $io0 = input => (null === input.position || "number" === typeof input.position && (0 <= input.position && (Math.floor(input.position) === input.position && 0 <= input.position && input.position <= 4294967295))) && ("string" === typeof input.id && /^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.id)) && ("string" === typeof input.file && /^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.file)) && ("string" === typeof input.location && /^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.location)) && ("string" === typeof input.block && /^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.block)) && (null === input.offset || "number" === typeof input.offset && (0 <= input.offset && (Math.floor(input.offset) === input.offset && 0 <= input.offset && input.offset <= 4294967295))) && (null === input.size || "number" === typeof input.size && (0 <= input.size && (Math.floor(input.size) === input.size && 0 <= input.size && input.size <= 4294967295))) && (null === input.hash || "string" === typeof input.hash && (input.hash.length <= 0 || /^[A-Fa-f0-9]{32}$/.test(input.hash))) && (null === input.btime || "number" === typeof input.btime && (0 <= input.btime && (Math.floor(input.btime) === input.btime && 0 <= input.btime && input.btime <= 4294967295)));
630
+ return "object" === typeof input && null !== input && $io0(input);
631
+ };
632
+ if (false === __is(input))
633
+ ((input, _path, _exceptionable = true) => {
634
+ const $guard = __typia.createAssertGuard.guard;
635
+ const $ao0 = (input, _path, _exceptionable = true) => (null === input.position || "number" === typeof input.position && (0 <= input.position || $guard(_exceptionable, {
636
+ path: _path + ".position",
637
+ expected: "number & Minimum<0>",
638
+ value: input.position
639
+ }, errorFactory)) && (Math.floor(input.position) === input.position && 0 <= input.position && input.position <= 4294967295 || $guard(_exceptionable, {
640
+ path: _path + ".position",
641
+ expected: "number & Type<\"uint32\">",
642
+ value: input.position
643
+ }, errorFactory)) || $guard(_exceptionable, {
644
+ path: _path + ".position",
645
+ expected: "((number & Minimum<0> & Type<\"uint32\">) | null)",
646
+ value: input.position
647
+ }, errorFactory)) && ("string" === typeof input.id && (/^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.id) || $guard(_exceptionable, {
648
+ path: _path + ".id",
649
+ expected: "string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">",
650
+ value: input.id
651
+ }, errorFactory)) || $guard(_exceptionable, {
652
+ path: _path + ".id",
653
+ expected: "(string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">)",
654
+ value: input.id
655
+ }, errorFactory)) && ("string" === typeof input.file && (/^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.file) || $guard(_exceptionable, {
656
+ path: _path + ".file",
657
+ expected: "string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">",
658
+ value: input.file
659
+ }, errorFactory)) || $guard(_exceptionable, {
660
+ path: _path + ".file",
661
+ expected: "(string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">)",
662
+ value: input.file
663
+ }, errorFactory)) && ("string" === typeof input.location && (/^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.location) || $guard(_exceptionable, {
664
+ path: _path + ".location",
665
+ expected: "string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">",
666
+ value: input.location
667
+ }, errorFactory)) || $guard(_exceptionable, {
668
+ path: _path + ".location",
669
+ expected: "(string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">)",
670
+ value: input.location
671
+ }, errorFactory)) && ("string" === typeof input.block && (/^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.block) || $guard(_exceptionable, {
672
+ path: _path + ".block",
673
+ expected: "string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">",
674
+ value: input.block
675
+ }, errorFactory)) || $guard(_exceptionable, {
676
+ path: _path + ".block",
677
+ expected: "(string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">)",
678
+ value: input.block
679
+ }, errorFactory)) && (null === input.offset || "number" === typeof input.offset && (0 <= input.offset || $guard(_exceptionable, {
680
+ path: _path + ".offset",
681
+ expected: "number & Minimum<0>",
682
+ value: input.offset
683
+ }, errorFactory)) && (Math.floor(input.offset) === input.offset && 0 <= input.offset && input.offset <= 4294967295 || $guard(_exceptionable, {
684
+ path: _path + ".offset",
685
+ expected: "number & Type<\"uint32\">",
686
+ value: input.offset
687
+ }, errorFactory)) || $guard(_exceptionable, {
688
+ path: _path + ".offset",
689
+ expected: "((number & Minimum<0> & Type<\"uint32\">) | null)",
690
+ value: input.offset
691
+ }, errorFactory)) && (null === input.size || "number" === typeof input.size && (0 <= input.size || $guard(_exceptionable, {
326
692
  path: _path + ".size",
327
693
  expected: "number & Minimum<0>",
328
694
  value: input.size
695
+ }, errorFactory)) && (Math.floor(input.size) === input.size && 0 <= input.size && input.size <= 4294967295 || $guard(_exceptionable, {
696
+ path: _path + ".size",
697
+ expected: "number & Type<\"uint32\">",
698
+ value: input.size
329
699
  }, errorFactory)) || $guard(_exceptionable, {
330
700
  path: _path + ".size",
331
- expected: "((number & Minimum<0>) | null)",
701
+ expected: "((number & Minimum<0> & Type<\"uint32\">) | null)",
332
702
  value: input.size
333
703
  }, errorFactory)) && (null === input.hash || "string" === typeof input.hash && (input.hash.length <= 0 || /^[A-Fa-f0-9]{32}$/.test(input.hash) || $guard(_exceptionable, {
334
704
  path: _path + ".hash",
@@ -338,94 +708,215 @@ export const assertStringifyBlock = (input, errorFactory) => { const assert = (i
338
708
  path: _path + ".hash",
339
709
  expected: "((string & (MaxLength<0> | Pattern<\"^[A-Fa-f0-9]{32}$\">)) | null)",
340
710
  value: input.hash
341
- }, errorFactory)) && (null === input.btime || "number" === typeof input.btime && (!Number.isNaN(input.btime) || $guard(_exceptionable, {
711
+ }, errorFactory)) && (null === input.btime || "number" === typeof input.btime && (0 <= input.btime || $guard(_exceptionable, {
712
+ path: _path + ".btime",
713
+ expected: "number & Minimum<0>",
714
+ value: input.btime
715
+ }, errorFactory)) && (Math.floor(input.btime) === input.btime && 0 <= input.btime && input.btime <= 4294967295 || $guard(_exceptionable, {
342
716
  path: _path + ".btime",
343
- expected: "number",
717
+ expected: "number & Type<\"uint32\">",
344
718
  value: input.btime
345
- }, errorFactory)) && (0 <= input.btime || $guard(_exceptionable, {
719
+ }, errorFactory)) || $guard(_exceptionable, {
720
+ path: _path + ".btime",
721
+ expected: "((number & Minimum<0> & Type<\"uint32\">) | null)",
722
+ value: input.btime
723
+ }, errorFactory));
724
+ return ("object" === typeof input && null !== input || $guard(true, {
725
+ path: _path + "",
726
+ expected: "BlockStats",
727
+ value: input
728
+ }, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
729
+ path: _path + "",
730
+ expected: "BlockStats",
731
+ value: input
732
+ }, errorFactory);
733
+ })(input, "$input", true);
734
+ };
735
+ export const stringifyBlockStats = input => {
736
+ const $string = __typia.json.createStringify.string;
737
+ const $so0 = input => `{"position":${null !== input.position ? input.position : "null"},"id":${$string(input.id)},"file":${$string(input.file)},"location":${$string(input.location)},"block":${$string(input.block)},"offset":${null !== input.offset ? input.offset : "null"},"size":${null !== input.size ? input.size : "null"},"hash":${null !== input.hash ? $string(input.hash) : "null"},"btime":${null !== input.btime ? input.btime : "null"}}`;
738
+ return $so0(input);
739
+ };
740
+ export const assertStringifyBlockStats = (input, errorFactory) => { const assert = (input, errorFactory) => {
741
+ const __is = input => {
742
+ const $io0 = input => (null === input.position || "number" === typeof input.position && (0 <= input.position && (Math.floor(input.position) === input.position && 0 <= input.position && input.position <= 4294967295))) && ("string" === typeof input.id && /^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.id)) && ("string" === typeof input.file && /^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.file)) && ("string" === typeof input.location && /^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.location)) && ("string" === typeof input.block && /^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.block)) && (null === input.offset || "number" === typeof input.offset && (0 <= input.offset && (Math.floor(input.offset) === input.offset && 0 <= input.offset && input.offset <= 4294967295))) && (null === input.size || "number" === typeof input.size && (0 <= input.size && (Math.floor(input.size) === input.size && 0 <= input.size && input.size <= 4294967295))) && (null === input.hash || "string" === typeof input.hash && (input.hash.length <= 0 || /^[A-Fa-f0-9]{32}$/.test(input.hash))) && (null === input.btime || "number" === typeof input.btime && (0 <= input.btime && (Math.floor(input.btime) === input.btime && 0 <= input.btime && input.btime <= 4294967295)));
743
+ return "object" === typeof input && null !== input && $io0(input);
744
+ };
745
+ if (false === __is(input))
746
+ ((input, _path, _exceptionable = true) => {
747
+ const $guard = __typia.json.createAssertStringify.guard;
748
+ const $ao0 = (input, _path, _exceptionable = true) => (null === input.position || "number" === typeof input.position && (0 <= input.position || $guard(_exceptionable, {
749
+ path: _path + ".position",
750
+ expected: "number & Minimum<0>",
751
+ value: input.position
752
+ }, errorFactory)) && (Math.floor(input.position) === input.position && 0 <= input.position && input.position <= 4294967295 || $guard(_exceptionable, {
753
+ path: _path + ".position",
754
+ expected: "number & Type<\"uint32\">",
755
+ value: input.position
756
+ }, errorFactory)) || $guard(_exceptionable, {
757
+ path: _path + ".position",
758
+ expected: "((number & Minimum<0> & Type<\"uint32\">) | null)",
759
+ value: input.position
760
+ }, errorFactory)) && ("string" === typeof input.id && (/^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.id) || $guard(_exceptionable, {
761
+ path: _path + ".id",
762
+ expected: "string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">",
763
+ value: input.id
764
+ }, errorFactory)) || $guard(_exceptionable, {
765
+ path: _path + ".id",
766
+ expected: "(string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">)",
767
+ value: input.id
768
+ }, errorFactory)) && ("string" === typeof input.file && (/^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.file) || $guard(_exceptionable, {
769
+ path: _path + ".file",
770
+ expected: "string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">",
771
+ value: input.file
772
+ }, errorFactory)) || $guard(_exceptionable, {
773
+ path: _path + ".file",
774
+ expected: "(string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">)",
775
+ value: input.file
776
+ }, errorFactory)) && ("string" === typeof input.location && (/^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.location) || $guard(_exceptionable, {
777
+ path: _path + ".location",
778
+ expected: "string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">",
779
+ value: input.location
780
+ }, errorFactory)) || $guard(_exceptionable, {
781
+ path: _path + ".location",
782
+ expected: "(string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">)",
783
+ value: input.location
784
+ }, errorFactory)) && ("string" === typeof input.block && (/^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.block) || $guard(_exceptionable, {
785
+ path: _path + ".block",
786
+ expected: "string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">",
787
+ value: input.block
788
+ }, errorFactory)) || $guard(_exceptionable, {
789
+ path: _path + ".block",
790
+ expected: "(string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">)",
791
+ value: input.block
792
+ }, errorFactory)) && (null === input.offset || "number" === typeof input.offset && (0 <= input.offset || $guard(_exceptionable, {
793
+ path: _path + ".offset",
794
+ expected: "number & Minimum<0>",
795
+ value: input.offset
796
+ }, errorFactory)) && (Math.floor(input.offset) === input.offset && 0 <= input.offset && input.offset <= 4294967295 || $guard(_exceptionable, {
797
+ path: _path + ".offset",
798
+ expected: "number & Type<\"uint32\">",
799
+ value: input.offset
800
+ }, errorFactory)) || $guard(_exceptionable, {
801
+ path: _path + ".offset",
802
+ expected: "((number & Minimum<0> & Type<\"uint32\">) | null)",
803
+ value: input.offset
804
+ }, errorFactory)) && (null === input.size || "number" === typeof input.size && (0 <= input.size || $guard(_exceptionable, {
805
+ path: _path + ".size",
806
+ expected: "number & Minimum<0>",
807
+ value: input.size
808
+ }, errorFactory)) && (Math.floor(input.size) === input.size && 0 <= input.size && input.size <= 4294967295 || $guard(_exceptionable, {
809
+ path: _path + ".size",
810
+ expected: "number & Type<\"uint32\">",
811
+ value: input.size
812
+ }, errorFactory)) || $guard(_exceptionable, {
813
+ path: _path + ".size",
814
+ expected: "((number & Minimum<0> & Type<\"uint32\">) | null)",
815
+ value: input.size
816
+ }, errorFactory)) && (null === input.hash || "string" === typeof input.hash && (input.hash.length <= 0 || /^[A-Fa-f0-9]{32}$/.test(input.hash) || $guard(_exceptionable, {
817
+ path: _path + ".hash",
818
+ expected: "(string & (MaxLength<0> | Pattern<\"^[A-Fa-f0-9]{32}$\">))",
819
+ value: input.hash
820
+ }, errorFactory)) || $guard(_exceptionable, {
821
+ path: _path + ".hash",
822
+ expected: "((string & (MaxLength<0> | Pattern<\"^[A-Fa-f0-9]{32}$\">)) | null)",
823
+ value: input.hash
824
+ }, errorFactory)) && (null === input.btime || "number" === typeof input.btime && (0 <= input.btime || $guard(_exceptionable, {
346
825
  path: _path + ".btime",
347
826
  expected: "number & Minimum<0>",
348
827
  value: input.btime
828
+ }, errorFactory)) && (Math.floor(input.btime) === input.btime && 0 <= input.btime && input.btime <= 4294967295 || $guard(_exceptionable, {
829
+ path: _path + ".btime",
830
+ expected: "number & Type<\"uint32\">",
831
+ value: input.btime
349
832
  }, errorFactory)) || $guard(_exceptionable, {
350
833
  path: _path + ".btime",
351
- expected: "((number & Minimum<0>) | null)",
834
+ expected: "((number & Minimum<0> & Type<\"uint32\">) | null)",
352
835
  value: input.btime
353
836
  }, errorFactory));
354
837
  return ("object" === typeof input && null !== input || $guard(true, {
355
838
  path: _path + "",
356
- expected: "Block",
839
+ expected: "BlockStats",
357
840
  value: input
358
841
  }, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
359
842
  path: _path + "",
360
- expected: "Block",
843
+ expected: "BlockStats",
361
844
  value: input
362
845
  }, errorFactory);
363
846
  })(input, "$input", true);
364
847
  return input;
365
848
  }; const stringify = input => {
366
849
  const $string = __typia.json.createAssertStringify.string;
367
- const $so0 = input => `{"fileId":${$string(input.fileId)},"locationId":${$string(input.locationId)},"blockId":${$string(input.blockId)},"offset":${null !== input.offset ? input.offset : "null"},"position":${null !== input.position ? input.position : "null"},"size":${null !== input.size ? input.size : "null"},"hash":${null !== input.hash ? $string(input.hash) : "null"},"btime":${null !== input.btime ? input.btime : "null"}}`;
850
+ const $so0 = input => `{"position":${null !== input.position ? input.position : "null"},"id":${$string(input.id)},"file":${$string(input.file)},"location":${$string(input.location)},"block":${$string(input.block)},"offset":${null !== input.offset ? input.offset : "null"},"size":${null !== input.size ? input.size : "null"},"hash":${null !== input.hash ? $string(input.hash) : "null"},"btime":${null !== input.btime ? input.btime : "null"}}`;
368
851
  return $so0(input);
369
852
  }; return stringify(assert(input, errorFactory)); };
370
853
  export const isBlocks = input => {
371
- const $io0 = input => "string" === typeof input.fileId && 1 <= input.fileId.length && ("string" === typeof input.locationId && 1 <= input.locationId.length) && ("string" === typeof input.blockId && 1 <= input.blockId.length) && (null === input.offset || "number" === typeof input.offset && 0 <= input.offset) && (null === input.position || "number" === typeof input.position && 0 <= input.position) && (null === input.size || "number" === typeof input.size && 0 <= input.size) && (null === input.hash || "string" === typeof input.hash && (input.hash.length <= 0 || /^[A-Fa-f0-9]{32}$/.test(input.hash))) && (null === input.btime || "number" === typeof input.btime && 0 <= input.btime);
854
+ const $io0 = input => "string" === typeof input.id && /^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.id) && ("string" === typeof input.file && /^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.file)) && ("string" === typeof input.location && /^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.location)) && ("string" === typeof input.block && /^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.block)) && (null === input.offset || "number" === typeof input.offset && (0 <= input.offset && (Math.floor(input.offset) === input.offset && 0 <= input.offset && input.offset <= 4294967295))) && (null === input.size || "number" === typeof input.size && (0 <= input.size && (Math.floor(input.size) === input.size && 0 <= input.size && input.size <= 4294967295))) && (null === input.hash || "string" === typeof input.hash && (input.hash.length <= 0 || /^[A-Fa-f0-9]{32}$/.test(input.hash))) && (null === input.btime || "number" === typeof input.btime && (0 <= input.btime && (Math.floor(input.btime) === input.btime && 0 <= input.btime && input.btime <= 4294967295)));
372
855
  return Array.isArray(input) && input.every(elem => "object" === typeof elem && null !== elem && $io0(elem));
373
856
  };
374
857
  export const assertBlocks = (input, errorFactory) => {
375
858
  const __is = input => {
376
- const $io0 = input => "string" === typeof input.fileId && 1 <= input.fileId.length && ("string" === typeof input.locationId && 1 <= input.locationId.length) && ("string" === typeof input.blockId && 1 <= input.blockId.length) && (null === input.offset || "number" === typeof input.offset && 0 <= input.offset) && (null === input.position || "number" === typeof input.position && 0 <= input.position) && (null === input.size || "number" === typeof input.size && 0 <= input.size) && (null === input.hash || "string" === typeof input.hash && (input.hash.length <= 0 || /^[A-Fa-f0-9]{32}$/.test(input.hash))) && (null === input.btime || "number" === typeof input.btime && 0 <= input.btime);
859
+ const $io0 = input => "string" === typeof input.id && /^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.id) && ("string" === typeof input.file && /^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.file)) && ("string" === typeof input.location && /^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.location)) && ("string" === typeof input.block && /^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.block)) && (null === input.offset || "number" === typeof input.offset && (0 <= input.offset && (Math.floor(input.offset) === input.offset && 0 <= input.offset && input.offset <= 4294967295))) && (null === input.size || "number" === typeof input.size && (0 <= input.size && (Math.floor(input.size) === input.size && 0 <= input.size && input.size <= 4294967295))) && (null === input.hash || "string" === typeof input.hash && (input.hash.length <= 0 || /^[A-Fa-f0-9]{32}$/.test(input.hash))) && (null === input.btime || "number" === typeof input.btime && (0 <= input.btime && (Math.floor(input.btime) === input.btime && 0 <= input.btime && input.btime <= 4294967295)));
377
860
  return Array.isArray(input) && input.every(elem => "object" === typeof elem && null !== elem && $io0(elem));
378
861
  };
379
862
  if (false === __is(input))
380
863
  ((input, _path, _exceptionable = true) => {
381
864
  const $guard = __typia.createAssert.guard;
382
- const $ao0 = (input, _path, _exceptionable = true) => ("string" === typeof input.fileId && (1 <= input.fileId.length || $guard(_exceptionable, {
383
- path: _path + ".fileId",
384
- expected: "string & MinLength<1>",
385
- value: input.fileId
386
- }, errorFactory)) || $guard(_exceptionable, {
387
- path: _path + ".fileId",
388
- expected: "(string & MinLength<1>)",
389
- value: input.fileId
390
- }, errorFactory)) && ("string" === typeof input.locationId && (1 <= input.locationId.length || $guard(_exceptionable, {
391
- path: _path + ".locationId",
392
- expected: "string & MinLength<1>",
393
- value: input.locationId
394
- }, errorFactory)) || $guard(_exceptionable, {
395
- path: _path + ".locationId",
396
- expected: "(string & MinLength<1>)",
397
- value: input.locationId
398
- }, errorFactory)) && ("string" === typeof input.blockId && (1 <= input.blockId.length || $guard(_exceptionable, {
399
- path: _path + ".blockId",
400
- expected: "string & MinLength<1>",
401
- value: input.blockId
402
- }, errorFactory)) || $guard(_exceptionable, {
403
- path: _path + ".blockId",
404
- expected: "(string & MinLength<1>)",
405
- value: input.blockId
865
+ const $ao0 = (input, _path, _exceptionable = true) => ("string" === typeof input.id && (/^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.id) || $guard(_exceptionable, {
866
+ path: _path + ".id",
867
+ expected: "string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">",
868
+ value: input.id
869
+ }, errorFactory)) || $guard(_exceptionable, {
870
+ path: _path + ".id",
871
+ expected: "(string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">)",
872
+ value: input.id
873
+ }, errorFactory)) && ("string" === typeof input.file && (/^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.file) || $guard(_exceptionable, {
874
+ path: _path + ".file",
875
+ expected: "string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">",
876
+ value: input.file
877
+ }, errorFactory)) || $guard(_exceptionable, {
878
+ path: _path + ".file",
879
+ expected: "(string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">)",
880
+ value: input.file
881
+ }, errorFactory)) && ("string" === typeof input.location && (/^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.location) || $guard(_exceptionable, {
882
+ path: _path + ".location",
883
+ expected: "string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">",
884
+ value: input.location
885
+ }, errorFactory)) || $guard(_exceptionable, {
886
+ path: _path + ".location",
887
+ expected: "(string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">)",
888
+ value: input.location
889
+ }, errorFactory)) && ("string" === typeof input.block && (/^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.block) || $guard(_exceptionable, {
890
+ path: _path + ".block",
891
+ expected: "string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">",
892
+ value: input.block
893
+ }, errorFactory)) || $guard(_exceptionable, {
894
+ path: _path + ".block",
895
+ expected: "(string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">)",
896
+ value: input.block
406
897
  }, errorFactory)) && (null === input.offset || "number" === typeof input.offset && (0 <= input.offset || $guard(_exceptionable, {
407
898
  path: _path + ".offset",
408
899
  expected: "number & Minimum<0>",
409
900
  value: input.offset
410
- }, errorFactory)) || $guard(_exceptionable, {
901
+ }, errorFactory)) && (Math.floor(input.offset) === input.offset && 0 <= input.offset && input.offset <= 4294967295 || $guard(_exceptionable, {
411
902
  path: _path + ".offset",
412
- expected: "((number & Minimum<0>) | null)",
903
+ expected: "number & Type<\"uint32\">",
413
904
  value: input.offset
414
- }, errorFactory)) && (null === input.position || "number" === typeof input.position && (0 <= input.position || $guard(_exceptionable, {
415
- path: _path + ".position",
416
- expected: "number & Minimum<0>",
417
- value: input.position
418
905
  }, errorFactory)) || $guard(_exceptionable, {
419
- path: _path + ".position",
420
- expected: "((number & Minimum<0>) | null)",
421
- value: input.position
906
+ path: _path + ".offset",
907
+ expected: "((number & Minimum<0> & Type<\"uint32\">) | null)",
908
+ value: input.offset
422
909
  }, errorFactory)) && (null === input.size || "number" === typeof input.size && (0 <= input.size || $guard(_exceptionable, {
423
910
  path: _path + ".size",
424
911
  expected: "number & Minimum<0>",
425
912
  value: input.size
913
+ }, errorFactory)) && (Math.floor(input.size) === input.size && 0 <= input.size && input.size <= 4294967295 || $guard(_exceptionable, {
914
+ path: _path + ".size",
915
+ expected: "number & Type<\"uint32\">",
916
+ value: input.size
426
917
  }, errorFactory)) || $guard(_exceptionable, {
427
918
  path: _path + ".size",
428
- expected: "((number & Minimum<0>) | null)",
919
+ expected: "((number & Minimum<0> & Type<\"uint32\">) | null)",
429
920
  value: input.size
430
921
  }, errorFactory)) && (null === input.hash || "string" === typeof input.hash && (input.hash.length <= 0 || /^[A-Fa-f0-9]{32}$/.test(input.hash) || $guard(_exceptionable, {
431
922
  path: _path + ".hash",
@@ -439,9 +930,13 @@ export const assertBlocks = (input, errorFactory) => {
439
930
  path: _path + ".btime",
440
931
  expected: "number & Minimum<0>",
441
932
  value: input.btime
933
+ }, errorFactory)) && (Math.floor(input.btime) === input.btime && 0 <= input.btime && input.btime <= 4294967295 || $guard(_exceptionable, {
934
+ path: _path + ".btime",
935
+ expected: "number & Type<\"uint32\">",
936
+ value: input.btime
442
937
  }, errorFactory)) || $guard(_exceptionable, {
443
938
  path: _path + ".btime",
444
- expected: "((number & Minimum<0>) | null)",
939
+ expected: "((number & Minimum<0> & Type<\"uint32\">) | null)",
445
940
  value: input.btime
446
941
  }, errorFactory));
447
942
  return (Array.isArray(input) || $guard(true, {
@@ -468,27 +963,34 @@ export const randomBlocks = generator => {
468
963
  const $generator = __typia.createRandom.generator;
469
964
  const $pick = __typia.createRandom.pick;
470
965
  const $ro0 = (_recursive = false, _depth = 0) => ({
471
- fileId: (generator?.customs ?? $generator.customs)?.string?.([
966
+ id: (generator?.customs ?? $generator.customs)?.string?.([
967
+ {
968
+ name: "Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">",
969
+ kind: "pattern",
970
+ value: "^[0-9A-Za-z~][0-9A-Za-z~._: -]*$"
971
+ }
972
+ ]) ?? (generator?.pattern ?? $generator.pattern)(/^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/),
973
+ file: (generator?.customs ?? $generator.customs)?.string?.([
472
974
  {
473
- name: "MinLength<1>",
474
- kind: "minLength",
475
- value: 1
975
+ name: "Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">",
976
+ kind: "pattern",
977
+ value: "^[0-9A-Za-z~][0-9A-Za-z~._: -]*$"
476
978
  }
477
- ]) ?? (generator?.string ?? $generator.string)((generator?.integer ?? $generator.integer)(1, 25)),
478
- locationId: (generator?.customs ?? $generator.customs)?.string?.([
979
+ ]) ?? (generator?.pattern ?? $generator.pattern)(/^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/),
980
+ location: (generator?.customs ?? $generator.customs)?.string?.([
479
981
  {
480
- name: "MinLength<1>",
481
- kind: "minLength",
482
- value: 1
982
+ name: "Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">",
983
+ kind: "pattern",
984
+ value: "^[0-9A-Za-z~][0-9A-Za-z~._: -]*$"
483
985
  }
484
- ]) ?? (generator?.string ?? $generator.string)((generator?.integer ?? $generator.integer)(1, 25)),
485
- blockId: (generator?.customs ?? $generator.customs)?.string?.([
986
+ ]) ?? (generator?.pattern ?? $generator.pattern)(/^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/),
987
+ block: (generator?.customs ?? $generator.customs)?.string?.([
486
988
  {
487
- name: "MinLength<1>",
488
- kind: "minLength",
489
- value: 1
989
+ name: "Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">",
990
+ kind: "pattern",
991
+ value: "^[0-9A-Za-z~][0-9A-Za-z~._: -]*$"
490
992
  }
491
- ]) ?? (generator?.string ?? $generator.string)((generator?.integer ?? $generator.integer)(1, 25)),
993
+ ]) ?? (generator?.pattern ?? $generator.pattern)(/^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/),
492
994
  offset: $pick([
493
995
  () => null,
494
996
  () => (generator?.customs ?? $generator.customs)?.number?.([
@@ -496,18 +998,13 @@ export const randomBlocks = generator => {
496
998
  name: "Minimum<0>",
497
999
  kind: "minimum",
498
1000
  value: 0
499
- }
500
- ]) ?? (generator?.number ?? $generator.number)(0, 10)
501
- ])(),
502
- position: $pick([
503
- () => null,
504
- () => (generator?.customs ?? $generator.customs)?.number?.([
1001
+ },
505
1002
  {
506
- name: "Minimum<0>",
507
- kind: "minimum",
508
- value: 0
1003
+ name: "Type<\"uint32\">",
1004
+ kind: "type",
1005
+ value: "uint32"
509
1006
  }
510
- ]) ?? (generator?.number ?? $generator.number)(0, 10)
1007
+ ]) ?? (generator?.integer ?? $generator.integer)(0, 10)
511
1008
  ])(),
512
1009
  size: $pick([
513
1010
  () => null,
@@ -516,8 +1013,13 @@ export const randomBlocks = generator => {
516
1013
  name: "Minimum<0>",
517
1014
  kind: "minimum",
518
1015
  value: 0
1016
+ },
1017
+ {
1018
+ name: "Type<\"uint32\">",
1019
+ kind: "type",
1020
+ value: "uint32"
519
1021
  }
520
- ]) ?? (generator?.number ?? $generator.number)(0, 10)
1022
+ ]) ?? (generator?.integer ?? $generator.integer)(0, 10)
521
1023
  ])(),
522
1024
  hash: $pick([
523
1025
  () => null,
@@ -543,67 +1045,80 @@ export const randomBlocks = generator => {
543
1045
  name: "Minimum<0>",
544
1046
  kind: "minimum",
545
1047
  value: 0
1048
+ },
1049
+ {
1050
+ name: "Type<\"uint32\">",
1051
+ kind: "type",
1052
+ value: "uint32"
546
1053
  }
547
- ]) ?? (generator?.number ?? $generator.number)(0, 10)
1054
+ ]) ?? (generator?.integer ?? $generator.integer)(0, 10)
548
1055
  ])()
549
1056
  });
550
1057
  return (generator?.array ?? $generator.array)(() => $ro0());
551
1058
  };
552
1059
  export const assertGuardBlocks = (input, errorFactory) => {
553
1060
  const __is = input => {
554
- const $io0 = input => "string" === typeof input.fileId && 1 <= input.fileId.length && ("string" === typeof input.locationId && 1 <= input.locationId.length) && ("string" === typeof input.blockId && 1 <= input.blockId.length) && (null === input.offset || "number" === typeof input.offset && 0 <= input.offset) && (null === input.position || "number" === typeof input.position && 0 <= input.position) && (null === input.size || "number" === typeof input.size && 0 <= input.size) && (null === input.hash || "string" === typeof input.hash && (input.hash.length <= 0 || /^[A-Fa-f0-9]{32}$/.test(input.hash))) && (null === input.btime || "number" === typeof input.btime && 0 <= input.btime);
1061
+ const $io0 = input => "string" === typeof input.id && /^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.id) && ("string" === typeof input.file && /^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.file)) && ("string" === typeof input.location && /^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.location)) && ("string" === typeof input.block && /^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.block)) && (null === input.offset || "number" === typeof input.offset && (0 <= input.offset && (Math.floor(input.offset) === input.offset && 0 <= input.offset && input.offset <= 4294967295))) && (null === input.size || "number" === typeof input.size && (0 <= input.size && (Math.floor(input.size) === input.size && 0 <= input.size && input.size <= 4294967295))) && (null === input.hash || "string" === typeof input.hash && (input.hash.length <= 0 || /^[A-Fa-f0-9]{32}$/.test(input.hash))) && (null === input.btime || "number" === typeof input.btime && (0 <= input.btime && (Math.floor(input.btime) === input.btime && 0 <= input.btime && input.btime <= 4294967295)));
555
1062
  return Array.isArray(input) && input.every(elem => "object" === typeof elem && null !== elem && $io0(elem));
556
1063
  };
557
1064
  if (false === __is(input))
558
1065
  ((input, _path, _exceptionable = true) => {
559
1066
  const $guard = __typia.createAssertGuard.guard;
560
- const $ao0 = (input, _path, _exceptionable = true) => ("string" === typeof input.fileId && (1 <= input.fileId.length || $guard(_exceptionable, {
561
- path: _path + ".fileId",
562
- expected: "string & MinLength<1>",
563
- value: input.fileId
564
- }, errorFactory)) || $guard(_exceptionable, {
565
- path: _path + ".fileId",
566
- expected: "(string & MinLength<1>)",
567
- value: input.fileId
568
- }, errorFactory)) && ("string" === typeof input.locationId && (1 <= input.locationId.length || $guard(_exceptionable, {
569
- path: _path + ".locationId",
570
- expected: "string & MinLength<1>",
571
- value: input.locationId
572
- }, errorFactory)) || $guard(_exceptionable, {
573
- path: _path + ".locationId",
574
- expected: "(string & MinLength<1>)",
575
- value: input.locationId
576
- }, errorFactory)) && ("string" === typeof input.blockId && (1 <= input.blockId.length || $guard(_exceptionable, {
577
- path: _path + ".blockId",
578
- expected: "string & MinLength<1>",
579
- value: input.blockId
580
- }, errorFactory)) || $guard(_exceptionable, {
581
- path: _path + ".blockId",
582
- expected: "(string & MinLength<1>)",
583
- value: input.blockId
1067
+ const $ao0 = (input, _path, _exceptionable = true) => ("string" === typeof input.id && (/^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.id) || $guard(_exceptionable, {
1068
+ path: _path + ".id",
1069
+ expected: "string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">",
1070
+ value: input.id
1071
+ }, errorFactory)) || $guard(_exceptionable, {
1072
+ path: _path + ".id",
1073
+ expected: "(string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">)",
1074
+ value: input.id
1075
+ }, errorFactory)) && ("string" === typeof input.file && (/^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.file) || $guard(_exceptionable, {
1076
+ path: _path + ".file",
1077
+ expected: "string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">",
1078
+ value: input.file
1079
+ }, errorFactory)) || $guard(_exceptionable, {
1080
+ path: _path + ".file",
1081
+ expected: "(string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">)",
1082
+ value: input.file
1083
+ }, errorFactory)) && ("string" === typeof input.location && (/^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.location) || $guard(_exceptionable, {
1084
+ path: _path + ".location",
1085
+ expected: "string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">",
1086
+ value: input.location
1087
+ }, errorFactory)) || $guard(_exceptionable, {
1088
+ path: _path + ".location",
1089
+ expected: "(string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">)",
1090
+ value: input.location
1091
+ }, errorFactory)) && ("string" === typeof input.block && (/^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.block) || $guard(_exceptionable, {
1092
+ path: _path + ".block",
1093
+ expected: "string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">",
1094
+ value: input.block
1095
+ }, errorFactory)) || $guard(_exceptionable, {
1096
+ path: _path + ".block",
1097
+ expected: "(string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">)",
1098
+ value: input.block
584
1099
  }, errorFactory)) && (null === input.offset || "number" === typeof input.offset && (0 <= input.offset || $guard(_exceptionable, {
585
1100
  path: _path + ".offset",
586
1101
  expected: "number & Minimum<0>",
587
1102
  value: input.offset
588
- }, errorFactory)) || $guard(_exceptionable, {
1103
+ }, errorFactory)) && (Math.floor(input.offset) === input.offset && 0 <= input.offset && input.offset <= 4294967295 || $guard(_exceptionable, {
589
1104
  path: _path + ".offset",
590
- expected: "((number & Minimum<0>) | null)",
1105
+ expected: "number & Type<\"uint32\">",
591
1106
  value: input.offset
592
- }, errorFactory)) && (null === input.position || "number" === typeof input.position && (0 <= input.position || $guard(_exceptionable, {
593
- path: _path + ".position",
594
- expected: "number & Minimum<0>",
595
- value: input.position
596
1107
  }, errorFactory)) || $guard(_exceptionable, {
597
- path: _path + ".position",
598
- expected: "((number & Minimum<0>) | null)",
599
- value: input.position
1108
+ path: _path + ".offset",
1109
+ expected: "((number & Minimum<0> & Type<\"uint32\">) | null)",
1110
+ value: input.offset
600
1111
  }, errorFactory)) && (null === input.size || "number" === typeof input.size && (0 <= input.size || $guard(_exceptionable, {
601
1112
  path: _path + ".size",
602
1113
  expected: "number & Minimum<0>",
603
1114
  value: input.size
1115
+ }, errorFactory)) && (Math.floor(input.size) === input.size && 0 <= input.size && input.size <= 4294967295 || $guard(_exceptionable, {
1116
+ path: _path + ".size",
1117
+ expected: "number & Type<\"uint32\">",
1118
+ value: input.size
604
1119
  }, errorFactory)) || $guard(_exceptionable, {
605
1120
  path: _path + ".size",
606
- expected: "((number & Minimum<0>) | null)",
1121
+ expected: "((number & Minimum<0> & Type<\"uint32\">) | null)",
607
1122
  value: input.size
608
1123
  }, errorFactory)) && (null === input.hash || "string" === typeof input.hash && (input.hash.length <= 0 || /^[A-Fa-f0-9]{32}$/.test(input.hash) || $guard(_exceptionable, {
609
1124
  path: _path + ".hash",
@@ -617,9 +1132,13 @@ export const assertGuardBlocks = (input, errorFactory) => {
617
1132
  path: _path + ".btime",
618
1133
  expected: "number & Minimum<0>",
619
1134
  value: input.btime
1135
+ }, errorFactory)) && (Math.floor(input.btime) === input.btime && 0 <= input.btime && input.btime <= 4294967295 || $guard(_exceptionable, {
1136
+ path: _path + ".btime",
1137
+ expected: "number & Type<\"uint32\">",
1138
+ value: input.btime
620
1139
  }, errorFactory)) || $guard(_exceptionable, {
621
1140
  path: _path + ".btime",
622
- expected: "((number & Minimum<0>) | null)",
1141
+ expected: "((number & Minimum<0> & Type<\"uint32\">) | null)",
623
1142
  value: input.btime
624
1143
  }, errorFactory));
625
1144
  return (Array.isArray(input) || $guard(true, {
@@ -643,76 +1162,72 @@ export const assertGuardBlocks = (input, errorFactory) => {
643
1162
  };
644
1163
  export const stringifyBlocks = input => {
645
1164
  const $string = __typia.json.createStringify.string;
646
- const $so0 = input => `{"fileId":${$string(input.fileId)},"locationId":${$string(input.locationId)},"blockId":${$string(input.blockId)},"offset":${null !== input.offset ? input.offset : "null"},"position":${null !== input.position ? input.position : "null"},"size":${null !== input.size ? input.size : "null"},"hash":${null !== input.hash ? $string(input.hash) : "null"},"btime":${null !== input.btime ? input.btime : "null"}}`;
1165
+ const $so0 = input => `{"id":${$string(input.id)},"file":${$string(input.file)},"location":${$string(input.location)},"block":${$string(input.block)},"offset":${null !== input.offset ? input.offset : "null"},"size":${null !== input.size ? input.size : "null"},"hash":${null !== input.hash ? $string(input.hash) : "null"},"btime":${null !== input.btime ? input.btime : "null"}}`;
647
1166
  return `[${input.map(elem => $so0(elem)).join(",")}]`;
648
1167
  };
649
1168
  export const assertStringifyBlocks = (input, errorFactory) => { const assert = (input, errorFactory) => {
650
1169
  const __is = input => {
651
- const $io0 = input => "string" === typeof input.fileId && 1 <= input.fileId.length && ("string" === typeof input.locationId && 1 <= input.locationId.length) && ("string" === typeof input.blockId && 1 <= input.blockId.length) && (null === input.offset || "number" === typeof input.offset && (!Number.isNaN(input.offset) && 0 <= input.offset)) && (null === input.position || "number" === typeof input.position && (!Number.isNaN(input.position) && 0 <= input.position)) && (null === input.size || "number" === typeof input.size && (!Number.isNaN(input.size) && 0 <= input.size)) && (null === input.hash || "string" === typeof input.hash && (input.hash.length <= 0 || /^[A-Fa-f0-9]{32}$/.test(input.hash))) && (null === input.btime || "number" === typeof input.btime && (!Number.isNaN(input.btime) && 0 <= input.btime));
1170
+ const $io0 = input => "string" === typeof input.id && /^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.id) && ("string" === typeof input.file && /^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.file)) && ("string" === typeof input.location && /^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.location)) && ("string" === typeof input.block && /^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.block)) && (null === input.offset || "number" === typeof input.offset && (0 <= input.offset && (Math.floor(input.offset) === input.offset && 0 <= input.offset && input.offset <= 4294967295))) && (null === input.size || "number" === typeof input.size && (0 <= input.size && (Math.floor(input.size) === input.size && 0 <= input.size && input.size <= 4294967295))) && (null === input.hash || "string" === typeof input.hash && (input.hash.length <= 0 || /^[A-Fa-f0-9]{32}$/.test(input.hash))) && (null === input.btime || "number" === typeof input.btime && (0 <= input.btime && (Math.floor(input.btime) === input.btime && 0 <= input.btime && input.btime <= 4294967295)));
652
1171
  return Array.isArray(input) && input.every(elem => "object" === typeof elem && null !== elem && $io0(elem));
653
1172
  };
654
1173
  if (false === __is(input))
655
1174
  ((input, _path, _exceptionable = true) => {
656
1175
  const $guard = __typia.json.createAssertStringify.guard;
657
- const $ao0 = (input, _path, _exceptionable = true) => ("string" === typeof input.fileId && (1 <= input.fileId.length || $guard(_exceptionable, {
658
- path: _path + ".fileId",
659
- expected: "string & MinLength<1>",
660
- value: input.fileId
661
- }, errorFactory)) || $guard(_exceptionable, {
662
- path: _path + ".fileId",
663
- expected: "(string & MinLength<1>)",
664
- value: input.fileId
665
- }, errorFactory)) && ("string" === typeof input.locationId && (1 <= input.locationId.length || $guard(_exceptionable, {
666
- path: _path + ".locationId",
667
- expected: "string & MinLength<1>",
668
- value: input.locationId
669
- }, errorFactory)) || $guard(_exceptionable, {
670
- path: _path + ".locationId",
671
- expected: "(string & MinLength<1>)",
672
- value: input.locationId
673
- }, errorFactory)) && ("string" === typeof input.blockId && (1 <= input.blockId.length || $guard(_exceptionable, {
674
- path: _path + ".blockId",
675
- expected: "string & MinLength<1>",
676
- value: input.blockId
677
- }, errorFactory)) || $guard(_exceptionable, {
678
- path: _path + ".blockId",
679
- expected: "(string & MinLength<1>)",
680
- value: input.blockId
681
- }, errorFactory)) && (null === input.offset || "number" === typeof input.offset && (!Number.isNaN(input.offset) || $guard(_exceptionable, {
1176
+ const $ao0 = (input, _path, _exceptionable = true) => ("string" === typeof input.id && (/^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.id) || $guard(_exceptionable, {
1177
+ path: _path + ".id",
1178
+ expected: "string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">",
1179
+ value: input.id
1180
+ }, errorFactory)) || $guard(_exceptionable, {
1181
+ path: _path + ".id",
1182
+ expected: "(string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">)",
1183
+ value: input.id
1184
+ }, errorFactory)) && ("string" === typeof input.file && (/^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.file) || $guard(_exceptionable, {
1185
+ path: _path + ".file",
1186
+ expected: "string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">",
1187
+ value: input.file
1188
+ }, errorFactory)) || $guard(_exceptionable, {
1189
+ path: _path + ".file",
1190
+ expected: "(string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">)",
1191
+ value: input.file
1192
+ }, errorFactory)) && ("string" === typeof input.location && (/^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.location) || $guard(_exceptionable, {
1193
+ path: _path + ".location",
1194
+ expected: "string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">",
1195
+ value: input.location
1196
+ }, errorFactory)) || $guard(_exceptionable, {
1197
+ path: _path + ".location",
1198
+ expected: "(string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">)",
1199
+ value: input.location
1200
+ }, errorFactory)) && ("string" === typeof input.block && (/^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.block) || $guard(_exceptionable, {
1201
+ path: _path + ".block",
1202
+ expected: "string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">",
1203
+ value: input.block
1204
+ }, errorFactory)) || $guard(_exceptionable, {
1205
+ path: _path + ".block",
1206
+ expected: "(string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">)",
1207
+ value: input.block
1208
+ }, errorFactory)) && (null === input.offset || "number" === typeof input.offset && (0 <= input.offset || $guard(_exceptionable, {
682
1209
  path: _path + ".offset",
683
- expected: "number",
1210
+ expected: "number & Minimum<0>",
684
1211
  value: input.offset
685
- }, errorFactory)) && (0 <= input.offset || $guard(_exceptionable, {
1212
+ }, errorFactory)) && (Math.floor(input.offset) === input.offset && 0 <= input.offset && input.offset <= 4294967295 || $guard(_exceptionable, {
686
1213
  path: _path + ".offset",
687
- expected: "number & Minimum<0>",
1214
+ expected: "number & Type<\"uint32\">",
688
1215
  value: input.offset
689
1216
  }, errorFactory)) || $guard(_exceptionable, {
690
1217
  path: _path + ".offset",
691
- expected: "((number & Minimum<0>) | null)",
1218
+ expected: "((number & Minimum<0> & Type<\"uint32\">) | null)",
692
1219
  value: input.offset
693
- }, errorFactory)) && (null === input.position || "number" === typeof input.position && (!Number.isNaN(input.position) || $guard(_exceptionable, {
694
- path: _path + ".position",
695
- expected: "number",
696
- value: input.position
697
- }, errorFactory)) && (0 <= input.position || $guard(_exceptionable, {
698
- path: _path + ".position",
699
- expected: "number & Minimum<0>",
700
- value: input.position
701
- }, errorFactory)) || $guard(_exceptionable, {
702
- path: _path + ".position",
703
- expected: "((number & Minimum<0>) | null)",
704
- value: input.position
705
- }, errorFactory)) && (null === input.size || "number" === typeof input.size && (!Number.isNaN(input.size) || $guard(_exceptionable, {
1220
+ }, errorFactory)) && (null === input.size || "number" === typeof input.size && (0 <= input.size || $guard(_exceptionable, {
706
1221
  path: _path + ".size",
707
- expected: "number",
1222
+ expected: "number & Minimum<0>",
708
1223
  value: input.size
709
- }, errorFactory)) && (0 <= input.size || $guard(_exceptionable, {
1224
+ }, errorFactory)) && (Math.floor(input.size) === input.size && 0 <= input.size && input.size <= 4294967295 || $guard(_exceptionable, {
710
1225
  path: _path + ".size",
711
- expected: "number & Minimum<0>",
1226
+ expected: "number & Type<\"uint32\">",
712
1227
  value: input.size
713
1228
  }, errorFactory)) || $guard(_exceptionable, {
714
1229
  path: _path + ".size",
715
- expected: "((number & Minimum<0>) | null)",
1230
+ expected: "((number & Minimum<0> & Type<\"uint32\">) | null)",
716
1231
  value: input.size
717
1232
  }, errorFactory)) && (null === input.hash || "string" === typeof input.hash && (input.hash.length <= 0 || /^[A-Fa-f0-9]{32}$/.test(input.hash) || $guard(_exceptionable, {
718
1233
  path: _path + ".hash",
@@ -722,17 +1237,17 @@ export const assertStringifyBlocks = (input, errorFactory) => { const assert = (
722
1237
  path: _path + ".hash",
723
1238
  expected: "((string & (MaxLength<0> | Pattern<\"^[A-Fa-f0-9]{32}$\">)) | null)",
724
1239
  value: input.hash
725
- }, errorFactory)) && (null === input.btime || "number" === typeof input.btime && (!Number.isNaN(input.btime) || $guard(_exceptionable, {
1240
+ }, errorFactory)) && (null === input.btime || "number" === typeof input.btime && (0 <= input.btime || $guard(_exceptionable, {
726
1241
  path: _path + ".btime",
727
- expected: "number",
1242
+ expected: "number & Minimum<0>",
728
1243
  value: input.btime
729
- }, errorFactory)) && (0 <= input.btime || $guard(_exceptionable, {
1244
+ }, errorFactory)) && (Math.floor(input.btime) === input.btime && 0 <= input.btime && input.btime <= 4294967295 || $guard(_exceptionable, {
730
1245
  path: _path + ".btime",
731
- expected: "number & Minimum<0>",
1246
+ expected: "number & Type<\"uint32\">",
732
1247
  value: input.btime
733
1248
  }, errorFactory)) || $guard(_exceptionable, {
734
1249
  path: _path + ".btime",
735
- expected: "((number & Minimum<0>) | null)",
1250
+ expected: "((number & Minimum<0> & Type<\"uint32\">) | null)",
736
1251
  value: input.btime
737
1252
  }, errorFactory));
738
1253
  return (Array.isArray(input) || $guard(true, {
@@ -756,6 +1271,6 @@ export const assertStringifyBlocks = (input, errorFactory) => { const assert = (
756
1271
  return input;
757
1272
  }; const stringify = input => {
758
1273
  const $string = __typia.json.createAssertStringify.string;
759
- const $so0 = input => `{"fileId":${$string(input.fileId)},"locationId":${$string(input.locationId)},"blockId":${$string(input.blockId)},"offset":${null !== input.offset ? input.offset : "null"},"position":${null !== input.position ? input.position : "null"},"size":${null !== input.size ? input.size : "null"},"hash":${null !== input.hash ? $string(input.hash) : "null"},"btime":${null !== input.btime ? input.btime : "null"}}`;
1274
+ const $so0 = input => `{"id":${$string(input.id)},"file":${$string(input.file)},"location":${$string(input.location)},"block":${$string(input.block)},"offset":${null !== input.offset ? input.offset : "null"},"size":${null !== input.size ? input.size : "null"},"hash":${null !== input.hash ? $string(input.hash) : "null"},"btime":${null !== input.btime ? input.btime : "null"}}`;
760
1275
  return `[${input.map(elem => $so0(elem)).join(",")}]`;
761
1276
  }; return stringify(assert(input, errorFactory)); };