@nxtedition/types 1.6.4 → 1.6.7
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.
- package/dist/common/block.d.ts +3 -3
- package/dist/common/error.d.ts +2 -2
- package/dist/common/file.d.ts +7 -3
- package/dist/common/file.js +324 -60
- package/dist/common/index.d.ts +4 -4
- package/dist/common/location.d.ts +2 -2
- package/dist/common/lock.d.ts +2 -2
- package/dist/common/rule.d.ts +2 -2
- package/dist/common/settings.d.ts +147 -3
- package/dist/domains/asset.d.ts +6 -6
- package/dist/domains/connection.d.ts +6 -6
- package/dist/domains/contact.d.ts +2 -2
- package/dist/domains/event.d.ts +2 -2
- package/dist/domains/general.d.ts +8 -8
- package/dist/domains/media.d.ts +5 -5
- package/dist/domains/permission.d.ts +7 -7
- package/dist/domains/planning.d.ts +4 -4
- package/dist/domains/publish.d.ts +18 -18
- package/dist/domains/role.d.ts +2 -2
- package/dist/domains/script.d.ts +2 -2
- package/dist/domains/search.d.ts +2 -2
- package/dist/domains/settings.d.ts +2 -2
- package/dist/domains/template.d.ts +3 -3
- package/package.json +4 -4
package/dist/common/file.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
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 && (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))));
|
|
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 && (Array.isArray(input.ranges) && input.ranges.every(elem => Array.isArray(elem) && (elem.length === 2 && ("number" === typeof elem[0] && 0 <= elem[0]) && ("number" === typeof elem[1] && 0 <= elem[1])))) && ("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
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
6
|
const $io3 = input => Object.keys(input).every(key => {
|
|
@@ -14,7 +14,7 @@ export const isFile = input => {
|
|
|
14
14
|
};
|
|
15
15
|
export const assertFile = (input, errorFactory) => {
|
|
16
16
|
const __is = input => {
|
|
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))));
|
|
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 && (Array.isArray(input.ranges) && input.ranges.every(elem => Array.isArray(elem) && (elem.length === 2 && ("number" === typeof elem[0] && 0 <= elem[0]) && ("number" === typeof elem[1] && 0 <= elem[1])))) && ("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))));
|
|
18
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);
|
|
19
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
20
|
const $io3 = input => Object.keys(input).every(key => {
|
|
@@ -94,6 +94,42 @@ export const assertFile = (input, errorFactory) => {
|
|
|
94
94
|
path: _path + ".mimeType",
|
|
95
95
|
expected: "string",
|
|
96
96
|
value: input.mimeType
|
|
97
|
+
}, errorFactory)) && ((Array.isArray(input.ranges) || $guard(_exceptionable, {
|
|
98
|
+
path: _path + ".ranges",
|
|
99
|
+
expected: "Array<[start: number & Minimum<0>, end: number & Minimum<0>]>",
|
|
100
|
+
value: input.ranges
|
|
101
|
+
}, errorFactory)) && input.ranges.every((elem, _index3) => (Array.isArray(elem) || $guard(_exceptionable, {
|
|
102
|
+
path: _path + ".ranges[" + _index3 + "]",
|
|
103
|
+
expected: "[start: number & Minimum<0>, end: number & Minimum<0>]",
|
|
104
|
+
value: elem
|
|
105
|
+
}, errorFactory)) && ((elem.length === 2 || $guard(_exceptionable, {
|
|
106
|
+
path: _path + ".ranges[" + _index3 + "]",
|
|
107
|
+
expected: "[(number & Minimum<0>), (number & Minimum<0>)]",
|
|
108
|
+
value: elem
|
|
109
|
+
}, errorFactory)) && ("number" === typeof elem[0] && (0 <= elem[0] || $guard(_exceptionable, {
|
|
110
|
+
path: _path + ".ranges[" + _index3 + "][0]",
|
|
111
|
+
expected: "number & Minimum<0>",
|
|
112
|
+
value: elem[0]
|
|
113
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
|
114
|
+
path: _path + ".ranges[" + _index3 + "][0]",
|
|
115
|
+
expected: "(number & Minimum<0>)",
|
|
116
|
+
value: elem[0]
|
|
117
|
+
}, errorFactory)) && ("number" === typeof elem[1] && (0 <= elem[1] || $guard(_exceptionable, {
|
|
118
|
+
path: _path + ".ranges[" + _index3 + "][1]",
|
|
119
|
+
expected: "number & Minimum<0>",
|
|
120
|
+
value: elem[1]
|
|
121
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
|
122
|
+
path: _path + ".ranges[" + _index3 + "][1]",
|
|
123
|
+
expected: "(number & Minimum<0>)",
|
|
124
|
+
value: elem[1]
|
|
125
|
+
}, errorFactory))) || $guard(_exceptionable, {
|
|
126
|
+
path: _path + ".ranges[" + _index3 + "]",
|
|
127
|
+
expected: "[start: number & Minimum<0>, end: number & Minimum<0>]",
|
|
128
|
+
value: elem
|
|
129
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
|
130
|
+
path: _path + ".ranges",
|
|
131
|
+
expected: "Array<[start: number & Minimum<0>, end: number & Minimum<0>]>",
|
|
132
|
+
value: input.ranges
|
|
97
133
|
}, errorFactory)) && ("string" === typeof input.hash && (/^([A-Fa-f0-9]{32})?$/.test(input.hash) || $guard(_exceptionable, {
|
|
98
134
|
path: _path + ".hash",
|
|
99
135
|
expected: "string & Pattern<\"^([A-Fa-f0-9]{32})?$\">",
|
|
@@ -122,12 +158,12 @@ export const assertFile = (input, errorFactory) => {
|
|
|
122
158
|
path: _path + ".error",
|
|
123
159
|
expected: "(Array<NxtError> | NxtError | null)",
|
|
124
160
|
value: input.error
|
|
125
|
-
}, errorFactory)) && (null === input.error || (Array.isArray(input.error) && input.error.every((elem,
|
|
126
|
-
path: _path + ".error[" +
|
|
161
|
+
}, errorFactory)) && (null === input.error || (Array.isArray(input.error) && input.error.every((elem, _index4) => ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
|
|
162
|
+
path: _path + ".error[" + _index4 + "]",
|
|
127
163
|
expected: "NxtError",
|
|
128
164
|
value: elem
|
|
129
|
-
}, errorFactory)) && $ao2(elem, _path + ".error[" +
|
|
130
|
-
path: _path + ".error[" +
|
|
165
|
+
}, errorFactory)) && $ao2(elem, _path + ".error[" + _index4 + "]", true && _exceptionable) || $guard(_exceptionable, {
|
|
166
|
+
path: _path + ".error[" + _index4 + "]",
|
|
131
167
|
expected: "NxtError",
|
|
132
168
|
value: elem
|
|
133
169
|
}, errorFactory)) || "object" === typeof input.error && null !== input.error && $ao2(input.error, _path + ".error", true && _exceptionable) || $guard(_exceptionable, {
|
|
@@ -208,12 +244,12 @@ export const assertFile = (input, errorFactory) => {
|
|
|
208
244
|
path: _path + ".errors",
|
|
209
245
|
expected: "(Array<NxtError> | null | undefined)",
|
|
210
246
|
value: input.errors
|
|
211
|
-
}, errorFactory)) && input.errors.every((elem,
|
|
212
|
-
path: _path + ".errors[" +
|
|
247
|
+
}, errorFactory)) && input.errors.every((elem, _index5) => ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
|
|
248
|
+
path: _path + ".errors[" + _index5 + "]",
|
|
213
249
|
expected: "NxtError",
|
|
214
250
|
value: elem
|
|
215
|
-
}, errorFactory)) && $ao2(elem, _path + ".errors[" +
|
|
216
|
-
path: _path + ".errors[" +
|
|
251
|
+
}, errorFactory)) && $ao2(elem, _path + ".errors[" + _index5 + "]", true && _exceptionable) || $guard(_exceptionable, {
|
|
252
|
+
path: _path + ".errors[" + _index5 + "]",
|
|
217
253
|
expected: "NxtError",
|
|
218
254
|
value: elem
|
|
219
255
|
}, errorFactory)) || $guard(_exceptionable, {
|
|
@@ -276,6 +312,22 @@ export const randomFile = generator => {
|
|
|
276
312
|
tags: (generator?.array ?? $generator.array)(() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()),
|
|
277
313
|
resumable: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
|
|
278
314
|
mimeType: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
|
|
315
|
+
ranges: (generator?.array ?? $generator.array)(() => [
|
|
316
|
+
(generator?.customs ?? $generator.customs)?.number?.([
|
|
317
|
+
{
|
|
318
|
+
name: "Minimum<0>",
|
|
319
|
+
kind: "minimum",
|
|
320
|
+
value: 0
|
|
321
|
+
}
|
|
322
|
+
]) ?? (generator?.number ?? $generator.number)(0, 10),
|
|
323
|
+
(generator?.customs ?? $generator.customs)?.number?.([
|
|
324
|
+
{
|
|
325
|
+
name: "Minimum<0>",
|
|
326
|
+
kind: "minimum",
|
|
327
|
+
value: 0
|
|
328
|
+
}
|
|
329
|
+
]) ?? (generator?.number ?? $generator.number)(0, 10)
|
|
330
|
+
]),
|
|
279
331
|
hash: (generator?.customs ?? $generator.customs)?.string?.([
|
|
280
332
|
{
|
|
281
333
|
name: "Pattern<\"^([A-Fa-f0-9]{32})?$\">",
|
|
@@ -371,7 +423,7 @@ export const randomFile = generator => {
|
|
|
371
423
|
};
|
|
372
424
|
export const assertGuardFile = (input, errorFactory) => {
|
|
373
425
|
const __is = input => {
|
|
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))));
|
|
426
|
+
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 && (Array.isArray(input.ranges) && input.ranges.every(elem => Array.isArray(elem) && (elem.length === 2 && ("number" === typeof elem[0] && 0 <= elem[0]) && ("number" === typeof elem[1] && 0 <= elem[1])))) && ("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))));
|
|
375
427
|
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);
|
|
376
428
|
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
429
|
const $io3 = input => Object.keys(input).every(key => {
|
|
@@ -451,6 +503,42 @@ export const assertGuardFile = (input, errorFactory) => {
|
|
|
451
503
|
path: _path + ".mimeType",
|
|
452
504
|
expected: "string",
|
|
453
505
|
value: input.mimeType
|
|
506
|
+
}, errorFactory)) && ((Array.isArray(input.ranges) || $guard(_exceptionable, {
|
|
507
|
+
path: _path + ".ranges",
|
|
508
|
+
expected: "Array<[start: number & Minimum<0>, end: number & Minimum<0>]>",
|
|
509
|
+
value: input.ranges
|
|
510
|
+
}, errorFactory)) && input.ranges.every((elem, _index3) => (Array.isArray(elem) || $guard(_exceptionable, {
|
|
511
|
+
path: _path + ".ranges[" + _index3 + "]",
|
|
512
|
+
expected: "[start: number & Minimum<0>, end: number & Minimum<0>]",
|
|
513
|
+
value: elem
|
|
514
|
+
}, errorFactory)) && ((elem.length === 2 || $guard(_exceptionable, {
|
|
515
|
+
path: _path + ".ranges[" + _index3 + "]",
|
|
516
|
+
expected: "[(number & Minimum<0>), (number & Minimum<0>)]",
|
|
517
|
+
value: elem
|
|
518
|
+
}, errorFactory)) && ("number" === typeof elem[0] && (0 <= elem[0] || $guard(_exceptionable, {
|
|
519
|
+
path: _path + ".ranges[" + _index3 + "][0]",
|
|
520
|
+
expected: "number & Minimum<0>",
|
|
521
|
+
value: elem[0]
|
|
522
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
|
523
|
+
path: _path + ".ranges[" + _index3 + "][0]",
|
|
524
|
+
expected: "(number & Minimum<0>)",
|
|
525
|
+
value: elem[0]
|
|
526
|
+
}, errorFactory)) && ("number" === typeof elem[1] && (0 <= elem[1] || $guard(_exceptionable, {
|
|
527
|
+
path: _path + ".ranges[" + _index3 + "][1]",
|
|
528
|
+
expected: "number & Minimum<0>",
|
|
529
|
+
value: elem[1]
|
|
530
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
|
531
|
+
path: _path + ".ranges[" + _index3 + "][1]",
|
|
532
|
+
expected: "(number & Minimum<0>)",
|
|
533
|
+
value: elem[1]
|
|
534
|
+
}, errorFactory))) || $guard(_exceptionable, {
|
|
535
|
+
path: _path + ".ranges[" + _index3 + "]",
|
|
536
|
+
expected: "[start: number & Minimum<0>, end: number & Minimum<0>]",
|
|
537
|
+
value: elem
|
|
538
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
|
539
|
+
path: _path + ".ranges",
|
|
540
|
+
expected: "Array<[start: number & Minimum<0>, end: number & Minimum<0>]>",
|
|
541
|
+
value: input.ranges
|
|
454
542
|
}, errorFactory)) && ("string" === typeof input.hash && (/^([A-Fa-f0-9]{32})?$/.test(input.hash) || $guard(_exceptionable, {
|
|
455
543
|
path: _path + ".hash",
|
|
456
544
|
expected: "string & Pattern<\"^([A-Fa-f0-9]{32})?$\">",
|
|
@@ -479,12 +567,12 @@ export const assertGuardFile = (input, errorFactory) => {
|
|
|
479
567
|
path: _path + ".error",
|
|
480
568
|
expected: "(Array<NxtError> | NxtError | null)",
|
|
481
569
|
value: input.error
|
|
482
|
-
}, errorFactory)) && (null === input.error || (Array.isArray(input.error) && input.error.every((elem,
|
|
483
|
-
path: _path + ".error[" +
|
|
570
|
+
}, errorFactory)) && (null === input.error || (Array.isArray(input.error) && input.error.every((elem, _index4) => ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
|
|
571
|
+
path: _path + ".error[" + _index4 + "]",
|
|
484
572
|
expected: "NxtError",
|
|
485
573
|
value: elem
|
|
486
|
-
}, errorFactory)) && $ao2(elem, _path + ".error[" +
|
|
487
|
-
path: _path + ".error[" +
|
|
574
|
+
}, errorFactory)) && $ao2(elem, _path + ".error[" + _index4 + "]", true && _exceptionable) || $guard(_exceptionable, {
|
|
575
|
+
path: _path + ".error[" + _index4 + "]",
|
|
488
576
|
expected: "NxtError",
|
|
489
577
|
value: elem
|
|
490
578
|
}, errorFactory)) || "object" === typeof input.error && null !== input.error && $ao2(input.error, _path + ".error", true && _exceptionable) || $guard(_exceptionable, {
|
|
@@ -565,12 +653,12 @@ export const assertGuardFile = (input, errorFactory) => {
|
|
|
565
653
|
path: _path + ".errors",
|
|
566
654
|
expected: "(Array<NxtError> | null | undefined)",
|
|
567
655
|
value: input.errors
|
|
568
|
-
}, errorFactory)) && input.errors.every((elem,
|
|
569
|
-
path: _path + ".errors[" +
|
|
656
|
+
}, errorFactory)) && input.errors.every((elem, _index5) => ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
|
|
657
|
+
path: _path + ".errors[" + _index5 + "]",
|
|
570
658
|
expected: "NxtError",
|
|
571
659
|
value: elem
|
|
572
|
-
}, errorFactory)) && $ao2(elem, _path + ".errors[" +
|
|
573
|
-
path: _path + ".errors[" +
|
|
660
|
+
}, errorFactory)) && $ao2(elem, _path + ".errors[" + _index5 + "]", true && _exceptionable) || $guard(_exceptionable, {
|
|
661
|
+
path: _path + ".errors[" + _index5 + "]",
|
|
574
662
|
expected: "NxtError",
|
|
575
663
|
value: elem
|
|
576
664
|
}, errorFactory)) || $guard(_exceptionable, {
|
|
@@ -613,7 +701,7 @@ export const stringifyFile = input => {
|
|
|
613
701
|
const $string = __typia.json.createStringify.string;
|
|
614
702
|
const $throws = __typia.json.createStringify.throws;
|
|
615
703
|
const $tail = __typia.json.createStringify.tail;
|
|
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 ? (() => {
|
|
704
|
+
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)},"ranges":${`[${input.ranges.map(elem => `[${elem[0]},${elem[1]}]`).join(",")}]`},"hash":${$string(input.hash)},"btime":${input.btime},"completed":${input.completed},"error":${null !== input.error ? (() => {
|
|
617
705
|
if (Array.isArray(input.error))
|
|
618
706
|
return `[${input.error.map(elem => $so2(elem)).join(",")}]`;
|
|
619
707
|
if ("object" === typeof input.error && null !== input.error)
|
|
@@ -631,7 +719,7 @@ export const stringifyFile = input => {
|
|
|
631
719
|
};
|
|
632
720
|
export const assertStringifyFile = (input, errorFactory) => { const assert = (input, errorFactory) => {
|
|
633
721
|
const __is = input => {
|
|
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))));
|
|
722
|
+
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 && (Array.isArray(input.ranges) && input.ranges.every(elem => Array.isArray(elem) && (elem.length === 2 && ("number" === typeof elem[0] && (!Number.isNaN(elem[0]) && 0 <= elem[0])) && ("number" === typeof elem[1] && (!Number.isNaN(elem[1]) && 0 <= elem[1]))))) && ("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))));
|
|
635
723
|
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));
|
|
636
724
|
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
725
|
const $io3 = input => Object.keys(input).every(key => {
|
|
@@ -711,6 +799,50 @@ export const assertStringifyFile = (input, errorFactory) => { const assert = (in
|
|
|
711
799
|
path: _path + ".mimeType",
|
|
712
800
|
expected: "string",
|
|
713
801
|
value: input.mimeType
|
|
802
|
+
}, errorFactory)) && ((Array.isArray(input.ranges) || $guard(_exceptionable, {
|
|
803
|
+
path: _path + ".ranges",
|
|
804
|
+
expected: "Array<[start: number & Minimum<0>, end: number & Minimum<0>]>",
|
|
805
|
+
value: input.ranges
|
|
806
|
+
}, errorFactory)) && input.ranges.every((elem, _index3) => (Array.isArray(elem) || $guard(_exceptionable, {
|
|
807
|
+
path: _path + ".ranges[" + _index3 + "]",
|
|
808
|
+
expected: "[start: number & Minimum<0>, end: number & Minimum<0>]",
|
|
809
|
+
value: elem
|
|
810
|
+
}, errorFactory)) && ((elem.length === 2 || $guard(_exceptionable, {
|
|
811
|
+
path: _path + ".ranges[" + _index3 + "]",
|
|
812
|
+
expected: "[(number & Minimum<0>), (number & Minimum<0>)]",
|
|
813
|
+
value: elem
|
|
814
|
+
}, errorFactory)) && ("number" === typeof elem[0] && (!Number.isNaN(elem[0]) || $guard(_exceptionable, {
|
|
815
|
+
path: _path + ".ranges[" + _index3 + "][0]",
|
|
816
|
+
expected: "number",
|
|
817
|
+
value: elem[0]
|
|
818
|
+
}, errorFactory)) && (0 <= elem[0] || $guard(_exceptionable, {
|
|
819
|
+
path: _path + ".ranges[" + _index3 + "][0]",
|
|
820
|
+
expected: "number & Minimum<0>",
|
|
821
|
+
value: elem[0]
|
|
822
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
|
823
|
+
path: _path + ".ranges[" + _index3 + "][0]",
|
|
824
|
+
expected: "(number & Minimum<0>)",
|
|
825
|
+
value: elem[0]
|
|
826
|
+
}, errorFactory)) && ("number" === typeof elem[1] && (!Number.isNaN(elem[1]) || $guard(_exceptionable, {
|
|
827
|
+
path: _path + ".ranges[" + _index3 + "][1]",
|
|
828
|
+
expected: "number",
|
|
829
|
+
value: elem[1]
|
|
830
|
+
}, errorFactory)) && (0 <= elem[1] || $guard(_exceptionable, {
|
|
831
|
+
path: _path + ".ranges[" + _index3 + "][1]",
|
|
832
|
+
expected: "number & Minimum<0>",
|
|
833
|
+
value: elem[1]
|
|
834
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
|
835
|
+
path: _path + ".ranges[" + _index3 + "][1]",
|
|
836
|
+
expected: "(number & Minimum<0>)",
|
|
837
|
+
value: elem[1]
|
|
838
|
+
}, errorFactory))) || $guard(_exceptionable, {
|
|
839
|
+
path: _path + ".ranges[" + _index3 + "]",
|
|
840
|
+
expected: "[start: number & Minimum<0>, end: number & Minimum<0>]",
|
|
841
|
+
value: elem
|
|
842
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
|
843
|
+
path: _path + ".ranges",
|
|
844
|
+
expected: "Array<[start: number & Minimum<0>, end: number & Minimum<0>]>",
|
|
845
|
+
value: input.ranges
|
|
714
846
|
}, errorFactory)) && ("string" === typeof input.hash && (/^([A-Fa-f0-9]{32})?$/.test(input.hash) || $guard(_exceptionable, {
|
|
715
847
|
path: _path + ".hash",
|
|
716
848
|
expected: "string & Pattern<\"^([A-Fa-f0-9]{32})?$\">",
|
|
@@ -739,12 +871,12 @@ export const assertStringifyFile = (input, errorFactory) => { const assert = (in
|
|
|
739
871
|
path: _path + ".error",
|
|
740
872
|
expected: "(Array<NxtError> | NxtError | null)",
|
|
741
873
|
value: input.error
|
|
742
|
-
}, errorFactory)) && (null === input.error || (Array.isArray(input.error) && input.error.every((elem,
|
|
743
|
-
path: _path + ".error[" +
|
|
874
|
+
}, errorFactory)) && (null === input.error || (Array.isArray(input.error) && input.error.every((elem, _index4) => ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
|
|
875
|
+
path: _path + ".error[" + _index4 + "]",
|
|
744
876
|
expected: "NxtError",
|
|
745
877
|
value: elem
|
|
746
|
-
}, errorFactory)) && $ao2(elem, _path + ".error[" +
|
|
747
|
-
path: _path + ".error[" +
|
|
878
|
+
}, errorFactory)) && $ao2(elem, _path + ".error[" + _index4 + "]", true && _exceptionable) || $guard(_exceptionable, {
|
|
879
|
+
path: _path + ".error[" + _index4 + "]",
|
|
748
880
|
expected: "NxtError",
|
|
749
881
|
value: elem
|
|
750
882
|
}, errorFactory)) || "object" === typeof input.error && null !== input.error && $ao2(input.error, _path + ".error", true && _exceptionable) || $guard(_exceptionable, {
|
|
@@ -825,12 +957,12 @@ export const assertStringifyFile = (input, errorFactory) => { const assert = (in
|
|
|
825
957
|
path: _path + ".errors",
|
|
826
958
|
expected: "(Array<NxtError> | null | undefined)",
|
|
827
959
|
value: input.errors
|
|
828
|
-
}, errorFactory)) && input.errors.every((elem,
|
|
829
|
-
path: _path + ".errors[" +
|
|
960
|
+
}, errorFactory)) && input.errors.every((elem, _index5) => ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
|
|
961
|
+
path: _path + ".errors[" + _index5 + "]",
|
|
830
962
|
expected: "NxtError",
|
|
831
963
|
value: elem
|
|
832
|
-
}, errorFactory)) && $ao2(elem, _path + ".errors[" +
|
|
833
|
-
path: _path + ".errors[" +
|
|
964
|
+
}, errorFactory)) && $ao2(elem, _path + ".errors[" + _index5 + "]", true && _exceptionable) || $guard(_exceptionable, {
|
|
965
|
+
path: _path + ".errors[" + _index5 + "]",
|
|
834
966
|
expected: "NxtError",
|
|
835
967
|
value: elem
|
|
836
968
|
}, errorFactory)) || $guard(_exceptionable, {
|
|
@@ -873,7 +1005,7 @@ export const assertStringifyFile = (input, errorFactory) => { const assert = (in
|
|
|
873
1005
|
const $string = __typia.json.createAssertStringify.string;
|
|
874
1006
|
const $throws = __typia.json.createAssertStringify.throws;
|
|
875
1007
|
const $tail = __typia.json.createAssertStringify.tail;
|
|
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 ? (() => {
|
|
1008
|
+
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)},"ranges":${`[${input.ranges.map(elem => `[${elem[0]},${elem[1]}]`).join(",")}]`},"hash":${$string(input.hash)},"btime":${input.btime},"completed":${input.completed},"error":${null !== input.error ? (() => {
|
|
877
1009
|
if (Array.isArray(input.error))
|
|
878
1010
|
return `[${input.error.map(elem => $so2(elem)).join(",")}]`;
|
|
879
1011
|
if ("object" === typeof input.error && null !== input.error)
|
|
@@ -890,7 +1022,7 @@ export const assertStringifyFile = (input, errorFactory) => { const assert = (in
|
|
|
890
1022
|
return $so0(input);
|
|
891
1023
|
}; return stringify(assert(input, errorFactory)); };
|
|
892
1024
|
export const isFileStats = input => {
|
|
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))));
|
|
1025
|
+
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 && (Array.isArray(input.ranges) && input.ranges.every(elem => Array.isArray(elem) && (elem.length === 2 && ("number" === typeof elem[0] && 0 <= elem[0]) && ("number" === typeof elem[1] && 0 <= elem[1])))) && ("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))));
|
|
894
1026
|
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);
|
|
895
1027
|
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
1028
|
const $io3 = input => Object.keys(input).every(key => {
|
|
@@ -904,7 +1036,7 @@ export const isFileStats = input => {
|
|
|
904
1036
|
};
|
|
905
1037
|
export const assertFileStats = (input, errorFactory) => {
|
|
906
1038
|
const __is = input => {
|
|
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))));
|
|
1039
|
+
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 && (Array.isArray(input.ranges) && input.ranges.every(elem => Array.isArray(elem) && (elem.length === 2 && ("number" === typeof elem[0] && 0 <= elem[0]) && ("number" === typeof elem[1] && 0 <= elem[1])))) && ("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))));
|
|
908
1040
|
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);
|
|
909
1041
|
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
1042
|
const $io3 = input => Object.keys(input).every(key => {
|
|
@@ -1024,6 +1156,42 @@ export const assertFileStats = (input, errorFactory) => {
|
|
|
1024
1156
|
path: _path + ".mimeType",
|
|
1025
1157
|
expected: "string",
|
|
1026
1158
|
value: input.mimeType
|
|
1159
|
+
}, errorFactory)) && ((Array.isArray(input.ranges) || $guard(_exceptionable, {
|
|
1160
|
+
path: _path + ".ranges",
|
|
1161
|
+
expected: "Array<[start: number & Minimum<0>, end: number & Minimum<0>]>",
|
|
1162
|
+
value: input.ranges
|
|
1163
|
+
}, errorFactory)) && input.ranges.every((elem, _index5) => (Array.isArray(elem) || $guard(_exceptionable, {
|
|
1164
|
+
path: _path + ".ranges[" + _index5 + "]",
|
|
1165
|
+
expected: "[start: number & Minimum<0>, end: number & Minimum<0>]",
|
|
1166
|
+
value: elem
|
|
1167
|
+
}, errorFactory)) && ((elem.length === 2 || $guard(_exceptionable, {
|
|
1168
|
+
path: _path + ".ranges[" + _index5 + "]",
|
|
1169
|
+
expected: "[(number & Minimum<0>), (number & Minimum<0>)]",
|
|
1170
|
+
value: elem
|
|
1171
|
+
}, errorFactory)) && ("number" === typeof elem[0] && (0 <= elem[0] || $guard(_exceptionable, {
|
|
1172
|
+
path: _path + ".ranges[" + _index5 + "][0]",
|
|
1173
|
+
expected: "number & Minimum<0>",
|
|
1174
|
+
value: elem[0]
|
|
1175
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
|
1176
|
+
path: _path + ".ranges[" + _index5 + "][0]",
|
|
1177
|
+
expected: "(number & Minimum<0>)",
|
|
1178
|
+
value: elem[0]
|
|
1179
|
+
}, errorFactory)) && ("number" === typeof elem[1] && (0 <= elem[1] || $guard(_exceptionable, {
|
|
1180
|
+
path: _path + ".ranges[" + _index5 + "][1]",
|
|
1181
|
+
expected: "number & Minimum<0>",
|
|
1182
|
+
value: elem[1]
|
|
1183
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
|
1184
|
+
path: _path + ".ranges[" + _index5 + "][1]",
|
|
1185
|
+
expected: "(number & Minimum<0>)",
|
|
1186
|
+
value: elem[1]
|
|
1187
|
+
}, errorFactory))) || $guard(_exceptionable, {
|
|
1188
|
+
path: _path + ".ranges[" + _index5 + "]",
|
|
1189
|
+
expected: "[start: number & Minimum<0>, end: number & Minimum<0>]",
|
|
1190
|
+
value: elem
|
|
1191
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
|
1192
|
+
path: _path + ".ranges",
|
|
1193
|
+
expected: "Array<[start: number & Minimum<0>, end: number & Minimum<0>]>",
|
|
1194
|
+
value: input.ranges
|
|
1027
1195
|
}, errorFactory)) && ("string" === typeof input.hash && (/^([A-Fa-f0-9]{32})?$/.test(input.hash) || $guard(_exceptionable, {
|
|
1028
1196
|
path: _path + ".hash",
|
|
1029
1197
|
expected: "string & Pattern<\"^([A-Fa-f0-9]{32})?$\">",
|
|
@@ -1052,12 +1220,12 @@ export const assertFileStats = (input, errorFactory) => {
|
|
|
1052
1220
|
path: _path + ".error",
|
|
1053
1221
|
expected: "(Array<NxtError> | NxtError | null)",
|
|
1054
1222
|
value: input.error
|
|
1055
|
-
}, errorFactory)) && (null === input.error || (Array.isArray(input.error) && input.error.every((elem,
|
|
1056
|
-
path: _path + ".error[" +
|
|
1223
|
+
}, errorFactory)) && (null === input.error || (Array.isArray(input.error) && input.error.every((elem, _index6) => ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
|
|
1224
|
+
path: _path + ".error[" + _index6 + "]",
|
|
1057
1225
|
expected: "NxtError",
|
|
1058
1226
|
value: elem
|
|
1059
|
-
}, errorFactory)) && $ao2(elem, _path + ".error[" +
|
|
1060
|
-
path: _path + ".error[" +
|
|
1227
|
+
}, errorFactory)) && $ao2(elem, _path + ".error[" + _index6 + "]", true && _exceptionable) || $guard(_exceptionable, {
|
|
1228
|
+
path: _path + ".error[" + _index6 + "]",
|
|
1061
1229
|
expected: "NxtError",
|
|
1062
1230
|
value: elem
|
|
1063
1231
|
}, errorFactory)) || "object" === typeof input.error && null !== input.error && $ao2(input.error, _path + ".error", true && _exceptionable) || $guard(_exceptionable, {
|
|
@@ -1138,12 +1306,12 @@ export const assertFileStats = (input, errorFactory) => {
|
|
|
1138
1306
|
path: _path + ".errors",
|
|
1139
1307
|
expected: "(Array<NxtError> | null | undefined)",
|
|
1140
1308
|
value: input.errors
|
|
1141
|
-
}, errorFactory)) && input.errors.every((elem,
|
|
1142
|
-
path: _path + ".errors[" +
|
|
1309
|
+
}, errorFactory)) && input.errors.every((elem, _index7) => ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
|
|
1310
|
+
path: _path + ".errors[" + _index7 + "]",
|
|
1143
1311
|
expected: "NxtError",
|
|
1144
1312
|
value: elem
|
|
1145
|
-
}, errorFactory)) && $ao2(elem, _path + ".errors[" +
|
|
1146
|
-
path: _path + ".errors[" +
|
|
1313
|
+
}, errorFactory)) && $ao2(elem, _path + ".errors[" + _index7 + "]", true && _exceptionable) || $guard(_exceptionable, {
|
|
1314
|
+
path: _path + ".errors[" + _index7 + "]",
|
|
1147
1315
|
expected: "NxtError",
|
|
1148
1316
|
value: elem
|
|
1149
1317
|
}, errorFactory)) || $guard(_exceptionable, {
|
|
@@ -1224,6 +1392,22 @@ export const randomFileStats = generator => {
|
|
|
1224
1392
|
tags: (generator?.array ?? $generator.array)(() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()),
|
|
1225
1393
|
resumable: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
|
|
1226
1394
|
mimeType: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
|
|
1395
|
+
ranges: (generator?.array ?? $generator.array)(() => [
|
|
1396
|
+
(generator?.customs ?? $generator.customs)?.number?.([
|
|
1397
|
+
{
|
|
1398
|
+
name: "Minimum<0>",
|
|
1399
|
+
kind: "minimum",
|
|
1400
|
+
value: 0
|
|
1401
|
+
}
|
|
1402
|
+
]) ?? (generator?.number ?? $generator.number)(0, 10),
|
|
1403
|
+
(generator?.customs ?? $generator.customs)?.number?.([
|
|
1404
|
+
{
|
|
1405
|
+
name: "Minimum<0>",
|
|
1406
|
+
kind: "minimum",
|
|
1407
|
+
value: 0
|
|
1408
|
+
}
|
|
1409
|
+
]) ?? (generator?.number ?? $generator.number)(0, 10)
|
|
1410
|
+
]),
|
|
1227
1411
|
hash: (generator?.customs ?? $generator.customs)?.string?.([
|
|
1228
1412
|
{
|
|
1229
1413
|
name: "Pattern<\"^([A-Fa-f0-9]{32})?$\">",
|
|
@@ -1319,7 +1503,7 @@ export const randomFileStats = generator => {
|
|
|
1319
1503
|
};
|
|
1320
1504
|
export const assertGuardFileStats = (input, errorFactory) => {
|
|
1321
1505
|
const __is = input => {
|
|
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))));
|
|
1506
|
+
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 && (Array.isArray(input.ranges) && input.ranges.every(elem => Array.isArray(elem) && (elem.length === 2 && ("number" === typeof elem[0] && 0 <= elem[0]) && ("number" === typeof elem[1] && 0 <= elem[1])))) && ("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))));
|
|
1323
1507
|
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);
|
|
1324
1508
|
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
1509
|
const $io3 = input => Object.keys(input).every(key => {
|
|
@@ -1439,6 +1623,42 @@ export const assertGuardFileStats = (input, errorFactory) => {
|
|
|
1439
1623
|
path: _path + ".mimeType",
|
|
1440
1624
|
expected: "string",
|
|
1441
1625
|
value: input.mimeType
|
|
1626
|
+
}, errorFactory)) && ((Array.isArray(input.ranges) || $guard(_exceptionable, {
|
|
1627
|
+
path: _path + ".ranges",
|
|
1628
|
+
expected: "Array<[start: number & Minimum<0>, end: number & Minimum<0>]>",
|
|
1629
|
+
value: input.ranges
|
|
1630
|
+
}, errorFactory)) && input.ranges.every((elem, _index5) => (Array.isArray(elem) || $guard(_exceptionable, {
|
|
1631
|
+
path: _path + ".ranges[" + _index5 + "]",
|
|
1632
|
+
expected: "[start: number & Minimum<0>, end: number & Minimum<0>]",
|
|
1633
|
+
value: elem
|
|
1634
|
+
}, errorFactory)) && ((elem.length === 2 || $guard(_exceptionable, {
|
|
1635
|
+
path: _path + ".ranges[" + _index5 + "]",
|
|
1636
|
+
expected: "[(number & Minimum<0>), (number & Minimum<0>)]",
|
|
1637
|
+
value: elem
|
|
1638
|
+
}, errorFactory)) && ("number" === typeof elem[0] && (0 <= elem[0] || $guard(_exceptionable, {
|
|
1639
|
+
path: _path + ".ranges[" + _index5 + "][0]",
|
|
1640
|
+
expected: "number & Minimum<0>",
|
|
1641
|
+
value: elem[0]
|
|
1642
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
|
1643
|
+
path: _path + ".ranges[" + _index5 + "][0]",
|
|
1644
|
+
expected: "(number & Minimum<0>)",
|
|
1645
|
+
value: elem[0]
|
|
1646
|
+
}, errorFactory)) && ("number" === typeof elem[1] && (0 <= elem[1] || $guard(_exceptionable, {
|
|
1647
|
+
path: _path + ".ranges[" + _index5 + "][1]",
|
|
1648
|
+
expected: "number & Minimum<0>",
|
|
1649
|
+
value: elem[1]
|
|
1650
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
|
1651
|
+
path: _path + ".ranges[" + _index5 + "][1]",
|
|
1652
|
+
expected: "(number & Minimum<0>)",
|
|
1653
|
+
value: elem[1]
|
|
1654
|
+
}, errorFactory))) || $guard(_exceptionable, {
|
|
1655
|
+
path: _path + ".ranges[" + _index5 + "]",
|
|
1656
|
+
expected: "[start: number & Minimum<0>, end: number & Minimum<0>]",
|
|
1657
|
+
value: elem
|
|
1658
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
|
1659
|
+
path: _path + ".ranges",
|
|
1660
|
+
expected: "Array<[start: number & Minimum<0>, end: number & Minimum<0>]>",
|
|
1661
|
+
value: input.ranges
|
|
1442
1662
|
}, errorFactory)) && ("string" === typeof input.hash && (/^([A-Fa-f0-9]{32})?$/.test(input.hash) || $guard(_exceptionable, {
|
|
1443
1663
|
path: _path + ".hash",
|
|
1444
1664
|
expected: "string & Pattern<\"^([A-Fa-f0-9]{32})?$\">",
|
|
@@ -1467,12 +1687,12 @@ export const assertGuardFileStats = (input, errorFactory) => {
|
|
|
1467
1687
|
path: _path + ".error",
|
|
1468
1688
|
expected: "(Array<NxtError> | NxtError | null)",
|
|
1469
1689
|
value: input.error
|
|
1470
|
-
}, errorFactory)) && (null === input.error || (Array.isArray(input.error) && input.error.every((elem,
|
|
1471
|
-
path: _path + ".error[" +
|
|
1690
|
+
}, errorFactory)) && (null === input.error || (Array.isArray(input.error) && input.error.every((elem, _index6) => ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
|
|
1691
|
+
path: _path + ".error[" + _index6 + "]",
|
|
1472
1692
|
expected: "NxtError",
|
|
1473
1693
|
value: elem
|
|
1474
|
-
}, errorFactory)) && $ao2(elem, _path + ".error[" +
|
|
1475
|
-
path: _path + ".error[" +
|
|
1694
|
+
}, errorFactory)) && $ao2(elem, _path + ".error[" + _index6 + "]", true && _exceptionable) || $guard(_exceptionable, {
|
|
1695
|
+
path: _path + ".error[" + _index6 + "]",
|
|
1476
1696
|
expected: "NxtError",
|
|
1477
1697
|
value: elem
|
|
1478
1698
|
}, errorFactory)) || "object" === typeof input.error && null !== input.error && $ao2(input.error, _path + ".error", true && _exceptionable) || $guard(_exceptionable, {
|
|
@@ -1553,12 +1773,12 @@ export const assertGuardFileStats = (input, errorFactory) => {
|
|
|
1553
1773
|
path: _path + ".errors",
|
|
1554
1774
|
expected: "(Array<NxtError> | null | undefined)",
|
|
1555
1775
|
value: input.errors
|
|
1556
|
-
}, errorFactory)) && input.errors.every((elem,
|
|
1557
|
-
path: _path + ".errors[" +
|
|
1776
|
+
}, errorFactory)) && input.errors.every((elem, _index7) => ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
|
|
1777
|
+
path: _path + ".errors[" + _index7 + "]",
|
|
1558
1778
|
expected: "NxtError",
|
|
1559
1779
|
value: elem
|
|
1560
|
-
}, errorFactory)) && $ao2(elem, _path + ".errors[" +
|
|
1561
|
-
path: _path + ".errors[" +
|
|
1780
|
+
}, errorFactory)) && $ao2(elem, _path + ".errors[" + _index7 + "]", true && _exceptionable) || $guard(_exceptionable, {
|
|
1781
|
+
path: _path + ".errors[" + _index7 + "]",
|
|
1562
1782
|
expected: "NxtError",
|
|
1563
1783
|
value: elem
|
|
1564
1784
|
}, errorFactory)) || $guard(_exceptionable, {
|
|
@@ -1601,7 +1821,7 @@ export const stringifyFileStats = input => {
|
|
|
1601
1821
|
const $string = __typia.json.createStringify.string;
|
|
1602
1822
|
const $throws = __typia.json.createStringify.throws;
|
|
1603
1823
|
const $tail = __typia.json.createStringify.tail;
|
|
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 ? (() => {
|
|
1824
|
+
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)},"ranges":${`[${input.ranges.map(elem => `[${elem[0]},${elem[1]}]`).join(",")}]`},"hash":${$string(input.hash)},"btime":${input.btime},"completed":${input.completed},"error":${null !== input.error ? (() => {
|
|
1605
1825
|
if (Array.isArray(input.error))
|
|
1606
1826
|
return `[${input.error.map(elem => $so2(elem)).join(",")}]`;
|
|
1607
1827
|
if ("object" === typeof input.error && null !== input.error)
|
|
@@ -1619,7 +1839,7 @@ export const stringifyFileStats = input => {
|
|
|
1619
1839
|
};
|
|
1620
1840
|
export const assertStringifyFileStats = (input, errorFactory) => { const assert = (input, errorFactory) => {
|
|
1621
1841
|
const __is = input => {
|
|
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))));
|
|
1842
|
+
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 && (Array.isArray(input.ranges) && input.ranges.every(elem => Array.isArray(elem) && (elem.length === 2 && ("number" === typeof elem[0] && (!Number.isNaN(elem[0]) && 0 <= elem[0])) && ("number" === typeof elem[1] && (!Number.isNaN(elem[1]) && 0 <= elem[1]))))) && ("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))));
|
|
1623
1843
|
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));
|
|
1624
1844
|
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
1845
|
const $io3 = input => Object.keys(input).every(key => {
|
|
@@ -1739,6 +1959,50 @@ export const assertStringifyFileStats = (input, errorFactory) => { const assert
|
|
|
1739
1959
|
path: _path + ".mimeType",
|
|
1740
1960
|
expected: "string",
|
|
1741
1961
|
value: input.mimeType
|
|
1962
|
+
}, errorFactory)) && ((Array.isArray(input.ranges) || $guard(_exceptionable, {
|
|
1963
|
+
path: _path + ".ranges",
|
|
1964
|
+
expected: "Array<[start: number & Minimum<0>, end: number & Minimum<0>]>",
|
|
1965
|
+
value: input.ranges
|
|
1966
|
+
}, errorFactory)) && input.ranges.every((elem, _index5) => (Array.isArray(elem) || $guard(_exceptionable, {
|
|
1967
|
+
path: _path + ".ranges[" + _index5 + "]",
|
|
1968
|
+
expected: "[start: number & Minimum<0>, end: number & Minimum<0>]",
|
|
1969
|
+
value: elem
|
|
1970
|
+
}, errorFactory)) && ((elem.length === 2 || $guard(_exceptionable, {
|
|
1971
|
+
path: _path + ".ranges[" + _index5 + "]",
|
|
1972
|
+
expected: "[(number & Minimum<0>), (number & Minimum<0>)]",
|
|
1973
|
+
value: elem
|
|
1974
|
+
}, errorFactory)) && ("number" === typeof elem[0] && (!Number.isNaN(elem[0]) || $guard(_exceptionable, {
|
|
1975
|
+
path: _path + ".ranges[" + _index5 + "][0]",
|
|
1976
|
+
expected: "number",
|
|
1977
|
+
value: elem[0]
|
|
1978
|
+
}, errorFactory)) && (0 <= elem[0] || $guard(_exceptionable, {
|
|
1979
|
+
path: _path + ".ranges[" + _index5 + "][0]",
|
|
1980
|
+
expected: "number & Minimum<0>",
|
|
1981
|
+
value: elem[0]
|
|
1982
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
|
1983
|
+
path: _path + ".ranges[" + _index5 + "][0]",
|
|
1984
|
+
expected: "(number & Minimum<0>)",
|
|
1985
|
+
value: elem[0]
|
|
1986
|
+
}, errorFactory)) && ("number" === typeof elem[1] && (!Number.isNaN(elem[1]) || $guard(_exceptionable, {
|
|
1987
|
+
path: _path + ".ranges[" + _index5 + "][1]",
|
|
1988
|
+
expected: "number",
|
|
1989
|
+
value: elem[1]
|
|
1990
|
+
}, errorFactory)) && (0 <= elem[1] || $guard(_exceptionable, {
|
|
1991
|
+
path: _path + ".ranges[" + _index5 + "][1]",
|
|
1992
|
+
expected: "number & Minimum<0>",
|
|
1993
|
+
value: elem[1]
|
|
1994
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
|
1995
|
+
path: _path + ".ranges[" + _index5 + "][1]",
|
|
1996
|
+
expected: "(number & Minimum<0>)",
|
|
1997
|
+
value: elem[1]
|
|
1998
|
+
}, errorFactory))) || $guard(_exceptionable, {
|
|
1999
|
+
path: _path + ".ranges[" + _index5 + "]",
|
|
2000
|
+
expected: "[start: number & Minimum<0>, end: number & Minimum<0>]",
|
|
2001
|
+
value: elem
|
|
2002
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
|
2003
|
+
path: _path + ".ranges",
|
|
2004
|
+
expected: "Array<[start: number & Minimum<0>, end: number & Minimum<0>]>",
|
|
2005
|
+
value: input.ranges
|
|
1742
2006
|
}, errorFactory)) && ("string" === typeof input.hash && (/^([A-Fa-f0-9]{32})?$/.test(input.hash) || $guard(_exceptionable, {
|
|
1743
2007
|
path: _path + ".hash",
|
|
1744
2008
|
expected: "string & Pattern<\"^([A-Fa-f0-9]{32})?$\">",
|
|
@@ -1767,12 +2031,12 @@ export const assertStringifyFileStats = (input, errorFactory) => { const assert
|
|
|
1767
2031
|
path: _path + ".error",
|
|
1768
2032
|
expected: "(Array<NxtError> | NxtError | null)",
|
|
1769
2033
|
value: input.error
|
|
1770
|
-
}, errorFactory)) && (null === input.error || (Array.isArray(input.error) && input.error.every((elem,
|
|
1771
|
-
path: _path + ".error[" +
|
|
2034
|
+
}, errorFactory)) && (null === input.error || (Array.isArray(input.error) && input.error.every((elem, _index6) => ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
|
|
2035
|
+
path: _path + ".error[" + _index6 + "]",
|
|
1772
2036
|
expected: "NxtError",
|
|
1773
2037
|
value: elem
|
|
1774
|
-
}, errorFactory)) && $ao2(elem, _path + ".error[" +
|
|
1775
|
-
path: _path + ".error[" +
|
|
2038
|
+
}, errorFactory)) && $ao2(elem, _path + ".error[" + _index6 + "]", true && _exceptionable) || $guard(_exceptionable, {
|
|
2039
|
+
path: _path + ".error[" + _index6 + "]",
|
|
1776
2040
|
expected: "NxtError",
|
|
1777
2041
|
value: elem
|
|
1778
2042
|
}, errorFactory)) || "object" === typeof input.error && null !== input.error && $ao2(input.error, _path + ".error", true && _exceptionable) || $guard(_exceptionable, {
|
|
@@ -1853,12 +2117,12 @@ export const assertStringifyFileStats = (input, errorFactory) => { const assert
|
|
|
1853
2117
|
path: _path + ".errors",
|
|
1854
2118
|
expected: "(Array<NxtError> | null | undefined)",
|
|
1855
2119
|
value: input.errors
|
|
1856
|
-
}, errorFactory)) && input.errors.every((elem,
|
|
1857
|
-
path: _path + ".errors[" +
|
|
2120
|
+
}, errorFactory)) && input.errors.every((elem, _index7) => ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
|
|
2121
|
+
path: _path + ".errors[" + _index7 + "]",
|
|
1858
2122
|
expected: "NxtError",
|
|
1859
2123
|
value: elem
|
|
1860
|
-
}, errorFactory)) && $ao2(elem, _path + ".errors[" +
|
|
1861
|
-
path: _path + ".errors[" +
|
|
2124
|
+
}, errorFactory)) && $ao2(elem, _path + ".errors[" + _index7 + "]", true && _exceptionable) || $guard(_exceptionable, {
|
|
2125
|
+
path: _path + ".errors[" + _index7 + "]",
|
|
1862
2126
|
expected: "NxtError",
|
|
1863
2127
|
value: elem
|
|
1864
2128
|
}, errorFactory)) || $guard(_exceptionable, {
|
|
@@ -1901,7 +2165,7 @@ export const assertStringifyFileStats = (input, errorFactory) => { const assert
|
|
|
1901
2165
|
const $string = __typia.json.createAssertStringify.string;
|
|
1902
2166
|
const $throws = __typia.json.createAssertStringify.throws;
|
|
1903
2167
|
const $tail = __typia.json.createAssertStringify.tail;
|
|
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 ? (() => {
|
|
2168
|
+
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)},"ranges":${`[${input.ranges.map(elem => `[${elem[0]},${elem[1]}]`).join(",")}]`},"hash":${$string(input.hash)},"btime":${input.btime},"completed":${input.completed},"error":${null !== input.error ? (() => {
|
|
1905
2169
|
if (Array.isArray(input.error))
|
|
1906
2170
|
return `[${input.error.map(elem => $so2(elem)).join(",")}]`;
|
|
1907
2171
|
if ("object" === typeof input.error && null !== input.error)
|