@nxtedition/types 23.0.3 → 23.0.5
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/date.d.ts +8 -0
- package/dist/common/date.js +59 -0
- package/dist/common/index.d.ts +5 -0
- package/dist/common/index.js +5 -0
- package/dist/common/media.d.ts +8 -0
- package/dist/common/media.js +83 -0
- package/dist/common/pipeline.d.ts +8 -0
- package/dist/common/pipeline.js +88 -0
- package/dist/common/promoted-tag.d.ts +13 -0
- package/dist/common/promoted-tag.js +147 -0
- package/dist/common/render-preset.d.ts +32 -0
- package/dist/common/render-preset.js +516 -0
- package/dist/common/settings.d.ts +24 -10
- package/dist/common/settings.js +747 -321
- package/dist/domains/asset.d.ts +166 -65
- package/dist/domains/asset.js +1325 -96
- package/dist/domains/index.d.ts +9 -1
- package/dist/domains/index.js +4 -0
- package/dist/domains/media.d.ts +14 -2
- package/dist/domains/media.js +724 -24
- package/dist/domains/pipeline-preset.d.ts +17 -0
- package/dist/domains/pipeline-preset.js +225 -0
- package/dist/domains/pipeline.d.ts +29 -0
- package/dist/domains/pipeline.js +423 -0
- package/dist/domains/render-preset.d.ts +4 -0
- package/dist/domains/render-preset.js +1 -0
- package/dist/domains/settings.js +734 -321
- package/dist/domains/storyboard.d.ts +14 -0
- package/dist/domains/storyboard.js +125 -0
- package/dist/index.d.ts +70 -0
- package/dist/index.js +28 -12
- package/dist/schema.json +1035 -74
- package/package.json +1 -1
package/dist/domains/media.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import __typia from "typia";
|
|
2
2
|
export const isMediaSourceRecord = input => {
|
|
3
3
|
const $io0 = input => (undefined === input.input || "object" === typeof input.input && null !== input.input && false === Array.isArray(input.input) && $io1(input.input)) && (undefined === input.lang || "string" === typeof input.lang) && (undefined === input.subtitle || "string" === typeof input.subtitle) && (undefined === input.video || "object" === typeof input.video && null !== input.video && false === Array.isArray(input.video) && $io2(input.video)) && (undefined === input.start || "number" === typeof input.start) && (undefined === input.end || "number" === typeof input.end) && (undefined === input.transcribe || "object" === typeof input.transcribe && null !== input.transcribe && false === Array.isArray(input.transcribe) && $io4(input.transcribe));
|
|
4
|
-
const $io1 = input => (undefined === input.type || "string" === typeof input.type) && (undefined === input.file || "string" === typeof input.file);
|
|
4
|
+
const $io1 = input => (undefined === input.type || "string" === typeof input.type) && (null === input.file || undefined === input.file || "string" === typeof input.file);
|
|
5
5
|
const $io2 = input => undefined === input.crop || "object" === typeof input.crop && null !== input.crop && false === Array.isArray(input.crop) && $io3(input.crop);
|
|
6
6
|
const $io3 = input => (undefined === input.x || "number" === typeof input.x) && (undefined === input.y || "number" === typeof input.y) && (undefined === input.width || "number" === typeof input.width) && (undefined === input.height || "number" === typeof input.height);
|
|
7
7
|
const $io4 = input => (undefined === input.language || "string" === typeof input.language) && (undefined === input.pan || Array.isArray(input.pan) && input.pan.every(elem => "number" === typeof elem));
|
|
@@ -10,7 +10,7 @@ export const isMediaSourceRecord = input => {
|
|
|
10
10
|
export const assertMediaSourceRecord = (input, errorFactory) => {
|
|
11
11
|
const __is = input => {
|
|
12
12
|
const $io0 = input => (undefined === input.input || "object" === typeof input.input && null !== input.input && false === Array.isArray(input.input) && $io1(input.input)) && (undefined === input.lang || "string" === typeof input.lang) && (undefined === input.subtitle || "string" === typeof input.subtitle) && (undefined === input.video || "object" === typeof input.video && null !== input.video && false === Array.isArray(input.video) && $io2(input.video)) && (undefined === input.start || "number" === typeof input.start) && (undefined === input.end || "number" === typeof input.end) && (undefined === input.transcribe || "object" === typeof input.transcribe && null !== input.transcribe && false === Array.isArray(input.transcribe) && $io4(input.transcribe));
|
|
13
|
-
const $io1 = input => (undefined === input.type || "string" === typeof input.type) && (undefined === input.file || "string" === typeof input.file);
|
|
13
|
+
const $io1 = input => (undefined === input.type || "string" === typeof input.type) && (null === input.file || undefined === input.file || "string" === typeof input.file);
|
|
14
14
|
const $io2 = input => undefined === input.crop || "object" === typeof input.crop && null !== input.crop && false === Array.isArray(input.crop) && $io3(input.crop);
|
|
15
15
|
const $io3 = input => (undefined === input.x || "number" === typeof input.x) && (undefined === input.y || "number" === typeof input.y) && (undefined === input.width || "number" === typeof input.width) && (undefined === input.height || "number" === typeof input.height);
|
|
16
16
|
const $io4 = input => (undefined === input.language || "string" === typeof input.language) && (undefined === input.pan || Array.isArray(input.pan) && input.pan.every(elem => "number" === typeof elem));
|
|
@@ -64,9 +64,9 @@ export const assertMediaSourceRecord = (input, errorFactory) => {
|
|
|
64
64
|
path: _path + ".type",
|
|
65
65
|
expected: "(string | undefined)",
|
|
66
66
|
value: input.type
|
|
67
|
-
}, errorFactory)) && (undefined === input.file || "string" === typeof input.file || $guard(_exceptionable, {
|
|
67
|
+
}, errorFactory)) && (null === input.file || undefined === input.file || "string" === typeof input.file || $guard(_exceptionable, {
|
|
68
68
|
path: _path + ".file",
|
|
69
|
-
expected: "(string | undefined)",
|
|
69
|
+
expected: "(null | string | undefined)",
|
|
70
70
|
value: input.file
|
|
71
71
|
}, errorFactory));
|
|
72
72
|
const $ao2 = (input, _path, _exceptionable = true) => undefined === input.crop || ("object" === typeof input.crop && null !== input.crop && false === Array.isArray(input.crop) || $guard(_exceptionable, {
|
|
@@ -164,6 +164,7 @@ export const randomMediaSourceRecord = generator => {
|
|
|
164
164
|
])(),
|
|
165
165
|
file: $pick([
|
|
166
166
|
() => undefined,
|
|
167
|
+
() => null,
|
|
167
168
|
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
|
|
168
169
|
])()
|
|
169
170
|
});
|
|
@@ -206,7 +207,7 @@ export const randomMediaSourceRecord = generator => {
|
|
|
206
207
|
export const assertGuardMediaSourceRecord = (input, errorFactory) => {
|
|
207
208
|
const __is = input => {
|
|
208
209
|
const $io0 = input => (undefined === input.input || "object" === typeof input.input && null !== input.input && false === Array.isArray(input.input) && $io1(input.input)) && (undefined === input.lang || "string" === typeof input.lang) && (undefined === input.subtitle || "string" === typeof input.subtitle) && (undefined === input.video || "object" === typeof input.video && null !== input.video && false === Array.isArray(input.video) && $io2(input.video)) && (undefined === input.start || "number" === typeof input.start) && (undefined === input.end || "number" === typeof input.end) && (undefined === input.transcribe || "object" === typeof input.transcribe && null !== input.transcribe && false === Array.isArray(input.transcribe) && $io4(input.transcribe));
|
|
209
|
-
const $io1 = input => (undefined === input.type || "string" === typeof input.type) && (undefined === input.file || "string" === typeof input.file);
|
|
210
|
+
const $io1 = input => (undefined === input.type || "string" === typeof input.type) && (null === input.file || undefined === input.file || "string" === typeof input.file);
|
|
210
211
|
const $io2 = input => undefined === input.crop || "object" === typeof input.crop && null !== input.crop && false === Array.isArray(input.crop) && $io3(input.crop);
|
|
211
212
|
const $io3 = input => (undefined === input.x || "number" === typeof input.x) && (undefined === input.y || "number" === typeof input.y) && (undefined === input.width || "number" === typeof input.width) && (undefined === input.height || "number" === typeof input.height);
|
|
212
213
|
const $io4 = input => (undefined === input.language || "string" === typeof input.language) && (undefined === input.pan || Array.isArray(input.pan) && input.pan.every(elem => "number" === typeof elem));
|
|
@@ -260,9 +261,9 @@ export const assertGuardMediaSourceRecord = (input, errorFactory) => {
|
|
|
260
261
|
path: _path + ".type",
|
|
261
262
|
expected: "(string | undefined)",
|
|
262
263
|
value: input.type
|
|
263
|
-
}, errorFactory)) && (undefined === input.file || "string" === typeof input.file || $guard(_exceptionable, {
|
|
264
|
+
}, errorFactory)) && (null === input.file || undefined === input.file || "string" === typeof input.file || $guard(_exceptionable, {
|
|
264
265
|
path: _path + ".file",
|
|
265
|
-
expected: "(string | undefined)",
|
|
266
|
+
expected: "(null | string | undefined)",
|
|
266
267
|
value: input.file
|
|
267
268
|
}, errorFactory));
|
|
268
269
|
const $ao2 = (input, _path, _exceptionable = true) => undefined === input.crop || ("object" === typeof input.crop && null !== input.crop && false === Array.isArray(input.crop) || $guard(_exceptionable, {
|
|
@@ -320,14 +321,14 @@ export const assertGuardMediaSourceRecord = (input, errorFactory) => {
|
|
|
320
321
|
})(input, "$input", true);
|
|
321
322
|
};
|
|
322
323
|
export const stringifyMediaSourceRecord = input => {
|
|
323
|
-
const $io1 = input => (undefined === input.type || "string" === typeof input.type) && (undefined === input.file || "string" === typeof input.file);
|
|
324
|
+
const $io1 = input => (undefined === input.type || "string" === typeof input.type) && (null === input.file || undefined === input.file || "string" === typeof input.file);
|
|
324
325
|
const $io2 = input => undefined === input.crop || "object" === typeof input.crop && null !== input.crop && false === Array.isArray(input.crop) && $io3(input.crop);
|
|
325
326
|
const $io3 = input => (undefined === input.x || "number" === typeof input.x) && (undefined === input.y || "number" === typeof input.y) && (undefined === input.width || "number" === typeof input.width) && (undefined === input.height || "number" === typeof input.height);
|
|
326
327
|
const $io4 = input => (undefined === input.language || "string" === typeof input.language) && (undefined === input.pan || Array.isArray(input.pan) && input.pan.every(elem => "number" === typeof elem));
|
|
327
328
|
const $string = __typia.json.createStringify.string;
|
|
328
329
|
const $tail = __typia.json.createStringify.tail;
|
|
329
330
|
const $so0 = input => `{${$tail(`${undefined === input.input ? "" : `"input":${undefined !== input.input ? $so1(input.input) : undefined},`}${undefined === input.lang ? "" : `"lang":${undefined !== input.lang ? $string(input.lang) : undefined},`}${undefined === input.subtitle ? "" : `"subtitle":${undefined !== input.subtitle ? $string(input.subtitle) : undefined},`}${undefined === input.video ? "" : `"video":${undefined !== input.video ? $so2(input.video) : undefined},`}${undefined === input.start ? "" : `"start":${undefined !== input.start ? input.start : undefined},`}${undefined === input.end ? "" : `"end":${undefined !== input.end ? input.end : undefined},`}${undefined === input.transcribe ? "" : `"transcribe":${undefined !== input.transcribe ? $so4(input.transcribe) : undefined}`}`)}}`;
|
|
330
|
-
const $so1 = input => `{${$tail(`${undefined === input.type ? "" : `"type":${undefined !== input.type ? $string(input.type) : undefined},`}${undefined === input.file ? "" : `"file":${undefined !== input.file ? $string(input.file) : undefined}`}`)}}`;
|
|
331
|
+
const $so1 = input => `{${$tail(`${undefined === input.type ? "" : `"type":${undefined !== input.type ? $string(input.type) : undefined},`}${undefined === input.file ? "" : `"file":${undefined !== input.file ? null !== input.file ? $string(input.file) : "null" : undefined}`}`)}}`;
|
|
331
332
|
const $so2 = input => `{${$tail(`${undefined === input.crop ? "" : `"crop":${undefined !== input.crop ? $so3(input.crop) : undefined}`}`)}}`;
|
|
332
333
|
const $so3 = input => `{${$tail(`${undefined === input.x ? "" : `"x":${undefined !== input.x ? input.x : undefined},`}${undefined === input.y ? "" : `"y":${undefined !== input.y ? input.y : undefined},`}${undefined === input.width ? "" : `"width":${undefined !== input.width ? input.width : undefined},`}${undefined === input.height ? "" : `"height":${undefined !== input.height ? input.height : undefined}`}`)}}`;
|
|
333
334
|
const $so4 = input => `{${$tail(`${undefined === input.language ? "" : `"language":${undefined !== input.language ? $string(input.language) : undefined},`}${undefined === input.pan ? "" : `"pan":${undefined !== input.pan ? `[${input.pan.map(elem => elem).join(",")}]` : undefined}`}`)}}`;
|
|
@@ -336,7 +337,7 @@ export const stringifyMediaSourceRecord = input => {
|
|
|
336
337
|
export const assertStringifyMediaSourceRecord = (input, errorFactory) => { const assert = (input, errorFactory) => {
|
|
337
338
|
const __is = input => {
|
|
338
339
|
const $io0 = input => (undefined === input.input || "object" === typeof input.input && null !== input.input && false === Array.isArray(input.input) && $io1(input.input)) && (undefined === input.lang || "string" === typeof input.lang) && (undefined === input.subtitle || "string" === typeof input.subtitle) && (undefined === input.video || "object" === typeof input.video && null !== input.video && false === Array.isArray(input.video) && $io2(input.video)) && (undefined === input.start || "number" === typeof input.start && !Number.isNaN(input.start)) && (undefined === input.end || "number" === typeof input.end && !Number.isNaN(input.end)) && (undefined === input.transcribe || "object" === typeof input.transcribe && null !== input.transcribe && false === Array.isArray(input.transcribe) && $io4(input.transcribe));
|
|
339
|
-
const $io1 = input => (undefined === input.type || "string" === typeof input.type) && (undefined === input.file || "string" === typeof input.file);
|
|
340
|
+
const $io1 = input => (undefined === input.type || "string" === typeof input.type) && (null === input.file || undefined === input.file || "string" === typeof input.file);
|
|
340
341
|
const $io2 = input => undefined === input.crop || "object" === typeof input.crop && null !== input.crop && false === Array.isArray(input.crop) && $io3(input.crop);
|
|
341
342
|
const $io3 = input => (undefined === input.x || "number" === typeof input.x && !Number.isNaN(input.x)) && (undefined === input.y || "number" === typeof input.y && !Number.isNaN(input.y)) && (undefined === input.width || "number" === typeof input.width && !Number.isNaN(input.width)) && (undefined === input.height || "number" === typeof input.height && !Number.isNaN(input.height));
|
|
342
343
|
const $io4 = input => (undefined === input.language || "string" === typeof input.language) && (undefined === input.pan || Array.isArray(input.pan) && input.pan.every(elem => "number" === typeof elem && !Number.isNaN(elem)));
|
|
@@ -390,9 +391,9 @@ export const assertStringifyMediaSourceRecord = (input, errorFactory) => { const
|
|
|
390
391
|
path: _path + ".type",
|
|
391
392
|
expected: "(string | undefined)",
|
|
392
393
|
value: input.type
|
|
393
|
-
}, errorFactory)) && (undefined === input.file || "string" === typeof input.file || $guard(_exceptionable, {
|
|
394
|
+
}, errorFactory)) && (null === input.file || undefined === input.file || "string" === typeof input.file || $guard(_exceptionable, {
|
|
394
395
|
path: _path + ".file",
|
|
395
|
-
expected: "(string | undefined)",
|
|
396
|
+
expected: "(null | string | undefined)",
|
|
396
397
|
value: input.file
|
|
397
398
|
}, errorFactory));
|
|
398
399
|
const $ao2 = (input, _path, _exceptionable = true) => undefined === input.crop || ("object" === typeof input.crop && null !== input.crop && false === Array.isArray(input.crop) || $guard(_exceptionable, {
|
|
@@ -450,32 +451,78 @@ export const assertStringifyMediaSourceRecord = (input, errorFactory) => { const
|
|
|
450
451
|
})(input, "$input", true);
|
|
451
452
|
return input;
|
|
452
453
|
}; const stringify = input => {
|
|
453
|
-
const $io1 = input => (undefined === input.type || "string" === typeof input.type) && (undefined === input.file || "string" === typeof input.file);
|
|
454
|
+
const $io1 = input => (undefined === input.type || "string" === typeof input.type) && (null === input.file || undefined === input.file || "string" === typeof input.file);
|
|
454
455
|
const $io2 = input => undefined === input.crop || "object" === typeof input.crop && null !== input.crop && false === Array.isArray(input.crop) && $io3(input.crop);
|
|
455
456
|
const $io3 = input => (undefined === input.x || "number" === typeof input.x) && (undefined === input.y || "number" === typeof input.y) && (undefined === input.width || "number" === typeof input.width) && (undefined === input.height || "number" === typeof input.height);
|
|
456
457
|
const $io4 = input => (undefined === input.language || "string" === typeof input.language) && (undefined === input.pan || Array.isArray(input.pan) && input.pan.every(elem => "number" === typeof elem));
|
|
457
458
|
const $string = __typia.json.createAssertStringify.string;
|
|
458
459
|
const $tail = __typia.json.createAssertStringify.tail;
|
|
459
460
|
const $so0 = input => `{${$tail(`${undefined === input.input ? "" : `"input":${undefined !== input.input ? $so1(input.input) : undefined},`}${undefined === input.lang ? "" : `"lang":${undefined !== input.lang ? $string(input.lang) : undefined},`}${undefined === input.subtitle ? "" : `"subtitle":${undefined !== input.subtitle ? $string(input.subtitle) : undefined},`}${undefined === input.video ? "" : `"video":${undefined !== input.video ? $so2(input.video) : undefined},`}${undefined === input.start ? "" : `"start":${undefined !== input.start ? input.start : undefined},`}${undefined === input.end ? "" : `"end":${undefined !== input.end ? input.end : undefined},`}${undefined === input.transcribe ? "" : `"transcribe":${undefined !== input.transcribe ? $so4(input.transcribe) : undefined}`}`)}}`;
|
|
460
|
-
const $so1 = input => `{${$tail(`${undefined === input.type ? "" : `"type":${undefined !== input.type ? $string(input.type) : undefined},`}${undefined === input.file ? "" : `"file":${undefined !== input.file ? $string(input.file) : undefined}`}`)}}`;
|
|
461
|
+
const $so1 = input => `{${$tail(`${undefined === input.type ? "" : `"type":${undefined !== input.type ? $string(input.type) : undefined},`}${undefined === input.file ? "" : `"file":${undefined !== input.file ? null !== input.file ? $string(input.file) : "null" : undefined}`}`)}}`;
|
|
461
462
|
const $so2 = input => `{${$tail(`${undefined === input.crop ? "" : `"crop":${undefined !== input.crop ? $so3(input.crop) : undefined}`}`)}}`;
|
|
462
463
|
const $so3 = input => `{${$tail(`${undefined === input.x ? "" : `"x":${undefined !== input.x ? input.x : undefined},`}${undefined === input.y ? "" : `"y":${undefined !== input.y ? input.y : undefined},`}${undefined === input.width ? "" : `"width":${undefined !== input.width ? input.width : undefined},`}${undefined === input.height ? "" : `"height":${undefined !== input.height ? input.height : undefined}`}`)}}`;
|
|
463
464
|
const $so4 = input => `{${$tail(`${undefined === input.language ? "" : `"language":${undefined !== input.language ? $string(input.language) : undefined},`}${undefined === input.pan ? "" : `"pan":${undefined !== input.pan ? `[${input.pan.map(elem => elem).join(",")}]` : undefined}`}`)}}`;
|
|
464
465
|
return $so0(input);
|
|
465
466
|
}; return stringify(assert(input, errorFactory)); };
|
|
466
467
|
export const isMediaConsolidateRecord = input => {
|
|
467
|
-
const $io0 = input => true && true &&
|
|
468
|
+
const $io0 = input => true && true && (undefined === input.preset || "object" === typeof input.preset && null !== input.preset && false === Array.isArray(input.preset) && $io1(input.preset)) && true;
|
|
469
|
+
const $io1 = input => (undefined === input.type || "string" === typeof input.type) && true && (null !== input.profile && (undefined === input.profile || "string" === typeof input.profile || "object" === typeof input.profile && null !== input.profile && $io2(input.profile)));
|
|
470
|
+
const $io2 = input => ("png" === input.format || "mp4" === input.format) && true && true && true && (undefined === input.pick || Array.isArray(input.pick) && input.pick.every(elem => "string" === typeof elem));
|
|
468
471
|
return "object" === typeof input && null !== input && false === Array.isArray(input) && $io0(input);
|
|
469
472
|
};
|
|
470
473
|
export const assertMediaConsolidateRecord = (input, errorFactory) => {
|
|
471
474
|
const __is = input => {
|
|
472
|
-
const $io0 = input => true && true &&
|
|
475
|
+
const $io0 = input => true && true && (undefined === input.preset || "object" === typeof input.preset && null !== input.preset && false === Array.isArray(input.preset) && $io1(input.preset)) && true;
|
|
476
|
+
const $io1 = input => (undefined === input.type || "string" === typeof input.type) && true && (null !== input.profile && (undefined === input.profile || "string" === typeof input.profile || "object" === typeof input.profile && null !== input.profile && $io2(input.profile)));
|
|
477
|
+
const $io2 = input => ("png" === input.format || "mp4" === input.format) && true && true && true && (undefined === input.pick || Array.isArray(input.pick) && input.pick.every(elem => "string" === typeof elem));
|
|
473
478
|
return "object" === typeof input && null !== input && false === Array.isArray(input) && $io0(input);
|
|
474
479
|
};
|
|
475
480
|
if (false === __is(input))
|
|
476
481
|
((input, _path, _exceptionable = true) => {
|
|
477
482
|
const $guard = __typia.createAssert.guard;
|
|
478
|
-
const $ao0 = (input, _path, _exceptionable = true) => true && true &&
|
|
483
|
+
const $ao0 = (input, _path, _exceptionable = true) => true && true && (undefined === input.preset || ("object" === typeof input.preset && null !== input.preset && false === Array.isArray(input.preset) || $guard(_exceptionable, {
|
|
484
|
+
path: _path + ".preset",
|
|
485
|
+
expected: "(RenderPreset | undefined)",
|
|
486
|
+
value: input.preset
|
|
487
|
+
}, errorFactory)) && $ao1(input.preset, _path + ".preset", true && _exceptionable) || $guard(_exceptionable, {
|
|
488
|
+
path: _path + ".preset",
|
|
489
|
+
expected: "(RenderPreset | undefined)",
|
|
490
|
+
value: input.preset
|
|
491
|
+
}, errorFactory)) && true;
|
|
492
|
+
const $ao1 = (input, _path, _exceptionable = true) => (undefined === input.type || "string" === typeof input.type || $guard(_exceptionable, {
|
|
493
|
+
path: _path + ".type",
|
|
494
|
+
expected: "(string | undefined)",
|
|
495
|
+
value: input.type
|
|
496
|
+
}, errorFactory)) && true && ((null !== input.profile || $guard(_exceptionable, {
|
|
497
|
+
path: _path + ".profile",
|
|
498
|
+
expected: "(RenderPresetProfile | string | undefined)",
|
|
499
|
+
value: input.profile
|
|
500
|
+
}, errorFactory)) && (undefined === input.profile || "string" === typeof input.profile || ("object" === typeof input.profile && null !== input.profile || $guard(_exceptionable, {
|
|
501
|
+
path: _path + ".profile",
|
|
502
|
+
expected: "(RenderPresetProfile | string | undefined)",
|
|
503
|
+
value: input.profile
|
|
504
|
+
}, errorFactory)) && $ao2(input.profile, _path + ".profile", true && _exceptionable) || $guard(_exceptionable, {
|
|
505
|
+
path: _path + ".profile",
|
|
506
|
+
expected: "(RenderPresetProfile | string | undefined)",
|
|
507
|
+
value: input.profile
|
|
508
|
+
}, errorFactory)));
|
|
509
|
+
const $ao2 = (input, _path, _exceptionable = true) => ("png" === input.format || "mp4" === input.format || $guard(_exceptionable, {
|
|
510
|
+
path: _path + ".format",
|
|
511
|
+
expected: "(\"mp4\" | \"png\")",
|
|
512
|
+
value: input.format
|
|
513
|
+
}, errorFactory)) && true && true && true && (undefined === input.pick || (Array.isArray(input.pick) || $guard(_exceptionable, {
|
|
514
|
+
path: _path + ".pick",
|
|
515
|
+
expected: "(Array<string> | undefined)",
|
|
516
|
+
value: input.pick
|
|
517
|
+
}, errorFactory)) && input.pick.every((elem, _index1) => "string" === typeof elem || $guard(_exceptionable, {
|
|
518
|
+
path: _path + ".pick[" + _index1 + "]",
|
|
519
|
+
expected: "string",
|
|
520
|
+
value: elem
|
|
521
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
|
522
|
+
path: _path + ".pick",
|
|
523
|
+
expected: "(Array<string> | undefined)",
|
|
524
|
+
value: input.pick
|
|
525
|
+
}, errorFactory));
|
|
479
526
|
return ("object" === typeof input && null !== input && false === Array.isArray(input) || $guard(true, {
|
|
480
527
|
path: _path + "",
|
|
481
528
|
expected: "MediaConsolidateRecord",
|
|
@@ -490,6 +537,7 @@ export const assertMediaConsolidateRecord = (input, errorFactory) => {
|
|
|
490
537
|
};
|
|
491
538
|
export const randomMediaConsolidateRecord = generator => {
|
|
492
539
|
const $pick = __typia.createRandom.pick;
|
|
540
|
+
const $generator = __typia.createRandom.generator;
|
|
493
541
|
const $ro0 = (_recursive = false, _depth = 0) => ({
|
|
494
542
|
source: $pick([
|
|
495
543
|
() => "any type used...",
|
|
@@ -499,26 +547,107 @@ export const randomMediaConsolidateRecord = generator => {
|
|
|
499
547
|
() => "any type used...",
|
|
500
548
|
() => undefined
|
|
501
549
|
])(),
|
|
550
|
+
preset: $pick([
|
|
551
|
+
() => undefined,
|
|
552
|
+
() => $ro1(_recursive, _recursive ? 1 + _depth : _depth)
|
|
553
|
+
])(),
|
|
554
|
+
error: $pick([
|
|
555
|
+
() => "any type used...",
|
|
556
|
+
() => undefined
|
|
557
|
+
])()
|
|
558
|
+
});
|
|
559
|
+
const $ro1 = (_recursive = false, _depth = 0) => ({
|
|
560
|
+
type: $pick([
|
|
561
|
+
() => undefined,
|
|
562
|
+
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
|
|
563
|
+
])(),
|
|
564
|
+
description: $pick([
|
|
565
|
+
() => "any type used...",
|
|
566
|
+
() => undefined
|
|
567
|
+
])(),
|
|
502
568
|
profile: $pick([
|
|
569
|
+
() => undefined,
|
|
570
|
+
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
|
|
571
|
+
() => $ro2(_recursive, _recursive ? 1 + _depth : _depth)
|
|
572
|
+
])()
|
|
573
|
+
});
|
|
574
|
+
const $ro2 = (_recursive = false, _depth = 0) => ({
|
|
575
|
+
format: $pick([
|
|
576
|
+
() => "png",
|
|
577
|
+
() => "mp4"
|
|
578
|
+
])(),
|
|
579
|
+
transcribe: $pick([
|
|
503
580
|
() => "any type used...",
|
|
504
581
|
() => undefined
|
|
505
582
|
])(),
|
|
506
|
-
|
|
583
|
+
audio: $pick([
|
|
507
584
|
() => "any type used...",
|
|
508
585
|
() => undefined
|
|
586
|
+
])(),
|
|
587
|
+
video: $pick([
|
|
588
|
+
() => "any type used...",
|
|
589
|
+
() => undefined
|
|
590
|
+
])(),
|
|
591
|
+
pick: $pick([
|
|
592
|
+
() => undefined,
|
|
593
|
+
() => (generator?.array ?? $generator.array)(() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)())
|
|
509
594
|
])()
|
|
510
595
|
});
|
|
511
596
|
return $ro0();
|
|
512
597
|
};
|
|
513
598
|
export const assertGuardMediaConsolidateRecord = (input, errorFactory) => {
|
|
514
599
|
const __is = input => {
|
|
515
|
-
const $io0 = input => true && true &&
|
|
600
|
+
const $io0 = input => true && true && (undefined === input.preset || "object" === typeof input.preset && null !== input.preset && false === Array.isArray(input.preset) && $io1(input.preset)) && true;
|
|
601
|
+
const $io1 = input => (undefined === input.type || "string" === typeof input.type) && true && (null !== input.profile && (undefined === input.profile || "string" === typeof input.profile || "object" === typeof input.profile && null !== input.profile && $io2(input.profile)));
|
|
602
|
+
const $io2 = input => ("png" === input.format || "mp4" === input.format) && true && true && true && (undefined === input.pick || Array.isArray(input.pick) && input.pick.every(elem => "string" === typeof elem));
|
|
516
603
|
return "object" === typeof input && null !== input && false === Array.isArray(input) && $io0(input);
|
|
517
604
|
};
|
|
518
605
|
if (false === __is(input))
|
|
519
606
|
((input, _path, _exceptionable = true) => {
|
|
520
607
|
const $guard = __typia.createAssertGuard.guard;
|
|
521
|
-
const $ao0 = (input, _path, _exceptionable = true) => true && true &&
|
|
608
|
+
const $ao0 = (input, _path, _exceptionable = true) => true && true && (undefined === input.preset || ("object" === typeof input.preset && null !== input.preset && false === Array.isArray(input.preset) || $guard(_exceptionable, {
|
|
609
|
+
path: _path + ".preset",
|
|
610
|
+
expected: "(RenderPreset | undefined)",
|
|
611
|
+
value: input.preset
|
|
612
|
+
}, errorFactory)) && $ao1(input.preset, _path + ".preset", true && _exceptionable) || $guard(_exceptionable, {
|
|
613
|
+
path: _path + ".preset",
|
|
614
|
+
expected: "(RenderPreset | undefined)",
|
|
615
|
+
value: input.preset
|
|
616
|
+
}, errorFactory)) && true;
|
|
617
|
+
const $ao1 = (input, _path, _exceptionable = true) => (undefined === input.type || "string" === typeof input.type || $guard(_exceptionable, {
|
|
618
|
+
path: _path + ".type",
|
|
619
|
+
expected: "(string | undefined)",
|
|
620
|
+
value: input.type
|
|
621
|
+
}, errorFactory)) && true && ((null !== input.profile || $guard(_exceptionable, {
|
|
622
|
+
path: _path + ".profile",
|
|
623
|
+
expected: "(RenderPresetProfile | string | undefined)",
|
|
624
|
+
value: input.profile
|
|
625
|
+
}, errorFactory)) && (undefined === input.profile || "string" === typeof input.profile || ("object" === typeof input.profile && null !== input.profile || $guard(_exceptionable, {
|
|
626
|
+
path: _path + ".profile",
|
|
627
|
+
expected: "(RenderPresetProfile | string | undefined)",
|
|
628
|
+
value: input.profile
|
|
629
|
+
}, errorFactory)) && $ao2(input.profile, _path + ".profile", true && _exceptionable) || $guard(_exceptionable, {
|
|
630
|
+
path: _path + ".profile",
|
|
631
|
+
expected: "(RenderPresetProfile | string | undefined)",
|
|
632
|
+
value: input.profile
|
|
633
|
+
}, errorFactory)));
|
|
634
|
+
const $ao2 = (input, _path, _exceptionable = true) => ("png" === input.format || "mp4" === input.format || $guard(_exceptionable, {
|
|
635
|
+
path: _path + ".format",
|
|
636
|
+
expected: "(\"mp4\" | \"png\")",
|
|
637
|
+
value: input.format
|
|
638
|
+
}, errorFactory)) && true && true && true && (undefined === input.pick || (Array.isArray(input.pick) || $guard(_exceptionable, {
|
|
639
|
+
path: _path + ".pick",
|
|
640
|
+
expected: "(Array<string> | undefined)",
|
|
641
|
+
value: input.pick
|
|
642
|
+
}, errorFactory)) && input.pick.every((elem, _index1) => "string" === typeof elem || $guard(_exceptionable, {
|
|
643
|
+
path: _path + ".pick[" + _index1 + "]",
|
|
644
|
+
expected: "string",
|
|
645
|
+
value: elem
|
|
646
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
|
647
|
+
path: _path + ".pick",
|
|
648
|
+
expected: "(Array<string> | undefined)",
|
|
649
|
+
value: input.pick
|
|
650
|
+
}, errorFactory));
|
|
522
651
|
return ("object" === typeof input && null !== input && false === Array.isArray(input) || $guard(true, {
|
|
523
652
|
path: _path + "",
|
|
524
653
|
expected: "MediaConsolidateRecord",
|
|
@@ -531,19 +660,87 @@ export const assertGuardMediaConsolidateRecord = (input, errorFactory) => {
|
|
|
531
660
|
})(input, "$input", true);
|
|
532
661
|
};
|
|
533
662
|
export const stringifyMediaConsolidateRecord = input => {
|
|
663
|
+
const $io1 = input => (undefined === input.type || "string" === typeof input.type) && true && (null !== input.profile && (undefined === input.profile || "string" === typeof input.profile || "object" === typeof input.profile && null !== input.profile && $io2(input.profile)));
|
|
664
|
+
const $io2 = input => ("png" === input.format || "mp4" === input.format) && true && true && true && (undefined === input.pick || Array.isArray(input.pick) && input.pick.every(elem => "string" === typeof elem));
|
|
534
665
|
const $tail = __typia.json.createStringify.tail;
|
|
535
|
-
const $
|
|
666
|
+
const $string = __typia.json.createStringify.string;
|
|
667
|
+
const $throws = __typia.json.createStringify.throws;
|
|
668
|
+
const $so0 = input => `{${$tail(`${undefined === input.source || "function" === typeof input.source ? "" : `"source":${undefined !== input.source ? JSON.stringify(input.source) : undefined},`}${undefined === input.target || "function" === typeof input.target ? "" : `"target":${undefined !== input.target ? JSON.stringify(input.target) : undefined},`}${undefined === input.preset ? "" : `"preset":${undefined !== input.preset ? $so1(input.preset) : undefined},`}${undefined === input.error || "function" === typeof input.error ? "" : `"error":${undefined !== input.error ? JSON.stringify(input.error) : undefined}`}`)}}`;
|
|
669
|
+
const $so1 = input => `{${$tail(`${undefined === input.type ? "" : `"type":${undefined !== input.type ? $string(input.type) : undefined},`}${undefined === input.description || "function" === typeof input.description ? "" : `"description":${undefined !== input.description ? JSON.stringify(input.description) : undefined},`}${undefined === input.profile ? "" : `"profile":${undefined !== input.profile ? (() => {
|
|
670
|
+
if ("string" === typeof input.profile)
|
|
671
|
+
return $string(input.profile);
|
|
672
|
+
if ("object" === typeof input.profile && null !== input.profile)
|
|
673
|
+
return $so2(input.profile);
|
|
674
|
+
$throws({
|
|
675
|
+
expected: "(RenderPresetProfile | string | undefined)",
|
|
676
|
+
value: input.profile
|
|
677
|
+
});
|
|
678
|
+
})() : undefined}`}`)}}`;
|
|
679
|
+
const $so2 = input => `{${undefined === input.transcribe || "function" === typeof input.transcribe ? "" : `"transcribe":${undefined !== input.transcribe ? JSON.stringify(input.transcribe) : undefined},`}${undefined === input.audio || "function" === typeof input.audio ? "" : `"audio":${undefined !== input.audio ? JSON.stringify(input.audio) : undefined},`}${undefined === input.video || "function" === typeof input.video ? "" : `"video":${undefined !== input.video ? JSON.stringify(input.video) : undefined},`}${undefined === input.pick ? "" : `"pick":${undefined !== input.pick ? `[${input.pick.map(elem => $string(elem)).join(",")}]` : undefined},`}"format":${(() => {
|
|
680
|
+
if ("string" === typeof input.format)
|
|
681
|
+
return $string(input.format);
|
|
682
|
+
if ("string" === typeof input.format)
|
|
683
|
+
return "\"" + input.format + "\"";
|
|
684
|
+
$throws({
|
|
685
|
+
expected: "(\"mp4\" | \"png\")",
|
|
686
|
+
value: input.format
|
|
687
|
+
});
|
|
688
|
+
})()}}`;
|
|
536
689
|
return $so0(input);
|
|
537
690
|
};
|
|
538
691
|
export const assertStringifyMediaConsolidateRecord = (input, errorFactory) => { const assert = (input, errorFactory) => {
|
|
539
692
|
const __is = input => {
|
|
540
|
-
const $io0 = input => true && true &&
|
|
693
|
+
const $io0 = input => true && true && (undefined === input.preset || "object" === typeof input.preset && null !== input.preset && false === Array.isArray(input.preset) && $io1(input.preset)) && true;
|
|
694
|
+
const $io1 = input => (undefined === input.type || "string" === typeof input.type) && true && (null !== input.profile && (undefined === input.profile || "string" === typeof input.profile || "object" === typeof input.profile && null !== input.profile && $io2(input.profile)));
|
|
695
|
+
const $io2 = input => ("png" === input.format || "mp4" === input.format) && true && true && true && (undefined === input.pick || Array.isArray(input.pick) && input.pick.every(elem => "string" === typeof elem));
|
|
541
696
|
return "object" === typeof input && null !== input && false === Array.isArray(input) && $io0(input);
|
|
542
697
|
};
|
|
543
698
|
if (false === __is(input))
|
|
544
699
|
((input, _path, _exceptionable = true) => {
|
|
545
700
|
const $guard = __typia.json.createAssertStringify.guard;
|
|
546
|
-
const $ao0 = (input, _path, _exceptionable = true) => true && true &&
|
|
701
|
+
const $ao0 = (input, _path, _exceptionable = true) => true && true && (undefined === input.preset || ("object" === typeof input.preset && null !== input.preset && false === Array.isArray(input.preset) || $guard(_exceptionable, {
|
|
702
|
+
path: _path + ".preset",
|
|
703
|
+
expected: "(RenderPreset | undefined)",
|
|
704
|
+
value: input.preset
|
|
705
|
+
}, errorFactory)) && $ao1(input.preset, _path + ".preset", true && _exceptionable) || $guard(_exceptionable, {
|
|
706
|
+
path: _path + ".preset",
|
|
707
|
+
expected: "(RenderPreset | undefined)",
|
|
708
|
+
value: input.preset
|
|
709
|
+
}, errorFactory)) && true;
|
|
710
|
+
const $ao1 = (input, _path, _exceptionable = true) => (undefined === input.type || "string" === typeof input.type || $guard(_exceptionable, {
|
|
711
|
+
path: _path + ".type",
|
|
712
|
+
expected: "(string | undefined)",
|
|
713
|
+
value: input.type
|
|
714
|
+
}, errorFactory)) && true && ((null !== input.profile || $guard(_exceptionable, {
|
|
715
|
+
path: _path + ".profile",
|
|
716
|
+
expected: "(RenderPresetProfile | string | undefined)",
|
|
717
|
+
value: input.profile
|
|
718
|
+
}, errorFactory)) && (undefined === input.profile || "string" === typeof input.profile || ("object" === typeof input.profile && null !== input.profile || $guard(_exceptionable, {
|
|
719
|
+
path: _path + ".profile",
|
|
720
|
+
expected: "(RenderPresetProfile | string | undefined)",
|
|
721
|
+
value: input.profile
|
|
722
|
+
}, errorFactory)) && $ao2(input.profile, _path + ".profile", true && _exceptionable) || $guard(_exceptionable, {
|
|
723
|
+
path: _path + ".profile",
|
|
724
|
+
expected: "(RenderPresetProfile | string | undefined)",
|
|
725
|
+
value: input.profile
|
|
726
|
+
}, errorFactory)));
|
|
727
|
+
const $ao2 = (input, _path, _exceptionable = true) => ("png" === input.format || "mp4" === input.format || $guard(_exceptionable, {
|
|
728
|
+
path: _path + ".format",
|
|
729
|
+
expected: "(\"mp4\" | \"png\")",
|
|
730
|
+
value: input.format
|
|
731
|
+
}, errorFactory)) && true && true && true && (undefined === input.pick || (Array.isArray(input.pick) || $guard(_exceptionable, {
|
|
732
|
+
path: _path + ".pick",
|
|
733
|
+
expected: "(Array<string> | undefined)",
|
|
734
|
+
value: input.pick
|
|
735
|
+
}, errorFactory)) && input.pick.every((elem, _index1) => "string" === typeof elem || $guard(_exceptionable, {
|
|
736
|
+
path: _path + ".pick[" + _index1 + "]",
|
|
737
|
+
expected: "string",
|
|
738
|
+
value: elem
|
|
739
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
|
740
|
+
path: _path + ".pick",
|
|
741
|
+
expected: "(Array<string> | undefined)",
|
|
742
|
+
value: input.pick
|
|
743
|
+
}, errorFactory));
|
|
547
744
|
return ("object" === typeof input && null !== input && false === Array.isArray(input) || $guard(true, {
|
|
548
745
|
path: _path + "",
|
|
549
746
|
expected: "MediaConsolidateRecord",
|
|
@@ -556,8 +753,32 @@ export const assertStringifyMediaConsolidateRecord = (input, errorFactory) => {
|
|
|
556
753
|
})(input, "$input", true);
|
|
557
754
|
return input;
|
|
558
755
|
}; const stringify = input => {
|
|
756
|
+
const $io1 = input => (undefined === input.type || "string" === typeof input.type) && true && (null !== input.profile && (undefined === input.profile || "string" === typeof input.profile || "object" === typeof input.profile && null !== input.profile && $io2(input.profile)));
|
|
757
|
+
const $io2 = input => ("png" === input.format || "mp4" === input.format) && true && true && true && (undefined === input.pick || Array.isArray(input.pick) && input.pick.every(elem => "string" === typeof elem));
|
|
559
758
|
const $tail = __typia.json.createAssertStringify.tail;
|
|
560
|
-
const $
|
|
759
|
+
const $string = __typia.json.createAssertStringify.string;
|
|
760
|
+
const $throws = __typia.json.createAssertStringify.throws;
|
|
761
|
+
const $so0 = input => `{${$tail(`${undefined === input.source || "function" === typeof input.source ? "" : `"source":${undefined !== input.source ? JSON.stringify(input.source) : undefined},`}${undefined === input.target || "function" === typeof input.target ? "" : `"target":${undefined !== input.target ? JSON.stringify(input.target) : undefined},`}${undefined === input.preset ? "" : `"preset":${undefined !== input.preset ? $so1(input.preset) : undefined},`}${undefined === input.error || "function" === typeof input.error ? "" : `"error":${undefined !== input.error ? JSON.stringify(input.error) : undefined}`}`)}}`;
|
|
762
|
+
const $so1 = input => `{${$tail(`${undefined === input.type ? "" : `"type":${undefined !== input.type ? $string(input.type) : undefined},`}${undefined === input.description || "function" === typeof input.description ? "" : `"description":${undefined !== input.description ? JSON.stringify(input.description) : undefined},`}${undefined === input.profile ? "" : `"profile":${undefined !== input.profile ? (() => {
|
|
763
|
+
if ("string" === typeof input.profile)
|
|
764
|
+
return $string(input.profile);
|
|
765
|
+
if ("object" === typeof input.profile && null !== input.profile)
|
|
766
|
+
return $so2(input.profile);
|
|
767
|
+
$throws({
|
|
768
|
+
expected: "(RenderPresetProfile | string | undefined)",
|
|
769
|
+
value: input.profile
|
|
770
|
+
});
|
|
771
|
+
})() : undefined}`}`)}}`;
|
|
772
|
+
const $so2 = input => `{${undefined === input.transcribe || "function" === typeof input.transcribe ? "" : `"transcribe":${undefined !== input.transcribe ? JSON.stringify(input.transcribe) : undefined},`}${undefined === input.audio || "function" === typeof input.audio ? "" : `"audio":${undefined !== input.audio ? JSON.stringify(input.audio) : undefined},`}${undefined === input.video || "function" === typeof input.video ? "" : `"video":${undefined !== input.video ? JSON.stringify(input.video) : undefined},`}${undefined === input.pick ? "" : `"pick":${undefined !== input.pick ? `[${input.pick.map(elem => $string(elem)).join(",")}]` : undefined},`}"format":${(() => {
|
|
773
|
+
if ("string" === typeof input.format)
|
|
774
|
+
return $string(input.format);
|
|
775
|
+
if ("string" === typeof input.format)
|
|
776
|
+
return "\"" + input.format + "\"";
|
|
777
|
+
$throws({
|
|
778
|
+
expected: "(\"mp4\" | \"png\")",
|
|
779
|
+
value: input.format
|
|
780
|
+
});
|
|
781
|
+
})()}}`;
|
|
561
782
|
return $so0(input);
|
|
562
783
|
}; return stringify(assert(input, errorFactory)); };
|
|
563
784
|
export const isMediaRendersRecord = input => {
|
|
@@ -2806,3 +3027,482 @@ export const assertStringifyMediaRestrictionsRecord = (input, errorFactory) => {
|
|
|
2806
3027
|
return ""; return `${JSON.stringify(key)}:${`{"asset":${$string(value.asset)},"date":${$string(value.date)},"user":${$string(value.user)},"text":${$string(value.text)},"start":${value.start},"end":${value.end},"file":${$string(value.file)}}`}`; }).filter(str => "" !== str).join(",")}}`;
|
|
2807
3028
|
return $so0(input);
|
|
2808
3029
|
}; return stringify(assert(input, errorFactory)); };
|
|
3030
|
+
export const isMediaProbeRecord = input => {
|
|
3031
|
+
const $io0 = input => (null === input.error || "object" === typeof input.error && null !== input.error && $io1(input.error)) && ("audio" === input.type || "video" === input.type || "image" === input.type);
|
|
3032
|
+
const $io1 = 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) && $io2(input.headers)) && (undefined === input.data || "object" === typeof input.data && null !== input.data && false === Array.isArray(input.data) && $io3(input.data)) && (null === input.cause || undefined === input.cause || "object" === typeof input.cause && null !== input.cause && $io1(input.cause)) && (null === input.errors || undefined === input.errors || Array.isArray(input.errors) && input.errors.every(elem => "object" === typeof elem && null !== elem && $io1(elem)));
|
|
3033
|
+
const $io2 = input => Object.keys(input).every(key => {
|
|
3034
|
+
const value = input[key];
|
|
3035
|
+
if (undefined === value)
|
|
3036
|
+
return true;
|
|
3037
|
+
return "string" === typeof value;
|
|
3038
|
+
});
|
|
3039
|
+
const $io3 = input => true;
|
|
3040
|
+
return "object" === typeof input && null !== input && $io0(input);
|
|
3041
|
+
};
|
|
3042
|
+
export const assertMediaProbeRecord = (input, errorFactory) => {
|
|
3043
|
+
const __is = input => {
|
|
3044
|
+
const $io0 = input => (null === input.error || "object" === typeof input.error && null !== input.error && $io1(input.error)) && ("audio" === input.type || "video" === input.type || "image" === input.type);
|
|
3045
|
+
const $io1 = 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) && $io2(input.headers)) && (undefined === input.data || "object" === typeof input.data && null !== input.data && false === Array.isArray(input.data) && $io3(input.data)) && (null === input.cause || undefined === input.cause || "object" === typeof input.cause && null !== input.cause && $io1(input.cause)) && (null === input.errors || undefined === input.errors || Array.isArray(input.errors) && input.errors.every(elem => "object" === typeof elem && null !== elem && $io1(elem)));
|
|
3046
|
+
const $io2 = input => Object.keys(input).every(key => {
|
|
3047
|
+
const value = input[key];
|
|
3048
|
+
if (undefined === value)
|
|
3049
|
+
return true;
|
|
3050
|
+
return "string" === typeof value;
|
|
3051
|
+
});
|
|
3052
|
+
const $io3 = input => true;
|
|
3053
|
+
return "object" === typeof input && null !== input && $io0(input);
|
|
3054
|
+
};
|
|
3055
|
+
if (false === __is(input))
|
|
3056
|
+
((input, _path, _exceptionable = true) => {
|
|
3057
|
+
const $guard = __typia.createAssert.guard;
|
|
3058
|
+
const $join = __typia.createAssert.join;
|
|
3059
|
+
const $ao0 = (input, _path, _exceptionable = true) => (null === input.error || ("object" === typeof input.error && null !== input.error || $guard(_exceptionable, {
|
|
3060
|
+
path: _path + ".error",
|
|
3061
|
+
expected: "(NxtError | null)",
|
|
3062
|
+
value: input.error
|
|
3063
|
+
}, errorFactory)) && $ao1(input.error, _path + ".error", true && _exceptionable) || $guard(_exceptionable, {
|
|
3064
|
+
path: _path + ".error",
|
|
3065
|
+
expected: "(NxtError | null)",
|
|
3066
|
+
value: input.error
|
|
3067
|
+
}, errorFactory)) && ("audio" === input.type || "video" === input.type || "image" === input.type || $guard(_exceptionable, {
|
|
3068
|
+
path: _path + ".type",
|
|
3069
|
+
expected: "(\"audio\" | \"image\" | \"video\")",
|
|
3070
|
+
value: input.type
|
|
3071
|
+
}, errorFactory));
|
|
3072
|
+
const $ao1 = (input, _path, _exceptionable = true) => ("string" === typeof input.message || $guard(_exceptionable, {
|
|
3073
|
+
path: _path + ".message",
|
|
3074
|
+
expected: "string",
|
|
3075
|
+
value: input.message
|
|
3076
|
+
}, errorFactory)) && (undefined === input.type || "string" === typeof input.type || $guard(_exceptionable, {
|
|
3077
|
+
path: _path + ".type",
|
|
3078
|
+
expected: "(string | undefined)",
|
|
3079
|
+
value: input.type
|
|
3080
|
+
}, errorFactory)) && (undefined === input.code || "string" === typeof input.code || $guard(_exceptionable, {
|
|
3081
|
+
path: _path + ".code",
|
|
3082
|
+
expected: "(string | undefined)",
|
|
3083
|
+
value: input.code
|
|
3084
|
+
}, errorFactory)) && (undefined === input.exitCode || "number" === typeof input.exitCode || $guard(_exceptionable, {
|
|
3085
|
+
path: _path + ".exitCode",
|
|
3086
|
+
expected: "(number | undefined)",
|
|
3087
|
+
value: input.exitCode
|
|
3088
|
+
}, errorFactory)) && (undefined === input.signalCode || "number" === typeof input.signalCode || $guard(_exceptionable, {
|
|
3089
|
+
path: _path + ".signalCode",
|
|
3090
|
+
expected: "(number | undefined)",
|
|
3091
|
+
value: input.signalCode
|
|
3092
|
+
}, errorFactory)) && (undefined === input.statusCode || "number" === typeof input.statusCode || $guard(_exceptionable, {
|
|
3093
|
+
path: _path + ".statusCode",
|
|
3094
|
+
expected: "(number | undefined)",
|
|
3095
|
+
value: input.statusCode
|
|
3096
|
+
}, errorFactory)) && (undefined === input.headers || ("object" === typeof input.headers && null !== input.headers && false === Array.isArray(input.headers) || $guard(_exceptionable, {
|
|
3097
|
+
path: _path + ".headers",
|
|
3098
|
+
expected: "(Record<string, string> | undefined)",
|
|
3099
|
+
value: input.headers
|
|
3100
|
+
}, errorFactory)) && $ao2(input.headers, _path + ".headers", true && _exceptionable) || $guard(_exceptionable, {
|
|
3101
|
+
path: _path + ".headers",
|
|
3102
|
+
expected: "(Record<string, string> | undefined)",
|
|
3103
|
+
value: input.headers
|
|
3104
|
+
}, errorFactory)) && (undefined === input.data || ("object" === typeof input.data && null !== input.data && false === Array.isArray(input.data) || $guard(_exceptionable, {
|
|
3105
|
+
path: _path + ".data",
|
|
3106
|
+
expected: "(object | undefined)",
|
|
3107
|
+
value: input.data
|
|
3108
|
+
}, errorFactory)) && $ao3(input.data, _path + ".data", true && _exceptionable) || $guard(_exceptionable, {
|
|
3109
|
+
path: _path + ".data",
|
|
3110
|
+
expected: "(object | undefined)",
|
|
3111
|
+
value: input.data
|
|
3112
|
+
}, errorFactory)) && (null === input.cause || undefined === input.cause || ("object" === typeof input.cause && null !== input.cause || $guard(_exceptionable, {
|
|
3113
|
+
path: _path + ".cause",
|
|
3114
|
+
expected: "(NxtError | null | undefined)",
|
|
3115
|
+
value: input.cause
|
|
3116
|
+
}, errorFactory)) && $ao1(input.cause, _path + ".cause", true && _exceptionable) || $guard(_exceptionable, {
|
|
3117
|
+
path: _path + ".cause",
|
|
3118
|
+
expected: "(NxtError | null | undefined)",
|
|
3119
|
+
value: input.cause
|
|
3120
|
+
}, errorFactory)) && (null === input.errors || undefined === input.errors || (Array.isArray(input.errors) || $guard(_exceptionable, {
|
|
3121
|
+
path: _path + ".errors",
|
|
3122
|
+
expected: "(Array<NxtError> | null | undefined)",
|
|
3123
|
+
value: input.errors
|
|
3124
|
+
}, errorFactory)) && input.errors.every((elem, _index1) => ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
|
|
3125
|
+
path: _path + ".errors[" + _index1 + "]",
|
|
3126
|
+
expected: "NxtError",
|
|
3127
|
+
value: elem
|
|
3128
|
+
}, errorFactory)) && $ao1(elem, _path + ".errors[" + _index1 + "]", true && _exceptionable) || $guard(_exceptionable, {
|
|
3129
|
+
path: _path + ".errors[" + _index1 + "]",
|
|
3130
|
+
expected: "NxtError",
|
|
3131
|
+
value: elem
|
|
3132
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
|
3133
|
+
path: _path + ".errors",
|
|
3134
|
+
expected: "(Array<NxtError> | null | undefined)",
|
|
3135
|
+
value: input.errors
|
|
3136
|
+
}, errorFactory));
|
|
3137
|
+
const $ao2 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every(key => {
|
|
3138
|
+
const value = input[key];
|
|
3139
|
+
if (undefined === value)
|
|
3140
|
+
return true;
|
|
3141
|
+
return "string" === typeof value || $guard(_exceptionable, {
|
|
3142
|
+
path: _path + $join(key),
|
|
3143
|
+
expected: "string",
|
|
3144
|
+
value: value
|
|
3145
|
+
}, errorFactory);
|
|
3146
|
+
});
|
|
3147
|
+
const $ao3 = (input, _path, _exceptionable = true) => true;
|
|
3148
|
+
return ("object" === typeof input && null !== input || $guard(true, {
|
|
3149
|
+
path: _path + "",
|
|
3150
|
+
expected: "MediaProbeRecord",
|
|
3151
|
+
value: input
|
|
3152
|
+
}, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
|
|
3153
|
+
path: _path + "",
|
|
3154
|
+
expected: "MediaProbeRecord",
|
|
3155
|
+
value: input
|
|
3156
|
+
}, errorFactory);
|
|
3157
|
+
})(input, "$input", true);
|
|
3158
|
+
return input;
|
|
3159
|
+
};
|
|
3160
|
+
export const randomMediaProbeRecord = generator => {
|
|
3161
|
+
const $pick = __typia.createRandom.pick;
|
|
3162
|
+
const $generator = __typia.createRandom.generator;
|
|
3163
|
+
const $ro0 = (_recursive = false, _depth = 0) => ({
|
|
3164
|
+
error: $pick([
|
|
3165
|
+
() => null,
|
|
3166
|
+
() => $ro1(_recursive, _recursive ? 1 + _depth : _depth)
|
|
3167
|
+
])(),
|
|
3168
|
+
type: $pick([
|
|
3169
|
+
() => "audio",
|
|
3170
|
+
() => "video",
|
|
3171
|
+
() => "image"
|
|
3172
|
+
])()
|
|
3173
|
+
});
|
|
3174
|
+
const $ro1 = (_recursive = true, _depth = 0) => ({
|
|
3175
|
+
message: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
|
|
3176
|
+
type: $pick([
|
|
3177
|
+
() => undefined,
|
|
3178
|
+
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
|
|
3179
|
+
])(),
|
|
3180
|
+
code: $pick([
|
|
3181
|
+
() => undefined,
|
|
3182
|
+
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
|
|
3183
|
+
])(),
|
|
3184
|
+
exitCode: $pick([
|
|
3185
|
+
() => undefined,
|
|
3186
|
+
() => (generator?.customs ?? $generator.customs)?.number?.([]) ?? (generator?.number ?? $generator.number)(0, 100)
|
|
3187
|
+
])(),
|
|
3188
|
+
signalCode: $pick([
|
|
3189
|
+
() => undefined,
|
|
3190
|
+
() => (generator?.customs ?? $generator.customs)?.number?.([]) ?? (generator?.number ?? $generator.number)(0, 100)
|
|
3191
|
+
])(),
|
|
3192
|
+
statusCode: $pick([
|
|
3193
|
+
() => undefined,
|
|
3194
|
+
() => (generator?.customs ?? $generator.customs)?.number?.([]) ?? (generator?.number ?? $generator.number)(0, 100)
|
|
3195
|
+
])(),
|
|
3196
|
+
headers: $pick([
|
|
3197
|
+
() => undefined,
|
|
3198
|
+
() => $ro2(true, _recursive ? 1 + _depth : _depth)
|
|
3199
|
+
])(),
|
|
3200
|
+
data: $pick([
|
|
3201
|
+
() => undefined,
|
|
3202
|
+
() => $ro3(true, _recursive ? 1 + _depth : _depth)
|
|
3203
|
+
])(),
|
|
3204
|
+
cause: $pick([
|
|
3205
|
+
() => undefined,
|
|
3206
|
+
() => null,
|
|
3207
|
+
() => $ro1(true, _recursive ? 1 + _depth : _depth)
|
|
3208
|
+
])(),
|
|
3209
|
+
errors: $pick([
|
|
3210
|
+
() => undefined,
|
|
3211
|
+
() => null,
|
|
3212
|
+
() => _recursive && 5 < _depth ? [] : 5 >= _depth ? (generator?.array ?? $generator.array)(() => $ro1(true, _recursive ? 1 + _depth : _depth)) : []
|
|
3213
|
+
])()
|
|
3214
|
+
});
|
|
3215
|
+
const $ro2 = (_recursive = false, _depth = 0) => {
|
|
3216
|
+
const output = {};
|
|
3217
|
+
(generator?.array ?? $generator.array)(() => output[(generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()] = (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(), (generator?.integer ?? $generator.integer)(0, 3));
|
|
3218
|
+
return output;
|
|
3219
|
+
};
|
|
3220
|
+
const $ro3 = (_recursive = false, _depth = 0) => {};
|
|
3221
|
+
return $ro0();
|
|
3222
|
+
};
|
|
3223
|
+
export const assertGuardMediaProbeRecord = (input, errorFactory) => {
|
|
3224
|
+
const __is = input => {
|
|
3225
|
+
const $io0 = input => (null === input.error || "object" === typeof input.error && null !== input.error && $io1(input.error)) && ("audio" === input.type || "video" === input.type || "image" === input.type);
|
|
3226
|
+
const $io1 = 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) && $io2(input.headers)) && (undefined === input.data || "object" === typeof input.data && null !== input.data && false === Array.isArray(input.data) && $io3(input.data)) && (null === input.cause || undefined === input.cause || "object" === typeof input.cause && null !== input.cause && $io1(input.cause)) && (null === input.errors || undefined === input.errors || Array.isArray(input.errors) && input.errors.every(elem => "object" === typeof elem && null !== elem && $io1(elem)));
|
|
3227
|
+
const $io2 = input => Object.keys(input).every(key => {
|
|
3228
|
+
const value = input[key];
|
|
3229
|
+
if (undefined === value)
|
|
3230
|
+
return true;
|
|
3231
|
+
return "string" === typeof value;
|
|
3232
|
+
});
|
|
3233
|
+
const $io3 = input => true;
|
|
3234
|
+
return "object" === typeof input && null !== input && $io0(input);
|
|
3235
|
+
};
|
|
3236
|
+
if (false === __is(input))
|
|
3237
|
+
((input, _path, _exceptionable = true) => {
|
|
3238
|
+
const $guard = __typia.createAssertGuard.guard;
|
|
3239
|
+
const $join = __typia.createAssertGuard.join;
|
|
3240
|
+
const $ao0 = (input, _path, _exceptionable = true) => (null === input.error || ("object" === typeof input.error && null !== input.error || $guard(_exceptionable, {
|
|
3241
|
+
path: _path + ".error",
|
|
3242
|
+
expected: "(NxtError | null)",
|
|
3243
|
+
value: input.error
|
|
3244
|
+
}, errorFactory)) && $ao1(input.error, _path + ".error", true && _exceptionable) || $guard(_exceptionable, {
|
|
3245
|
+
path: _path + ".error",
|
|
3246
|
+
expected: "(NxtError | null)",
|
|
3247
|
+
value: input.error
|
|
3248
|
+
}, errorFactory)) && ("audio" === input.type || "video" === input.type || "image" === input.type || $guard(_exceptionable, {
|
|
3249
|
+
path: _path + ".type",
|
|
3250
|
+
expected: "(\"audio\" | \"image\" | \"video\")",
|
|
3251
|
+
value: input.type
|
|
3252
|
+
}, errorFactory));
|
|
3253
|
+
const $ao1 = (input, _path, _exceptionable = true) => ("string" === typeof input.message || $guard(_exceptionable, {
|
|
3254
|
+
path: _path + ".message",
|
|
3255
|
+
expected: "string",
|
|
3256
|
+
value: input.message
|
|
3257
|
+
}, errorFactory)) && (undefined === input.type || "string" === typeof input.type || $guard(_exceptionable, {
|
|
3258
|
+
path: _path + ".type",
|
|
3259
|
+
expected: "(string | undefined)",
|
|
3260
|
+
value: input.type
|
|
3261
|
+
}, errorFactory)) && (undefined === input.code || "string" === typeof input.code || $guard(_exceptionable, {
|
|
3262
|
+
path: _path + ".code",
|
|
3263
|
+
expected: "(string | undefined)",
|
|
3264
|
+
value: input.code
|
|
3265
|
+
}, errorFactory)) && (undefined === input.exitCode || "number" === typeof input.exitCode || $guard(_exceptionable, {
|
|
3266
|
+
path: _path + ".exitCode",
|
|
3267
|
+
expected: "(number | undefined)",
|
|
3268
|
+
value: input.exitCode
|
|
3269
|
+
}, errorFactory)) && (undefined === input.signalCode || "number" === typeof input.signalCode || $guard(_exceptionable, {
|
|
3270
|
+
path: _path + ".signalCode",
|
|
3271
|
+
expected: "(number | undefined)",
|
|
3272
|
+
value: input.signalCode
|
|
3273
|
+
}, errorFactory)) && (undefined === input.statusCode || "number" === typeof input.statusCode || $guard(_exceptionable, {
|
|
3274
|
+
path: _path + ".statusCode",
|
|
3275
|
+
expected: "(number | undefined)",
|
|
3276
|
+
value: input.statusCode
|
|
3277
|
+
}, errorFactory)) && (undefined === input.headers || ("object" === typeof input.headers && null !== input.headers && false === Array.isArray(input.headers) || $guard(_exceptionable, {
|
|
3278
|
+
path: _path + ".headers",
|
|
3279
|
+
expected: "(Record<string, string> | undefined)",
|
|
3280
|
+
value: input.headers
|
|
3281
|
+
}, errorFactory)) && $ao2(input.headers, _path + ".headers", true && _exceptionable) || $guard(_exceptionable, {
|
|
3282
|
+
path: _path + ".headers",
|
|
3283
|
+
expected: "(Record<string, string> | undefined)",
|
|
3284
|
+
value: input.headers
|
|
3285
|
+
}, errorFactory)) && (undefined === input.data || ("object" === typeof input.data && null !== input.data && false === Array.isArray(input.data) || $guard(_exceptionable, {
|
|
3286
|
+
path: _path + ".data",
|
|
3287
|
+
expected: "(object | undefined)",
|
|
3288
|
+
value: input.data
|
|
3289
|
+
}, errorFactory)) && $ao3(input.data, _path + ".data", true && _exceptionable) || $guard(_exceptionable, {
|
|
3290
|
+
path: _path + ".data",
|
|
3291
|
+
expected: "(object | undefined)",
|
|
3292
|
+
value: input.data
|
|
3293
|
+
}, errorFactory)) && (null === input.cause || undefined === input.cause || ("object" === typeof input.cause && null !== input.cause || $guard(_exceptionable, {
|
|
3294
|
+
path: _path + ".cause",
|
|
3295
|
+
expected: "(NxtError | null | undefined)",
|
|
3296
|
+
value: input.cause
|
|
3297
|
+
}, errorFactory)) && $ao1(input.cause, _path + ".cause", true && _exceptionable) || $guard(_exceptionable, {
|
|
3298
|
+
path: _path + ".cause",
|
|
3299
|
+
expected: "(NxtError | null | undefined)",
|
|
3300
|
+
value: input.cause
|
|
3301
|
+
}, errorFactory)) && (null === input.errors || undefined === input.errors || (Array.isArray(input.errors) || $guard(_exceptionable, {
|
|
3302
|
+
path: _path + ".errors",
|
|
3303
|
+
expected: "(Array<NxtError> | null | undefined)",
|
|
3304
|
+
value: input.errors
|
|
3305
|
+
}, errorFactory)) && input.errors.every((elem, _index1) => ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
|
|
3306
|
+
path: _path + ".errors[" + _index1 + "]",
|
|
3307
|
+
expected: "NxtError",
|
|
3308
|
+
value: elem
|
|
3309
|
+
}, errorFactory)) && $ao1(elem, _path + ".errors[" + _index1 + "]", true && _exceptionable) || $guard(_exceptionable, {
|
|
3310
|
+
path: _path + ".errors[" + _index1 + "]",
|
|
3311
|
+
expected: "NxtError",
|
|
3312
|
+
value: elem
|
|
3313
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
|
3314
|
+
path: _path + ".errors",
|
|
3315
|
+
expected: "(Array<NxtError> | null | undefined)",
|
|
3316
|
+
value: input.errors
|
|
3317
|
+
}, errorFactory));
|
|
3318
|
+
const $ao2 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every(key => {
|
|
3319
|
+
const value = input[key];
|
|
3320
|
+
if (undefined === value)
|
|
3321
|
+
return true;
|
|
3322
|
+
return "string" === typeof value || $guard(_exceptionable, {
|
|
3323
|
+
path: _path + $join(key),
|
|
3324
|
+
expected: "string",
|
|
3325
|
+
value: value
|
|
3326
|
+
}, errorFactory);
|
|
3327
|
+
});
|
|
3328
|
+
const $ao3 = (input, _path, _exceptionable = true) => true;
|
|
3329
|
+
return ("object" === typeof input && null !== input || $guard(true, {
|
|
3330
|
+
path: _path + "",
|
|
3331
|
+
expected: "MediaProbeRecord",
|
|
3332
|
+
value: input
|
|
3333
|
+
}, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
|
|
3334
|
+
path: _path + "",
|
|
3335
|
+
expected: "MediaProbeRecord",
|
|
3336
|
+
value: input
|
|
3337
|
+
}, errorFactory);
|
|
3338
|
+
})(input, "$input", true);
|
|
3339
|
+
};
|
|
3340
|
+
export const stringifyMediaProbeRecord = input => {
|
|
3341
|
+
const $io1 = 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) && $io2(input.headers)) && (undefined === input.data || "object" === typeof input.data && null !== input.data && false === Array.isArray(input.data) && $io3(input.data)) && (null === input.cause || undefined === input.cause || "object" === typeof input.cause && null !== input.cause && $io1(input.cause)) && (null === input.errors || undefined === input.errors || Array.isArray(input.errors) && input.errors.every(elem => "object" === typeof elem && null !== elem && $io1(elem)));
|
|
3342
|
+
const $io2 = input => Object.keys(input).every(key => {
|
|
3343
|
+
const value = input[key];
|
|
3344
|
+
if (undefined === value)
|
|
3345
|
+
return true;
|
|
3346
|
+
return "string" === typeof value;
|
|
3347
|
+
});
|
|
3348
|
+
const $io3 = input => true;
|
|
3349
|
+
const $string = __typia.json.createStringify.string;
|
|
3350
|
+
const $throws = __typia.json.createStringify.throws;
|
|
3351
|
+
const $so0 = input => `{"error":${null !== input.error ? $so1(input.error) : "null"},"type":${(() => {
|
|
3352
|
+
if ("string" === typeof input.type)
|
|
3353
|
+
return $string(input.type);
|
|
3354
|
+
if ("string" === typeof input.type)
|
|
3355
|
+
return "\"" + input.type + "\"";
|
|
3356
|
+
$throws({
|
|
3357
|
+
expected: "(\"audio\" | \"image\" | \"video\")",
|
|
3358
|
+
value: input.type
|
|
3359
|
+
});
|
|
3360
|
+
})()}}`;
|
|
3361
|
+
const $so1 = input => `{${undefined === input.type ? "" : `"type":${undefined !== input.type ? $string(input.type) : undefined},`}${undefined === input.code ? "" : `"code":${undefined !== input.code ? $string(input.code) : undefined},`}${undefined === input.exitCode ? "" : `"exitCode":${undefined !== input.exitCode ? input.exitCode : undefined},`}${undefined === input.signalCode ? "" : `"signalCode":${undefined !== input.signalCode ? input.signalCode : undefined},`}${undefined === input.statusCode ? "" : `"statusCode":${undefined !== input.statusCode ? input.statusCode : undefined},`}${undefined === input.headers ? "" : `"headers":${undefined !== input.headers ? $so2(input.headers) : undefined},`}${undefined === input.data ? "" : `"data":${undefined !== input.data ? "{}" : undefined},`}${undefined === input.cause ? "" : `"cause":${undefined !== input.cause ? null !== input.cause ? $so1(input.cause) : "null" : undefined},`}${undefined === input.errors ? "" : `"errors":${undefined !== input.errors ? null !== input.errors ? `[${input.errors.map(elem => $so1(elem)).join(",")}]` : "null" : undefined},`}"message":${$string(input.message)}}`;
|
|
3362
|
+
const $so2 = input => `{${Object.entries(input).map(([key, value]) => { if (undefined === value)
|
|
3363
|
+
return ""; return `${JSON.stringify(key)}:${$string(value)}`; }).filter(str => "" !== str).join(",")}}`;
|
|
3364
|
+
return $so0(input);
|
|
3365
|
+
};
|
|
3366
|
+
export const assertStringifyMediaProbeRecord = (input, errorFactory) => { const assert = (input, errorFactory) => {
|
|
3367
|
+
const __is = input => {
|
|
3368
|
+
const $io0 = input => (null === input.error || "object" === typeof input.error && null !== input.error && $io1(input.error)) && ("audio" === input.type || "video" === input.type || "image" === input.type);
|
|
3369
|
+
const $io1 = 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) && $io2(input.headers)) && (undefined === input.data || "object" === typeof input.data && null !== input.data && false === Array.isArray(input.data) && $io3(input.data)) && (null === input.cause || undefined === input.cause || "object" === typeof input.cause && null !== input.cause && $io1(input.cause)) && (null === input.errors || undefined === input.errors || Array.isArray(input.errors) && input.errors.every(elem => "object" === typeof elem && null !== elem && $io1(elem)));
|
|
3370
|
+
const $io2 = input => Object.keys(input).every(key => {
|
|
3371
|
+
const value = input[key];
|
|
3372
|
+
if (undefined === value)
|
|
3373
|
+
return true;
|
|
3374
|
+
return "string" === typeof value;
|
|
3375
|
+
});
|
|
3376
|
+
const $io3 = input => true;
|
|
3377
|
+
return "object" === typeof input && null !== input && $io0(input);
|
|
3378
|
+
};
|
|
3379
|
+
if (false === __is(input))
|
|
3380
|
+
((input, _path, _exceptionable = true) => {
|
|
3381
|
+
const $guard = __typia.json.createAssertStringify.guard;
|
|
3382
|
+
const $join = __typia.json.createAssertStringify.join;
|
|
3383
|
+
const $ao0 = (input, _path, _exceptionable = true) => (null === input.error || ("object" === typeof input.error && null !== input.error || $guard(_exceptionable, {
|
|
3384
|
+
path: _path + ".error",
|
|
3385
|
+
expected: "(NxtError | null)",
|
|
3386
|
+
value: input.error
|
|
3387
|
+
}, errorFactory)) && $ao1(input.error, _path + ".error", true && _exceptionable) || $guard(_exceptionable, {
|
|
3388
|
+
path: _path + ".error",
|
|
3389
|
+
expected: "(NxtError | null)",
|
|
3390
|
+
value: input.error
|
|
3391
|
+
}, errorFactory)) && ("audio" === input.type || "video" === input.type || "image" === input.type || $guard(_exceptionable, {
|
|
3392
|
+
path: _path + ".type",
|
|
3393
|
+
expected: "(\"audio\" | \"image\" | \"video\")",
|
|
3394
|
+
value: input.type
|
|
3395
|
+
}, errorFactory));
|
|
3396
|
+
const $ao1 = (input, _path, _exceptionable = true) => ("string" === typeof input.message || $guard(_exceptionable, {
|
|
3397
|
+
path: _path + ".message",
|
|
3398
|
+
expected: "string",
|
|
3399
|
+
value: input.message
|
|
3400
|
+
}, errorFactory)) && (undefined === input.type || "string" === typeof input.type || $guard(_exceptionable, {
|
|
3401
|
+
path: _path + ".type",
|
|
3402
|
+
expected: "(string | undefined)",
|
|
3403
|
+
value: input.type
|
|
3404
|
+
}, errorFactory)) && (undefined === input.code || "string" === typeof input.code || $guard(_exceptionable, {
|
|
3405
|
+
path: _path + ".code",
|
|
3406
|
+
expected: "(string | undefined)",
|
|
3407
|
+
value: input.code
|
|
3408
|
+
}, errorFactory)) && (undefined === input.exitCode || "number" === typeof input.exitCode && !Number.isNaN(input.exitCode) || $guard(_exceptionable, {
|
|
3409
|
+
path: _path + ".exitCode",
|
|
3410
|
+
expected: "(number | undefined)",
|
|
3411
|
+
value: input.exitCode
|
|
3412
|
+
}, errorFactory)) && (undefined === input.signalCode || "number" === typeof input.signalCode && !Number.isNaN(input.signalCode) || $guard(_exceptionable, {
|
|
3413
|
+
path: _path + ".signalCode",
|
|
3414
|
+
expected: "(number | undefined)",
|
|
3415
|
+
value: input.signalCode
|
|
3416
|
+
}, errorFactory)) && (undefined === input.statusCode || "number" === typeof input.statusCode && !Number.isNaN(input.statusCode) || $guard(_exceptionable, {
|
|
3417
|
+
path: _path + ".statusCode",
|
|
3418
|
+
expected: "(number | undefined)",
|
|
3419
|
+
value: input.statusCode
|
|
3420
|
+
}, errorFactory)) && (undefined === input.headers || ("object" === typeof input.headers && null !== input.headers && false === Array.isArray(input.headers) || $guard(_exceptionable, {
|
|
3421
|
+
path: _path + ".headers",
|
|
3422
|
+
expected: "(Record<string, string> | undefined)",
|
|
3423
|
+
value: input.headers
|
|
3424
|
+
}, errorFactory)) && $ao2(input.headers, _path + ".headers", true && _exceptionable) || $guard(_exceptionable, {
|
|
3425
|
+
path: _path + ".headers",
|
|
3426
|
+
expected: "(Record<string, string> | undefined)",
|
|
3427
|
+
value: input.headers
|
|
3428
|
+
}, errorFactory)) && (undefined === input.data || ("object" === typeof input.data && null !== input.data && false === Array.isArray(input.data) || $guard(_exceptionable, {
|
|
3429
|
+
path: _path + ".data",
|
|
3430
|
+
expected: "(object | undefined)",
|
|
3431
|
+
value: input.data
|
|
3432
|
+
}, errorFactory)) && $ao3(input.data, _path + ".data", true && _exceptionable) || $guard(_exceptionable, {
|
|
3433
|
+
path: _path + ".data",
|
|
3434
|
+
expected: "(object | undefined)",
|
|
3435
|
+
value: input.data
|
|
3436
|
+
}, errorFactory)) && (null === input.cause || undefined === input.cause || ("object" === typeof input.cause && null !== input.cause || $guard(_exceptionable, {
|
|
3437
|
+
path: _path + ".cause",
|
|
3438
|
+
expected: "(NxtError | null | undefined)",
|
|
3439
|
+
value: input.cause
|
|
3440
|
+
}, errorFactory)) && $ao1(input.cause, _path + ".cause", true && _exceptionable) || $guard(_exceptionable, {
|
|
3441
|
+
path: _path + ".cause",
|
|
3442
|
+
expected: "(NxtError | null | undefined)",
|
|
3443
|
+
value: input.cause
|
|
3444
|
+
}, errorFactory)) && (null === input.errors || undefined === input.errors || (Array.isArray(input.errors) || $guard(_exceptionable, {
|
|
3445
|
+
path: _path + ".errors",
|
|
3446
|
+
expected: "(Array<NxtError> | null | undefined)",
|
|
3447
|
+
value: input.errors
|
|
3448
|
+
}, errorFactory)) && input.errors.every((elem, _index1) => ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
|
|
3449
|
+
path: _path + ".errors[" + _index1 + "]",
|
|
3450
|
+
expected: "NxtError",
|
|
3451
|
+
value: elem
|
|
3452
|
+
}, errorFactory)) && $ao1(elem, _path + ".errors[" + _index1 + "]", true && _exceptionable) || $guard(_exceptionable, {
|
|
3453
|
+
path: _path + ".errors[" + _index1 + "]",
|
|
3454
|
+
expected: "NxtError",
|
|
3455
|
+
value: elem
|
|
3456
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
|
3457
|
+
path: _path + ".errors",
|
|
3458
|
+
expected: "(Array<NxtError> | null | undefined)",
|
|
3459
|
+
value: input.errors
|
|
3460
|
+
}, errorFactory));
|
|
3461
|
+
const $ao2 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every(key => {
|
|
3462
|
+
const value = input[key];
|
|
3463
|
+
if (undefined === value)
|
|
3464
|
+
return true;
|
|
3465
|
+
return "string" === typeof value || $guard(_exceptionable, {
|
|
3466
|
+
path: _path + $join(key),
|
|
3467
|
+
expected: "string",
|
|
3468
|
+
value: value
|
|
3469
|
+
}, errorFactory);
|
|
3470
|
+
});
|
|
3471
|
+
const $ao3 = (input, _path, _exceptionable = true) => true;
|
|
3472
|
+
return ("object" === typeof input && null !== input || $guard(true, {
|
|
3473
|
+
path: _path + "",
|
|
3474
|
+
expected: "MediaProbeRecord",
|
|
3475
|
+
value: input
|
|
3476
|
+
}, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
|
|
3477
|
+
path: _path + "",
|
|
3478
|
+
expected: "MediaProbeRecord",
|
|
3479
|
+
value: input
|
|
3480
|
+
}, errorFactory);
|
|
3481
|
+
})(input, "$input", true);
|
|
3482
|
+
return input;
|
|
3483
|
+
}; const stringify = input => {
|
|
3484
|
+
const $io1 = 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) && $io2(input.headers)) && (undefined === input.data || "object" === typeof input.data && null !== input.data && false === Array.isArray(input.data) && $io3(input.data)) && (null === input.cause || undefined === input.cause || "object" === typeof input.cause && null !== input.cause && $io1(input.cause)) && (null === input.errors || undefined === input.errors || Array.isArray(input.errors) && input.errors.every(elem => "object" === typeof elem && null !== elem && $io1(elem)));
|
|
3485
|
+
const $io2 = input => Object.keys(input).every(key => {
|
|
3486
|
+
const value = input[key];
|
|
3487
|
+
if (undefined === value)
|
|
3488
|
+
return true;
|
|
3489
|
+
return "string" === typeof value;
|
|
3490
|
+
});
|
|
3491
|
+
const $io3 = input => true;
|
|
3492
|
+
const $string = __typia.json.createAssertStringify.string;
|
|
3493
|
+
const $throws = __typia.json.createAssertStringify.throws;
|
|
3494
|
+
const $so0 = input => `{"error":${null !== input.error ? $so1(input.error) : "null"},"type":${(() => {
|
|
3495
|
+
if ("string" === typeof input.type)
|
|
3496
|
+
return $string(input.type);
|
|
3497
|
+
if ("string" === typeof input.type)
|
|
3498
|
+
return "\"" + input.type + "\"";
|
|
3499
|
+
$throws({
|
|
3500
|
+
expected: "(\"audio\" | \"image\" | \"video\")",
|
|
3501
|
+
value: input.type
|
|
3502
|
+
});
|
|
3503
|
+
})()}}`;
|
|
3504
|
+
const $so1 = input => `{${undefined === input.type ? "" : `"type":${undefined !== input.type ? $string(input.type) : undefined},`}${undefined === input.code ? "" : `"code":${undefined !== input.code ? $string(input.code) : undefined},`}${undefined === input.exitCode ? "" : `"exitCode":${undefined !== input.exitCode ? input.exitCode : undefined},`}${undefined === input.signalCode ? "" : `"signalCode":${undefined !== input.signalCode ? input.signalCode : undefined},`}${undefined === input.statusCode ? "" : `"statusCode":${undefined !== input.statusCode ? input.statusCode : undefined},`}${undefined === input.headers ? "" : `"headers":${undefined !== input.headers ? $so2(input.headers) : undefined},`}${undefined === input.data ? "" : `"data":${undefined !== input.data ? "{}" : undefined},`}${undefined === input.cause ? "" : `"cause":${undefined !== input.cause ? null !== input.cause ? $so1(input.cause) : "null" : undefined},`}${undefined === input.errors ? "" : `"errors":${undefined !== input.errors ? null !== input.errors ? `[${input.errors.map(elem => $so1(elem)).join(",")}]` : "null" : undefined},`}"message":${$string(input.message)}}`;
|
|
3505
|
+
const $so2 = input => `{${Object.entries(input).map(([key, value]) => { if (undefined === value)
|
|
3506
|
+
return ""; return `${JSON.stringify(key)}:${$string(value)}`; }).filter(str => "" !== str).join(",")}}`;
|
|
3507
|
+
return $so0(input);
|
|
3508
|
+
}; return stringify(assert(input, errorFactory)); };
|