@nxtedition/types 1.6.1 → 1.6.2

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 && /^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.id) && ("number" === typeof input.size && (0 <= input.size && (Math.floor(input.size) === input.size && 0 <= input.size && input.size <= 18446744073709552000))) && "boolean" === typeof input.seekable && "boolean" === typeof input.deleted && (Array.isArray(input.refs) && input.refs.every(elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && $io1(elem))) && (Array.isArray(input.tags) && input.tags.every(elem => "string" === typeof elem)) && (null === input.error || 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)) && ("number" === typeof input.btime && (0 <= input.btime && (Math.floor(input.btime) === input.btime && 0 <= input.btime && input.btime <= 18446744073709552000)));
3
+ const $io0 = input => "string" === typeof input.id && /^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.id) && ("number" === typeof input.size && (0 <= input.size && (Math.floor(input.size) === input.size && 0 <= input.size && input.size <= 18446744073709552000))) && "boolean" === typeof input.seekable && "boolean" === typeof input.deleted && (Array.isArray(input.refs) && input.refs.every(elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && $io1(elem))) && (Array.isArray(input.tags) && input.tags.every(elem => "string" === typeof elem)) && "string" === typeof input.resumable && "string" === typeof input.mimeType && ("string" === typeof input.hash && /^([A-Fa-f0-9]{32})?$/.test(input.hash)) && ("number" === typeof input.btime && (0 <= input.btime && (Math.floor(input.btime) === input.btime && 0 <= input.btime && input.btime <= 18446744073709552000))) && "boolean" === typeof input.completed && (null === input.error || Array.isArray(input.error) && input.error.every(elem => "object" === typeof elem && null !== elem && $io2(elem)));
4
4
  const $io1 = input => (undefined === input.file || "string" === typeof input.file) && (undefined === input.offset || "number" === typeof input.offset) && (undefined === input.start || "number" === typeof input.start) && (undefined === input.end || "number" === typeof input.end);
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 && /^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.id) && ("number" === typeof input.size && (0 <= input.size && (Math.floor(input.size) === input.size && 0 <= input.size && input.size <= 18446744073709552000))) && "boolean" === typeof input.seekable && "boolean" === typeof input.deleted && (Array.isArray(input.refs) && input.refs.every(elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && $io1(elem))) && (Array.isArray(input.tags) && input.tags.every(elem => "string" === typeof elem)) && (null === input.error || 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)) && ("number" === typeof input.btime && (0 <= input.btime && (Math.floor(input.btime) === input.btime && 0 <= input.btime && input.btime <= 18446744073709552000)));
10
+ const $io0 = input => "string" === typeof input.id && /^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.id) && ("number" === typeof input.size && (0 <= input.size && (Math.floor(input.size) === input.size && 0 <= input.size && input.size <= 18446744073709552000))) && "boolean" === typeof input.seekable && "boolean" === typeof input.deleted && (Array.isArray(input.refs) && input.refs.every(elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && $io1(elem))) && (Array.isArray(input.tags) && input.tags.every(elem => "string" === typeof elem)) && "string" === typeof input.resumable && "string" === typeof input.mimeType && ("string" === typeof input.hash && /^([A-Fa-f0-9]{32})?$/.test(input.hash)) && ("number" === typeof input.btime && (0 <= input.btime && (Math.floor(input.btime) === input.btime && 0 <= input.btime && input.btime <= 18446744073709552000))) && "boolean" === typeof input.completed && (null === input.error || Array.isArray(input.error) && input.error.every(elem => "object" === typeof elem && null !== elem && $io2(elem)));
11
11
  const $io1 = input => (undefined === input.file || "string" === typeof input.file) && (undefined === input.offset || "number" === typeof input.offset) && (undefined === input.start || "number" === typeof input.start) && (undefined === input.end || "number" === typeof input.end);
12
12
  const $io2 = input => "string" === typeof input.message;
13
13
  return "object" === typeof input && null !== input && $io0(input);
@@ -71,22 +71,6 @@ export const assertFile = (input, errorFactory) => {
71
71
  path: _path + ".tags",
72
72
  expected: "Array<string>",
73
73
  value: input.tags
74
- }, errorFactory)) && (null === input.error || (Array.isArray(input.error) || $guard(_exceptionable, {
75
- path: _path + ".error",
76
- expected: "(Array<__type>.o1 | null)",
77
- value: input.error
78
- }, errorFactory)) && input.error.every((elem, _index3) => ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
79
- path: _path + ".error[" + _index3 + "]",
80
- expected: "__type.o1",
81
- value: elem
82
- }, errorFactory)) && $ao2(elem, _path + ".error[" + _index3 + "]", true && _exceptionable) || $guard(_exceptionable, {
83
- path: _path + ".error[" + _index3 + "]",
84
- expected: "__type.o1",
85
- value: elem
86
- }, errorFactory)) || $guard(_exceptionable, {
87
- path: _path + ".error",
88
- expected: "(Array<__type>.o1 | null)",
89
- value: input.error
90
74
  }, errorFactory)) && ("string" === typeof input.resumable || $guard(_exceptionable, {
91
75
  path: _path + ".resumable",
92
76
  expected: "string",
@@ -115,6 +99,26 @@ export const assertFile = (input, errorFactory) => {
115
99
  path: _path + ".btime",
116
100
  expected: "(number & Minimum<0> & Type<\"uint64\">)",
117
101
  value: input.btime
102
+ }, errorFactory)) && ("boolean" === typeof input.completed || $guard(_exceptionable, {
103
+ path: _path + ".completed",
104
+ expected: "boolean",
105
+ value: input.completed
106
+ }, errorFactory)) && (null === input.error || (Array.isArray(input.error) || $guard(_exceptionable, {
107
+ path: _path + ".error",
108
+ expected: "(Array<__type>.o1 | null)",
109
+ value: input.error
110
+ }, errorFactory)) && input.error.every((elem, _index3) => ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
111
+ path: _path + ".error[" + _index3 + "]",
112
+ expected: "__type.o1",
113
+ value: elem
114
+ }, errorFactory)) && $ao2(elem, _path + ".error[" + _index3 + "]", true && _exceptionable) || $guard(_exceptionable, {
115
+ path: _path + ".error[" + _index3 + "]",
116
+ expected: "__type.o1",
117
+ value: elem
118
+ }, errorFactory)) || $guard(_exceptionable, {
119
+ path: _path + ".error",
120
+ expected: "(Array<__type>.o1 | null)",
121
+ value: input.error
118
122
  }, errorFactory));
