@nxtedition/types 1.6.3 → 1.6.4

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,20 +1,35 @@
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 <= 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)));
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 <= 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 && (undefined !== input.error && (null === input.error || (Array.isArray(input.error) && input.error.every(elem => "object" === typeof elem && null !== elem && $io2(elem)) || "object" === typeof input.error && null !== input.error && $io2(input.error))));
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
- const $io2 = input => "string" === typeof input.message;
5
+ const $io2 = input => "string" === typeof input.message && (undefined === input.type || "string" === typeof input.type) && (undefined === input.code || "string" === typeof input.code) && (undefined === input.exitCode || "number" === typeof input.exitCode) && (undefined === input.signalCode || "number" === typeof input.signalCode) && (undefined === input.statusCode || "number" === typeof input.statusCode) && (undefined === input.headers || "object" === typeof input.headers && null !== input.headers && false === Array.isArray(input.headers) && $io3(input.headers)) && (undefined === input.data || "object" === typeof input.data && null !== input.data && false === Array.isArray(input.data) && $io4(input.data)) && (null === input.cause || undefined === input.cause || "object" === typeof input.cause && null !== input.cause && $io2(input.cause)) && (null === input.errors || undefined === input.errors || Array.isArray(input.errors) && input.errors.every(elem => "object" === typeof elem && null !== elem && $io2(elem)));
6
+ const $io3 = input => Object.keys(input).every(key => {
7
+ const value = input[key];
8
+ if (undefined === value)
9
+ return true;
10
+ return "string" === typeof value;
11
+ });
12
+ const $io4 = input => true;
6
13
  return "object" === typeof input && null !== input && $io0(input);
7
14
  };
8
15
  export const assertFile = (input, errorFactory) => {
9
16
  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 <= 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)));
17
+ 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 <= 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 && (undefined !== input.error && (null === input.error || (Array.isArray(input.error) && input.error.every(elem => "object" === typeof elem && null !== elem && $io2(elem)) || "object" === typeof input.error && null !== input.error && $io2(input.error))));
11
18
  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
- const $io2 = input => "string" === typeof input.message;
19
+ const $io2 = input => "string" === typeof input.message && (undefined === input.type || "string" === typeof input.type) && (undefined === input.code || "string" === typeof input.code) && (undefined === input.exitCode || "number" === typeof input.exitCode) && (undefined === input.signalCode || "number" === typeof input.signalCode) && (undefined === input.statusCode || "number" === typeof input.statusCode) && (undefined === input.headers || "object" === typeof input.headers && null !== input.headers && false === Array.isArray(input.headers) && $io3(input.headers)) && (undefined === input.data || "object" === typeof input.data && null !== input.data && false === Array.isArray(input.data) && $io4(input.data)) && (null === input.cause || undefined === input.cause || "object" === typeof input.cause && null !== input.cause && $io2(input.cause)) && (null === input.errors || undefined === input.errors || Array.isArray(input.errors) && input.errors.every(elem => "object" === typeof elem && null !== elem && $io2(elem)));
20
+ const $io3 = input => Object.keys(input).every(key => {
21
+ const value = input[key];
22
+ if (undefined === value)
23
+ return true;
24
+ return "string" === typeof value;
25
+ });
26
+ const $io4 = input => true;
13
27
  return "object" === typeof input && null !== input && $io0(input);
14
28
  };
15
29
  if (false === __is(input))
