@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,13 +1,13 @@
1
1
  import __typia from "typia";
2
2
  export const isFile = input => {
3
- const $io0 = input => "string" === typeof input.id && 1 <= input.id.length && "boolean" === typeof input.deleted && "boolean" === typeof input.completed && "boolean" === typeof input.uploading && (Array.isArray(input.zones) && input.zones.every(elem => "string" === typeof elem)) && (Array.isArray(input.replicas) && input.replicas.every(elem => "string" === typeof elem)) && (Array.isArray(input.refs) && input.refs.every(elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && $io1(elem))) && (null === input.btime || "number" === typeof input.btime) && "boolean" === typeof input.seekable && "boolean" === typeof input.resumable && (null === input.size || "number" === typeof input.size && 0 <= input.size) && (null === input.position || "number" === typeof input.position && 0 <= input.position) && (null === input.hash || "string" === typeof input.hash && (input.hash.length <= 0 || /^[A-Fa-f0-9]{32}$/.test(input.hash))) && (null === input.mimeType || "string" === typeof input.mimeType) && (Array.isArray(input.tags) && input.tags.every(elem => "string" === typeof elem)) && (Array.isArray(input.error) && input.error.every(elem => "object" === typeof elem && null !== elem && $io2(elem)));
3
+ const $io0 = input => "string" === typeof input.id && /^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.id) && (null === input.size || "number" === typeof input.size && (0 <= input.size && (Math.floor(input.size) === input.size && 0 <= input.size && input.size <= 4294967295))) && "boolean" === typeof input.seekable && "boolean" === typeof input.deleted && "string" === typeof input.path && (Array.isArray(input.refs) && input.refs.every(elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && $io1(elem))) && (Array.isArray(input.tags) && input.tags.every(elem => "string" === typeof elem)) && (Array.isArray(input.error) && input.error.every(elem => "object" === typeof elem && null !== elem && $io2(elem))) && "string" === typeof input.resumable && "string" === typeof input.mimeType && ("string" === typeof input.hash && /^([A-Fa-f0-9]{32})?$/.test(input.hash)) && (null === input.btime || "number" === typeof input.btime && (0 <= input.btime && (Math.floor(input.btime) === input.btime && 0 <= input.btime && input.btime <= 4294967295)));
4
4
  const $io1 = input => undefined === input.file || "string" === typeof input.file;
5
5
  const $io2 = input => "string" === typeof input.message;
6
6
  return "object" === typeof input && null !== input && $io0(input);
7
7
  };