119
123
  const $ao1 = (input, _path, _exceptionable = true) => (undefined === input.file || "string" === typeof input.file || $guard(_exceptionable, {
120
124
  path: _path + ".file",
@@ -177,10 +181,6 @@ export const randomFile = generator => {
177
181
  deleted: (generator?.boolean ?? $generator.boolean)(),
178
182
  refs: (generator?.array ?? $generator.array)(() => $ro1(_recursive, _recursive ? 1 + _depth : _depth)),
179
183
  tags: (generator?.array ?? $generator.array)(() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()),
180
- error: $pick([
181
- () => null,
182
- () => (generator?.array ?? $generator.array)(() => $ro2(_recursive, _recursive ? 1 + _depth : _depth))
183
- ])(),
184
184
  resumable: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
185
185
  mimeType: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
186
186
  hash: (generator?.customs ?? $generator.customs)?.string?.([
@@ -201,7 +201,12 @@ export const randomFile = generator => {
201
201
  kind: "type",
202
202
  value: "uint64"
203
203
  }
204
- ]) ?? (generator?.integer ?? $generator.integer)(0, 10)
204
+ ]) ?? (generator?.integer ?? $generator.integer)(0, 10),
205
+ completed: (generator?.boolean ?? $generator.boolean)(),
206
+ error: $pick([
207
+ () => null,
208
+ () => (generator?.array ?? $generator.array)(() => $ro2(_recursive, _recursive ? 1 + _depth : _depth))
209
+ ])()
205
210
  });
206
211
  const $ro1 = (_recursive = false, _depth = 0) => ({
207
212
  file: $pick([
@@ -228,7 +233,7 @@ export const randomFile = generator => {
228
233
  };
229
234
  export const assertGuardFile = (input, errorFactory) => {
230
235
  const __is = input => {
231
- const $io0 = input => "string" === typeof input.id && /^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.id) && ("number" === typeof input.size && (0 <= input.size && (Math.floor(input.size) === input.size && 0 <= input.size && input.size <= 18446744073709552000))) && "boolean" === typeof input.seekable && "boolean" === typeof input.deleted && (Array.isArray(input.refs) && input.refs.every(elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && $io1(elem))) && (Array.isArray(input.tags) && input.tags.every(elem => "string" === typeof elem)) && (null === input.error || 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)) && ("number" === typeof input.btime && (0 <= input.btime && (Math.floor(input.btime) === input.btime && 0 <= input.btime && input.btime <= 18446744073709552000)));
236
+ const $io0 = input => "string" === typeof input.id && /^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.id) && ("number" === typeof input.size && (0 <= input.size && (Math.floor(input.size) === input.size && 0 <= input.size && input.size <= 18446744073709552000))) && "boolean" === typeof input.seekable && "boolean" === typeof input.deleted && (Array.isArray(input.refs) && input.refs.every(elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && $io1(elem))) && (Array.isArray(input.tags) && input.tags.every(elem => "string" === typeof elem)) && "string" === typeof input.resumable && "string" === typeof input.mimeType && ("string" === typeof input.hash && /^([A-Fa-f0-9]{32})?$/.test(input.hash)) && ("number" === typeof input.btime && (0 <= input.btime && (Math.floor(input.btime) === input.btime && 0 <= input.btime && input.btime <= 18446744073709552000))) && "boolean" === typeof input.completed && (null === input.error || Array.isArray(input.error) && input.error.every(elem => "object" === typeof elem && null !== elem && $io2(elem)));
232
237
  const $io1 = input => (undefined === input.file || "string" === typeof input.file) && (undefined === input.offset || "number" === typeof input.offset) && (undefined === input.start || "number" === typeof input.start) && (undefined === input.end || "number" === typeof input.end);
233
238
  const $io2 = input => "string" === typeof input.message;
234
239
  return "object" === typeof input && null !== input && $io0(input);
@@ -292,22 +297,6 @@ export const assertGuardFile = (input, errorFactory) => {
292
297
  path: _path + ".tags",
293
298
  expected: "Array<string>",
294
299
  value: input.tags
295
- }, errorFactory)) && (null === input.error || (Array.isArray(input.error) || $guard(_exceptionable, {
296
- path: _path + ".error",
297
- expected: "(Array<__type>.o1 | null)",
298
- value: input.error
299
- }, errorFactory)) && input.error.every((elem, _index3) => ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
300
- path: _path + ".error[" + _index3 + "]",
301
- expected: "__type.o1",
302
- value: elem
303
- }, errorFactory)) && $ao2(elem, _path + ".error[" + _index3 + "]", true && _exceptionable) || $guard(_exceptionable, {
304
- path: _path + ".error[" + _index3 + "]",
305
- expected: "__type.o1",
306
- value: elem
307
- }, errorFactory)) || $guard(_exceptionable, {
308
- path: _path + ".error",
309
- expected: "(Array<__type>.o1 | null)",
310
- value: input.error
311
300
  }, errorFactory)) && ("string" === typeof input.resumable || $guard(_exceptionable, {
312
301
  path: _path + ".resumable",
313
302
  expected: "string",
@@ -336,6 +325,26 @@ export const assertGuardFile = (input, errorFactory) => {
336
325
  path: _path + ".btime",
337
326
  expected: "(number & Minimum<0> & Type<\"uint64\">)",
338
327
  value: input.btime
328
+ }, errorFactory)) && ("boolean" === typeof input.completed || $guard(_exceptionable, {
329
+ path: _path + ".completed",
330
+ expected: "boolean",
331
+ value: input.completed
332
+ }, errorFactory)) && (null === input.error || (Array.isArray(input.error) || $guard(_exceptionable, {
333
+ path: _path + ".error",
334
+ expected: "(Array<__type>.o1 | null)",
335
+ value: input.error
336
+ }, errorFactory)) && input.error.every((elem, _index3) => ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
337
+ path: _path + ".error[" + _index3 + "]",
338
+ expected: "__type.o1",
339
+ value: elem
340
+ }, errorFactory)) && $ao2(elem, _path + ".error[" + _index3 + "]", true && _exceptionable) || $guard(_exceptionable, {
341
+ path: _path + ".error[" + _index3 + "]",
342
+ expected: "__type.o1",
343
+ value: elem
344
+ }, errorFactory)) || $guard(_exceptionable, {
345
+ path: _path + ".error",
346
+ expected: "(Array<__type>.o1 | null)",
347
+ value: input.error
339
348
  }, errorFactory));
