@nxtedition/types 23.0.39 → 23.0.41
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 +0 -51
- package/dist/app.js +1 -823
- package/dist/common/block.d.ts +6 -13
- package/dist/common/block.js +597 -1607
- package/dist/common/clone.d.ts +0 -19
- package/dist/common/clone.js +1 -602
- package/dist/common/date.d.ts +0 -7
- package/dist/common/date.js +1 -59
- package/dist/common/error.d.ts +0 -7
- package/dist/common/error.js +1 -404
- package/dist/common/file.d.ts +1 -21
- package/dist/common/file.js +782 -2521
- package/dist/common/index.d.ts +20 -26
- package/dist/common/index.js +20 -134
- package/dist/common/location.d.ts +0 -6
- package/dist/common/location.js +73 -238
- package/dist/common/lock.d.ts +1 -8
- package/dist/common/lock.js +1 -211
- package/dist/common/media.d.ts +0 -7
- package/dist/common/media.js +1 -83
- package/dist/common/nxtpression.d.ts +2 -9
- package/dist/common/nxtpression.js +1 -277
- package/dist/common/pipeline.d.ts +0 -7
- package/dist/common/pipeline.js +1 -97
- package/dist/common/promoted-tag.d.ts +0 -7
- package/dist/common/promoted-tag.js +1 -147
- package/dist/common/render-preset.d.ts +2 -15
- package/dist/common/render-preset.js +1 -1202
- package/dist/common/render-profile.d.ts +0 -19
- package/dist/common/render-profile.js +1 -1052
- package/dist/common/render-query.d.ts +2 -9
- package/dist/common/render-query.js +1 -1754
- package/dist/common/render-scene.d.ts +2 -15
- package/dist/common/render-scene.js +1 -2230
- package/dist/common/rule.d.ts +1 -7
- package/dist/common/rule.js +84 -254
- package/dist/common/search.d.ts +0 -25
- package/dist/common/search.js +1 -1591
- package/dist/common/settings.d.ts +128 -121
- package/dist/common/settings.js +1 -6936
- package/dist/common/subtitle-style.d.ts +25 -0
- package/dist/common/user-notification.d.ts +0 -7
- package/dist/common/user-notification.js +1 -85
- package/dist/index.d.ts +5 -85
- package/dist/index.js +5 -187
- package/dist/nxtpression.d.ts +732 -344
- package/dist/nxtpression.js +1 -323
- package/dist/records/domains/asset.d.ts +106 -0
- package/dist/records/domains/bundle.d.ts +12 -0
- package/dist/records/domains/bundle.js +1 -0
- package/dist/records/domains/clone.d.ts +7 -0
- package/dist/records/domains/clone.js +1 -0
- package/dist/records/domains/comment-reaction.d.ts +8 -0
- package/dist/records/domains/comment-reaction.js +1 -0
- package/dist/records/domains/comment-read-mark.d.ts +8 -0
- package/dist/records/domains/comment-read-mark.js +1 -0
- package/dist/records/domains/comment.d.ts +81 -0
- package/dist/records/domains/comment.js +19 -0
- package/dist/records/domains/connection.d.ts +77 -0
- package/dist/records/domains/connection.js +1 -0
- package/dist/records/domains/contact.d.ts +9 -0
- package/dist/records/domains/contact.js +1 -0
- package/dist/records/domains/deepstream.d.ts +7 -0
- package/dist/records/domains/deepstream.js +1 -0
- package/dist/records/domains/design.d.ts +11 -0
- package/dist/records/domains/design.js +1 -0
- package/dist/records/domains/edit.d.ts +10 -0
- package/dist/records/domains/edit.js +1 -0
- package/dist/records/domains/event.d.ts +66 -0
- package/dist/records/domains/event.js +1 -0
- package/dist/records/domains/file.d.ts +26 -0
- package/dist/records/domains/file.js +1 -0
- package/dist/records/domains/general.d.ts +41 -0
- package/dist/records/domains/general.js +1 -0
- package/dist/records/domains/index.d.ts +77 -0
- package/dist/records/domains/index.js +38 -0
- package/dist/records/domains/media.d.ts +64 -0
- package/dist/records/domains/media.js +1 -0
- package/dist/records/domains/monitor.d.ts +116 -0
- package/dist/records/domains/monitor.js +1 -0
- package/dist/records/domains/panel.d.ts +55 -0
- package/dist/records/domains/panel.js +1 -0
- package/dist/records/domains/permission.d.ts +25 -0
- package/dist/records/domains/permission.js +2 -0
- package/dist/records/domains/pipeline-preset.d.ts +10 -0
- package/dist/records/domains/pipeline-preset.js +1 -0
- package/dist/records/domains/pipeline.d.ts +17 -0
- package/dist/records/domains/pipeline.js +1 -0
- package/dist/records/domains/planning.d.ts +14 -0
- package/dist/records/domains/planning.js +1 -0
- package/dist/records/domains/prompter.d.ts +18 -0
- package/dist/records/domains/prompter.js +1 -0
- package/dist/records/domains/publish.d.ts +145 -0
- package/dist/records/domains/publish.js +1 -0
- package/dist/records/domains/published.d.ts +12 -0
- package/dist/records/domains/published.js +1 -0
- package/dist/records/domains/render-preset.d.ts +5 -0
- package/dist/records/domains/render-preset.js +1 -0
- package/dist/records/domains/render.d.ts +115 -0
- package/dist/records/domains/render.js +1 -0
- package/dist/records/domains/revs.d.ts +6 -0
- package/dist/records/domains/revs.js +1 -0
- package/dist/records/domains/role.d.ts +6 -0
- package/dist/records/domains/role.js +1 -0
- package/dist/records/domains/script.d.ts +101 -0
- package/dist/records/domains/script.js +1 -0
- package/dist/records/domains/search.d.ts +9 -0
- package/dist/records/domains/search.js +1 -0
- package/dist/records/domains/settings.d.ts +5 -0
- package/dist/records/domains/settings.js +1 -0
- package/dist/records/domains/storyboard.d.ts +10 -0
- package/dist/records/domains/storyboard.js +1 -0
- package/dist/records/domains/subtitle-style.d.ts +13 -0
- package/dist/records/domains/subtitle-style.js +1 -0
- package/dist/records/domains/subtitle.d.ts +12 -0
- package/dist/records/domains/subtitle.js +1 -0
- package/dist/records/domains/template.d.ts +10 -0
- package/dist/records/domains/template.js +1 -0
- package/dist/records/domains/user-notification-status.d.ts +30 -0
- package/dist/records/domains/user-notification-status.js +1 -0
- package/dist/records/domains/user-notification.d.ts +69 -0
- package/dist/records/domains/user-notification.js +1 -0
- package/dist/records/domains/user.d.ts +23 -0
- package/dist/records/domains/user.js +1 -0
- package/dist/records/exact/asset.d.ts +83 -0
- package/dist/records/exact/asset.js +1 -0
- package/dist/records/exact/index.d.ts +36 -0
- package/dist/records/exact/index.js +4 -0
- package/dist/records/exact/media.d.ts +52 -0
- package/dist/records/exact/media.js +1 -0
- package/dist/records/exact/monitor.d.ts +46 -0
- package/dist/records/exact/monitor.js +1 -0
- package/dist/records/exact/storage.d.ts +32 -0
- package/dist/records/exact/storage.js +1 -0
- package/dist/records/index.d.ts +10 -0
- package/dist/records/index.js +2 -0
- package/dist/records/utils.d.ts +7 -0
- package/dist/records/utils.js +1 -0
- package/dist/records/utils.tds.d.ts +1 -0
- package/dist/records/utils.tds.js +7 -0
- package/dist/records/validate/assert-guard.d.ts +4 -0
- package/dist/records/validate/assert-guard.js +15861 -0
- package/dist/records/validate/assert.d.ts +4 -0
- package/dist/records/validate/assert.js +15990 -0
- package/dist/records/validate/is.d.ts +4 -0
- package/dist/records/validate/is.js +1017 -0
- package/dist/records/validate/schemas.d.ts +9 -0
- package/dist/records/validate/schemas.js +12613 -0
- package/dist/records/validate/stringify.d.ts +4 -0
- package/dist/records/validate/stringify.js +1904 -0
- package/dist/records/validate/utils.d.ts +15 -0
- package/dist/records/validate/utils.js +18 -0
- package/dist/records/validate/utils.test.d.ts +1 -0
- package/dist/records/validate/utils.test.js +35 -0
- package/dist/records/validate/validate.d.ts +5 -0
- package/dist/records/validate/validate.js +14943 -0
- package/dist/rpc.d.ts +13 -14
- package/dist/rpc.js +126 -511
- package/dist/tsdoc-metadata.json +1 -1
- package/package.json +26 -15
- package/dist/asset.d.ts +0 -72
- package/dist/domains/asset.d.ts +0 -227
- package/dist/domains/asset.js +0 -2672
- package/dist/domains/bundle.d.ts +0 -25
- package/dist/domains/bundle.js +0 -512
- package/dist/domains/clone.d.ts +0 -14
- package/dist/domains/clone.js +0 -192
- package/dist/domains/comment-reaction.d.ts +0 -15
- package/dist/domains/comment-reaction.js +0 -115
- package/dist/domains/comment-read-mark.d.ts +0 -15
- package/dist/domains/comment-read-mark.js +0 -115
- package/dist/domains/comment.d.ts +0 -153
- package/dist/domains/comment.js +0 -5906
- package/dist/domains/connection.d.ts +0 -141
- package/dist/domains/connection.js +0 -5860
- package/dist/domains/contact.d.ts +0 -16
- package/dist/domains/contact.js +0 -149
- package/dist/domains/deepstream.d.ts +0 -14
- package/dist/domains/deepstream.js +0 -139
- package/dist/domains/design.d.ts +0 -24
- package/dist/domains/design.js +0 -303
- package/dist/domains/edit.d.ts +0 -17
- package/dist/domains/edit.js +0 -224
- package/dist/domains/event.d.ts +0 -42
- package/dist/domains/event.js +0 -754
- package/dist/domains/file.d.ts +0 -51
- package/dist/domains/file.js +0 -2506
- package/dist/domains/general.d.ts +0 -84
- package/dist/domains/general.js +0 -906
- package/dist/domains/index.d.ts +0 -75
- package/dist/domains/index.js +0 -37
- package/dist/domains/media.d.ts +0 -113
- package/dist/domains/media.js +0 -4553
- package/dist/domains/monitor.d.ts +0 -416
- package/dist/domains/monitor.js +0 -6382
- package/dist/domains/panel.d.ts +0 -371
- package/dist/domains/panel.js +0 -3198
- package/dist/domains/permission.d.ts +0 -61
- package/dist/domains/permission.js +0 -1926
- package/dist/domains/pipeline-preset.d.ts +0 -17
- package/dist/domains/pipeline-preset.js +0 -236
- package/dist/domains/pipeline.d.ts +0 -30
- package/dist/domains/pipeline.js +0 -460
- package/dist/domains/planning.d.ts +0 -33
- package/dist/domains/planning.js +0 -324
- package/dist/domains/publish.d.ts +0 -1397
- package/dist/domains/publish.js +0 -34436
- package/dist/domains/published.d.ts +0 -19
- package/dist/domains/published.js +0 -204
- package/dist/domains/render-preset.d.ts +0 -4
- package/dist/domains/render.d.ts +0 -172
- package/dist/domains/render.js +0 -4783
- package/dist/domains/revs.d.ts +0 -13
- package/dist/domains/revs.js +0 -125
- package/dist/domains/role.d.ts +0 -13
- package/dist/domains/role.js +0 -119
- package/dist/domains/script.d.ts +0 -13
- package/dist/domains/script.js +0 -125
- package/dist/domains/search.d.ts +0 -16
- package/dist/domains/search.js +0 -168
- package/dist/domains/settings.d.ts +0 -12
- package/dist/domains/settings.js +0 -6624
- package/dist/domains/storyboard.d.ts +0 -14
- package/dist/domains/storyboard.js +0 -125
- package/dist/domains/subtitle-style.d.ts +0 -37
- package/dist/domains/subtitle-style.js +0 -485
- package/dist/domains/subtitle.d.ts +0 -19
- package/dist/domains/subtitle.js +0 -212
- package/dist/domains/template.d.ts +0 -23
- package/dist/domains/template.js +0 -372
- package/dist/domains/user-notification-status.d.ts +0 -55
- package/dist/domains/user-notification-status.js +0 -715
- package/dist/domains/user-notification.d.ts +0 -118
- package/dist/domains/user-notification.js +0 -3040
- package/dist/domains/user.d.ts +0 -48
- package/dist/domains/user.js +0 -481
- package/dist/monitor.d.ts +0 -71
- package/dist/monitor.js +0 -1942
- package/dist/schema.json +0 -9075
- package/dist/storage.d.ts +0 -51
- package/dist/storage.js +0 -1036
- /package/dist/{asset.js → common/subtitle-style.js} +0 -0
- /package/dist/{domains/render-preset.js → records/domains/asset.js} +0 -0
package/dist/common/date.js
CHANGED
|
@@ -1,59 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export const isIsoTimestamp = input => {
|
|
3
|
-
return "string" === typeof input;
|
|
4
|
-
};
|
|
5
|
-
export const assertIsoTimestamp = (input, errorFactory) => {
|
|
6
|
-
const __is = input => {
|
|
7
|
-
return "string" === typeof input;
|
|
8
|
-
};
|
|
9
|
-
if (false === __is(input))
|
|
10
|
-
((input, _path, _exceptionable = true) => {
|
|
11
|
-
const $guard = __typia.createAssert.guard;
|
|
12
|
-
return "string" === typeof input || $guard(true, {
|
|
13
|
-
path: _path + "",
|
|
14
|
-
expected: "string",
|
|
15
|
-
value: input
|
|
16
|
-
}, errorFactory);
|
|
17
|
-
})(input, "$input", true);
|
|
18
|
-
return input;
|
|
19
|
-
};
|
|
20
|
-
export const randomIsoTimestamp = generator => {
|
|
21
|
-
const $generator = __typia.createRandom.generator;
|
|
22
|
-
return (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)();
|
|
23
|
-
};
|
|
24
|
-
export const assertGuardIsoTimestamp = (input, errorFactory) => {
|
|
25
|
-
const __is = input => {
|
|
26
|
-
return "string" === typeof input;
|
|
27
|
-
};
|
|
28
|
-
if (false === __is(input))
|
|
29
|
-
((input, _path, _exceptionable = true) => {
|
|
30
|
-
const $guard = __typia.createAssertGuard.guard;
|
|
31
|
-
return "string" === typeof input || $guard(true, {
|
|
32
|
-
path: _path + "",
|
|
33
|
-
expected: "string",
|
|
34
|
-
value: input
|
|
35
|
-
}, errorFactory);
|
|
36
|
-
})(input, "$input", true);
|
|
37
|
-
};
|
|
38
|
-
export const stringifyIsoTimestamp = input => {
|
|
39
|
-
const $string = __typia.json.createStringify.string;
|
|
40
|
-
return $string(input);
|
|
41
|
-
};
|
|
42
|
-
export const assertStringifyIsoTimestamp = (input, errorFactory) => { const assert = (input, errorFactory) => {
|
|
43
|
-
const __is = input => {
|
|
44
|
-
return "string" === typeof input;
|
|
45
|
-
};
|
|
46
|
-
if (false === __is(input))
|
|
47
|
-
((input, _path, _exceptionable = true) => {
|
|
48
|
-
const $guard = __typia.json.createAssertStringify.guard;
|
|
49
|
-
return "string" === typeof input || $guard(true, {
|
|
50
|
-
path: _path + "",
|
|
51
|
-
expected: "string",
|
|
52
|
-
value: input
|
|
53
|
-
}, errorFactory);
|
|
54
|
-
})(input, "$input", true);
|
|
55
|
-
return input;
|
|
56
|
-
}; const stringify = input => {
|
|
57
|
-
const $string = __typia.json.createAssertStringify.string;
|
|
58
|
-
return $string(input);
|
|
59
|
-
}; return stringify(assert(input, errorFactory)); };
|
|
1
|
+
export {};
|
package/dist/common/error.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { type AssertionGuard as __AssertionGuard } from "typia";
|
|
2
1
|
export interface NxtError {
|
|
3
2
|
message: string;
|
|
4
3
|
type?: string;
|
|
@@ -11,9 +10,3 @@ export interface NxtError {
|
|
|
11
10
|
cause?: NxtError | null;
|
|
12
11
|
errors?: NxtError[] | null;
|
|
13
12
|
}
|
|
14
|
-
export declare const isNxtError: (input: unknown) => input is NxtError;
|
|
15
|
-
export declare const assertNxtError: (input: unknown) => NxtError;
|
|
16
|
-
export declare const randomNxtError: () => NxtError;
|
|
17
|
-
export declare const assertGuardNxtError: __AssertionGuard<NxtError>;
|
|
18
|
-
export declare const stringifyNxtError: (input: NxtError) => string;
|
|
19
|
-
export declare const assertStringifyNxtError: (input: unknown) => string;
|
package/dist/common/error.js
CHANGED
|
@@ -1,404 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export const isNxtError = input => {
|
|
3
|
-
const $io0 = 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) && $io1(input.headers)) && (undefined === input.data || "object" === typeof input.data && null !== input.data && false === Array.isArray(input.data) && $io2(input.data)) && (null === input.cause || undefined === input.cause || "object" === typeof input.cause && null !== input.cause && $io0(input.cause)) && (null === input.errors || undefined === input.errors || Array.isArray(input.errors) && input.errors.every(elem => "object" === typeof elem && null !== elem && $io0(elem)));
|
|
4
|
-
const $io1 = input => Object.keys(input).every(key => {
|
|
5
|
-
const value = input[key];
|
|
6
|
-
if (undefined === value)
|
|
7
|
-
return true;
|
|
8
|
-
return "string" === typeof value;
|
|
9
|
-
});
|
|
10
|
-
const $io2 = input => true;
|
|
11
|
-
return "object" === typeof input && null !== input && $io0(input);
|
|
12
|
-
};
|
|
13
|
-
export const assertNxtError = (input, errorFactory) => {
|
|
14
|
-
const __is = input => {
|
|
15
|
-
const $io0 = 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) && $io1(input.headers)) && (undefined === input.data || "object" === typeof input.data && null !== input.data && false === Array.isArray(input.data) && $io2(input.data)) && (null === input.cause || undefined === input.cause || "object" === typeof input.cause && null !== input.cause && $io0(input.cause)) && (null === input.errors || undefined === input.errors || Array.isArray(input.errors) && input.errors.every(elem => "object" === typeof elem && null !== elem && $io0(elem)));
|
|
16
|
-
const $io1 = input => Object.keys(input).every(key => {
|
|
17
|
-
const value = input[key];
|
|
18
|
-
if (undefined === value)
|
|
19
|
-
return true;
|
|
20
|
-
return "string" === typeof value;
|
|
21
|
-
});
|
|
22
|
-
const $io2 = input => true;
|
|
23
|
-
return "object" === typeof input && null !== input && $io0(input);
|
|
24
|
-
};
|
|
25
|
-
if (false === __is(input))
|
|
26
|
-
((input, _path, _exceptionable = true) => {
|
|
27
|
-
const $guard = __typia.createAssert.guard;
|
|
28
|
-
const $join = __typia.createAssert.join;
|
|
29
|
-
const $ao0 = (input, _path, _exceptionable = true) => ("string" === typeof input.message || $guard(_exceptionable, {
|
|
30
|
-
path: _path + ".message",
|
|
31
|
-
expected: "string",
|
|
32
|
-
value: input.message
|
|
33
|
-
}, errorFactory)) && (undefined === input.type || "string" === typeof input.type || $guard(_exceptionable, {
|
|
34
|
-
path: _path + ".type",
|
|
35
|
-
expected: "(string | undefined)",
|
|
36
|
-
value: input.type
|
|
37
|
-
}, errorFactory)) && (undefined === input.code || "string" === typeof input.code || $guard(_exceptionable, {
|
|
38
|
-
path: _path + ".code",
|
|
39
|
-
expected: "(string | undefined)",
|
|
40
|
-
value: input.code
|
|
41
|
-
}, errorFactory)) && (undefined === input.exitCode || "number" === typeof input.exitCode || $guard(_exceptionable, {
|
|
42
|
-
path: _path + ".exitCode",
|
|
43
|
-
expected: "(number | undefined)",
|
|
44
|
-
value: input.exitCode
|
|
45
|
-
}, errorFactory)) && (undefined === input.signalCode || "number" === typeof input.signalCode || $guard(_exceptionable, {
|
|
46
|
-
path: _path + ".signalCode",
|
|
47
|
-
expected: "(number | undefined)",
|
|
48
|
-
value: input.signalCode
|
|
49
|
-
}, errorFactory)) && (undefined === input.statusCode || "number" === typeof input.statusCode || $guard(_exceptionable, {
|
|
50
|
-
path: _path + ".statusCode",
|
|
51
|
-
expected: "(number | undefined)",
|
|
52
|
-
value: input.statusCode
|
|
53
|
-
}, errorFactory)) && (undefined === input.headers || ("object" === typeof input.headers && null !== input.headers && false === Array.isArray(input.headers) || $guard(_exceptionable, {
|
|
54
|
-
path: _path + ".headers",
|
|
55
|
-
expected: "(Record<string, string> | undefined)",
|
|
56
|
-
value: input.headers
|
|
57
|
-
}, errorFactory)) && $ao1(input.headers, _path + ".headers", true && _exceptionable) || $guard(_exceptionable, {
|
|
58
|
-
path: _path + ".headers",
|
|
59
|
-
expected: "(Record<string, string> | undefined)",
|
|
60
|
-
value: input.headers
|
|
61
|
-
}, errorFactory)) && (undefined === input.data || ("object" === typeof input.data && null !== input.data && false === Array.isArray(input.data) || $guard(_exceptionable, {
|
|
62
|
-
path: _path + ".data",
|
|
63
|
-
expected: "(object | undefined)",
|
|
64
|
-
value: input.data
|
|
65
|
-
}, errorFactory)) && $ao2(input.data, _path + ".data", true && _exceptionable) || $guard(_exceptionable, {
|
|
66
|
-
path: _path + ".data",
|
|
67
|
-
expected: "(object | undefined)",
|
|
68
|
-
value: input.data
|
|
69
|
-
}, errorFactory)) && (null === input.cause || undefined === input.cause || ("object" === typeof input.cause && null !== input.cause || $guard(_exceptionable, {
|
|
70
|
-
path: _path + ".cause",
|
|
71
|
-
expected: "(NxtError | null | undefined)",
|
|
72
|
-
value: input.cause
|
|
73
|
-
}, errorFactory)) && $ao0(input.cause, _path + ".cause", true && _exceptionable) || $guard(_exceptionable, {
|
|
74
|
-
path: _path + ".cause",
|
|
75
|
-
expected: "(NxtError | null | undefined)",
|
|
76
|
-
value: input.cause
|
|
77
|
-
}, errorFactory)) && (null === input.errors || undefined === input.errors || (Array.isArray(input.errors) || $guard(_exceptionable, {
|
|
78
|
-
path: _path + ".errors",
|
|
79
|
-
expected: "(Array<NxtError> | null | undefined)",
|
|
80
|
-
value: input.errors
|
|
81
|
-
}, errorFactory)) && input.errors.every((elem, _index1) => ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
|
|
82
|
-
path: _path + ".errors[" + _index1 + "]",
|
|
83
|
-
expected: "NxtError",
|
|
84
|
-
value: elem
|
|
85
|
-
}, errorFactory)) && $ao0(elem, _path + ".errors[" + _index1 + "]", true && _exceptionable) || $guard(_exceptionable, {
|
|
86
|
-
path: _path + ".errors[" + _index1 + "]",
|
|
87
|
-
expected: "NxtError",
|
|
88
|
-
value: elem
|
|
89
|
-
}, errorFactory)) || $guard(_exceptionable, {
|
|
90
|
-
path: _path + ".errors",
|
|
91
|
-
expected: "(Array<NxtError> | null | undefined)",
|
|
92
|
-
value: input.errors
|
|
93
|
-
}, errorFactory));
|
|
94
|
-
const $ao1 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every(key => {
|
|
95
|
-
const value = input[key];
|
|
96
|
-
if (undefined === value)
|
|
97
|
-
return true;
|
|
98
|
-
return "string" === typeof value || $guard(_exceptionable, {
|
|
99
|
-
path: _path + $join(key),
|
|
100
|
-
expected: "string",
|
|
101
|
-
value: value
|
|
102
|
-
}, errorFactory);
|
|
103
|
-
});
|
|
104
|
-
const $ao2 = (input, _path, _exceptionable = true) => true;
|
|
105
|
-
return ("object" === typeof input && null !== input || $guard(true, {
|
|
106
|
-
path: _path + "",
|
|
107
|
-
expected: "NxtError",
|
|
108
|
-
value: input
|
|
109
|
-
}, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
|
|
110
|
-
path: _path + "",
|
|
111
|
-
expected: "NxtError",
|
|
112
|
-
value: input
|
|
113
|
-
}, errorFactory);
|
|
114
|
-
})(input, "$input", true);
|
|
115
|
-
return input;
|
|
116
|
-
};
|
|
117
|
-
export const randomNxtError = generator => {
|
|
118
|
-
const $generator = __typia.createRandom.generator;
|
|
119
|
-
const $pick = __typia.createRandom.pick;
|
|
120
|
-
const $ro0 = (_recursive = true, _depth = 0) => ({
|
|
121
|
-
message: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
|
|
122
|
-
type: $pick([
|
|
123
|
-
() => undefined,
|
|
124
|
-
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
|
|
125
|
-
])(),
|
|
126
|
-
code: $pick([
|
|
127
|
-
() => undefined,
|
|
128
|
-
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
|
|
129
|
-
])(),
|
|
130
|
-
exitCode: $pick([
|
|
131
|
-
() => undefined,
|
|
132
|
-
() => (generator?.customs ?? $generator.customs)?.number?.([]) ?? (generator?.number ?? $generator.number)(0, 100)
|
|
133
|
-
])(),
|
|
134
|
-
signalCode: $pick([
|
|
135
|
-
() => undefined,
|
|
136
|
-
() => (generator?.customs ?? $generator.customs)?.number?.([]) ?? (generator?.number ?? $generator.number)(0, 100)
|
|
137
|
-
])(),
|
|
138
|
-
statusCode: $pick([
|
|
139
|
-
() => undefined,
|
|
140
|
-
() => (generator?.customs ?? $generator.customs)?.number?.([]) ?? (generator?.number ?? $generator.number)(0, 100)
|
|
141
|
-
])(),
|
|
142
|
-
headers: $pick([
|
|
143
|
-
() => undefined,
|
|
144
|
-
() => $ro1(true, _recursive ? 1 + _depth : _depth)
|
|
145
|
-
])(),
|
|
146
|
-
data: $pick([
|
|
147
|
-
() => undefined,
|
|
148
|
-
() => $ro2(true, _recursive ? 1 + _depth : _depth)
|
|
149
|
-
])(),
|
|
150
|
-
cause: $pick([
|
|
151
|
-
() => undefined,
|
|
152
|
-
() => null,
|
|
153
|
-
() => $ro0(true, _recursive ? 1 + _depth : _depth)
|
|
154
|
-
])(),
|
|
155
|
-
errors: $pick([
|
|
156
|
-
() => undefined,
|
|
157
|
-
() => null,
|
|
158
|
-
() => _recursive && 5 < _depth ? [] : 5 >= _depth ? (generator?.array ?? $generator.array)(() => $ro0(true, _recursive ? 1 + _depth : _depth)) : []
|
|
159
|
-
])()
|
|
160
|
-
});
|
|
161
|
-
const $ro1 = (_recursive = false, _depth = 0) => {
|
|
162
|
-
const output = {};
|
|
163
|
-
(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));
|
|
164
|
-
return output;
|
|
165
|
-
};
|
|
166
|
-
const $ro2 = (_recursive = false, _depth = 0) => {};
|
|
167
|
-
return $ro0();
|
|
168
|
-
};
|
|
169
|
-
export const assertGuardNxtError = (input, errorFactory) => {
|
|
170
|
-
const __is = input => {
|
|
171
|
-
const $io0 = 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) && $io1(input.headers)) && (undefined === input.data || "object" === typeof input.data && null !== input.data && false === Array.isArray(input.data) && $io2(input.data)) && (null === input.cause || undefined === input.cause || "object" === typeof input.cause && null !== input.cause && $io0(input.cause)) && (null === input.errors || undefined === input.errors || Array.isArray(input.errors) && input.errors.every(elem => "object" === typeof elem && null !== elem && $io0(elem)));
|
|
172
|
-
const $io1 = input => Object.keys(input).every(key => {
|
|
173
|
-
const value = input[key];
|
|
174
|
-
if (undefined === value)
|
|
175
|
-
return true;
|
|
176
|
-
return "string" === typeof value;
|
|
177
|
-
});
|
|
178
|
-
const $io2 = input => true;
|
|
179
|
-
return "object" === typeof input && null !== input && $io0(input);
|
|
180
|
-
};
|
|
181
|
-
if (false === __is(input))
|
|
182
|
-
((input, _path, _exceptionable = true) => {
|
|
183
|
-
const $guard = __typia.createAssertGuard.guard;
|
|
184
|
-
const $join = __typia.createAssertGuard.join;
|
|
185
|
-
const $ao0 = (input, _path, _exceptionable = true) => ("string" === typeof input.message || $guard(_exceptionable, {
|
|
186
|
-
path: _path + ".message",
|
|
187
|
-
expected: "string",
|
|
188
|
-
value: input.message
|
|
189
|
-
}, errorFactory)) && (undefined === input.type || "string" === typeof input.type || $guard(_exceptionable, {
|
|
190
|
-
path: _path + ".type",
|
|
191
|
-
expected: "(string | undefined)",
|
|
192
|
-
value: input.type
|
|
193
|
-
}, errorFactory)) && (undefined === input.code || "string" === typeof input.code || $guard(_exceptionable, {
|
|
194
|
-
path: _path + ".code",
|
|
195
|
-
expected: "(string | undefined)",
|
|
196
|
-
value: input.code
|
|
197
|
-
}, errorFactory)) && (undefined === input.exitCode || "number" === typeof input.exitCode || $guard(_exceptionable, {
|
|
198
|
-
path: _path + ".exitCode",
|
|
199
|
-
expected: "(number | undefined)",
|
|
200
|
-
value: input.exitCode
|
|
201
|
-
}, errorFactory)) && (undefined === input.signalCode || "number" === typeof input.signalCode || $guard(_exceptionable, {
|
|
202
|
-
path: _path + ".signalCode",
|
|
203
|
-
expected: "(number | undefined)",
|
|
204
|
-
value: input.signalCode
|
|
205
|
-
}, errorFactory)) && (undefined === input.statusCode || "number" === typeof input.statusCode || $guard(_exceptionable, {
|
|
206
|
-
path: _path + ".statusCode",
|
|
207
|
-
expected: "(number | undefined)",
|
|
208
|
-
value: input.statusCode
|
|
209
|
-
}, errorFactory)) && (undefined === input.headers || ("object" === typeof input.headers && null !== input.headers && false === Array.isArray(input.headers) || $guard(_exceptionable, {
|
|
210
|
-
path: _path + ".headers",
|
|
211
|
-
expected: "(Record<string, string> | undefined)",
|
|
212
|
-
value: input.headers
|
|
213
|
-
}, errorFactory)) && $ao1(input.headers, _path + ".headers", true && _exceptionable) || $guard(_exceptionable, {
|
|
214
|
-
path: _path + ".headers",
|
|
215
|
-
expected: "(Record<string, string> | undefined)",
|
|
216
|
-
value: input.headers
|
|
217
|
-
}, errorFactory)) && (undefined === input.data || ("object" === typeof input.data && null !== input.data && false === Array.isArray(input.data) || $guard(_exceptionable, {
|
|
218
|
-
path: _path + ".data",
|
|
219
|
-
expected: "(object | undefined)",
|
|
220
|
-
value: input.data
|
|
221
|
-
}, errorFactory)) && $ao2(input.data, _path + ".data", true && _exceptionable) || $guard(_exceptionable, {
|
|
222
|
-
path: _path + ".data",
|
|
223
|
-
expected: "(object | undefined)",
|
|
224
|
-
value: input.data
|
|
225
|
-
}, errorFactory)) && (null === input.cause || undefined === input.cause || ("object" === typeof input.cause && null !== input.cause || $guard(_exceptionable, {
|
|
226
|
-
path: _path + ".cause",
|
|
227
|
-
expected: "(NxtError | null | undefined)",
|
|
228
|
-
value: input.cause
|
|
229
|
-
}, errorFactory)) && $ao0(input.cause, _path + ".cause", true && _exceptionable) || $guard(_exceptionable, {
|
|
230
|
-
path: _path + ".cause",
|
|
231
|
-
expected: "(NxtError | null | undefined)",
|
|
232
|
-
value: input.cause
|
|
233
|
-
}, errorFactory)) && (null === input.errors || undefined === input.errors || (Array.isArray(input.errors) || $guard(_exceptionable, {
|
|
234
|
-
path: _path + ".errors",
|
|
235
|
-
expected: "(Array<NxtError> | null | undefined)",
|
|
236
|
-
value: input.errors
|
|
237
|
-
}, errorFactory)) && input.errors.every((elem, _index1) => ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
|
|
238
|
-
path: _path + ".errors[" + _index1 + "]",
|
|
239
|
-
expected: "NxtError",
|
|
240
|
-
value: elem
|
|
241
|
-
}, errorFactory)) && $ao0(elem, _path + ".errors[" + _index1 + "]", true && _exceptionable) || $guard(_exceptionable, {
|
|
242
|
-
path: _path + ".errors[" + _index1 + "]",
|
|
243
|
-
expected: "NxtError",
|
|
244
|
-
value: elem
|
|
245
|
-
}, errorFactory)) || $guard(_exceptionable, {
|
|
246
|
-
path: _path + ".errors",
|
|
247
|
-
expected: "(Array<NxtError> | null | undefined)",
|
|
248
|
-
value: input.errors
|
|
249
|
-
}, errorFactory));
|
|
250
|
-
const $ao1 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every(key => {
|
|
251
|
-
const value = input[key];
|
|
252
|
-
if (undefined === value)
|
|
253
|
-
return true;
|
|
254
|
-
return "string" === typeof value || $guard(_exceptionable, {
|
|
255
|
-
path: _path + $join(key),
|
|
256
|
-
expected: "string",
|
|
257
|
-
value: value
|
|
258
|
-
}, errorFactory);
|
|
259
|
-
});
|
|
260
|
-
const $ao2 = (input, _path, _exceptionable = true) => true;
|
|
261
|
-
return ("object" === typeof input && null !== input || $guard(true, {
|
|
262
|
-
path: _path + "",
|
|
263
|
-
expected: "NxtError",
|
|
264
|
-
value: input
|
|
265
|
-
}, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
|
|
266
|
-
path: _path + "",
|
|
267
|
-
expected: "NxtError",
|
|
268
|
-
value: input
|
|
269
|
-
}, errorFactory);
|
|
270
|
-
})(input, "$input", true);
|
|
271
|
-
};
|
|
272
|
-
export const stringifyNxtError = input => {
|
|
273
|
-
const $io0 = 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) && $io1(input.headers)) && (undefined === input.data || "object" === typeof input.data && null !== input.data && false === Array.isArray(input.data) && $io2(input.data)) && (null === input.cause || undefined === input.cause || "object" === typeof input.cause && null !== input.cause && $io0(input.cause)) && (null === input.errors || undefined === input.errors || Array.isArray(input.errors) && input.errors.every(elem => "object" === typeof elem && null !== elem && $io0(elem)));
|
|
274
|
-
const $io1 = input => Object.keys(input).every(key => {
|
|
275
|
-
const value = input[key];
|
|
276
|
-
if (undefined === value)
|
|
277
|
-
return true;
|
|
278
|
-
return "string" === typeof value;
|
|
279
|
-
});
|
|
280
|
-
const $io2 = input => true;
|
|
281
|
-
const $string = __typia.json.createStringify.string;
|
|
282
|
-
const $so0 = 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 ? $so1(input.headers) : undefined},`}${undefined === input.data ? "" : `"data":${undefined !== input.data ? "{}" : undefined},`}${undefined === input.cause ? "" : `"cause":${undefined !== input.cause ? null !== input.cause ? $so0(input.cause) : "null" : undefined},`}${undefined === input.errors ? "" : `"errors":${undefined !== input.errors ? null !== input.errors ? `[${input.errors.map(elem => $so0(elem)).join(",")}]` : "null" : undefined},`}"message":${$string(input.message)}}`;
|
|
283
|
-
const $so1 = input => `{${Object.entries(input).map(([key, value]) => { if (undefined === value)
|
|
284
|
-
return ""; return `${JSON.stringify(key)}:${$string(value)}`; }).filter(str => "" !== str).join(",")}}`;
|
|
285
|
-
return $so0(input);
|
|
286
|
-
};
|
|
287
|
-
export const assertStringifyNxtError = (input, errorFactory) => { const assert = (input, errorFactory) => {
|
|
288
|
-
const __is = input => {
|
|
289
|
-
const $io0 = 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) && $io1(input.headers)) && (undefined === input.data || "object" === typeof input.data && null !== input.data && false === Array.isArray(input.data) && $io2(input.data)) && (null === input.cause || undefined === input.cause || "object" === typeof input.cause && null !== input.cause && $io0(input.cause)) && (null === input.errors || undefined === input.errors || Array.isArray(input.errors) && input.errors.every(elem => "object" === typeof elem && null !== elem && $io0(elem)));
|
|
290
|
-
const $io1 = input => Object.keys(input).every(key => {
|
|
291
|
-
const value = input[key];
|
|
292
|
-
if (undefined === value)
|
|
293
|
-
return true;
|
|
294
|
-
return "string" === typeof value;
|
|
295
|
-
});
|
|
296
|
-
const $io2 = input => true;
|
|
297
|
-
return "object" === typeof input && null !== input && $io0(input);
|
|
298
|
-
};
|
|
299
|
-
if (false === __is(input))
|
|
300
|
-
((input, _path, _exceptionable = true) => {
|
|
301
|
-
const $guard = __typia.json.createAssertStringify.guard;
|
|
302
|
-
const $join = __typia.json.createAssertStringify.join;
|
|
303
|
-
const $ao0 = (input, _path, _exceptionable = true) => ("string" === typeof input.message || $guard(_exceptionable, {
|
|
304
|
-
path: _path + ".message",
|
|
305
|
-
expected: "string",
|
|
306
|
-
value: input.message
|
|
307
|
-
}, errorFactory)) && (undefined === input.type || "string" === typeof input.type || $guard(_exceptionable, {
|
|
308
|
-
path: _path + ".type",
|
|
309
|
-
expected: "(string | undefined)",
|
|
310
|
-
value: input.type
|
|
311
|
-
}, errorFactory)) && (undefined === input.code || "string" === typeof input.code || $guard(_exceptionable, {
|
|
312
|
-
path: _path + ".code",
|
|
313
|
-
expected: "(string | undefined)",
|
|
314
|
-
value: input.code
|
|
315
|
-
}, errorFactory)) && (undefined === input.exitCode || "number" === typeof input.exitCode && !Number.isNaN(input.exitCode) || $guard(_exceptionable, {
|
|
316
|
-
path: _path + ".exitCode",
|
|
317
|
-
expected: "(number | undefined)",
|
|
318
|
-
value: input.exitCode
|
|
319
|
-
}, errorFactory)) && (undefined === input.signalCode || "number" === typeof input.signalCode && !Number.isNaN(input.signalCode) || $guard(_exceptionable, {
|
|
320
|
-
path: _path + ".signalCode",
|
|
321
|
-
expected: "(number | undefined)",
|
|
322
|
-
value: input.signalCode
|
|
323
|
-
}, errorFactory)) && (undefined === input.statusCode || "number" === typeof input.statusCode && !Number.isNaN(input.statusCode) || $guard(_exceptionable, {
|
|
324
|
-
path: _path + ".statusCode",
|
|
325
|
-
expected: "(number | undefined)",
|
|
326
|
-
value: input.statusCode
|
|
327
|
-
}, errorFactory)) && (undefined === input.headers || ("object" === typeof input.headers && null !== input.headers && false === Array.isArray(input.headers) || $guard(_exceptionable, {
|
|
328
|
-
path: _path + ".headers",
|
|
329
|
-
expected: "(Record<string, string> | undefined)",
|
|
330
|
-
value: input.headers
|
|
331
|
-
}, errorFactory)) && $ao1(input.headers, _path + ".headers", true && _exceptionable) || $guard(_exceptionable, {
|
|
332
|
-
path: _path + ".headers",
|
|
333
|
-
expected: "(Record<string, string> | undefined)",
|
|
334
|
-
value: input.headers
|
|
335
|
-
}, errorFactory)) && (undefined === input.data || ("object" === typeof input.data && null !== input.data && false === Array.isArray(input.data) || $guard(_exceptionable, {
|
|
336
|
-
path: _path + ".data",
|
|
337
|
-
expected: "(object | undefined)",
|
|
338
|
-
value: input.data
|
|
339
|
-
}, errorFactory)) && $ao2(input.data, _path + ".data", true && _exceptionable) || $guard(_exceptionable, {
|
|
340
|
-
path: _path + ".data",
|
|
341
|
-
expected: "(object | undefined)",
|
|
342
|
-
value: input.data
|
|
343
|
-
}, errorFactory)) && (null === input.cause || undefined === input.cause || ("object" === typeof input.cause && null !== input.cause || $guard(_exceptionable, {
|
|
344
|
-
path: _path + ".cause",
|
|
345
|
-
expected: "(NxtError | null | undefined)",
|
|
346
|
-
value: input.cause
|
|
347
|
-
}, errorFactory)) && $ao0(input.cause, _path + ".cause", true && _exceptionable) || $guard(_exceptionable, {
|
|
348
|
-
path: _path + ".cause",
|
|
349
|
-
expected: "(NxtError | null | undefined)",
|
|
350
|
-
value: input.cause
|
|
351
|
-
}, errorFactory)) && (null === input.errors || undefined === input.errors || (Array.isArray(input.errors) || $guard(_exceptionable, {
|
|
352
|
-
path: _path + ".errors",
|
|
353
|
-
expected: "(Array<NxtError> | null | undefined)",
|
|
354
|
-
value: input.errors
|
|
355
|
-
}, errorFactory)) && input.errors.every((elem, _index1) => ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
|
|
356
|
-
path: _path + ".errors[" + _index1 + "]",
|
|
357
|
-
expected: "NxtError",
|
|
358
|
-
value: elem
|
|
359
|
-
}, errorFactory)) && $ao0(elem, _path + ".errors[" + _index1 + "]", true && _exceptionable) || $guard(_exceptionable, {
|
|
360
|
-
path: _path + ".errors[" + _index1 + "]",
|
|
361
|
-
expected: "NxtError",
|
|
362
|
-
value: elem
|
|
363
|
-
}, errorFactory)) || $guard(_exceptionable, {
|
|
364
|
-
path: _path + ".errors",
|
|
365
|
-
expected: "(Array<NxtError> | null | undefined)",
|
|
366
|
-
value: input.errors
|
|
367
|
-
}, errorFactory));
|
|
368
|
-
const $ao1 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every(key => {
|
|
369
|
-
const value = input[key];
|
|
370
|
-
if (undefined === value)
|
|
371
|
-
return true;
|
|
372
|
-
return "string" === typeof value || $guard(_exceptionable, {
|
|
373
|
-
path: _path + $join(key),
|
|
374
|
-
expected: "string",
|
|
375
|
-
value: value
|
|
376
|
-
}, errorFactory);
|
|
377
|
-
});
|
|
378
|
-
const $ao2 = (input, _path, _exceptionable = true) => true;
|
|
379
|
-
return ("object" === typeof input && null !== input || $guard(true, {
|
|
380
|
-
path: _path + "",
|
|
381
|
-
expected: "NxtError",
|
|
382
|
-
value: input
|
|
383
|
-
}, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
|
|
384
|
-
path: _path + "",
|
|
385
|
-
expected: "NxtError",
|
|
386
|
-
value: input
|
|
387
|
-
}, errorFactory);
|
|
388
|
-
})(input, "$input", true);
|
|
389
|
-
return input;
|
|
390
|
-
}; const stringify = input => {
|
|
391
|
-
const $io0 = 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) && $io1(input.headers)) && (undefined === input.data || "object" === typeof input.data && null !== input.data && false === Array.isArray(input.data) && $io2(input.data)) && (null === input.cause || undefined === input.cause || "object" === typeof input.cause && null !== input.cause && $io0(input.cause)) && (null === input.errors || undefined === input.errors || Array.isArray(input.errors) && input.errors.every(elem => "object" === typeof elem && null !== elem && $io0(elem)));
|
|
392
|
-
const $io1 = input => Object.keys(input).every(key => {
|
|
393
|
-
const value = input[key];
|
|
394
|
-
if (undefined === value)
|
|
395
|
-
return true;
|
|
396
|
-
return "string" === typeof value;
|
|
397
|
-
});
|
|
398
|
-
const $io2 = input => true;
|
|
399
|
-
const $string = __typia.json.createAssertStringify.string;
|
|
400
|
-
const $so0 = 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 ? $so1(input.headers) : undefined},`}${undefined === input.data ? "" : `"data":${undefined !== input.data ? "{}" : undefined},`}${undefined === input.cause ? "" : `"cause":${undefined !== input.cause ? null !== input.cause ? $so0(input.cause) : "null" : undefined},`}${undefined === input.errors ? "" : `"errors":${undefined !== input.errors ? null !== input.errors ? `[${input.errors.map(elem => $so0(elem)).join(",")}]` : "null" : undefined},`}"message":${$string(input.message)}}`;
|
|
401
|
-
const $so1 = input => `{${Object.entries(input).map(([key, value]) => { if (undefined === value)
|
|
402
|
-
return ""; return `${JSON.stringify(key)}:${$string(value)}`; }).filter(str => "" !== str).join(",")}}`;
|
|
403
|
-
return $so0(input);
|
|
404
|
-
}; return stringify(assert(input, errorFactory)); };
|
|
1
|
+
export {};
|
package/dist/common/file.d.ts
CHANGED
|
@@ -1,24 +1,13 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
import { NxtError } from './error.js';
|
|
1
|
+
import { type NxtError } from './error.ts';
|
|
3
2
|
export type FileRef = {
|
|
4
3
|
file?: string;
|
|
5
4
|
offset?: number;
|
|
6
5
|
start?: number;
|
|
7
6
|
end?: number;
|
|
8
7
|
};
|
|
9
|
-
export declare const isFileRef: (input: unknown) => input is FileRef;
|
|
10
8
|
export declare const assertFileRef: (input: unknown) => FileRef;
|
|
11
|
-
export declare const randomFileRef: () => FileRef;
|
|
12
|
-
export declare const assertGuardFileRef: __AssertionGuard<FileRef>;
|
|
13
|
-
export declare const stringifyFileRef: (input: FileRef) => string;
|
|
14
|
-
export declare const assertStringifyFileRef: (input: unknown) => string;
|
|
15
9
|
export type FileRefs = Array<FileRef>;
|
|
16
|
-
export declare const isFileRefs: (input: unknown) => input is FileRefs;
|
|
17
10
|
export declare const assertFileRefs: (input: unknown) => FileRefs;
|
|
18
|
-
export declare const randomFileRefs: () => FileRefs;
|
|
19
|
-
export declare const assertGuardFileRefs: __AssertionGuard<FileRefs>;
|
|
20
|
-
export declare const stringifyFileRefs: (input: FileRefs) => string;
|
|
21
|
-
export declare const assertStringifyFileRefs: (input: unknown) => string;
|
|
22
11
|
export interface File {
|
|
23
12
|
id: string & import('typia').tags.Pattern<'^[0-9A-Za-z~][0-9A-Za-z~._: -]*$'>;
|
|
24
13
|
size: (number & import('typia').tags.Minimum<0> & import('typia').tags.Type<'uint64'>) | null;
|
|
@@ -34,12 +23,7 @@ export interface File {
|
|
|
34
23
|
completed: boolean;
|
|
35
24
|
error: NxtError[] | NxtError | null;
|
|
36
25
|
}
|
|
37
|
-
export declare const isFile: (input: unknown) => input is File;
|
|
38
26
|
export declare const assertFile: (input: unknown) => File;
|
|
39
|
-
export declare const randomFile: () => File;
|
|
40
|
-
export declare const assertGuardFile: __AssertionGuard<File>;
|
|
41
|
-
export declare const stringifyFile: (input: File) => string;
|
|
42
|
-
export declare const assertStringifyFile: (input: unknown) => string;
|
|
43
27
|
export interface FileStats extends File {
|
|
44
28
|
position: (number & import('typia').tags.Minimum<0> & import('typia').tags.Type<'uint64'>) | null;
|
|
45
29
|
uploading: boolean | null;
|
|
@@ -53,9 +37,5 @@ export interface FileStats extends File {
|
|
|
53
37
|
progress?: number & import('typia').tags.Minimum<0> & import('typia').tags.Maximum<1>;
|
|
54
38
|
speed?: number & import('typia').tags.Minimum<0>;
|
|
55
39
|
}
|
|
56
|
-
export declare const isFileStats: (input: unknown) => input is FileStats;
|
|
57
40
|
export declare const assertFileStats: (input: unknown) => FileStats;
|
|
58
|
-
export declare const randomFileStats: () => FileStats;
|
|
59
|
-
export declare const assertGuardFileStats: __AssertionGuard<FileStats>;
|
|
60
41
|
export declare const stringifyFileStats: (input: FileStats) => string;
|
|
61
|
-
export declare const assertStringifyFileStats: (input: unknown) => string;
|