@nxtedition/types 23.0.31 → 23.0.33
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/app.d.ts +45 -3
- package/dist/app.js +254 -6
- package/dist/common/block.d.ts +1 -1
- package/dist/common/file.d.ts +10 -11
- package/dist/common/render-preset.js +230 -22
- package/dist/common/render-profile.d.ts +17 -0
- package/dist/common/render-profile.js +344 -18
- package/dist/common/render-query.js +830 -169
- package/dist/common/render-scene.d.ts +7 -0
- package/dist/common/render-scene.js +1258 -144
- package/dist/common/settings.d.ts +41 -26
- package/dist/common/settings.js +1888 -1574
- package/dist/domains/event.d.ts +21 -19
- package/dist/domains/event.js +460 -44
- package/dist/domains/general.d.ts +6 -0
- package/dist/domains/media.d.ts +4 -0
- package/dist/domains/media.js +827 -89
- package/dist/domains/panel.d.ts +268 -1
- package/dist/domains/publish.d.ts +1128 -6
- package/dist/domains/publish.js +10806 -3560
- package/dist/domains/render.js +826 -163
- package/dist/domains/settings.d.ts +1 -10
- package/dist/domains/settings.js +1 -6649
- package/dist/index.d.ts +13 -1
- package/dist/index.js +1 -0
- package/dist/nxtpression.d.ts +110 -0
- package/dist/nxtpression.js +323 -0
- package/dist/schema.json +2183 -1904
- package/dist/tsdoc-metadata.json +11 -0
- package/package.json +10 -3
package/dist/app.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ export interface ElectronHubApi {
|
|
|
13
13
|
getCurrentVersion: () => Promise<string>;
|
|
14
14
|
getLatestVersion: () => Promise<string>;
|
|
15
15
|
triggerUpdate: (latestVersion: string) => void;
|
|
16
|
-
controlDownloadItem: (
|
|
16
|
+
controlDownloadItem: (id: string, action: "pause" | "resume" | "cancel") => void;
|
|
17
17
|
openInApp: (...args: unknown[]) => void;
|
|
18
18
|
installDavinciPlugin: (url: string) => Promise<void>;
|
|
19
19
|
clipboard: ElectronHubApiClipboard;
|
|
@@ -23,7 +23,25 @@ export interface ElectronHubApi {
|
|
|
23
23
|
}
|
|
24
24
|
export declare const isElectronHubApi: (input: unknown) => input is ElectronHubApi;
|
|
25
25
|
export declare const assertElectronHubApi: (input: unknown) => ElectronHubApi;
|
|
26
|
-
export declare const randomElectronHubApi: () =>
|
|
26
|
+
export declare const randomElectronHubApi: () => {
|
|
27
|
+
startDrag: never;
|
|
28
|
+
getWebdavPath: never;
|
|
29
|
+
showOpenDialogAsync: never;
|
|
30
|
+
showSaveDialogAsync: never;
|
|
31
|
+
getCurrentVersion: never;
|
|
32
|
+
getLatestVersion: never;
|
|
33
|
+
triggerUpdate: never;
|
|
34
|
+
controlDownloadItem: never;
|
|
35
|
+
openInApp: never;
|
|
36
|
+
installDavinciPlugin: never;
|
|
37
|
+
clipboard: {
|
|
38
|
+
readText: never;
|
|
39
|
+
writeText: never;
|
|
40
|
+
};
|
|
41
|
+
downloadFile: never;
|
|
42
|
+
showItemInFolder: never;
|
|
43
|
+
openPath: never;
|
|
44
|
+
};
|
|
27
45
|
export declare const assertGuardElectronHubApi: __AssertionGuard<ElectronHubApi>;
|
|
28
46
|
export declare const stringifyElectronHubApi: (input: ElectronHubApi) => string;
|
|
29
47
|
export declare const assertStringifyElectronHubApi: (input: unknown) => string;
|
|
@@ -33,7 +51,10 @@ export interface ElectronHubApiClipboard {
|
|
|
33
51
|
}
|
|
34
52
|
export declare const isElectronHubApiClipboard: (input: unknown) => input is ElectronHubApiClipboard;
|
|
35
53
|
export declare const assertElectronHubApiClipboard: (input: unknown) => ElectronHubApiClipboard;
|
|
36
|
-
export declare const randomElectronHubApiClipboard: () =>
|
|
54
|
+
export declare const randomElectronHubApiClipboard: () => {
|
|
55
|
+
readText: never;
|
|
56
|
+
writeText: never;
|
|
57
|
+
};
|
|
37
58
|
export declare const assertGuardElectronHubApiClipboard: __AssertionGuard<ElectronHubApiClipboard>;
|
|
38
59
|
export declare const stringifyElectronHubApiClipboard: (input: ElectronHubApiClipboard) => string;
|
|
39
60
|
export declare const assertStringifyElectronHubApiClipboard: (input: unknown) => string;
|
|
@@ -50,6 +71,11 @@ export interface DownloadFileOptions {
|
|
|
50
71
|
directory?: string;
|
|
51
72
|
/** If present, filename and directory will be ignored. */
|
|
52
73
|
path?: string;
|
|
74
|
+
/**
|
|
75
|
+
* If true, a postfix like (1), (2), etc. will be added to the filename in
|
|
76
|
+
* case a file with the requested name already exists.
|
|
77
|
+
*/
|
|
78
|
+
collisionPostfix?: boolean;
|
|
53
79
|
}
|
|
54
80
|
export declare const isDownloadFileOptions: (input: unknown) => input is DownloadFileOptions;
|
|
55
81
|
export declare const assertDownloadFileOptions: (input: unknown) => DownloadFileOptions;
|
|
@@ -89,4 +115,20 @@ interface SaveDialogOptions {
|
|
|
89
115
|
properties?: Array<"showHiddenFiles" | "createDirectory" | "treatPackageAsDirectory" | "showOverwriteConfirmation" | "dontAddToRecent">;
|
|
90
116
|
securityScopedBookmarks?: boolean;
|
|
91
117
|
}
|
|
118
|
+
export interface DownloadMessage {
|
|
119
|
+
type: "download";
|
|
120
|
+
id: string;
|
|
121
|
+
title: string;
|
|
122
|
+
bytes: number;
|
|
123
|
+
size: number;
|
|
124
|
+
state: "progressing" | "completed" | "cancelled" | "interrupted";
|
|
125
|
+
savePath: string;
|
|
126
|
+
done?: boolean;
|
|
127
|
+
}
|
|
128
|
+
export declare const isDownloadMessage: (input: unknown) => input is DownloadMessage;
|
|
129
|
+
export declare const assertDownloadMessage: (input: unknown) => DownloadMessage;
|
|
130
|
+
export declare const randomDownloadMessage: () => DownloadMessage;
|
|
131
|
+
export declare const assertGuardDownloadMessage: __AssertionGuard<DownloadMessage>;
|
|
132
|
+
export declare const stringifyDownloadMessage: (input: DownloadMessage) => string;
|
|
133
|
+
export declare const assertStringifyDownloadMessage: (input: unknown) => string;
|
|
92
134
|
export {};
|
package/dist/app.js
CHANGED
|
@@ -415,12 +415,12 @@ export const assertStringifyElectronHubApiClipboard = (input, errorFactory) => {
|
|
|
415
415
|
return $so0(input);
|
|
416
416
|
}; return stringify(assert(input, errorFactory)); };
|
|
417
417
|
export const isDownloadFileOptions = input => {
|
|
418
|
-
const $io0 = input => (undefined === input.id || "string" === typeof input.id) && "string" === typeof input.url && (undefined === input.filename || "string" === typeof input.filename) && (undefined === input.directory || "string" === typeof input.directory) && (undefined === input.path || "string" === typeof input.path);
|
|
418
|
+
const $io0 = input => (undefined === input.id || "string" === typeof input.id) && "string" === typeof input.url && (undefined === input.filename || "string" === typeof input.filename) && (undefined === input.directory || "string" === typeof input.directory) && (undefined === input.path || "string" === typeof input.path) && (undefined === input.collisionPostfix || "boolean" === typeof input.collisionPostfix);
|
|
419
419
|
return "object" === typeof input && null !== input && $io0(input);
|
|
420
420
|
};
|
|
421
421
|
export const assertDownloadFileOptions = (input, errorFactory) => {
|
|
422
422
|
const __is = input => {
|
|
423
|
-
const $io0 = input => (undefined === input.id || "string" === typeof input.id) && "string" === typeof input.url && (undefined === input.filename || "string" === typeof input.filename) && (undefined === input.directory || "string" === typeof input.directory) && (undefined === input.path || "string" === typeof input.path);
|
|
423
|
+
const $io0 = input => (undefined === input.id || "string" === typeof input.id) && "string" === typeof input.url && (undefined === input.filename || "string" === typeof input.filename) && (undefined === input.directory || "string" === typeof input.directory) && (undefined === input.path || "string" === typeof input.path) && (undefined === input.collisionPostfix || "boolean" === typeof input.collisionPostfix);
|
|
424
424
|
return "object" === typeof input && null !== input && $io0(input);
|
|
425
425
|
};
|
|
426
426
|
if (false === __is(input))
|
|
@@ -446,6 +446,10 @@ export const assertDownloadFileOptions = (input, errorFactory) => {
|
|
|
446
446
|
path: _path + ".path",
|
|
447
447
|
expected: "(string | undefined)",
|
|
448
448
|
value: input.path
|
|
449
|
+
}, errorFactory)) && (undefined === input.collisionPostfix || "boolean" === typeof input.collisionPostfix || $guard(_exceptionable, {
|
|
450
|
+
path: _path + ".collisionPostfix",
|
|
451
|
+
expected: "(boolean | undefined)",
|
|
452
|
+
value: input.collisionPostfix
|
|
449
453
|
}, errorFactory));
|
|
450
454
|
return ("object" === typeof input && null !== input || $guard(true, {
|
|
451
455
|
path: _path + "",
|
|
@@ -479,13 +483,17 @@ export const randomDownloadFileOptions = generator => {
|
|
|
479
483
|
path: $pick([
|
|
480
484
|
() => undefined,
|
|
481
485
|
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
|
|
486
|
+
])(),
|
|
487
|
+
collisionPostfix: $pick([
|
|
488
|
+
() => undefined,
|
|
489
|
+
() => (generator?.boolean ?? $generator.boolean)()
|
|
482
490
|
])()
|
|
483
491
|
});
|
|
484
492
|
return $ro0();
|
|
485
493
|
};
|
|
486
494
|
export const assertGuardDownloadFileOptions = (input, errorFactory) => {
|
|
487
495
|
const __is = input => {
|
|
488
|
-
const $io0 = input => (undefined === input.id || "string" === typeof input.id) && "string" === typeof input.url && (undefined === input.filename || "string" === typeof input.filename) && (undefined === input.directory || "string" === typeof input.directory) && (undefined === input.path || "string" === typeof input.path);
|
|
496
|
+
const $io0 = input => (undefined === input.id || "string" === typeof input.id) && "string" === typeof input.url && (undefined === input.filename || "string" === typeof input.filename) && (undefined === input.directory || "string" === typeof input.directory) && (undefined === input.path || "string" === typeof input.path) && (undefined === input.collisionPostfix || "boolean" === typeof input.collisionPostfix);
|
|
489
497
|
return "object" === typeof input && null !== input && $io0(input);
|
|
490
498
|
};
|
|
491
499
|
if (false === __is(input))
|
|
@@ -511,6 +519,10 @@ export const assertGuardDownloadFileOptions = (input, errorFactory) => {
|
|
|
511
519
|
path: _path + ".path",
|
|
512
520
|
expected: "(string | undefined)",
|
|
513
521
|
value: input.path
|
|
522
|
+
}, errorFactory)) && (undefined === input.collisionPostfix || "boolean" === typeof input.collisionPostfix || $guard(_exceptionable, {
|
|
523
|
+
path: _path + ".collisionPostfix",
|
|
524
|
+
expected: "(boolean | undefined)",
|
|
525
|
+
value: input.collisionPostfix
|
|
514
526
|
}, errorFactory));
|
|
515
527
|
return ("object" === typeof input && null !== input || $guard(true, {
|
|
516
528
|
path: _path + "",
|
|
@@ -525,12 +537,12 @@ export const assertGuardDownloadFileOptions = (input, errorFactory) => {
|
|
|
525
537
|
};
|
|
526
538
|
export const stringifyDownloadFileOptions = input => {
|
|
527
539
|
const $string = __typia.json.createStringify.string;
|
|
528
|
-
const $so0 = input => `{${undefined === input.id ? "" : `"id":${undefined !== input.id ? $string(input.id) : undefined},`}${undefined === input.filename ? "" : `"filename":${undefined !== input.filename ? $string(input.filename) : undefined},`}${undefined === input.directory ? "" : `"directory":${undefined !== input.directory ? $string(input.directory) : undefined},`}${undefined === input.path ? "" : `"path":${undefined !== input.path ? $string(input.path) : undefined},`}"url":${$string(input.url)}}`;
|
|
540
|
+
const $so0 = input => `{${undefined === input.id ? "" : `"id":${undefined !== input.id ? $string(input.id) : undefined},`}${undefined === input.filename ? "" : `"filename":${undefined !== input.filename ? $string(input.filename) : undefined},`}${undefined === input.directory ? "" : `"directory":${undefined !== input.directory ? $string(input.directory) : undefined},`}${undefined === input.path ? "" : `"path":${undefined !== input.path ? $string(input.path) : undefined},`}${undefined === input.collisionPostfix ? "" : `"collisionPostfix":${undefined !== input.collisionPostfix ? input.collisionPostfix : undefined},`}"url":${$string(input.url)}}`;
|
|
529
541
|
return $so0(input);
|
|
530
542
|
};
|
|
531
543
|
export const assertStringifyDownloadFileOptions = (input, errorFactory) => { const assert = (input, errorFactory) => {
|
|
532
544
|
const __is = input => {
|
|
533
|
-
const $io0 = input => (undefined === input.id || "string" === typeof input.id) && "string" === typeof input.url && (undefined === input.filename || "string" === typeof input.filename) && (undefined === input.directory || "string" === typeof input.directory) && (undefined === input.path || "string" === typeof input.path);
|
|
545
|
+
const $io0 = input => (undefined === input.id || "string" === typeof input.id) && "string" === typeof input.url && (undefined === input.filename || "string" === typeof input.filename) && (undefined === input.directory || "string" === typeof input.directory) && (undefined === input.path || "string" === typeof input.path) && (undefined === input.collisionPostfix || "boolean" === typeof input.collisionPostfix);
|
|
534
546
|
return "object" === typeof input && null !== input && $io0(input);
|
|
535
547
|
};
|
|
536
548
|
if (false === __is(input))
|
|
@@ -556,6 +568,10 @@ export const assertStringifyDownloadFileOptions = (input, errorFactory) => { con
|
|
|
556
568
|
path: _path + ".path",
|
|
557
569
|
expected: "(string | undefined)",
|
|
558
570
|
value: input.path
|
|
571
|
+
}, errorFactory)) && (undefined === input.collisionPostfix || "boolean" === typeof input.collisionPostfix || $guard(_exceptionable, {
|
|
572
|
+
path: _path + ".collisionPostfix",
|
|
573
|
+
expected: "(boolean | undefined)",
|
|
574
|
+
value: input.collisionPostfix
|
|
559
575
|
}, errorFactory));
|
|
560
576
|
return ("object" === typeof input && null !== input || $guard(true, {
|
|
561
577
|
path: _path + "",
|
|
@@ -570,6 +586,238 @@ export const assertStringifyDownloadFileOptions = (input, errorFactory) => { con
|
|
|
570
586
|
return input;
|
|
571
587
|
}; const stringify = input => {
|
|
572
588
|
const $string = __typia.json.createAssertStringify.string;
|
|
573
|
-
const $so0 = input => `{${undefined === input.id ? "" : `"id":${undefined !== input.id ? $string(input.id) : undefined},`}${undefined === input.filename ? "" : `"filename":${undefined !== input.filename ? $string(input.filename) : undefined},`}${undefined === input.directory ? "" : `"directory":${undefined !== input.directory ? $string(input.directory) : undefined},`}${undefined === input.path ? "" : `"path":${undefined !== input.path ? $string(input.path) : undefined},`}"url":${$string(input.url)}}`;
|
|
589
|
+
const $so0 = input => `{${undefined === input.id ? "" : `"id":${undefined !== input.id ? $string(input.id) : undefined},`}${undefined === input.filename ? "" : `"filename":${undefined !== input.filename ? $string(input.filename) : undefined},`}${undefined === input.directory ? "" : `"directory":${undefined !== input.directory ? $string(input.directory) : undefined},`}${undefined === input.path ? "" : `"path":${undefined !== input.path ? $string(input.path) : undefined},`}${undefined === input.collisionPostfix ? "" : `"collisionPostfix":${undefined !== input.collisionPostfix ? input.collisionPostfix : undefined},`}"url":${$string(input.url)}}`;
|
|
590
|
+
return $so0(input);
|
|
591
|
+
}; return stringify(assert(input, errorFactory)); };
|
|
592
|
+
export const isDownloadMessage = input => {
|
|
593
|
+
const $io0 = input => "download" === input.type && "string" === typeof input.id && "string" === typeof input.title && "number" === typeof input.bytes && "number" === typeof input.size && ("progressing" === input.state || "completed" === input.state || "cancelled" === input.state || "interrupted" === input.state) && "string" === typeof input.savePath && (undefined === input.done || "boolean" === typeof input.done);
|
|
594
|
+
return "object" === typeof input && null !== input && $io0(input);
|
|
595
|
+
};
|
|
596
|
+
export const assertDownloadMessage = (input, errorFactory) => {
|
|
597
|
+
const __is = input => {
|
|
598
|
+
const $io0 = input => "download" === input.type && "string" === typeof input.id && "string" === typeof input.title && "number" === typeof input.bytes && "number" === typeof input.size && ("progressing" === input.state || "completed" === input.state || "cancelled" === input.state || "interrupted" === input.state) && "string" === typeof input.savePath && (undefined === input.done || "boolean" === typeof input.done);
|
|
599
|
+
return "object" === typeof input && null !== input && $io0(input);
|
|
600
|
+
};
|
|
601
|
+
if (false === __is(input))
|
|
602
|
+
((input, _path, _exceptionable = true) => {
|
|
603
|
+
const $guard = __typia.createAssert.guard;
|
|
604
|
+
const $ao0 = (input, _path, _exceptionable = true) => ("download" === input.type || $guard(_exceptionable, {
|
|
605
|
+
path: _path + ".type",
|
|
606
|
+
expected: "\"download\"",
|
|
607
|
+
value: input.type
|
|
608
|
+
}, errorFactory)) && ("string" === typeof input.id || $guard(_exceptionable, {
|
|
609
|
+
path: _path + ".id",
|
|
610
|
+
expected: "string",
|
|
611
|
+
value: input.id
|
|
612
|
+
}, errorFactory)) && ("string" === typeof input.title || $guard(_exceptionable, {
|
|
613
|
+
path: _path + ".title",
|
|
614
|
+
expected: "string",
|
|
615
|
+
value: input.title
|
|
616
|
+
}, errorFactory)) && ("number" === typeof input.bytes || $guard(_exceptionable, {
|
|
617
|
+
path: _path + ".bytes",
|
|
618
|
+
expected: "number",
|
|
619
|
+
value: input.bytes
|
|
620
|
+
}, errorFactory)) && ("number" === typeof input.size || $guard(_exceptionable, {
|
|
621
|
+
path: _path + ".size",
|
|
622
|
+
expected: "number",
|
|
623
|
+
value: input.size
|
|
624
|
+
}, errorFactory)) && ("progressing" === input.state || "completed" === input.state || "cancelled" === input.state || "interrupted" === input.state || $guard(_exceptionable, {
|
|
625
|
+
path: _path + ".state",
|
|
626
|
+
expected: "(\"cancelled\" | \"completed\" | \"interrupted\" | \"progressing\")",
|
|
627
|
+
value: input.state
|
|
628
|
+
}, errorFactory)) && ("string" === typeof input.savePath || $guard(_exceptionable, {
|
|
629
|
+
path: _path + ".savePath",
|
|
630
|
+
expected: "string",
|
|
631
|
+
value: input.savePath
|
|
632
|
+
}, errorFactory)) && (undefined === input.done || "boolean" === typeof input.done || $guard(_exceptionable, {
|
|
633
|
+
path: _path + ".done",
|
|
634
|
+
expected: "(boolean | undefined)",
|
|
635
|
+
value: input.done
|
|
636
|
+
}, errorFactory));
|
|
637
|
+
return ("object" === typeof input && null !== input || $guard(true, {
|
|
638
|
+
path: _path + "",
|
|
639
|
+
expected: "DownloadMessage",
|
|
640
|
+
value: input
|
|
641
|
+
}, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
|
|
642
|
+
path: _path + "",
|
|
643
|
+
expected: "DownloadMessage",
|
|
644
|
+
value: input
|
|
645
|
+
}, errorFactory);
|
|
646
|
+
})(input, "$input", true);
|
|
647
|
+
return input;
|
|
648
|
+
};
|
|
649
|
+
export const randomDownloadMessage = generator => {
|
|
650
|
+
const $generator = __typia.createRandom.generator;
|
|
651
|
+
const $pick = __typia.createRandom.pick;
|
|
652
|
+
const $ro0 = (_recursive = false, _depth = 0) => ({
|
|
653
|
+
type: "download",
|
|
654
|
+
id: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
|
|
655
|
+
title: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
|
|
656
|
+
bytes: (generator?.customs ?? $generator.customs)?.number?.([]) ?? (generator?.number ?? $generator.number)(0, 100),
|
|
657
|
+
size: (generator?.customs ?? $generator.customs)?.number?.([]) ?? (generator?.number ?? $generator.number)(0, 100),
|
|
658
|
+
state: $pick([
|
|
659
|
+
() => "progressing",
|
|
660
|
+
() => "completed",
|
|
661
|
+
() => "cancelled",
|
|
662
|
+
() => "interrupted"
|
|
663
|
+
])(),
|
|
664
|
+
savePath: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
|
|
665
|
+
done: $pick([
|
|
666
|
+
() => undefined,
|
|
667
|
+
() => (generator?.boolean ?? $generator.boolean)()
|
|
668
|
+
])()
|
|
669
|
+
});
|
|
670
|
+
return $ro0();
|
|
671
|
+
};
|
|
672
|
+
export const assertGuardDownloadMessage = (input, errorFactory) => {
|
|
673
|
+
const __is = input => {
|
|
674
|
+
const $io0 = input => "download" === input.type && "string" === typeof input.id && "string" === typeof input.title && "number" === typeof input.bytes && "number" === typeof input.size && ("progressing" === input.state || "completed" === input.state || "cancelled" === input.state || "interrupted" === input.state) && "string" === typeof input.savePath && (undefined === input.done || "boolean" === typeof input.done);
|
|
675
|
+
return "object" === typeof input && null !== input && $io0(input);
|
|
676
|
+
};
|
|
677
|
+
if (false === __is(input))
|
|
678
|
+
((input, _path, _exceptionable = true) => {
|
|
679
|
+
const $guard = __typia.createAssertGuard.guard;
|
|
680
|
+
const $ao0 = (input, _path, _exceptionable = true) => ("download" === input.type || $guard(_exceptionable, {
|
|
681
|
+
path: _path + ".type",
|
|
682
|
+
expected: "\"download\"",
|
|
683
|
+
value: input.type
|
|
684
|
+
}, errorFactory)) && ("string" === typeof input.id || $guard(_exceptionable, {
|
|
685
|
+
path: _path + ".id",
|
|
686
|
+
expected: "string",
|
|
687
|
+
value: input.id
|
|
688
|
+
}, errorFactory)) && ("string" === typeof input.title || $guard(_exceptionable, {
|
|
689
|
+
path: _path + ".title",
|
|
690
|
+
expected: "string",
|
|
691
|
+
value: input.title
|
|
692
|
+
}, errorFactory)) && ("number" === typeof input.bytes || $guard(_exceptionable, {
|
|
693
|
+
path: _path + ".bytes",
|
|
694
|
+
expected: "number",
|
|
695
|
+
value: input.bytes
|
|
696
|
+
}, errorFactory)) && ("number" === typeof input.size || $guard(_exceptionable, {
|
|
697
|
+
path: _path + ".size",
|
|
698
|
+
expected: "number",
|
|
699
|
+
value: input.size
|
|
700
|
+
}, errorFactory)) && ("progressing" === input.state || "completed" === input.state || "cancelled" === input.state || "interrupted" === input.state || $guard(_exceptionable, {
|
|
701
|
+
path: _path + ".state",
|
|
702
|
+
expected: "(\"cancelled\" | \"completed\" | \"interrupted\" | \"progressing\")",
|
|
703
|
+
value: input.state
|
|
704
|
+
}, errorFactory)) && ("string" === typeof input.savePath || $guard(_exceptionable, {
|
|
705
|
+
path: _path + ".savePath",
|
|
706
|
+
expected: "string",
|
|
707
|
+
value: input.savePath
|
|
708
|
+
}, errorFactory)) && (undefined === input.done || "boolean" === typeof input.done || $guard(_exceptionable, {
|
|
709
|
+
path: _path + ".done",
|
|
710
|
+
expected: "(boolean | undefined)",
|
|
711
|
+
value: input.done
|
|
712
|
+
}, errorFactory));
|
|
713
|
+
return ("object" === typeof input && null !== input || $guard(true, {
|
|
714
|
+
path: _path + "",
|
|
715
|
+
expected: "DownloadMessage",
|
|
716
|
+
value: input
|
|
717
|
+
}, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
|
|
718
|
+
path: _path + "",
|
|
719
|
+
expected: "DownloadMessage",
|
|
720
|
+
value: input
|
|
721
|
+
}, errorFactory);
|
|
722
|
+
})(input, "$input", true);
|
|
723
|
+
};
|
|
724
|
+
export const stringifyDownloadMessage = input => {
|
|
725
|
+
const $string = __typia.json.createStringify.string;
|
|
726
|
+
const $throws = __typia.json.createStringify.throws;
|
|
727
|
+
const $so0 = input => `{${undefined === input.done ? "" : `"done":${undefined !== input.done ? input.done : undefined},`}"type":${(() => {
|
|
728
|
+
if ("string" === typeof input.type)
|
|
729
|
+
return $string(input.type);
|
|
730
|
+
if ("string" === typeof input.type)
|
|
731
|
+
return "\"" + input.type + "\"";
|
|
732
|
+
$throws({
|
|
733
|
+
expected: "\"download\"",
|
|
734
|
+
value: input.type
|
|
735
|
+
});
|
|
736
|
+
})()},"id":${$string(input.id)},"title":${$string(input.title)},"bytes":${input.bytes},"size":${input.size},"state":${(() => {
|
|
737
|
+
if ("string" === typeof input.state)
|
|
738
|
+
return $string(input.state);
|
|
739
|
+
if ("string" === typeof input.state)
|
|
740
|
+
return "\"" + input.state + "\"";
|
|
741
|
+
$throws({
|
|
742
|
+
expected: "(\"cancelled\" | \"completed\" | \"interrupted\" | \"progressing\")",
|
|
743
|
+
value: input.state
|
|
744
|
+
});
|
|
745
|
+
})()},"savePath":${$string(input.savePath)}}`;
|
|
746
|
+
return $so0(input);
|
|
747
|
+
};
|
|
748
|
+
export const assertStringifyDownloadMessage = (input, errorFactory) => { const assert = (input, errorFactory) => {
|
|
749
|
+
const __is = input => {
|
|
750
|
+
const $io0 = input => "download" === input.type && "string" === typeof input.id && "string" === typeof input.title && ("number" === typeof input.bytes && !Number.isNaN(input.bytes)) && ("number" === typeof input.size && !Number.isNaN(input.size)) && ("progressing" === input.state || "completed" === input.state || "cancelled" === input.state || "interrupted" === input.state) && "string" === typeof input.savePath && (undefined === input.done || "boolean" === typeof input.done);
|
|
751
|
+
return "object" === typeof input && null !== input && $io0(input);
|
|
752
|
+
};
|
|
753
|
+
if (false === __is(input))
|
|
754
|
+
((input, _path, _exceptionable = true) => {
|
|
755
|
+
const $guard = __typia.json.createAssertStringify.guard;
|
|
756
|
+
const $ao0 = (input, _path, _exceptionable = true) => ("download" === input.type || $guard(_exceptionable, {
|
|
757
|
+
path: _path + ".type",
|
|
758
|
+
expected: "\"download\"",
|
|
759
|
+
value: input.type
|
|
760
|
+
}, errorFactory)) && ("string" === typeof input.id || $guard(_exceptionable, {
|
|
761
|
+
path: _path + ".id",
|
|
762
|
+
expected: "string",
|
|
763
|
+
value: input.id
|
|
764
|
+
}, errorFactory)) && ("string" === typeof input.title || $guard(_exceptionable, {
|
|
765
|
+
path: _path + ".title",
|
|
766
|
+
expected: "string",
|
|
767
|
+
value: input.title
|
|
768
|
+
}, errorFactory)) && ("number" === typeof input.bytes && !Number.isNaN(input.bytes) || $guard(_exceptionable, {
|
|
769
|
+
path: _path + ".bytes",
|
|
770
|
+
expected: "number",
|
|
771
|
+
value: input.bytes
|
|
772
|
+
}, errorFactory)) && ("number" === typeof input.size && !Number.isNaN(input.size) || $guard(_exceptionable, {
|
|
773
|
+
path: _path + ".size",
|
|
774
|
+
expected: "number",
|
|
775
|
+
value: input.size
|
|
776
|
+
}, errorFactory)) && ("progressing" === input.state || "completed" === input.state || "cancelled" === input.state || "interrupted" === input.state || $guard(_exceptionable, {
|
|
777
|
+
path: _path + ".state",
|
|
778
|
+
expected: "(\"cancelled\" | \"completed\" | \"interrupted\" | \"progressing\")",
|
|
779
|
+
value: input.state
|
|
780
|
+
}, errorFactory)) && ("string" === typeof input.savePath || $guard(_exceptionable, {
|
|
781
|
+
path: _path + ".savePath",
|
|
782
|
+
expected: "string",
|
|
783
|
+
value: input.savePath
|
|
784
|
+
}, errorFactory)) && (undefined === input.done || "boolean" === typeof input.done || $guard(_exceptionable, {
|
|
785
|
+
path: _path + ".done",
|
|
786
|
+
expected: "(boolean | undefined)",
|
|
787
|
+
value: input.done
|
|
788
|
+
}, errorFactory));
|
|
789
|
+
return ("object" === typeof input && null !== input || $guard(true, {
|
|
790
|
+
path: _path + "",
|
|
791
|
+
expected: "DownloadMessage",
|
|
792
|
+
value: input
|
|
793
|
+
}, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
|
|
794
|
+
path: _path + "",
|
|
795
|
+
expected: "DownloadMessage",
|
|
796
|
+
value: input
|
|
797
|
+
}, errorFactory);
|
|
798
|
+
})(input, "$input", true);
|
|
799
|
+
return input;
|
|
800
|
+
}; const stringify = input => {
|
|
801
|
+
const $string = __typia.json.createAssertStringify.string;
|
|
802
|
+
const $throws = __typia.json.createAssertStringify.throws;
|
|
803
|
+
const $so0 = input => `{${undefined === input.done ? "" : `"done":${undefined !== input.done ? input.done : undefined},`}"type":${(() => {
|
|
804
|
+
if ("string" === typeof input.type)
|
|
805
|
+
return $string(input.type);
|
|
806
|
+
if ("string" === typeof input.type)
|
|
807
|
+
return "\"" + input.type + "\"";
|
|
808
|
+
$throws({
|
|
809
|
+
expected: "\"download\"",
|
|
810
|
+
value: input.type
|
|
811
|
+
});
|
|
812
|
+
})()},"id":${$string(input.id)},"title":${$string(input.title)},"bytes":${input.bytes},"size":${input.size},"state":${(() => {
|
|
813
|
+
if ("string" === typeof input.state)
|
|
814
|
+
return $string(input.state);
|
|
815
|
+
if ("string" === typeof input.state)
|
|
816
|
+
return "\"" + input.state + "\"";
|
|
817
|
+
$throws({
|
|
818
|
+
expected: "(\"cancelled\" | \"completed\" | \"interrupted\" | \"progressing\")",
|
|
819
|
+
value: input.state
|
|
820
|
+
});
|
|
821
|
+
})()},"savePath":${$string(input.savePath)}}`;
|
|
574
822
|
return $so0(input);
|
|
575
823
|
}; return stringify(assert(input, errorFactory)); };
|
package/dist/common/block.d.ts
CHANGED
|
@@ -21,7 +21,7 @@ export declare const assertStringifyBlock: (input: unknown) => string;
|
|
|
21
21
|
export type Blocks = Block[];
|
|
22
22
|
export declare const isBlocks: (input: unknown) => input is Blocks;
|
|
23
23
|
export declare const assertBlocks: (input: unknown) => Blocks;
|
|
24
|
-
export declare const randomBlocks: () =>
|
|
24
|
+
export declare const randomBlocks: () => Blocks;
|
|
25
25
|
export declare const assertGuardBlocks: __AssertionGuard<Blocks>;
|
|
26
26
|
export declare const stringifyBlocks: (input: Blocks) => string;
|
|
27
27
|
export declare const assertStringifyBlocks: (input: unknown) => string;
|
package/dist/common/file.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { type AssertionGuard as __AssertionGuard } from "typia";
|
|
2
|
-
import { tags } from 'typia';
|
|
3
2
|
import { NxtError } from './error.js';
|
|
4
3
|
export type FileRef = {
|
|
5
4
|
file?: string;
|
|
@@ -16,13 +15,13 @@ export declare const assertStringifyFileRef: (input: unknown) => string;
|
|
|
16
15
|
export type FileRefs = Array<FileRef>;
|
|
17
16
|
export declare const isFileRefs: (input: unknown) => input is FileRefs;
|
|
18
17
|
export declare const assertFileRefs: (input: unknown) => FileRefs;
|
|
19
|
-
export declare const randomFileRefs: () =>
|
|
18
|
+
export declare const randomFileRefs: () => FileRefs;
|
|
20
19
|
export declare const assertGuardFileRefs: __AssertionGuard<FileRefs>;
|
|
21
20
|
export declare const stringifyFileRefs: (input: FileRefs) => string;
|
|
22
21
|
export declare const assertStringifyFileRefs: (input: unknown) => string;
|
|
23
22
|
export interface File {
|
|
24
|
-
id: string & tags.Pattern<
|
|
25
|
-
size: (number & tags.Minimum<0> & tags.Type<
|
|
23
|
+
id: string & import('typia').tags.Pattern<'^[0-9A-Za-z~][0-9A-Za-z~._: -]*$'>;
|
|
24
|
+
size: (number & import('typia').tags.Minimum<0> & import('typia').tags.Type<'uint64'>) | null;
|
|
26
25
|
seekable: boolean;
|
|
27
26
|
deleted: boolean;
|
|
28
27
|
refs: FileRefs;
|
|
@@ -30,8 +29,8 @@ export interface File {
|
|
|
30
29
|
resumable: string;
|
|
31
30
|
mimeType: string;
|
|
32
31
|
encoding: string;
|
|
33
|
-
hash: string & tags.Pattern<
|
|
34
|
-
btime: number & tags.Minimum<0> & tags.Type<
|
|
32
|
+
hash: string & import('typia').tags.Pattern<'^([A-Fa-f0-9]{32})?$'>;
|
|
33
|
+
btime: number & import('typia').tags.Minimum<0> & import('typia').tags.Type<'uint64'>;
|
|
35
34
|
completed: boolean;
|
|
36
35
|
error: NxtError[] | NxtError | null;
|
|
37
36
|
}
|
|
@@ -42,17 +41,17 @@ export declare const assertGuardFile: __AssertionGuard<File>;
|
|
|
42
41
|
export declare const stringifyFile: (input: File) => string;
|
|
43
42
|
export declare const assertStringifyFile: (input: unknown) => string;
|
|
44
43
|
export interface FileStats extends File {
|
|
45
|
-
position: (number & tags.Minimum<0> & tags.Type<
|
|
44
|
+
position: (number & import('typia').tags.Minimum<0> & import('typia').tags.Type<'uint64'>) | null;
|
|
46
45
|
uploading: boolean | null;
|
|
47
46
|
zones: string[];
|
|
48
47
|
replicas: string[];
|
|
49
48
|
locations: string[];
|
|
50
49
|
ranges: Array<[
|
|
51
|
-
start: number & tags.Minimum<0>,
|
|
52
|
-
end: number & tags.Minimum<0>
|
|
50
|
+
start: number & import('typia').tags.Minimum<0>,
|
|
51
|
+
end: number & import('typia').tags.Minimum<0>
|
|
53
52
|
]>;
|
|
54
|
-
progress?: number & tags.Minimum<0> & tags.Maximum<1>;
|
|
55
|
-
speed?: number & tags.Minimum<0>;
|
|
53
|
+
progress?: number & import('typia').tags.Minimum<0> & import('typia').tags.Maximum<1>;
|
|
54
|
+
speed?: number & import('typia').tags.Minimum<0>;
|
|
56
55
|
}
|
|
57
56
|
export declare const isFileStats: (input: unknown) => input is FileStats;
|
|
58
57
|
export declare const assertFileStats: (input: unknown) => FileStats;
|