340
349
  const $ao1 = (input, _path, _exceptionable = true) => (undefined === input.file || "string" === typeof input.file || $guard(_exceptionable, {
341
350
  path: _path + ".file",
@@ -375,13 +384,13 @@ export const stringifyFile = input => {
375
384
  const $io2 = input => "string" === typeof input.message;
376
385
  const $string = __typia.json.createStringify.string;
377
386
  const $tail = __typia.json.createStringify.tail;
378
- const $so0 = input => `{"id":${$string(input.id)},"size":${input.size},"seekable":${input.seekable},"deleted":${input.deleted},"refs":${`[${input.refs.map(elem => $so1(elem)).join(",")}]`},"tags":${`[${input.tags.map(elem => $string(elem)).join(",")}]`},"error":${null !== input.error ? `[${input.error.map(elem => `{"message":${$string(elem.message)}}`).join(",")}]` : "null"},"resumable":${$string(input.resumable)},"mimeType":${$string(input.mimeType)},"hash":${$string(input.hash)},"btime":${input.btime}}`;
387
+ const $so0 = input => `{"id":${$string(input.id)},"size":${input.size},"seekable":${input.seekable},"deleted":${input.deleted},"refs":${`[${input.refs.map(elem => $so1(elem)).join(",")}]`},"tags":${`[${input.tags.map(elem => $string(elem)).join(",")}]`},"resumable":${$string(input.resumable)},"mimeType":${$string(input.mimeType)},"hash":${$string(input.hash)},"btime":${input.btime},"completed":${input.completed},"error":${null !== input.error ? `[${input.error.map(elem => `{"message":${$string(elem.message)}}`).join(",")}]` : "null"}}`;
379
388
  const $so1 = input => `{${$tail(`${undefined === input.file ? "" : `"file":${undefined !== input.file ? $string(input.file) : undefined},`}${undefined === input.offset ? "" : `"offset":${undefined !== input.offset ? input.offset : undefined},`}${undefined === input.start ? "" : `"start":${undefined !== input.start ? input.start : undefined},`}${undefined === input.end ? "" : `"end":${undefined !== input.end ? input.end : undefined}`}`)}}`;
380
389
  return $so0(input);
381
390
  };
382
391
  export const assertStringifyFile = (input, errorFactory) => { const assert = (input, errorFactory) => {
383
392
  const __is = input => {
384
- const $io0 = input => "string" === typeof input.id && /^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.id) && ("number" === typeof input.size && (0 <= input.size && (Math.floor(input.size) === input.size && 0 <= input.size && input.size <= 18446744073709552000))) && "boolean" === typeof input.seekable && "boolean" === typeof input.deleted && (Array.isArray(input.refs) && input.refs.every(elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && $io1(elem))) && (Array.isArray(input.tags) && input.tags.every(elem => "string" === typeof elem)) && (null === input.error || 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)) && ("number" === typeof input.btime && (0 <= input.btime && (Math.floor(input.btime) === input.btime && 0 <= input.btime && input.btime <= 18446744073709552000)));
393
+ const $io0 = input => "string" === typeof input.id && /^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.id) && ("number" === typeof input.size && (0 <= input.size && (Math.floor(input.size) === input.size && 0 <= input.size && input.size <= 18446744073709552000))) && "boolean" === typeof input.seekable && "boolean" === typeof input.deleted && (Array.isArray(input.refs) && input.refs.every(elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && $io1(elem))) && (Array.isArray(input.tags) && input.tags.every(elem => "string" === typeof elem)) && "string" === typeof input.resumable && "string" === typeof input.mimeType && ("string" === typeof input.hash && /^([A-Fa-f0-9]{32})?$/.test(input.hash)) && ("number" === typeof input.btime && (0 <= input.btime && (Math.floor(input.btime) === input.btime && 0 <= input.btime && input.btime <= 18446744073709552000))) && "boolean" === typeof input.completed && (null === input.error || Array.isArray(input.error) && input.error.every(elem => "object" === typeof elem && null !== elem && $io2(elem)));
385
394
  const $io1 = input => (undefined === input.file || "string" === typeof input.file) && (undefined === input.offset || "number" === typeof input.offset && !Number.isNaN(input.offset)) && (undefined === input.start || "number" === typeof input.start && !Number.isNaN(input.start)) && (undefined === input.end || "number" === typeof input.end && !Number.isNaN(input.end));
386
395
  const $io2 = input => "string" === typeof input.message;
387
396
  return "object" === typeof input && null !== input && $io0(input);
@@ -445,22 +454,6 @@ export const assertStringifyFile = (input, errorFactory) => { const assert = (in
445
454
  path: _path + ".tags",
446
455
  expected: "Array<string>",
447
456
  value: input.tags
448
- }, errorFactory)) && (null === input.error || (Array.isArray(input.error) || $guard(_exceptionable, {
449
- path: _path + ".error",
450
- expected: "(Array<__type>.o1 | null)",
451
- value: input.error
452
- }, errorFactory)) && input.error.every((elem, _index3) => ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
453
- path: _path + ".error[" + _index3 + "]",
454
- expected: "__type.o1",
455
- value: elem
456
- }, errorFactory)) && $ao2(elem, _path + ".error[" + _index3 + "]", true && _exceptionable) || $guard(_exceptionable, {
457
- path: _path + ".error[" + _index3 + "]",
458
- expected: "__type.o1",
459
- value: elem
460
- }, errorFactory)) || $guard(_exceptionable, {
461
- path: _path + ".error",
462
- expected: "(Array<__type>.o1 | null)",
463
- value: input.error
464
457
  }, errorFactory)) && ("string" === typeof input.resumable || $guard(_exceptionable, {
465
458
  path: _path + ".resumable",
466
459
  expected: "string",
@@ -489,6 +482,26 @@ export const assertStringifyFile = (input, errorFactory) => { const assert = (in
489
482
  path: _path + ".btime",
490
483
  expected: "(number & Minimum<0> & Type<\"uint64\">)",
491
484
  value: input.btime
485
+ }, errorFactory)) && ("boolean" === typeof input.completed || $guard(_exceptionable, {
486
+ path: _path + ".completed",
487
+ expected: "boolean",
488
+ value: input.completed
489
+ }, errorFactory)) && (null === input.error || (Array.isArray(input.error) || $guard(_exceptionable, {
490
+ path: _path + ".error",
491
+ expected: "(Array<__type>.o1 | null)",
492
+ value: input.error
493
+ }, errorFactory)) && input.error.every((elem, _index3) => ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
494
+ path: _path + ".error[" + _index3 + "]",
495
+ expected: "__type.o1",
496
+ value: elem
497
+ }, errorFactory)) && $ao2(elem, _path + ".error[" + _index3 + "]", true && _exceptionable) || $guard(_exceptionable, {
498
+ path: _path + ".error[" + _index3 + "]",
499
+ expected: "__type.o1",
500
+ value: elem
501
+ }, errorFactory)) || $guard(_exceptionable, {
502
+ path: _path + ".error",
503
+ expected: "(Array<__type>.o1 | null)",
504
+ value: input.error
492
505
  }, errorFactory));