16
30
  ((input, _path, _exceptionable = true) => {
17
31
  const $guard = __typia.createAssert.guard;
32
+ const $join = __typia.createAssert.join;
18
33
  const $ao0 = (input, _path, _exceptionable = true) => ("string" === typeof input.id && (/^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.id) || $guard(_exceptionable, {
19
34
  path: _path + ".id",
20
35
  expected: "string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">",
@@ -103,23 +118,27 @@ export const assertFile = (input, errorFactory) => {
103
118
  path: _path + ".completed",
104
119
  expected: "boolean",
105
120
  value: input.completed
106
- }, errorFactory)) && (null === input.error || (Array.isArray(input.error) || $guard(_exceptionable, {
121
+ }, errorFactory)) && ((undefined !== input.error || $guard(_exceptionable, {
107
122
  path: _path + ".error",
108
- expected: "(Array<__type>.o1 | null)",
123
+ expected: "(Array<NxtError> | NxtError | null)",
109
124
  value: input.error
110
- }, errorFactory)) && input.error.every((elem, _index3) => ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
125
+ }, errorFactory)) && (null === input.error || (Array.isArray(input.error) && input.error.every((elem, _index3) => ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
111
126
  path: _path + ".error[" + _index3 + "]",
112
- expected: "__type.o1",
127
+ expected: "NxtError",
113
128
  value: elem
114
129
  }, errorFactory)) && $ao2(elem, _path + ".error[" + _index3 + "]", true && _exceptionable) || $guard(_exceptionable, {
115
130
  path: _path + ".error[" + _index3 + "]",
116
- expected: "__type.o1",
131
+ expected: "NxtError",
117
132
  value: elem
133
+ }, errorFactory)) || "object" === typeof input.error && null !== input.error && $ao2(input.error, _path + ".error", true && _exceptionable) || $guard(_exceptionable, {
134
+ path: _path + ".error",
135
+ expected: "(Array<NxtError> | NxtError | null)",
136
+ value: input.error
118
137
  }, errorFactory)) || $guard(_exceptionable, {
119
138
  path: _path + ".error",
120
- expected: "(Array<__type>.o1 | null)",
139
+ expected: "(Array<NxtError> | NxtError | null)",
121
140
  value: input.error
122
- }, errorFactory));
141
+ }, errorFactory)));
123
142
  const $ao1 = (input, _path, _exceptionable = true) => (undefined === input.file || "string" === typeof input.file || $guard(_exceptionable, {
124
143
  path: _path + ".file",
125
144
  expected: "(string | undefined)",
@@ -137,11 +156,82 @@ export const assertFile = (input, errorFactory) => {
137
156
  expected: "(number | undefined)",
138
157
  value: input.end
139
158
  }, errorFactory));
140
- const $ao2 = (input, _path, _exceptionable = true) => "string" === typeof input.message || $guard(_exceptionable, {
159
+ const $ao2 = (input, _path, _exceptionable = true) => ("string" === typeof input.message || $guard(_exceptionable, {
141
160
  path: _path + ".message",
142
161
  expected: "string",
143
162
  value: input.message
144
- }, errorFactory);
163
+ }, errorFactory)) && (undefined === input.type || "string" === typeof input.type || $guard(_exceptionable, {
164
+ path: _path + ".type",
165
+ expected: "(string | undefined)",
166
+ value: input.type
167
+ }, errorFactory)) && (undefined === input.code || "string" === typeof input.code || $guard(_exceptionable, {
168
+ path: _path + ".code",
169
+ expected: "(string | undefined)",
170
+ value: input.code
171
+ }, errorFactory)) && (undefined === input.exitCode || "number" === typeof input.exitCode || $guard(_exceptionable, {
172
+ path: _path + ".exitCode",
173
+ expected: "(number | undefined)",
174
+ value: input.exitCode
175
+ }, errorFactory)) && (undefined === input.signalCode || "number" === typeof input.signalCode || $guard(_exceptionable, {
176
+ path: _path + ".signalCode",
177
+ expected: "(number | undefined)",
178
+ value: input.signalCode
179
+ }, errorFactory)) && (undefined === input.statusCode || "number" === typeof input.statusCode || $guard(_exceptionable, {
180
+ path: _path + ".statusCode",
181
+ expected: "(number | undefined)",
182
+ value: input.statusCode
183
+ }, errorFactory)) && (undefined === input.headers || ("object" === typeof input.headers && null !== input.headers && false === Array.isArray(input.headers) || $guard(_exceptionable, {
184
+ path: _path + ".headers",
185
+ expected: "(Record<string, string> | undefined)",
186
+ value: input.headers
187
+ }, errorFactory)) && $ao3(input.headers, _path + ".headers", true && _exceptionable) || $guard(_exceptionable, {
188
+ path: _path + ".headers",
189
+ expected: "(Record<string, string> | undefined)",
190
+ value: input.headers
191
+ }, errorFactory)) && (undefined === input.data || ("object" === typeof input.data && null !== input.data && false === Array.isArray(input.data) || $guard(_exceptionable, {
192
+ path: _path + ".data",
193
+ expected: "(object | undefined)",
194
+ value: input.data
195
+ }, errorFactory)) && $ao4(input.data, _path + ".data", true && _exceptionable) || $guard(_exceptionable, {
196
+ path: _path + ".data",
197
+ expected: "(object | undefined)",
198
+ value: input.data
199
+ }, errorFactory)) && (null === input.cause || undefined === input.cause || ("object" === typeof input.cause && null !== input.cause || $guard(_exceptionable, {
200
+ path: _path + ".cause",
201
+ expected: "(NxtError | null | undefined)",
202
+ value: input.cause
203
+ }, errorFactory)) && $ao2(input.cause, _path + ".cause", true && _exceptionable) || $guard(_exceptionable, {
204
+ path: _path + ".cause",
205
+ expected: "(NxtError | null | undefined)",
206
+ value: input.cause
207
+ }, errorFactory)) && (null === input.errors || undefined === input.errors || (Array.isArray(input.errors) || $guard(_exceptionable, {
208
+ path: _path + ".errors",
209
+ expected: "(Array<NxtError> | null | undefined)",
210
+ value: input.errors
211
+ }, errorFactory)) && input.errors.every((elem, _index4) => ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
212
+ path: _path + ".errors[" + _index4 + "]",
213
+ expected: "NxtError",
214
+ value: elem
215
+ }, errorFactory)) && $ao2(elem, _path + ".errors[" + _index4 + "]", true && _exceptionable) || $guard(_exceptionable, {
216
+ path: _path + ".errors[" + _index4 + "]",
217
+ expected: "NxtError",
218
+ value: elem
219
+ }, errorFactory)) || $guard(_exceptionable, {
220
+ path: _path + ".errors",
221
+ expected: "(Array<NxtError> | null | undefined)",
222
+ value: input.errors
223
+ }, errorFactory));
224
+ const $ao3 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every(key => {
225
+ const value = input[key];
226
+ if (undefined === value)
227
+ return true;
228
+ return "string" === typeof value || $guard(_exceptionable, {
229
+ path: _path + $join(key),
230
+ expected: "string",
231
+ value: value
232
+ }, errorFactory);
233
+ });
234
+ const $ao4 = (input, _path, _exceptionable = true) => true;
145
235
  return ("object" === typeof input && null !== input || $guard(true, {
146
236
  path: _path + "",
147
237
  expected: "File",
@@ -208,7 +298,8 @@ export const randomFile = generator => {
208
298
  completed: (generator?.boolean ?? $generator.boolean)(),
209
299
  error: $pick([
210
300
  () => null,
211
- () => (generator?.array ?? $generator.array)(() => $ro2(_recursive, _recursive ? 1 + _depth : _depth))
301
+ () => (generator?.array ?? $generator.array)(() => $ro2(_recursive, _recursive ? 1 + _depth : _depth)),
302
+ () => $ro2(_recursive, _recursive ? 1 + _depth : _depth)
212
303
  ])()
213
304
  });
214
305
  const $ro1 = (_recursive = false, _depth = 0) => ({
@@ -229,21 +320,73 @@ export const randomFile = generator => {
229
320
  () => (generator?.customs ?? $generator.customs)?.number?.([]) ?? (generator?.number ?? $generator.number)(0, 100)
230
321
  ])()
231
322
  });
232
- const $ro2 = (_recursive = false, _depth = 0) => ({
233
- message: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
323
+ const $ro2 = (_recursive = true, _depth = 0) => ({
324
+ message: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
325
+ type: $pick([
326
+ () => undefined,
327
+ () => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
328
+ ])(),
329
+ code: $pick([
330
+ () => undefined,
331
+ () => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
332
+ ])(),
333
+ exitCode: $pick([
334
+ () => undefined,
335
+ () => (generator?.customs ?? $generator.customs)?.number?.([]) ?? (generator?.number ?? $generator.number)(0, 100)
336
+ ])(),
337
+ signalCode: $pick([
338
+ () => undefined,
339
+ () => (generator?.customs ?? $generator.customs)?.number?.([]) ?? (generator?.number ?? $generator.number)(0, 100)
340
+ ])(),
341
+ statusCode: $pick([
342
+ () => undefined,
343
+ () => (generator?.customs ?? $generator.customs)?.number?.([]) ?? (generator?.number ?? $generator.number)(0, 100)
344
+ ])(),
345
+ headers: $pick([
346
+ () => undefined,
347
+ () => $ro3(true, _recursive ? 1 + _depth : _depth)
348
+ ])(),
349
+ data: $pick([
350
+ () => undefined,
351
+ () => $ro4(true, _recursive ? 1 + _depth : _depth)
352
+ ])(),
353
+ cause: $pick([
354
+ () => undefined,
355
+ () => null,
356
+ () => $ro2(true, _recursive ? 1 + _depth : _depth)
357
+ ])(),
358
+ errors: $pick([
359
+ () => undefined,
360
+ () => null,
361
+ () => _recursive && 5 < _depth ? [] : 5 >= _depth ? (generator?.array ?? $generator.array)(() => $ro2(true, _recursive ? 1 + _depth : _depth)) : []
362
+ ])()
234
363
  });
364
+ const $ro3 = (_recursive = false, _depth = 0) => {
365
+ const output = {};
366
+ (generator?.array ?? $generator.array)(() => output[(generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()] = (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(), (generator?.integer ?? $generator.integer)(0, 3));
367
+ return output;
368
+ };
369
+ const $ro4 = (_recursive = false, _depth = 0) => {};
235
370
  return $ro0();
236
371
  };
237
372
  export const assertGuardFile = (input, errorFactory) => {
238
373
  const __is = input => {
239
- 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 <= 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)));
374
+ 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 <= 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 && (undefined !== input.error && (null === input.error || (Array.isArray(input.error) && input.error.every(elem => "object" === typeof elem && null !== elem && $io2(elem)) || "object" === typeof input.error && null !== input.error && $io2(input.error))));
240
375
  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);
241
- const $io2 = input => "string" === typeof input.message;
376
+ const $io2 = input => "string" === typeof input.message && (undefined === input.type || "string" === typeof input.type) && (undefined === input.code || "string" === typeof input.code) && (undefined === input.exitCode || "number" === typeof input.exitCode) && (undefined === input.signalCode || "number" === typeof input.signalCode) && (undefined === input.statusCode || "number" === typeof input.statusCode) && (undefined === input.headers || "object" === typeof input.headers && null !== input.headers && false === Array.isArray(input.headers) && $io3(input.headers)) && (undefined === input.data || "object" === typeof input.data && null !== input.data && false === Array.isArray(input.data) && $io4(input.data)) && (null === input.cause || undefined === input.cause || "object" === typeof input.cause && null !== input.cause && $io2(input.cause)) && (null === input.errors || undefined === input.errors || Array.isArray(input.errors) && input.errors.every(elem => "object" === typeof elem && null !== elem && $io2(elem)));
377
+ const $io3 = input => Object.keys(input).every(key => {
378
+ const value = input[key];
379
+ if (undefined === value)
380
+ return true;
381
+ return "string" === typeof value;
382
+ });
383
+ const $io4 = input => true;
242
384
  return "object" === typeof input && null !== input && $io0(input);
243
385
  };
244
386
  if (false === __is(input))
245
387
  ((input, _path, _exceptionable = true) => {
246
388
  const $guard = __typia.createAssertGuard.guard;
389
+ const $join = __typia.createAssertGuard.join;
247
390
  const $ao0 = (input, _path, _exceptionable = true) => ("string" === typeof input.id && (/^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.id) || $guard(_exceptionable, {
248
391
  path: _path + ".id",
249
392
  expected: "string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">",
@@ -332,23 +475,27 @@ export const assertGuardFile = (input, errorFactory) => {
332
475
  path: _path + ".completed",
333
476
  expected: "boolean",
334
477
  value: input.completed
335
- }, errorFactory)) && (null === input.error || (Array.isArray(input.error) || $guard(_exceptionable, {
478
+ }, errorFactory)) && ((undefined !== input.error || $guard(_exceptionable, {
336
479
  path: _path + ".error",
337
- expected: "(Array<__type>.o1 | null)",
480
+ expected: "(Array<NxtError> | NxtError | null)",
338
481
  value: input.error
339
- }, errorFactory)) && input.error.every((elem, _index3) => ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
482
+ }, errorFactory)) && (null === input.error || (Array.isArray(input.error) && input.error.every((elem, _index3) => ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
340
483
  path: _path + ".error[" + _index3 + "]",
341
- expected: "__type.o1",
484
+ expected: "NxtError",
342
485
  value: elem
343
486
  }, errorFactory)) && $ao2(elem, _path + ".error[" + _index3 + "]", true && _exceptionable) || $guard(_exceptionable, {
344
487
  path: _path + ".error[" + _index3 + "]",
345
- expected: "__type.o1",
488
+ expected: "NxtError",
346
489
  value: elem
490
+ }, errorFactory)) || "object" === typeof input.error && null !== input.error && $ao2(input.error, _path + ".error", true && _exceptionable) || $guard(_exceptionable, {
491
+ path: _path + ".error",
492
+ expected: "(Array<NxtError> | NxtError | null)",
493
+ value: input.error
347
494
  }, errorFactory)) || $guard(_exceptionable, {
348
495
  path: _path + ".error",
349
- expected: "(Array<__type>.o1 | null)",
496
+ expected: "(Array<NxtError> | NxtError | null)",
350
497
  value: input.error
351
- }, errorFactory));
498
+ }, errorFactory)));
352
499
  const $ao1 = (input, _path, _exceptionable = true) => (undefined === input.file || "string" === typeof input.file || $guard(_exceptionable, {
353
500
  path: _path + ".file",
354
501
  expected: "(string | undefined)",
@@ -366,11 +513,82 @@ export const assertGuardFile = (input, errorFactory) => {
366
513
  expected: "(number | undefined)",
367
514
  value: input.end
368
515
  }, errorFactory));
369
- const $ao2 = (input, _path, _exceptionable = true) => "string" === typeof input.message || $guard(_exceptionable, {
516
+ const $ao2 = (input, _path, _exceptionable = true) => ("string" === typeof input.message || $guard(_exceptionable, {
370
517
  path: _path + ".message",
371
518
  expected: "string",
372
519
  value: input.message
373
- }, errorFactory);
520
+ }, errorFactory)) && (undefined === input.type || "string" === typeof input.type || $guard(_exceptionable, {
521
+ path: _path + ".type",
522
+ expected: "(string | undefined)",
523
+ value: input.type
524
+ }, errorFactory)) && (undefined === input.code || "string" === typeof input.code || $guard(_exceptionable, {
525
+ path: _path + ".code",
526
+ expected: "(string | undefined)",
527
+ value: input.code
528
+ }, errorFactory)) && (undefined === input.exitCode || "number" === typeof input.exitCode || $guard(_exceptionable, {
529
+ path: _path + ".exitCode",
530
+ expected: "(number | undefined)",
531
+ value: input.exitCode
532
+ }, errorFactory)) && (undefined === input.signalCode || "number" === typeof input.signalCode || $guard(_exceptionable, {
533
+ path: _path + ".signalCode",
534
+ expected: "(number | undefined)",
535
+ value: input.signalCode
536
+ }, errorFactory)) && (undefined === input.statusCode || "number" === typeof input.statusCode || $guard(_exceptionable, {
537
+ path: _path + ".statusCode",
538
+ expected: "(number | undefined)",
539
+ value: input.statusCode
540
+ }, errorFactory)) && (undefined === input.headers || ("object" === typeof input.headers && null !== input.headers && false === Array.isArray(input.headers) || $guard(_exceptionable, {
541
+ path: _path + ".headers",
542
+ expected: "(Record<string, string> | undefined)",
543
+ value: input.headers
544
+ }, errorFactory)) && $ao3(input.headers, _path + ".headers", true && _exceptionable) || $guard(_exceptionable, {
545
+ path: _path + ".headers",
546
+ expected: "(Record<string, string> | undefined)",
547
+ value: input.headers
548
+ }, errorFactory)) && (undefined === input.data || ("object" === typeof input.data && null !== input.data && false === Array.isArray(input.data) || $guard(_exceptionable, {
549
+ path: _path + ".data",
550
+ expected: "(object | undefined)",
551
+ value: input.data
552
+ }, errorFactory)) && $ao4(input.data, _path + ".data", true && _exceptionable) || $guard(_exceptionable, {
553
+ path: _path + ".data",
554
+ expected: "(object | undefined)",
555
+ value: input.data
556
+ }, errorFactory)) && (null === input.cause || undefined === input.cause || ("object" === typeof input.cause && null !== input.cause || $guard(_exceptionable, {
557
+ path: _path + ".cause",
558
+ expected: "(NxtError | null | undefined)",
559
+ value: input.cause
560
+ }, errorFactory)) && $ao2(input.cause, _path + ".cause", true && _exceptionable) || $guard(_exceptionable, {
561
+ path: _path + ".cause",
562
+ expected: "(NxtError | null | undefined)",
563
+ value: input.cause
564
+ }, errorFactory)) && (null === input.errors || undefined === input.errors || (Array.isArray(input.errors) || $guard(_exceptionable, {
565
+ path: _path + ".errors",
566
+ expected: "(Array<NxtError> | null | undefined)",
567
+ value: input.errors
568
+ }, errorFactory)) && input.errors.every((elem, _index4) => ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
569
+ path: _path + ".errors[" + _index4 + "]",
570
+ expected: "NxtError",
571
+ value: elem
572
+ }, errorFactory)) && $ao2(elem, _path + ".errors[" + _index4 + "]", true && _exceptionable) || $guard(_exceptionable, {
573
+ path: _path + ".errors[" + _index4 + "]",
574
+ expected: "NxtError",
575
+ value: elem
576
+ }, errorFactory)) || $guard(_exceptionable, {
577
+ path: _path + ".errors",
578
+ expected: "(Array<NxtError> | null | undefined)",
579
+ value: input.errors
580
+ }, errorFactory));
581
+ const $ao3 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every(key => {
582
+ const value = input[key];
583
+ if (undefined === value)
584
+ return true;
585
+ return "string" === typeof value || $guard(_exceptionable, {
586
+ path: _path + $join(key),
587
+ expected: "string",
588
+ value: value
589
+ }, errorFactory);
590
+ });
591
+ const $ao4 = (input, _path, _exceptionable = true) => true;
374
592
  return ("object" === typeof input && null !== input || $guard(true, {
375
593
  path: _path + "",
376
594
  expected: "File",
@@ -384,23 +602,51 @@ export const assertGuardFile = (input, errorFactory) => {
384
602
  };
385
603
  export const stringifyFile = input => {
386
604
  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);
387
- const $io2 = input => "string" === typeof input.message;
605
+ const $io2 = input => "string" === typeof input.message && (undefined === input.type || "string" === typeof input.type) && (undefined === input.code || "string" === typeof input.code) && (undefined === input.exitCode || "number" === typeof input.exitCode) && (undefined === input.signalCode || "number" === typeof input.signalCode) && (undefined === input.statusCode || "number" === typeof input.statusCode) && (undefined === input.headers || "object" === typeof input.headers && null !== input.headers && false === Array.isArray(input.headers) && $io3(input.headers)) && (undefined === input.data || "object" === typeof input.data && null !== input.data && false === Array.isArray(input.data) && $io4(input.data)) && (null === input.cause || undefined === input.cause || "object" === typeof input.cause && null !== input.cause && $io2(input.cause)) && (null === input.errors || undefined === input.errors || Array.isArray(input.errors) && input.errors.every(elem => "object" === typeof elem && null !== elem && $io2(elem)));
606
+ const $io3 = input => Object.keys(input).every(key => {
607
+ const value = input[key];
608
+ if (undefined === value)
609
+ return true;
610
+ return "string" === typeof value;
611
+ });
612
+ const $io4 = input => true;
388
613
  const $string = __typia.json.createStringify.string;
614
+ const $throws = __typia.json.createStringify.throws;
389
615
  const $tail = __typia.json.createStringify.tail;
390
- const $so0 = input => `{"id":${$string(input.id)},"size":${null !== input.size ? input.size : "null"},"seekable":${input.seekable},"deleted":${input.deleted},"refs":${`[${input.refs.map(elem => $so1(elem)).join(",")}]`},"tags":${`[${input.tags.map(elem => $string(elem)).join(",")}]`},"resumable":${$string(input.resumable)},"mimeType":${$string(input.mimeType)},"hash":${$string(input.hash)},"btime":${input.btime},"completed":${input.completed},"error":${null !== input.error ? `[${input.error.map(elem => `{"message":${$string(elem.message)}}`).join(",")}]` : "null"}}`;
616
+ const $so0 = input => `{"id":${$string(input.id)},"size":${null !== input.size ? input.size : "null"},"seekable":${input.seekable},"deleted":${input.deleted},"refs":${`[${input.refs.map(elem => $so1(elem)).join(",")}]`},"tags":${`[${input.tags.map(elem => $string(elem)).join(",")}]`},"resumable":${$string(input.resumable)},"mimeType":${$string(input.mimeType)},"hash":${$string(input.hash)},"btime":${input.btime},"completed":${input.completed},"error":${null !== input.error ? (() => {
617
+ if (Array.isArray(input.error))
618
+ return `[${input.error.map(elem => $so2(elem)).join(",")}]`;
619
+ if ("object" === typeof input.error && null !== input.error)
620
+ return $so2(input.error);
621
+ $throws({
622
+ expected: "(Array<NxtError> | NxtError | null)",
623
+ value: input.error
624
+ });
625
+ })() : "null"}}`;
391
626
  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}`}`)}}`;
627
+ const $so2 = input => `{${undefined === input.type ? "" : `"type":${undefined !== input.type ? $string(input.type) : undefined},`}${undefined === input.code ? "" : `"code":${undefined !== input.code ? $string(input.code) : undefined},`}${undefined === input.exitCode ? "" : `"exitCode":${undefined !== input.exitCode ? input.exitCode : undefined},`}${undefined === input.signalCode ? "" : `"signalCode":${undefined !== input.signalCode ? input.signalCode : undefined},`}${undefined === input.statusCode ? "" : `"statusCode":${undefined !== input.statusCode ? input.statusCode : undefined},`}${undefined === input.headers ? "" : `"headers":${undefined !== input.headers ? $so3(input.headers) : undefined},`}${undefined === input.data ? "" : `"data":${undefined !== input.data ? "{}" : undefined},`}${undefined === input.cause ? "" : `"cause":${undefined !== input.cause ? null !== input.cause ? $so2(input.cause) : "null" : undefined},`}${undefined === input.errors ? "" : `"errors":${undefined !== input.errors ? null !== input.errors ? `[${input.errors.map(elem => $so2(elem)).join(",")}]` : "null" : undefined},`}"message":${$string(input.message)}}`;
628
+ const $so3 = input => `{${Object.entries(input).map(([key, value]) => { if (undefined === value)
629
+ return ""; return `${JSON.stringify(key)}:${$string(value)}`; }).filter(str => "" !== str).join(",")}}`;
392
630
  return $so0(input);
393
631
  };
394
632
  export const assertStringifyFile = (input, errorFactory) => { const assert = (input, errorFactory) => {
395
633
  const __is = input => {
396
- 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 <= 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)));
634
+ 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 <= 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 && (undefined !== input.error && (null === input.error || (Array.isArray(input.error) && input.error.every(elem => "object" === typeof elem && null !== elem && $io2(elem)) || "object" === typeof input.error && null !== input.error && $io2(input.error))));
397
635
  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));
398
- const $io2 = input => "string" === typeof input.message;
636
+ const $io2 = input => "string" === typeof input.message && (undefined === input.type || "string" === typeof input.type) && (undefined === input.code || "string" === typeof input.code) && (undefined === input.exitCode || "number" === typeof input.exitCode && !Number.isNaN(input.exitCode)) && (undefined === input.signalCode || "number" === typeof input.signalCode && !Number.isNaN(input.signalCode)) && (undefined === input.statusCode || "number" === typeof input.statusCode && !Number.isNaN(input.statusCode)) && (undefined === input.headers || "object" === typeof input.headers && null !== input.headers && false === Array.isArray(input.headers) && $io3(input.headers)) && (undefined === input.data || "object" === typeof input.data && null !== input.data && false === Array.isArray(input.data) && $io4(input.data)) && (null === input.cause || undefined === input.cause || "object" === typeof input.cause && null !== input.cause && $io2(input.cause)) && (null === input.errors || undefined === input.errors || Array.isArray(input.errors) && input.errors.every(elem => "object" === typeof elem && null !== elem && $io2(elem)));
637
+ const $io3 = input => Object.keys(input).every(key => {
638
+ const value = input[key];
639
+ if (undefined === value)
640
+ return true;
641
+ return "string" === typeof value;
642
+ });
643
+ const $io4 = input => true;
399
644
  return "object" === typeof input && null !== input && $io0(input);
400
645
  };
401
646
  if (false === __is(input))
402
647
  ((input, _path, _exceptionable = true) => {
403
648
  const $guard = __typia.json.createAssertStringify.guard;
649
+ const $join = __typia.json.createAssertStringify.join;
404
650
  const $ao0 = (input, _path, _exceptionable = true) => ("string" === typeof input.id && (/^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.id) || $guard(_exceptionable, {
405
651
  path: _path + ".id",
406
652
  expected: "string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">",
@@ -489,23 +735,27 @@ export const assertStringifyFile = (input, errorFactory) => { const assert = (in
489
735
  path: _path + ".completed",
490
736
  expected: "boolean",
491
737
  value: input.completed
492
- }, errorFactory)) && (null === input.error || (Array.isArray(input.error) || $guard(_exceptionable, {
738
+ }, errorFactory)) && ((undefined !== input.error || $guard(_exceptionable, {
493
739
  path: _path + ".error",
494
- expected: "(Array<__type>.o1 | null)",
740
+ expected: "(Array<NxtError> | NxtError | null)",
495
741
  value: input.error
496
- }, errorFactory)) && input.error.every((elem, _index3) => ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
742
+ }, errorFactory)) && (null === input.error || (Array.isArray(input.error) && input.error.every((elem, _index3) => ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
497
743
  path: _path + ".error[" + _index3 + "]",
498
- expected: "__type.o1",
744
+ expected: "NxtError",
499
745
  value: elem
500
746
  }, errorFactory)) && $ao2(elem, _path + ".error[" + _index3 + "]", true && _exceptionable) || $guard(_exceptionable, {
501
747
  path: _path + ".error[" + _index3 + "]",
502
- expected: "__type.o1",
748
+ expected: "NxtError",
503
749
  value: elem
750
+ }, errorFactory)) || "object" === typeof input.error && null !== input.error && $ao2(input.error, _path + ".error", true && _exceptionable) || $guard(_exceptionable, {
751
+ path: _path + ".error",
752
+ expected: "(Array<NxtError> | NxtError | null)",
753
+ value: input.error
504
754
  }, errorFactory)) || $guard(_exceptionable, {
505
755
  path: _path + ".error",
506
- expected: "(Array<__type>.o1 | null)",
756
+ expected: "(Array<NxtError> | NxtError | null)",
507
757
  value: input.error
508
- }, errorFactory));
758
+ }, errorFactory)));
509
759
  const $ao1 = (input, _path, _exceptionable = true) => (undefined === input.file || "string" === typeof input.file || $guard(_exceptionable, {
510
760
  path: _path + ".file",
511
761
  expected: "(string | undefined)",
@@ -523,11 +773,82 @@ export const assertStringifyFile = (input, errorFactory) => { const assert = (in
523
773
  expected: "(number | undefined)",
524
774
  value: input.end
525
775
  }, errorFactory));
526
- const $ao2 = (input, _path, _exceptionable = true) => "string" === typeof input.message || $guard(_exceptionable, {
776
+ const $ao2 = (input, _path, _exceptionable = true) => ("string" === typeof input.message || $guard(_exceptionable, {
527
777
  path: _path + ".message",
528
778
  expected: "string",
529
779
  value: input.message
530
- }, errorFactory);
780
+ }, errorFactory)) && (undefined === input.type || "string" === typeof input.type || $guard(_exceptionable, {
781
+ path: _path + ".type",
782
+ expected: "(string | undefined)",
783
+ value: input.type
784
+ }, errorFactory)) && (undefined === input.code || "string" === typeof input.code || $guard(_exceptionable, {
785
+ path: _path + ".code",
786
+ expected: "(string | undefined)",
787
+ value: input.code
788
+ }, errorFactory)) && (undefined === input.exitCode || "number" === typeof input.exitCode && !Number.isNaN(input.exitCode) || $guard(_exceptionable, {
789
+ path: _path + ".exitCode",
790
+ expected: "(number | undefined)",
791
+ value: input.exitCode
792
+ }, errorFactory)) && (undefined === input.signalCode || "number" === typeof input.signalCode && !Number.isNaN(input.signalCode) || $guard(_exceptionable, {
793
+ path: _path + ".signalCode",
794
+ expected: "(number | undefined)",
795
+ value: input.signalCode
796
+ }, errorFactory)) && (undefined === input.statusCode || "number" === typeof input.statusCode && !Number.isNaN(input.statusCode) || $guard(_exceptionable, {
797
+ path: _path + ".statusCode",
798
+ expected: "(number | undefined)",
799
+ value: input.statusCode
800
+ }, errorFactory)) && (undefined === input.headers || ("object" === typeof input.headers && null !== input.headers && false === Array.isArray(input.headers) || $guard(_exceptionable, {
801
+ path: _path + ".headers",
802
+ expected: "(Record<string, string> | undefined)",
803
+ value: input.headers
804
+ }, errorFactory)) && $ao3(input.headers, _path + ".headers", true && _exceptionable) || $guard(_exceptionable, {
805
+ path: _path + ".headers",
806
+ expected: "(Record<string, string> | undefined)",
807
+ value: input.headers
808
+ }, errorFactory)) && (undefined === input.data || ("object" === typeof input.data && null !== input.data && false === Array.isArray(input.data) || $guard(_exceptionable, {
809
+ path: _path + ".data",
810
+ expected: "(object | undefined)",
811
+ value: input.data
812
+ }, errorFactory)) && $ao4(input.data, _path + ".data", true && _exceptionable) || $guard(_exceptionable, {
813
+ path: _path + ".data",
814
+ expected: "(object | undefined)",
815
+ value: input.data
816
+ }, errorFactory)) && (null === input.cause || undefined === input.cause || ("object" === typeof input.cause && null !== input.cause || $guard(_exceptionable, {
817
+ path: _path + ".cause",
818
+ expected: "(NxtError | null | undefined)",
819
+ value: input.cause
820
+ }, errorFactory)) && $ao2(input.cause, _path + ".cause", true && _exceptionable) || $guard(_exceptionable, {
821
+ path: _path + ".cause",
822
+ expected: "(NxtError | null | undefined)",
823
+ value: input.cause
824
+ }, errorFactory)) && (null === input.errors || undefined === input.errors || (Array.isArray(input.errors) || $guard(_exceptionable, {
825
+ path: _path + ".errors",
826
+ expected: "(Array<NxtError> | null | undefined)",
827
+ value: input.errors
828
+ }, errorFactory)) && input.errors.every((elem, _index4) => ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
829
+ path: _path + ".errors[" + _index4 + "]",
830
+ expected: "NxtError",
831
+ value: elem
832
+ }, errorFactory)) && $ao2(elem, _path + ".errors[" + _index4 + "]", true && _exceptionable) || $guard(_exceptionable, {
833
+ path: _path + ".errors[" + _index4 + "]",
834
+ expected: "NxtError",
835
+ value: elem
836
+ }, errorFactory)) || $guard(_exceptionable, {
837
+ path: _path + ".errors",
838
+ expected: "(Array<NxtError> | null | undefined)",
839
+ value: input.errors
840
+ }, errorFactory));
841
+ const $ao3 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every(key => {
842
+ const value = input[key];
843
+ if (undefined === value)
844
+ return true;
845
+ return "string" === typeof value || $guard(_exceptionable, {
846
+ path: _path + $join(key),
847
+ expected: "string",
848
+ value: value
849
+ }, errorFactory);
850
+ });
851
+ const $ao4 = (input, _path, _exceptionable = true) => true;
531
852
  return ("object" === typeof input && null !== input || $guard(true, {
532
853
  path: _path + "",
533
854
  expected: "File",
@@ -541,29 +862,64 @@ export const assertStringifyFile = (input, errorFactory) => { const assert = (in
541
862
  return input;
542
863
  }; const stringify = input => {
543
864
  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);
544
- const $io2 = input => "string" === typeof input.message;
865
+ const $io2 = input => "string" === typeof input.message && (undefined === input.type || "string" === typeof input.type) && (undefined === input.code || "string" === typeof input.code) && (undefined === input.exitCode || "number" === typeof input.exitCode) && (undefined === input.signalCode || "number" === typeof input.signalCode) && (undefined === input.statusCode || "number" === typeof input.statusCode) && (undefined === input.headers || "object" === typeof input.headers && null !== input.headers && false === Array.isArray(input.headers) && $io3(input.headers)) && (undefined === input.data || "object" === typeof input.data && null !== input.data && false === Array.isArray(input.data) && $io4(input.data)) && (null === input.cause || undefined === input.cause || "object" === typeof input.cause && null !== input.cause && $io2(input.cause)) && (null === input.errors || undefined === input.errors || Array.isArray(input.errors) && input.errors.every(elem => "object" === typeof elem && null !== elem && $io2(elem)));
866
+ const $io3 = input => Object.keys(input).every(key => {
867
+ const value = input[key];
868
+ if (undefined === value)
869
+ return true;
870
+ return "string" === typeof value;
871
+ });
872
+ const $io4 = input => true;
545
873
  const $string = __typia.json.createAssertStringify.string;
874
+ const $throws = __typia.json.createAssertStringify.throws;
546
875
  const $tail = __typia.json.createAssertStringify.tail;
547
- const $so0 = input => `{"id":${$string(input.id)},"size":${null !== input.size ? input.size : "null"},"seekable":${input.seekable},"deleted":${input.deleted},"refs":${`[${input.refs.map(elem => $so1(elem)).join(",")}]`},"tags":${`[${input.tags.map(elem => $string(elem)).join(",")}]`},"resumable":${$string(input.resumable)},"mimeType":${$string(input.mimeType)},"hash":${$string(input.hash)},"btime":${input.btime},"completed":${input.completed},"error":${null !== input.error ? `[${input.error.map(elem => `{"message":${$string(elem.message)}}`).join(",")}]` : "null"}}`;
876
+ const $so0 = input => `{"id":${$string(input.id)},"size":${null !== input.size ? input.size : "null"},"seekable":${input.seekable},"deleted":${input.deleted},"refs":${`[${input.refs.map(elem => $so1(elem)).join(",")}]`},"tags":${`[${input.tags.map(elem => $string(elem)).join(",")}]`},"resumable":${$string(input.resumable)},"mimeType":${$string(input.mimeType)},"hash":${$string(input.hash)},"btime":${input.btime},"completed":${input.completed},"error":${null !== input.error ? (() => {
877
+ if (Array.isArray(input.error))
878
+ return `[${input.error.map(elem => $so2(elem)).join(",")}]`;
879
+ if ("object" === typeof input.error && null !== input.error)
880
+ return $so2(input.error);
881
+ $throws({
882
+ expected: "(Array<NxtError> | NxtError | null)",
883
+ value: input.error
884
+ });
885
+ })() : "null"}}`;
548
886
  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}`}`)}}`;
