@nxtedition/types 1.2.1 → 1.2.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) && (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)));
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 <= 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)) && ("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 && /^[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)));
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 <= 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)) && ("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);
@@ -23,7 +23,7 @@ export const assertFile = (input, errorFactory) => {
23
23
  path: _path + ".id",
24
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, {
26
+ }, errorFactory)) && ("number" === typeof input.size && (0 <= input.size || $guard(_exceptionable, {
27
27
  path: _path + ".size",
28
28
  expected: "number & Minimum<0>",
29
29
  value: input.size
@@ -33,7 +33,7 @@ export const assertFile = (input, errorFactory) => {
33
33
  value: input.size
34
34
  }, errorFactory)) || $guard(_exceptionable, {
35
35
  path: _path + ".size",
36
- expected: "((number & Minimum<0> & Type<\"uint32\">) | null)",
36
+ expected: "(number & Minimum<0> & Type<\"uint32\">)",
37
37
  value: input.size
38
38
  }, errorFactory)) && ("boolean" === typeof input.seekable || $guard(_exceptionable, {
39
39
  path: _path + ".seekable",
@@ -107,7 +107,7 @@ export const assertFile = (input, errorFactory) => {
107
107
  path: _path + ".hash",
108
108
  expected: "(string & Pattern<\"^([A-Fa-f0-9]{32})?$\">)",
109
109
  value: input.hash
110
- }, errorFactory)) && (null === input.btime || "number" === typeof input.btime && (0 <= input.btime || $guard(_exceptionable, {
110
+ }, errorFactory)) && ("number" === typeof input.btime && (0 <= input.btime || $guard(_exceptionable, {
111
111
  path: _path + ".btime",
112
112
  expected: "number & Minimum<0>",
113
113
  value: input.btime
@@ -117,7 +117,7 @@ export const assertFile = (input, errorFactory) => {
117
117
  value: input.btime
118
118
  }, errorFactory)) || $guard(_exceptionable, {
119
119
  path: _path + ".btime",
120
- expected: "((number & Minimum<0> & Type<\"uint32\">) | null)",
120
+ expected: "(number & Minimum<0> & Type<\"uint32\">)",
121
121
  value: input.btime
122
122
  }, errorFactory));
123
123
  const $ao1 = (input, _path, _exceptionable = true) => undefined === input.file || "string" === typeof input.file || $guard(_exceptionable, {
@@ -153,21 +153,18 @@ export const randomFile = generator => {
153
153
  value: "^[0-9A-Za-z~][0-9A-Za-z~._: -]*$"
154
154
  }
155
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
- ])(),
156
+ size: (generator?.customs ?? $generator.customs)?.number?.([
157
+ {
158
+ name: "Minimum<0>",
159
+ kind: "minimum",
160
+ value: 0
161
+ },
162
+ {
163
+ name: "Type<\"uint32\">",
164
+ kind: "type",
165
+ value: "uint32"
166
+ }
167
+ ]) ?? (generator?.integer ?? $generator.integer)(0, 10),
171
168
  seekable: (generator?.boolean ?? $generator.boolean)(),
172
169
  deleted: (generator?.boolean ?? $generator.boolean)(),
173
170
  path: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
@@ -183,21 +180,18 @@ export const randomFile = generator => {
183
180
  value: "^([A-Fa-f0-9]{32})?$"
184
181
  }
185
182
  ]) ?? (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
- ])()
183
+ btime: (generator?.customs ?? $generator.customs)?.number?.([
184
+ {
185
+ name: "Minimum<0>",
186
+ kind: "minimum",
187
+ value: 0
188
+ },
189
+ {
190
+ name: "Type<\"uint32\">",
191
+ kind: "type",
192
+ value: "uint32"
193
+ }
194
+ ]) ?? (generator?.integer ?? $generator.integer)(0, 10)
201
195
  });