493
506
  const $ao1 = (input, _path, _exceptionable = true) => (undefined === input.file || "string" === typeof input.file || $guard(_exceptionable, {
494
507
  path: _path + ".file",
@@ -528,19 +541,19 @@ export const assertStringifyFile = (input, errorFactory) => { const assert = (in
528
541
  const $io2 = input => "string" === typeof input.message;
529
542
  const $string = __typia.json.createAssertStringify.string;
530
543
  const $tail = __typia.json.createAssertStringify.tail;
531
- const $so0 = input => `{"id":${$string(input.id)},"size":${input.size},"seekable":${input.seekable},"deleted":${input.deleted},"refs":${`[${input.refs.map(elem => $so1(elem)).join(",")}]`},"tags":${`[${input.tags.map(elem => $string(elem)).join(",")}]`},"error":${null !== input.error ? `[${input.error.map(elem => `{"message":${$string(elem.message)}}`).join(",")}]` : "null"},"resumable":${$string(input.resumable)},"mimeType":${$string(input.mimeType)},"hash":${$string(input.hash)},"btime":${input.btime}}`;
544
+ const $so0 = input => `{"id":${$string(input.id)},"size":${input.size},"seekable":${input.seekable},"deleted":${input.deleted},"refs":${`[${input.refs.map(elem => $so1(elem)).join(",")}]`},"tags":${`[${input.tags.map(elem => $string(elem)).join(",")}]`},"resumable":${$string(input.resumable)},"mimeType":${$string(input.mimeType)},"hash":${$string(input.hash)},"btime":${input.btime},"completed":${input.completed},"error":${null !== input.error ? `[${input.error.map(elem => `{"message":${$string(elem.message)}}`).join(",")}]` : "null"}}`;
532
545
  const $so1 = input => `{${$tail(`${undefined === input.file ? "" : `"file":${undefined !== input.file ? $string(input.file) : undefined},`}${undefined === input.offset ? "" : `"offset":${undefined !== input.offset ? input.offset : undefined},`}${undefined === input.start ? "" : `"start":${undefined !== input.start ? input.start : undefined},`}${undefined === input.end ? "" : `"end":${undefined !== input.end ? input.end : undefined}`}`)}}`;
533
546
  return $so0(input);
534
547
  }; return stringify(assert(input, errorFactory)); };
535
548
  export const isFileStats = input => {
536
- const $io0 = input => "number" === typeof input.position && (0 <= input.position && (Math.floor(input.position) === input.position && 0 <= input.position && input.position <= 18446744073709552000)) && "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)) && ("number" === typeof input.size && (0 <= input.size && (Math.floor(input.size) === input.size && 0 <= input.size && input.size <= 18446744073709552000))) && "boolean" === typeof input.seekable && "boolean" === typeof input.deleted && (Array.isArray(input.refs) && input.refs.every(elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && $io1(elem))) && (Array.isArray(input.tags) && input.tags.every(elem => "string" === typeof elem)) && (null === input.error || 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)) && ("number" === typeof input.btime && (0 <= input.btime && (Math.floor(input.btime) === input.btime && 0 <= input.btime && input.btime <= 18446744073709552000)));
549
+ const $io0 = input => (null === input.position || "number" === typeof input.position && (0 <= input.position && (Math.floor(input.position) === input.position && 0 <= input.position && input.position <= 18446744073709552000))) && "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)) && ("string" === typeof input.id && /^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.id)) && ("number" === typeof input.size && (0 <= input.size && (Math.floor(input.size) === input.size && 0 <= input.size && input.size <= 18446744073709552000))) && "boolean" === typeof input.seekable && "boolean" === typeof input.deleted && (Array.isArray(input.refs) && input.refs.every(elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && $io1(elem))) && (Array.isArray(input.tags) && input.tags.every(elem => "string" === typeof elem)) && "string" === typeof input.resumable && "string" === typeof input.mimeType && ("string" === typeof input.hash && /^([A-Fa-f0-9]{32})?$/.test(input.hash)) && ("number" === typeof input.btime && (0 <= input.btime && (Math.floor(input.btime) === input.btime && 0 <= input.btime && input.btime <= 18446744073709552000))) && "boolean" === typeof input.completed && (null === input.error || Array.isArray(input.error) && input.error.every(elem => "object" === typeof elem && null !== elem && $io2(elem)));
537
550
  const $io1 = input => (undefined === input.file || "string" === typeof input.file) && (undefined === input.offset || "number" === typeof input.offset) && (undefined === input.start || "number" === typeof input.start) && (undefined === input.end || "number" === typeof input.end);
538
551
  const $io2 = input => "string" === typeof input.message;
539
552
  return "object" === typeof input && null !== input && $io0(input);
540
553
  };
541
554
  export const assertFileStats = (input, errorFactory) => {
542
555
  const __is = input => {
543
- const $io0 = input => "number" === typeof input.position && (0 <= input.position && (Math.floor(input.position) === input.position && 0 <= input.position && input.position <= 18446744073709552000)) && "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)) && ("number" === typeof input.size && (0 <= input.size && (Math.floor(input.size) === input.size && 0 <= input.size && input.size <= 18446744073709552000))) && "boolean" === typeof input.seekable && "boolean" === typeof input.deleted && (Array.isArray(input.refs) && input.refs.every(elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && $io1(elem))) && (Array.isArray(input.tags) && input.tags.every(elem => "string" === typeof elem)) && (null === input.error || 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)) && ("number" === typeof input.btime && (0 <= input.btime && (Math.floor(input.btime) === input.btime && 0 <= input.btime && input.btime <= 18446744073709552000)));
556
+ const $io0 = input => (null === input.position || "number" === typeof input.position && (0 <= input.position && (Math.floor(input.position) === input.position && 0 <= input.position && input.position <= 18446744073709552000))) && "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)) && ("string" === typeof input.id && /^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.id)) && ("number" === typeof input.size && (0 <= input.size && (Math.floor(input.size) === input.size && 0 <= input.size && input.size <= 18446744073709552000))) && "boolean" === typeof input.seekable && "boolean" === typeof input.deleted && (Array.isArray(input.refs) && input.refs.every(elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && $io1(elem))) && (Array.isArray(input.tags) && input.tags.every(elem => "string" === typeof elem)) && "string" === typeof input.resumable && "string" === typeof input.mimeType && ("string" === typeof input.hash && /^([A-Fa-f0-9]{32})?$/.test(input.hash)) && ("number" === typeof input.btime && (0 <= input.btime && (Math.floor(input.btime) === input.btime && 0 <= input.btime && input.btime <= 18446744073709552000))) && "boolean" === typeof input.completed && (null === input.error || Array.isArray(input.error) && input.error.every(elem => "object" === typeof elem && null !== elem && $io2(elem)));
544
557
  const $io1 = input => (undefined === input.file || "string" === typeof input.file) && (undefined === input.offset || "number" === typeof input.offset) && (undefined === input.start || "number" === typeof input.start) && (undefined === input.end || "number" === typeof input.end);
545
558
  const $io2 = input => "string" === typeof input.message;
546
559
  return "object" === typeof input && null !== input && $io0(input);
@@ -548,7 +561,7 @@ export const assertFileStats = (input, errorFactory) => {
548
561
  if (false === __is(input))
549
562
  ((input, _path, _exceptionable = true) => {
550
563
  const $guard = __typia.createAssert.guard;
551
- const $ao0 = (input, _path, _exceptionable = true) => ("number" === typeof input.position && (0 <= input.position || $guard(_exceptionable, {
564
+ const $ao0 = (input, _path, _exceptionable = true) => (null === input.position || "number" === typeof input.position && (0 <= input.position || $guard(_exceptionable, {
552
565
  path: _path + ".position",
553
566
  expected: "number & Minimum<0>",
554
567
  value: input.position
@@ -558,16 +571,12 @@ export const assertFileStats = (input, errorFactory) => {
558
571
  value: input.position
559
572
  }, errorFactory)) || $guard(_exceptionable, {
560
573
  path: _path + ".position",
561
- expected: "(number & Minimum<0> & Type<\"uint64\">)",
574
+ expected: "((number & Minimum<0> & Type<\"uint64\">) | null)",
562
575
  value: input.position
563
576
  }, errorFactory)) && ("boolean" === typeof input.uploading || $guard(_exceptionable, {
564
577
  path: _path + ".uploading",
565
578
  expected: "boolean",
566
579
  value: input.uploading
567
- }, errorFactory)) && ("boolean" === typeof input.completed || $guard(_exceptionable, {
568
- path: _path + ".completed",
569
- expected: "boolean",
570
- value: input.completed
571
580
  }, errorFactory)) && ((Array.isArray(input.zones) || $guard(_exceptionable, {
572
581
  path: _path + ".zones",
573
582
  expected: "Array<string>",
@@ -648,22 +657,6 @@ export const assertFileStats = (input, errorFactory) => {
648
657
  path: _path + ".tags",
649
658
  expected: "Array<string>",
650
659
  value: input.tags
651
- }, errorFactory)) && (null === input.error || (Array.isArray(input.error) || $guard(_exceptionable, {
652
- path: _path + ".error",
653
- expected: "(Array<__type>.o1 | null)",
654
- value: input.error
655
- }, errorFactory)) && input.error.every((elem, _index5) => ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
656
- path: _path + ".error[" + _index5 + "]",
657
- expected: "__type.o1",
658
- value: elem
659
- }, errorFactory)) && $ao2(elem, _path + ".error[" + _index5 + "]", true && _exceptionable) || $guard(_exceptionable, {
660
- path: _path + ".error[" + _index5 + "]",
661
- expected: "__type.o1",
662
- value: elem
663
- }, errorFactory)) || $guard(_exceptionable, {
664
- path: _path + ".error",
665
- expected: "(Array<__type>.o1 | null)",
666
- value: input.error
667
660
  }, errorFactory)) && ("string" === typeof input.resumable || $guard(_exceptionable, {
668
661
  path: _path + ".resumable",
669
662
  expected: "string",
@@ -692,6 +685,26 @@ export const assertFileStats = (input, errorFactory) => {
692
685
  path: _path + ".btime",
693
686
  expected: "(number & Minimum<0> & Type<\"uint64\">)",
694
687
  value: input.btime
688
+ }, errorFactory)) && ("boolean" === typeof input.completed || $guard(_exceptionable, {
689
+ path: _path + ".completed",
690
+ expected: "boolean",
691
+ value: input.completed
692
+ }, errorFactory)) && (null === input.error || (Array.isArray(input.error) || $guard(_exceptionable, {
693
+ path: _path + ".error",
694
+ expected: "(Array<__type>.o1 | null)",
695
+ value: input.error
696
+ }, errorFactory)) && input.error.every((elem, _index5) => ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
697
+ path: _path + ".error[" + _index5 + "]",
698
+ expected: "__type.o1",
699
+ value: elem
700
+ }, errorFactory)) && $ao2(elem, _path + ".error[" + _index5 + "]", true && _exceptionable) || $guard(_exceptionable, {
701
+ path: _path + ".error[" + _index5 + "]",
702
+ expected: "__type.o1",
703
+ value: elem
704
+ }, errorFactory)) || $guard(_exceptionable, {
705
+ path: _path + ".error",
706
+ expected: "(Array<__type>.o1 | null)",
707
+ value: input.error
695
708
  }, errorFactory));
696
709
  const $ao1 = (input, _path, _exceptionable = true) => (undefined === input.file || "string" === typeof input.file || $guard(_exceptionable, {
697
710
  path: _path + ".file",
@@ -731,20 +744,22 @@ export const randomFileStats = generator => {
731
744
  const $generator = __typia.createRandom.generator;
732
745
  const $pick = __typia.createRandom.pick;
733
746
  const $ro0 = (_recursive = false, _depth = 0) => ({
734
- position: (generator?.customs ?? $generator.customs)?.number?.([
735
- {
736
- name: "Minimum<0>",
737
- kind: "minimum",
738
- value: 0
739
- },
740
- {
741
- name: "Type<\"uint64\">",
742
- kind: "type",
743
- value: "uint64"
744
- }
745
- ]) ?? (generator?.integer ?? $generator.integer)(0, 10),
747
+ position: $pick([
748
+ () => null,
749
+ () => (generator?.customs ?? $generator.customs)?.number?.([
750
+ {
751
+ name: "Minimum<0>",
752
+ kind: "minimum",
753
+ value: 0
754
+ },
755
+ {
756
+ name: "Type<\"uint64\">",
757
+ kind: "type",
758
+ value: "uint64"
759
+ }
760
+ ]) ?? (generator?.integer ?? $generator.integer)(0, 10)
761
+ ])(),
746
762
  uploading: (generator?.boolean ?? $generator.boolean)(),
747
- completed: (generator?.boolean ?? $generator.boolean)(),
748
763
  zones: (generator?.array ?? $generator.array)(() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()),
749
764
  replicas: (generator?.array ?? $generator.array)(() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()),
750
765
  id: (generator?.customs ?? $generator.customs)?.string?.([
@@ -770,10 +785,6 @@ export const randomFileStats = generator => {
770
785
  deleted: (generator?.boolean ?? $generator.boolean)(),
771
786
  refs: (generator?.array ?? $generator.array)(() => $ro1(_recursive, _recursive ? 1 + _depth : _depth)),
772
787
  tags: (generator?.array ?? $generator.array)(() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()),
773
- error: $pick([
774
- () => null,
775
- () => (generator?.array ?? $generator.array)(() => $ro2(_recursive, _recursive ? 1 + _depth : _depth))
776
- ])(),
777
788
  resumable: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
778
789
  mimeType: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
779
790
  hash: (generator?.customs ?? $generator.customs)?.string?.([
@@ -794,7 +805,12 @@ export const randomFileStats = generator => {
794
805
  kind: "type",
795
806
  value: "uint64"
796
807
  }
797
- ]) ?? (generator?.integer ?? $generator.integer)(0, 10)
808
+ ]) ?? (generator?.integer ?? $generator.integer)(0, 10),
809
+ completed: (generator?.boolean ?? $generator.boolean)(),
810
+ error: $pick([
811
+ () => null,
812
+ () => (generator?.array ?? $generator.array)(() => $ro2(_recursive, _recursive ? 1 + _depth : _depth))
813
+ ])()
798
814
  });
799
815
  const $ro1 = (_recursive = false, _depth = 0) => ({
800
816
  file: $pick([
@@ -821,7 +837,7 @@ export const randomFileStats = generator => {
821
837
  };
822
838
  export const assertGuardFileStats = (input, errorFactory) => {
823
839
  const __is = input => {
824
- const $io0 = input => "number" === typeof input.position && (0 <= input.position && (Math.floor(input.position) === input.position && 0 <= input.position && input.position <= 18446744073709552000)) && "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)) && ("number" === typeof input.size && (0 <= input.size && (Math.floor(input.size) === input.size && 0 <= input.size && input.size <= 18446744073709552000))) && "boolean" === typeof input.seekable && "boolean" === typeof input.deleted && (Array.isArray(input.refs) && input.refs.every(elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && $io1(elem))) && (Array.isArray(input.tags) && input.tags.every(elem => "string" === typeof elem)) && (null === input.error || 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)) && ("number" === typeof input.btime && (0 <= input.btime && (Math.floor(input.btime) === input.btime && 0 <= input.btime && input.btime <= 18446744073709552000)));
840
+ const $io0 = input => (null === input.position || "number" === typeof input.position && (0 <= input.position && (Math.floor(input.position) === input.position && 0 <= input.position && input.position <= 18446744073709552000))) && "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)) && ("string" === typeof input.id && /^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.id)) && ("number" === typeof input.size && (0 <= input.size && (Math.floor(input.size) === input.size && 0 <= input.size && input.size <= 18446744073709552000))) && "boolean" === typeof input.seekable && "boolean" === typeof input.deleted && (Array.isArray(input.refs) && input.refs.every(elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && $io1(elem))) && (Array.isArray(input.tags) && input.tags.every(elem => "string" === typeof elem)) && "string" === typeof input.resumable && "string" === typeof input.mimeType && ("string" === typeof input.hash && /^([A-Fa-f0-9]{32})?$/.test(input.hash)) && ("number" === typeof input.btime && (0 <= input.btime && (Math.floor(input.btime) === input.btime && 0 <= input.btime && input.btime <= 18446744073709552000))) && "boolean" === typeof input.completed && (null === input.error || Array.isArray(input.error) && input.error.every(elem => "object" === typeof elem && null !== elem && $io2(elem)));
825
841
  const $io1 = input => (undefined === input.file || "string" === typeof input.file) && (undefined === input.offset || "number" === typeof input.offset) && (undefined === input.start || "number" === typeof input.start) && (undefined === input.end || "number" === typeof input.end);
826
842
  const $io2 = input => "string" === typeof input.message;
827
843
  return "object" === typeof input && null !== input && $io0(input);
@@ -829,7 +845,7 @@ export const assertGuardFileStats = (input, errorFactory) => {
829
845
  if (false === __is(input))
830
846
  ((input, _path, _exceptionable = true) => {
831
847
  const $guard = __typia.createAssertGuard.guard;
832
- const $ao0 = (input, _path, _exceptionable = true) => ("number" === typeof input.position && (0 <= input.position || $guard(_exceptionable, {
848
+ const $ao0 = (input, _path, _exceptionable = true) => (null === input.position || "number" === typeof input.position && (0 <= input.position || $guard(_exceptionable, {
833
849
  path: _path + ".position",
834
850
  expected: "number & Minimum<0>",
835
851
  value: input.position
@@ -839,16 +855,12 @@ export const assertGuardFileStats = (input, errorFactory) => {
839
855
  value: input.position
840
856
  }, errorFactory)) || $guard(_exceptionable, {
841
857
  path: _path + ".position",
842
- expected: "(number & Minimum<0> & Type<\"uint64\">)",
858
+ expected: "((number & Minimum<0> & Type<\"uint64\">) | null)",
843
859
  value: input.position
844
860
  }, errorFactory)) && ("boolean" === typeof input.uploading || $guard(_exceptionable, {
845
861
  path: _path + ".uploading",
846
862
  expected: "boolean",
847
863
  value: input.uploading
848
- }, errorFactory)) && ("boolean" === typeof input.completed || $guard(_exceptionable, {
849
- path: _path + ".completed",
850
- expected: "boolean",
851
- value: input.completed
852
864
  }, errorFactory)) && ((Array.isArray(input.zones) || $guard(_exceptionable, {
853
865
  path: _path + ".zones",
854
866
  expected: "Array<string>",
@@ -929,22 +941,6 @@ export const assertGuardFileStats = (input, errorFactory) => {
929
941
  path: _path + ".tags",
930
942
  expected: "Array<string>",
931
943
  value: input.tags
932
- }, errorFactory)) && (null === input.error || (Array.isArray(input.error) || $guard(_exceptionable, {
933
- path: _path + ".error",
934
- expected: "(Array<__type>.o1 | null)",
935
- value: input.error
936
- }, errorFactory)) && input.error.every((elem, _index5) => ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
937
- path: _path + ".error[" + _index5 + "]",
938
- expected: "__type.o1",
939
- value: elem
940
- }, errorFactory)) && $ao2(elem, _path + ".error[" + _index5 + "]", true && _exceptionable) || $guard(_exceptionable, {
941
- path: _path + ".error[" + _index5 + "]",
942
- expected: "__type.o1",
943
- value: elem
944
- }, errorFactory)) || $guard(_exceptionable, {
945
- path: _path + ".error",
946
- expected: "(Array<__type>.o1 | null)",
947
- value: input.error
948
944
  }, errorFactory)) && ("string" === typeof input.resumable || $guard(_exceptionable, {
949
945
  path: _path + ".resumable",
950
946
  expected: "string",
@@ -973,6 +969,26 @@ export const assertGuardFileStats = (input, errorFactory) => {
973
969
  path: _path + ".btime",
974
970
  expected: "(number & Minimum<0> & Type<\"uint64\">)",
975
971
  value: input.btime
972
+ }, errorFactory)) && ("boolean" === typeof input.completed || $guard(_exceptionable, {
973
+ path: _path + ".completed",
974
+ expected: "boolean",
975
+ value: input.completed
976
+ }, errorFactory)) && (null === input.error || (Array.isArray(input.error) || $guard(_exceptionable, {
977
+ path: _path + ".error",
978
+ expected: "(Array<__type>.o1 | null)",
979
+ value: input.error
980
+ }, errorFactory)) && input.error.every((elem, _index5) => ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
981
+ path: _path + ".error[" + _index5 + "]",
982
+ expected: "__type.o1",
983
+ value: elem
984
+ }, errorFactory)) && $ao2(elem, _path + ".error[" + _index5 + "]", true && _exceptionable) || $guard(_exceptionable, {
985
+ path: _path + ".error[" + _index5 + "]",
986
+ expected: "__type.o1",
987
+ value: elem
988
+ }, errorFactory)) || $guard(_exceptionable, {
989
+ path: _path + ".error",
990
+ expected: "(Array<__type>.o1 | null)",
991
+ value: input.error
976
992
  }, errorFactory));
977
993
  const $ao1 = (input, _path, _exceptionable = true) => (undefined === input.file || "string" === typeof input.file || $guard(_exceptionable, {
978
994
  path: _path + ".file",
@@ -1012,13 +1028,13 @@ export const stringifyFileStats = input => {
1012
1028
  const $io2 = input => "string" === typeof input.message;
1013
1029
  const $string = __typia.json.createStringify.string;
1014
1030
  const $tail = __typia.json.createStringify.tail;
1015
- const $so0 = input => `{"position":${input.position},"uploading":${input.uploading},"completed":${input.completed},"zones":${`[${input.zones.map(elem => $string(elem)).join(",")}]`},"replicas":${`[${input.replicas.map(elem => $string(elem)).join(",")}]`},"id":${$string(input.id)},"size":${input.size},"seekable":${input.seekable},"deleted":${input.deleted},"refs":${`[${input.refs.map(elem => $so1(elem)).join(",")}]`},"tags":${`[${input.tags.map(elem => $string(elem)).join(",")}]`},"error":${null !== input.error ? `[${input.error.map(elem => `{"message":${$string(elem.message)}}`).join(",")}]` : "null"},"resumable":${$string(input.resumable)},"mimeType":${$string(input.mimeType)},"hash":${$string(input.hash)},"btime":${input.btime}}`;
1031
+ const $so0 = input => `{"position":${null !== input.position ? input.position : "null"},"uploading":${input.uploading},"zones":${`[${input.zones.map(elem => $string(elem)).join(",")}]`},"replicas":${`[${input.replicas.map(elem => $string(elem)).join(",")}]`},"id":${$string(input.id)},"size":${input.size},"seekable":${input.seekable},"deleted":${input.deleted},"refs":${`[${input.refs.map(elem => $so1(elem)).join(",")}]`},"tags":${`[${input.tags.map(elem => $string(elem)).join(",")}]`},"resumable":${$string(input.resumable)},"mimeType":${$string(input.mimeType)},"hash":${$string(input.hash)},"btime":${input.btime},"completed":${input.completed},"error":${null !== input.error ? `[${input.error.map(elem => `{"message":${$string(elem.message)}}`).join(",")}]` : "null"}}`;
1016
1032
  const $so1 = input => `{${$tail(`${undefined === input.file ? "" : `"file":${undefined !== input.file ? $string(input.file) : undefined},`}${undefined === input.offset ? "" : `"offset":${undefined !== input.offset ? input.offset : undefined},`}${undefined === input.start ? "" : `"start":${undefined !== input.start ? input.start : undefined},`}${undefined === input.end ? "" : `"end":${undefined !== input.end ? input.end : undefined}`}`)}}`;
1017
1033
  return $so0(input);
1018
1034
  };
1019
1035
  export const assertStringifyFileStats = (input, errorFactory) => { const assert = (input, errorFactory) => {
1020
1036
  const __is = input => {
1021
- const $io0 = input => "number" === typeof input.position && (0 <= input.position && (Math.floor(input.position) === input.position && 0 <= input.position && input.position <= 18446744073709552000)) && "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)) && ("number" === typeof input.size && (0 <= input.size && (Math.floor(input.size) === input.size && 0 <= input.size && input.size <= 18446744073709552000))) && "boolean" === typeof input.seekable && "boolean" === typeof input.deleted && (Array.isArray(input.refs) && input.refs.every(elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && $io1(elem))) && (Array.isArray(input.tags) && input.tags.every(elem => "string" === typeof elem)) && (null === input.error || 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)) && ("number" === typeof input.btime && (0 <= input.btime && (Math.floor(input.btime) === input.btime && 0 <= input.btime && input.btime <= 18446744073709552000)));
1037
+ const $io0 = input => (null === input.position || "number" === typeof input.position && (0 <= input.position && (Math.floor(input.position) === input.position && 0 <= input.position && input.position <= 18446744073709552000))) && "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)) && ("string" === typeof input.id && /^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.id)) && ("number" === typeof input.size && (0 <= input.size && (Math.floor(input.size) === input.size && 0 <= input.size && input.size <= 18446744073709552000))) && "boolean" === typeof input.seekable && "boolean" === typeof input.deleted && (Array.isArray(input.refs) && input.refs.every(elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && $io1(elem))) && (Array.isArray(input.tags) && input.tags.every(elem => "string" === typeof elem)) && "string" === typeof input.resumable && "string" === typeof input.mimeType && ("string" === typeof input.hash && /^([A-Fa-f0-9]{32})?$/.test(input.hash)) && ("number" === typeof input.btime && (0 <= input.btime && (Math.floor(input.btime) === input.btime && 0 <= input.btime && input.btime <= 18446744073709552000))) && "boolean" === typeof input.completed && (null === input.error || Array.isArray(input.error) && input.error.every(elem => "object" === typeof elem && null !== elem && $io2(elem)));
1022
1038
  const $io1 = input => (undefined === input.file || "string" === typeof input.file) && (undefined === input.offset || "number" === typeof input.offset && !Number.isNaN(input.offset)) && (undefined === input.start || "number" === typeof input.start && !Number.isNaN(input.start)) && (undefined === input.end || "number" === typeof input.end && !Number.isNaN(input.end));
1023
1039
  const $io2 = input => "string" === typeof input.message;
1024
1040
  return "object" === typeof input && null !== input && $io0(input);
@@ -1026,7 +1042,7 @@ export const assertStringifyFileStats = (input, errorFactory) => { const assert
1026
1042
  if (false === __is(input))
1027
1043
  ((input, _path, _exceptionable = true) => {
1028
1044
  const $guard = __typia.json.createAssertStringify.guard;
1029
- const $ao0 = (input, _path, _exceptionable = true) => ("number" === typeof input.position && (0 <= input.position || $guard(_exceptionable, {
1045
+ const $ao0 = (input, _path, _exceptionable = true) => (null === input.position || "number" === typeof input.position && (0 <= input.position || $guard(_exceptionable, {
1030
1046
  path: _path + ".position",
1031
1047
  expected: "number & Minimum<0>",
1032
1048
  value: input.position
@@ -1036,16 +1052,12 @@ export const assertStringifyFileStats = (input, errorFactory) => { const assert
1036
1052
  value: input.position
1037
1053
  }, errorFactory)) || $guard(_exceptionable, {
1038
1054
  path: _path + ".position",
1039
- expected: "(number & Minimum<0> & Type<\"uint64\">)",
1055
+ expected: "((number & Minimum<0> & Type<\"uint64\">) | null)",
1040
1056
  value: input.position
1041
1057
  }, errorFactory)) && ("boolean" === typeof input.uploading || $guard(_exceptionable, {
1042
1058
  path: _path + ".uploading",
1043
1059
  expected: "boolean",
1044
1060
  value: input.uploading
1045
- }, errorFactory)) && ("boolean" === typeof input.completed || $guard(_exceptionable, {
1046
- path: _path + ".completed",
1047
- expected: "boolean",
1048
- value: input.completed
1049
1061
  }, errorFactory)) && ((Array.isArray(input.zones) || $guard(_exceptionable, {
1050
1062
  path: _path + ".zones",
1051
1063
  expected: "Array<string>",
@@ -1126,22 +1138,6 @@ export const assertStringifyFileStats = (input, errorFactory) => { const assert
1126
1138
  path: _path + ".tags",
1127
1139
  expected: "Array<string>",
1128
1140
  value: input.tags
1129
- }, errorFactory)) && (null === input.error || (Array.isArray(input.error) || $guard(_exceptionable, {
1130
- path: _path + ".error",
1131
- expected: "(Array<__type>.o1 | null)",
1132
- value: input.error
1133
- }, errorFactory)) && input.error.every((elem, _index5) => ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
1134
- path: _path + ".error[" + _index5 + "]",
1135
- expected: "__type.o1",
1136
- value: elem
1137
- }, errorFactory)) && $ao2(elem, _path + ".error[" + _index5 + "]", true && _exceptionable) || $guard(_exceptionable, {
1138
- path: _path + ".error[" + _index5 + "]",
1139
- expected: "__type.o1",
1140
- value: elem
1141
- }, errorFactory)) || $guard(_exceptionable, {
1142
- path: _path + ".error",
1143
- expected: "(Array<__type>.o1 | null)",
1144
- value: input.error
1145
1141
  }, errorFactory)) && ("string" === typeof input.resumable || $guard(_exceptionable, {
1146
1142
  path: _path + ".resumable",
1147
1143
  expected: "string",
@@ -1170,6 +1166,26 @@ export const assertStringifyFileStats = (input, errorFactory) => { const assert
1170
1166
  path: _path + ".btime",
1171
1167
  expected: "(number & Minimum<0> & Type<\"uint64\">)",
1172
1168
  value: input.btime
1169
+ }, errorFactory)) && ("boolean" === typeof input.completed || $guard(_exceptionable, {
1170
+ path: _path + ".completed",
1171
+ expected: "boolean",
1172
+ value: input.completed
1173
+ }, errorFactory)) && (null === input.error || (Array.isArray(input.error) || $guard(_exceptionable, {
1174
+ path: _path + ".error",
1175
+ expected: "(Array<__type>.o1 | null)",
1176
+ value: input.error
1177
+ }, errorFactory)) && input.error.every((elem, _index5) => ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
1178
+ path: _path + ".error[" + _index5 + "]",
1179
+ expected: "__type.o1",
1180
+ value: elem
1181
+ }, errorFactory)) && $ao2(elem, _path + ".error[" + _index5 + "]", true && _exceptionable) || $guard(_exceptionable, {
1182
+ path: _path + ".error[" + _index5 + "]",
1183
+ expected: "__type.o1",
1184
+ value: elem
1185
+ }, errorFactory)) || $guard(_exceptionable, {
1186
+ path: _path + ".error",
1187
+ expected: "(Array<__type>.o1 | null)",
1188
+ value: input.error
1173
1189
  }, errorFactory));
1174
1190
  const $ao1 = (input, _path, _exceptionable = true) => (undefined === input.file || "string" === typeof input.file || $guard(_exceptionable, {
1175
1191
  path: _path + ".file",
@@ -1209,7 +1225,7 @@ export const assertStringifyFileStats = (input, errorFactory) => { const assert
1209
1225
  const $io2 = input => "string" === typeof input.message;
1210
1226
  const $string = __typia.json.createAssertStringify.string;
1211
1227
  const $tail = __typia.json.createAssertStringify.tail;
1212
- const $so0 = input => `{"position":${input.position},"uploading":${input.uploading},"completed":${input.completed},"zones":${`[${input.zones.map(elem => $string(elem)).join(",")}]`},"replicas":${`[${input.replicas.map(elem => $string(elem)).join(",")}]`},"id":${$string(input.id)},"size":${input.size},"seekable":${input.seekable},"deleted":${input.deleted},"refs":${`[${input.refs.map(elem => $so1(elem)).join(",")}]`},"tags":${`[${input.tags.map(elem => $string(elem)).join(",")}]`},"error":${null !== input.error ? `[${input.error.map(elem => `{"message":${$string(elem.message)}}`).join(",")}]` : "null"},"resumable":${$string(input.resumable)},"mimeType":${$string(input.mimeType)},"hash":${$string(input.hash)},"btime":${input.btime}}`;
1228
+ const $so0 = input => `{"position":${null !== input.position ? input.position : "null"},"uploading":${input.uploading},"zones":${`[${input.zones.map(elem => $string(elem)).join(",")}]`},"replicas":${`[${input.replicas.map(elem => $string(elem)).join(",")}]`},"id":${$string(input.id)},"size":${input.size},"seekable":${input.seekable},"deleted":${input.deleted},"refs":${`[${input.refs.map(elem => $so1(elem)).join(",")}]`},"tags":${`[${input.tags.map(elem => $string(elem)).join(",")}]`},"resumable":${$string(input.resumable)},"mimeType":${$string(input.mimeType)},"hash":${$string(input.hash)},"btime":${input.btime},"completed":${input.completed},"error":${null !== input.error ? `[${input.error.map(elem => `{"message":${$string(elem.message)}}`).join(",")}]` : "null"}}`;
1213
1229
  const $so1 = input => `{${$tail(`${undefined === input.file ? "" : `"file":${undefined !== input.file ? $string(input.file) : undefined},`}${undefined === input.offset ? "" : `"offset":${undefined !== input.offset ? input.offset : undefined},`}${undefined === input.start ? "" : `"start":${undefined !== input.start ? input.start : undefined},`}${undefined === input.end ? "" : `"end":${undefined !== input.end ? input.end : undefined}`}`)}}`;
1214
1230
  return $so0(input);
1215
1231
  }; return stringify(assert(input, errorFactory)); };