@nxtedition/types 23.0.28 → 23.0.30
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 +2 -2
- package/dist/common/file.js +87 -100
- package/dist/domains/file.js +87 -100
- package/dist/schema.json +8 -8
- package/package.json +1 -1
package/dist/common/file.d.ts
CHANGED
|
@@ -47,12 +47,12 @@ export interface FileStats extends File {
|
|
|
47
47
|
zones: string[];
|
|
48
48
|
replicas: string[];
|
|
49
49
|
locations: string[];
|
|
50
|
-
progress: number & tags.Minimum<0> & tags.Maximum<1>;
|
|
51
|
-
speed: number & tags.Minimum<0> & tags.Maximum<1>;
|
|
52
50
|
ranges: Array<[
|
|
53
51
|
start: number & tags.Minimum<0>,
|
|
54
52
|
end: number & tags.Minimum<0>
|
|
55
53
|
]>;
|
|
54
|
+
progress: number & tags.Minimum<0> & tags.Maximum<1>;
|
|
55
|
+
speed: number & tags.Minimum<0>;
|
|
56
56
|
}
|
|
57
57
|
export declare const isFileStats: (input: unknown) => input is FileStats;
|
|
58
58
|
export declare const assertFileStats: (input: unknown) => FileStats;
|
package/dist/common/file.js
CHANGED
|
@@ -1223,7 +1223,7 @@ export const assertStringifyFile = (input, errorFactory) => { const assert = (in
|
|
|
1223
1223
|
return $so0(input);
|
|
1224
1224
|
}; return stringify(assert(input, errorFactory)); };
|
|
1225
1225
|
export const isFileStats = input => {
|
|
1226
|
-
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))) && (null === input.uploading || "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.locations) && input.locations.every(elem => "string" === typeof elem)) && (
|
|
1226
|
+
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))) && (null === input.uploading || "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.locations) && input.locations.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])))) && ("number" === typeof input.progress && (0 <= input.progress && input.progress <= 1)) && ("number" === typeof input.speed && 0 <= input.speed) && ("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.encoding && ("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))));
|
|
1227
1227
|
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);
|
|
1228
1228
|
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)));
|
|
1229
1229
|
const $io3 = input => Object.keys(input).every(key => {
|
|
@@ -1237,7 +1237,7 @@ export const isFileStats = input => {
|
|
|
1237
1237
|
};
|
|
1238
1238
|
export const assertFileStats = (input, errorFactory) => {
|
|
1239
1239
|
const __is = input => {
|
|
1240
|
-
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))) && (null === input.uploading || "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.locations) && input.locations.every(elem => "string" === typeof elem)) && (
|
|
1240
|
+
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))) && (null === input.uploading || "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.locations) && input.locations.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])))) && ("number" === typeof input.progress && (0 <= input.progress && input.progress <= 1)) && ("number" === typeof input.speed && 0 <= input.speed) && ("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.encoding && ("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))));
|
|
1241
1241
|
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);
|
|
1242
1242
|
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)));
|
|
1243
1243
|
const $io3 = input => Object.keys(input).every(key => {
|
|
@@ -1305,30 +1305,6 @@ export const assertFileStats = (input, errorFactory) => {
|
|
|
1305
1305
|
path: _path + ".locations",
|
|
1306
1306
|
expected: "Array<string>",
|
|
1307
1307
|
value: input.locations
|
|
1308
|
-
}, errorFactory)) && ("number" === typeof input.progress && (0 <= input.progress || $guard(_exceptionable, {
|
|
1309
|
-
path: _path + ".progress",
|
|
1310
|
-
expected: "number & Minimum<0>",
|
|
1311
|
-
value: input.progress
|
|
1312
|
-
}, errorFactory)) && (input.progress <= 1 || $guard(_exceptionable, {
|
|
1313
|
-
path: _path + ".progress",
|
|
1314
|
-
expected: "number & Maximum<1>",
|
|
1315
|
-
value: input.progress
|
|
1316
|
-
}, errorFactory)) || $guard(_exceptionable, {
|
|
1317
|
-
path: _path + ".progress",
|
|
1318
|
-
expected: "(number & Minimum<0> & Maximum<1>)",
|
|
1319
|
-
value: input.progress
|
|
1320
|
-
}, errorFactory)) && ("number" === typeof input.speed && (0 <= input.speed || $guard(_exceptionable, {
|
|
1321
|
-
path: _path + ".speed",
|
|
1322
|
-
expected: "number & Minimum<0>",
|
|
1323
|
-
value: input.speed
|
|
1324
|
-
}, errorFactory)) && (input.speed <= 1 || $guard(_exceptionable, {
|
|
1325
|
-
path: _path + ".speed",
|
|
1326
|
-
expected: "number & Maximum<1>",
|
|
1327
|
-
value: input.speed
|
|
1328
|
-
}, errorFactory)) || $guard(_exceptionable, {
|
|
1329
|
-
path: _path + ".speed",
|
|
1330
|
-
expected: "(number & Minimum<0> & Maximum<1>)",
|
|
1331
|
-
value: input.speed
|
|
1332
1308
|
}, errorFactory)) && ((Array.isArray(input.ranges) || $guard(_exceptionable, {
|
|
1333
1309
|
path: _path + ".ranges",
|
|
1334
1310
|
expected: "Array<[start: number & Minimum<0>, end: number & Minimum<0>]>",
|
|
@@ -1365,6 +1341,26 @@ export const assertFileStats = (input, errorFactory) => {
|
|
|
1365
1341
|
path: _path + ".ranges",
|
|
1366
1342
|
expected: "Array<[start: number & Minimum<0>, end: number & Minimum<0>]>",
|
|
1367
1343
|
value: input.ranges
|
|
1344
|
+
}, errorFactory)) && ("number" === typeof input.progress && (0 <= input.progress || $guard(_exceptionable, {
|
|
1345
|
+
path: _path + ".progress",
|
|
1346
|
+
expected: "number & Minimum<0>",
|
|
1347
|
+
value: input.progress
|
|
1348
|
+
}, errorFactory)) && (input.progress <= 1 || $guard(_exceptionable, {
|
|
1349
|
+
path: _path + ".progress",
|
|
1350
|
+
expected: "number & Maximum<1>",
|
|
1351
|
+
value: input.progress
|
|
1352
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
|
1353
|
+
path: _path + ".progress",
|
|
1354
|
+
expected: "(number & Minimum<0> & Maximum<1>)",
|
|
1355
|
+
value: input.progress
|
|
1356
|
+
}, errorFactory)) && ("number" === typeof input.speed && (0 <= input.speed || $guard(_exceptionable, {
|
|
1357
|
+
path: _path + ".speed",
|
|
1358
|
+
expected: "number & Minimum<0>",
|
|
1359
|
+
value: input.speed
|
|
1360
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
|
1361
|
+
path: _path + ".speed",
|
|
1362
|
+
expected: "(number & Minimum<0>)",
|
|
1363
|
+
value: input.speed
|
|
1368
1364
|
}, errorFactory)) && ("string" === typeof input.id && (/^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.id) || $guard(_exceptionable, {
|
|
1369
1365
|
path: _path + ".id",
|
|
1370
1366
|
expected: "string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">",
|
|
@@ -1609,6 +1605,22 @@ export const randomFileStats = generator => {
|
|
|
1609
1605
|
zones: (generator?.array ?? $generator.array)(() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()),
|
|
1610
1606
|
replicas: (generator?.array ?? $generator.array)(() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()),
|
|
1611
1607
|
locations: (generator?.array ?? $generator.array)(() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()),
|
|
1608
|
+
ranges: (generator?.array ?? $generator.array)(() => [
|
|
1609
|
+
(generator?.customs ?? $generator.customs)?.number?.([
|
|
1610
|
+
{
|
|
1611
|
+
name: "Minimum<0>",
|
|
1612
|
+
kind: "minimum",
|
|
1613
|
+
value: 0
|
|
1614
|
+
}
|
|
1615
|
+
]) ?? (generator?.number ?? $generator.number)(0, 10),
|
|
1616
|
+
(generator?.customs ?? $generator.customs)?.number?.([
|
|
1617
|
+
{
|
|
1618
|
+
name: "Minimum<0>",
|
|
1619
|
+
kind: "minimum",
|
|
1620
|
+
value: 0
|
|
1621
|
+
}
|
|
1622
|
+
]) ?? (generator?.number ?? $generator.number)(0, 10)
|
|
1623
|
+
]),
|
|
1612
1624
|
progress: (generator?.customs ?? $generator.customs)?.number?.([
|
|
1613
1625
|
{
|
|
1614
1626
|
name: "Minimum<0>",
|
|
@@ -1626,29 +1638,8 @@ export const randomFileStats = generator => {
|
|
|
1626
1638
|
name: "Minimum<0>",
|
|
1627
1639
|
kind: "minimum",
|
|
1628
1640
|
value: 0
|
|
1629
|
-
},
|
|
1630
|
-
{
|
|
1631
|
-
name: "Maximum<1>",
|
|
1632
|
-
kind: "maximum",
|
|
1633
|
-
value: 1
|
|
1634
1641
|
}
|
|
1635
|
-
]) ?? (generator?.number ?? $generator.number)(0,
|
|
1636
|
-
ranges: (generator?.array ?? $generator.array)(() => [
|
|
1637
|
-
(generator?.customs ?? $generator.customs)?.number?.([
|
|
1638
|
-
{
|
|
1639
|
-
name: "Minimum<0>",
|
|
1640
|
-
kind: "minimum",
|
|
1641
|
-
value: 0
|
|
1642
|
-
}
|
|
1643
|
-
]) ?? (generator?.number ?? $generator.number)(0, 10),
|
|
1644
|
-
(generator?.customs ?? $generator.customs)?.number?.([
|
|
1645
|
-
{
|
|
1646
|
-
name: "Minimum<0>",
|
|
1647
|
-
kind: "minimum",
|
|
1648
|
-
value: 0
|
|
1649
|
-
}
|
|
1650
|
-
]) ?? (generator?.number ?? $generator.number)(0, 10)
|
|
1651
|
-
]),
|
|
1642
|
+
]) ?? (generator?.number ?? $generator.number)(0, 10),
|
|
1652
1643
|
id: (generator?.customs ?? $generator.customs)?.string?.([
|
|
1653
1644
|
{
|
|
1654
1645
|
name: "Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">",
|
|
@@ -1773,7 +1764,7 @@ export const randomFileStats = generator => {
|
|
|
1773
1764
|
};
|
|
1774
1765
|
export const assertGuardFileStats = (input, errorFactory) => {
|
|
1775
1766
|
const __is = input => {
|
|
1776
|
-
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))) && (null === input.uploading || "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.locations) && input.locations.every(elem => "string" === typeof elem)) && (
|
|
1767
|
+
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))) && (null === input.uploading || "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.locations) && input.locations.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])))) && ("number" === typeof input.progress && (0 <= input.progress && input.progress <= 1)) && ("number" === typeof input.speed && 0 <= input.speed) && ("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.encoding && ("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))));
|
|
1777
1768
|
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);
|
|
1778
1769
|
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)));
|
|
1779
1770
|
const $io3 = input => Object.keys(input).every(key => {
|
|
@@ -1841,30 +1832,6 @@ export const assertGuardFileStats = (input, errorFactory) => {
|
|
|
1841
1832
|
path: _path + ".locations",
|
|
1842
1833
|
expected: "Array<string>",
|
|
1843
1834
|
value: input.locations
|
|
1844
|
-
}, errorFactory)) && ("number" === typeof input.progress && (0 <= input.progress || $guard(_exceptionable, {
|
|
1845
|
-
path: _path + ".progress",
|
|
1846
|
-
expected: "number & Minimum<0>",
|
|
1847
|
-
value: input.progress
|
|
1848
|
-
}, errorFactory)) && (input.progress <= 1 || $guard(_exceptionable, {
|
|
1849
|
-
path: _path + ".progress",
|
|
1850
|
-
expected: "number & Maximum<1>",
|
|
1851
|
-
value: input.progress
|
|
1852
|
-
}, errorFactory)) || $guard(_exceptionable, {
|
|
1853
|
-
path: _path + ".progress",
|
|
1854
|
-
expected: "(number & Minimum<0> & Maximum<1>)",
|
|
1855
|
-
value: input.progress
|
|
1856
|
-
}, errorFactory)) && ("number" === typeof input.speed && (0 <= input.speed || $guard(_exceptionable, {
|
|
1857
|
-
path: _path + ".speed",
|
|
1858
|
-
expected: "number & Minimum<0>",
|
|
1859
|
-
value: input.speed
|
|
1860
|
-
}, errorFactory)) && (input.speed <= 1 || $guard(_exceptionable, {
|
|
1861
|
-
path: _path + ".speed",
|
|
1862
|
-
expected: "number & Maximum<1>",
|
|
1863
|
-
value: input.speed
|
|
1864
|
-
}, errorFactory)) || $guard(_exceptionable, {
|
|
1865
|
-
path: _path + ".speed",
|
|
1866
|
-
expected: "(number & Minimum<0> & Maximum<1>)",
|
|
1867
|
-
value: input.speed
|
|
1868
1835
|
}, errorFactory)) && ((Array.isArray(input.ranges) || $guard(_exceptionable, {
|
|
1869
1836
|
path: _path + ".ranges",
|
|
1870
1837
|
expected: "Array<[start: number & Minimum<0>, end: number & Minimum<0>]>",
|
|
@@ -1901,6 +1868,26 @@ export const assertGuardFileStats = (input, errorFactory) => {
|
|
|
1901
1868
|
path: _path + ".ranges",
|
|
1902
1869
|
expected: "Array<[start: number & Minimum<0>, end: number & Minimum<0>]>",
|
|
1903
1870
|
value: input.ranges
|
|
1871
|
+
}, errorFactory)) && ("number" === typeof input.progress && (0 <= input.progress || $guard(_exceptionable, {
|
|
1872
|
+
path: _path + ".progress",
|
|
1873
|
+
expected: "number & Minimum<0>",
|
|
1874
|
+
value: input.progress
|
|
1875
|
+
}, errorFactory)) && (input.progress <= 1 || $guard(_exceptionable, {
|
|
1876
|
+
path: _path + ".progress",
|
|
1877
|
+
expected: "number & Maximum<1>",
|
|
1878
|
+
value: input.progress
|
|
1879
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
|
1880
|
+
path: _path + ".progress",
|
|
1881
|
+
expected: "(number & Minimum<0> & Maximum<1>)",
|
|
1882
|
+
value: input.progress
|
|
1883
|
+
}, errorFactory)) && ("number" === typeof input.speed && (0 <= input.speed || $guard(_exceptionable, {
|
|
1884
|
+
path: _path + ".speed",
|
|
1885
|
+
expected: "number & Minimum<0>",
|
|
1886
|
+
value: input.speed
|
|
1887
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
|
1888
|
+
path: _path + ".speed",
|
|
1889
|
+
expected: "(number & Minimum<0>)",
|
|
1890
|
+
value: input.speed
|
|
1904
1891
|
}, errorFactory)) && ("string" === typeof input.id && (/^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.id) || $guard(_exceptionable, {
|
|
1905
1892
|
path: _path + ".id",
|
|
1906
1893
|
expected: "string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">",
|
|
@@ -2131,7 +2118,7 @@ export const stringifyFileStats = input => {
|
|
|
2131
2118
|
const $string = __typia.json.createStringify.string;
|
|
2132
2119
|
const $throws = __typia.json.createStringify.throws;
|
|
2133
2120
|
const $tail = __typia.json.createStringify.tail;
|
|
2134
|
-
const $so0 = input => `{"position":${null !== input.position ? input.position : "null"},"uploading":${null !== input.uploading ? input.uploading : "null"},"zones":${`[${input.zones.map(elem => $string(elem)).join(",")}]`},"replicas":${`[${input.replicas.map(elem => $string(elem)).join(",")}]`},"locations":${`[${input.locations.map(elem => $string(elem)).join(",")}]`},"
|
|
2121
|
+
const $so0 = input => `{"position":${null !== input.position ? input.position : "null"},"uploading":${null !== input.uploading ? input.uploading : "null"},"zones":${`[${input.zones.map(elem => $string(elem)).join(",")}]`},"replicas":${`[${input.replicas.map(elem => $string(elem)).join(",")}]`},"locations":${`[${input.locations.map(elem => $string(elem)).join(",")}]`},"ranges":${`[${input.ranges.map(elem => `[${elem[0]},${elem[1]}]`).join(",")}]`},"progress":${input.progress},"speed":${input.speed},"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)},"encoding":${$string(input.encoding)},"hash":${$string(input.hash)},"btime":${input.btime},"completed":${input.completed},"error":${null !== input.error ? (() => {
|
|
2135
2122
|
if (Array.isArray(input.error))
|
|
2136
2123
|
return `[${input.error.map(elem => $so2(elem)).join(",")}]`;
|
|
2137
2124
|
if ("object" === typeof input.error && null !== input.error)
|
|
@@ -2149,7 +2136,7 @@ export const stringifyFileStats = input => {
|
|
|
2149
2136
|
};
|
|
2150
2137
|
export const assertStringifyFileStats = (input, errorFactory) => { const assert = (input, errorFactory) => {
|
|
2151
2138
|
const __is = input => {
|
|
2152
|
-
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))) && (null === input.uploading || "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.locations) && input.locations.every(elem => "string" === typeof elem)) && (
|
|
2139
|
+
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))) && (null === input.uploading || "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.locations) && input.locations.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]))))) && ("number" === typeof input.progress && (0 <= input.progress && input.progress <= 1)) && ("number" === typeof input.speed && (!Number.isNaN(input.speed) && 0 <= input.speed)) && ("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.encoding && ("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))));
|
|
2153
2140
|
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));
|
|
2154
2141
|
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)));
|
|
2155
2142
|
const $io3 = input => Object.keys(input).every(key => {
|
|
@@ -2217,30 +2204,6 @@ export const assertStringifyFileStats = (input, errorFactory) => { const assert
|
|
|
2217
2204
|
path: _path + ".locations",
|
|
2218
2205
|
expected: "Array<string>",
|
|
2219
2206
|
value: input.locations
|
|
2220
|
-
}, errorFactory)) && ("number" === typeof input.progress && (0 <= input.progress || $guard(_exceptionable, {
|
|
2221
|
-
path: _path + ".progress",
|
|
2222
|
-
expected: "number & Minimum<0>",
|
|
2223
|
-
value: input.progress
|
|
2224
|
-
}, errorFactory)) && (input.progress <= 1 || $guard(_exceptionable, {
|
|
2225
|
-
path: _path + ".progress",
|
|
2226
|
-
expected: "number & Maximum<1>",
|
|
2227
|
-
value: input.progress
|
|
2228
|
-
}, errorFactory)) || $guard(_exceptionable, {
|
|
2229
|
-
path: _path + ".progress",
|
|
2230
|
-
expected: "(number & Minimum<0> & Maximum<1>)",
|
|
2231
|
-
value: input.progress
|
|
2232
|
-
}, errorFactory)) && ("number" === typeof input.speed && (0 <= input.speed || $guard(_exceptionable, {
|
|
2233
|
-
path: _path + ".speed",
|
|
2234
|
-
expected: "number & Minimum<0>",
|
|
2235
|
-
value: input.speed
|
|
2236
|
-
}, errorFactory)) && (input.speed <= 1 || $guard(_exceptionable, {
|
|
2237
|
-
path: _path + ".speed",
|
|
2238
|
-
expected: "number & Maximum<1>",
|
|
2239
|
-
value: input.speed
|
|
2240
|
-
}, errorFactory)) || $guard(_exceptionable, {
|
|
2241
|
-
path: _path + ".speed",
|
|
2242
|
-
expected: "(number & Minimum<0> & Maximum<1>)",
|
|
2243
|
-
value: input.speed
|
|
2244
2207
|
}, errorFactory)) && ((Array.isArray(input.ranges) || $guard(_exceptionable, {
|
|
2245
2208
|
path: _path + ".ranges",
|
|
2246
2209
|
expected: "Array<[start: number & Minimum<0>, end: number & Minimum<0>]>",
|
|
@@ -2285,6 +2248,30 @@ export const assertStringifyFileStats = (input, errorFactory) => { const assert
|
|
|
2285
2248
|
path: _path + ".ranges",
|
|
2286
2249
|
expected: "Array<[start: number & Minimum<0>, end: number & Minimum<0>]>",
|
|
2287
2250
|
value: input.ranges
|
|
2251
|
+
}, errorFactory)) && ("number" === typeof input.progress && (0 <= input.progress || $guard(_exceptionable, {
|
|
2252
|
+
path: _path + ".progress",
|
|
2253
|
+
expected: "number & Minimum<0>",
|
|
2254
|
+
value: input.progress
|
|
2255
|
+
}, errorFactory)) && (input.progress <= 1 || $guard(_exceptionable, {
|
|
2256
|
+
path: _path + ".progress",
|
|
2257
|
+
expected: "number & Maximum<1>",
|
|
2258
|
+
value: input.progress
|
|
2259
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
|
2260
|
+
path: _path + ".progress",
|
|
2261
|
+
expected: "(number & Minimum<0> & Maximum<1>)",
|
|
2262
|
+
value: input.progress
|
|
2263
|
+
}, errorFactory)) && ("number" === typeof input.speed && (!Number.isNaN(input.speed) || $guard(_exceptionable, {
|
|
2264
|
+
path: _path + ".speed",
|
|
2265
|
+
expected: "number",
|
|
2266
|
+
value: input.speed
|
|
2267
|
+
}, errorFactory)) && (0 <= input.speed || $guard(_exceptionable, {
|
|
2268
|
+
path: _path + ".speed",
|
|
2269
|
+
expected: "number & Minimum<0>",
|
|
2270
|
+
value: input.speed
|
|
2271
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
|
2272
|
+
path: _path + ".speed",
|
|
2273
|
+
expected: "(number & Minimum<0>)",
|
|
2274
|
+
value: input.speed
|
|
2288
2275
|
}, errorFactory)) && ("string" === typeof input.id && (/^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.id) || $guard(_exceptionable, {
|
|
2289
2276
|
path: _path + ".id",
|
|
2290
2277
|
expected: "string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">",
|
|
@@ -2515,7 +2502,7 @@ export const assertStringifyFileStats = (input, errorFactory) => { const assert
|
|
|
2515
2502
|
const $string = __typia.json.createAssertStringify.string;
|
|
2516
2503
|
const $throws = __typia.json.createAssertStringify.throws;
|
|
2517
2504
|
const $tail = __typia.json.createAssertStringify.tail;
|
|
2518
|
-
const $so0 = input => `{"position":${null !== input.position ? input.position : "null"},"uploading":${null !== input.uploading ? input.uploading : "null"},"zones":${`[${input.zones.map(elem => $string(elem)).join(",")}]`},"replicas":${`[${input.replicas.map(elem => $string(elem)).join(",")}]`},"locations":${`[${input.locations.map(elem => $string(elem)).join(",")}]`},"
|
|
2505
|
+
const $so0 = input => `{"position":${null !== input.position ? input.position : "null"},"uploading":${null !== input.uploading ? input.uploading : "null"},"zones":${`[${input.zones.map(elem => $string(elem)).join(",")}]`},"replicas":${`[${input.replicas.map(elem => $string(elem)).join(",")}]`},"locations":${`[${input.locations.map(elem => $string(elem)).join(",")}]`},"ranges":${`[${input.ranges.map(elem => `[${elem[0]},${elem[1]}]`).join(",")}]`},"progress":${input.progress},"speed":${input.speed},"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)},"encoding":${$string(input.encoding)},"hash":${$string(input.hash)},"btime":${input.btime},"completed":${input.completed},"error":${null !== input.error ? (() => {
|
|
2519
2506
|
if (Array.isArray(input.error))
|
|
2520
2507
|
return `[${input.error.map(elem => $so2(elem)).join(",")}]`;
|
|
2521
2508
|
if ("object" === typeof input.error && null !== input.error)
|
package/dist/domains/file.js
CHANGED
|
@@ -1203,7 +1203,7 @@ export const assertStringifyFileRestrictionsRecord = (input, errorFactory) => {
|
|
|
1203
1203
|
return $so0(input);
|
|
1204
1204
|
}; return stringify(assert(input, errorFactory)); };
|
|
1205
1205
|
export const isFileDomainStatsRecord = input => {
|
|
1206
|
-
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))) && (null === input.uploading || "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.locations) && input.locations.every(elem => "string" === typeof elem)) && (
|
|
1206
|
+
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))) && (null === input.uploading || "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.locations) && input.locations.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])))) && ("number" === typeof input.progress && (0 <= input.progress && input.progress <= 1)) && ("number" === typeof input.speed && 0 <= input.speed) && ("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.encoding && ("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))));
|
|
1207
1207
|
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);
|
|
1208
1208
|
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)));
|
|
1209
1209
|
const $io3 = input => Object.keys(input).every(key => {
|
|
@@ -1217,7 +1217,7 @@ export const isFileDomainStatsRecord = input => {
|
|
|
1217
1217
|
};
|
|
1218
1218
|
export const assertFileDomainStatsRecord = (input, errorFactory) => {
|
|
1219
1219
|
const __is = input => {
|
|
1220
|
-
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))) && (null === input.uploading || "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.locations) && input.locations.every(elem => "string" === typeof elem)) && (
|
|
1220
|
+
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))) && (null === input.uploading || "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.locations) && input.locations.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])))) && ("number" === typeof input.progress && (0 <= input.progress && input.progress <= 1)) && ("number" === typeof input.speed && 0 <= input.speed) && ("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.encoding && ("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))));
|
|
1221
1221
|
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);
|
|
1222
1222
|
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)));
|
|
1223
1223
|
const $io3 = input => Object.keys(input).every(key => {
|
|
@@ -1285,30 +1285,6 @@ export const assertFileDomainStatsRecord = (input, errorFactory) => {
|
|
|
1285
1285
|
path: _path + ".locations",
|
|
1286
1286
|
expected: "Array<string>",
|
|
1287
1287
|
value: input.locations
|
|
1288
|
-
}, errorFactory)) && ("number" === typeof input.progress && (0 <= input.progress || $guard(_exceptionable, {
|
|
1289
|
-
path: _path + ".progress",
|
|
1290
|
-
expected: "number & Minimum<0>",
|
|
1291
|
-
value: input.progress
|
|
1292
|
-
}, errorFactory)) && (input.progress <= 1 || $guard(_exceptionable, {
|
|
1293
|
-
path: _path + ".progress",
|
|
1294
|
-
expected: "number & Maximum<1>",
|
|
1295
|
-
value: input.progress
|
|
1296
|
-
}, errorFactory)) || $guard(_exceptionable, {
|
|
1297
|
-
path: _path + ".progress",
|
|
1298
|
-
expected: "(number & Minimum<0> & Maximum<1>)",
|
|
1299
|
-
value: input.progress
|
|
1300
|
-
}, errorFactory)) && ("number" === typeof input.speed && (0 <= input.speed || $guard(_exceptionable, {
|
|
1301
|
-
path: _path + ".speed",
|
|
1302
|
-
expected: "number & Minimum<0>",
|
|
1303
|
-
value: input.speed
|
|
1304
|
-
}, errorFactory)) && (input.speed <= 1 || $guard(_exceptionable, {
|
|
1305
|
-
path: _path + ".speed",
|
|
1306
|
-
expected: "number & Maximum<1>",
|
|
1307
|
-
value: input.speed
|
|
1308
|
-
}, errorFactory)) || $guard(_exceptionable, {
|
|
1309
|
-
path: _path + ".speed",
|
|
1310
|
-
expected: "(number & Minimum<0> & Maximum<1>)",
|
|
1311
|
-
value: input.speed
|
|
1312
1288
|
}, errorFactory)) && ((Array.isArray(input.ranges) || $guard(_exceptionable, {
|
|
1313
1289
|
path: _path + ".ranges",
|
|
1314
1290
|
expected: "Array<[start: number & Minimum<0>, end: number & Minimum<0>]>",
|
|
@@ -1345,6 +1321,26 @@ export const assertFileDomainStatsRecord = (input, errorFactory) => {
|
|
|
1345
1321
|
path: _path + ".ranges",
|
|
1346
1322
|
expected: "Array<[start: number & Minimum<0>, end: number & Minimum<0>]>",
|
|
1347
1323
|
value: input.ranges
|
|
1324
|
+
}, errorFactory)) && ("number" === typeof input.progress && (0 <= input.progress || $guard(_exceptionable, {
|
|
1325
|
+
path: _path + ".progress",
|
|
1326
|
+
expected: "number & Minimum<0>",
|
|
1327
|
+
value: input.progress
|
|
1328
|
+
}, errorFactory)) && (input.progress <= 1 || $guard(_exceptionable, {
|
|
1329
|
+
path: _path + ".progress",
|
|
1330
|
+
expected: "number & Maximum<1>",
|
|
1331
|
+
value: input.progress
|
|
1332
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
|
1333
|
+
path: _path + ".progress",
|
|
1334
|
+
expected: "(number & Minimum<0> & Maximum<1>)",
|
|
1335
|
+
value: input.progress
|
|
1336
|
+
}, errorFactory)) && ("number" === typeof input.speed && (0 <= input.speed || $guard(_exceptionable, {
|
|
1337
|
+
path: _path + ".speed",
|
|
1338
|
+
expected: "number & Minimum<0>",
|
|
1339
|
+
value: input.speed
|
|
1340
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
|
1341
|
+
path: _path + ".speed",
|
|
1342
|
+
expected: "(number & Minimum<0>)",
|
|
1343
|
+
value: input.speed
|
|
1348
1344
|
}, errorFactory)) && ("string" === typeof input.id && (/^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.id) || $guard(_exceptionable, {
|
|
1349
1345
|
path: _path + ".id",
|
|
1350
1346
|
expected: "string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">",
|
|
@@ -1589,6 +1585,22 @@ export const randomFileDomainStatsRecord = generator => {
|
|
|
1589
1585
|
zones: (generator?.array ?? $generator.array)(() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()),
|
|
1590
1586
|
replicas: (generator?.array ?? $generator.array)(() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()),
|
|
1591
1587
|
locations: (generator?.array ?? $generator.array)(() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()),
|
|
1588
|
+
ranges: (generator?.array ?? $generator.array)(() => [
|
|
1589
|
+
(generator?.customs ?? $generator.customs)?.number?.([
|
|
1590
|
+
{
|
|
1591
|
+
name: "Minimum<0>",
|
|
1592
|
+
kind: "minimum",
|
|
1593
|
+
value: 0
|
|
1594
|
+
}
|
|
1595
|
+
]) ?? (generator?.number ?? $generator.number)(0, 10),
|
|
1596
|
+
(generator?.customs ?? $generator.customs)?.number?.([
|
|
1597
|
+
{
|
|
1598
|
+
name: "Minimum<0>",
|
|
1599
|
+
kind: "minimum",
|
|
1600
|
+
value: 0
|
|
1601
|
+
}
|
|
1602
|
+
]) ?? (generator?.number ?? $generator.number)(0, 10)
|
|
1603
|
+
]),
|
|
1592
1604
|
progress: (generator?.customs ?? $generator.customs)?.number?.([
|
|
1593
1605
|
{
|
|
1594
1606
|
name: "Minimum<0>",
|
|
@@ -1606,29 +1618,8 @@ export const randomFileDomainStatsRecord = generator => {
|
|
|
1606
1618
|
name: "Minimum<0>",
|
|
1607
1619
|
kind: "minimum",
|
|
1608
1620
|
value: 0
|
|
1609
|
-
},
|
|
1610
|
-
{
|
|
1611
|
-
name: "Maximum<1>",
|
|
1612
|
-
kind: "maximum",
|
|
1613
|
-
value: 1
|
|
1614
1621
|
}
|
|
1615
|
-
]) ?? (generator?.number ?? $generator.number)(0,
|
|
1616
|
-
ranges: (generator?.array ?? $generator.array)(() => [
|
|
1617
|
-
(generator?.customs ?? $generator.customs)?.number?.([
|
|
1618
|
-
{
|
|
1619
|
-
name: "Minimum<0>",
|
|
1620
|
-
kind: "minimum",
|
|
1621
|
-
value: 0
|
|
1622
|
-
}
|
|
1623
|
-
]) ?? (generator?.number ?? $generator.number)(0, 10),
|
|
1624
|
-
(generator?.customs ?? $generator.customs)?.number?.([
|
|
1625
|
-
{
|
|
1626
|
-
name: "Minimum<0>",
|
|
1627
|
-
kind: "minimum",
|
|
1628
|
-
value: 0
|
|
1629
|
-
}
|
|
1630
|
-
]) ?? (generator?.number ?? $generator.number)(0, 10)
|
|
1631
|
-
]),
|
|
1622
|
+
]) ?? (generator?.number ?? $generator.number)(0, 10),
|
|
1632
1623
|
id: (generator?.customs ?? $generator.customs)?.string?.([
|
|
1633
1624
|
{
|
|
1634
1625
|
name: "Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">",
|
|
@@ -1753,7 +1744,7 @@ export const randomFileDomainStatsRecord = generator => {
|
|
|
1753
1744
|
};
|
|
1754
1745
|
export const assertGuardFileDomainStatsRecord = (input, errorFactory) => {
|
|
1755
1746
|
const __is = input => {
|
|
1756
|
-
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))) && (null === input.uploading || "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.locations) && input.locations.every(elem => "string" === typeof elem)) && (
|
|
1747
|
+
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))) && (null === input.uploading || "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.locations) && input.locations.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])))) && ("number" === typeof input.progress && (0 <= input.progress && input.progress <= 1)) && ("number" === typeof input.speed && 0 <= input.speed) && ("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.encoding && ("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))));
|
|
1757
1748
|
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);
|
|
1758
1749
|
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)));
|
|
1759
1750
|
const $io3 = input => Object.keys(input).every(key => {
|
|
@@ -1821,30 +1812,6 @@ export const assertGuardFileDomainStatsRecord = (input, errorFactory) => {
|
|
|
1821
1812
|
path: _path + ".locations",
|
|
1822
1813
|
expected: "Array<string>",
|
|
1823
1814
|
value: input.locations
|
|
1824
|
-
}, errorFactory)) && ("number" === typeof input.progress && (0 <= input.progress || $guard(_exceptionable, {
|
|
1825
|
-
path: _path + ".progress",
|
|
1826
|
-
expected: "number & Minimum<0>",
|
|
1827
|
-
value: input.progress
|
|
1828
|
-
}, errorFactory)) && (input.progress <= 1 || $guard(_exceptionable, {
|
|
1829
|
-
path: _path + ".progress",
|
|
1830
|
-
expected: "number & Maximum<1>",
|
|
1831
|
-
value: input.progress
|
|
1832
|
-
}, errorFactory)) || $guard(_exceptionable, {
|
|
1833
|
-
path: _path + ".progress",
|
|
1834
|
-
expected: "(number & Minimum<0> & Maximum<1>)",
|
|
1835
|
-
value: input.progress
|
|
1836
|
-
}, errorFactory)) && ("number" === typeof input.speed && (0 <= input.speed || $guard(_exceptionable, {
|
|
1837
|
-
path: _path + ".speed",
|
|
1838
|
-
expected: "number & Minimum<0>",
|
|
1839
|
-
value: input.speed
|
|
1840
|
-
}, errorFactory)) && (input.speed <= 1 || $guard(_exceptionable, {
|
|
1841
|
-
path: _path + ".speed",
|
|
1842
|
-
expected: "number & Maximum<1>",
|
|
1843
|
-
value: input.speed
|
|
1844
|
-
}, errorFactory)) || $guard(_exceptionable, {
|
|
1845
|
-
path: _path + ".speed",
|
|
1846
|
-
expected: "(number & Minimum<0> & Maximum<1>)",
|
|
1847
|
-
value: input.speed
|
|
1848
1815
|
}, errorFactory)) && ((Array.isArray(input.ranges) || $guard(_exceptionable, {
|
|
1849
1816
|
path: _path + ".ranges",
|
|
1850
1817
|
expected: "Array<[start: number & Minimum<0>, end: number & Minimum<0>]>",
|
|
@@ -1881,6 +1848,26 @@ export const assertGuardFileDomainStatsRecord = (input, errorFactory) => {
|
|
|
1881
1848
|
path: _path + ".ranges",
|
|
1882
1849
|
expected: "Array<[start: number & Minimum<0>, end: number & Minimum<0>]>",
|
|
1883
1850
|
value: input.ranges
|
|
1851
|
+
}, errorFactory)) && ("number" === typeof input.progress && (0 <= input.progress || $guard(_exceptionable, {
|
|
1852
|
+
path: _path + ".progress",
|
|
1853
|
+
expected: "number & Minimum<0>",
|
|
1854
|
+
value: input.progress
|
|
1855
|
+
}, errorFactory)) && (input.progress <= 1 || $guard(_exceptionable, {
|
|
1856
|
+
path: _path + ".progress",
|
|
1857
|
+
expected: "number & Maximum<1>",
|
|
1858
|
+
value: input.progress
|
|
1859
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
|
1860
|
+
path: _path + ".progress",
|
|
1861
|
+
expected: "(number & Minimum<0> & Maximum<1>)",
|
|
1862
|
+
value: input.progress
|
|
1863
|
+
}, errorFactory)) && ("number" === typeof input.speed && (0 <= input.speed || $guard(_exceptionable, {
|
|
1864
|
+
path: _path + ".speed",
|
|
1865
|
+
expected: "number & Minimum<0>",
|
|
1866
|
+
value: input.speed
|
|
1867
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
|
1868
|
+
path: _path + ".speed",
|
|
1869
|
+
expected: "(number & Minimum<0>)",
|
|
1870
|
+
value: input.speed
|
|
1884
1871
|
}, errorFactory)) && ("string" === typeof input.id && (/^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.id) || $guard(_exceptionable, {
|
|
1885
1872
|
path: _path + ".id",
|
|
1886
1873
|
expected: "string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">",
|
|
@@ -2111,7 +2098,7 @@ export const stringifyFileDomainStatsRecord = input => {
|
|
|
2111
2098
|
const $string = __typia.json.createStringify.string;
|
|
2112
2099
|
const $throws = __typia.json.createStringify.throws;
|
|
2113
2100
|
const $tail = __typia.json.createStringify.tail;
|
|
2114
|
-
const $so0 = input => `{"position":${null !== input.position ? input.position : "null"},"uploading":${null !== input.uploading ? input.uploading : "null"},"zones":${`[${input.zones.map(elem => $string(elem)).join(",")}]`},"replicas":${`[${input.replicas.map(elem => $string(elem)).join(",")}]`},"locations":${`[${input.locations.map(elem => $string(elem)).join(",")}]`},"
|
|
2101
|
+
const $so0 = input => `{"position":${null !== input.position ? input.position : "null"},"uploading":${null !== input.uploading ? input.uploading : "null"},"zones":${`[${input.zones.map(elem => $string(elem)).join(",")}]`},"replicas":${`[${input.replicas.map(elem => $string(elem)).join(",")}]`},"locations":${`[${input.locations.map(elem => $string(elem)).join(",")}]`},"ranges":${`[${input.ranges.map(elem => `[${elem[0]},${elem[1]}]`).join(",")}]`},"progress":${input.progress},"speed":${input.speed},"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)},"encoding":${$string(input.encoding)},"hash":${$string(input.hash)},"btime":${input.btime},"completed":${input.completed},"error":${null !== input.error ? (() => {
|
|
2115
2102
|
if (Array.isArray(input.error))
|
|
2116
2103
|
return `[${input.error.map(elem => $so2(elem)).join(",")}]`;
|
|
2117
2104
|
if ("object" === typeof input.error && null !== input.error)
|
|
@@ -2129,7 +2116,7 @@ export const stringifyFileDomainStatsRecord = input => {
|
|
|
2129
2116
|
};
|
|
2130
2117
|
export const assertStringifyFileDomainStatsRecord = (input, errorFactory) => { const assert = (input, errorFactory) => {
|
|
2131
2118
|
const __is = input => {
|
|
2132
|
-
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))) && (null === input.uploading || "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.locations) && input.locations.every(elem => "string" === typeof elem)) && (
|
|
2119
|
+
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))) && (null === input.uploading || "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.locations) && input.locations.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]))))) && ("number" === typeof input.progress && (0 <= input.progress && input.progress <= 1)) && ("number" === typeof input.speed && (!Number.isNaN(input.speed) && 0 <= input.speed)) && ("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.encoding && ("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))));
|
|
2133
2120
|
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));
|
|
2134
2121
|
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)));
|
|
2135
2122
|
const $io3 = input => Object.keys(input).every(key => {
|
|
@@ -2197,30 +2184,6 @@ export const assertStringifyFileDomainStatsRecord = (input, errorFactory) => { c
|
|
|
2197
2184
|
path: _path + ".locations",
|
|
2198
2185
|
expected: "Array<string>",
|
|
2199
2186
|
value: input.locations
|
|
2200
|
-
}, errorFactory)) && ("number" === typeof input.progress && (0 <= input.progress || $guard(_exceptionable, {
|
|
2201
|
-
path: _path + ".progress",
|
|
2202
|
-
expected: "number & Minimum<0>",
|
|
2203
|
-
value: input.progress
|
|
2204
|
-
}, errorFactory)) && (input.progress <= 1 || $guard(_exceptionable, {
|
|
2205
|
-
path: _path + ".progress",
|
|
2206
|
-
expected: "number & Maximum<1>",
|
|
2207
|
-
value: input.progress
|
|
2208
|
-
}, errorFactory)) || $guard(_exceptionable, {
|
|
2209
|
-
path: _path + ".progress",
|
|
2210
|
-
expected: "(number & Minimum<0> & Maximum<1>)",
|
|
2211
|
-
value: input.progress
|
|
2212
|
-
}, errorFactory)) && ("number" === typeof input.speed && (0 <= input.speed || $guard(_exceptionable, {
|
|
2213
|
-
path: _path + ".speed",
|
|
2214
|
-
expected: "number & Minimum<0>",
|
|
2215
|
-
value: input.speed
|
|
2216
|
-
}, errorFactory)) && (input.speed <= 1 || $guard(_exceptionable, {
|
|
2217
|
-
path: _path + ".speed",
|
|
2218
|
-
expected: "number & Maximum<1>",
|
|
2219
|
-
value: input.speed
|
|
2220
|
-
}, errorFactory)) || $guard(_exceptionable, {
|
|
2221
|
-
path: _path + ".speed",
|
|
2222
|
-
expected: "(number & Minimum<0> & Maximum<1>)",
|
|
2223
|
-
value: input.speed
|
|
2224
2187
|
}, errorFactory)) && ((Array.isArray(input.ranges) || $guard(_exceptionable, {
|
|
2225
2188
|
path: _path + ".ranges",
|
|
2226
2189
|
expected: "Array<[start: number & Minimum<0>, end: number & Minimum<0>]>",
|
|
@@ -2265,6 +2228,30 @@ export const assertStringifyFileDomainStatsRecord = (input, errorFactory) => { c
|
|
|
2265
2228
|
path: _path + ".ranges",
|
|
2266
2229
|
expected: "Array<[start: number & Minimum<0>, end: number & Minimum<0>]>",
|
|
2267
2230
|
value: input.ranges
|
|
2231
|
+
}, errorFactory)) && ("number" === typeof input.progress && (0 <= input.progress || $guard(_exceptionable, {
|
|
2232
|
+
path: _path + ".progress",
|
|
2233
|
+
expected: "number & Minimum<0>",
|
|
2234
|
+
value: input.progress
|
|
2235
|
+
}, errorFactory)) && (input.progress <= 1 || $guard(_exceptionable, {
|
|
2236
|
+
path: _path + ".progress",
|
|
2237
|
+
expected: "number & Maximum<1>",
|
|
2238
|
+
value: input.progress
|
|
2239
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
|
2240
|
+
path: _path + ".progress",
|
|
2241
|
+
expected: "(number & Minimum<0> & Maximum<1>)",
|
|
2242
|
+
value: input.progress
|
|
2243
|
+
}, errorFactory)) && ("number" === typeof input.speed && (!Number.isNaN(input.speed) || $guard(_exceptionable, {
|
|
2244
|
+
path: _path + ".speed",
|
|
2245
|
+
expected: "number",
|
|
2246
|
+
value: input.speed
|
|
2247
|
+
}, errorFactory)) && (0 <= input.speed || $guard(_exceptionable, {
|
|
2248
|
+
path: _path + ".speed",
|
|
2249
|
+
expected: "number & Minimum<0>",
|
|
2250
|
+
value: input.speed
|
|
2251
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
|
2252
|
+
path: _path + ".speed",
|
|
2253
|
+
expected: "(number & Minimum<0>)",
|
|
2254
|
+
value: input.speed
|
|
2268
2255
|
}, errorFactory)) && ("string" === typeof input.id && (/^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.id) || $guard(_exceptionable, {
|
|
2269
2256
|
path: _path + ".id",
|
|
2270
2257
|
expected: "string & Pattern<\"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$\">",
|
|
@@ -2495,7 +2482,7 @@ export const assertStringifyFileDomainStatsRecord = (input, errorFactory) => { c
|
|
|
2495
2482
|
const $string = __typia.json.createAssertStringify.string;
|
|
2496
2483
|
const $throws = __typia.json.createAssertStringify.throws;
|
|
2497
2484
|
const $tail = __typia.json.createAssertStringify.tail;
|
|
2498
|
-
const $so0 = input => `{"position":${null !== input.position ? input.position : "null"},"uploading":${null !== input.uploading ? input.uploading : "null"},"zones":${`[${input.zones.map(elem => $string(elem)).join(",")}]`},"replicas":${`[${input.replicas.map(elem => $string(elem)).join(",")}]`},"locations":${`[${input.locations.map(elem => $string(elem)).join(",")}]`},"
|
|
2485
|
+
const $so0 = input => `{"position":${null !== input.position ? input.position : "null"},"uploading":${null !== input.uploading ? input.uploading : "null"},"zones":${`[${input.zones.map(elem => $string(elem)).join(",")}]`},"replicas":${`[${input.replicas.map(elem => $string(elem)).join(",")}]`},"locations":${`[${input.locations.map(elem => $string(elem)).join(",")}]`},"ranges":${`[${input.ranges.map(elem => `[${elem[0]},${elem[1]}]`).join(",")}]`},"progress":${input.progress},"speed":${input.speed},"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)},"encoding":${$string(input.encoding)},"hash":${$string(input.hash)},"btime":${input.btime},"completed":${input.completed},"error":${null !== input.error ? (() => {
|
|
2499
2486
|
if (Array.isArray(input.error))
|
|
2500
2487
|
return `[${input.error.map(elem => $so2(elem)).join(",")}]`;
|
|
2501
2488
|
if ("object" === typeof input.error && null !== input.error)
|
package/dist/schema.json
CHANGED
|
@@ -3022,11 +3022,11 @@
|
|
|
3022
3022
|
"exclusive": {
|
|
3023
3023
|
"items": [
|
|
3024
3024
|
{
|
|
3025
|
-
"const": "
|
|
3025
|
+
"const": "minimum",
|
|
3026
3026
|
"type": "string"
|
|
3027
3027
|
},
|
|
3028
3028
|
{
|
|
3029
|
-
"const": "
|
|
3029
|
+
"const": "exclusiveMinimum",
|
|
3030
3030
|
"type": "string"
|
|
3031
3031
|
}
|
|
3032
3032
|
],
|
|
@@ -3035,19 +3035,19 @@
|
|
|
3035
3035
|
"type": "array"
|
|
3036
3036
|
},
|
|
3037
3037
|
"kind": {
|
|
3038
|
-
"const": "
|
|
3038
|
+
"const": "minimum",
|
|
3039
3039
|
"type": "string"
|
|
3040
3040
|
},
|
|
3041
3041
|
"schema": {
|
|
3042
3042
|
"additionalProperties": false,
|
|
3043
3043
|
"properties": {
|
|
3044
|
-
"
|
|
3045
|
-
"const":
|
|
3044
|
+
"minimum": {
|
|
3045
|
+
"const": 0,
|
|
3046
3046
|
"type": "number"
|
|
3047
3047
|
}
|
|
3048
3048
|
},
|
|
3049
3049
|
"required": [
|
|
3050
|
-
"
|
|
3050
|
+
"minimum"
|
|
3051
3051
|
],
|
|
3052
3052
|
"type": "object"
|
|
3053
3053
|
},
|
|
@@ -3056,11 +3056,11 @@
|
|
|
3056
3056
|
"type": "string"
|
|
3057
3057
|
},
|
|
3058
3058
|
"validate": {
|
|
3059
|
-
"const": "
|
|
3059
|
+
"const": "0 <= $input",
|
|
3060
3060
|
"type": "string"
|
|
3061
3061
|
},
|
|
3062
3062
|
"value": {
|
|
3063
|
-
"const":
|
|
3063
|
+
"const": 0,
|
|
3064
3064
|
"type": "number"
|
|
3065
3065
|
}
|
|
3066
3066
|
},
|