@nxtedition/types 23.0.2 → 23.0.4
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/asset.d.ts +10 -0
- package/dist/asset.js +1 -0
- package/dist/common/clone.d.ts +32 -0
- package/dist/common/clone.js +602 -0
- package/dist/common/date.d.ts +8 -0
- package/dist/common/date.js +59 -0
- package/dist/common/index.d.ts +8 -0
- package/dist/common/index.js +8 -0
- package/dist/common/media.d.ts +8 -0
- package/dist/common/media.js +83 -0
- package/dist/common/nxtpression.d.ts +19 -0
- package/dist/common/nxtpression.js +240 -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/search.d.ts +69 -0
- package/dist/common/search.js +1591 -0
- package/dist/common/settings.d.ts +26 -11
- package/dist/common/settings.js +812 -333
- package/dist/domains/asset.d.ts +172 -49
- package/dist/domains/asset.js +1533 -72
- package/dist/domains/clone.d.ts +14 -0
- package/dist/domains/clone.js +192 -0
- package/dist/domains/connection.d.ts +39 -15
- package/dist/domains/connection.js +621 -174
- package/dist/domains/design.d.ts +24 -0
- package/dist/domains/design.js +303 -0
- package/dist/domains/file.d.ts +17 -0
- package/dist/domains/file.js +233 -0
- package/dist/domains/index.d.ts +19 -1
- package/dist/domains/index.js +9 -0
- package/dist/domains/media.d.ts +42 -2
- package/dist/domains/media.js +1070 -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/published.d.ts +18 -0
- package/dist/domains/published.js +164 -0
- package/dist/domains/render-preset.d.ts +4 -0
- package/dist/domains/render-preset.js +1 -0
- package/dist/domains/revs.d.ts +13 -0
- package/dist/domains/revs.js +125 -0
- package/dist/domains/search.d.ts +3 -0
- package/dist/domains/search.js +62 -13
- package/dist/domains/settings.js +796 -339
- package/dist/domains/storyboard.d.ts +14 -0
- package/dist/domains/storyboard.js +125 -0
- package/dist/domains/user.d.ts +14 -0
- package/dist/domains/user.js +141 -0
- package/dist/index.d.ts +88 -5
- package/dist/index.js +151 -0
- package/dist/rpc.d.ts +8 -13
- package/dist/rpc.js +9 -9
- package/dist/schema.json +1701 -1565
- package/package.json +1 -1
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import __typia from "typia";
|
|
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)); };
|
package/dist/common/index.d.ts
CHANGED
|
@@ -1,9 +1,17 @@
|
|
|
1
1
|
import { type AssertionGuard as __AssertionGuard } from "typia";
|
|
2
2
|
export * from './block.js';
|
|
3
|
+
export * from './clone.js';
|
|
4
|
+
export * from './date.js';
|
|
3
5
|
export * from './file.js';
|
|
4
6
|
export * from './location.js';
|
|
7
|
+
export * from './nxtpression.js';
|
|
5
8
|
export * from './lock.js';
|
|
9
|
+
export * from './media.js';
|
|
10
|
+
export * from './pipeline.js';
|
|
11
|
+
export * from './promoted-tag.js';
|
|
12
|
+
export * from './render-preset.js';
|
|
6
13
|
export * from './rule.js';
|
|
14
|
+
export * from './search.js';
|
|
7
15
|
export * from './settings.js';
|
|
8
16
|
export * from './error.js';
|
|
9
17
|
export interface Message {
|
package/dist/common/index.js
CHANGED
|
@@ -1,9 +1,17 @@
|
|
|
1
1
|
import __typia from "typia";
|
|
2
2
|
export * from './block.js';
|
|
3
|
+
export * from './clone.js';
|
|
4
|
+
export * from './date.js';
|
|
3
5
|
export * from './file.js';
|
|
4
6
|
export * from './location.js';
|
|
7
|
+
export * from './nxtpression.js';
|
|
5
8
|
export * from './lock.js';
|
|
9
|
+
export * from './media.js';
|
|
10
|
+
export * from './pipeline.js';
|
|
11
|
+
export * from './promoted-tag.js';
|
|
12
|
+
export * from './render-preset.js';
|
|
6
13
|
export * from './rule.js';
|
|
14
|
+
export * from './search.js';
|
|
7
15
|
export * from './settings.js';
|
|
8
16
|
export * from './error.js';
|
|
9
17
|
export const isMessage = input => {
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type AssertionGuard as __AssertionGuard } from "typia";
|
|
2
|
+
export type MediaType = "audio" | "video" | "image";
|
|
3
|
+
export declare const isMediaType: (input: unknown) => input is MediaType;
|
|
4
|
+
export declare const assertMediaType: (input: unknown) => MediaType;
|
|
5
|
+
export declare const randomMediaType: () => MediaType;
|
|
6
|
+
export declare const assertGuardMediaType: __AssertionGuard<MediaType>;
|
|
7
|
+
export declare const stringifyMediaType: (input: MediaType) => string;
|
|
8
|
+
export declare const assertStringifyMediaType: (input: unknown) => string;
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import __typia from "typia";
|
|
2
|
+
export const isMediaType = input => {
|
|
3
|
+
return "audio" === input || "video" === input || "image" === input;
|
|
4
|
+
};
|
|
5
|
+
export const assertMediaType = (input, errorFactory) => {
|
|
6
|
+
const __is = input => {
|
|
7
|
+
return "audio" === input || "video" === input || "image" === input;
|
|
8
|
+
};
|
|
9
|
+
if (false === __is(input))
|
|
10
|
+
((input, _path, _exceptionable = true) => {
|
|
11
|
+
const $guard = __typia.createAssert.guard;
|
|
12
|
+
return "audio" === input || "video" === input || "image" === input || $guard(true, {
|
|
13
|
+
path: _path + "",
|
|
14
|
+
expected: "(\"audio\" | \"image\" | \"video\")",
|
|
15
|
+
value: input
|
|
16
|
+
}, errorFactory);
|
|
17
|
+
})(input, "$input", true);
|
|
18
|
+
return input;
|
|
19
|
+
};
|
|
20
|
+
export const randomMediaType = generator => {
|
|
21
|
+
const $pick = __typia.createRandom.pick;
|
|
22
|
+
return $pick([
|
|
23
|
+
() => "audio",
|
|
24
|
+
() => "video",
|
|
25
|
+
() => "image"
|
|
26
|
+
])();
|
|
27
|
+
};
|
|
28
|
+
export const assertGuardMediaType = (input, errorFactory) => {
|
|
29
|
+
const __is = input => {
|
|
30
|
+
return "audio" === input || "video" === input || "image" === input;
|
|
31
|
+
};
|
|
32
|
+
if (false === __is(input))
|
|
33
|
+
((input, _path, _exceptionable = true) => {
|
|
34
|
+
const $guard = __typia.createAssertGuard.guard;
|
|
35
|
+
return "audio" === input || "video" === input || "image" === input || $guard(true, {
|
|
36
|
+
path: _path + "",
|
|
37
|
+
expected: "(\"audio\" | \"image\" | \"video\")",
|
|
38
|
+
value: input
|
|
39
|
+
}, errorFactory);
|
|
40
|
+
})(input, "$input", true);
|
|
41
|
+
};
|
|
42
|
+
export const stringifyMediaType = input => {
|
|
43
|
+
const $string = __typia.json.createStringify.string;
|
|
44
|
+
const $throws = __typia.json.createStringify.throws;
|
|
45
|
+
return (() => {
|
|
46
|
+
if ("string" === typeof input)
|
|
47
|
+
return $string(input);
|
|
48
|
+
if ("string" === typeof input)
|
|
49
|
+
return "\"" + input + "\"";
|
|
50
|
+
$throws({
|
|
51
|
+
expected: "(\"audio\" | \"image\" | \"video\")",
|
|
52
|
+
value: input
|
|
53
|
+
});
|
|
54
|
+
})();
|
|
55
|
+
};
|
|
56
|
+
export const assertStringifyMediaType = (input, errorFactory) => { const assert = (input, errorFactory) => {
|
|
57
|
+
const __is = input => {
|
|
58
|
+
return "audio" === input || "video" === input || "image" === input;
|
|
59
|
+
};
|
|
60
|
+
if (false === __is(input))
|
|
61
|
+
((input, _path, _exceptionable = true) => {
|
|
62
|
+
const $guard = __typia.json.createAssertStringify.guard;
|
|
63
|
+
return "audio" === input || "video" === input || "image" === input || $guard(true, {
|
|
64
|
+
path: _path + "",
|
|
65
|
+
expected: "(\"audio\" | \"image\" | \"video\")",
|
|
66
|
+
value: input
|
|
67
|
+
}, errorFactory);
|
|
68
|
+
})(input, "$input", true);
|
|
69
|
+
return input;
|
|
70
|
+
}; const stringify = input => {
|
|
71
|
+
const $string = __typia.json.createAssertStringify.string;
|
|
72
|
+
const $throws = __typia.json.createAssertStringify.throws;
|
|
73
|
+
return (() => {
|
|
74
|
+
if ("string" === typeof input)
|
|
75
|
+
return $string(input);
|
|
76
|
+
if ("string" === typeof input)
|
|
77
|
+
return "\"" + input + "\"";
|
|
78
|
+
$throws({
|
|
79
|
+
expected: "(\"audio\" | \"image\" | \"video\")",
|
|
80
|
+
value: input
|
|
81
|
+
});
|
|
82
|
+
})();
|
|
83
|
+
}; return stringify(assert(input, errorFactory)); };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { type AssertionGuard as __AssertionGuard } from "typia";
|
|
2
|
+
export type Nxtpression<ReturnValue = string, Context extends object = object> = String & {
|
|
3
|
+
/**
|
|
4
|
+
* TS-HACK: this property doesn't really exist on the nxtpression string,
|
|
5
|
+
* it is only here to make sure the generic Context won't get stripped.
|
|
6
|
+
*/
|
|
7
|
+
__context?: Context;
|
|
8
|
+
/**
|
|
9
|
+
* TS-HACK: this property doesn't really exist on the nxtpression string,
|
|
10
|
+
* it is only here to make sure the generic Context won't get stripped.
|
|
11
|
+
*/
|
|
12
|
+
__returnValue?: ReturnValue;
|
|
13
|
+
};
|
|
14
|
+
export declare const isNxtpression: (input: unknown) => input is Nxtpression<string, object>;
|
|
15
|
+
export declare const assertNxtpression: (input: unknown) => Nxtpression<string, object>;
|
|
16
|
+
export declare const randomNxtpression: () => string;
|
|
17
|
+
export declare const assertGuardNxtpression: __AssertionGuard<Nxtpression>;
|
|
18
|
+
export declare const stringifyNxtpression: (input: Nxtpression<string, object>) => string;
|
|
19
|
+
export declare const assertStringifyNxtpression: (input: unknown) => string;
|
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
import __typia from "typia";
|
|
2
|
+
export const isNxtpression = input => {
|
|
3
|
+
const $io0 = input => "number" === typeof input.length && (undefined === input.__context || "object" === typeof input.__context && null !== input.__context && false === Array.isArray(input.__context) && $io1(input.__context)) && (undefined === input.__returnValue || "string" === typeof input.__returnValue) && Object.keys(input).every(key => {
|
|
4
|
+
if (["length", "__context", "__returnValue"].some(prop => key === prop))
|
|
5
|
+
return true;
|
|
6
|
+
const value = input[key];
|
|
7
|
+
if (undefined === value)
|
|
8
|
+
return true;
|
|
9
|
+
if ("number" === typeof Number(key))
|
|
10
|
+
return "string" === typeof value;
|
|
11
|
+
return true;
|
|
12
|
+
});
|
|
13
|
+
const $io1 = input => true;
|
|
14
|
+
return "object" === typeof input && null !== input && $io0(input);
|
|
15
|
+
};
|
|
16
|
+
export const assertNxtpression = (input, errorFactory) => {
|
|
17
|
+
const __is = input => {
|
|
18
|
+
const $io0 = input => "number" === typeof input.length && (undefined === input.__context || "object" === typeof input.__context && null !== input.__context && false === Array.isArray(input.__context) && $io1(input.__context)) && (undefined === input.__returnValue || "string" === typeof input.__returnValue) && Object.keys(input).every(key => {
|
|
19
|
+
if (["length", "__context", "__returnValue"].some(prop => key === prop))
|
|
20
|
+
return true;
|
|
21
|
+
const value = input[key];
|
|
22
|
+
if (undefined === value)
|
|
23
|
+
return true;
|
|
24
|
+
if ("number" === typeof Number(key))
|
|
25
|
+
return "string" === typeof value;
|
|
26
|
+
return true;
|
|
27
|
+
});
|
|
28
|
+
const $io1 = input => true;
|
|
29
|
+
return "object" === typeof input && null !== input && $io0(input);
|
|
30
|
+
};
|
|
31
|
+
if (false === __is(input))
|
|
32
|
+
((input, _path, _exceptionable = true) => {
|
|
33
|
+
const $guard = __typia.createAssert.guard;
|
|
34
|
+
const $join = __typia.createAssert.join;
|
|
35
|
+
const $ao0 = (input, _path, _exceptionable = true) => ("number" === typeof input.length || $guard(_exceptionable, {
|
|
36
|
+
path: _path + ".length",
|
|
37
|
+
expected: "number",
|
|
38
|
+
value: input.length
|
|
39
|
+
}, errorFactory)) && (undefined === input.__context || ("object" === typeof input.__context && null !== input.__context && false === Array.isArray(input.__context) || $guard(_exceptionable, {
|
|
40
|
+
path: _path + ".__context",
|
|
41
|
+
expected: "(object | undefined)",
|
|
42
|
+
value: input.__context
|
|
43
|
+
}, errorFactory)) && $ao1(input.__context, _path + ".__context", true && _exceptionable) || $guard(_exceptionable, {
|
|
44
|
+
path: _path + ".__context",
|
|
45
|
+
expected: "(object | undefined)",
|
|
46
|
+
value: input.__context
|
|
47
|
+
}, errorFactory)) && (undefined === input.__returnValue || "string" === typeof input.__returnValue || $guard(_exceptionable, {
|
|
48
|
+
path: _path + ".__returnValue",
|
|
49
|
+
expected: "(string | undefined)",
|
|
50
|
+
value: input.__returnValue
|
|
51
|
+
}, errorFactory)) && (false === _exceptionable || Object.keys(input).every(key => {
|
|
52
|
+
if (["length", "__context", "__returnValue"].some(prop => key === prop))
|
|
53
|
+
return true;
|
|
54
|
+
const value = input[key];
|
|
55
|
+
if (undefined === value)
|
|
56
|
+
return true;
|
|
57
|
+
if ("number" === typeof Number(key))
|
|
58
|
+
return "string" === typeof value || $guard(_exceptionable, {
|
|
59
|
+
path: _path + $join(key),
|
|
60
|
+
expected: "string",
|
|
61
|
+
value: value
|
|
62
|
+
}, errorFactory);
|
|
63
|
+
return true;
|
|
64
|
+
}));
|
|
65
|
+
const $ao1 = (input, _path, _exceptionable = true) => true;
|
|
66
|
+
return ("object" === typeof input && null !== input || $guard(true, {
|
|
67
|
+
path: _path + "",
|
|
68
|
+
expected: "Nxtpression<string, object>",
|
|
69
|
+
value: input
|
|
70
|
+
}, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
|
|
71
|
+
path: _path + "",
|
|
72
|
+
expected: "Nxtpression<string, object>",
|
|
73
|
+
value: input
|
|
74
|
+
}, errorFactory);
|
|
75
|
+
})(input, "$input", true);
|
|
76
|
+
return input;
|
|
77
|
+
};
|
|
78
|
+
export const randomNxtpression = generator => {
|
|
79
|
+
const $generator = __typia.createRandom.generator;
|
|
80
|
+
const $pick = __typia.createRandom.pick;
|
|
81
|
+
const $ro0 = (_recursive = false, _depth = 0) => {
|
|
82
|
+
const output = {
|
|
83
|
+
length: (generator?.customs ?? $generator.customs)?.number?.([]) ?? (generator?.number ?? $generator.number)(0, 100),
|
|
84
|
+
__context: $pick([
|
|
85
|
+
() => undefined,
|
|
86
|
+
() => $ro1(_recursive, _recursive ? 1 + _depth : _depth)
|
|
87
|
+
])(),
|
|
88
|
+
__returnValue: $pick([
|
|
89
|
+
() => undefined,
|
|
90
|
+
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
|
|
91
|
+
])()
|
|
92
|
+
};
|
|
93
|
+
(generator?.array ?? $generator.array)(() => output[(generator?.customs ?? $generator.customs)?.number?.([]) ?? (generator?.number ?? $generator.number)(0, 100)] = (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(), (generator?.integer ?? $generator.integer)(0, 3));
|
|
94
|
+
return output;
|
|
95
|
+
};
|
|
96
|
+
const $ro1 = (_recursive = false, _depth = 0) => {};
|
|
97
|
+
return $ro0();
|
|
98
|
+
};
|
|
99
|
+
export const assertGuardNxtpression = (input, errorFactory) => {
|
|
100
|
+
const __is = input => {
|
|
101
|
+
const $io0 = input => "number" === typeof input.length && (undefined === input.__context || "object" === typeof input.__context && null !== input.__context && false === Array.isArray(input.__context) && $io1(input.__context)) && (undefined === input.__returnValue || "string" === typeof input.__returnValue) && Object.keys(input).every(key => {
|
|
102
|
+
if (["length", "__context", "__returnValue"].some(prop => key === prop))
|
|
103
|
+
return true;
|
|
104
|
+
const value = input[key];
|
|
105
|
+
if (undefined === value)
|
|
106
|
+
return true;
|
|
107
|
+
if ("number" === typeof Number(key))
|
|
108
|
+
return "string" === typeof value;
|
|
109
|
+
return true;
|
|
110
|
+
});
|
|
111
|
+
const $io1 = input => true;
|
|
112
|
+
return "object" === typeof input && null !== input && $io0(input);
|
|
113
|
+
};
|
|
114
|
+
if (false === __is(input))
|
|
115
|
+
((input, _path, _exceptionable = true) => {
|
|
116
|
+
const $guard = __typia.createAssertGuard.guard;
|
|
117
|
+
const $join = __typia.createAssertGuard.join;
|
|
118
|
+
const $ao0 = (input, _path, _exceptionable = true) => ("number" === typeof input.length || $guard(_exceptionable, {
|
|
119
|
+
path: _path + ".length",
|
|
120
|
+
expected: "number",
|
|
121
|
+
value: input.length
|
|
122
|
+
}, errorFactory)) && (undefined === input.__context || ("object" === typeof input.__context && null !== input.__context && false === Array.isArray(input.__context) || $guard(_exceptionable, {
|
|
123
|
+
path: _path + ".__context",
|
|
124
|
+
expected: "(object | undefined)",
|
|
125
|
+
value: input.__context
|
|
126
|
+
}, errorFactory)) && $ao1(input.__context, _path + ".__context", true && _exceptionable) || $guard(_exceptionable, {
|
|
127
|
+
path: _path + ".__context",
|
|
128
|
+
expected: "(object | undefined)",
|
|
129
|
+
value: input.__context
|
|
130
|
+
}, errorFactory)) && (undefined === input.__returnValue || "string" === typeof input.__returnValue || $guard(_exceptionable, {
|
|
131
|
+
path: _path + ".__returnValue",
|
|
132
|
+
expected: "(string | undefined)",
|
|
133
|
+
value: input.__returnValue
|
|
134
|
+
}, errorFactory)) && (false === _exceptionable || Object.keys(input).every(key => {
|
|
135
|
+
if (["length", "__context", "__returnValue"].some(prop => key === prop))
|
|
136
|
+
return true;
|
|
137
|
+
const value = input[key];
|
|
138
|
+
if (undefined === value)
|
|
139
|
+
return true;
|
|
140
|
+
if ("number" === typeof Number(key))
|
|
141
|
+
return "string" === typeof value || $guard(_exceptionable, {
|
|
142
|
+
path: _path + $join(key),
|
|
143
|
+
expected: "string",
|
|
144
|
+
value: value
|
|
145
|
+
}, errorFactory);
|
|
146
|
+
return true;
|
|
147
|
+
}));
|
|
148
|
+
const $ao1 = (input, _path, _exceptionable = true) => true;
|
|
149
|
+
return ("object" === typeof input && null !== input || $guard(true, {
|
|
150
|
+
path: _path + "",
|
|
151
|
+
expected: "Nxtpression<string, object>",
|
|
152
|
+
value: input
|
|
153
|
+
}, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
|
|
154
|
+
path: _path + "",
|
|
155
|
+
expected: "Nxtpression<string, object>",
|
|
156
|
+
value: input
|
|
157
|
+
}, errorFactory);
|
|
158
|
+
})(input, "$input", true);
|
|
159
|
+
};
|
|
160
|
+
export const stringifyNxtpression = input => {
|
|
161
|
+
const $io1 = input => true;
|
|
162
|
+
const $string = __typia.json.createStringify.string;
|
|
163
|
+
const $tail = __typia.json.createStringify.tail;
|
|
164
|
+
const $so0 = input => `{${$tail(`${undefined === input.__context ? "" : `"__context":${undefined !== input.__context ? "{}" : undefined},`}${undefined === input.__returnValue ? "" : `"__returnValue":${undefined !== input.__returnValue ? $string(input.__returnValue) : undefined},`}"length":${input.length},${Object.entries(input).map(([key, value]) => { if (undefined === value)
|
|
165
|
+
return ""; if (["__context", "__returnValue", "length"].some(regular => regular === key))
|
|
166
|
+
return ""; if (RegExp(/^[+-]?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?$/).test(key))
|
|
167
|
+
return `${JSON.stringify(key)}:${$string(value)}`; return ""; }).filter(str => "" !== str).join(",")}`)}}`;
|
|
168
|
+
return $so0(input);
|
|
169
|
+
};
|
|
170
|
+
export const assertStringifyNxtpression = (input, errorFactory) => { const assert = (input, errorFactory) => {
|
|
171
|
+
const __is = input => {
|
|
172
|
+
const $io0 = input => "number" === typeof input.length && !Number.isNaN(input.length) && (undefined === input.__context || "object" === typeof input.__context && null !== input.__context && false === Array.isArray(input.__context) && $io1(input.__context)) && (undefined === input.__returnValue || "string" === typeof input.__returnValue) && Object.keys(input).every(key => {
|
|
173
|
+
if (["length", "__context", "__returnValue"].some(prop => key === prop))
|
|
174
|
+
return true;
|
|
175
|
+
const value = input[key];
|
|
176
|
+
if (undefined === value)
|
|
177
|
+
return true;
|
|
178
|
+
if ("number" === typeof Number(key) && !Number.isNaN(Number(key)))
|
|
179
|
+
return "string" === typeof value;
|
|
180
|
+
return true;
|
|
181
|
+
});
|
|
182
|
+
const $io1 = input => true;
|
|
183
|
+
return "object" === typeof input && null !== input && $io0(input);
|
|
184
|
+
};
|
|
185
|
+
if (false === __is(input))
|
|
186
|
+
((input, _path, _exceptionable = true) => {
|
|
187
|
+
const $guard = __typia.json.createAssertStringify.guard;
|
|
188
|
+
const $join = __typia.json.createAssertStringify.join;
|
|
189
|
+
const $ao0 = (input, _path, _exceptionable = true) => ("number" === typeof input.length && !Number.isNaN(input.length) || $guard(_exceptionable, {
|
|
190
|
+
path: _path + ".length",
|
|
191
|
+
expected: "number",
|
|
192
|
+
value: input.length
|
|
193
|
+
}, errorFactory)) && (undefined === input.__context || ("object" === typeof input.__context && null !== input.__context && false === Array.isArray(input.__context) || $guard(_exceptionable, {
|
|
194
|
+
path: _path + ".__context",
|
|
195
|
+
expected: "(object | undefined)",
|
|
196
|
+
value: input.__context
|
|
197
|
+
}, errorFactory)) && $ao1(input.__context, _path + ".__context", true && _exceptionable) || $guard(_exceptionable, {
|
|
198
|
+
path: _path + ".__context",
|
|
199
|
+
expected: "(object | undefined)",
|
|
200
|
+
value: input.__context
|
|
201
|
+
}, errorFactory)) && (undefined === input.__returnValue || "string" === typeof input.__returnValue || $guard(_exceptionable, {
|
|
202
|
+
path: _path + ".__returnValue",
|
|
203
|
+
expected: "(string | undefined)",
|
|
204
|
+
value: input.__returnValue
|
|
205
|
+
}, errorFactory)) && (false === _exceptionable || Object.keys(input).every(key => {
|
|
206
|
+
if (["length", "__context", "__returnValue"].some(prop => key === prop))
|
|
207
|
+
return true;
|
|
208
|
+
const value = input[key];
|
|
209
|
+
if (undefined === value)
|
|
210
|
+
return true;
|
|
211
|
+
if ("number" === typeof Number(key) && !Number.isNaN(Number(key)))
|
|
212
|
+
return "string" === typeof value || $guard(_exceptionable, {
|
|
213
|
+
path: _path + $join(key),
|
|
214
|
+
expected: "string",
|
|
215
|
+
value: value
|
|
216
|
+
}, errorFactory);
|
|
217
|
+
return true;
|
|
218
|
+
}));
|
|
219
|
+
const $ao1 = (input, _path, _exceptionable = true) => true;
|
|
220
|
+
return ("object" === typeof input && null !== input || $guard(true, {
|
|
221
|
+
path: _path + "",
|
|
222
|
+
expected: "Nxtpression<string, object>",
|
|
223
|
+
value: input
|
|
224
|
+
}, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
|
|
225
|
+
path: _path + "",
|
|
226
|
+
expected: "Nxtpression<string, object>",
|
|
227
|
+
value: input
|
|
228
|
+
}, errorFactory);
|
|
229
|
+
})(input, "$input", true);
|
|
230
|
+
return input;
|
|
231
|
+
}; const stringify = input => {
|
|
232
|
+
const $io1 = input => true;
|
|
233
|
+
const $string = __typia.json.createAssertStringify.string;
|
|
234
|
+
const $tail = __typia.json.createAssertStringify.tail;
|
|
235
|
+
const $so0 = input => `{${$tail(`${undefined === input.__context ? "" : `"__context":${undefined !== input.__context ? "{}" : undefined},`}${undefined === input.__returnValue ? "" : `"__returnValue":${undefined !== input.__returnValue ? $string(input.__returnValue) : undefined},`}"length":${input.length},${Object.entries(input).map(([key, value]) => { if (undefined === value)
|
|
236
|
+
return ""; if (["__context", "__returnValue", "length"].some(regular => regular === key))
|
|
237
|
+
return ""; if (RegExp(/^[+-]?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?$/).test(key))
|
|
238
|
+
return `${JSON.stringify(key)}:${$string(value)}`; return ""; }).filter(str => "" !== str).join(",")}`)}}`;
|
|
239
|
+
return $so0(input);
|
|
240
|
+
}; return stringify(assert(input, errorFactory)); };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type AssertionGuard as __AssertionGuard } from "typia";
|
|
2
|
+
export type PipelineSortMode = "default" | "manual" | "az" | "za" | "newest" | "oldest" | "mostrecent" | "leastrecent";
|
|
3
|
+
export declare const isPipelineSortMode: (input: unknown) => input is PipelineSortMode;
|
|
4
|
+
export declare const assertPipelineSortMode: (input: unknown) => PipelineSortMode;
|
|
5
|
+
export declare const randomPipelineSortMode: () => PipelineSortMode;
|
|
6
|
+
export declare const assertGuardPipelineSortMode: __AssertionGuard<PipelineSortMode>;
|
|
7
|
+
export declare const stringifyPipelineSortMode: (input: PipelineSortMode) => string;
|
|
8
|
+
export declare const assertStringifyPipelineSortMode: (input: unknown) => string;
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import __typia from "typia";
|
|
2
|
+
export const isPipelineSortMode = input => {
|
|
3
|
+
return "default" === input || "manual" === input || "az" === input || "za" === input || "newest" === input || "oldest" === input || "mostrecent" === input || "leastrecent" === input;
|
|
4
|
+
};
|
|
5
|
+
export const assertPipelineSortMode = (input, errorFactory) => {
|
|
6
|
+
const __is = input => {
|
|
7
|
+
return "default" === input || "manual" === input || "az" === input || "za" === input || "newest" === input || "oldest" === input || "mostrecent" === input || "leastrecent" === input;
|
|
8
|
+
};
|
|
9
|
+
if (false === __is(input))
|
|
10
|
+
((input, _path, _exceptionable = true) => {
|
|
11
|
+
const $guard = __typia.createAssert.guard;
|
|
12
|
+
return "default" === input || "manual" === input || "az" === input || "za" === input || "newest" === input || "oldest" === input || "mostrecent" === input || "leastrecent" === input || $guard(true, {
|
|
13
|
+
path: _path + "",
|
|
14
|
+
expected: "(\"az\" | \"default\" | \"leastrecent\" | \"manual\" | \"mostrecent\" | \"newest\" | \"oldest\" | \"za\")",
|
|
15
|
+
value: input
|
|
16
|
+
}, errorFactory);
|
|
17
|
+
})(input, "$input", true);
|
|
18
|
+
return input;
|
|
19
|
+
};
|
|
20
|
+
export const randomPipelineSortMode = generator => {
|
|
21
|
+
const $pick = __typia.createRandom.pick;
|
|
22
|
+
return $pick([
|
|
23
|
+
() => "default",
|
|
24
|
+
() => "manual",
|
|
25
|
+
() => "az",
|
|
26
|
+
() => "za",
|
|
27
|
+
() => "newest",
|
|
28
|
+
() => "oldest",
|
|
29
|
+
() => "mostrecent",
|
|
30
|
+
() => "leastrecent"
|
|
31
|
+
])();
|
|
32
|
+
};
|
|
33
|
+
export const assertGuardPipelineSortMode = (input, errorFactory) => {
|
|
34
|
+
const __is = input => {
|
|
35
|
+
return "default" === input || "manual" === input || "az" === input || "za" === input || "newest" === input || "oldest" === input || "mostrecent" === input || "leastrecent" === input;
|
|
36
|
+
};
|
|
37
|
+
if (false === __is(input))
|
|
38
|
+
((input, _path, _exceptionable = true) => {
|
|
39
|
+
const $guard = __typia.createAssertGuard.guard;
|
|
40
|
+
return "default" === input || "manual" === input || "az" === input || "za" === input || "newest" === input || "oldest" === input || "mostrecent" === input || "leastrecent" === input || $guard(true, {
|
|
41
|
+
path: _path + "",
|
|
42
|
+
expected: "(\"az\" | \"default\" | \"leastrecent\" | \"manual\" | \"mostrecent\" | \"newest\" | \"oldest\" | \"za\")",
|
|
43
|
+
value: input
|
|
44
|
+
}, errorFactory);
|
|
45
|
+
})(input, "$input", true);
|
|
46
|
+
};
|
|
47
|
+
export const stringifyPipelineSortMode = input => {
|
|
48
|
+
const $string = __typia.json.createStringify.string;
|
|
49
|
+
const $throws = __typia.json.createStringify.throws;
|
|
50
|
+
return (() => {
|
|
51
|
+
if ("string" === typeof input)
|
|
52
|
+
return $string(input);
|
|
53
|
+
if ("string" === typeof input)
|
|
54
|
+
return "\"" + input + "\"";
|
|
55
|
+
$throws({
|
|
56
|
+
expected: "(\"az\" | \"default\" | \"leastrecent\" | \"manual\" | \"mostrecent\" | \"newest\" | \"oldest\" | \"za\")",
|
|
57
|
+
value: input
|
|
58
|
+
});
|
|
59
|
+
})();
|
|
60
|
+
};
|
|
61
|
+
export const assertStringifyPipelineSortMode = (input, errorFactory) => { const assert = (input, errorFactory) => {
|
|
62
|
+
const __is = input => {
|
|
63
|
+
return "default" === input || "manual" === input || "az" === input || "za" === input || "newest" === input || "oldest" === input || "mostrecent" === input || "leastrecent" === input;
|
|
64
|
+
};
|
|
65
|
+
if (false === __is(input))
|
|
66
|
+
((input, _path, _exceptionable = true) => {
|
|
67
|
+
const $guard = __typia.json.createAssertStringify.guard;
|
|
68
|
+
return "default" === input || "manual" === input || "az" === input || "za" === input || "newest" === input || "oldest" === input || "mostrecent" === input || "leastrecent" === input || $guard(true, {
|
|
69
|
+
path: _path + "",
|
|
70
|
+
expected: "(\"az\" | \"default\" | \"leastrecent\" | \"manual\" | \"mostrecent\" | \"newest\" | \"oldest\" | \"za\")",
|
|
71
|
+
value: input
|
|
72
|
+
}, errorFactory);
|
|
73
|
+
})(input, "$input", true);
|
|
74
|
+
return input;
|
|
75
|
+
}; const stringify = input => {
|
|
76
|
+
const $string = __typia.json.createAssertStringify.string;
|
|
77
|
+
const $throws = __typia.json.createAssertStringify.throws;
|
|
78
|
+
return (() => {
|
|
79
|
+
if ("string" === typeof input)
|
|
80
|
+
return $string(input);
|
|
81
|
+
if ("string" === typeof input)
|
|
82
|
+
return "\"" + input + "\"";
|
|
83
|
+
$throws({
|
|
84
|
+
expected: "(\"az\" | \"default\" | \"leastrecent\" | \"manual\" | \"mostrecent\" | \"newest\" | \"oldest\" | \"za\")",
|
|
85
|
+
value: input
|
|
86
|
+
});
|
|
87
|
+
})();
|
|
88
|
+
}; return stringify(assert(input, errorFactory)); };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type AssertionGuard as __AssertionGuard } from "typia";
|
|
2
|
+
export interface PromotedTag {
|
|
3
|
+
name: string | null;
|
|
4
|
+
icon: string | null;
|
|
5
|
+
color: string | null;
|
|
6
|
+
description: string | null;
|
|
7
|
+
}
|
|
8
|
+
export declare const isPromotedTag: (input: unknown) => input is PromotedTag;
|
|
9
|
+
export declare const assertPromotedTag: (input: unknown) => PromotedTag;
|
|
10
|
+
export declare const randomPromotedTag: () => PromotedTag;
|
|
11
|
+
export declare const assertGuardPromotedTag: __AssertionGuard<PromotedTag>;
|
|
12
|
+
export declare const stringifyPromotedTag: (input: PromotedTag) => string;
|
|
13
|
+
export declare const assertStringifyPromotedTag: (input: unknown) => string;
|