887
+ const $so2 = input => `{${undefined === input.type ? "" : `"type":${undefined !== input.type ? $string(input.type) : undefined},`}${undefined === input.code ? "" : `"code":${undefined !== input.code ? $string(input.code) : undefined},`}${undefined === input.exitCode ? "" : `"exitCode":${undefined !== input.exitCode ? input.exitCode : undefined},`}${undefined === input.signalCode ? "" : `"signalCode":${undefined !== input.signalCode ? input.signalCode : undefined},`}${undefined === input.statusCode ? "" : `"statusCode":${undefined !== input.statusCode ? input.statusCode : undefined},`}${undefined === input.headers ? "" : `"headers":${undefined !== input.headers ? $so3(input.headers) : undefined},`}${undefined === input.data ? "" : `"data":${undefined !== input.data ? "{}" : undefined},`}${undefined === input.cause ? "" : `"cause":${undefined !== input.cause ? null !== input.cause ? $so2(input.cause) : "null" : undefined},`}${undefined === input.errors ? "" : `"errors":${undefined !== input.errors ? null !== input.errors ? `[${input.errors.map(elem => $so2(elem)).join(",")}]` : "null" : undefined},`}"message":${$string(input.message)}}`;
888
+ const $so3 = input => `{${Object.entries(input).map(([key, value]) => { if (undefined === value)
889
+ return ""; return `${JSON.stringify(key)}:${$string(value)}`; }).filter(str => "" !== str).join(",")}}`;
549
890
  return $so0(input);