202
196
  const $ro1 = (_recursive = false, _depth = 0) => ({
203
197
  file: $pick([
@@ -212,7 +206,7 @@ export const randomFile = generator => {
212
206
  };
213
207
  export const assertGuardFile = (input, errorFactory) => {
214
208
  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)));
209
+ 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 <= 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)) && ("number" === typeof input.btime && (0 <= input.btime && (Math.floor(input.btime) === input.btime && 0 <= input.btime && input.btime <= 4294967295)));
216
210
  const $io1 = input => undefined === input.file || "string" === typeof input.file;
217
211
  const $io2 = input => "string" === typeof input.message;
218
212
  return "object" === typeof input && null !== input && $io0(input);
@@ -228,7 +222,7 @@ export const assertGuardFile = (input, errorFactory) => {
228
222
  path: _path + ".id",
229
223
  expected: "(string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">)",
230
224
  value: input.id
231
- }, errorFactory)) && (null === input.size || "number" === typeof input.size && (0 <= input.size || $guard(_exceptionable, {
225
+ }, errorFactory)) && ("number" === typeof input.size && (0 <= input.size || $guard(_exceptionable, {
232
226
  path: _path + ".size",
233
227
  expected: "number & Minimum<0>",
234
228
  value: input.size
@@ -238,7 +232,7 @@ export const assertGuardFile = (input, errorFactory) => {
238
232
  value: input.size
239
233
  }, errorFactory)) || $guard(_exceptionable, {
240
234
  path: _path + ".size",
241
- expected: "((number & Minimum<0> & Type<\"uint32\">) | null)",
235
+ expected: "(number & Minimum<0> & Type<\"uint32\">)",
242
236
  value: input.size
243
237
  }, errorFactory)) && ("boolean" === typeof input.seekable || $guard(_exceptionable, {
244
238
  path: _path + ".seekable",
@@ -312,7 +306,7 @@ export const assertGuardFile = (input, errorFactory) => {
312
306
  path: _path + ".hash",
313
307
  expected: "(string & Pattern<\"^([A-Fa-f0-9]{32})?$\">)",
314
308
  value: input.hash
315
- }, errorFactory)) && (null === input.btime || "number" === typeof input.btime && (0 <= input.btime || $guard(_exceptionable, {
309
+ }, errorFactory)) && ("number" === typeof input.btime && (0 <= input.btime || $guard(_exceptionable, {
316
310
  path: _path + ".btime",
317
311
  expected: "number & Minimum<0>",
318
312
  value: input.btime
@@ -322,7 +316,7 @@ export const assertGuardFile = (input, errorFactory) => {
322
316
  value: input.btime
323
317
  }, errorFactory)) || $guard(_exceptionable, {
324
318
  path: _path + ".btime",
325
- expected: "((number & Minimum<0> & Type<\"uint32\">) | null)",
319
+ expected: "(number & Minimum<0> & Type<\"uint32\">)",
326
320
  value: input.btime
327
321
  }, errorFactory));
328
322
  const $ao1 = (input, _path, _exceptionable = true) => undefined === input.file || "string" === typeof input.file || $guard(_exceptionable, {
@@ -351,13 +345,13 @@ export const stringifyFile = input => {
351
345
  const $io2 = input => "string" === typeof input.message;
352
346
  const $string = __typia.json.createStringify.string;
353
347
  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"}}`;
348
+ const $so0 = input => `{"id":${$string(input.id)},"size":${input.size},"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":${input.btime}}`;
355
349
  const $so1 = input => `{${$tail(`${undefined === input.file ? "" : `"file":${undefined !== input.file ? $string(input.file) : undefined}`}`)}}`;
356
350
  return $so0(input);
357
351
  };
358
352
  export const assertStringifyFile = (input, errorFactory) => { const assert = (input, errorFactory) => {
359
353
  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)));
354
+ 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 <= 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)) && ("number" === typeof input.btime && (0 <= input.btime && (Math.floor(input.btime) === input.btime && 0 <= input.btime && input.btime <= 4294967295)));
361
355
  const $io1 = input => undefined === input.file || "string" === typeof input.file;
362
356
  const $io2 = input => "string" === typeof input.message;
363
357
  return "object" === typeof input && null !== input && $io0(input);
@@ -373,7 +367,7 @@ export const assertStringifyFile = (input, errorFactory) => { const assert = (in
373
367
  path: _path + ".id",
374
368
  expected: "(string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">)",
375
369
  value: input.id
376
- }, errorFactory)) && (null === input.size || "number" === typeof input.size && (0 <= input.size || $guard(_exceptionable, {
370
+ }, errorFactory)) && ("number" === typeof input.size && (0 <= input.size || $guard(_exceptionable, {
377
371
  path: _path + ".size",
378
372
  expected: "number & Minimum<0>",
379
373
  value: input.size
@@ -383,7 +377,7 @@ export const assertStringifyFile = (input, errorFactory) => { const assert = (in
383
377
  value: input.size
384
378
  }, errorFactory)) || $guard(_exceptionable, {
385
379
  path: _path + ".size",
386
- expected: "((number & Minimum<0> & Type<\"uint32\">) | null)",
380
+ expected: "(number & Minimum<0> & Type<\"uint32\">)",
387
381
  value: input.size
388
382
  }, errorFactory)) && ("boolean" === typeof input.seekable || $guard(_exceptionable, {
389
383
  path: _path + ".seekable",
@@ -457,7 +451,7 @@ export const assertStringifyFile = (input, errorFactory) => { const assert = (in
457
451
  path: _path + ".hash",
458
452
  expected: "(string & Pattern<\"^([A-Fa-f0-9]{32})?$\">)",
459
453
  value: input.hash
460
- }, errorFactory)) && (null === input.btime || "number" === typeof input.btime && (0 <= input.btime || $guard(_exceptionable, {
454
+ }, errorFactory)) && ("number" === typeof input.btime && (0 <= input.btime || $guard(_exceptionable, {
461
455
  path: _path + ".btime",
462
456
  expected: "number & Minimum<0>",
463
457
  value: input.btime
@@ -467,7 +461,7 @@ export const assertStringifyFile = (input, errorFactory) => { const assert = (in
467
461
  value: input.btime
468
462
  }, errorFactory)) || $guard(_exceptionable, {
469
463
  path: _path + ".btime",
470
- expected: "((number & Minimum<0> & Type<\"uint32\">) | null)",
464
+ expected: "(number & Minimum<0> & Type<\"uint32\">)",
471
465
  value: input.btime
472
466
  }, errorFactory));
473
467
  const $ao1 = (input, _path, _exceptionable = true) => undefined === input.file || "string" === typeof input.file || $guard(_exceptionable, {
@@ -496,19 +490,19 @@ export const assertStringifyFile = (input, errorFactory) => { const assert = (in
496
490
  const $io2 = input => "string" === typeof input.message;
497
491
  const $string = __typia.json.createAssertStringify.string;
498
492
  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"}}`;
493
+ const $so0 = input => `{"id":${$string(input.id)},"size":${input.size},"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":${input.btime}}`;
500
494
  const $so1 = input => `{${$tail(`${undefined === input.file ? "" : `"file":${undefined !== input.file ? $string(input.file) : undefined}`}`)}}`;
501
495
  return $so0(input);
502
496
  }; return stringify(assert(input, errorFactory)); };
503
497
  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)));
498
+ const $io0 = input => "number" === typeof input.position && (0 <= input.position && (Math.floor(input.position) === input.position && 0 <= input.position && input.position <= 4294967295)) && "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 <= 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)) && ("number" === typeof input.btime && (0 <= input.btime && (Math.floor(input.btime) === input.btime && 0 <= input.btime && input.btime <= 4294967295)));
505
499
  const $io1 = input => undefined === input.file || "string" === typeof input.file;
506
500
  const $io2 = input => "string" === typeof input.message;
507
501
  return "object" === typeof input && null !== input && $io0(input);
508
502
  };
509
503
  export const assertFileStats = (input, errorFactory) => {
510
504
  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)));
505
+ const $io0 = input => "number" === typeof input.position && (0 <= input.position && (Math.floor(input.position) === input.position && 0 <= input.position && input.position <= 4294967295)) && "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 <= 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)) && ("number" === typeof input.btime && (0 <= input.btime && (Math.floor(input.btime) === input.btime && 0 <= input.btime && input.btime <= 4294967295)));
512
506
  const $io1 = input => undefined === input.file || "string" === typeof input.file;
513
507
  const $io2 = input => "string" === typeof input.message;
514
508
  return "object" === typeof input && null !== input && $io0(input);
@@ -516,7 +510,7 @@ export const assertFileStats = (input, errorFactory) => {
516
510
  if (false === __is(input))
517
511
  ((input, _path, _exceptionable = true) => {
518
512
  const $guard = __typia.createAssert.guard;
519
- const $ao0 = (input, _path, _exceptionable = true) => (null === input.position || "number" === typeof input.position && (0 <= input.position || $guard(_exceptionable, {
513
+ const $ao0 = (input, _path, _exceptionable = true) => ("number" === typeof input.position && (0 <= input.position || $guard(_exceptionable, {
520
514
  path: _path + ".position",
521
515
  expected: "number & Minimum<0>",
522
516
  value: input.position
@@ -526,11 +520,11 @@ export const assertFileStats = (input, errorFactory) => {
526
520
  value: input.position
527
521
  }, errorFactory)) || $guard(_exceptionable, {
528
522
  path: _path + ".position",
529
- expected: "((number & Minimum<0> & Type<\"uint32\">) | null)",
523
+ expected: "(number & Minimum<0> & Type<\"uint32\">)",
530
524
  value: input.position
531
- }, errorFactory)) && (null === input.uploading || "boolean" === typeof input.uploading || $guard(_exceptionable, {
525
+ }, errorFactory)) && ("boolean" === typeof input.uploading || $guard(_exceptionable, {
532
526
  path: _path + ".uploading",
533
- expected: "(boolean | null)",
527
+ expected: "boolean",
534
528
  value: input.uploading
535
529
  }, errorFactory)) && ("boolean" === typeof input.completed || $guard(_exceptionable, {
536
530
  path: _path + ".completed",
@@ -568,7 +562,7 @@ export const assertFileStats = (input, errorFactory) => {
568
562
  path: _path + ".id",
569
563
  expected: "(string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">)",
570
564
  value: input.id
571
- }, errorFactory)) && (null === input.size || "number" === typeof input.size && (0 <= input.size || $guard(_exceptionable, {
565
+ }, errorFactory)) && ("number" === typeof input.size && (0 <= input.size || $guard(_exceptionable, {
572
566
  path: _path + ".size",
573
567
  expected: "number & Minimum<0>",
574
568
  value: input.size
@@ -578,7 +572,7 @@ export const assertFileStats = (input, errorFactory) => {
578
572
  value: input.size
579
573
  }, errorFactory)) || $guard(_exceptionable, {
580
574
  path: _path + ".size",
581
- expected: "((number & Minimum<0> & Type<\"uint32\">) | null)",
575
+ expected: "(number & Minimum<0> & Type<\"uint32\">)",
582
576
  value: input.size
583
577
  }, errorFactory)) && ("boolean" === typeof input.seekable || $guard(_exceptionable, {
584
578
  path: _path + ".seekable",
@@ -652,7 +646,7 @@ export const assertFileStats = (input, errorFactory) => {
652
646
  path: _path + ".hash",
653
647
  expected: "(string & Pattern<\"^([A-Fa-f0-9]{32})?$\">)",
654
648
  value: input.hash
655
- }, errorFactory)) && (null === input.btime || "number" === typeof input.btime && (0 <= input.btime || $guard(_exceptionable, {
649
+ }, errorFactory)) && ("number" === typeof input.btime && (0 <= input.btime || $guard(_exceptionable, {
656
650
  path: _path + ".btime",
657
651
  expected: "number & Minimum<0>",
658
652
  value: input.btime
@@ -662,7 +656,7 @@ export const assertFileStats = (input, errorFactory) => {
662
656
  value: input.btime
663
657
  }, errorFactory)) || $guard(_exceptionable, {
664
658
  path: _path + ".btime",
665
- expected: "((number & Minimum<0> & Type<\"uint32\">) | null)",
659
+ expected: "(number & Minimum<0> & Type<\"uint32\">)",
666
660
  value: input.btime
667
661
  }, errorFactory));
668
662
  const $ao1 = (input, _path, _exceptionable = true) => undefined === input.file || "string" === typeof input.file || $guard(_exceptionable, {
@@ -691,25 +685,19 @@ export const randomFileStats = generator => {
691
685
  const $generator = __typia.createRandom.generator;
692
686
  const $pick = __typia.createRandom.pick;
693
687
  const $ro0 = (_recursive = false, _depth = 0) => ({
694
- position: $pick([
695
- () => null,
696
- () => (generator?.customs ?? $generator.customs)?.number?.([
697
- {
698
- name: "Minimum<0>",
699
- kind: "minimum",
700
- value: 0
701
- },
702
- {
703
- name: "Type<\"uint32\">",
704
- kind: "type",
705
- value: "uint32"
706
- }
707
- ]) ?? (generator?.integer ?? $generator.integer)(0, 10)
708
- ])(),
709
- uploading: $pick([
710
- () => null,
711
- () => (generator?.boolean ?? $generator.boolean)()
712
- ])(),
688
+ position: (generator?.customs ?? $generator.customs)?.number?.([
689
+ {
690
+ name: "Minimum<0>",
691
+ kind: "minimum",
692
+ value: 0
693
+ },
694
+ {
695
+ name: "Type<\"uint32\">",
696
+ kind: "type",
697
+ value: "uint32"
698
+ }
699
+ ]) ?? (generator?.integer ?? $generator.integer)(0, 10),
700
+ uploading: (generator?.boolean ?? $generator.boolean)(),
713
701
  completed: (generator?.boolean ?? $generator.boolean)(),
714
702
  zones: (generator?.array ?? $generator.array)(() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()),
715
703
  replicas: (generator?.array ?? $generator.array)(() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()),
@@ -720,21 +708,18 @@ export const randomFileStats = generator => {
720
708
  value: "^[0-9A-Za-z~][0-9A-Za-z~._: -]*$"
721
709
  }
722
710
  ]) ?? (generator?.pattern ?? $generator.pattern)(/^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/),
723
- size: $pick([
724
- () => null,
725
- () => (generator?.customs ?? $generator.customs)?.number?.([
726
- {
727
- name: "Minimum<0>",
728
- kind: "minimum",
729
- value: 0
730
- },
731
- {
732
- name: "Type<\"uint32\">",
733
- kind: "type",
734
- value: "uint32"
735
- }
736
- ]) ?? (generator?.integer ?? $generator.integer)(0, 10)
737
- ])(),
711
+ size: (generator?.customs ?? $generator.customs)?.number?.([
712
+ {
713
+ name: "Minimum<0>",
714
+ kind: "minimum",
715
+ value: 0
716
+ },
717
+ {
718
+ name: "Type<\"uint32\">",
719
+ kind: "type",
720
+ value: "uint32"
721
+ }
722
+ ]) ?? (generator?.integer ?? $generator.integer)(0, 10),
738
723
  seekable: (generator?.boolean ?? $generator.boolean)(),
739
724
  deleted: (generator?.boolean ?? $generator.boolean)(),
740
725
  path: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
@@ -750,21 +735,18 @@ export const randomFileStats = generator => {
750
735
  value: "^([A-Fa-f0-9]{32})?$"
751
736
  }
752
737
  ]) ?? (generator?.pattern ?? $generator.pattern)(/^([A-Fa-f0-9]{32})?$/),
753
- btime: $pick([
754
- () => null,
755
- () => (generator?.customs ?? $generator.customs)?.number?.([
756
- {
757
- name: "Minimum<0>",
758
- kind: "minimum",
759
- value: 0
760
- },
761
- {
762
- name: "Type<\"uint32\">",
763
- kind: "type",
764
- value: "uint32"
765
- }
766
- ]) ?? (generator?.integer ?? $generator.integer)(0, 10)
767
- ])()
738
+ btime: (generator?.customs ?? $generator.customs)?.number?.([
739
+ {
740
+ name: "Minimum<0>",
741
+ kind: "minimum",
742
+ value: 0
743
+ },
744
+ {
745
+ name: "Type<\"uint32\">",
746
+ kind: "type",
747
+ value: "uint32"
748
+ }
749
+ ]) ?? (generator?.integer ?? $generator.integer)(0, 10)
768
750
  });
769
751
  const $ro1 = (_recursive = false, _depth = 0) => ({
770
752
  file: $pick([
@@ -779,7 +761,7 @@ export const randomFileStats = generator => {
779
761
  };
780
762
  export const assertGuardFileStats = (input, errorFactory) => {
781
763
  const __is = input => {
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)));
764
+ const $io0 = input => "number" === typeof input.position && (0 <= input.position && (Math.floor(input.position) === input.position && 0 <= input.position && input.position <= 4294967295)) && "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 <= 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)) && ("number" === typeof input.btime && (0 <= input.btime && (Math.floor(input.btime) === input.btime && 0 <= input.btime && input.btime <= 4294967295)));
783
765
  const $io1 = input => undefined === input.file || "string" === typeof input.file;
784
766
  const $io2 = input => "string" === typeof input.message;
785
767
  return "object" === typeof input && null !== input && $io0(input);
@@ -787,7 +769,7 @@ export const assertGuardFileStats = (input, errorFactory) => {
787
769
  if (false === __is(input))
788
770
  ((input, _path, _exceptionable = true) => {
789
771
  const $guard = __typia.createAssertGuard.guard;
790
- const $ao0 = (input, _path, _exceptionable = true) => (null === input.position || "number" === typeof input.position && (0 <= input.position || $guard(_exceptionable, {
772
+ const $ao0 = (input, _path, _exceptionable = true) => ("number" === typeof input.position && (0 <= input.position || $guard(_exceptionable, {
791
773
  path: _path + ".position",
792
774
  expected: "number & Minimum<0>",
793
775
  value: input.position
@@ -797,11 +779,11 @@ export const assertGuardFileStats = (input, errorFactory) => {
797
779
  value: input.position
798
780
  }, errorFactory)) || $guard(_exceptionable, {
799
781
  path: _path + ".position",
800
- expected: "((number & Minimum<0> & Type<\"uint32\">) | null)",
782
+ expected: "(number & Minimum<0> & Type<\"uint32\">)",
801
783
  value: input.position
802
- }, errorFactory)) && (null === input.uploading || "boolean" === typeof input.uploading || $guard(_exceptionable, {
784
+ }, errorFactory)) && ("boolean" === typeof input.uploading || $guard(_exceptionable, {
803
785
  path: _path + ".uploading",
804
- expected: "(boolean | null)",
786
+ expected: "boolean",
805
787
  value: input.uploading
806
788
  }, errorFactory)) && ("boolean" === typeof input.completed || $guard(_exceptionable, {
807
789
  path: _path + ".completed",
@@ -839,7 +821,7 @@ export const assertGuardFileStats = (input, errorFactory) => {
839
821
  path: _path + ".id",
840
822
  expected: "(string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">)",
841
823
  value: input.id
842
- }, errorFactory)) && (null === input.size || "number" === typeof input.size && (0 <= input.size || $guard(_exceptionable, {
824
+ }, errorFactory)) && ("number" === typeof input.size && (0 <= input.size || $guard(_exceptionable, {
843
825
  path: _path + ".size",
844
826
  expected: "number & Minimum<0>",
845
827
  value: input.size
@@ -849,7 +831,7 @@ export const assertGuardFileStats = (input, errorFactory) => {
849
831
  value: input.size
850
832
  }, errorFactory)) || $guard(_exceptionable, {
851
833
  path: _path + ".size",
852
- expected: "((number & Minimum<0> & Type<\"uint32\">) | null)",
834
+ expected: "(number & Minimum<0> & Type<\"uint32\">)",
853
835
  value: input.size
854
836
  }, errorFactory)) && ("boolean" === typeof input.seekable || $guard(_exceptionable, {
855
837
  path: _path + ".seekable",
@@ -923,7 +905,7 @@ export const assertGuardFileStats = (input, errorFactory) => {
923
905
  path: _path + ".hash",
924
906
  expected: "(string & Pattern<\"^([A-Fa-f0-9]{32})?$\">)",
925
907
  value: input.hash
926
- }, errorFactory)) && (null === input.btime || "number" === typeof input.btime && (0 <= input.btime || $guard(_exceptionable, {
908
+ }, errorFactory)) && ("number" === typeof input.btime && (0 <= input.btime || $guard(_exceptionable, {
927
909
  path: _path + ".btime",
928
910
  expected: "number & Minimum<0>",
929
911
  value: input.btime
@@ -933,7 +915,7 @@ export const assertGuardFileStats = (input, errorFactory) => {
933
915
  value: input.btime
934
916
  }, errorFactory)) || $guard(_exceptionable, {
935
917
  path: _path + ".btime",
936
- expected: "((number & Minimum<0> & Type<\"uint32\">) | null)",
918
+ expected: "(number & Minimum<0> & Type<\"uint32\">)",
937
919
  value: input.btime
938
920
  }, errorFactory));
939
921
  const $ao1 = (input, _path, _exceptionable = true) => undefined === input.file || "string" === typeof input.file || $guard(_exceptionable, {
@@ -962,13 +944,13 @@ export const stringifyFileStats = input => {
962
944
  const $io2 = input => "string" === typeof input.message;
963
945
  const $string = __typia.json.createStringify.string;
964
946
  const $tail = __typia.json.createStringify.tail;
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"}}`;
947
+ 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},"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":${input.btime}}`;
966
948
  const $so1 = input => `{${$tail(`${undefined === input.file ? "" : `"file":${undefined !== input.file ? $string(input.file) : undefined}`}`)}}`;
967
949
  return $so0(input);
968
950
  };
969
951
  export const assertStringifyFileStats = (input, errorFactory) => { const assert = (input, errorFactory) => {
970
952
  const __is = input => {
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)));
953
+ const $io0 = input => "number" === typeof input.position && (0 <= input.position && (Math.floor(input.position) === input.position && 0 <= input.position && input.position <= 4294967295)) && "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 <= 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)) && ("number" === typeof input.btime && (0 <= input.btime && (Math.floor(input.btime) === input.btime && 0 <= input.btime && input.btime <= 4294967295)));
972
954
  const $io1 = input => undefined === input.file || "string" === typeof input.file;
973
955
  const $io2 = input => "string" === typeof input.message;
974
956
  return "object" === typeof input && null !== input && $io0(input);
@@ -976,7 +958,7 @@ export const assertStringifyFileStats = (input, errorFactory) => { const assert
976
958
  if (false === __is(input))
977
959
  ((input, _path, _exceptionable = true) => {
978
960
  const $guard = __typia.json.createAssertStringify.guard;
979
- const $ao0 = (input, _path, _exceptionable = true) => (null === input.position || "number" === typeof input.position && (0 <= input.position || $guard(_exceptionable, {
961
+ const $ao0 = (input, _path, _exceptionable = true) => ("number" === typeof input.position && (0 <= input.position || $guard(_exceptionable, {
980
962
  path: _path + ".position",
981
963
  expected: "number & Minimum<0>",
982
964
  value: input.position
@@ -986,11 +968,11 @@ export const assertStringifyFileStats = (input, errorFactory) => { const assert
986
968
  value: input.position
987
969
  }, errorFactory)) || $guard(_exceptionable, {
988
970
  path: _path + ".position",
989
- expected: "((number & Minimum<0> & Type<\"uint32\">) | null)",
971
+ expected: "(number & Minimum<0> & Type<\"uint32\">)",
990
972
  value: input.position
991
- }, errorFactory)) && (null === input.uploading || "boolean" === typeof input.uploading || $guard(_exceptionable, {
973
+ }, errorFactory)) && ("boolean" === typeof input.uploading || $guard(_exceptionable, {
992
974
  path: _path + ".uploading",
993
- expected: "(boolean | null)",
975
+ expected: "boolean",
994
976
  value: input.uploading
995
977
  }, errorFactory)) && ("boolean" === typeof input.completed || $guard(_exceptionable, {
996
978
  path: _path + ".completed",
@@ -1028,7 +1010,7 @@ export const assertStringifyFileStats = (input, errorFactory) => { const assert
1028
1010
  path: _path + ".id",
1029
1011
  expected: "(string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">)",
1030
1012
  value: input.id
1031
- }, errorFactory)) && (null === input.size || "number" === typeof input.size && (0 <= input.size || $guard(_exceptionable, {
1013
+ }, errorFactory)) && ("number" === typeof input.size && (0 <= input.size || $guard(_exceptionable, {
1032
1014
  path: _path + ".size",
1033
1015
  expected: "number & Minimum<0>",
1034
1016
  value: input.size
@@ -1038,7 +1020,7 @@ export const assertStringifyFileStats = (input, errorFactory) => { const assert
1038
1020
  value: input.size
1039
1021
  }, errorFactory)) || $guard(_exceptionable, {
1040
1022
  path: _path + ".size",
1041
- expected: "((number & Minimum<0> & Type<\"uint32\">) | null)",
1023
+ expected: "(number & Minimum<0> & Type<\"uint32\">)",
1042
1024
  value: input.size
1043
1025
  }, errorFactory)) && ("boolean" === typeof input.seekable || $guard(_exceptionable, {
1044
1026
  path: _path + ".seekable",
@@ -1112,7 +1094,7 @@ export const assertStringifyFileStats = (input, errorFactory) => { const assert
1112
1094
  path: _path + ".hash",
1113
1095
  expected: "(string & Pattern<\"^([A-Fa-f0-9]{32})?$\">)",
1114
1096
  value: input.hash
1115
- }, errorFactory)) && (null === input.btime || "number" === typeof input.btime && (0 <= input.btime || $guard(_exceptionable, {
1097
+ }, errorFactory)) && ("number" === typeof input.btime && (0 <= input.btime || $guard(_exceptionable, {
1116
1098
  path: _path + ".btime",
1117
1099
  expected: "number & Minimum<0>",
1118
1100
  value: input.btime
@@ -1122,7 +1104,7 @@ export const assertStringifyFileStats = (input, errorFactory) => { const assert
1122
1104
  value: input.btime
1123
1105
  }, errorFactory)) || $guard(_exceptionable, {
1124
1106
  path: _path + ".btime",
1125
- expected: "((number & Minimum<0> & Type<\"uint32\">) | null)",
1107
+ expected: "(number & Minimum<0> & Type<\"uint32\">)",
1126
1108
  value: input.btime
1127
1109
  }, errorFactory));
1128
1110
  const $ao1 = (input, _path, _exceptionable = true) => undefined === input.file || "string" === typeof input.file || $guard(_exceptionable, {
@@ -1151,7 +1133,7 @@ export const assertStringifyFileStats = (input, errorFactory) => { const assert
1151
1133
  const $io2 = input => "string" === typeof input.message;
1152
1134
  const $string = __typia.json.createAssertStringify.string;
1153
1135
  const $tail = __typia.json.createAssertStringify.tail;
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"}}`;
1136
+ 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},"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":${input.btime}}`;
1155
1137
  const $so1 = input => `{${$tail(`${undefined === input.file ? "" : `"file":${undefined !== input.file ? $string(input.file) : undefined}`}`)}}`;
1156
1138
  return $so0(input);
1157
1139
  }; return stringify(assert(input, errorFactory)); };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nxtedition/types",
3
- "version": "1.2.1",
3
+ "version": "1.2.2",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "prepare": "ts-patch install && typia patch",