8
8
  export const assertFile = (input, errorFactory) => {
9
9
  const __is = input => {
10
- const $io0 = input => "string" === typeof input.id && 1 <= input.id.length && "boolean" === typeof input.deleted && "boolean" === typeof input.completed && "boolean" === typeof input.uploading && (Array.isArray(input.zones) && input.zones.every(elem => "string" === typeof elem)) && (Array.isArray(input.replicas) && input.replicas.every(elem => "string" === typeof elem)) && (Array.isArray(input.refs) && input.refs.every(elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && $io1(elem))) && (null === input.btime || "number" === typeof input.btime) && "boolean" === typeof input.seekable && "boolean" === typeof input.resumable && (null === input.size || "number" === typeof input.size && 0 <= input.size) && (null === input.position || "number" === typeof input.position && 0 <= input.position) && (null === input.hash || "string" === typeof input.hash && (input.hash.length <= 0 || /^[A-Fa-f0-9]{32}$/.test(input.hash))) && (null === input.mimeType || "string" === typeof input.mimeType) && (Array.isArray(input.tags) && input.tags.every(elem => "string" === typeof elem)) && (Array.isArray(input.error) && input.error.every(elem => "object" === typeof elem && null !== elem && $io2(elem)));
10
+ const $io0 = input => "string" === typeof input.id && /^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.id) && (null === input.size || "number" === typeof input.size && (0 <= input.size && (Math.floor(input.size) === input.size && 0 <= input.size && input.size <= 4294967295))) && "boolean" === typeof input.seekable && "boolean" === typeof input.deleted && "string" === typeof input.path && (Array.isArray(input.refs) && input.refs.every(elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && $io1(elem))) && (Array.isArray(input.tags) && input.tags.every(elem => "string" === typeof elem)) && (Array.isArray(input.error) && input.error.every(elem => "object" === typeof elem && null !== elem && $io2(elem))) && "string" === typeof input.resumable && "string" === typeof input.mimeType && ("string" === typeof input.hash && /^([A-Fa-f0-9]{32})?$/.test(input.hash)) && (null === input.btime || "number" === typeof input.btime && (0 <= input.btime && (Math.floor(input.btime) === input.btime && 0 <= input.btime && input.btime <= 4294967295)));
11
11
  const $io1 = input => undefined === input.file || "string" === typeof input.file;
12
12
  const $io2 = input => "string" === typeof input.message;
13
13
  return "object" === typeof input && null !== input && $io0(input);
@@ -15,26 +15,527 @@ export const assertFile = (input, errorFactory) => {
15
15
  if (false === __is(input))
16
16
  ((input, _path, _exceptionable = true) => {
17
17
  const $guard = __typia.createAssert.guard;
18
- const $ao0 = (input, _path, _exceptionable = true) => ("string" === typeof input.id && (1 <= input.id.length || $guard(_exceptionable, {
18
+ const $ao0 = (input, _path, _exceptionable = true) => ("string" === typeof input.id && (/^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.id) || $guard(_exceptionable, {
19
19
  path: _path + ".id",
20
- expected: "string & MinLength<1>",
20
+ expected: "string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">",
21
21
  value: input.id
22
22
  }, errorFactory)) || $guard(_exceptionable, {
23
23
  path: _path + ".id",
24
- expected: "(string & MinLength<1>)",
24
+ expected: "(string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">)",
25
25
  value: input.id
26
+ }, errorFactory)) && (null === input.size || "number" === typeof input.size && (0 <= input.size || $guard(_exceptionable, {
27
+ path: _path + ".size",
28
+ expected: "number & Minimum<0>",
29
+ value: input.size
30
+ }, errorFactory)) && (Math.floor(input.size) === input.size && 0 <= input.size && input.size <= 4294967295 || $guard(_exceptionable, {
31
+ path: _path + ".size",
32
+ expected: "number & Type<\"uint32\">",
33
+ value: input.size
34
+ }, errorFactory)) || $guard(_exceptionable, {
35
+ path: _path + ".size",
36
+ expected: "((number & Minimum<0> & Type<\"uint32\">) | null)",
37
+ value: input.size
38
+ }, errorFactory)) && ("boolean" === typeof input.seekable || $guard(_exceptionable, {
39
+ path: _path + ".seekable",
40
+ expected: "boolean",
41
+ value: input.seekable
26
42
  }, errorFactory)) && ("boolean" === typeof input.deleted || $guard(_exceptionable, {
27
43
  path: _path + ".deleted",
28
44
  expected: "boolean",
29
45
  value: input.deleted
46
+ }, errorFactory)) && ("string" === typeof input.path || $guard(_exceptionable, {
47
+ path: _path + ".path",
48
+ expected: "string",
49
+ value: input.path
50
+ }, errorFactory)) && ((Array.isArray(input.refs) || $guard(_exceptionable, {
51
+ path: _path + ".refs",
52
+ expected: "Array<__type>",
53
+ value: input.refs
54
+ }, errorFactory)) && input.refs.every((elem, _index1) => ("object" === typeof elem && null !== elem && false === Array.isArray(elem) || $guard(_exceptionable, {
55
+ path: _path + ".refs[" + _index1 + "]",
56
+ expected: "__type",
57
+ value: elem
58
+ }, errorFactory)) && $ao1(elem, _path + ".refs[" + _index1 + "]", true && _exceptionable) || $guard(_exceptionable, {
59
+ path: _path + ".refs[" + _index1 + "]",
60
+ expected: "__type",
61
+ value: elem
62
+ }, errorFactory)) || $guard(_exceptionable, {
63
+ path: _path + ".refs",
64
+ expected: "Array<__type>",
65
+ value: input.refs
66
+ }, errorFactory)) && ((Array.isArray(input.tags) || $guard(_exceptionable, {
67
+ path: _path + ".tags",
68
+ expected: "Array<string>",
69
+ value: input.tags
70
+ }, errorFactory)) && input.tags.every((elem, _index2) => "string" === typeof elem || $guard(_exceptionable, {
71
+ path: _path + ".tags[" + _index2 + "]",
72
+ expected: "string",
73
+ value: elem
74
+ }, errorFactory)) || $guard(_exceptionable, {
75
+ path: _path + ".tags",
76
+ expected: "Array<string>",
77
+ value: input.tags
78
+ }, errorFactory)) && ((Array.isArray(input.error) || $guard(_exceptionable, {
79
+ path: _path + ".error",
80
+ expected: "Array<__type>.o1",
81
+ value: input.error
82
+ }, errorFactory)) && input.error.every((elem, _index3) => ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
83
+ path: _path + ".error[" + _index3 + "]",
84
+ expected: "__type.o1",
85
+ value: elem
86
+ }, errorFactory)) && $ao2(elem, _path + ".error[" + _index3 + "]", true && _exceptionable) || $guard(_exceptionable, {
87
+ path: _path + ".error[" + _index3 + "]",
88
+ expected: "__type.o1",
89
+ value: elem
90
+ }, errorFactory)) || $guard(_exceptionable, {
91
+ path: _path + ".error",
92
+ expected: "Array<__type>.o1",
93
+ value: input.error
94
+ }, errorFactory)) && ("string" === typeof input.resumable || $guard(_exceptionable, {
95
+ path: _path + ".resumable",
96
+ expected: "string",
97
+ value: input.resumable
98
+ }, errorFactory)) && ("string" === typeof input.mimeType || $guard(_exceptionable, {
99
+ path: _path + ".mimeType",
100
+ expected: "string",
101
+ value: input.mimeType
102
+ }, errorFactory)) && ("string" === typeof input.hash && (/^([A-Fa-f0-9]{32})?$/.test(input.hash) || $guard(_exceptionable, {
103
+ path: _path + ".hash",
104
+ expected: "string & Pattern<\"^([A-Fa-f0-9]{32})?$\">",
105
+ value: input.hash
106
+ }, errorFactory)) || $guard(_exceptionable, {
107
+ path: _path + ".hash",
108
+ expected: "(string & Pattern<\"^([A-Fa-f0-9]{32})?$\">)",
109
+ value: input.hash
110
+ }, errorFactory)) && (null === input.btime || "number" === typeof input.btime && (0 <= input.btime || $guard(_exceptionable, {
111
+ path: _path + ".btime",
112
+ expected: "number & Minimum<0>",
113
+ value: input.btime
114
+ }, errorFactory)) && (Math.floor(input.btime) === input.btime && 0 <= input.btime && input.btime <= 4294967295 || $guard(_exceptionable, {
115
+ path: _path + ".btime",
116
+ expected: "number & Type<\"uint32\">",
117
+ value: input.btime
118
+ }, errorFactory)) || $guard(_exceptionable, {
119
+ path: _path + ".btime",
120
+ expected: "((number & Minimum<0> & Type<\"uint32\">) | null)",
121
+ value: input.btime
122
+ }, errorFactory));
123
+ const $ao1 = (input, _path, _exceptionable = true) => undefined === input.file || "string" === typeof input.file || $guard(_exceptionable, {
124
+ path: _path + ".file",
125
+ expected: "(string | undefined)",
126
+ value: input.file
127
+ }, errorFactory);
128
+ const $ao2 = (input, _path, _exceptionable = true) => "string" === typeof input.message || $guard(_exceptionable, {
129
+ path: _path + ".message",
130
+ expected: "string",
131
+ value: input.message
132
+ }, errorFactory);
133
+ return ("object" === typeof input && null !== input || $guard(true, {
134
+ path: _path + "",
135
+ expected: "File",
136
+ value: input
137
+ }, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
138
+ path: _path + "",
139
+ expected: "File",
140
+ value: input
141
+ }, errorFactory);
142
+ })(input, "$input", true);
143
+ return input;
144
+ };
145
+ export const randomFile = generator => {
146
+ const $generator = __typia.createRandom.generator;
147
+ const $pick = __typia.createRandom.pick;
148
+ const $ro0 = (_recursive = false, _depth = 0) => ({
149
+ id: (generator?.customs ?? $generator.customs)?.string?.([
150
+ {
151
+ name: "Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">",
152
+ kind: "pattern",
153
+ value: "^[0-9A-Za-z~][0-9A-Za-z~._: -]*$"
154
+ }
155
+ ]) ?? (generator?.pattern ?? $generator.pattern)(/^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/),
156
+ size: $pick([
157
+ () => null,
158
+ () => (generator?.customs ?? $generator.customs)?.number?.([
159
+ {
160
+ name: "Minimum<0>",
161
+ kind: "minimum",
162
+ value: 0
163
+ },
164
+ {
165
+ name: "Type<\"uint32\">",
166
+ kind: "type",
167
+ value: "uint32"
168
+ }
169
+ ]) ?? (generator?.integer ?? $generator.integer)(0, 10)
170
+ ])(),
171
+ seekable: (generator?.boolean ?? $generator.boolean)(),
172
+ deleted: (generator?.boolean ?? $generator.boolean)(),
173
+ path: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
174
+ refs: (generator?.array ?? $generator.array)(() => $ro1(_recursive, _recursive ? 1 + _depth : _depth)),
175
+ tags: (generator?.array ?? $generator.array)(() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()),
176
+ error: (generator?.array ?? $generator.array)(() => $ro2(_recursive, _recursive ? 1 + _depth : _depth)),
177
+ resumable: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
178
+ mimeType: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
179
+ hash: (generator?.customs ?? $generator.customs)?.string?.([
180
+ {
181
+ name: "Pattern<\"^([A-Fa-f0-9]{32})?$\">",
182
+ kind: "pattern",
183
+ value: "^([A-Fa-f0-9]{32})?$"
184
+ }
185
+ ]) ?? (generator?.pattern ?? $generator.pattern)(/^([A-Fa-f0-9]{32})?$/),
186
+ btime: $pick([
187
+ () => null,
188
+ () => (generator?.customs ?? $generator.customs)?.number?.([
189
+ {
190
+ name: "Minimum<0>",
191
+ kind: "minimum",
192
+ value: 0
193
+ },
194
+ {
195
+ name: "Type<\"uint32\">",
196
+ kind: "type",
197
+ value: "uint32"
198
+ }
199
+ ]) ?? (generator?.integer ?? $generator.integer)(0, 10)
200
+ ])()
201
+ });
202
+ const $ro1 = (_recursive = false, _depth = 0) => ({
203
+ file: $pick([
204
+ () => undefined,
205
+ () => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
206
+ ])()
207
+ });
208
+ const $ro2 = (_recursive = false, _depth = 0) => ({
209
+ message: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
210
+ });
211
+ return $ro0();
212
+ };
213
+ export const assertGuardFile = (input, errorFactory) => {
214
+ const __is = input => {
215
+ const $io0 = input => "string" === typeof input.id && /^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.id) && (null === input.size || "number" === typeof input.size && (0 <= input.size && (Math.floor(input.size) === input.size && 0 <= input.size && input.size <= 4294967295))) && "boolean" === typeof input.seekable && "boolean" === typeof input.deleted && "string" === typeof input.path && (Array.isArray(input.refs) && input.refs.every(elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && $io1(elem))) && (Array.isArray(input.tags) && input.tags.every(elem => "string" === typeof elem)) && (Array.isArray(input.error) && input.error.every(elem => "object" === typeof elem && null !== elem && $io2(elem))) && "string" === typeof input.resumable && "string" === typeof input.mimeType && ("string" === typeof input.hash && /^([A-Fa-f0-9]{32})?$/.test(input.hash)) && (null === input.btime || "number" === typeof input.btime && (0 <= input.btime && (Math.floor(input.btime) === input.btime && 0 <= input.btime && input.btime <= 4294967295)));
216
+ const $io1 = input => undefined === input.file || "string" === typeof input.file;
217
+ const $io2 = input => "string" === typeof input.message;
218
+ return "object" === typeof input && null !== input && $io0(input);
219
+ };
220
+ if (false === __is(input))
221
+ ((input, _path, _exceptionable = true) => {
222
+ const $guard = __typia.createAssertGuard.guard;
223
+ const $ao0 = (input, _path, _exceptionable = true) => ("string" === typeof input.id && (/^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.id) || $guard(_exceptionable, {
224
+ path: _path + ".id",
225
+ expected: "string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">",
226
+ value: input.id
227
+ }, errorFactory)) || $guard(_exceptionable, {
228
+ path: _path + ".id",
229
+ expected: "(string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">)",
230
+ value: input.id
231
+ }, errorFactory)) && (null === input.size || "number" === typeof input.size && (0 <= input.size || $guard(_exceptionable, {
232
+ path: _path + ".size",
233
+ expected: "number & Minimum<0>",
234
+ value: input.size
235
+ }, errorFactory)) && (Math.floor(input.size) === input.size && 0 <= input.size && input.size <= 4294967295 || $guard(_exceptionable, {
236
+ path: _path + ".size",
237
+ expected: "number & Type<\"uint32\">",
238
+ value: input.size
239
+ }, errorFactory)) || $guard(_exceptionable, {
240
+ path: _path + ".size",
241
+ expected: "((number & Minimum<0> & Type<\"uint32\">) | null)",
242
+ value: input.size
243
+ }, errorFactory)) && ("boolean" === typeof input.seekable || $guard(_exceptionable, {
244
+ path: _path + ".seekable",
245
+ expected: "boolean",
246
+ value: input.seekable
247
+ }, errorFactory)) && ("boolean" === typeof input.deleted || $guard(_exceptionable, {
248
+ path: _path + ".deleted",
249
+ expected: "boolean",
250
+ value: input.deleted
251
+ }, errorFactory)) && ("string" === typeof input.path || $guard(_exceptionable, {
252
+ path: _path + ".path",
253
+ expected: "string",
254
+ value: input.path
255
+ }, errorFactory)) && ((Array.isArray(input.refs) || $guard(_exceptionable, {
256
+ path: _path + ".refs",
257
+ expected: "Array<__type>",
258
+ value: input.refs
259
+ }, errorFactory)) && input.refs.every((elem, _index1) => ("object" === typeof elem && null !== elem && false === Array.isArray(elem) || $guard(_exceptionable, {
260
+ path: _path + ".refs[" + _index1 + "]",
261
+ expected: "__type",
262
+ value: elem
263
+ }, errorFactory)) && $ao1(elem, _path + ".refs[" + _index1 + "]", true && _exceptionable) || $guard(_exceptionable, {
264
+ path: _path + ".refs[" + _index1 + "]",
265
+ expected: "__type",
266
+ value: elem
267
+ }, errorFactory)) || $guard(_exceptionable, {
268
+ path: _path + ".refs",
269
+ expected: "Array<__type>",
270
+ value: input.refs
271
+ }, errorFactory)) && ((Array.isArray(input.tags) || $guard(_exceptionable, {
272
+ path: _path + ".tags",
273
+ expected: "Array<string>",
274
+ value: input.tags
275
+ }, errorFactory)) && input.tags.every((elem, _index2) => "string" === typeof elem || $guard(_exceptionable, {
276
+ path: _path + ".tags[" + _index2 + "]",
277
+ expected: "string",
278
+ value: elem
279
+ }, errorFactory)) || $guard(_exceptionable, {
280
+ path: _path + ".tags",
281
+ expected: "Array<string>",
282
+ value: input.tags
283
+ }, errorFactory)) && ((Array.isArray(input.error) || $guard(_exceptionable, {
284
+ path: _path + ".error",
285
+ expected: "Array<__type>.o1",
286
+ value: input.error
287
+ }, errorFactory)) && input.error.every((elem, _index3) => ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
288
+ path: _path + ".error[" + _index3 + "]",
289
+ expected: "__type.o1",
290
+ value: elem
291
+ }, errorFactory)) && $ao2(elem, _path + ".error[" + _index3 + "]", true && _exceptionable) || $guard(_exceptionable, {
292
+ path: _path + ".error[" + _index3 + "]",
293
+ expected: "__type.o1",
294
+ value: elem
295
+ }, errorFactory)) || $guard(_exceptionable, {
296
+ path: _path + ".error",
297
+ expected: "Array<__type>.o1",
298
+ value: input.error
299
+ }, errorFactory)) && ("string" === typeof input.resumable || $guard(_exceptionable, {
300
+ path: _path + ".resumable",
301
+ expected: "string",
302
+ value: input.resumable
303
+ }, errorFactory)) && ("string" === typeof input.mimeType || $guard(_exceptionable, {
304
+ path: _path + ".mimeType",
305
+ expected: "string",
306
+ value: input.mimeType
307
+ }, errorFactory)) && ("string" === typeof input.hash && (/^([A-Fa-f0-9]{32})?$/.test(input.hash) || $guard(_exceptionable, {
308
+ path: _path + ".hash",
309
+ expected: "string & Pattern<\"^([A-Fa-f0-9]{32})?$\">",
310
+ value: input.hash
311
+ }, errorFactory)) || $guard(_exceptionable, {
312
+ path: _path + ".hash",
313
+ expected: "(string & Pattern<\"^([A-Fa-f0-9]{32})?$\">)",
314
+ value: input.hash
315
+ }, errorFactory)) && (null === input.btime || "number" === typeof input.btime && (0 <= input.btime || $guard(_exceptionable, {
316
+ path: _path + ".btime",
317
+ expected: "number & Minimum<0>",
318
+ value: input.btime
319
+ }, errorFactory)) && (Math.floor(input.btime) === input.btime && 0 <= input.btime && input.btime <= 4294967295 || $guard(_exceptionable, {
320
+ path: _path + ".btime",
321
+ expected: "number & Type<\"uint32\">",
322
+ value: input.btime
323
+ }, errorFactory)) || $guard(_exceptionable, {
324
+ path: _path + ".btime",
325
+ expected: "((number & Minimum<0> & Type<\"uint32\">) | null)",
326
+ value: input.btime
327
+ }, errorFactory));
328
+ const $ao1 = (input, _path, _exceptionable = true) => undefined === input.file || "string" === typeof input.file || $guard(_exceptionable, {
329
+ path: _path + ".file",
330
+ expected: "(string | undefined)",
331
+ value: input.file
332
+ }, errorFactory);
333
+ const $ao2 = (input, _path, _exceptionable = true) => "string" === typeof input.message || $guard(_exceptionable, {
334
+ path: _path + ".message",
335
+ expected: "string",
336
+ value: input.message
337
+ }, errorFactory);
338
+ return ("object" === typeof input && null !== input || $guard(true, {
339
+ path: _path + "",
340
+ expected: "File",
341
+ value: input
342
+ }, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
343
+ path: _path + "",
344
+ expected: "File",
345
+ value: input
346
+ }, errorFactory);
347
+ })(input, "$input", true);
348
+ };
349
+ export const stringifyFile = input => {
350
+ const $io1 = input => undefined === input.file || "string" === typeof input.file;
351
+ const $io2 = input => "string" === typeof input.message;
352
+ const $string = __typia.json.createStringify.string;
353
+ const $tail = __typia.json.createStringify.tail;
354
+ const $so0 = input => `{"id":${$string(input.id)},"size":${null !== input.size ? input.size : "null"},"seekable":${input.seekable},"deleted":${input.deleted},"path":${$string(input.path)},"refs":${`[${input.refs.map(elem => $so1(elem)).join(",")}]`},"tags":${`[${input.tags.map(elem => $string(elem)).join(",")}]`},"error":${`[${input.error.map(elem => `{"message":${$string(elem.message)}}`).join(",")}]`},"resumable":${$string(input.resumable)},"mimeType":${$string(input.mimeType)},"hash":${$string(input.hash)},"btime":${null !== input.btime ? input.btime : "null"}}`;
355
+ const $so1 = input => `{${$tail(`${undefined === input.file ? "" : `"file":${undefined !== input.file ? $string(input.file) : undefined}`}`)}}`;
356
+ return $so0(input);
357
+ };
358
+ export const assertStringifyFile = (input, errorFactory) => { const assert = (input, errorFactory) => {
359
+ const __is = input => {
360
+ const $io0 = input => "string" === typeof input.id && /^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.id) && (null === input.size || "number" === typeof input.size && (0 <= input.size && (Math.floor(input.size) === input.size && 0 <= input.size && input.size <= 4294967295))) && "boolean" === typeof input.seekable && "boolean" === typeof input.deleted && "string" === typeof input.path && (Array.isArray(input.refs) && input.refs.every(elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && $io1(elem))) && (Array.isArray(input.tags) && input.tags.every(elem => "string" === typeof elem)) && (Array.isArray(input.error) && input.error.every(elem => "object" === typeof elem && null !== elem && $io2(elem))) && "string" === typeof input.resumable && "string" === typeof input.mimeType && ("string" === typeof input.hash && /^([A-Fa-f0-9]{32})?$/.test(input.hash)) && (null === input.btime || "number" === typeof input.btime && (0 <= input.btime && (Math.floor(input.btime) === input.btime && 0 <= input.btime && input.btime <= 4294967295)));
361
+ const $io1 = input => undefined === input.file || "string" === typeof input.file;
362
+ const $io2 = input => "string" === typeof input.message;
363
+ return "object" === typeof input && null !== input && $io0(input);
364
+ };
365
+ if (false === __is(input))
366
+ ((input, _path, _exceptionable = true) => {
367
+ const $guard = __typia.json.createAssertStringify.guard;
368
+ const $ao0 = (input, _path, _exceptionable = true) => ("string" === typeof input.id && (/^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.id) || $guard(_exceptionable, {
369
+ path: _path + ".id",
370
+ expected: "string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">",
371
+ value: input.id
372
+ }, errorFactory)) || $guard(_exceptionable, {
373
+ path: _path + ".id",
374
+ expected: "(string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">)",
375
+ value: input.id
376
+ }, errorFactory)) && (null === input.size || "number" === typeof input.size && (0 <= input.size || $guard(_exceptionable, {
377
+ path: _path + ".size",
378
+ expected: "number & Minimum<0>",
379
+ value: input.size
380
+ }, errorFactory)) && (Math.floor(input.size) === input.size && 0 <= input.size && input.size <= 4294967295 || $guard(_exceptionable, {
381
+ path: _path + ".size",
382
+ expected: "number & Type<\"uint32\">",
383
+ value: input.size
384
+ }, errorFactory)) || $guard(_exceptionable, {
385
+ path: _path + ".size",
386
+ expected: "((number & Minimum<0> & Type<\"uint32\">) | null)",
387
+ value: input.size
388
+ }, errorFactory)) && ("boolean" === typeof input.seekable || $guard(_exceptionable, {
389
+ path: _path + ".seekable",
390
+ expected: "boolean",
391
+ value: input.seekable
392
+ }, errorFactory)) && ("boolean" === typeof input.deleted || $guard(_exceptionable, {
393
+ path: _path + ".deleted",
394
+ expected: "boolean",
395
+ value: input.deleted
396
+ }, errorFactory)) && ("string" === typeof input.path || $guard(_exceptionable, {
397
+ path: _path + ".path",
398
+ expected: "string",
399
+ value: input.path
400
+ }, errorFactory)) && ((Array.isArray(input.refs) || $guard(_exceptionable, {
401
+ path: _path + ".refs",
402
+ expected: "Array<__type>",
403
+ value: input.refs
404
+ }, errorFactory)) && input.refs.every((elem, _index1) => ("object" === typeof elem && null !== elem && false === Array.isArray(elem) || $guard(_exceptionable, {
405
+ path: _path + ".refs[" + _index1 + "]",
406
+ expected: "__type",
407
+ value: elem
408
+ }, errorFactory)) && $ao1(elem, _path + ".refs[" + _index1 + "]", true && _exceptionable) || $guard(_exceptionable, {
409
+ path: _path + ".refs[" + _index1 + "]",
410
+ expected: "__type",
411
+ value: elem
412
+ }, errorFactory)) || $guard(_exceptionable, {
413
+ path: _path + ".refs",
414
+ expected: "Array<__type>",
415
+ value: input.refs
416
+ }, errorFactory)) && ((Array.isArray(input.tags) || $guard(_exceptionable, {
417
+ path: _path + ".tags",
418
+ expected: "Array<string>",
419
+ value: input.tags
420
+ }, errorFactory)) && input.tags.every((elem, _index2) => "string" === typeof elem || $guard(_exceptionable, {
421
+ path: _path + ".tags[" + _index2 + "]",
422
+ expected: "string",
423
+ value: elem
424
+ }, errorFactory)) || $guard(_exceptionable, {
425
+ path: _path + ".tags",
426
+ expected: "Array<string>",
427
+ value: input.tags
428
+ }, errorFactory)) && ((Array.isArray(input.error) || $guard(_exceptionable, {
429
+ path: _path + ".error",
430
+ expected: "Array<__type>.o1",
431
+ value: input.error
432
+ }, errorFactory)) && input.error.every((elem, _index3) => ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
433
+ path: _path + ".error[" + _index3 + "]",
434
+ expected: "__type.o1",
435
+ value: elem
436
+ }, errorFactory)) && $ao2(elem, _path + ".error[" + _index3 + "]", true && _exceptionable) || $guard(_exceptionable, {
437
+ path: _path + ".error[" + _index3 + "]",
438
+ expected: "__type.o1",
439
+ value: elem
440
+ }, errorFactory)) || $guard(_exceptionable, {
441
+ path: _path + ".error",
442
+ expected: "Array<__type>.o1",
443
+ value: input.error
444
+ }, errorFactory)) && ("string" === typeof input.resumable || $guard(_exceptionable, {
445
+ path: _path + ".resumable",
446
+ expected: "string",
447
+ value: input.resumable
448
+ }, errorFactory)) && ("string" === typeof input.mimeType || $guard(_exceptionable, {
449
+ path: _path + ".mimeType",
450
+ expected: "string",
451
+ value: input.mimeType
452
+ }, errorFactory)) && ("string" === typeof input.hash && (/^([A-Fa-f0-9]{32})?$/.test(input.hash) || $guard(_exceptionable, {
453
+ path: _path + ".hash",
454
+ expected: "string & Pattern<\"^([A-Fa-f0-9]{32})?$\">",
455
+ value: input.hash
456
+ }, errorFactory)) || $guard(_exceptionable, {
457
+ path: _path + ".hash",
458
+ expected: "(string & Pattern<\"^([A-Fa-f0-9]{32})?$\">)",
459
+ value: input.hash
460
+ }, errorFactory)) && (null === input.btime || "number" === typeof input.btime && (0 <= input.btime || $guard(_exceptionable, {
461
+ path: _path + ".btime",
462
+ expected: "number & Minimum<0>",
463
+ value: input.btime
464
+ }, errorFactory)) && (Math.floor(input.btime) === input.btime && 0 <= input.btime && input.btime <= 4294967295 || $guard(_exceptionable, {
465
+ path: _path + ".btime",
466
+ expected: "number & Type<\"uint32\">",
467
+ value: input.btime
468
+ }, errorFactory)) || $guard(_exceptionable, {
469
+ path: _path + ".btime",
470
+ expected: "((number & Minimum<0> & Type<\"uint32\">) | null)",
471
+ value: input.btime
472
+ }, errorFactory));
473
+ const $ao1 = (input, _path, _exceptionable = true) => undefined === input.file || "string" === typeof input.file || $guard(_exceptionable, {
474
+ path: _path + ".file",
475
+ expected: "(string | undefined)",
476
+ value: input.file
477
+ }, errorFactory);
478
+ const $ao2 = (input, _path, _exceptionable = true) => "string" === typeof input.message || $guard(_exceptionable, {
479
+ path: _path + ".message",
480
+ expected: "string",
481
+ value: input.message
482
+ }, errorFactory);
483
+ return ("object" === typeof input && null !== input || $guard(true, {
484
+ path: _path + "",
485
+ expected: "File",
486
+ value: input
487
+ }, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
488
+ path: _path + "",
489
+ expected: "File",
490
+ value: input
491
+ }, errorFactory);
492
+ })(input, "$input", true);
493
+ return input;
494
+ }; const stringify = input => {
495
+ const $io1 = input => undefined === input.file || "string" === typeof input.file;
496
+ const $io2 = input => "string" === typeof input.message;
497
+ const $string = __typia.json.createAssertStringify.string;
498
+ const $tail = __typia.json.createAssertStringify.tail;
499
+ const $so0 = input => `{"id":${$string(input.id)},"size":${null !== input.size ? input.size : "null"},"seekable":${input.seekable},"deleted":${input.deleted},"path":${$string(input.path)},"refs":${`[${input.refs.map(elem => $so1(elem)).join(",")}]`},"tags":${`[${input.tags.map(elem => $string(elem)).join(",")}]`},"error":${`[${input.error.map(elem => `{"message":${$string(elem.message)}}`).join(",")}]`},"resumable":${$string(input.resumable)},"mimeType":${$string(input.mimeType)},"hash":${$string(input.hash)},"btime":${null !== input.btime ? input.btime : "null"}}`;
500
+ const $so1 = input => `{${$tail(`${undefined === input.file ? "" : `"file":${undefined !== input.file ? $string(input.file) : undefined}`}`)}}`;
501
+ return $so0(input);
502
+ }; return stringify(assert(input, errorFactory)); };
503
+ export const isFileStats = input => {
504
+ 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))) && (null === input.uploading || "boolean" === typeof input.uploading) && "boolean" === typeof input.completed && (Array.isArray(input.zones) && input.zones.every(elem => "string" === typeof elem)) && (Array.isArray(input.replicas) && input.replicas.every(elem => "string" === typeof elem)) && ("string" === typeof input.id && /^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.id)) && (null === input.size || "number" === typeof input.size && (0 <= input.size && (Math.floor(input.size) === input.size && 0 <= input.size && input.size <= 4294967295))) && "boolean" === typeof input.seekable && "boolean" === typeof input.deleted && "string" === typeof input.path && (Array.isArray(input.refs) && input.refs.every(elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && $io1(elem))) && (Array.isArray(input.tags) && input.tags.every(elem => "string" === typeof elem)) && (Array.isArray(input.error) && input.error.every(elem => "object" === typeof elem && null !== elem && $io2(elem))) && "string" === typeof input.resumable && "string" === typeof input.mimeType && ("string" === typeof input.hash && /^([A-Fa-f0-9]{32})?$/.test(input.hash)) && (null === input.btime || "number" === typeof input.btime && (0 <= input.btime && (Math.floor(input.btime) === input.btime && 0 <= input.btime && input.btime <= 4294967295)));
505
+ const $io1 = input => undefined === input.file || "string" === typeof input.file;
506
+ const $io2 = input => "string" === typeof input.message;
507
+ return "object" === typeof input && null !== input && $io0(input);
508
+ };
509
+ export const assertFileStats = (input, errorFactory) => {
510
+ const __is = input => {
511
+ 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))) && (null === input.uploading || "boolean" === typeof input.uploading) && "boolean" === typeof input.completed && (Array.isArray(input.zones) && input.zones.every(elem => "string" === typeof elem)) && (Array.isArray(input.replicas) && input.replicas.every(elem => "string" === typeof elem)) && ("string" === typeof input.id && /^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.id)) && (null === input.size || "number" === typeof input.size && (0 <= input.size && (Math.floor(input.size) === input.size && 0 <= input.size && input.size <= 4294967295))) && "boolean" === typeof input.seekable && "boolean" === typeof input.deleted && "string" === typeof input.path && (Array.isArray(input.refs) && input.refs.every(elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && $io1(elem))) && (Array.isArray(input.tags) && input.tags.every(elem => "string" === typeof elem)) && (Array.isArray(input.error) && input.error.every(elem => "object" === typeof elem && null !== elem && $io2(elem))) && "string" === typeof input.resumable && "string" === typeof input.mimeType && ("string" === typeof input.hash && /^([A-Fa-f0-9]{32})?$/.test(input.hash)) && (null === input.btime || "number" === typeof input.btime && (0 <= input.btime && (Math.floor(input.btime) === input.btime && 0 <= input.btime && input.btime <= 4294967295)));
512
+ const $io1 = input => undefined === input.file || "string" === typeof input.file;
513
+ const $io2 = input => "string" === typeof input.message;
514
+ return "object" === typeof input && null !== input && $io0(input);
515
+ };
516
+ if (false === __is(input))
517
+ ((input, _path, _exceptionable = true) => {
518
+ const $guard = __typia.createAssert.guard;
519
+ const $ao0 = (input, _path, _exceptionable = true) => (null === input.position || "number" === typeof input.position && (0 <= input.position || $guard(_exceptionable, {
520
+ path: _path + ".position",
521
+ expected: "number & Minimum<0>",
522
+ value: input.position
523
+ }, errorFactory)) && (Math.floor(input.position) === input.position && 0 <= input.position && input.position <= 4294967295 || $guard(_exceptionable, {
524
+ path: _path + ".position",
525
+ expected: "number & Type<\"uint32\">",
526
+ value: input.position
527
+ }, errorFactory)) || $guard(_exceptionable, {
528
+ path: _path + ".position",
529
+ expected: "((number & Minimum<0> & Type<\"uint32\">) | null)",
530
+ value: input.position
531
+ }, errorFactory)) && (null === input.uploading || "boolean" === typeof input.uploading || $guard(_exceptionable, {
532
+ path: _path + ".uploading",
533
+ expected: "(boolean | null)",
534
+ value: input.uploading
30
535
  }, errorFactory)) && ("boolean" === typeof input.completed || $guard(_exceptionable, {
31
536
  path: _path + ".completed",
32
537
  expected: "boolean",
33
538
  value: input.completed
34
- }, errorFactory)) && ("boolean" === typeof input.uploading || $guard(_exceptionable, {
35
- path: _path + ".uploading",
36
- expected: "boolean",
37
- value: input.uploading
38
539
  }, errorFactory)) && ((Array.isArray(input.zones) || $guard(_exceptionable, {
39
540
  path: _path + ".zones",
40
541
  expected: "Array<string>",
@@ -59,6 +560,38 @@ export const assertFile = (input, errorFactory) => {
59
560
  path: _path + ".replicas",
60
561
  expected: "Array<string>",
61
562
  value: input.replicas
563
+ }, errorFactory)) && ("string" === typeof input.id && (/^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.id) || $guard(_exceptionable, {
564
+ path: _path + ".id",
565
+ expected: "string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">",
566
+ value: input.id
567
+ }, errorFactory)) || $guard(_exceptionable, {
568
+ path: _path + ".id",
569
+ expected: "(string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">)",
570
+ value: input.id
571
+ }, errorFactory)) && (null === input.size || "number" === typeof input.size && (0 <= input.size || $guard(_exceptionable, {
572
+ path: _path + ".size",
573
+ expected: "number & Minimum<0>",
574
+ value: input.size
575
+ }, errorFactory)) && (Math.floor(input.size) === input.size && 0 <= input.size && input.size <= 4294967295 || $guard(_exceptionable, {
576
+ path: _path + ".size",
577
+ expected: "number & Type<\"uint32\">",
578
+ value: input.size
579
+ }, errorFactory)) || $guard(_exceptionable, {
580
+ path: _path + ".size",
581
+ expected: "((number & Minimum<0> & Type<\"uint32\">) | null)",
582
+ value: input.size
583
+ }, errorFactory)) && ("boolean" === typeof input.seekable || $guard(_exceptionable, {
584
+ path: _path + ".seekable",
585
+ expected: "boolean",
586
+ value: input.seekable
587
+ }, errorFactory)) && ("boolean" === typeof input.deleted || $guard(_exceptionable, {
588
+ path: _path + ".deleted",
589
+ expected: "boolean",
590
+ value: input.deleted
591
+ }, errorFactory)) && ("string" === typeof input.path || $guard(_exceptionable, {
592
+ path: _path + ".path",
593
+ expected: "string",
594
+ value: input.path
62
595
  }, errorFactory)) && ((Array.isArray(input.refs) || $guard(_exceptionable, {
63
596
  path: _path + ".refs",
64
597
  expected: "Array<__type>",
@@ -75,46 +608,6 @@ export const assertFile = (input, errorFactory) => {
75
608
  path: _path + ".refs",
76
609
  expected: "Array<__type>",
77
610
  value: input.refs
78
- }, errorFactory)) && (null === input.btime || "number" === typeof input.btime || $guard(_exceptionable, {
79
- path: _path + ".btime",
80
- expected: "(null | number)",
81
- value: input.btime
82
- }, errorFactory)) && ("boolean" === typeof input.seekable || $guard(_exceptionable, {
83
- path: _path + ".seekable",
84
- expected: "boolean",
85
- value: input.seekable
86
- }, errorFactory)) && ("boolean" === typeof input.resumable || $guard(_exceptionable, {
87
- path: _path + ".resumable",
88
- expected: "boolean",
89
- value: input.resumable
90
- }, errorFactory)) && (null === input.size || "number" === typeof input.size && (0 <= input.size || $guard(_exceptionable, {
91
- path: _path + ".size",
92
- expected: "number & Minimum<0>",
93
- value: input.size
94
- }, errorFactory)) || $guard(_exceptionable, {
95
- path: _path + ".size",
96
- expected: "((number & Minimum<0>) | null)",
97
- value: input.size
98
- }, errorFactory)) && (null === input.position || "number" === typeof input.position && (0 <= input.position || $guard(_exceptionable, {
99
- path: _path + ".position",
100
- expected: "number & Minimum<0>",
101
- value: input.position
102
- }, errorFactory)) || $guard(_exceptionable, {
103
- path: _path + ".position",
104
- expected: "((number & Minimum<0>) | null)",
105
- value: input.position
106
- }, errorFactory)) && (null === input.hash || "string" === typeof input.hash && (input.hash.length <= 0 || /^[A-Fa-f0-9]{32}$/.test(input.hash) || $guard(_exceptionable, {
107
- path: _path + ".hash",
108
- expected: "(string & (MaxLength<0> | Pattern<\"^[A-Fa-f0-9]{32}$\">))",
109
- value: input.hash
110
- }, errorFactory)) || $guard(_exceptionable, {
111
- path: _path + ".hash",
112
- expected: "((string & (MaxLength<0> | Pattern<\"^[A-Fa-f0-9]{32}$\">)) | null)",
113
- value: input.hash
114
- }, errorFactory)) && (null === input.mimeType || "string" === typeof input.mimeType || $guard(_exceptionable, {
115
- path: _path + ".mimeType",
116
- expected: "(null | string)",
117
- value: input.mimeType
118
611
  }, errorFactory)) && ((Array.isArray(input.tags) || $guard(_exceptionable, {
119
612
  path: _path + ".tags",
120
613
  expected: "Array<string>",
@@ -140,9 +633,37 @@ export const assertFile = (input, errorFactory) => {
140
633
  expected: "__type.o1",
141
634
  value: elem
142
635
  }, errorFactory)) || $guard(_exceptionable, {
143
- path: _path + ".error",
144
- expected: "Array<__type>.o1",
145
- value: input.error
636
+ path: _path + ".error",
637
+ expected: "Array<__type>.o1",
638
+ value: input.error
639
+ }, errorFactory)) && ("string" === typeof input.resumable || $guard(_exceptionable, {
640
+ path: _path + ".resumable",
641
+ expected: "string",
642
+ value: input.resumable
643
+ }, errorFactory)) && ("string" === typeof input.mimeType || $guard(_exceptionable, {
644
+ path: _path + ".mimeType",
645
+ expected: "string",
646
+ value: input.mimeType
647
+ }, errorFactory)) && ("string" === typeof input.hash && (/^([A-Fa-f0-9]{32})?$/.test(input.hash) || $guard(_exceptionable, {
648
+ path: _path + ".hash",
649
+ expected: "string & Pattern<\"^([A-Fa-f0-9]{32})?$\">",
650
+ value: input.hash
651
+ }, errorFactory)) || $guard(_exceptionable, {
652
+ path: _path + ".hash",
653
+ expected: "(string & Pattern<\"^([A-Fa-f0-9]{32})?$\">)",
654
+ value: input.hash
655
+ }, errorFactory)) && (null === input.btime || "number" === typeof input.btime && (0 <= input.btime || $guard(_exceptionable, {
656
+ path: _path + ".btime",
657
+ expected: "number & Minimum<0>",
658
+ value: input.btime
659
+ }, errorFactory)) && (Math.floor(input.btime) === input.btime && 0 <= input.btime && input.btime <= 4294967295 || $guard(_exceptionable, {
660
+ path: _path + ".btime",
661
+ expected: "number & Type<\"uint32\">",
662
+ value: input.btime
663
+ }, errorFactory)) || $guard(_exceptionable, {
664
+ path: _path + ".btime",
665
+ expected: "((number & Minimum<0> & Type<\"uint32\">) | null)",
666
+ value: input.btime
146
667
  }, errorFactory));
147
668
  const $ao1 = (input, _path, _exceptionable = true) => undefined === input.file || "string" === typeof input.file || $guard(_exceptionable, {
148
669
  path: _path + ".file",
@@ -156,82 +677,94 @@ export const assertFile = (input, errorFactory) => {
156
677
  }, errorFactory);
157
678
  return ("object" === typeof input && null !== input || $guard(true, {
158
679
  path: _path + "",
159
- expected: "File",
680
+ expected: "FileStats",
160
681
  value: input
161
682
  }, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
162
683
  path: _path + "",
163
- expected: "File",
684
+ expected: "FileStats",
164
685
  value: input
165
686
  }, errorFactory);
166
687
  })(input, "$input", true);
167
688
  return input;
168
689
  };
169
- export const randomFile = generator => {
690
+ export const randomFileStats = generator => {
170
691
  const $generator = __typia.createRandom.generator;
171
692
  const $pick = __typia.createRandom.pick;
172
693
  const $ro0 = (_recursive = false, _depth = 0) => ({
173
- id: (generator?.customs ?? $generator.customs)?.string?.([
174
- {
175
- name: "MinLength<1>",
176
- kind: "minLength",
177
- value: 1
178
- }
179
- ]) ?? (generator?.string ?? $generator.string)((generator?.integer ?? $generator.integer)(1, 25)),
180
- deleted: (generator?.boolean ?? $generator.boolean)(),
181
- completed: (generator?.boolean ?? $generator.boolean)(),
182
- uploading: (generator?.boolean ?? $generator.boolean)(),
183
- zones: (generator?.array ?? $generator.array)(() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()),
184
- replicas: (generator?.array ?? $generator.array)(() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()),
185
- refs: (generator?.array ?? $generator.array)(() => $ro1(_recursive, _recursive ? 1 + _depth : _depth)),
186
- btime: $pick([
187
- () => null,
188
- () => (generator?.customs ?? $generator.customs)?.number?.([]) ?? (generator?.number ?? $generator.number)(0, 100)
189
- ])(),
190
- seekable: (generator?.boolean ?? $generator.boolean)(),
191
- resumable: (generator?.boolean ?? $generator.boolean)(),
192
- size: $pick([
694
+ position: $pick([
193
695
  () => null,
194
696
  () => (generator?.customs ?? $generator.customs)?.number?.([
195
697
  {
196
698
  name: "Minimum<0>",
197
699
  kind: "minimum",
198
700
  value: 0
701
+ },
702
+ {
703
+ name: "Type<\"uint32\">",
704
+ kind: "type",
705
+ value: "uint32"
199
706
  }
200
- ]) ?? (generator?.number ?? $generator.number)(0, 10)
707
+ ]) ?? (generator?.integer ?? $generator.integer)(0, 10)
201
708
  ])(),
202
- position: $pick([
709
+ uploading: $pick([
710
+ () => null,
711
+ () => (generator?.boolean ?? $generator.boolean)()
712
+ ])(),
713
+ completed: (generator?.boolean ?? $generator.boolean)(),
714
+ zones: (generator?.array ?? $generator.array)(() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()),
715
+ replicas: (generator?.array ?? $generator.array)(() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()),
716
+ id: (generator?.customs ?? $generator.customs)?.string?.([
717
+ {
718
+ name: "Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">",
719
+ kind: "pattern",
720
+ value: "^[0-9A-Za-z~][0-9A-Za-z~._: -]*$"
721
+ }
722
+ ]) ?? (generator?.pattern ?? $generator.pattern)(/^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/),
723
+ size: $pick([
203
724
  () => null,
204
725
  () => (generator?.customs ?? $generator.customs)?.number?.([
205
726
  {
206
727
  name: "Minimum<0>",
207
728
  kind: "minimum",
208
729
  value: 0
730
+ },
731
+ {
732
+ name: "Type<\"uint32\">",
733
+ kind: "type",
734
+ value: "uint32"
209
735
  }
210
- ]) ?? (generator?.number ?? $generator.number)(0, 10)
736
+ ]) ?? (generator?.integer ?? $generator.integer)(0, 10)
211
737
  ])(),
212
- hash: $pick([
738
+ seekable: (generator?.boolean ?? $generator.boolean)(),
739
+ deleted: (generator?.boolean ?? $generator.boolean)(),
740
+ path: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
741
+ refs: (generator?.array ?? $generator.array)(() => $ro1(_recursive, _recursive ? 1 + _depth : _depth)),
742
+ tags: (generator?.array ?? $generator.array)(() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()),
743
+ error: (generator?.array ?? $generator.array)(() => $ro2(_recursive, _recursive ? 1 + _depth : _depth)),
744
+ resumable: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
745
+ mimeType: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
746
+ hash: (generator?.customs ?? $generator.customs)?.string?.([
747
+ {
748
+ name: "Pattern<\"^([A-Fa-f0-9]{32})?$\">",
749
+ kind: "pattern",
750
+ value: "^([A-Fa-f0-9]{32})?$"
751
+ }
752
+ ]) ?? (generator?.pattern ?? $generator.pattern)(/^([A-Fa-f0-9]{32})?$/),
753
+ btime: $pick([
213
754
  () => null,
214
- () => (generator?.customs ?? $generator.customs)?.string?.([
755
+ () => (generator?.customs ?? $generator.customs)?.number?.([
215
756
  {
216
- name: "MaxLength<0>",
217
- kind: "maxLength",
757
+ name: "Minimum<0>",
758
+ kind: "minimum",
218
759
  value: 0
219
- }
220
- ]) ?? (generator?.string ?? $generator.string)((generator?.integer ?? $generator.integer)(0, 0)),
221
- () => (generator?.customs ?? $generator.customs)?.string?.([
760
+ },
222
761
  {
223
- name: "Pattern<\"^[A-Fa-f0-9]{32}$\">",
224
- kind: "pattern",
225
- value: "^[A-Fa-f0-9]{32}$"
762
+ name: "Type<\"uint32\">",
763
+ kind: "type",
764
+ value: "uint32"
226
765
  }
227
- ]) ?? (generator?.pattern ?? $generator.pattern)(/^[A-Fa-f0-9]{32}$/)
228
- ])(),
229
- mimeType: $pick([
230
- () => null,
231
- () => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
232
- ])(),
233
- tags: (generator?.array ?? $generator.array)(() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()),
234
- error: (generator?.array ?? $generator.array)(() => $ro2(_recursive, _recursive ? 1 + _depth : _depth))
766
+ ]) ?? (generator?.integer ?? $generator.integer)(0, 10)
767
+ ])()
235
768
  });
236
769
  const $ro1 = (_recursive = false, _depth = 0) => ({
237
770
  file: $pick([
@@ -244,9 +777,9 @@ export const randomFile = generator => {
244
777
  });
245
778
  return $ro0();
246
779
  };
247
- export const assertGuardFile = (input, errorFactory) => {
780
+ export const assertGuardFileStats = (input, errorFactory) => {
248
781
  const __is = input => {
249
- const $io0 = input => "string" === typeof input.id && 1 <= input.id.length && "boolean" === typeof input.deleted && "boolean" === typeof input.completed && "boolean" === typeof input.uploading && (Array.isArray(input.zones) && input.zones.every(elem => "string" === typeof elem)) && (Array.isArray(input.replicas) && input.replicas.every(elem => "string" === typeof elem)) && (Array.isArray(input.refs) && input.refs.every(elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && $io1(elem))) && (null === input.btime || "number" === typeof input.btime) && "boolean" === typeof input.seekable && "boolean" === typeof input.resumable && (null === input.size || "number" === typeof input.size && 0 <= input.size) && (null === input.position || "number" === typeof input.position && 0 <= input.position) && (null === input.hash || "string" === typeof input.hash && (input.hash.length <= 0 || /^[A-Fa-f0-9]{32}$/.test(input.hash))) && (null === input.mimeType || "string" === typeof input.mimeType) && (Array.isArray(input.tags) && input.tags.every(elem => "string" === typeof elem)) && (Array.isArray(input.error) && input.error.every(elem => "object" === typeof elem && null !== elem && $io2(elem)));
782
+ 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))) && (null === input.uploading || "boolean" === typeof input.uploading) && "boolean" === typeof input.completed && (Array.isArray(input.zones) && input.zones.every(elem => "string" === typeof elem)) && (Array.isArray(input.replicas) && input.replicas.every(elem => "string" === typeof elem)) && ("string" === typeof input.id && /^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.id)) && (null === input.size || "number" === typeof input.size && (0 <= input.size && (Math.floor(input.size) === input.size && 0 <= input.size && input.size <= 4294967295))) && "boolean" === typeof input.seekable && "boolean" === typeof input.deleted && "string" === typeof input.path && (Array.isArray(input.refs) && input.refs.every(elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && $io1(elem))) && (Array.isArray(input.tags) && input.tags.every(elem => "string" === typeof elem)) && (Array.isArray(input.error) && input.error.every(elem => "object" === typeof elem && null !== elem && $io2(elem))) && "string" === typeof input.resumable && "string" === typeof input.mimeType && ("string" === typeof input.hash && /^([A-Fa-f0-9]{32})?$/.test(input.hash)) && (null === input.btime || "number" === typeof input.btime && (0 <= input.btime && (Math.floor(input.btime) === input.btime && 0 <= input.btime && input.btime <= 4294967295)));
250
783
  const $io1 = input => undefined === input.file || "string" === typeof input.file;
251
784
  const $io2 = input => "string" === typeof input.message;
252
785
  return "object" === typeof input && null !== input && $io0(input);
@@ -254,26 +787,26 @@ export const assertGuardFile = (input, errorFactory) => {
254
787
  if (false === __is(input))
255
788
  ((input, _path, _exceptionable = true) => {
256
789
  const $guard = __typia.createAssertGuard.guard;
257
- const $ao0 = (input, _path, _exceptionable = true) => ("string" === typeof input.id && (1 <= input.id.length || $guard(_exceptionable, {
258
- path: _path + ".id",
259
- expected: "string & MinLength<1>",
260
- value: input.id
790
+ const $ao0 = (input, _path, _exceptionable = true) => (null === input.position || "number" === typeof input.position && (0 <= input.position || $guard(_exceptionable, {
791
+ path: _path + ".position",
792
+ expected: "number & Minimum<0>",
793
+ value: input.position
794
+ }, errorFactory)) && (Math.floor(input.position) === input.position && 0 <= input.position && input.position <= 4294967295 || $guard(_exceptionable, {
795
+ path: _path + ".position",
796
+ expected: "number & Type<\"uint32\">",
797
+ value: input.position
261
798
  }, errorFactory)) || $guard(_exceptionable, {
262
- path: _path + ".id",
263
- expected: "(string & MinLength<1>)",
264
- value: input.id
265
- }, errorFactory)) && ("boolean" === typeof input.deleted || $guard(_exceptionable, {
266
- path: _path + ".deleted",
267
- expected: "boolean",
268
- value: input.deleted
799
+ path: _path + ".position",
800
+ expected: "((number & Minimum<0> & Type<\"uint32\">) | null)",
801
+ value: input.position
802
+ }, errorFactory)) && (null === input.uploading || "boolean" === typeof input.uploading || $guard(_exceptionable, {
803
+ path: _path + ".uploading",
804
+ expected: "(boolean | null)",
805
+ value: input.uploading
269
806
  }, errorFactory)) && ("boolean" === typeof input.completed || $guard(_exceptionable, {
270
807
  path: _path + ".completed",
271
808
  expected: "boolean",
272
809
  value: input.completed
273
- }, errorFactory)) && ("boolean" === typeof input.uploading || $guard(_exceptionable, {
274
- path: _path + ".uploading",
275
- expected: "boolean",
276
- value: input.uploading
277
810
  }, errorFactory)) && ((Array.isArray(input.zones) || $guard(_exceptionable, {
278
811
  path: _path + ".zones",
279
812
  expected: "Array<string>",
@@ -298,6 +831,38 @@ export const assertGuardFile = (input, errorFactory) => {
298
831
  path: _path + ".replicas",
299
832
  expected: "Array<string>",
300
833
  value: input.replicas
834
+ }, errorFactory)) && ("string" === typeof input.id && (/^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.id) || $guard(_exceptionable, {
835
+ path: _path + ".id",
836
+ expected: "string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">",
837
+ value: input.id
838
+ }, errorFactory)) || $guard(_exceptionable, {
839
+ path: _path + ".id",
840
+ expected: "(string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">)",
841
+ value: input.id
842
+ }, errorFactory)) && (null === input.size || "number" === typeof input.size && (0 <= input.size || $guard(_exceptionable, {
843
+ path: _path + ".size",
844
+ expected: "number & Minimum<0>",
845
+ value: input.size
846
+ }, errorFactory)) && (Math.floor(input.size) === input.size && 0 <= input.size && input.size <= 4294967295 || $guard(_exceptionable, {
847
+ path: _path + ".size",
848
+ expected: "number & Type<\"uint32\">",
849
+ value: input.size
850
+ }, errorFactory)) || $guard(_exceptionable, {
851
+ path: _path + ".size",
852
+ expected: "((number & Minimum<0> & Type<\"uint32\">) | null)",
853
+ value: input.size
854
+ }, errorFactory)) && ("boolean" === typeof input.seekable || $guard(_exceptionable, {
855
+ path: _path + ".seekable",
856
+ expected: "boolean",
857
+ value: input.seekable
858
+ }, errorFactory)) && ("boolean" === typeof input.deleted || $guard(_exceptionable, {
859
+ path: _path + ".deleted",
860
+ expected: "boolean",
861
+ value: input.deleted
862
+ }, errorFactory)) && ("string" === typeof input.path || $guard(_exceptionable, {
863
+ path: _path + ".path",
864
+ expected: "string",
865
+ value: input.path
301
866
  }, errorFactory)) && ((Array.isArray(input.refs) || $guard(_exceptionable, {
302
867
  path: _path + ".refs",
303
868
  expected: "Array<__type>",
@@ -314,46 +879,6 @@ export const assertGuardFile = (input, errorFactory) => {
314
879
  path: _path + ".refs",
315
880
  expected: "Array<__type>",
316
881
  value: input.refs
317
- }, errorFactory)) && (null === input.btime || "number" === typeof input.btime || $guard(_exceptionable, {
318
- path: _path + ".btime",
319
- expected: "(null | number)",
320
- value: input.btime
321
- }, errorFactory)) && ("boolean" === typeof input.seekable || $guard(_exceptionable, {
322
- path: _path + ".seekable",
323
- expected: "boolean",
324
- value: input.seekable
325
- }, errorFactory)) && ("boolean" === typeof input.resumable || $guard(_exceptionable, {
326
- path: _path + ".resumable",
327
- expected: "boolean",
328
- value: input.resumable
329
- }, errorFactory)) && (null === input.size || "number" === typeof input.size && (0 <= input.size || $guard(_exceptionable, {
330
- path: _path + ".size",
331
- expected: "number & Minimum<0>",
332
- value: input.size
333
- }, errorFactory)) || $guard(_exceptionable, {
334
- path: _path + ".size",
335
- expected: "((number & Minimum<0>) | null)",
336
- value: input.size
337
- }, errorFactory)) && (null === input.position || "number" === typeof input.position && (0 <= input.position || $guard(_exceptionable, {
338
- path: _path + ".position",
339
- expected: "number & Minimum<0>",
340
- value: input.position
341
- }, errorFactory)) || $guard(_exceptionable, {
342
- path: _path + ".position",
343
- expected: "((number & Minimum<0>) | null)",
344
- value: input.position
345
- }, errorFactory)) && (null === input.hash || "string" === typeof input.hash && (input.hash.length <= 0 || /^[A-Fa-f0-9]{32}$/.test(input.hash) || $guard(_exceptionable, {
346
- path: _path + ".hash",
347
- expected: "(string & (MaxLength<0> | Pattern<\"^[A-Fa-f0-9]{32}$\">))",
348
- value: input.hash
349
- }, errorFactory)) || $guard(_exceptionable, {
350
- path: _path + ".hash",
351
- expected: "((string & (MaxLength<0> | Pattern<\"^[A-Fa-f0-9]{32}$\">)) | null)",
352
- value: input.hash
353
- }, errorFactory)) && (null === input.mimeType || "string" === typeof input.mimeType || $guard(_exceptionable, {
354
- path: _path + ".mimeType",
355
- expected: "(null | string)",
356
- value: input.mimeType
357
882
  }, errorFactory)) && ((Array.isArray(input.tags) || $guard(_exceptionable, {
358
883
  path: _path + ".tags",
359
884
  expected: "Array<string>",
@@ -382,6 +907,34 @@ export const assertGuardFile = (input, errorFactory) => {
382
907
  path: _path + ".error",
383
908
  expected: "Array<__type>.o1",
384
909
  value: input.error
910
+ }, errorFactory)) && ("string" === typeof input.resumable || $guard(_exceptionable, {
911
+ path: _path + ".resumable",
912
+ expected: "string",
913
+ value: input.resumable
914
+ }, errorFactory)) && ("string" === typeof input.mimeType || $guard(_exceptionable, {
915
+ path: _path + ".mimeType",
916
+ expected: "string",
917
+ value: input.mimeType
918
+ }, errorFactory)) && ("string" === typeof input.hash && (/^([A-Fa-f0-9]{32})?$/.test(input.hash) || $guard(_exceptionable, {
919
+ path: _path + ".hash",
920
+ expected: "string & Pattern<\"^([A-Fa-f0-9]{32})?$\">",
921
+ value: input.hash
922
+ }, errorFactory)) || $guard(_exceptionable, {
923
+ path: _path + ".hash",
924
+ expected: "(string & Pattern<\"^([A-Fa-f0-9]{32})?$\">)",
925
+ value: input.hash
926
+ }, errorFactory)) && (null === input.btime || "number" === typeof input.btime && (0 <= input.btime || $guard(_exceptionable, {
927
+ path: _path + ".btime",
928
+ expected: "number & Minimum<0>",
929
+ value: input.btime
930
+ }, errorFactory)) && (Math.floor(input.btime) === input.btime && 0 <= input.btime && input.btime <= 4294967295 || $guard(_exceptionable, {
931
+ path: _path + ".btime",
932
+ expected: "number & Type<\"uint32\">",
933
+ value: input.btime
934
+ }, errorFactory)) || $guard(_exceptionable, {
935
+ path: _path + ".btime",
936
+ expected: "((number & Minimum<0> & Type<\"uint32\">) | null)",
937
+ value: input.btime
385
938
  }, errorFactory));
386
939
  const $ao1 = (input, _path, _exceptionable = true) => undefined === input.file || "string" === typeof input.file || $guard(_exceptionable, {
387
940
  path: _path + ".file",
@@ -395,27 +948,27 @@ export const assertGuardFile = (input, errorFactory) => {
395
948
  }, errorFactory);
396
949
  return ("object" === typeof input && null !== input || $guard(true, {
397
950
  path: _path + "",
398
- expected: "File",
951
+ expected: "FileStats",
399
952
  value: input
400
953
  }, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
401
954
  path: _path + "",
402
- expected: "File",
955
+ expected: "FileStats",
403
956
  value: input
404
957
  }, errorFactory);
405
958
  })(input, "$input", true);
406
959
  };
407
- export const stringifyFile = input => {
960
+ export const stringifyFileStats = input => {
408
961
  const $io1 = input => undefined === input.file || "string" === typeof input.file;
409
962
  const $io2 = input => "string" === typeof input.message;
410
963
  const $string = __typia.json.createStringify.string;
411
964
  const $tail = __typia.json.createStringify.tail;
412
- const $so0 = input => `{"id":${$string(input.id)},"deleted":${input.deleted},"completed":${input.completed},"uploading":${input.uploading},"zones":${`[${input.zones.map(elem => $string(elem)).join(",")}]`},"replicas":${`[${input.replicas.map(elem => $string(elem)).join(",")}]`},"refs":${`[${input.refs.map(elem => $so1(elem)).join(",")}]`},"btime":${null !== input.btime ? input.btime : "null"},"seekable":${input.seekable},"resumable":${input.resumable},"size":${null !== input.size ? input.size : "null"},"position":${null !== input.position ? input.position : "null"},"hash":${null !== input.hash ? $string(input.hash) : "null"},"mimeType":${null !== input.mimeType ? $string(input.mimeType) : "null"},"tags":${`[${input.tags.map(elem => $string(elem)).join(",")}]`},"error":${`[${input.error.map(elem => `{"message":${$string(elem.message)}}`).join(",")}]`}}`;
965
+ const $so0 = input => `{"position":${null !== input.position ? input.position : "null"},"uploading":${null !== input.uploading ? input.uploading : "null"},"completed":${input.completed},"zones":${`[${input.zones.map(elem => $string(elem)).join(",")}]`},"replicas":${`[${input.replicas.map(elem => $string(elem)).join(",")}]`},"id":${$string(input.id)},"size":${null !== input.size ? input.size : "null"},"seekable":${input.seekable},"deleted":${input.deleted},"path":${$string(input.path)},"refs":${`[${input.refs.map(elem => $so1(elem)).join(",")}]`},"tags":${`[${input.tags.map(elem => $string(elem)).join(",")}]`},"error":${`[${input.error.map(elem => `{"message":${$string(elem.message)}}`).join(",")}]`},"resumable":${$string(input.resumable)},"mimeType":${$string(input.mimeType)},"hash":${$string(input.hash)},"btime":${null !== input.btime ? input.btime : "null"}}`;
413
966
  const $so1 = input => `{${$tail(`${undefined === input.file ? "" : `"file":${undefined !== input.file ? $string(input.file) : undefined}`}`)}}`;
414
967
  return $so0(input);
415
968
  };
416
- export const assertStringifyFile = (input, errorFactory) => { const assert = (input, errorFactory) => {
969
+ export const assertStringifyFileStats = (input, errorFactory) => { const assert = (input, errorFactory) => {
417
970
  const __is = input => {
418
- const $io0 = input => "string" === typeof input.id && 1 <= input.id.length && "boolean" === typeof input.deleted && "boolean" === typeof input.completed && "boolean" === typeof input.uploading && (Array.isArray(input.zones) && input.zones.every(elem => "string" === typeof elem)) && (Array.isArray(input.replicas) && input.replicas.every(elem => "string" === typeof elem)) && (Array.isArray(input.refs) && input.refs.every(elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && $io1(elem))) && (null === input.btime || "number" === typeof input.btime && !Number.isNaN(input.btime)) && "boolean" === typeof input.seekable && "boolean" === typeof input.resumable && (null === input.size || "number" === typeof input.size && (!Number.isNaN(input.size) && 0 <= input.size)) && (null === input.position || "number" === typeof input.position && (!Number.isNaN(input.position) && 0 <= input.position)) && (null === input.hash || "string" === typeof input.hash && (input.hash.length <= 0 || /^[A-Fa-f0-9]{32}$/.test(input.hash))) && (null === input.mimeType || "string" === typeof input.mimeType) && (Array.isArray(input.tags) && input.tags.every(elem => "string" === typeof elem)) && (Array.isArray(input.error) && input.error.every(elem => "object" === typeof elem && null !== elem && $io2(elem)));
971
+ 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))) && (null === input.uploading || "boolean" === typeof input.uploading) && "boolean" === typeof input.completed && (Array.isArray(input.zones) && input.zones.every(elem => "string" === typeof elem)) && (Array.isArray(input.replicas) && input.replicas.every(elem => "string" === typeof elem)) && ("string" === typeof input.id && /^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.id)) && (null === input.size || "number" === typeof input.size && (0 <= input.size && (Math.floor(input.size) === input.size && 0 <= input.size && input.size <= 4294967295))) && "boolean" === typeof input.seekable && "boolean" === typeof input.deleted && "string" === typeof input.path && (Array.isArray(input.refs) && input.refs.every(elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && $io1(elem))) && (Array.isArray(input.tags) && input.tags.every(elem => "string" === typeof elem)) && (Array.isArray(input.error) && input.error.every(elem => "object" === typeof elem && null !== elem && $io2(elem))) && "string" === typeof input.resumable && "string" === typeof input.mimeType && ("string" === typeof input.hash && /^([A-Fa-f0-9]{32})?$/.test(input.hash)) && (null === input.btime || "number" === typeof input.btime && (0 <= input.btime && (Math.floor(input.btime) === input.btime && 0 <= input.btime && input.btime <= 4294967295)));
419
972
  const $io1 = input => undefined === input.file || "string" === typeof input.file;
420
973
  const $io2 = input => "string" === typeof input.message;
421
974
  return "object" === typeof input && null !== input && $io0(input);
@@ -423,26 +976,26 @@ export const assertStringifyFile = (input, errorFactory) => { const assert = (in
423
976
  if (false === __is(input))
424
977
  ((input, _path, _exceptionable = true) => {
425
978
  const $guard = __typia.json.createAssertStringify.guard;
426
- const $ao0 = (input, _path, _exceptionable = true) => ("string" === typeof input.id && (1 <= input.id.length || $guard(_exceptionable, {
427
- path: _path + ".id",
428
- expected: "string & MinLength<1>",
429
- value: input.id
979
+ const $ao0 = (input, _path, _exceptionable = true) => (null === input.position || "number" === typeof input.position && (0 <= input.position || $guard(_exceptionable, {
980
+ path: _path + ".position",
981
+ expected: "number & Minimum<0>",
982
+ value: input.position
983
+ }, errorFactory)) && (Math.floor(input.position) === input.position && 0 <= input.position && input.position <= 4294967295 || $guard(_exceptionable, {
984
+ path: _path + ".position",
985
+ expected: "number & Type<\"uint32\">",
986
+ value: input.position
430
987
  }, errorFactory)) || $guard(_exceptionable, {
431
- path: _path + ".id",
432
- expected: "(string & MinLength<1>)",
433
- value: input.id
434
- }, errorFactory)) && ("boolean" === typeof input.deleted || $guard(_exceptionable, {
435
- path: _path + ".deleted",
436
- expected: "boolean",
437
- value: input.deleted
988
+ path: _path + ".position",
989
+ expected: "((number & Minimum<0> & Type<\"uint32\">) | null)",
990
+ value: input.position
991
+ }, errorFactory)) && (null === input.uploading || "boolean" === typeof input.uploading || $guard(_exceptionable, {
992
+ path: _path + ".uploading",
993
+ expected: "(boolean | null)",
994
+ value: input.uploading
438
995
  }, errorFactory)) && ("boolean" === typeof input.completed || $guard(_exceptionable, {
439
996
  path: _path + ".completed",
440
997
  expected: "boolean",
441
998
  value: input.completed
442
- }, errorFactory)) && ("boolean" === typeof input.uploading || $guard(_exceptionable, {
443
- path: _path + ".uploading",
444
- expected: "boolean",
445
- value: input.uploading
446
999
  }, errorFactory)) && ((Array.isArray(input.zones) || $guard(_exceptionable, {
447
1000
  path: _path + ".zones",
448
1001
  expected: "Array<string>",
@@ -467,6 +1020,38 @@ export const assertStringifyFile = (input, errorFactory) => { const assert = (in
467
1020
  path: _path + ".replicas",
468
1021
  expected: "Array<string>",
469
1022
  value: input.replicas
1023
+ }, errorFactory)) && ("string" === typeof input.id && (/^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.id) || $guard(_exceptionable, {
1024
+ path: _path + ".id",
1025
+ expected: "string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">",
1026
+ value: input.id
1027
+ }, errorFactory)) || $guard(_exceptionable, {
1028
+ path: _path + ".id",
1029
+ expected: "(string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">)",
1030
+ value: input.id
1031
+ }, errorFactory)) && (null === input.size || "number" === typeof input.size && (0 <= input.size || $guard(_exceptionable, {
1032
+ path: _path + ".size",
1033
+ expected: "number & Minimum<0>",
1034
+ value: input.size
1035
+ }, errorFactory)) && (Math.floor(input.size) === input.size && 0 <= input.size && input.size <= 4294967295 || $guard(_exceptionable, {
1036
+ path: _path + ".size",
1037
+ expected: "number & Type<\"uint32\">",
1038
+ value: input.size
1039
+ }, errorFactory)) || $guard(_exceptionable, {
1040
+ path: _path + ".size",
1041
+ expected: "((number & Minimum<0> & Type<\"uint32\">) | null)",
1042
+ value: input.size
1043
+ }, errorFactory)) && ("boolean" === typeof input.seekable || $guard(_exceptionable, {
1044
+ path: _path + ".seekable",
1045
+ expected: "boolean",
1046
+ value: input.seekable
1047
+ }, errorFactory)) && ("boolean" === typeof input.deleted || $guard(_exceptionable, {
1048
+ path: _path + ".deleted",
1049
+ expected: "boolean",
1050
+ value: input.deleted
1051
+ }, errorFactory)) && ("string" === typeof input.path || $guard(_exceptionable, {
1052
+ path: _path + ".path",
1053
+ expected: "string",
1054
+ value: input.path
470
1055
  }, errorFactory)) && ((Array.isArray(input.refs) || $guard(_exceptionable, {
471
1056
  path: _path + ".refs",
472
1057
  expected: "Array<__type>",
@@ -483,54 +1068,6 @@ export const assertStringifyFile = (input, errorFactory) => { const assert = (in
483
1068
  path: _path + ".refs",
484
1069
  expected: "Array<__type>",
485
1070
  value: input.refs
486
- }, errorFactory)) && (null === input.btime || "number" === typeof input.btime && !Number.isNaN(input.btime) || $guard(_exceptionable, {
487
- path: _path + ".btime",
488
- expected: "(null | number)",
489
- value: input.btime
490
- }, errorFactory)) && ("boolean" === typeof input.seekable || $guard(_exceptionable, {
491
- path: _path + ".seekable",
492
- expected: "boolean",
493
- value: input.seekable
494
- }, errorFactory)) && ("boolean" === typeof input.resumable || $guard(_exceptionable, {
495
- path: _path + ".resumable",
496
- expected: "boolean",
497
- value: input.resumable
498
- }, errorFactory)) && (null === input.size || "number" === typeof input.size && (!Number.isNaN(input.size) || $guard(_exceptionable, {
499
- path: _path + ".size",
500
- expected: "number",
501
- value: input.size
502
- }, errorFactory)) && (0 <= input.size || $guard(_exceptionable, {
503
- path: _path + ".size",
504
- expected: "number & Minimum<0>",
505
- value: input.size
506
- }, errorFactory)) || $guard(_exceptionable, {
507
- path: _path + ".size",
508
- expected: "((number & Minimum<0>) | null)",
509
- value: input.size
510
- }, errorFactory)) && (null === input.position || "number" === typeof input.position && (!Number.isNaN(input.position) || $guard(_exceptionable, {
511
- path: _path + ".position",
512
- expected: "number",
513
- value: input.position
514
- }, errorFactory)) && (0 <= input.position || $guard(_exceptionable, {
515
- path: _path + ".position",
516
- expected: "number & Minimum<0>",
517
- value: input.position
518
- }, errorFactory)) || $guard(_exceptionable, {
519
- path: _path + ".position",
520
- expected: "((number & Minimum<0>) | null)",
521
- value: input.position
522
- }, errorFactory)) && (null === input.hash || "string" === typeof input.hash && (input.hash.length <= 0 || /^[A-Fa-f0-9]{32}$/.test(input.hash) || $guard(_exceptionable, {
523
- path: _path + ".hash",
524
- expected: "(string & (MaxLength<0> | Pattern<\"^[A-Fa-f0-9]{32}$\">))",
525
- value: input.hash
526
- }, errorFactory)) || $guard(_exceptionable, {
527
- path: _path + ".hash",
528
- expected: "((string & (MaxLength<0> | Pattern<\"^[A-Fa-f0-9]{32}$\">)) | null)",
529
- value: input.hash
530
- }, errorFactory)) && (null === input.mimeType || "string" === typeof input.mimeType || $guard(_exceptionable, {
531
- path: _path + ".mimeType",
532
- expected: "(null | string)",
533
- value: input.mimeType
534
1071
  }, errorFactory)) && ((Array.isArray(input.tags) || $guard(_exceptionable, {
535
1072
  path: _path + ".tags",
536
1073
  expected: "Array<string>",
@@ -559,6 +1096,34 @@ export const assertStringifyFile = (input, errorFactory) => { const assert = (in
559
1096
  path: _path + ".error",
560
1097
  expected: "Array<__type>.o1",
561
1098
  value: input.error
1099
+ }, errorFactory)) && ("string" === typeof input.resumable || $guard(_exceptionable, {
1100
+ path: _path + ".resumable",
1101
+ expected: "string",
1102
+ value: input.resumable
1103
+ }, errorFactory)) && ("string" === typeof input.mimeType || $guard(_exceptionable, {
1104
+ path: _path + ".mimeType",
1105
+ expected: "string",
1106
+ value: input.mimeType
1107
+ }, errorFactory)) && ("string" === typeof input.hash && (/^([A-Fa-f0-9]{32})?$/.test(input.hash) || $guard(_exceptionable, {
1108
+ path: _path + ".hash",
1109
+ expected: "string & Pattern<\"^([A-Fa-f0-9]{32})?$\">",
1110
+ value: input.hash
1111
+ }, errorFactory)) || $guard(_exceptionable, {
1112
+ path: _path + ".hash",
1113
+ expected: "(string & Pattern<\"^([A-Fa-f0-9]{32})?$\">)",
1114
+ value: input.hash
1115
+ }, errorFactory)) && (null === input.btime || "number" === typeof input.btime && (0 <= input.btime || $guard(_exceptionable, {
1116
+ path: _path + ".btime",
1117
+ expected: "number & Minimum<0>",
1118
+ value: input.btime
1119
+ }, errorFactory)) && (Math.floor(input.btime) === input.btime && 0 <= input.btime && input.btime <= 4294967295 || $guard(_exceptionable, {
1120
+ path: _path + ".btime",
1121
+ expected: "number & Type<\"uint32\">",
1122
+ value: input.btime
1123
+ }, errorFactory)) || $guard(_exceptionable, {
1124
+ path: _path + ".btime",
1125
+ expected: "((number & Minimum<0> & Type<\"uint32\">) | null)",
1126
+ value: input.btime
562
1127
  }, errorFactory));
563
1128
  const $ao1 = (input, _path, _exceptionable = true) => undefined === input.file || "string" === typeof input.file || $guard(_exceptionable, {
564
1129
  path: _path + ".file",
@@ -572,11 +1137,11 @@ export const assertStringifyFile = (input, errorFactory) => { const assert = (in
572
1137
  }, errorFactory);
573
1138
  return ("object" === typeof input && null !== input || $guard(true, {
574
1139
  path: _path + "",
575
- expected: "File",
1140
+ expected: "FileStats",
576
1141
  value: input
577
1142
  }, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
578
1143
  path: _path + "",
579
- expected: "File",
1144
+ expected: "FileStats",
580
1145
  value: input
581
1146
  }, errorFactory);
582
1147
  })(input, "$input", true);
@@ -586,7 +1151,7 @@ export const assertStringifyFile = (input, errorFactory) => { const assert = (in
586
1151
  const $io2 = input => "string" === typeof input.message;
587
1152
  const $string = __typia.json.createAssertStringify.string;
588
1153
  const $tail = __typia.json.createAssertStringify.tail;
589
- const $so0 = input => `{"id":${$string(input.id)},"deleted":${input.deleted},"completed":${input.completed},"uploading":${input.uploading},"zones":${`[${input.zones.map(elem => $string(elem)).join(",")}]`},"replicas":${`[${input.replicas.map(elem => $string(elem)).join(",")}]`},"refs":${`[${input.refs.map(elem => $so1(elem)).join(",")}]`},"btime":${null !== input.btime ? input.btime : "null"},"seekable":${input.seekable},"resumable":${input.resumable},"size":${null !== input.size ? input.size : "null"},"position":${null !== input.position ? input.position : "null"},"hash":${null !== input.hash ? $string(input.hash) : "null"},"mimeType":${null !== input.mimeType ? $string(input.mimeType) : "null"},"tags":${`[${input.tags.map(elem => $string(elem)).join(",")}]`},"error":${`[${input.error.map(elem => `{"message":${$string(elem.message)}}`).join(",")}]`}}`;
1154
+ const $so0 = input => `{"position":${null !== input.position ? input.position : "null"},"uploading":${null !== input.uploading ? input.uploading : "null"},"completed":${input.completed},"zones":${`[${input.zones.map(elem => $string(elem)).join(",")}]`},"replicas":${`[${input.replicas.map(elem => $string(elem)).join(",")}]`},"id":${$string(input.id)},"size":${null !== input.size ? input.size : "null"},"seekable":${input.seekable},"deleted":${input.deleted},"path":${$string(input.path)},"refs":${`[${input.refs.map(elem => $so1(elem)).join(",")}]`},"tags":${`[${input.tags.map(elem => $string(elem)).join(",")}]`},"error":${`[${input.error.map(elem => `{"message":${$string(elem.message)}}`).join(",")}]`},"resumable":${$string(input.resumable)},"mimeType":${$string(input.mimeType)},"hash":${$string(input.hash)},"btime":${null !== input.btime ? input.btime : "null"}}`;
590
1155
  const $so1 = input => `{${$tail(`${undefined === input.file ? "" : `"file":${undefined !== input.file ? $string(input.file) : undefined}`}`)}}`;
591
1156
  return $so0(input);
592
1157
  }; return stringify(assert(input, errorFactory)); };