@nxtedition/types 1.6.7 → 1.6.8
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/file.d.ts +4 -4
- package/dist/common/file.js +186 -318
- package/package.json +1 -1
package/dist/common/file.d.ts
CHANGED
|
@@ -15,10 +15,6 @@ export interface File {
|
|
|
15
15
|
tags: string[];
|
|
16
16
|
resumable: string;
|
|
17
17
|
mimeType: string;
|
|
18
|
-
ranges: Array<[
|
|
19
|
-
start: number & tags.Minimum<0>,
|
|
20
|
-
end: number & tags.Minimum<0>
|
|
21
|
-
]>;
|
|
22
18
|
hash: string & tags.Pattern<"^([A-Fa-f0-9]{32})?$">;
|
|
23
19
|
btime: number & tags.Minimum<0> & tags.Type<"uint64">;
|
|
24
20
|
completed: boolean;
|
|
@@ -35,6 +31,10 @@ export interface FileStats extends File {
|
|
|
35
31
|
uploading: boolean;
|
|
36
32
|
zones: string[];
|
|
37
33
|
replicas: string[];
|
|
34
|
+
ranges: Array<[
|
|
35
|
+
start: number & tags.Minimum<0>,
|
|
36
|
+
end: number & tags.Minimum<0>
|
|
37
|
+
]>;
|
|
38
38
|
}
|
|
39
39
|
export declare const isFileStats: (input: unknown) => input is FileStats;
|
|
40
40
|
export declare const assertFileStats: (input: unknown) => FileStats;
|
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 && (
|
|
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
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 && (
|
|
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))));
|
|
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,42 +94,6 @@ 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
|
|
133
97
|
}, errorFactory)) && ("string" === typeof input.hash && (/^([A-Fa-f0-9]{32})?$/.test(input.hash) || $guard(_exceptionable, {
|
|
134
98
|
path: _path + ".hash",
|
|
135
99
|
expected: "string & Pattern<\"^([A-Fa-f0-9]{32})?$\">",
|
|
@@ -158,12 +122,12 @@ export const assertFile = (input, errorFactory) => {
|
|
|
158
122
|
path: _path + ".error",
|
|
159
123
|
expected: "(Array<NxtError> | NxtError | null)",
|
|
160
124
|
value: input.error
|
|
161
|
-
}, errorFactory)) && (null === input.error || (Array.isArray(input.error) && input.error.every((elem,
|
|
162
|
-
path: _path + ".error[" +
|
|
125
|
+
}, errorFactory)) && (null === input.error || (Array.isArray(input.error) && input.error.every((elem, _index3) => ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
|
|
126
|
+
path: _path + ".error[" + _index3 + "]",
|
|
163
127
|
expected: "NxtError",
|
|
164
128
|
value: elem
|
|
165
|
-
}, errorFactory)) && $ao2(elem, _path + ".error[" +
|
|
166
|
-
path: _path + ".error[" +
|
|
129
|
+
}, errorFactory)) && $ao2(elem, _path + ".error[" + _index3 + "]", true && _exceptionable) || $guard(_exceptionable, {
|
|
130
|
+
path: _path + ".error[" + _index3 + "]",
|
|
167
131
|
expected: "NxtError",
|
|
168
132
|
value: elem
|
|
169
133
|
}, errorFactory)) || "object" === typeof input.error && null !== input.error && $ao2(input.error, _path + ".error", true && _exceptionable) || $guard(_exceptionable, {
|
|
@@ -244,12 +208,12 @@ export const assertFile = (input, errorFactory) => {
|
|
|
244
208
|
path: _path + ".errors",
|
|
245
209
|
expected: "(Array<NxtError> | null | undefined)",
|
|
246
210
|
value: input.errors
|
|
247
|
-
}, errorFactory)) && input.errors.every((elem,
|
|
248
|
-
path: _path + ".errors[" +
|
|
211
|
+
}, errorFactory)) && input.errors.every((elem, _index4) => ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
|
|
212
|
+
path: _path + ".errors[" + _index4 + "]",
|
|
249
213
|
expected: "NxtError",
|
|
250
214
|
value: elem
|
|
251
|
-
}, errorFactory)) && $ao2(elem, _path + ".errors[" +
|
|
252
|
-
path: _path + ".errors[" +
|
|
215
|
+
}, errorFactory)) && $ao2(elem, _path + ".errors[" + _index4 + "]", true && _exceptionable) || $guard(_exceptionable, {
|
|
216
|
+
path: _path + ".errors[" + _index4 + "]",
|
|
253
217
|
expected: "NxtError",
|
|
254
218
|
value: elem
|
|
255
219
|
}, errorFactory)) || $guard(_exceptionable, {
|
|
@@ -312,22 +276,6 @@ export const randomFile = generator => {
|
|
|
312
276
|
tags: (generator?.array ?? $generator.array)(() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()),
|
|
313
277
|
resumable: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
|
|
314
278
|
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
|
-
]),
|
|
331
279
|
hash: (generator?.customs ?? $generator.customs)?.string?.([
|
|
332
280
|
{
|
|
333
281
|
name: "Pattern<\"^([A-Fa-f0-9]{32})?$\">",
|
|
@@ -423,7 +371,7 @@ export const randomFile = generator => {
|
|
|
423
371
|
};
|
|
424
372
|
export const assertGuardFile = (input, errorFactory) => {
|
|
425
373
|
const __is = input => {
|
|
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 && (
|
|
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))));
|
|
427
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);
|
|
428
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)));
|
|
429
377
|
const $io3 = input => Object.keys(input).every(key => {
|
|
@@ -503,42 +451,6 @@ export const assertGuardFile = (input, errorFactory) => {
|
|
|
503
451
|
path: _path + ".mimeType",
|
|
504
452
|
expected: "string",
|
|
505
453
|
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
|
|
542
454
|
}, errorFactory)) && ("string" === typeof input.hash && (/^([A-Fa-f0-9]{32})?$/.test(input.hash) || $guard(_exceptionable, {
|
|
543
455
|
path: _path + ".hash",
|
|
544
456
|
expected: "string & Pattern<\"^([A-Fa-f0-9]{32})?$\">",
|
|
@@ -567,12 +479,12 @@ export const assertGuardFile = (input, errorFactory) => {
|
|
|
567
479
|
path: _path + ".error",
|
|
568
480
|
expected: "(Array<NxtError> | NxtError | null)",
|
|
569
481
|
value: input.error
|
|
570
|
-
}, errorFactory)) && (null === input.error || (Array.isArray(input.error) && input.error.every((elem,
|
|
571
|
-
path: _path + ".error[" +
|
|
482
|
+
}, errorFactory)) && (null === input.error || (Array.isArray(input.error) && input.error.every((elem, _index3) => ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
|
|
483
|
+
path: _path + ".error[" + _index3 + "]",
|
|
572
484
|
expected: "NxtError",
|
|
573
485
|
value: elem
|
|
574
|
-
}, errorFactory)) && $ao2(elem, _path + ".error[" +
|
|
575
|
-
path: _path + ".error[" +
|
|
486
|
+
}, errorFactory)) && $ao2(elem, _path + ".error[" + _index3 + "]", true && _exceptionable) || $guard(_exceptionable, {
|
|
487
|
+
path: _path + ".error[" + _index3 + "]",
|
|
576
488
|
expected: "NxtError",
|
|
577
489
|
value: elem
|
|
578
490
|
}, errorFactory)) || "object" === typeof input.error && null !== input.error && $ao2(input.error, _path + ".error", true && _exceptionable) || $guard(_exceptionable, {
|
|
@@ -653,12 +565,12 @@ export const assertGuardFile = (input, errorFactory) => {
|
|
|
653
565
|
path: _path + ".errors",
|
|
654
566
|
expected: "(Array<NxtError> | null | undefined)",
|
|
655
567
|
value: input.errors
|
|
656
|
-
}, errorFactory)) && input.errors.every((elem,
|
|
657
|
-
path: _path + ".errors[" +
|
|
568
|
+
}, errorFactory)) && input.errors.every((elem, _index4) => ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
|
|
569
|
+
path: _path + ".errors[" + _index4 + "]",
|
|
658
570
|
expected: "NxtError",
|
|
659
571
|
value: elem
|
|
660
|
-
}, errorFactory)) && $ao2(elem, _path + ".errors[" +
|
|
661
|
-
path: _path + ".errors[" +
|
|
572
|
+
}, errorFactory)) && $ao2(elem, _path + ".errors[" + _index4 + "]", true && _exceptionable) || $guard(_exceptionable, {
|
|
573
|
+
path: _path + ".errors[" + _index4 + "]",
|
|
662
574
|
expected: "NxtError",
|
|
663
575
|
value: elem
|
|
664
576
|
}, errorFactory)) || $guard(_exceptionable, {
|
|
@@ -701,7 +613,7 @@ export const stringifyFile = input => {
|
|
|
701
613
|
const $string = __typia.json.createStringify.string;
|
|
702
614
|
const $throws = __typia.json.createStringify.throws;
|
|
703
615
|
const $tail = __typia.json.createStringify.tail;
|
|
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)},"
|
|
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 ? (() => {
|
|
705
617
|
if (Array.isArray(input.error))
|
|
706
618
|
return `[${input.error.map(elem => $so2(elem)).join(",")}]`;
|
|
707
619
|
if ("object" === typeof input.error && null !== input.error)
|
|
@@ -719,7 +631,7 @@ export const stringifyFile = input => {
|
|
|
719
631
|
};
|
|
720
632
|
export const assertStringifyFile = (input, errorFactory) => { const assert = (input, errorFactory) => {
|
|
721
633
|
const __is = input => {
|
|
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 && (
|
|
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))));
|
|
723
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));
|
|
724
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)));
|
|
725
637
|
const $io3 = input => Object.keys(input).every(key => {
|
|
@@ -799,50 +711,6 @@ export const assertStringifyFile = (input, errorFactory) => { const assert = (in
|
|
|
799
711
|
path: _path + ".mimeType",
|
|
800
712
|
expected: "string",
|
|
801
713
|
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
|
|
846
714
|
}, errorFactory)) && ("string" === typeof input.hash && (/^([A-Fa-f0-9]{32})?$/.test(input.hash) || $guard(_exceptionable, {
|
|
847
715
|
path: _path + ".hash",
|
|
848
716
|
expected: "string & Pattern<\"^([A-Fa-f0-9]{32})?$\">",
|
|
@@ -871,12 +739,12 @@ export const assertStringifyFile = (input, errorFactory) => { const assert = (in
|
|
|
871
739
|
path: _path + ".error",
|
|
872
740
|
expected: "(Array<NxtError> | NxtError | null)",
|
|
873
741
|
value: input.error
|
|
874
|
-
}, errorFactory)) && (null === input.error || (Array.isArray(input.error) && input.error.every((elem,
|
|
875
|
-
path: _path + ".error[" +
|
|
742
|
+
}, errorFactory)) && (null === input.error || (Array.isArray(input.error) && input.error.every((elem, _index3) => ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
|
|
743
|
+
path: _path + ".error[" + _index3 + "]",
|
|
876
744
|
expected: "NxtError",
|
|
877
745
|
value: elem
|
|
878
|
-
}, errorFactory)) && $ao2(elem, _path + ".error[" +
|
|
879
|
-
path: _path + ".error[" +
|
|
746
|
+
}, errorFactory)) && $ao2(elem, _path + ".error[" + _index3 + "]", true && _exceptionable) || $guard(_exceptionable, {
|
|
747
|
+
path: _path + ".error[" + _index3 + "]",
|
|
880
748
|
expected: "NxtError",
|
|
881
749
|
value: elem
|
|
882
750
|
}, errorFactory)) || "object" === typeof input.error && null !== input.error && $ao2(input.error, _path + ".error", true && _exceptionable) || $guard(_exceptionable, {
|
|
@@ -957,12 +825,12 @@ export const assertStringifyFile = (input, errorFactory) => { const assert = (in
|
|
|
957
825
|
path: _path + ".errors",
|
|
958
826
|
expected: "(Array<NxtError> | null | undefined)",
|
|
959
827
|
value: input.errors
|
|
960
|
-
}, errorFactory)) && input.errors.every((elem,
|
|
961
|
-
path: _path + ".errors[" +
|
|
828
|
+
}, errorFactory)) && input.errors.every((elem, _index4) => ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
|
|
829
|
+
path: _path + ".errors[" + _index4 + "]",
|
|
962
830
|
expected: "NxtError",
|
|
963
831
|
value: elem
|
|
964
|
-
}, errorFactory)) && $ao2(elem, _path + ".errors[" +
|
|
965
|
-
path: _path + ".errors[" +
|
|
832
|
+
}, errorFactory)) && $ao2(elem, _path + ".errors[" + _index4 + "]", true && _exceptionable) || $guard(_exceptionable, {
|
|
833
|
+
path: _path + ".errors[" + _index4 + "]",
|
|
966
834
|
expected: "NxtError",
|
|
967
835
|
value: elem
|
|
968
836
|
}, errorFactory)) || $guard(_exceptionable, {
|
|
@@ -1005,7 +873,7 @@ export const assertStringifyFile = (input, errorFactory) => { const assert = (in
|
|
|
1005
873
|
const $string = __typia.json.createAssertStringify.string;
|
|
1006
874
|
const $throws = __typia.json.createAssertStringify.throws;
|
|
1007
875
|
const $tail = __typia.json.createAssertStringify.tail;
|
|
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)},"
|
|
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 ? (() => {
|
|
1009
877
|
if (Array.isArray(input.error))
|
|
1010
878
|
return `[${input.error.map(elem => $so2(elem)).join(",")}]`;
|
|
1011
879
|
if ("object" === typeof input.error && null !== input.error)
|
|
@@ -1022,7 +890,7 @@ export const assertStringifyFile = (input, errorFactory) => { const assert = (in
|
|
|
1022
890
|
return $so0(input);
|
|
1023
891
|
}; return stringify(assert(input, errorFactory)); };
|
|
1024
892
|
export const isFileStats = input => {
|
|
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 && (
|
|
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)) && (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.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))));
|
|
1026
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);
|
|
1027
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)));
|
|
1028
896
|
const $io3 = input => Object.keys(input).every(key => {
|
|
@@ -1036,7 +904,7 @@ export const isFileStats = input => {
|
|
|
1036
904
|
};
|
|
1037
905
|
export const assertFileStats = (input, errorFactory) => {
|
|
1038
906
|
const __is = input => {
|
|
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 && (
|
|
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)) && (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.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))));
|
|
1040
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);
|
|
1041
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)));
|
|
1042
910
|
const $io3 = input => Object.keys(input).every(key => {
|
|
@@ -1092,6 +960,42 @@ export const assertFileStats = (input, errorFactory) => {
|
|
|
1092
960
|
path: _path + ".replicas",
|
|
1093
961
|
expected: "Array<string>",
|
|
1094
962
|
value: input.replicas
|
|
963
|
+
}, errorFactory)) && ((Array.isArray(input.ranges) || $guard(_exceptionable, {
|
|
964
|
+
path: _path + ".ranges",
|
|
965
|
+
expected: "Array<[start: number & Minimum<0>, end: number & Minimum<0>]>",
|
|
966
|
+
value: input.ranges
|
|
967
|
+
}, errorFactory)) && input.ranges.every((elem, _index3) => (Array.isArray(elem) || $guard(_exceptionable, {
|
|
968
|
+
path: _path + ".ranges[" + _index3 + "]",
|
|
969
|
+
expected: "[start: number & Minimum<0>, end: number & Minimum<0>]",
|
|
970
|
+
value: elem
|
|
971
|
+
}, errorFactory)) && ((elem.length === 2 || $guard(_exceptionable, {
|
|
972
|
+
path: _path + ".ranges[" + _index3 + "]",
|
|
973
|
+
expected: "[(number & Minimum<0>), (number & Minimum<0>)]",
|
|
974
|
+
value: elem
|
|
975
|
+
}, errorFactory)) && ("number" === typeof elem[0] && (0 <= elem[0] || $guard(_exceptionable, {
|
|
976
|
+
path: _path + ".ranges[" + _index3 + "][0]",
|
|
977
|
+
expected: "number & Minimum<0>",
|
|
978
|
+
value: elem[0]
|
|
979
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
|
980
|
+
path: _path + ".ranges[" + _index3 + "][0]",
|
|
981
|
+
expected: "(number & Minimum<0>)",
|
|
982
|
+
value: elem[0]
|
|
983
|
+
}, errorFactory)) && ("number" === typeof elem[1] && (0 <= elem[1] || $guard(_exceptionable, {
|
|
984
|
+
path: _path + ".ranges[" + _index3 + "][1]",
|
|
985
|
+
expected: "number & Minimum<0>",
|
|
986
|
+
value: elem[1]
|
|
987
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
|
988
|
+
path: _path + ".ranges[" + _index3 + "][1]",
|
|
989
|
+
expected: "(number & Minimum<0>)",
|
|
990
|
+
value: elem[1]
|
|
991
|
+
}, errorFactory))) || $guard(_exceptionable, {
|
|
992
|
+
path: _path + ".ranges[" + _index3 + "]",
|
|
993
|
+
expected: "[start: number & Minimum<0>, end: number & Minimum<0>]",
|
|
994
|
+
value: elem
|
|
995
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
|
996
|
+
path: _path + ".ranges",
|
|
997
|
+
expected: "Array<[start: number & Minimum<0>, end: number & Minimum<0>]>",
|
|
998
|
+
value: input.ranges
|
|
1095
999
|
}, errorFactory)) && ("string" === typeof input.id && (/^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.id) || $guard(_exceptionable, {
|
|
1096
1000
|
path: _path + ".id",
|
|
1097
1001
|
expected: "string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">",
|
|
@@ -1124,12 +1028,12 @@ export const assertFileStats = (input, errorFactory) => {
|
|
|
1124
1028
|
path: _path + ".refs",
|
|
1125
1029
|
expected: "Array<__type>",
|
|
1126
1030
|
value: input.refs
|
|
1127
|
-
}, errorFactory)) && input.refs.every((elem,
|
|
1128
|
-
path: _path + ".refs[" +
|
|
1031
|
+
}, errorFactory)) && input.refs.every((elem, _index4) => ("object" === typeof elem && null !== elem && false === Array.isArray(elem) || $guard(_exceptionable, {
|
|
1032
|
+
path: _path + ".refs[" + _index4 + "]",
|
|
1129
1033
|
expected: "__type",
|
|
1130
1034
|
value: elem
|
|
1131
|
-
}, errorFactory)) && $ao1(elem, _path + ".refs[" +
|
|
1132
|
-
path: _path + ".refs[" +
|
|
1035
|
+
}, errorFactory)) && $ao1(elem, _path + ".refs[" + _index4 + "]", true && _exceptionable) || $guard(_exceptionable, {
|
|
1036
|
+
path: _path + ".refs[" + _index4 + "]",
|
|
1133
1037
|
expected: "__type",
|
|
1134
1038
|
value: elem
|
|
1135
1039
|
}, errorFactory)) || $guard(_exceptionable, {
|
|
@@ -1140,8 +1044,8 @@ export const assertFileStats = (input, errorFactory) => {
|
|
|
1140
1044
|
path: _path + ".tags",
|
|
1141
1045
|
expected: "Array<string>",
|
|
1142
1046
|
value: input.tags
|
|
1143
|
-
}, errorFactory)) && input.tags.every((elem,
|
|
1144
|
-
path: _path + ".tags[" +
|
|
1047
|
+
}, errorFactory)) && input.tags.every((elem, _index5) => "string" === typeof elem || $guard(_exceptionable, {
|
|
1048
|
+
path: _path + ".tags[" + _index5 + "]",
|
|
1145
1049
|
expected: "string",
|
|
1146
1050
|
value: elem
|
|
1147
1051
|
}, errorFactory)) || $guard(_exceptionable, {
|
|
@@ -1156,42 +1060,6 @@ export const assertFileStats = (input, errorFactory) => {
|
|
|
1156
1060
|
path: _path + ".mimeType",
|
|
1157
1061
|
expected: "string",
|
|
1158
1062
|
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
|
|
1195
1063
|
}, errorFactory)) && ("string" === typeof input.hash && (/^([A-Fa-f0-9]{32})?$/.test(input.hash) || $guard(_exceptionable, {
|
|
1196
1064
|
path: _path + ".hash",
|
|
1197
1065
|
expected: "string & Pattern<\"^([A-Fa-f0-9]{32})?$\">",
|
|
@@ -1364,6 +1232,22 @@ export const randomFileStats = generator => {
|
|
|
1364
1232
|
uploading: (generator?.boolean ?? $generator.boolean)(),
|
|
1365
1233
|
zones: (generator?.array ?? $generator.array)(() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()),
|
|
1366
1234
|
replicas: (generator?.array ?? $generator.array)(() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()),
|
|
1235
|
+
ranges: (generator?.array ?? $generator.array)(() => [
|
|
1236
|
+
(generator?.customs ?? $generator.customs)?.number?.([
|
|
1237
|
+
{
|
|
1238
|
+
name: "Minimum<0>",
|
|
1239
|
+
kind: "minimum",
|
|
1240
|
+
value: 0
|
|
1241
|
+
}
|
|
1242
|
+
]) ?? (generator?.number ?? $generator.number)(0, 10),
|
|
1243
|
+
(generator?.customs ?? $generator.customs)?.number?.([
|
|
1244
|
+
{
|
|
1245
|
+
name: "Minimum<0>",
|
|
1246
|
+
kind: "minimum",
|
|
1247
|
+
value: 0
|
|
1248
|
+
}
|
|
1249
|
+
]) ?? (generator?.number ?? $generator.number)(0, 10)
|
|
1250
|
+
]),
|
|
1367
1251
|
id: (generator?.customs ?? $generator.customs)?.string?.([
|
|
1368
1252
|
{
|
|
1369
1253
|
name: "Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">",
|
|
@@ -1392,22 +1276,6 @@ export const randomFileStats = generator => {
|
|
|
1392
1276
|
tags: (generator?.array ?? $generator.array)(() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()),
|
|
1393
1277
|
resumable: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
|
|
1394
1278
|
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
|
-
]),
|
|
1411
1279
|
hash: (generator?.customs ?? $generator.customs)?.string?.([
|
|
1412
1280
|
{
|
|
1413
1281
|
name: "Pattern<\"^([A-Fa-f0-9]{32})?$\">",
|
|
@@ -1503,7 +1371,7 @@ export const randomFileStats = generator => {
|
|
|
1503
1371
|
};
|
|
1504
1372
|
export const assertGuardFileStats = (input, errorFactory) => {
|
|
1505
1373
|
const __is = input => {
|
|
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 && (
|
|
1374
|
+
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)) && (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.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))));
|
|
1507
1375
|
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);
|
|
1508
1376
|
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)));
|
|
1509
1377
|
const $io3 = input => Object.keys(input).every(key => {
|
|
@@ -1559,6 +1427,42 @@ export const assertGuardFileStats = (input, errorFactory) => {
|
|
|
1559
1427
|
path: _path + ".replicas",
|
|
1560
1428
|
expected: "Array<string>",
|
|
1561
1429
|
value: input.replicas
|
|
1430
|
+
}, errorFactory)) && ((Array.isArray(input.ranges) || $guard(_exceptionable, {
|
|
1431
|
+
path: _path + ".ranges",
|
|
1432
|
+
expected: "Array<[start: number & Minimum<0>, end: number & Minimum<0>]>",
|
|
1433
|
+
value: input.ranges
|
|
1434
|
+
}, errorFactory)) && input.ranges.every((elem, _index3) => (Array.isArray(elem) || $guard(_exceptionable, {
|
|
1435
|
+
path: _path + ".ranges[" + _index3 + "]",
|
|
1436
|
+
expected: "[start: number & Minimum<0>, end: number & Minimum<0>]",
|
|
1437
|
+
value: elem
|
|
1438
|
+
}, errorFactory)) && ((elem.length === 2 || $guard(_exceptionable, {
|
|
1439
|
+
path: _path + ".ranges[" + _index3 + "]",
|
|
1440
|
+
expected: "[(number & Minimum<0>), (number & Minimum<0>)]",
|
|
1441
|
+
value: elem
|
|
1442
|
+
}, errorFactory)) && ("number" === typeof elem[0] && (0 <= elem[0] || $guard(_exceptionable, {
|
|
1443
|
+
path: _path + ".ranges[" + _index3 + "][0]",
|
|
1444
|
+
expected: "number & Minimum<0>",
|
|
1445
|
+
value: elem[0]
|
|
1446
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
|
1447
|
+
path: _path + ".ranges[" + _index3 + "][0]",
|
|
1448
|
+
expected: "(number & Minimum<0>)",
|
|
1449
|
+
value: elem[0]
|
|
1450
|
+
}, errorFactory)) && ("number" === typeof elem[1] && (0 <= elem[1] || $guard(_exceptionable, {
|
|
1451
|
+
path: _path + ".ranges[" + _index3 + "][1]",
|
|
1452
|
+
expected: "number & Minimum<0>",
|
|
1453
|
+
value: elem[1]
|
|
1454
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
|
1455
|
+
path: _path + ".ranges[" + _index3 + "][1]",
|
|
1456
|
+
expected: "(number & Minimum<0>)",
|
|
1457
|
+
value: elem[1]
|
|
1458
|
+
}, errorFactory))) || $guard(_exceptionable, {
|
|
1459
|
+
path: _path + ".ranges[" + _index3 + "]",
|
|
1460
|
+
expected: "[start: number & Minimum<0>, end: number & Minimum<0>]",
|
|
1461
|
+
value: elem
|
|
1462
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
|
1463
|
+
path: _path + ".ranges",
|
|
1464
|
+
expected: "Array<[start: number & Minimum<0>, end: number & Minimum<0>]>",
|
|
1465
|
+
value: input.ranges
|
|
1562
1466
|
}, errorFactory)) && ("string" === typeof input.id && (/^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.id) || $guard(_exceptionable, {
|
|
1563
1467
|
path: _path + ".id",
|
|
1564
1468
|
expected: "string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">",
|
|
@@ -1591,12 +1495,12 @@ export const assertGuardFileStats = (input, errorFactory) => {
|
|
|
1591
1495
|
path: _path + ".refs",
|
|
1592
1496
|
expected: "Array<__type>",
|
|
1593
1497
|
value: input.refs
|
|
1594
|
-
}, errorFactory)) && input.refs.every((elem,
|
|
1595
|
-
path: _path + ".refs[" +
|
|
1498
|
+
}, errorFactory)) && input.refs.every((elem, _index4) => ("object" === typeof elem && null !== elem && false === Array.isArray(elem) || $guard(_exceptionable, {
|
|
1499
|
+
path: _path + ".refs[" + _index4 + "]",
|
|
1596
1500
|
expected: "__type",
|
|
1597
1501
|
value: elem
|
|
1598
|
-
}, errorFactory)) && $ao1(elem, _path + ".refs[" +
|
|
1599
|
-
path: _path + ".refs[" +
|
|
1502
|
+
}, errorFactory)) && $ao1(elem, _path + ".refs[" + _index4 + "]", true && _exceptionable) || $guard(_exceptionable, {
|
|
1503
|
+
path: _path + ".refs[" + _index4 + "]",
|
|
1600
1504
|
expected: "__type",
|
|
1601
1505
|
value: elem
|
|
1602
1506
|
}, errorFactory)) || $guard(_exceptionable, {
|
|
@@ -1607,8 +1511,8 @@ export const assertGuardFileStats = (input, errorFactory) => {
|
|
|
1607
1511
|
path: _path + ".tags",
|
|
1608
1512
|
expected: "Array<string>",
|
|
1609
1513
|
value: input.tags
|
|
1610
|
-
}, errorFactory)) && input.tags.every((elem,
|
|
1611
|
-
path: _path + ".tags[" +
|
|
1514
|
+
}, errorFactory)) && input.tags.every((elem, _index5) => "string" === typeof elem || $guard(_exceptionable, {
|
|
1515
|
+
path: _path + ".tags[" + _index5 + "]",
|
|
1612
1516
|
expected: "string",
|
|
1613
1517
|
value: elem
|
|
1614
1518
|
}, errorFactory)) || $guard(_exceptionable, {
|
|
@@ -1623,42 +1527,6 @@ export const assertGuardFileStats = (input, errorFactory) => {
|
|
|
1623
1527
|
path: _path + ".mimeType",
|
|
1624
1528
|
expected: "string",
|
|
1625
1529
|
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
|
|
1662
1530
|
}, errorFactory)) && ("string" === typeof input.hash && (/^([A-Fa-f0-9]{32})?$/.test(input.hash) || $guard(_exceptionable, {
|
|
1663
1531
|
path: _path + ".hash",
|
|
1664
1532
|
expected: "string & Pattern<\"^([A-Fa-f0-9]{32})?$\">",
|
|
@@ -1821,7 +1689,7 @@ export const stringifyFileStats = input => {
|
|
|
1821
1689
|
const $string = __typia.json.createStringify.string;
|
|
1822
1690
|
const $throws = __typia.json.createStringify.throws;
|
|
1823
1691
|
const $tail = __typia.json.createStringify.tail;
|
|
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)},"
|
|
1692
|
+
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(",")}]`},"ranges":${`[${input.ranges.map(elem => `[${elem[0]},${elem[1]}]`).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 ? (() => {
|
|
1825
1693
|
if (Array.isArray(input.error))
|
|
1826
1694
|
return `[${input.error.map(elem => $so2(elem)).join(",")}]`;
|
|
1827
1695
|
if ("object" === typeof input.error && null !== input.error)
|
|
@@ -1839,7 +1707,7 @@ export const stringifyFileStats = input => {
|
|
|
1839
1707
|
};
|
|
1840
1708
|
export const assertStringifyFileStats = (input, errorFactory) => { const assert = (input, errorFactory) => {
|
|
1841
1709
|
const __is = input => {
|
|
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 && (
|
|
1710
|
+
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)) && (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.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))));
|
|
1843
1711
|
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));
|
|
1844
1712
|
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)));
|
|
1845
1713
|
const $io3 = input => Object.keys(input).every(key => {
|
|
@@ -1895,6 +1763,50 @@ export const assertStringifyFileStats = (input, errorFactory) => { const assert
|
|
|
1895
1763
|
path: _path + ".replicas",
|
|
1896
1764
|
expected: "Array<string>",
|
|
1897
1765
|
value: input.replicas
|
|
1766
|
+
}, errorFactory)) && ((Array.isArray(input.ranges) || $guard(_exceptionable, {
|
|
1767
|
+
path: _path + ".ranges",
|
|
1768
|
+
expected: "Array<[start: number & Minimum<0>, end: number & Minimum<0>]>",
|
|
1769
|
+
value: input.ranges
|
|
1770
|
+
}, errorFactory)) && input.ranges.every((elem, _index3) => (Array.isArray(elem) || $guard(_exceptionable, {
|
|
1771
|
+
path: _path + ".ranges[" + _index3 + "]",
|
|
1772
|
+
expected: "[start: number & Minimum<0>, end: number & Minimum<0>]",
|
|
1773
|
+
value: elem
|
|
1774
|
+
}, errorFactory)) && ((elem.length === 2 || $guard(_exceptionable, {
|
|
1775
|
+
path: _path + ".ranges[" + _index3 + "]",
|
|
1776
|
+
expected: "[(number & Minimum<0>), (number & Minimum<0>)]",
|
|
1777
|
+
value: elem
|
|
1778
|
+
}, errorFactory)) && ("number" === typeof elem[0] && (!Number.isNaN(elem[0]) || $guard(_exceptionable, {
|
|
1779
|
+
path: _path + ".ranges[" + _index3 + "][0]",
|
|
1780
|
+
expected: "number",
|
|
1781
|
+
value: elem[0]
|
|
1782
|
+
}, errorFactory)) && (0 <= elem[0] || $guard(_exceptionable, {
|
|
1783
|
+
path: _path + ".ranges[" + _index3 + "][0]",
|
|
1784
|
+
expected: "number & Minimum<0>",
|
|
1785
|
+
value: elem[0]
|
|
1786
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
|
1787
|
+
path: _path + ".ranges[" + _index3 + "][0]",
|
|
1788
|
+
expected: "(number & Minimum<0>)",
|
|
1789
|
+
value: elem[0]
|
|
1790
|
+
}, errorFactory)) && ("number" === typeof elem[1] && (!Number.isNaN(elem[1]) || $guard(_exceptionable, {
|
|
1791
|
+
path: _path + ".ranges[" + _index3 + "][1]",
|
|
1792
|
+
expected: "number",
|
|
1793
|
+
value: elem[1]
|
|
1794
|
+
}, errorFactory)) && (0 <= elem[1] || $guard(_exceptionable, {
|
|
1795
|
+
path: _path + ".ranges[" + _index3 + "][1]",
|
|
1796
|
+
expected: "number & Minimum<0>",
|
|
1797
|
+
value: elem[1]
|
|
1798
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
|
1799
|
+
path: _path + ".ranges[" + _index3 + "][1]",
|
|
1800
|
+
expected: "(number & Minimum<0>)",
|
|
1801
|
+
value: elem[1]
|
|
1802
|
+
}, errorFactory))) || $guard(_exceptionable, {
|
|
1803
|
+
path: _path + ".ranges[" + _index3 + "]",
|
|
1804
|
+
expected: "[start: number & Minimum<0>, end: number & Minimum<0>]",
|
|
1805
|
+
value: elem
|
|
1806
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
|
1807
|
+
path: _path + ".ranges",
|
|
1808
|
+
expected: "Array<[start: number & Minimum<0>, end: number & Minimum<0>]>",
|
|
1809
|
+
value: input.ranges
|
|
1898
1810
|
}, errorFactory)) && ("string" === typeof input.id && (/^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.id) || $guard(_exceptionable, {
|
|
1899
1811
|
path: _path + ".id",
|
|
1900
1812
|
expected: "string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">",
|
|
@@ -1927,12 +1839,12 @@ export const assertStringifyFileStats = (input, errorFactory) => { const assert
|
|
|
1927
1839
|
path: _path + ".refs",
|
|
1928
1840
|
expected: "Array<__type>",
|
|
1929
1841
|
value: input.refs
|
|
1930
|
-
}, errorFactory)) && input.refs.every((elem,
|
|
1931
|
-
path: _path + ".refs[" +
|
|
1842
|
+
}, errorFactory)) && input.refs.every((elem, _index4) => ("object" === typeof elem && null !== elem && false === Array.isArray(elem) || $guard(_exceptionable, {
|
|
1843
|
+
path: _path + ".refs[" + _index4 + "]",
|
|
1932
1844
|
expected: "__type",
|
|
1933
1845
|
value: elem
|
|
1934
|
-
}, errorFactory)) && $ao1(elem, _path + ".refs[" +
|
|
1935
|
-
path: _path + ".refs[" +
|
|
1846
|
+
}, errorFactory)) && $ao1(elem, _path + ".refs[" + _index4 + "]", true && _exceptionable) || $guard(_exceptionable, {
|
|
1847
|
+
path: _path + ".refs[" + _index4 + "]",
|
|
1936
1848
|
expected: "__type",
|
|
1937
1849
|
value: elem
|
|
1938
1850
|
}, errorFactory)) || $guard(_exceptionable, {
|
|
@@ -1943,8 +1855,8 @@ export const assertStringifyFileStats = (input, errorFactory) => { const assert
|
|
|
1943
1855
|
path: _path + ".tags",
|
|
1944
1856
|
expected: "Array<string>",
|
|
1945
1857
|
value: input.tags
|
|
1946
|
-
}, errorFactory)) && input.tags.every((elem,
|
|
1947
|
-
path: _path + ".tags[" +
|
|
1858
|
+
}, errorFactory)) && input.tags.every((elem, _index5) => "string" === typeof elem || $guard(_exceptionable, {
|
|
1859
|
+
path: _path + ".tags[" + _index5 + "]",
|
|
1948
1860
|
expected: "string",
|
|
1949
1861
|
value: elem
|
|
1950
1862
|
}, errorFactory)) || $guard(_exceptionable, {
|
|
@@ -1959,50 +1871,6 @@ export const assertStringifyFileStats = (input, errorFactory) => { const assert
|
|
|
1959
1871
|
path: _path + ".mimeType",
|
|
1960
1872
|
expected: "string",
|
|
1961
1873
|
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
|
|
2006
1874
|
}, errorFactory)) && ("string" === typeof input.hash && (/^([A-Fa-f0-9]{32})?$/.test(input.hash) || $guard(_exceptionable, {
|
|
2007
1875
|
path: _path + ".hash",
|
|
2008
1876
|
expected: "string & Pattern<\"^([A-Fa-f0-9]{32})?$\">",
|
|
@@ -2165,7 +2033,7 @@ export const assertStringifyFileStats = (input, errorFactory) => { const assert
|
|
|
2165
2033
|
const $string = __typia.json.createAssertStringify.string;
|
|
2166
2034
|
const $throws = __typia.json.createAssertStringify.throws;
|
|
2167
2035
|
const $tail = __typia.json.createAssertStringify.tail;
|
|
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)},"
|
|
2036
|
+
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(",")}]`},"ranges":${`[${input.ranges.map(elem => `[${elem[0]},${elem[1]}]`).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 ? (() => {
|
|
2169
2037
|
if (Array.isArray(input.error))
|
|
2170
2038
|
return `[${input.error.map(elem => $so2(elem)).join(",")}]`;
|
|
2171
2039
|
if ("object" === typeof input.error && null !== input.error)
|