550
891
  }; return stringify(assert(input, errorFactory)); };
551
892
  export const isFileStats = input => {
552
- 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)) && (null === input.size || "number" === typeof input.size && (0 <= input.size && (Math.floor(input.size) === input.size && 0 <= input.size && input.size <= 18446744073709552000))) && "boolean" === typeof input.seekable && "boolean" === typeof input.deleted && (Array.isArray(input.refs) && input.refs.every(elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && $io1(elem))) && (Array.isArray(input.tags) && input.tags.every(elem => "string" === typeof elem)) && "string" === typeof input.resumable && "string" === typeof input.mimeType && ("string" === typeof input.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)));
893
+ 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)) && (null === input.size || "number" === typeof input.size && (0 <= input.size && (Math.floor(input.size) === input.size && 0 <= input.size && input.size <= 18446744073709552000))) && "boolean" === typeof input.seekable && "boolean" === typeof input.deleted && (Array.isArray(input.refs) && input.refs.every(elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && $io1(elem))) && (Array.isArray(input.tags) && input.tags.every(elem => "string" === typeof elem)) && "string" === typeof input.resumable && "string" === typeof input.mimeType && ("string" === typeof input.hash && /^([A-Fa-f0-9]{32})?$/.test(input.hash)) && ("number" === typeof input.btime && (0 <= input.btime && (Math.floor(input.btime) === input.btime && 0 <= input.btime && input.btime <= 18446744073709552000))) && "boolean" === typeof input.completed && (undefined !== input.error && (null === input.error || (Array.isArray(input.error) && input.error.every(elem => "object" === typeof elem && null !== elem && $io2(elem)) || "object" === typeof input.error && null !== input.error && $io2(input.error))));
553
894
  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);
554
- const $io2 = input => "string" === typeof input.message;
895
+ const $io2 = input => "string" === typeof input.message && (undefined === input.type || "string" === typeof input.type) && (undefined === input.code || "string" === typeof input.code) && (undefined === input.exitCode || "number" === typeof input.exitCode) && (undefined === input.signalCode || "number" === typeof input.signalCode) && (undefined === input.statusCode || "number" === typeof input.statusCode) && (undefined === input.headers || "object" === typeof input.headers && null !== input.headers && false === Array.isArray(input.headers) && $io3(input.headers)) && (undefined === input.data || "object" === typeof input.data && null !== input.data && false === Array.isArray(input.data) && $io4(input.data)) && (null === input.cause || undefined === input.cause || "object" === typeof input.cause && null !== input.cause && $io2(input.cause)) && (null === input.errors || undefined === input.errors || Array.isArray(input.errors) && input.errors.every(elem => "object" === typeof elem && null !== elem && $io2(elem)));
896
+ const $io3 = input => Object.keys(input).every(key => {
897
+ const value = input[key];
898
+ if (undefined === value)
899
+ return true;
900
+ return "string" === typeof value;
901
+ });
902
+ const $io4 = input => true;
555
903
  return "object" === typeof input && null !== input && $io0(input);
556
904
  };
