@nxtedition/types 1.2.4 → 1.2.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/common/block.d.ts +7 -4
- package/dist/common/block.js +376 -131
- package/dist/common/file.d.ts +4 -4
- package/dist/common/file.js +93 -87
- package/package.json +1 -1
package/dist/common/file.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import __typia from "typia";
|
|
2
2
|
export const isFile = input => {
|
|
3
|
-
const $io0 = input => "string" === typeof input.id && /^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.id) && ("number" === typeof input.size && (0 <= input.size && (Math.floor(input.size) === input.size && 0 <= input.size && input.size <=
|
|
3
|
+
const $io0 = input => "string" === typeof input.id && /^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.id) && ("number" === typeof input.size && (0 <= input.size && (Math.floor(input.size) === input.size && 0 <= input.size && input.size <= 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)) && (null === input.error || Array.isArray(input.error) && input.error.every(elem => "object" === typeof elem && null !== elem && $io2(elem))) && "string" === typeof input.resumable && "string" === typeof input.mimeType && ("string" === typeof input.hash && /^([A-Fa-f0-9]{32})?$/.test(input.hash)) && ("number" === typeof input.btime && (0 <= input.btime && (Math.floor(input.btime) === input.btime && 0 <= input.btime && input.btime <= 18446744073709552000)));
|
|
4
4
|
const $io1 = input => undefined === input.file || "string" === typeof input.file;
|
|
5
5
|
const $io2 = input => "string" === typeof input.message;
|
|
6
6
|
return "object" === typeof input && null !== input && $io0(input);
|
|
7
7
|
};
|
|
8
8
|
export const assertFile = (input, errorFactory) => {
|
|
9
9
|
const __is = input => {
|
|
10
|
-
const $io0 = input => "string" === typeof input.id && /^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.id) && ("number" === typeof input.size && (0 <= input.size && (Math.floor(input.size) === input.size && 0 <= input.size && input.size <=
|
|
10
|
+
const $io0 = input => "string" === typeof input.id && /^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.id) && ("number" === typeof input.size && (0 <= input.size && (Math.floor(input.size) === input.size && 0 <= input.size && input.size <= 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)) && (null === input.error || Array.isArray(input.error) && input.error.every(elem => "object" === typeof elem && null !== elem && $io2(elem))) && "string" === typeof input.resumable && "string" === typeof input.mimeType && ("string" === typeof input.hash && /^([A-Fa-f0-9]{32})?$/.test(input.hash)) && ("number" === typeof input.btime && (0 <= input.btime && (Math.floor(input.btime) === input.btime && 0 <= input.btime && input.btime <= 18446744073709552000)));
|
|
11
11
|
const $io1 = input => undefined === input.file || "string" === typeof input.file;
|
|
12
12
|
const $io2 = input => "string" === typeof input.message;
|
|
13
13
|
return "object" === typeof input && null !== input && $io0(input);
|
|
@@ -27,13 +27,13 @@ export const assertFile = (input, errorFactory) => {
|
|
|
27
27
|
path: _path + ".size",
|
|
28
28
|
expected: "number & Minimum<0>",
|
|
29
29
|
value: input.size
|
|
30
|
-
}, errorFactory)) && (Math.floor(input.size) === input.size && 0 <= input.size && input.size <=
|
|
30
|
+
}, errorFactory)) && (Math.floor(input.size) === input.size && 0 <= input.size && input.size <= 18446744073709552000 || $guard(_exceptionable, {
|
|
31
31
|
path: _path + ".size",
|
|
32
|
-
expected: "number & Type<\"
|
|
32
|
+
expected: "number & Type<\"uint64\">",
|
|
33
33
|
value: input.size
|
|
34
34
|
}, errorFactory)) || $guard(_exceptionable, {
|
|
35
35
|
path: _path + ".size",
|
|
36
|
-
expected: "(number & Minimum<0> & Type<\"
|
|
36
|
+
expected: "(number & Minimum<0> & Type<\"uint64\">)",
|
|
37
37
|
value: input.size
|
|
38
38
|
}, errorFactory)) && ("boolean" === typeof input.seekable || $guard(_exceptionable, {
|
|
39
39
|
path: _path + ".seekable",
|
|
@@ -71,9 +71,9 @@ export const assertFile = (input, errorFactory) => {
|
|
|
71
71
|
path: _path + ".tags",
|
|
72
72
|
expected: "Array<string>",
|
|
73
73
|
value: input.tags
|
|
74
|
-
}, errorFactory)) && ((Array.isArray(input.error) || $guard(_exceptionable, {
|
|
74
|
+
}, errorFactory)) && (null === input.error || (Array.isArray(input.error) || $guard(_exceptionable, {
|
|
75
75
|
path: _path + ".error",
|
|
76
|
-
expected: "Array<__type>.o1",
|
|
76
|
+
expected: "(Array<__type>.o1 | null)",
|
|
77
77
|
value: input.error
|
|
78
78
|
}, errorFactory)) && input.error.every((elem, _index3) => ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
|
|
79
79
|
path: _path + ".error[" + _index3 + "]",
|
|
@@ -85,7 +85,7 @@ export const assertFile = (input, errorFactory) => {
|
|
|
85
85
|
value: elem
|
|
86
86
|
}, errorFactory)) || $guard(_exceptionable, {
|
|
87
87
|
path: _path + ".error",
|
|
88
|
-
expected: "Array<__type>.o1",
|
|
88
|
+
expected: "(Array<__type>.o1 | null)",
|
|
89
89
|
value: input.error
|
|
90
90
|
}, errorFactory)) && ("string" === typeof input.resumable || $guard(_exceptionable, {
|
|
91
91
|
path: _path + ".resumable",
|
|
@@ -107,13 +107,13 @@ export const assertFile = (input, errorFactory) => {
|
|
|
107
107
|
path: _path + ".btime",
|
|
108
108
|
expected: "number & Minimum<0>",
|
|
109
109
|
value: input.btime
|
|
110
|
-
}, errorFactory)) && (Math.floor(input.btime) === input.btime && 0 <= input.btime && input.btime <=
|
|
110
|
+
}, errorFactory)) && (Math.floor(input.btime) === input.btime && 0 <= input.btime && input.btime <= 18446744073709552000 || $guard(_exceptionable, {
|
|
111
111
|
path: _path + ".btime",
|
|
112
|
-
expected: "number & Type<\"
|
|
112
|
+
expected: "number & Type<\"uint64\">",
|
|
113
113
|
value: input.btime
|
|
114
114
|
}, errorFactory)) || $guard(_exceptionable, {
|
|
115
115
|
path: _path + ".btime",
|
|
116
|
-
expected: "(number & Minimum<0> & Type<\"
|
|
116
|
+
expected: "(number & Minimum<0> & Type<\"uint64\">)",
|
|
117
117
|
value: input.btime
|
|
118
118
|
}, errorFactory));
|
|
119
119
|
const $ao1 = (input, _path, _exceptionable = true) => undefined === input.file || "string" === typeof input.file || $guard(_exceptionable, {
|
|
@@ -156,16 +156,19 @@ export const randomFile = generator => {
|
|
|
156
156
|
value: 0
|
|
157
157
|
},
|
|
158
158
|
{
|
|
159
|
-
name: "Type<\"
|
|
159
|
+
name: "Type<\"uint64\">",
|
|
160
160
|
kind: "type",
|
|
161
|
-
value: "
|
|
161
|
+
value: "uint64"
|
|
162
162
|
}
|
|
163
163
|
]) ?? (generator?.integer ?? $generator.integer)(0, 10),
|
|
164
164
|
seekable: (generator?.boolean ?? $generator.boolean)(),
|
|
165
165
|
deleted: (generator?.boolean ?? $generator.boolean)(),
|
|
166
166
|
refs: (generator?.array ?? $generator.array)(() => $ro1(_recursive, _recursive ? 1 + _depth : _depth)),
|
|
167
167
|
tags: (generator?.array ?? $generator.array)(() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()),
|
|
168
|
-
error:
|
|
168
|
+
error: $pick([
|
|
169
|
+
() => null,
|
|
170
|
+
() => (generator?.array ?? $generator.array)(() => $ro2(_recursive, _recursive ? 1 + _depth : _depth))
|
|
171
|
+
])(),
|
|
169
172
|
resumable: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
|
|
170
173
|
mimeType: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
|
|
171
174
|
hash: (generator?.customs ?? $generator.customs)?.string?.([
|
|
@@ -182,9 +185,9 @@ export const randomFile = generator => {
|
|
|
182
185
|
value: 0
|
|
183
186
|
},
|
|
184
187
|
{
|
|
185
|
-
name: "Type<\"
|
|
188
|
+
name: "Type<\"uint64\">",
|
|
186
189
|
kind: "type",
|
|
187
|
-
value: "
|
|
190
|
+
value: "uint64"
|
|
188
191
|
}
|
|
189
192
|
]) ?? (generator?.integer ?? $generator.integer)(0, 10)
|
|
190
193
|
});
|
|
@@ -201,7 +204,7 @@ export const randomFile = generator => {
|
|
|
201
204
|
};
|
|
202
205
|
export const assertGuardFile = (input, errorFactory) => {
|
|
203
206
|
const __is = input => {
|
|
204
|
-
const $io0 = input => "string" === typeof input.id && /^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.id) && ("number" === typeof input.size && (0 <= input.size && (Math.floor(input.size) === input.size && 0 <= input.size && input.size <=
|
|
207
|
+
const $io0 = input => "string" === typeof input.id && /^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.id) && ("number" === typeof input.size && (0 <= input.size && (Math.floor(input.size) === input.size && 0 <= input.size && input.size <= 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)) && (null === input.error || Array.isArray(input.error) && input.error.every(elem => "object" === typeof elem && null !== elem && $io2(elem))) && "string" === typeof input.resumable && "string" === typeof input.mimeType && ("string" === typeof input.hash && /^([A-Fa-f0-9]{32})?$/.test(input.hash)) && ("number" === typeof input.btime && (0 <= input.btime && (Math.floor(input.btime) === input.btime && 0 <= input.btime && input.btime <= 18446744073709552000)));
|
|
205
208
|
const $io1 = input => undefined === input.file || "string" === typeof input.file;
|
|
206
209
|
const $io2 = input => "string" === typeof input.message;
|
|
207
210
|
return "object" === typeof input && null !== input && $io0(input);
|
|
@@ -221,13 +224,13 @@ export const assertGuardFile = (input, errorFactory) => {
|
|
|
221
224
|
path: _path + ".size",
|
|
222
225
|
expected: "number & Minimum<0>",
|
|
223
226
|
value: input.size
|
|
224
|
-
}, errorFactory)) && (Math.floor(input.size) === input.size && 0 <= input.size && input.size <=
|
|
227
|
+
}, errorFactory)) && (Math.floor(input.size) === input.size && 0 <= input.size && input.size <= 18446744073709552000 || $guard(_exceptionable, {
|
|
225
228
|
path: _path + ".size",
|
|
226
|
-
expected: "number & Type<\"
|
|
229
|
+
expected: "number & Type<\"uint64\">",
|
|
227
230
|
value: input.size
|
|
228
231
|
}, errorFactory)) || $guard(_exceptionable, {
|
|
229
232
|
path: _path + ".size",
|
|
230
|
-
expected: "(number & Minimum<0> & Type<\"
|
|
233
|
+
expected: "(number & Minimum<0> & Type<\"uint64\">)",
|
|
231
234
|
value: input.size
|
|
232
235
|
}, errorFactory)) && ("boolean" === typeof input.seekable || $guard(_exceptionable, {
|
|
233
236
|
path: _path + ".seekable",
|
|
@@ -265,9 +268,9 @@ export const assertGuardFile = (input, errorFactory) => {
|
|
|
265
268
|
path: _path + ".tags",
|
|
266
269
|
expected: "Array<string>",
|
|
267
270
|
value: input.tags
|
|
268
|
-
}, errorFactory)) && ((Array.isArray(input.error) || $guard(_exceptionable, {
|
|
271
|
+
}, errorFactory)) && (null === input.error || (Array.isArray(input.error) || $guard(_exceptionable, {
|
|
269
272
|
path: _path + ".error",
|
|
270
|
-
expected: "Array<__type>.o1",
|
|
273
|
+
expected: "(Array<__type>.o1 | null)",
|
|
271
274
|
value: input.error
|
|
272
275
|
}, errorFactory)) && input.error.every((elem, _index3) => ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
|
|
273
276
|
path: _path + ".error[" + _index3 + "]",
|
|
@@ -279,7 +282,7 @@ export const assertGuardFile = (input, errorFactory) => {
|
|
|
279
282
|
value: elem
|
|
280
283
|
}, errorFactory)) || $guard(_exceptionable, {
|
|
281
284
|
path: _path + ".error",
|
|
282
|
-
expected: "Array<__type>.o1",
|
|
285
|
+
expected: "(Array<__type>.o1 | null)",
|
|
283
286
|
value: input.error
|
|
284
287
|
}, errorFactory)) && ("string" === typeof input.resumable || $guard(_exceptionable, {
|
|
285
288
|
path: _path + ".resumable",
|
|
@@ -301,13 +304,13 @@ export const assertGuardFile = (input, errorFactory) => {
|
|
|
301
304
|
path: _path + ".btime",
|
|
302
305
|
expected: "number & Minimum<0>",
|
|
303
306
|
value: input.btime
|
|
304
|
-
}, errorFactory)) && (Math.floor(input.btime) === input.btime && 0 <= input.btime && input.btime <=
|
|
307
|
+
}, errorFactory)) && (Math.floor(input.btime) === input.btime && 0 <= input.btime && input.btime <= 18446744073709552000 || $guard(_exceptionable, {
|
|
305
308
|
path: _path + ".btime",
|
|
306
|
-
expected: "number & Type<\"
|
|
309
|
+
expected: "number & Type<\"uint64\">",
|
|
307
310
|
value: input.btime
|
|
308
311
|
}, errorFactory)) || $guard(_exceptionable, {
|
|
309
312
|
path: _path + ".btime",
|
|
310
|
-
expected: "(number & Minimum<0> & Type<\"
|
|
313
|
+
expected: "(number & Minimum<0> & Type<\"uint64\">)",
|
|
311
314
|
value: input.btime
|
|
312
315
|
}, errorFactory));
|
|
313
316
|
const $ao1 = (input, _path, _exceptionable = true) => undefined === input.file || "string" === typeof input.file || $guard(_exceptionable, {
|
|
@@ -336,13 +339,13 @@ export const stringifyFile = input => {
|
|
|
336
339
|
const $io2 = input => "string" === typeof input.message;
|
|
337
340
|
const $string = __typia.json.createStringify.string;
|
|
338
341
|
const $tail = __typia.json.createStringify.tail;
|
|
339
|
-
const $so0 = input => `{"id":${$string(input.id)},"size":${input.size},"seekable":${input.seekable},"deleted":${input.deleted},"refs":${`[${input.refs.map(elem => $so1(elem)).join(",")}]`},"tags":${`[${input.tags.map(elem => $string(elem)).join(",")}]`},"error":${`[${input.error.map(elem => `{"message":${$string(elem.message)}}`).join(",")}]`},"resumable":${$string(input.resumable)},"mimeType":${$string(input.mimeType)},"hash":${$string(input.hash)},"btime":${input.btime}}`;
|
|
342
|
+
const $so0 = input => `{"id":${$string(input.id)},"size":${input.size},"seekable":${input.seekable},"deleted":${input.deleted},"refs":${`[${input.refs.map(elem => $so1(elem)).join(",")}]`},"tags":${`[${input.tags.map(elem => $string(elem)).join(",")}]`},"error":${null !== input.error ? `[${input.error.map(elem => `{"message":${$string(elem.message)}}`).join(",")}]` : "null"},"resumable":${$string(input.resumable)},"mimeType":${$string(input.mimeType)},"hash":${$string(input.hash)},"btime":${input.btime}}`;
|
|
340
343
|
const $so1 = input => `{${$tail(`${undefined === input.file ? "" : `"file":${undefined !== input.file ? $string(input.file) : undefined}`}`)}}`;
|
|
341
344
|
return $so0(input);
|
|
342
345
|
};
|
|
343
346
|
export const assertStringifyFile = (input, errorFactory) => { const assert = (input, errorFactory) => {
|
|
344
347
|
const __is = input => {
|
|
345
|
-
const $io0 = input => "string" === typeof input.id && /^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.id) && ("number" === typeof input.size && (0 <= input.size && (Math.floor(input.size) === input.size && 0 <= input.size && input.size <=
|
|
348
|
+
const $io0 = input => "string" === typeof input.id && /^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.id) && ("number" === typeof input.size && (0 <= input.size && (Math.floor(input.size) === input.size && 0 <= input.size && input.size <= 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)) && (null === input.error || Array.isArray(input.error) && input.error.every(elem => "object" === typeof elem && null !== elem && $io2(elem))) && "string" === typeof input.resumable && "string" === typeof input.mimeType && ("string" === typeof input.hash && /^([A-Fa-f0-9]{32})?$/.test(input.hash)) && ("number" === typeof input.btime && (0 <= input.btime && (Math.floor(input.btime) === input.btime && 0 <= input.btime && input.btime <= 18446744073709552000)));
|
|
346
349
|
const $io1 = input => undefined === input.file || "string" === typeof input.file;
|
|
347
350
|
const $io2 = input => "string" === typeof input.message;
|
|
348
351
|
return "object" === typeof input && null !== input && $io0(input);
|
|
@@ -362,13 +365,13 @@ export const assertStringifyFile = (input, errorFactory) => { const assert = (in
|
|
|
362
365
|
path: _path + ".size",
|
|
363
366
|
expected: "number & Minimum<0>",
|
|
364
367
|
value: input.size
|
|
365
|
-
}, errorFactory)) && (Math.floor(input.size) === input.size && 0 <= input.size && input.size <=
|
|
368
|
+
}, errorFactory)) && (Math.floor(input.size) === input.size && 0 <= input.size && input.size <= 18446744073709552000 || $guard(_exceptionable, {
|
|
366
369
|
path: _path + ".size",
|
|
367
|
-
expected: "number & Type<\"
|
|
370
|
+
expected: "number & Type<\"uint64\">",
|
|
368
371
|
value: input.size
|
|
369
372
|
}, errorFactory)) || $guard(_exceptionable, {
|
|
370
373
|
path: _path + ".size",
|
|
371
|
-
expected: "(number & Minimum<0> & Type<\"
|
|
374
|
+
expected: "(number & Minimum<0> & Type<\"uint64\">)",
|
|
372
375
|
value: input.size
|
|
373
376
|
}, errorFactory)) && ("boolean" === typeof input.seekable || $guard(_exceptionable, {
|
|
374
377
|
path: _path + ".seekable",
|
|
@@ -406,9 +409,9 @@ export const assertStringifyFile = (input, errorFactory) => { const assert = (in
|
|
|
406
409
|
path: _path + ".tags",
|
|
407
410
|
expected: "Array<string>",
|
|
408
411
|
value: input.tags
|
|
409
|
-
}, errorFactory)) && ((Array.isArray(input.error) || $guard(_exceptionable, {
|
|
412
|
+
}, errorFactory)) && (null === input.error || (Array.isArray(input.error) || $guard(_exceptionable, {
|
|
410
413
|
path: _path + ".error",
|
|
411
|
-
expected: "Array<__type>.o1",
|
|
414
|
+
expected: "(Array<__type>.o1 | null)",
|
|
412
415
|
value: input.error
|
|
413
416
|
}, errorFactory)) && input.error.every((elem, _index3) => ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
|
|
414
417
|
path: _path + ".error[" + _index3 + "]",
|
|
@@ -420,7 +423,7 @@ export const assertStringifyFile = (input, errorFactory) => { const assert = (in
|
|
|
420
423
|
value: elem
|
|
421
424
|
}, errorFactory)) || $guard(_exceptionable, {
|
|
422
425
|
path: _path + ".error",
|
|
423
|
-
expected: "Array<__type>.o1",
|
|
426
|
+
expected: "(Array<__type>.o1 | null)",
|
|
424
427
|
value: input.error
|
|
425
428
|
}, errorFactory)) && ("string" === typeof input.resumable || $guard(_exceptionable, {
|
|
426
429
|
path: _path + ".resumable",
|
|
@@ -442,13 +445,13 @@ export const assertStringifyFile = (input, errorFactory) => { const assert = (in
|
|
|
442
445
|
path: _path + ".btime",
|
|
443
446
|
expected: "number & Minimum<0>",
|
|
444
447
|
value: input.btime
|
|
445
|
-
}, errorFactory)) && (Math.floor(input.btime) === input.btime && 0 <= input.btime && input.btime <=
|
|
448
|
+
}, errorFactory)) && (Math.floor(input.btime) === input.btime && 0 <= input.btime && input.btime <= 18446744073709552000 || $guard(_exceptionable, {
|
|
446
449
|
path: _path + ".btime",
|
|
447
|
-
expected: "number & Type<\"
|
|
450
|
+
expected: "number & Type<\"uint64\">",
|
|
448
451
|
value: input.btime
|
|
449
452
|
}, errorFactory)) || $guard(_exceptionable, {
|
|
450
453
|
path: _path + ".btime",
|
|
451
|
-
expected: "(number & Minimum<0> & Type<\"
|
|
454
|
+
expected: "(number & Minimum<0> & Type<\"uint64\">)",
|
|
452
455
|
value: input.btime
|
|
453
456
|
}, errorFactory));
|
|
454
457
|
const $ao1 = (input, _path, _exceptionable = true) => undefined === input.file || "string" === typeof input.file || $guard(_exceptionable, {
|
|
@@ -477,19 +480,19 @@ export const assertStringifyFile = (input, errorFactory) => { const assert = (in
|
|
|
477
480
|
const $io2 = input => "string" === typeof input.message;
|
|
478
481
|
const $string = __typia.json.createAssertStringify.string;
|
|
479
482
|
const $tail = __typia.json.createAssertStringify.tail;
|
|
480
|
-
const $so0 = input => `{"id":${$string(input.id)},"size":${input.size},"seekable":${input.seekable},"deleted":${input.deleted},"refs":${`[${input.refs.map(elem => $so1(elem)).join(",")}]`},"tags":${`[${input.tags.map(elem => $string(elem)).join(",")}]`},"error":${`[${input.error.map(elem => `{"message":${$string(elem.message)}}`).join(",")}]`},"resumable":${$string(input.resumable)},"mimeType":${$string(input.mimeType)},"hash":${$string(input.hash)},"btime":${input.btime}}`;
|
|
483
|
+
const $so0 = input => `{"id":${$string(input.id)},"size":${input.size},"seekable":${input.seekable},"deleted":${input.deleted},"refs":${`[${input.refs.map(elem => $so1(elem)).join(",")}]`},"tags":${`[${input.tags.map(elem => $string(elem)).join(",")}]`},"error":${null !== input.error ? `[${input.error.map(elem => `{"message":${$string(elem.message)}}`).join(",")}]` : "null"},"resumable":${$string(input.resumable)},"mimeType":${$string(input.mimeType)},"hash":${$string(input.hash)},"btime":${input.btime}}`;
|
|
481
484
|
const $so1 = input => `{${$tail(`${undefined === input.file ? "" : `"file":${undefined !== input.file ? $string(input.file) : undefined}`}`)}}`;
|
|
482
485
|
return $so0(input);
|
|
483
486
|
}; return stringify(assert(input, errorFactory)); };
|
|
484
487
|
export const isFileStats = input => {
|
|
485
|
-
const $io0 = input => "number" === typeof input.position && (0 <= input.position && (Math.floor(input.position) === input.position && 0 <= input.position && input.position <=
|
|
488
|
+
const $io0 = input => "number" === typeof input.position && (0 <= input.position && (Math.floor(input.position) === input.position && 0 <= input.position && input.position <= 18446744073709552000)) && "boolean" === typeof input.uploading && "boolean" === typeof input.completed && (Array.isArray(input.zones) && input.zones.every(elem => "string" === typeof elem)) && (Array.isArray(input.replicas) && input.replicas.every(elem => "string" === typeof elem)) && ("string" === typeof input.id && /^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.id)) && ("number" === typeof input.size && (0 <= input.size && (Math.floor(input.size) === input.size && 0 <= input.size && input.size <= 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)) && (null === input.error || Array.isArray(input.error) && input.error.every(elem => "object" === typeof elem && null !== elem && $io2(elem))) && "string" === typeof input.resumable && "string" === typeof input.mimeType && ("string" === typeof input.hash && /^([A-Fa-f0-9]{32})?$/.test(input.hash)) && ("number" === typeof input.btime && (0 <= input.btime && (Math.floor(input.btime) === input.btime && 0 <= input.btime && input.btime <= 18446744073709552000)));
|
|
486
489
|
const $io1 = input => undefined === input.file || "string" === typeof input.file;
|
|
487
490
|
const $io2 = input => "string" === typeof input.message;
|
|
488
491
|
return "object" === typeof input && null !== input && $io0(input);
|
|
489
492
|
};
|
|
490
493
|
export const assertFileStats = (input, errorFactory) => {
|
|
491
494
|
const __is = input => {
|
|
492
|
-
const $io0 = input => "number" === typeof input.position && (0 <= input.position && (Math.floor(input.position) === input.position && 0 <= input.position && input.position <=
|
|
495
|
+
const $io0 = input => "number" === typeof input.position && (0 <= input.position && (Math.floor(input.position) === input.position && 0 <= input.position && input.position <= 18446744073709552000)) && "boolean" === typeof input.uploading && "boolean" === typeof input.completed && (Array.isArray(input.zones) && input.zones.every(elem => "string" === typeof elem)) && (Array.isArray(input.replicas) && input.replicas.every(elem => "string" === typeof elem)) && ("string" === typeof input.id && /^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.id)) && ("number" === typeof input.size && (0 <= input.size && (Math.floor(input.size) === input.size && 0 <= input.size && input.size <= 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)) && (null === input.error || Array.isArray(input.error) && input.error.every(elem => "object" === typeof elem && null !== elem && $io2(elem))) && "string" === typeof input.resumable && "string" === typeof input.mimeType && ("string" === typeof input.hash && /^([A-Fa-f0-9]{32})?$/.test(input.hash)) && ("number" === typeof input.btime && (0 <= input.btime && (Math.floor(input.btime) === input.btime && 0 <= input.btime && input.btime <= 18446744073709552000)));
|
|
493
496
|
const $io1 = input => undefined === input.file || "string" === typeof input.file;
|
|
494
497
|
const $io2 = input => "string" === typeof input.message;
|
|
495
498
|
return "object" === typeof input && null !== input && $io0(input);
|
|
@@ -501,13 +504,13 @@ export const assertFileStats = (input, errorFactory) => {
|
|
|
501
504
|
path: _path + ".position",
|
|
502
505
|
expected: "number & Minimum<0>",
|
|
503
506
|
value: input.position
|
|
504
|
-
}, errorFactory)) && (Math.floor(input.position) === input.position && 0 <= input.position && input.position <=
|
|
507
|
+
}, errorFactory)) && (Math.floor(input.position) === input.position && 0 <= input.position && input.position <= 18446744073709552000 || $guard(_exceptionable, {
|
|
505
508
|
path: _path + ".position",
|
|
506
|
-
expected: "number & Type<\"
|
|
509
|
+
expected: "number & Type<\"uint64\">",
|
|
507
510
|
value: input.position
|
|
508
511
|
}, errorFactory)) || $guard(_exceptionable, {
|
|
509
512
|
path: _path + ".position",
|
|
510
|
-
expected: "(number & Minimum<0> & Type<\"
|
|
513
|
+
expected: "(number & Minimum<0> & Type<\"uint64\">)",
|
|
511
514
|
value: input.position
|
|
512
515
|
}, errorFactory)) && ("boolean" === typeof input.uploading || $guard(_exceptionable, {
|
|
513
516
|
path: _path + ".uploading",
|
|
@@ -553,13 +556,13 @@ export const assertFileStats = (input, errorFactory) => {
|
|
|
553
556
|
path: _path + ".size",
|
|
554
557
|
expected: "number & Minimum<0>",
|
|
555
558
|
value: input.size
|
|
556
|
-
}, errorFactory)) && (Math.floor(input.size) === input.size && 0 <= input.size && input.size <=
|
|
559
|
+
}, errorFactory)) && (Math.floor(input.size) === input.size && 0 <= input.size && input.size <= 18446744073709552000 || $guard(_exceptionable, {
|
|
557
560
|
path: _path + ".size",
|
|
558
|
-
expected: "number & Type<\"
|
|
561
|
+
expected: "number & Type<\"uint64\">",
|
|
559
562
|
value: input.size
|
|
560
563
|
}, errorFactory)) || $guard(_exceptionable, {
|
|
561
564
|
path: _path + ".size",
|
|
562
|
-
expected: "(number & Minimum<0> & Type<\"
|
|
565
|
+
expected: "(number & Minimum<0> & Type<\"uint64\">)",
|
|
563
566
|
value: input.size
|
|
564
567
|
}, errorFactory)) && ("boolean" === typeof input.seekable || $guard(_exceptionable, {
|
|
565
568
|
path: _path + ".seekable",
|
|
@@ -597,9 +600,9 @@ export const assertFileStats = (input, errorFactory) => {
|
|
|
597
600
|
path: _path + ".tags",
|
|
598
601
|
expected: "Array<string>",
|
|
599
602
|
value: input.tags
|
|
600
|
-
}, errorFactory)) && ((Array.isArray(input.error) || $guard(_exceptionable, {
|
|
603
|
+
}, errorFactory)) && (null === input.error || (Array.isArray(input.error) || $guard(_exceptionable, {
|
|
601
604
|
path: _path + ".error",
|
|
602
|
-
expected: "Array<__type>.o1",
|
|
605
|
+
expected: "(Array<__type>.o1 | null)",
|
|
603
606
|
value: input.error
|
|
604
607
|
}, errorFactory)) && input.error.every((elem, _index5) => ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
|
|
605
608
|
path: _path + ".error[" + _index5 + "]",
|
|
@@ -611,7 +614,7 @@ export const assertFileStats = (input, errorFactory) => {
|
|
|
611
614
|
value: elem
|
|
612
615
|
}, errorFactory)) || $guard(_exceptionable, {
|
|
613
616
|
path: _path + ".error",
|
|
614
|
-
expected: "Array<__type>.o1",
|
|
617
|
+
expected: "(Array<__type>.o1 | null)",
|
|
615
618
|
value: input.error
|
|
616
619
|
}, errorFactory)) && ("string" === typeof input.resumable || $guard(_exceptionable, {
|
|
617
620
|
path: _path + ".resumable",
|
|
@@ -633,13 +636,13 @@ export const assertFileStats = (input, errorFactory) => {
|
|
|
633
636
|
path: _path + ".btime",
|
|
634
637
|
expected: "number & Minimum<0>",
|
|
635
638
|
value: input.btime
|
|
636
|
-
}, errorFactory)) && (Math.floor(input.btime) === input.btime && 0 <= input.btime && input.btime <=
|
|
639
|
+
}, errorFactory)) && (Math.floor(input.btime) === input.btime && 0 <= input.btime && input.btime <= 18446744073709552000 || $guard(_exceptionable, {
|
|
637
640
|
path: _path + ".btime",
|
|
638
|
-
expected: "number & Type<\"
|
|
641
|
+
expected: "number & Type<\"uint64\">",
|
|
639
642
|
value: input.btime
|
|
640
643
|
}, errorFactory)) || $guard(_exceptionable, {
|
|
641
644
|
path: _path + ".btime",
|
|
642
|
-
expected: "(number & Minimum<0> & Type<\"
|
|
645
|
+
expected: "(number & Minimum<0> & Type<\"uint64\">)",
|
|
643
646
|
value: input.btime
|
|
644
647
|
}, errorFactory));
|
|
645
648
|
const $ao1 = (input, _path, _exceptionable = true) => undefined === input.file || "string" === typeof input.file || $guard(_exceptionable, {
|
|
@@ -675,9 +678,9 @@ export const randomFileStats = generator => {
|
|
|
675
678
|
value: 0
|
|
676
679
|
},
|
|
677
680
|
{
|
|
678
|
-
name: "Type<\"
|
|
681
|
+
name: "Type<\"uint64\">",
|
|
679
682
|
kind: "type",
|
|
680
|
-
value: "
|
|
683
|
+
value: "uint64"
|
|
681
684
|
}
|
|
682
685
|
]) ?? (generator?.integer ?? $generator.integer)(0, 10),
|
|
683
686
|
uploading: (generator?.boolean ?? $generator.boolean)(),
|
|
@@ -698,16 +701,19 @@ export const randomFileStats = generator => {
|
|
|
698
701
|
value: 0
|
|
699
702
|
},
|
|
700
703
|
{
|
|
701
|
-
name: "Type<\"
|
|
704
|
+
name: "Type<\"uint64\">",
|
|
702
705
|
kind: "type",
|
|
703
|
-
value: "
|
|
706
|
+
value: "uint64"
|
|
704
707
|
}
|
|
705
708
|
]) ?? (generator?.integer ?? $generator.integer)(0, 10),
|
|
706
709
|
seekable: (generator?.boolean ?? $generator.boolean)(),
|
|
707
710
|
deleted: (generator?.boolean ?? $generator.boolean)(),
|
|
708
711
|
refs: (generator?.array ?? $generator.array)(() => $ro1(_recursive, _recursive ? 1 + _depth : _depth)),
|
|
709
712
|
tags: (generator?.array ?? $generator.array)(() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()),
|
|
710
|
-
error:
|
|
713
|
+
error: $pick([
|
|
714
|
+
() => null,
|
|
715
|
+
() => (generator?.array ?? $generator.array)(() => $ro2(_recursive, _recursive ? 1 + _depth : _depth))
|
|
716
|
+
])(),
|
|
711
717
|
resumable: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
|
|
712
718
|
mimeType: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
|
|
713
719
|
hash: (generator?.customs ?? $generator.customs)?.string?.([
|
|
@@ -724,9 +730,9 @@ export const randomFileStats = generator => {
|
|
|
724
730
|
value: 0
|
|
725
731
|
},
|
|
726
732
|
{
|
|
727
|
-
name: "Type<\"
|
|
733
|
+
name: "Type<\"uint64\">",
|
|
728
734
|
kind: "type",
|
|
729
|
-
value: "
|
|
735
|
+
value: "uint64"
|
|
730
736
|
}
|
|
731
737
|
]) ?? (generator?.integer ?? $generator.integer)(0, 10)
|
|
732
738
|
});
|
|
@@ -743,7 +749,7 @@ export const randomFileStats = generator => {
|
|
|
743
749
|
};
|
|
744
750
|
export const assertGuardFileStats = (input, errorFactory) => {
|
|
745
751
|
const __is = input => {
|
|
746
|
-
const $io0 = input => "number" === typeof input.position && (0 <= input.position && (Math.floor(input.position) === input.position && 0 <= input.position && input.position <=
|
|
752
|
+
const $io0 = input => "number" === typeof input.position && (0 <= input.position && (Math.floor(input.position) === input.position && 0 <= input.position && input.position <= 18446744073709552000)) && "boolean" === typeof input.uploading && "boolean" === typeof input.completed && (Array.isArray(input.zones) && input.zones.every(elem => "string" === typeof elem)) && (Array.isArray(input.replicas) && input.replicas.every(elem => "string" === typeof elem)) && ("string" === typeof input.id && /^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.id)) && ("number" === typeof input.size && (0 <= input.size && (Math.floor(input.size) === input.size && 0 <= input.size && input.size <= 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)) && (null === input.error || Array.isArray(input.error) && input.error.every(elem => "object" === typeof elem && null !== elem && $io2(elem))) && "string" === typeof input.resumable && "string" === typeof input.mimeType && ("string" === typeof input.hash && /^([A-Fa-f0-9]{32})?$/.test(input.hash)) && ("number" === typeof input.btime && (0 <= input.btime && (Math.floor(input.btime) === input.btime && 0 <= input.btime && input.btime <= 18446744073709552000)));
|
|
747
753
|
const $io1 = input => undefined === input.file || "string" === typeof input.file;
|
|
748
754
|
const $io2 = input => "string" === typeof input.message;
|
|
749
755
|
return "object" === typeof input && null !== input && $io0(input);
|
|
@@ -755,13 +761,13 @@ export const assertGuardFileStats = (input, errorFactory) => {
|
|
|
755
761
|
path: _path + ".position",
|
|
756
762
|
expected: "number & Minimum<0>",
|
|
757
763
|
value: input.position
|
|
758
|
-
}, errorFactory)) && (Math.floor(input.position) === input.position && 0 <= input.position && input.position <=
|
|
764
|
+
}, errorFactory)) && (Math.floor(input.position) === input.position && 0 <= input.position && input.position <= 18446744073709552000 || $guard(_exceptionable, {
|
|
759
765
|
path: _path + ".position",
|
|
760
|
-
expected: "number & Type<\"
|
|
766
|
+
expected: "number & Type<\"uint64\">",
|
|
761
767
|
value: input.position
|
|
762
768
|
}, errorFactory)) || $guard(_exceptionable, {
|
|
763
769
|
path: _path + ".position",
|
|
764
|
-
expected: "(number & Minimum<0> & Type<\"
|
|
770
|
+
expected: "(number & Minimum<0> & Type<\"uint64\">)",
|
|
765
771
|
value: input.position
|
|
766
772
|
}, errorFactory)) && ("boolean" === typeof input.uploading || $guard(_exceptionable, {
|
|
767
773
|
path: _path + ".uploading",
|
|
@@ -807,13 +813,13 @@ export const assertGuardFileStats = (input, errorFactory) => {
|
|
|
807
813
|
path: _path + ".size",
|
|
808
814
|
expected: "number & Minimum<0>",
|
|
809
815
|
value: input.size
|
|
810
|
-
}, errorFactory)) && (Math.floor(input.size) === input.size && 0 <= input.size && input.size <=
|
|
816
|
+
}, errorFactory)) && (Math.floor(input.size) === input.size && 0 <= input.size && input.size <= 18446744073709552000 || $guard(_exceptionable, {
|
|
811
817
|
path: _path + ".size",
|
|
812
|
-
expected: "number & Type<\"
|
|
818
|
+
expected: "number & Type<\"uint64\">",
|
|
813
819
|
value: input.size
|
|
814
820
|
}, errorFactory)) || $guard(_exceptionable, {
|
|
815
821
|
path: _path + ".size",
|
|
816
|
-
expected: "(number & Minimum<0> & Type<\"
|
|
822
|
+
expected: "(number & Minimum<0> & Type<\"uint64\">)",
|
|
817
823
|
value: input.size
|
|
818
824
|
}, errorFactory)) && ("boolean" === typeof input.seekable || $guard(_exceptionable, {
|
|
819
825
|
path: _path + ".seekable",
|
|
@@ -851,9 +857,9 @@ export const assertGuardFileStats = (input, errorFactory) => {
|
|
|
851
857
|
path: _path + ".tags",
|
|
852
858
|
expected: "Array<string>",
|
|
853
859
|
value: input.tags
|
|
854
|
-
}, errorFactory)) && ((Array.isArray(input.error) || $guard(_exceptionable, {
|
|
860
|
+
}, errorFactory)) && (null === input.error || (Array.isArray(input.error) || $guard(_exceptionable, {
|
|
855
861
|
path: _path + ".error",
|
|
856
|
-
expected: "Array<__type>.o1",
|
|
862
|
+
expected: "(Array<__type>.o1 | null)",
|
|
857
863
|
value: input.error
|
|
858
864
|
}, errorFactory)) && input.error.every((elem, _index5) => ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
|
|
859
865
|
path: _path + ".error[" + _index5 + "]",
|
|
@@ -865,7 +871,7 @@ export const assertGuardFileStats = (input, errorFactory) => {
|
|
|
865
871
|
value: elem
|
|
866
872
|
}, errorFactory)) || $guard(_exceptionable, {
|
|
867
873
|
path: _path + ".error",
|
|
868
|
-
expected: "Array<__type>.o1",
|
|
874
|
+
expected: "(Array<__type>.o1 | null)",
|
|
869
875
|
value: input.error
|
|
870
876
|
}, errorFactory)) && ("string" === typeof input.resumable || $guard(_exceptionable, {
|
|
871
877
|
path: _path + ".resumable",
|
|
@@ -887,13 +893,13 @@ export const assertGuardFileStats = (input, errorFactory) => {
|
|
|
887
893
|
path: _path + ".btime",
|
|
888
894
|
expected: "number & Minimum<0>",
|
|
889
895
|
value: input.btime
|
|
890
|
-
}, errorFactory)) && (Math.floor(input.btime) === input.btime && 0 <= input.btime && input.btime <=
|
|
896
|
+
}, errorFactory)) && (Math.floor(input.btime) === input.btime && 0 <= input.btime && input.btime <= 18446744073709552000 || $guard(_exceptionable, {
|
|
891
897
|
path: _path + ".btime",
|
|
892
|
-
expected: "number & Type<\"
|
|
898
|
+
expected: "number & Type<\"uint64\">",
|
|
893
899
|
value: input.btime
|
|
894
900
|
}, errorFactory)) || $guard(_exceptionable, {
|
|
895
901
|
path: _path + ".btime",
|
|
896
|
-
expected: "(number & Minimum<0> & Type<\"
|
|
902
|
+
expected: "(number & Minimum<0> & Type<\"uint64\">)",
|
|
897
903
|
value: input.btime
|
|
898
904
|
}, errorFactory));
|
|
899
905
|
const $ao1 = (input, _path, _exceptionable = true) => undefined === input.file || "string" === typeof input.file || $guard(_exceptionable, {
|
|
@@ -922,13 +928,13 @@ export const stringifyFileStats = input => {
|
|
|
922
928
|
const $io2 = input => "string" === typeof input.message;
|
|
923
929
|
const $string = __typia.json.createStringify.string;
|
|
924
930
|
const $tail = __typia.json.createStringify.tail;
|
|
925
|
-
const $so0 = input => `{"position":${input.position},"uploading":${input.uploading},"completed":${input.completed},"zones":${`[${input.zones.map(elem => $string(elem)).join(",")}]`},"replicas":${`[${input.replicas.map(elem => $string(elem)).join(",")}]`},"id":${$string(input.id)},"size":${input.size},"seekable":${input.seekable},"deleted":${input.deleted},"refs":${`[${input.refs.map(elem => $so1(elem)).join(",")}]`},"tags":${`[${input.tags.map(elem => $string(elem)).join(",")}]`},"error":${`[${input.error.map(elem => `{"message":${$string(elem.message)}}`).join(",")}]`},"resumable":${$string(input.resumable)},"mimeType":${$string(input.mimeType)},"hash":${$string(input.hash)},"btime":${input.btime}}`;
|
|
931
|
+
const $so0 = input => `{"position":${input.position},"uploading":${input.uploading},"completed":${input.completed},"zones":${`[${input.zones.map(elem => $string(elem)).join(",")}]`},"replicas":${`[${input.replicas.map(elem => $string(elem)).join(",")}]`},"id":${$string(input.id)},"size":${input.size},"seekable":${input.seekable},"deleted":${input.deleted},"refs":${`[${input.refs.map(elem => $so1(elem)).join(",")}]`},"tags":${`[${input.tags.map(elem => $string(elem)).join(",")}]`},"error":${null !== input.error ? `[${input.error.map(elem => `{"message":${$string(elem.message)}}`).join(",")}]` : "null"},"resumable":${$string(input.resumable)},"mimeType":${$string(input.mimeType)},"hash":${$string(input.hash)},"btime":${input.btime}}`;
|
|
926
932
|
const $so1 = input => `{${$tail(`${undefined === input.file ? "" : `"file":${undefined !== input.file ? $string(input.file) : undefined}`}`)}}`;
|
|
927
933
|
return $so0(input);
|
|
928
934
|
};
|
|
929
935
|
export const assertStringifyFileStats = (input, errorFactory) => { const assert = (input, errorFactory) => {
|
|
930
936
|
const __is = input => {
|
|
931
|
-
const $io0 = input => "number" === typeof input.position && (0 <= input.position && (Math.floor(input.position) === input.position && 0 <= input.position && input.position <=
|
|
937
|
+
const $io0 = input => "number" === typeof input.position && (0 <= input.position && (Math.floor(input.position) === input.position && 0 <= input.position && input.position <= 18446744073709552000)) && "boolean" === typeof input.uploading && "boolean" === typeof input.completed && (Array.isArray(input.zones) && input.zones.every(elem => "string" === typeof elem)) && (Array.isArray(input.replicas) && input.replicas.every(elem => "string" === typeof elem)) && ("string" === typeof input.id && /^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.id)) && ("number" === typeof input.size && (0 <= input.size && (Math.floor(input.size) === input.size && 0 <= input.size && input.size <= 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)) && (null === input.error || Array.isArray(input.error) && input.error.every(elem => "object" === typeof elem && null !== elem && $io2(elem))) && "string" === typeof input.resumable && "string" === typeof input.mimeType && ("string" === typeof input.hash && /^([A-Fa-f0-9]{32})?$/.test(input.hash)) && ("number" === typeof input.btime && (0 <= input.btime && (Math.floor(input.btime) === input.btime && 0 <= input.btime && input.btime <= 18446744073709552000)));
|
|
932
938
|
const $io1 = input => undefined === input.file || "string" === typeof input.file;
|
|
933
939
|
const $io2 = input => "string" === typeof input.message;
|
|
934
940
|
return "object" === typeof input && null !== input && $io0(input);
|
|
@@ -940,13 +946,13 @@ export const assertStringifyFileStats = (input, errorFactory) => { const assert
|
|
|
940
946
|
path: _path + ".position",
|
|
941
947
|
expected: "number & Minimum<0>",
|
|
942
948
|
value: input.position
|
|
943
|
-
}, errorFactory)) && (Math.floor(input.position) === input.position && 0 <= input.position && input.position <=
|
|
949
|
+
}, errorFactory)) && (Math.floor(input.position) === input.position && 0 <= input.position && input.position <= 18446744073709552000 || $guard(_exceptionable, {
|
|
944
950
|
path: _path + ".position",
|
|
945
|
-
expected: "number & Type<\"
|
|
951
|
+
expected: "number & Type<\"uint64\">",
|
|
946
952
|
value: input.position
|
|
947
953
|
}, errorFactory)) || $guard(_exceptionable, {
|
|
948
954
|
path: _path + ".position",
|
|
949
|
-
expected: "(number & Minimum<0> & Type<\"
|
|
955
|
+
expected: "(number & Minimum<0> & Type<\"uint64\">)",
|
|
950
956
|
value: input.position
|
|
951
957
|
}, errorFactory)) && ("boolean" === typeof input.uploading || $guard(_exceptionable, {
|
|
952
958
|
path: _path + ".uploading",
|
|
@@ -992,13 +998,13 @@ export const assertStringifyFileStats = (input, errorFactory) => { const assert
|
|
|
992
998
|
path: _path + ".size",
|
|
993
999
|
expected: "number & Minimum<0>",
|
|
994
1000
|
value: input.size
|
|
995
|
-
}, errorFactory)) && (Math.floor(input.size) === input.size && 0 <= input.size && input.size <=
|
|
1001
|
+
}, errorFactory)) && (Math.floor(input.size) === input.size && 0 <= input.size && input.size <= 18446744073709552000 || $guard(_exceptionable, {
|
|
996
1002
|
path: _path + ".size",
|
|
997
|
-
expected: "number & Type<\"
|
|
1003
|
+
expected: "number & Type<\"uint64\">",
|
|
998
1004
|
value: input.size
|
|
999
1005
|
}, errorFactory)) || $guard(_exceptionable, {
|
|
1000
1006
|
path: _path + ".size",
|
|
1001
|
-
expected: "(number & Minimum<0> & Type<\"
|
|
1007
|
+
expected: "(number & Minimum<0> & Type<\"uint64\">)",
|
|
1002
1008
|
value: input.size
|
|
1003
1009
|
}, errorFactory)) && ("boolean" === typeof input.seekable || $guard(_exceptionable, {
|
|
1004
1010
|
path: _path + ".seekable",
|
|
@@ -1036,9 +1042,9 @@ export const assertStringifyFileStats = (input, errorFactory) => { const assert
|
|
|
1036
1042
|
path: _path + ".tags",
|
|
1037
1043
|
expected: "Array<string>",
|
|
1038
1044
|
value: input.tags
|
|
1039
|
-
}, errorFactory)) && ((Array.isArray(input.error) || $guard(_exceptionable, {
|
|
1045
|
+
}, errorFactory)) && (null === input.error || (Array.isArray(input.error) || $guard(_exceptionable, {
|
|
1040
1046
|
path: _path + ".error",
|
|
1041
|
-
expected: "Array<__type>.o1",
|
|
1047
|
+
expected: "(Array<__type>.o1 | null)",
|
|
1042
1048
|
value: input.error
|
|
1043
1049
|
}, errorFactory)) && input.error.every((elem, _index5) => ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
|
|
1044
1050
|
path: _path + ".error[" + _index5 + "]",
|
|
@@ -1050,7 +1056,7 @@ export const assertStringifyFileStats = (input, errorFactory) => { const assert
|
|
|
1050
1056
|
value: elem
|
|
1051
1057
|
}, errorFactory)) || $guard(_exceptionable, {
|
|
1052
1058
|
path: _path + ".error",
|
|
1053
|
-
expected: "Array<__type>.o1",
|
|
1059
|
+
expected: "(Array<__type>.o1 | null)",
|
|
1054
1060
|
value: input.error
|
|
1055
1061
|
}, errorFactory)) && ("string" === typeof input.resumable || $guard(_exceptionable, {
|
|
1056
1062
|
path: _path + ".resumable",
|
|
@@ -1072,13 +1078,13 @@ export const assertStringifyFileStats = (input, errorFactory) => { const assert
|
|
|
1072
1078
|
path: _path + ".btime",
|
|
1073
1079
|
expected: "number & Minimum<0>",
|
|
1074
1080
|
value: input.btime
|
|
1075
|
-
}, errorFactory)) && (Math.floor(input.btime) === input.btime && 0 <= input.btime && input.btime <=
|
|
1081
|
+
}, errorFactory)) && (Math.floor(input.btime) === input.btime && 0 <= input.btime && input.btime <= 18446744073709552000 || $guard(_exceptionable, {
|
|
1076
1082
|
path: _path + ".btime",
|
|
1077
|
-
expected: "number & Type<\"
|
|
1083
|
+
expected: "number & Type<\"uint64\">",
|
|
1078
1084
|
value: input.btime
|
|
1079
1085
|
}, errorFactory)) || $guard(_exceptionable, {
|
|
1080
1086
|
path: _path + ".btime",
|
|
1081
|
-
expected: "(number & Minimum<0> & Type<\"
|
|
1087
|
+
expected: "(number & Minimum<0> & Type<\"uint64\">)",
|
|
1082
1088
|
value: input.btime
|
|
1083
1089
|
}, errorFactory));
|
|
1084
1090
|
const $ao1 = (input, _path, _exceptionable = true) => undefined === input.file || "string" === typeof input.file || $guard(_exceptionable, {
|
|
@@ -1107,7 +1113,7 @@ export const assertStringifyFileStats = (input, errorFactory) => { const assert
|
|
|
1107
1113
|
const $io2 = input => "string" === typeof input.message;
|
|
1108
1114
|
const $string = __typia.json.createAssertStringify.string;
|
|
1109
1115
|
const $tail = __typia.json.createAssertStringify.tail;
|
|
1110
|
-
const $so0 = input => `{"position":${input.position},"uploading":${input.uploading},"completed":${input.completed},"zones":${`[${input.zones.map(elem => $string(elem)).join(",")}]`},"replicas":${`[${input.replicas.map(elem => $string(elem)).join(",")}]`},"id":${$string(input.id)},"size":${input.size},"seekable":${input.seekable},"deleted":${input.deleted},"refs":${`[${input.refs.map(elem => $so1(elem)).join(",")}]`},"tags":${`[${input.tags.map(elem => $string(elem)).join(",")}]`},"error":${`[${input.error.map(elem => `{"message":${$string(elem.message)}}`).join(",")}]`},"resumable":${$string(input.resumable)},"mimeType":${$string(input.mimeType)},"hash":${$string(input.hash)},"btime":${input.btime}}`;
|
|
1116
|
+
const $so0 = input => `{"position":${input.position},"uploading":${input.uploading},"completed":${input.completed},"zones":${`[${input.zones.map(elem => $string(elem)).join(",")}]`},"replicas":${`[${input.replicas.map(elem => $string(elem)).join(",")}]`},"id":${$string(input.id)},"size":${input.size},"seekable":${input.seekable},"deleted":${input.deleted},"refs":${`[${input.refs.map(elem => $so1(elem)).join(",")}]`},"tags":${`[${input.tags.map(elem => $string(elem)).join(",")}]`},"error":${null !== input.error ? `[${input.error.map(elem => `{"message":${$string(elem.message)}}`).join(",")}]` : "null"},"resumable":${$string(input.resumable)},"mimeType":${$string(input.mimeType)},"hash":${$string(input.hash)},"btime":${input.btime}}`;
|
|
1111
1117
|
const $so1 = input => `{${$tail(`${undefined === input.file ? "" : `"file":${undefined !== input.file ? $string(input.file) : undefined}`}`)}}`;
|
|
1112
1118
|
return $so0(input);
|
|
1113
1119
|
}; return stringify(assert(input, errorFactory)); };
|