557
905
  export const assertFileStats = (input, errorFactory) => {
558
906
  const __is = input => {
559
- 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)) && (null === input.size || "number" === typeof input.size && (0 <= input.size && (Math.floor(input.size) === input.size && 0 <= input.size && input.size <= 18446744073709552000))) && "boolean" === typeof input.seekable && "boolean" === typeof input.deleted && (Array.isArray(input.refs) && input.refs.every(elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && $io1(elem))) && (Array.isArray(input.tags) && input.tags.every(elem => "string" === typeof elem)) && "string" === typeof input.resumable && "string" === typeof input.mimeType && ("string" === typeof input.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)));
907
+ 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)) && (null === input.size || "number" === typeof input.size && (0 <= input.size && (Math.floor(input.size) === input.size && 0 <= input.size && input.size <= 18446744073709552000))) && "boolean" === typeof input.seekable && "boolean" === typeof input.deleted && (Array.isArray(input.refs) && input.refs.every(elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && $io1(elem))) && (Array.isArray(input.tags) && input.tags.every(elem => "string" === typeof elem)) && "string" === typeof input.resumable && "string" === typeof input.mimeType && ("string" === typeof input.hash && /^([A-Fa-f0-9]{32})?$/.test(input.hash)) && ("number" === typeof input.btime && (0 <= input.btime && (Math.floor(input.btime) === input.btime && 0 <= input.btime && input.btime <= 18446744073709552000))) && "boolean" === typeof input.completed && (undefined !== input.error && (null === input.error || (Array.isArray(input.error) && input.error.every(elem => "object" === typeof elem && null !== elem && $io2(elem)) || "object" === typeof input.error && null !== input.error && $io2(input.error))));
560
908
  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);
561
- const $io2 = input => "string" === typeof input.message;
909
+ const $io2 = input => "string" === typeof input.message && (undefined === input.type || "string" === typeof input.type) && (undefined === input.code || "string" === typeof input.code) && (undefined === input.exitCode || "number" === typeof input.exitCode) && (undefined === input.signalCode || "number" === typeof input.signalCode) && (undefined === input.statusCode || "number" === typeof input.statusCode) && (undefined === input.headers || "object" === typeof input.headers && null !== input.headers && false === Array.isArray(input.headers) && $io3(input.headers)) && (undefined === input.data || "object" === typeof input.data && null !== input.data && false === Array.isArray(input.data) && $io4(input.data)) && (null === input.cause || undefined === input.cause || "object" === typeof input.cause && null !== input.cause && $io2(input.cause)) && (null === input.errors || undefined === input.errors || Array.isArray(input.errors) && input.errors.every(elem => "object" === typeof elem && null !== elem && $io2(elem)));
910
+ const $io3 = input => Object.keys(input).every(key => {
911
+ const value = input[key];
912
+ if (undefined === value)
913
+ return true;
914
+ return "string" === typeof value;
915
+ });
916
+ const $io4 = input => true;
562
917
  return "object" === typeof input && null !== input && $io0(input);
563
918
  };
564
919
  if (false === __is(input))
565
920
  ((input, _path, _exceptionable = true) => {
566
921
  const $guard = __typia.createAssert.guard;
922
+ const $join = __typia.createAssert.join;
567
923
  const $ao0 = (input, _path, _exceptionable = true) => (null === input.position || "number" === typeof input.position && (0 <= input.position || $guard(_exceptionable, {
568
924
  path: _path + ".position",
569
925
  expected: "number & Minimum<0>",
@@ -692,23 +1048,27 @@ export const assertFileStats = (input, errorFactory) => {
692
1048
  path: _path + ".completed",
693
1049
  expected: "boolean",
694
1050
  value: input.completed
695
- }, errorFactory)) && (null === input.error || (Array.isArray(input.error) || $guard(_exceptionable, {
1051
+ }, errorFactory)) && ((undefined !== input.error || $guard(_exceptionable, {
696
1052
  path: _path + ".error",
697
- expected: "(Array<__type>.o1 | null)",
1053
+ expected: "(Array<NxtError> | NxtError | null)",
698
1054
  value: input.error
699
- }, errorFactory)) && input.error.every((elem, _index5) => ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
1055
+ }, errorFactory)) && (null === input.error || (Array.isArray(input.error) && input.error.every((elem, _index5) => ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
700
1056
  path: _path + ".error[" + _index5 + "]",
701
- expected: "__type.o1",
1057
+ expected: "NxtError",
702
1058
  value: elem
703
1059
  }, errorFactory)) && $ao2(elem, _path + ".error[" + _index5 + "]", true && _exceptionable) || $guard(_exceptionable, {
704
1060
  path: _path + ".error[" + _index5 + "]",
705
- expected: "__type.o1",
1061
+ expected: "NxtError",
706
1062
  value: elem
1063
+ }, errorFactory)) || "object" === typeof input.error && null !== input.error && $ao2(input.error, _path + ".error", true && _exceptionable) || $guard(_exceptionable, {
1064
+ path: _path + ".error",
1065
+ expected: "(Array<NxtError> | NxtError | null)",
1066
+ value: input.error
707
1067
  }, errorFactory)) || $guard(_exceptionable, {
708
1068
  path: _path + ".error",
709
- expected: "(Array<__type>.o1 | null)",
1069
+ expected: "(Array<NxtError> | NxtError | null)",
710
1070
  value: input.error
711
- }, errorFactory));
1071
+ }, errorFactory)));
712
1072
  const $ao1 = (input, _path, _exceptionable = true) => (undefined === input.file || "string" === typeof input.file || $guard(_exceptionable, {
713
1073
  path: _path + ".file",
714
1074
  expected: "(string | undefined)",
@@ -726,11 +1086,82 @@ export const assertFileStats = (input, errorFactory) => {
726
1086
  expected: "(number | undefined)",
727
1087
  value: input.end
728
1088
  }, errorFactory));
729
- const $ao2 = (input, _path, _exceptionable = true) => "string" === typeof input.message || $guard(_exceptionable, {
1089
+ const $ao2 = (input, _path, _exceptionable = true) => ("string" === typeof input.message || $guard(_exceptionable, {
730
1090
  path: _path + ".message",
731
1091
  expected: "string",
732
1092
  value: input.message
733
- }, errorFactory);
1093
+ }, errorFactory)) && (undefined === input.type || "string" === typeof input.type || $guard(_exceptionable, {
1094
+ path: _path + ".type",
1095
+ expected: "(string | undefined)",
1096
+ value: input.type
1097
+ }, errorFactory)) && (undefined === input.code || "string" === typeof input.code || $guard(_exceptionable, {
1098
+ path: _path + ".code",
1099
+ expected: "(string | undefined)",
1100
+ value: input.code
1101
+ }, errorFactory)) && (undefined === input.exitCode || "number" === typeof input.exitCode || $guard(_exceptionable, {
1102
+ path: _path + ".exitCode",
1103
+ expected: "(number | undefined)",
1104
+ value: input.exitCode
1105
+ }, errorFactory)) && (undefined === input.signalCode || "number" === typeof input.signalCode || $guard(_exceptionable, {
1106
+ path: _path + ".signalCode",
1107
+ expected: "(number | undefined)",
1108
+ value: input.signalCode
1109
+ }, errorFactory)) && (undefined === input.statusCode || "number" === typeof input.statusCode || $guard(_exceptionable, {
1110
+ path: _path + ".statusCode",
1111
+ expected: "(number | undefined)",
1112
+ value: input.statusCode
1113
+ }, errorFactory)) && (undefined === input.headers || ("object" === typeof input.headers && null !== input.headers && false === Array.isArray(input.headers) || $guard(_exceptionable, {
1114
+ path: _path + ".headers",
1115
+ expected: "(Record<string, string> | undefined)",
1116
+ value: input.headers
1117
+ }, errorFactory)) && $ao3(input.headers, _path + ".headers", true && _exceptionable) || $guard(_exceptionable, {
1118
+ path: _path + ".headers",
1119
+ expected: "(Record<string, string> | undefined)",
1120
+ value: input.headers
1121
+ }, errorFactory)) && (undefined === input.data || ("object" === typeof input.data && null !== input.data && false === Array.isArray(input.data) || $guard(_exceptionable, {
1122
+ path: _path + ".data",
1123
+ expected: "(object | undefined)",
1124
+ value: input.data
1125
+ }, errorFactory)) && $ao4(input.data, _path + ".data", true && _exceptionable) || $guard(_exceptionable, {
1126
+ path: _path + ".data",
1127
+ expected: "(object | undefined)",
1128
+ value: input.data
1129
+ }, errorFactory)) && (null === input.cause || undefined === input.cause || ("object" === typeof input.cause && null !== input.cause || $guard(_exceptionable, {
1130
+ path: _path + ".cause",
1131
+ expected: "(NxtError | null | undefined)",
1132
+ value: input.cause
1133
+ }, errorFactory)) && $ao2(input.cause, _path + ".cause", true && _exceptionable) || $guard(_exceptionable, {
1134
+ path: _path + ".cause",
1135
+ expected: "(NxtError | null | undefined)",
1136
+ value: input.cause
1137
+ }, errorFactory)) && (null === input.errors || undefined === input.errors || (Array.isArray(input.errors) || $guard(_exceptionable, {
1138
+ path: _path + ".errors",
1139
+ expected: "(Array<NxtError> | null | undefined)",
1140
+ value: input.errors
1141
+ }, errorFactory)) && input.errors.every((elem, _index6) => ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
1142
+ path: _path + ".errors[" + _index6 + "]",
1143
+ expected: "NxtError",
1144
+ value: elem
1145
+ }, errorFactory)) && $ao2(elem, _path + ".errors[" + _index6 + "]", true && _exceptionable) || $guard(_exceptionable, {
1146
+ path: _path + ".errors[" + _index6 + "]",
1147
+ expected: "NxtError",
1148
+ value: elem
1149
+ }, errorFactory)) || $guard(_exceptionable, {
1150
+ path: _path + ".errors",
1151
+ expected: "(Array<NxtError> | null | undefined)",
1152
+ value: input.errors
1153
+ }, errorFactory));
1154
+ const $ao3 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every(key => {
1155
+ const value = input[key];
1156
+ if (undefined === value)
1157
+ return true;
1158
+ return "string" === typeof value || $guard(_exceptionable, {
1159
+ path: _path + $join(key),
1160
+ expected: "string",
1161
+ value: value
1162
+ }, errorFactory);
1163
+ });
1164
+ const $ao4 = (input, _path, _exceptionable = true) => true;
734
1165
  return ("object" === typeof input && null !== input || $guard(true, {
735
1166
  path: _path + "",
736
1167
  expected: "FileStats",
@@ -815,7 +1246,8 @@ export const randomFileStats = generator => {
815
1246
  completed: (generator?.boolean ?? $generator.boolean)(),
816
1247
  error: $pick([
817
1248
  () => null,
818
- () => (generator?.array ?? $generator.array)(() => $ro2(_recursive, _recursive ? 1 + _depth : _depth))
1249
+ () => (generator?.array ?? $generator.array)(() => $ro2(_recursive, _recursive ? 1 + _depth : _depth)),
1250
+ () => $ro2(_recursive, _recursive ? 1 + _depth : _depth)
819
1251
  ])()
820
1252
  });
821
1253
  const $ro1 = (_recursive = false, _depth = 0) => ({
@@ -836,21 +1268,73 @@ export const randomFileStats = generator => {
836
1268
  () => (generator?.customs ?? $generator.customs)?.number?.([]) ?? (generator?.number ?? $generator.number)(0, 100)
837
1269
  ])()
838
1270
  });
839
- const $ro2 = (_recursive = false, _depth = 0) => ({
840
- message: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
1271
+ const $ro2 = (_recursive = true, _depth = 0) => ({
1272
+ message: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
1273
+ type: $pick([
1274
+ () => undefined,
1275
+ () => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
1276
+ ])(),
1277
+ code: $pick([
1278
+ () => undefined,
1279
+ () => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
1280
+ ])(),
1281
+ exitCode: $pick([
1282
+ () => undefined,
1283
+ () => (generator?.customs ?? $generator.customs)?.number?.([]) ?? (generator?.number ?? $generator.number)(0, 100)
1284
+ ])(),
1285
+ signalCode: $pick([
1286
+ () => undefined,
1287
+ () => (generator?.customs ?? $generator.customs)?.number?.([]) ?? (generator?.number ?? $generator.number)(0, 100)
1288
+ ])(),
1289
+ statusCode: $pick([
1290
+ () => undefined,
1291
+ () => (generator?.customs ?? $generator.customs)?.number?.([]) ?? (generator?.number ?? $generator.number)(0, 100)
1292
+ ])(),
1293
+ headers: $pick([
1294
+ () => undefined,
1295
+ () => $ro3(true, _recursive ? 1 + _depth : _depth)
1296
+ ])(),
1297
+ data: $pick([
1298
+ () => undefined,
1299
+ () => $ro4(true, _recursive ? 1 + _depth : _depth)
1300
+ ])(),
1301
+ cause: $pick([
1302
+ () => undefined,
1303
+ () => null,
1304
+ () => $ro2(true, _recursive ? 1 + _depth : _depth)
1305
+ ])(),
1306
+ errors: $pick([
1307
+ () => undefined,
1308
+ () => null,
1309
+ () => _recursive && 5 < _depth ? [] : 5 >= _depth ? (generator?.array ?? $generator.array)(() => $ro2(true, _recursive ? 1 + _depth : _depth)) : []
1310
+ ])()
841
1311
  });
1312
+ const $ro3 = (_recursive = false, _depth = 0) => {
1313
+ const output = {};
1314
+ (generator?.array ?? $generator.array)(() => output[(generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()] = (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(), (generator?.integer ?? $generator.integer)(0, 3));
1315
+ return output;
1316
+ };
1317
+ const $ro4 = (_recursive = false, _depth = 0) => {};
842
1318
  return $ro0();
843
1319
  };
844
1320
  export const assertGuardFileStats = (input, errorFactory) => {
845
1321
  const __is = input => {
846
- 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)) && (null === input.size || "number" === typeof input.size && (0 <= input.size && (Math.floor(input.size) === input.size && 0 <= input.size && input.size <= 18446744073709552000))) && "boolean" === typeof input.seekable && "boolean" === typeof input.deleted && (Array.isArray(input.refs) && input.refs.every(elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && $io1(elem))) && (Array.isArray(input.tags) && input.tags.every(elem => "string" === typeof elem)) && "string" === typeof input.resumable && "string" === typeof input.mimeType && ("string" === typeof input.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)));
1322
+ 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)) && (null === input.size || "number" === typeof input.size && (0 <= input.size && (Math.floor(input.size) === input.size && 0 <= input.size && input.size <= 18446744073709552000))) && "boolean" === typeof input.seekable && "boolean" === typeof input.deleted && (Array.isArray(input.refs) && input.refs.every(elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && $io1(elem))) && (Array.isArray(input.tags) && input.tags.every(elem => "string" === typeof elem)) && "string" === typeof input.resumable && "string" === typeof input.mimeType && ("string" === typeof input.hash && /^([A-Fa-f0-9]{32})?$/.test(input.hash)) && ("number" === typeof input.btime && (0 <= input.btime && (Math.floor(input.btime) === input.btime && 0 <= input.btime && input.btime <= 18446744073709552000))) && "boolean" === typeof input.completed && (undefined !== input.error && (null === input.error || (Array.isArray(input.error) && input.error.every(elem => "object" === typeof elem && null !== elem && $io2(elem)) || "object" === typeof input.error && null !== input.error && $io2(input.error))));
847
1323
  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);
848
- const $io2 = input => "string" === typeof input.message;
1324
+ const $io2 = input => "string" === typeof input.message && (undefined === input.type || "string" === typeof input.type) && (undefined === input.code || "string" === typeof input.code) && (undefined === input.exitCode || "number" === typeof input.exitCode) && (undefined === input.signalCode || "number" === typeof input.signalCode) && (undefined === input.statusCode || "number" === typeof input.statusCode) && (undefined === input.headers || "object" === typeof input.headers && null !== input.headers && false === Array.isArray(input.headers) && $io3(input.headers)) && (undefined === input.data || "object" === typeof input.data && null !== input.data && false === Array.isArray(input.data) && $io4(input.data)) && (null === input.cause || undefined === input.cause || "object" === typeof input.cause && null !== input.cause && $io2(input.cause)) && (null === input.errors || undefined === input.errors || Array.isArray(input.errors) && input.errors.every(elem => "object" === typeof elem && null !== elem && $io2(elem)));
1325
+ const $io3 = input => Object.keys(input).every(key => {
1326
+ const value = input[key];
1327
+ if (undefined === value)
1328
+ return true;
1329
+ return "string" === typeof value;
1330
+ });
1331
+ const $io4 = input => true;
849
1332
  return "object" === typeof input && null !== input && $io0(input);
850
1333
  };
851
1334
  if (false === __is(input))
852
1335
  ((input, _path, _exceptionable = true) => {
853
1336
  const $guard = __typia.createAssertGuard.guard;
1337
+ const $join = __typia.createAssertGuard.join;
854
1338
  const $ao0 = (input, _path, _exceptionable = true) => (null === input.position || "number" === typeof input.position && (0 <= input.position || $guard(_exceptionable, {
855
1339
  path: _path + ".position",
856
1340
  expected: "number & Minimum<0>",
@@ -979,23 +1463,27 @@ export const assertGuardFileStats = (input, errorFactory) => {
979
1463
  path: _path + ".completed",
980
1464
  expected: "boolean",
981
1465
  value: input.completed
982
- }, errorFactory)) && (null === input.error || (Array.isArray(input.error) || $guard(_exceptionable, {
1466
+ }, errorFactory)) && ((undefined !== input.error || $guard(_exceptionable, {
983
1467
  path: _path + ".error",
984
- expected: "(Array<__type>.o1 | null)",
1468
+ expected: "(Array<NxtError> | NxtError | null)",
985
1469
  value: input.error
986
- }, errorFactory)) && input.error.every((elem, _index5) => ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
1470
+ }, errorFactory)) && (null === input.error || (Array.isArray(input.error) && input.error.every((elem, _index5) => ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
987
1471
  path: _path + ".error[" + _index5 + "]",
988
- expected: "__type.o1",
1472
+ expected: "NxtError",
989
1473
  value: elem
990
1474
  }, errorFactory)) && $ao2(elem, _path + ".error[" + _index5 + "]", true && _exceptionable) || $guard(_exceptionable, {
991
1475
  path: _path + ".error[" + _index5 + "]",
992
- expected: "__type.o1",
1476
+ expected: "NxtError",
993
1477
  value: elem
1478
+ }, errorFactory)) || "object" === typeof input.error && null !== input.error && $ao2(input.error, _path + ".error", true && _exceptionable) || $guard(_exceptionable, {
1479
+ path: _path + ".error",
1480
+ expected: "(Array<NxtError> | NxtError | null)",
1481
+ value: input.error
994
1482
  }, errorFactory)) || $guard(_exceptionable, {
995
1483
  path: _path + ".error",
996
- expected: "(Array<__type>.o1 | null)",
1484
+ expected: "(Array<NxtError> | NxtError | null)",
997
1485
  value: input.error
998
- }, errorFactory));
1486
+ }, errorFactory)));
999
1487
  const $ao1 = (input, _path, _exceptionable = true) => (undefined === input.file || "string" === typeof input.file || $guard(_exceptionable, {
1000
1488
  path: _path + ".file",
1001
1489
  expected: "(string | undefined)",
@@ -1013,11 +1501,82 @@ export const assertGuardFileStats = (input, errorFactory) => {
1013
1501
  expected: "(number | undefined)",
1014
1502
  value: input.end
1015
1503
  }, errorFactory));
1016
- const $ao2 = (input, _path, _exceptionable = true) => "string" === typeof input.message || $guard(_exceptionable, {
1504
+ const $ao2 = (input, _path, _exceptionable = true) => ("string" === typeof input.message || $guard(_exceptionable, {
1017
1505
  path: _path + ".message",
1018
1506
  expected: "string",
1019
1507
  value: input.message
1020
- }, errorFactory);
1508
+ }, errorFactory)) && (undefined === input.type || "string" === typeof input.type || $guard(_exceptionable, {
1509
+ path: _path + ".type",
1510
+ expected: "(string | undefined)",
1511
+ value: input.type
1512
+ }, errorFactory)) && (undefined === input.code || "string" === typeof input.code || $guard(_exceptionable, {
1513
+ path: _path + ".code",
1514
+ expected: "(string | undefined)",
1515
+ value: input.code
1516
+ }, errorFactory)) && (undefined === input.exitCode || "number" === typeof input.exitCode || $guard(_exceptionable, {
1517
+ path: _path + ".exitCode",
1518
+ expected: "(number | undefined)",
1519
+ value: input.exitCode
1520
+ }, errorFactory)) && (undefined === input.signalCode || "number" === typeof input.signalCode || $guard(_exceptionable, {
1521
+ path: _path + ".signalCode",
1522
+ expected: "(number | undefined)",
1523
+ value: input.signalCode
1524
+ }, errorFactory)) && (undefined === input.statusCode || "number" === typeof input.statusCode || $guard(_exceptionable, {
1525
+ path: _path + ".statusCode",
1526
+ expected: "(number | undefined)",
1527
+ value: input.statusCode
1528
+ }, errorFactory)) && (undefined === input.headers || ("object" === typeof input.headers && null !== input.headers && false === Array.isArray(input.headers) || $guard(_exceptionable, {
1529
+ path: _path + ".headers",
1530
+ expected: "(Record<string, string> | undefined)",
1531
+ value: input.headers
1532
+ }, errorFactory)) && $ao3(input.headers, _path + ".headers", true && _exceptionable) || $guard(_exceptionable, {
1533
+ path: _path + ".headers",
1534
+ expected: "(Record<string, string> | undefined)",
1535
+ value: input.headers
1536
+ }, errorFactory)) && (undefined === input.data || ("object" === typeof input.data && null !== input.data && false === Array.isArray(input.data) || $guard(_exceptionable, {
1537
+ path: _path + ".data",
1538
+ expected: "(object | undefined)",
1539
+ value: input.data
1540
+ }, errorFactory)) && $ao4(input.data, _path + ".data", true && _exceptionable) || $guard(_exceptionable, {
1541
+ path: _path + ".data",
1542
+ expected: "(object | undefined)",
1543
+ value: input.data
1544
+ }, errorFactory)) && (null === input.cause || undefined === input.cause || ("object" === typeof input.cause && null !== input.cause || $guard(_exceptionable, {
1545
+ path: _path + ".cause",
1546
+ expected: "(NxtError | null | undefined)",
1547
+ value: input.cause
1548
+ }, errorFactory)) && $ao2(input.cause, _path + ".cause", true && _exceptionable) || $guard(_exceptionable, {
1549
+ path: _path + ".cause",
1550
+ expected: "(NxtError | null | undefined)",
1551
+ value: input.cause
1552
+ }, errorFactory)) && (null === input.errors || undefined === input.errors || (Array.isArray(input.errors) || $guard(_exceptionable, {
1553
+ path: _path + ".errors",
1554
+ expected: "(Array<NxtError> | null | undefined)",
1555
+ value: input.errors
1556
+ }, errorFactory)) && input.errors.every((elem, _index6) => ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
1557
+ path: _path + ".errors[" + _index6 + "]",
1558
+ expected: "NxtError",
1559
+ value: elem
1560
+ }, errorFactory)) && $ao2(elem, _path + ".errors[" + _index6 + "]", true && _exceptionable) || $guard(_exceptionable, {
1561
+ path: _path + ".errors[" + _index6 + "]",
1562
+ expected: "NxtError",
1563
+ value: elem
1564
+ }, errorFactory)) || $guard(_exceptionable, {
1565
+ path: _path + ".errors",
1566
+ expected: "(Array<NxtError> | null | undefined)",
1567
+ value: input.errors
1568
+ }, errorFactory));
1569
+ const $ao3 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every(key => {
1570
+ const value = input[key];
1571
+ if (undefined === value)
1572
+ return true;
1573
+ return "string" === typeof value || $guard(_exceptionable, {
1574
+ path: _path + $join(key),
1575
+ expected: "string",
1576
+ value: value
1577
+ }, errorFactory);
1578
+ });
1579
+ const $ao4 = (input, _path, _exceptionable = true) => true;
1021
1580
  return ("object" === typeof input && null !== input || $guard(true, {
1022
1581
  path: _path + "",
1023
1582
  expected: "FileStats",
@@ -1031,23 +1590,51 @@ export const assertGuardFileStats = (input, errorFactory) => {
1031
1590
  };
1032
1591
  export const stringifyFileStats = input => {
1033
1592
  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);
1034
- const $io2 = input => "string" === typeof input.message;
1593
+ const $io2 = input => "string" === typeof input.message && (undefined === input.type || "string" === typeof input.type) && (undefined === input.code || "string" === typeof input.code) && (undefined === input.exitCode || "number" === typeof input.exitCode) && (undefined === input.signalCode || "number" === typeof input.signalCode) && (undefined === input.statusCode || "number" === typeof input.statusCode) && (undefined === input.headers || "object" === typeof input.headers && null !== input.headers && false === Array.isArray(input.headers) && $io3(input.headers)) && (undefined === input.data || "object" === typeof input.data && null !== input.data && false === Array.isArray(input.data) && $io4(input.data)) && (null === input.cause || undefined === input.cause || "object" === typeof input.cause && null !== input.cause && $io2(input.cause)) && (null === input.errors || undefined === input.errors || Array.isArray(input.errors) && input.errors.every(elem => "object" === typeof elem && null !== elem && $io2(elem)));
1594
+ const $io3 = input => Object.keys(input).every(key => {
1595
+ const value = input[key];
1596
+ if (undefined === value)
1597
+ return true;
1598
+ return "string" === typeof value;
1599
+ });
1600
+ const $io4 = input => true;
1035
1601
  const $string = __typia.json.createStringify.string;
1602
+ const $throws = __typia.json.createStringify.throws;
1036
1603
  const $tail = __typia.json.createStringify.tail;
1037
- 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":${null !== input.size ? input.size : "null"},"seekable":${input.seekable},"deleted":${input.deleted},"refs":${`[${input.refs.map(elem => $so1(elem)).join(",")}]`},"tags":${`[${input.tags.map(elem => $string(elem)).join(",")}]`},"resumable":${$string(input.resumable)},"mimeType":${$string(input.mimeType)},"hash":${$string(input.hash)},"btime":${input.btime},"completed":${input.completed},"error":${null !== input.error ? `[${input.error.map(elem => `{"message":${$string(elem.message)}}`).join(",")}]` : "null"}}`;
1604
+ 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":${null !== input.size ? input.size : "null"},"seekable":${input.seekable},"deleted":${input.deleted},"refs":${`[${input.refs.map(elem => $so1(elem)).join(",")}]`},"tags":${`[${input.tags.map(elem => $string(elem)).join(",")}]`},"resumable":${$string(input.resumable)},"mimeType":${$string(input.mimeType)},"hash":${$string(input.hash)},"btime":${input.btime},"completed":${input.completed},"error":${null !== input.error ? (() => {
1605
+ if (Array.isArray(input.error))
1606
+ return `[${input.error.map(elem => $so2(elem)).join(",")}]`;
1607
+ if ("object" === typeof input.error && null !== input.error)
1608
+ return $so2(input.error);
1609
+ $throws({
1610
+ expected: "(Array<NxtError> | NxtError | null)",
1611
+ value: input.error
1612
+ });
1613
+ })() : "null"}}`;
1038
1614
  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}`}`)}}`;
1615
+ const $so2 = input => `{${undefined === input.type ? "" : `"type":${undefined !== input.type ? $string(input.type) : undefined},`}${undefined === input.code ? "" : `"code":${undefined !== input.code ? $string(input.code) : undefined},`}${undefined === input.exitCode ? "" : `"exitCode":${undefined !== input.exitCode ? input.exitCode : undefined},`}${undefined === input.signalCode ? "" : `"signalCode":${undefined !== input.signalCode ? input.signalCode : undefined},`}${undefined === input.statusCode ? "" : `"statusCode":${undefined !== input.statusCode ? input.statusCode : undefined},`}${undefined === input.headers ? "" : `"headers":${undefined !== input.headers ? $so3(input.headers) : undefined},`}${undefined === input.data ? "" : `"data":${undefined !== input.data ? "{}" : undefined},`}${undefined === input.cause ? "" : `"cause":${undefined !== input.cause ? null !== input.cause ? $so2(input.cause) : "null" : undefined},`}${undefined === input.errors ? "" : `"errors":${undefined !== input.errors ? null !== input.errors ? `[${input.errors.map(elem => $so2(elem)).join(",")}]` : "null" : undefined},`}"message":${$string(input.message)}}`;
1616
+ const $so3 = input => `{${Object.entries(input).map(([key, value]) => { if (undefined === value)
1617
+ return ""; return `${JSON.stringify(key)}:${$string(value)}`; }).filter(str => "" !== str).join(",")}}`;
1039
1618
  return $so0(input);
1040
1619
  };
1041
1620
  export const assertStringifyFileStats = (input, errorFactory) => { const assert = (input, errorFactory) => {
1042
1621
  const __is = input => {
1043
- 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)) && (null === input.size || "number" === typeof input.size && (0 <= input.size && (Math.floor(input.size) === input.size && 0 <= input.size && input.size <= 18446744073709552000))) && "boolean" === typeof input.seekable && "boolean" === typeof input.deleted && (Array.isArray(input.refs) && input.refs.every(elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && $io1(elem))) && (Array.isArray(input.tags) && input.tags.every(elem => "string" === typeof elem)) && "string" === typeof input.resumable && "string" === typeof input.mimeType && ("string" === typeof input.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)));
1622
+ 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)) && (null === input.size || "number" === typeof input.size && (0 <= input.size && (Math.floor(input.size) === input.size && 0 <= input.size && input.size <= 18446744073709552000))) && "boolean" === typeof input.seekable && "boolean" === typeof input.deleted && (Array.isArray(input.refs) && input.refs.every(elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && $io1(elem))) && (Array.isArray(input.tags) && input.tags.every(elem => "string" === typeof elem)) && "string" === typeof input.resumable && "string" === typeof input.mimeType && ("string" === typeof input.hash && /^([A-Fa-f0-9]{32})?$/.test(input.hash)) && ("number" === typeof input.btime && (0 <= input.btime && (Math.floor(input.btime) === input.btime && 0 <= input.btime && input.btime <= 18446744073709552000))) && "boolean" === typeof input.completed && (undefined !== input.error && (null === input.error || (Array.isArray(input.error) && input.error.every(elem => "object" === typeof elem && null !== elem && $io2(elem)) || "object" === typeof input.error && null !== input.error && $io2(input.error))));
1044
1623
  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));
1045
- const $io2 = input => "string" === typeof input.message;
1624
+ const $io2 = input => "string" === typeof input.message && (undefined === input.type || "string" === typeof input.type) && (undefined === input.code || "string" === typeof input.code) && (undefined === input.exitCode || "number" === typeof input.exitCode && !Number.isNaN(input.exitCode)) && (undefined === input.signalCode || "number" === typeof input.signalCode && !Number.isNaN(input.signalCode)) && (undefined === input.statusCode || "number" === typeof input.statusCode && !Number.isNaN(input.statusCode)) && (undefined === input.headers || "object" === typeof input.headers && null !== input.headers && false === Array.isArray(input.headers) && $io3(input.headers)) && (undefined === input.data || "object" === typeof input.data && null !== input.data && false === Array.isArray(input.data) && $io4(input.data)) && (null === input.cause || undefined === input.cause || "object" === typeof input.cause && null !== input.cause && $io2(input.cause)) && (null === input.errors || undefined === input.errors || Array.isArray(input.errors) && input.errors.every(elem => "object" === typeof elem && null !== elem && $io2(elem)));
1625
+ const $io3 = input => Object.keys(input).every(key => {
1626
+ const value = input[key];
1627
+ if (undefined === value)
1628
+ return true;
1629
+ return "string" === typeof value;
1630
+ });
1631
+ const $io4 = input => true;
1046
1632
  return "object" === typeof input && null !== input && $io0(input);
1047
1633
  };
1048
1634
  if (false === __is(input))
1049
1635
  ((input, _path, _exceptionable = true) => {
1050
1636
  const $guard = __typia.json.createAssertStringify.guard;
1637
+ const $join = __typia.json.createAssertStringify.join;
1051
1638
  const $ao0 = (input, _path, _exceptionable = true) => (null === input.position || "number" === typeof input.position && (0 <= input.position || $guard(_exceptionable, {
1052
1639
  path: _path + ".position",
1053
1640
  expected: "number & Minimum<0>",
@@ -1176,23 +1763,27 @@ export const assertStringifyFileStats = (input, errorFactory) => { const assert
1176
1763
  path: _path + ".completed",
1177
1764
  expected: "boolean",
1178
1765
  value: input.completed
1179
- }, errorFactory)) && (null === input.error || (Array.isArray(input.error) || $guard(_exceptionable, {
1766
+ }, errorFactory)) && ((undefined !== input.error || $guard(_exceptionable, {
1180
1767
  path: _path + ".error",
1181
- expected: "(Array<__type>.o1 | null)",
1768
+ expected: "(Array<NxtError> | NxtError | null)",
1182
1769
  value: input.error
1183
- }, errorFactory)) && input.error.every((elem, _index5) => ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
1770
+ }, errorFactory)) && (null === input.error || (Array.isArray(input.error) && input.error.every((elem, _index5) => ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
1184
1771
  path: _path + ".error[" + _index5 + "]",
1185
- expected: "__type.o1",
1772
+ expected: "NxtError",
1186
1773
  value: elem
1187
1774
  }, errorFactory)) && $ao2(elem, _path + ".error[" + _index5 + "]", true && _exceptionable) || $guard(_exceptionable, {
1188
1775
  path: _path + ".error[" + _index5 + "]",
1189
- expected: "__type.o1",
1776
+ expected: "NxtError",
1190
1777
  value: elem
1778
+ }, errorFactory)) || "object" === typeof input.error && null !== input.error && $ao2(input.error, _path + ".error", true && _exceptionable) || $guard(_exceptionable, {
1779
+ path: _path + ".error",
1780
+ expected: "(Array<NxtError> | NxtError | null)",
1781
+ value: input.error
1191
1782
  }, errorFactory)) || $guard(_exceptionable, {
1192
1783
  path: _path + ".error",
1193
- expected: "(Array<__type>.o1 | null)",
1784
+ expected: "(Array<NxtError> | NxtError | null)",
1194
1785
  value: input.error
1195
- }, errorFactory));
1786
+ }, errorFactory)));
1196
1787
  const $ao1 = (input, _path, _exceptionable = true) => (undefined === input.file || "string" === typeof input.file || $guard(_exceptionable, {
1197
1788
  path: _path + ".file",
1198
1789
  expected: "(string | undefined)",
@@ -1210,11 +1801,82 @@ export const assertStringifyFileStats = (input, errorFactory) => { const assert
1210
1801
  expected: "(number | undefined)",
1211
1802
  value: input.end
1212
1803
  }, errorFactory));
1213
- const $ao2 = (input, _path, _exceptionable = true) => "string" === typeof input.message || $guard(_exceptionable, {
1804
+ const $ao2 = (input, _path, _exceptionable = true) => ("string" === typeof input.message || $guard(_exceptionable, {
1214
1805
  path: _path + ".message",
1215
1806
  expected: "string",
1216
1807
  value: input.message
1217
- }, errorFactory);
1808
+ }, errorFactory)) && (undefined === input.type || "string" === typeof input.type || $guard(_exceptionable, {
1809
+ path: _path + ".type",
1810
+ expected: "(string | undefined)",
1811
+ value: input.type
1812
+ }, errorFactory)) && (undefined === input.code || "string" === typeof input.code || $guard(_exceptionable, {
1813
+ path: _path + ".code",
1814
+ expected: "(string | undefined)",
1815
+ value: input.code
1816
+ }, errorFactory)) && (undefined === input.exitCode || "number" === typeof input.exitCode && !Number.isNaN(input.exitCode) || $guard(_exceptionable, {
1817
+ path: _path + ".exitCode",
1818
+ expected: "(number | undefined)",
1819
+ value: input.exitCode
1820
+ }, errorFactory)) && (undefined === input.signalCode || "number" === typeof input.signalCode && !Number.isNaN(input.signalCode) || $guard(_exceptionable, {
1821
+ path: _path + ".signalCode",
1822
+ expected: "(number | undefined)",
1823
+ value: input.signalCode
1824
+ }, errorFactory)) && (undefined === input.statusCode || "number" === typeof input.statusCode && !Number.isNaN(input.statusCode) || $guard(_exceptionable, {
1825
+ path: _path + ".statusCode",
1826
+ expected: "(number | undefined)",
1827
+ value: input.statusCode
1828
+ }, errorFactory)) && (undefined === input.headers || ("object" === typeof input.headers && null !== input.headers && false === Array.isArray(input.headers) || $guard(_exceptionable, {
1829
+ path: _path + ".headers",
1830
+ expected: "(Record<string, string> | undefined)",
1831
+ value: input.headers
1832
+ }, errorFactory)) && $ao3(input.headers, _path + ".headers", true && _exceptionable) || $guard(_exceptionable, {
1833
+ path: _path + ".headers",
1834
+ expected: "(Record<string, string> | undefined)",
1835
+ value: input.headers
1836
+ }, errorFactory)) && (undefined === input.data || ("object" === typeof input.data && null !== input.data && false === Array.isArray(input.data) || $guard(_exceptionable, {
1837
+ path: _path + ".data",
1838
+ expected: "(object | undefined)",
1839
+ value: input.data
1840
+ }, errorFactory)) && $ao4(input.data, _path + ".data", true && _exceptionable) || $guard(_exceptionable, {
1841
+ path: _path + ".data",
1842
+ expected: "(object | undefined)",
1843
+ value: input.data
1844
+ }, errorFactory)) && (null === input.cause || undefined === input.cause || ("object" === typeof input.cause && null !== input.cause || $guard(_exceptionable, {
1845
+ path: _path + ".cause",
1846
+ expected: "(NxtError | null | undefined)",
1847
+ value: input.cause
1848
+ }, errorFactory)) && $ao2(input.cause, _path + ".cause", true && _exceptionable) || $guard(_exceptionable, {
1849
+ path: _path + ".cause",
1850
+ expected: "(NxtError | null | undefined)",
1851
+ value: input.cause
1852
+ }, errorFactory)) && (null === input.errors || undefined === input.errors || (Array.isArray(input.errors) || $guard(_exceptionable, {
1853
+ path: _path + ".errors",
1854
+ expected: "(Array<NxtError> | null | undefined)",
1855
+ value: input.errors
1856
+ }, errorFactory)) && input.errors.every((elem, _index6) => ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
1857
+ path: _path + ".errors[" + _index6 + "]",
1858
+ expected: "NxtError",
1859
+ value: elem
1860
+ }, errorFactory)) && $ao2(elem, _path + ".errors[" + _index6 + "]", true && _exceptionable) || $guard(_exceptionable, {
1861
+ path: _path + ".errors[" + _index6 + "]",
1862
+ expected: "NxtError",
1863
+ value: elem
1864
+ }, errorFactory)) || $guard(_exceptionable, {
1865
+ path: _path + ".errors",
1866
+ expected: "(Array<NxtError> | null | undefined)",
1867
+ value: input.errors
1868
+ }, errorFactory));
1869
+ const $ao3 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every(key => {
1870
+ const value = input[key];
1871
+ if (undefined === value)
1872
+ return true;
1873
+ return "string" === typeof value || $guard(_exceptionable, {
1874
+ path: _path + $join(key),
1875
+ expected: "string",
1876
+ value: value
1877
+ }, errorFactory);
1878
+ });
1879
+ const $ao4 = (input, _path, _exceptionable = true) => true;
1218
1880
  return ("object" === typeof input && null !== input || $guard(true, {
1219
1881
  path: _path + "",
1220
1882
  expected: "FileStats",
@@ -1228,10 +1890,30 @@ export const assertStringifyFileStats = (input, errorFactory) => { const assert
1228
1890
  return input;
1229
1891
  }; const stringify = input => {
1230
1892
  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);
1231
- const $io2 = input => "string" === typeof input.message;
1893
+ const $io2 = input => "string" === typeof input.message && (undefined === input.type || "string" === typeof input.type) && (undefined === input.code || "string" === typeof input.code) && (undefined === input.exitCode || "number" === typeof input.exitCode) && (undefined === input.signalCode || "number" === typeof input.signalCode) && (undefined === input.statusCode || "number" === typeof input.statusCode) && (undefined === input.headers || "object" === typeof input.headers && null !== input.headers && false === Array.isArray(input.headers) && $io3(input.headers)) && (undefined === input.data || "object" === typeof input.data && null !== input.data && false === Array.isArray(input.data) && $io4(input.data)) && (null === input.cause || undefined === input.cause || "object" === typeof input.cause && null !== input.cause && $io2(input.cause)) && (null === input.errors || undefined === input.errors || Array.isArray(input.errors) && input.errors.every(elem => "object" === typeof elem && null !== elem && $io2(elem)));
1894
+ const $io3 = input => Object.keys(input).every(key => {
1895
+ const value = input[key];
1896
+ if (undefined === value)
1897
+ return true;
1898
+ return "string" === typeof value;
1899
+ });
1900
+ const $io4 = input => true;
1232
1901
  const $string = __typia.json.createAssertStringify.string;
1902
+ const $throws = __typia.json.createAssertStringify.throws;
1233
1903
  const $tail = __typia.json.createAssertStringify.tail;
1234
- 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":${null !== input.size ? input.size : "null"},"seekable":${input.seekable},"deleted":${input.deleted},"refs":${`[${input.refs.map(elem => $so1(elem)).join(",")}]`},"tags":${`[${input.tags.map(elem => $string(elem)).join(",")}]`},"resumable":${$string(input.resumable)},"mimeType":${$string(input.mimeType)},"hash":${$string(input.hash)},"btime":${input.btime},"completed":${input.completed},"error":${null !== input.error ? `[${input.error.map(elem => `{"message":${$string(elem.message)}}`).join(",")}]` : "null"}}`;
1904
+ 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":${null !== input.size ? input.size : "null"},"seekable":${input.seekable},"deleted":${input.deleted},"refs":${`[${input.refs.map(elem => $so1(elem)).join(",")}]`},"tags":${`[${input.tags.map(elem => $string(elem)).join(",")}]`},"resumable":${$string(input.resumable)},"mimeType":${$string(input.mimeType)},"hash":${$string(input.hash)},"btime":${input.btime},"completed":${input.completed},"error":${null !== input.error ? (() => {
1905
+ if (Array.isArray(input.error))
1906
+ return `[${input.error.map(elem => $so2(elem)).join(",")}]`;
1907
+ if ("object" === typeof input.error && null !== input.error)
1908
+ return $so2(input.error);
1909
+ $throws({
1910
+ expected: "(Array<NxtError> | NxtError | null)",
1911
+ value: input.error
1912
+ });
1913
+ })() : "null"}}`;
1235
1914
  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}`}`)}}`;
1915
+ const $so2 = input => `{${undefined === input.type ? "" : `"type":${undefined !== input.type ? $string(input.type) : undefined},`}${undefined === input.code ? "" : `"code":${undefined !== input.code ? $string(input.code) : undefined},`}${undefined === input.exitCode ? "" : `"exitCode":${undefined !== input.exitCode ? input.exitCode : undefined},`}${undefined === input.signalCode ? "" : `"signalCode":${undefined !== input.signalCode ? input.signalCode : undefined},`}${undefined === input.statusCode ? "" : `"statusCode":${undefined !== input.statusCode ? input.statusCode : undefined},`}${undefined === input.headers ? "" : `"headers":${undefined !== input.headers ? $so3(input.headers) : undefined},`}${undefined === input.data ? "" : `"data":${undefined !== input.data ? "{}" : undefined},`}${undefined === input.cause ? "" : `"cause":${undefined !== input.cause ? null !== input.cause ? $so2(input.cause) : "null" : undefined},`}${undefined === input.errors ? "" : `"errors":${undefined !== input.errors ? null !== input.errors ? `[${input.errors.map(elem => $so2(elem)).join(",")}]` : "null" : undefined},`}"message":${$string(input.message)}}`;
1916
+ const $so3 = input => `{${Object.entries(input).map(([key, value]) => { if (undefined === value)
1917
+ return ""; return `${JSON.stringify(key)}:${$string(value)}`; }).filter(str => "" !== str).join(",")}}`;
1236
1918
  return $so0(input);
1237
1919
  }; return stringify(assert(input, errorFactory)); };