@nxtedition/types 23.0.22 → 23.0.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/common/index.d.ts +3 -0
- package/dist/common/index.js +3 -0
- package/dist/common/nxtpression.d.ts +3 -3
- package/dist/common/nxtpression.js +39 -49
- package/dist/common/render-preset.d.ts +12 -24
- package/dist/common/render-preset.js +735 -257
- package/dist/common/render-profile.d.ts +28 -0
- package/dist/common/render-profile.js +726 -0
- package/dist/common/render-query.d.ts +18 -0
- package/dist/common/render-query.js +1093 -0
- package/dist/common/render-scene.d.ts +38 -0
- package/dist/common/render-scene.js +1116 -0
- package/dist/domains/file.d.ts +9 -1
- package/dist/domains/file.js +1258 -0
- package/dist/domains/index.d.ts +3 -1
- package/dist/domains/index.js +1 -0
- package/dist/domains/media.d.ts +6 -27
- package/dist/domains/media.js +401 -128
- package/dist/domains/panel.js +218 -675
- package/dist/domains/render-preset.d.ts +2 -2
- package/dist/domains/render.d.ts +44 -0
- package/dist/domains/render.js +1273 -0
- package/dist/index.js +16 -12
- package/dist/schema.json +952 -120
- package/package.json +1 -1
|
@@ -1,45 +1,95 @@
|
|
|
1
1
|
import __typia from "typia";
|
|
2
|
-
export const
|
|
3
|
-
const $io0 = input =>
|
|
4
|
-
const $io1 = input =>
|
|
5
|
-
|
|
2
|
+
export const isRenderPresetObject = input => {
|
|
3
|
+
const $io0 = input => "string" === typeof input.type && (null !== input.profile && undefined !== input.profile && ("string" === typeof input.profile || (Array.isArray(input.profile) && input.profile.every(elem => null !== elem && undefined !== elem && ("string" === typeof elem || "object" === typeof elem && null !== elem && $io1(elem))) || "object" === typeof input.profile && null !== input.profile && $io1(input.profile))));
|
|
4
|
+
const $io1 = input => "string" === typeof input.format && (undefined === input.transcribe || "object" === typeof input.transcribe && null !== input.transcribe && $io2(input.transcribe)) && (undefined === input.translate || "object" === typeof input.translate && null !== input.translate && $io3(input.translate)) && (undefined === input.audio || "object" === typeof input.audio && null !== input.audio && false === Array.isArray(input.audio) && $io4(input.audio)) && true && (undefined === input.pick || Array.isArray(input.pick) && input.pick.every(elem => "string" === typeof elem));
|
|
5
|
+
const $io2 = input => "string" === typeof input.engine;
|
|
6
|
+
const $io3 = input => "string" === typeof input.language;
|
|
7
|
+
const $io4 = input => undefined === input.pan || "string" === typeof input.pan;
|
|
8
|
+
return "object" === typeof input && null !== input && $io0(input);
|
|
6
9
|
};
|
|
7
|
-
export const
|
|
10
|
+
export const assertRenderPresetObject = (input, errorFactory) => {
|
|
8
11
|
const __is = input => {
|
|
9
|
-
const $io0 = input =>
|
|
10
|
-
const $io1 = input =>
|
|
11
|
-
|
|
12
|
+
const $io0 = input => "string" === typeof input.type && (null !== input.profile && undefined !== input.profile && ("string" === typeof input.profile || (Array.isArray(input.profile) && input.profile.every(elem => null !== elem && undefined !== elem && ("string" === typeof elem || "object" === typeof elem && null !== elem && $io1(elem))) || "object" === typeof input.profile && null !== input.profile && $io1(input.profile))));
|
|
13
|
+
const $io1 = input => "string" === typeof input.format && (undefined === input.transcribe || "object" === typeof input.transcribe && null !== input.transcribe && $io2(input.transcribe)) && (undefined === input.translate || "object" === typeof input.translate && null !== input.translate && $io3(input.translate)) && (undefined === input.audio || "object" === typeof input.audio && null !== input.audio && false === Array.isArray(input.audio) && $io4(input.audio)) && true && (undefined === input.pick || Array.isArray(input.pick) && input.pick.every(elem => "string" === typeof elem));
|
|
14
|
+
const $io2 = input => "string" === typeof input.engine;
|
|
15
|
+
const $io3 = input => "string" === typeof input.language;
|
|
16
|
+
const $io4 = input => undefined === input.pan || "string" === typeof input.pan;
|
|
17
|
+
return "object" === typeof input && null !== input && $io0(input);
|
|
12
18
|
};
|
|
13
19
|
if (false === __is(input))
|
|
14
20
|
((input, _path, _exceptionable = true) => {
|
|
15
21
|
const $guard = __typia.createAssert.guard;
|
|
16
|
-
const $ao0 = (input, _path, _exceptionable = true) => (
|
|
22
|
+
const $ao0 = (input, _path, _exceptionable = true) => ("string" === typeof input.type || $guard(_exceptionable, {
|
|
17
23
|
path: _path + ".type",
|
|
18
|
-
expected: "
|
|
24
|
+
expected: "string",
|
|
19
25
|
value: input.type
|
|
20
|
-
}, errorFactory)) &&
|
|
26
|
+
}, errorFactory)) && ((null !== input.profile || $guard(_exceptionable, {
|
|
21
27
|
path: _path + ".profile",
|
|
22
|
-
expected: "(
|
|
28
|
+
expected: "(Array<string | RenderProfileObject> | RenderProfileObject | string)",
|
|
23
29
|
value: input.profile
|
|
24
|
-
}, errorFactory)) && (undefined
|
|
30
|
+
}, errorFactory)) && (undefined !== input.profile || $guard(_exceptionable, {
|
|
25
31
|
path: _path + ".profile",
|
|
26
|
-
expected: "(
|
|
32
|
+
expected: "(Array<string | RenderProfileObject> | RenderProfileObject | string)",
|
|
27
33
|
value: input.profile
|
|
28
|
-
}, errorFactory)) &&
|
|
34
|
+
}, errorFactory)) && ("string" === typeof input.profile || (Array.isArray(input.profile) && input.profile.every((elem, _index1) => (null !== elem || $guard(_exceptionable, {
|
|
35
|
+
path: _path + ".profile[" + _index1 + "]",
|
|
36
|
+
expected: "(RenderProfileObject | string)",
|
|
37
|
+
value: elem
|
|
38
|
+
}, errorFactory)) && (undefined !== elem || $guard(_exceptionable, {
|
|
39
|
+
path: _path + ".profile[" + _index1 + "]",
|
|
40
|
+
expected: "(RenderProfileObject | string)",
|
|
41
|
+
value: elem
|
|
42
|
+
}, errorFactory)) && ("string" === typeof elem || ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
|
|
43
|
+
path: _path + ".profile[" + _index1 + "]",
|
|
44
|
+
expected: "(RenderProfileObject | string)",
|
|
45
|
+
value: elem
|
|
46
|
+
}, errorFactory)) && $ao1(elem, _path + ".profile[" + _index1 + "]", true && _exceptionable) || $guard(_exceptionable, {
|
|
47
|
+
path: _path + ".profile[" + _index1 + "]",
|
|
48
|
+
expected: "(RenderProfileObject | string)",
|
|
49
|
+
value: elem
|
|
50
|
+
}, errorFactory))) || "object" === typeof input.profile && null !== input.profile && $ao1(input.profile, _path + ".profile", true && _exceptionable) || $guard(_exceptionable, {
|
|
29
51
|
path: _path + ".profile",
|
|
30
|
-
expected: "(
|
|
52
|
+
expected: "(Array<string | RenderProfileObject> | RenderProfileObject | string)",
|
|
53
|
+
value: input.profile
|
|
54
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
|
55
|
+
path: _path + ".profile",
|
|
56
|
+
expected: "(Array<string | RenderProfileObject> | RenderProfileObject | string)",
|
|
31
57
|
value: input.profile
|
|
32
58
|
}, errorFactory)));
|
|
33
|
-
const $ao1 = (input, _path, _exceptionable = true) => ("
|
|
59
|
+
const $ao1 = (input, _path, _exceptionable = true) => ("string" === typeof input.format || $guard(_exceptionable, {
|
|
34
60
|
path: _path + ".format",
|
|
35
|
-
expected: "
|
|
61
|
+
expected: "string",
|
|
36
62
|
value: input.format
|
|
37
|
-
}, errorFactory)) &&
|
|
63
|
+
}, errorFactory)) && (undefined === input.transcribe || ("object" === typeof input.transcribe && null !== input.transcribe || $guard(_exceptionable, {
|
|
64
|
+
path: _path + ".transcribe",
|
|
65
|
+
expected: "(__type | undefined)",
|
|
66
|
+
value: input.transcribe
|
|
67
|
+
}, errorFactory)) && $ao2(input.transcribe, _path + ".transcribe", true && _exceptionable) || $guard(_exceptionable, {
|
|
68
|
+
path: _path + ".transcribe",
|
|
69
|
+
expected: "(__type | undefined)",
|
|
70
|
+
value: input.transcribe
|
|
71
|
+
}, errorFactory)) && (undefined === input.translate || ("object" === typeof input.translate && null !== input.translate || $guard(_exceptionable, {
|
|
72
|
+
path: _path + ".translate",
|
|
73
|
+
expected: "(__type.o1 | undefined)",
|
|
74
|
+
value: input.translate
|
|
75
|
+
}, errorFactory)) && $ao3(input.translate, _path + ".translate", true && _exceptionable) || $guard(_exceptionable, {
|
|
76
|
+
path: _path + ".translate",
|
|
77
|
+
expected: "(__type.o1 | undefined)",
|
|
78
|
+
value: input.translate
|
|
79
|
+
}, errorFactory)) && (undefined === input.audio || ("object" === typeof input.audio && null !== input.audio && false === Array.isArray(input.audio) || $guard(_exceptionable, {
|
|
80
|
+
path: _path + ".audio",
|
|
81
|
+
expected: "(__type.o2 | undefined)",
|
|
82
|
+
value: input.audio
|
|
83
|
+
}, errorFactory)) && $ao4(input.audio, _path + ".audio", true && _exceptionable) || $guard(_exceptionable, {
|
|
84
|
+
path: _path + ".audio",
|
|
85
|
+
expected: "(__type.o2 | undefined)",
|
|
86
|
+
value: input.audio
|
|
87
|
+
}, errorFactory)) && true && (undefined === input.pick || (Array.isArray(input.pick) || $guard(_exceptionable, {
|
|
38
88
|
path: _path + ".pick",
|
|
39
89
|
expected: "(Array<string> | undefined)",
|
|
40
90
|
value: input.pick
|
|
41
|
-
}, errorFactory)) && input.pick.every((elem,
|
|
42
|
-
path: _path + ".pick[" +
|
|
91
|
+
}, errorFactory)) && input.pick.every((elem, _index2) => "string" === typeof elem || $guard(_exceptionable, {
|
|
92
|
+
path: _path + ".pick[" + _index2 + "]",
|
|
43
93
|
expected: "string",
|
|
44
94
|
value: elem
|
|
45
95
|
}, errorFactory)) || $guard(_exceptionable, {
|
|
@@ -47,48 +97,60 @@ export const assertRenderPreset = (input, errorFactory) => {
|
|
|
47
97
|
expected: "(Array<string> | undefined)",
|
|
48
98
|
value: input.pick
|
|
49
99
|
}, errorFactory));
|
|
50
|
-
|
|
100
|
+
const $ao2 = (input, _path, _exceptionable = true) => "string" === typeof input.engine || $guard(_exceptionable, {
|
|
101
|
+
path: _path + ".engine",
|
|
102
|
+
expected: "string",
|
|
103
|
+
value: input.engine
|
|
104
|
+
}, errorFactory);
|
|
105
|
+
const $ao3 = (input, _path, _exceptionable = true) => "string" === typeof input.language || $guard(_exceptionable, {
|
|
106
|
+
path: _path + ".language",
|
|
107
|
+
expected: "string",
|
|
108
|
+
value: input.language
|
|
109
|
+
}, errorFactory);
|
|
110
|
+
const $ao4 = (input, _path, _exceptionable = true) => undefined === input.pan || "string" === typeof input.pan || $guard(_exceptionable, {
|
|
111
|
+
path: _path + ".pan",
|
|
112
|
+
expected: "(string | undefined)",
|
|
113
|
+
value: input.pan
|
|
114
|
+
}, errorFactory);
|
|
115
|
+
return ("object" === typeof input && null !== input || $guard(true, {
|
|
51
116
|
path: _path + "",
|
|
52
|
-
expected: "
|
|
117
|
+
expected: "RenderPresetObject",
|
|
53
118
|
value: input
|
|
54
119
|
}, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
|
|
55
120
|
path: _path + "",
|
|
56
|
-
expected: "
|
|
121
|
+
expected: "RenderPresetObject",
|
|
57
122
|
value: input
|
|
58
123
|
}, errorFactory);
|
|
59
124
|
})(input, "$input", true);
|
|
60
125
|
return input;
|
|
61
126
|
};
|
|
62
|
-
export const
|
|
127
|
+
export const randomRenderPresetObject = generator => {
|
|
63
128
|
const $generator = __typia.createRandom.generator;
|
|
64
129
|
const $pick = __typia.createRandom.pick;
|
|
65
130
|
const $ro0 = (_recursive = false, _depth = 0) => ({
|
|
66
|
-
type: $
|
|
67
|
-
() => undefined,
|
|
68
|
-
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
|
|
69
|
-
])(),
|
|
70
|
-
description: $pick([
|
|
71
|
-
() => "any type used...",
|
|
72
|
-
() => undefined
|
|
73
|
-
])(),
|
|
131
|
+
type: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
|
|
74
132
|
profile: $pick([
|
|
75
|
-
() => undefined,
|
|
76
133
|
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
|
|
134
|
+
() => (generator?.array ?? $generator.array)(() => $pick([
|
|
135
|
+
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
|
|
136
|
+
() => $ro1(_recursive, _recursive ? 1 + _depth : _depth)
|
|
137
|
+
])()),
|
|
77
138
|
() => $ro1(_recursive, _recursive ? 1 + _depth : _depth)
|
|
78
139
|
])()
|
|
79
140
|
});
|
|
80
141
|
const $ro1 = (_recursive = false, _depth = 0) => ({
|
|
81
|
-
format: $
|
|
82
|
-
() => "png",
|
|
83
|
-
() => "mp4"
|
|
84
|
-
])(),
|
|
142
|
+
format: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
|
|
85
143
|
transcribe: $pick([
|
|
86
|
-
() =>
|
|
87
|
-
() =>
|
|
144
|
+
() => undefined,
|
|
145
|
+
() => $ro2(_recursive, _recursive ? 1 + _depth : _depth)
|
|
146
|
+
])(),
|
|
147
|
+
translate: $pick([
|
|
148
|
+
() => undefined,
|
|
149
|
+
() => $ro3(_recursive, _recursive ? 1 + _depth : _depth)
|
|
88
150
|
])(),
|
|
89
151
|
audio: $pick([
|
|
90
|
-
() =>
|
|
91
|
-
() =>
|
|
152
|
+
() => undefined,
|
|
153
|
+
() => $ro4(_recursive, _recursive ? 1 + _depth : _depth)
|
|
92
154
|
])(),
|
|
93
155
|
video: $pick([
|
|
94
156
|
() => "any type used...",
|
|
@@ -99,44 +161,103 @@ export const randomRenderPreset = generator => {
|
|
|
99
161
|
() => (generator?.array ?? $generator.array)(() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)())
|
|
100
162
|
])()
|
|
101
163
|
});
|
|
164
|
+
const $ro2 = (_recursive = false, _depth = 0) => ({
|
|
165
|
+
engine: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
|
|
166
|
+
});
|
|
167
|
+
const $ro3 = (_recursive = false, _depth = 0) => ({
|
|
168
|
+
language: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
|
|
169
|
+
});
|
|
170
|
+
const $ro4 = (_recursive = false, _depth = 0) => ({
|
|
171
|
+
pan: $pick([
|
|
172
|
+
() => undefined,
|
|
173
|
+
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
|
|
174
|
+
])()
|
|
175
|
+
});
|
|
102
176
|
return $ro0();
|
|
103
177
|
};
|
|
104
|
-
export const
|
|
178
|
+
export const assertGuardRenderPresetObject = (input, errorFactory) => {
|
|
105
179
|
const __is = input => {
|
|
106
|
-
const $io0 = input =>
|
|
107
|
-
const $io1 = input =>
|
|
108
|
-
|
|
180
|
+
const $io0 = input => "string" === typeof input.type && (null !== input.profile && undefined !== input.profile && ("string" === typeof input.profile || (Array.isArray(input.profile) && input.profile.every(elem => null !== elem && undefined !== elem && ("string" === typeof elem || "object" === typeof elem && null !== elem && $io1(elem))) || "object" === typeof input.profile && null !== input.profile && $io1(input.profile))));
|
|
181
|
+
const $io1 = input => "string" === typeof input.format && (undefined === input.transcribe || "object" === typeof input.transcribe && null !== input.transcribe && $io2(input.transcribe)) && (undefined === input.translate || "object" === typeof input.translate && null !== input.translate && $io3(input.translate)) && (undefined === input.audio || "object" === typeof input.audio && null !== input.audio && false === Array.isArray(input.audio) && $io4(input.audio)) && true && (undefined === input.pick || Array.isArray(input.pick) && input.pick.every(elem => "string" === typeof elem));
|
|
182
|
+
const $io2 = input => "string" === typeof input.engine;
|
|
183
|
+
const $io3 = input => "string" === typeof input.language;
|
|
184
|
+
const $io4 = input => undefined === input.pan || "string" === typeof input.pan;
|
|
185
|
+
return "object" === typeof input && null !== input && $io0(input);
|
|
109
186
|
};
|
|
110
187
|
if (false === __is(input))
|
|
111
188
|
((input, _path, _exceptionable = true) => {
|
|
112
189
|
const $guard = __typia.createAssertGuard.guard;
|
|
113
|
-
const $ao0 = (input, _path, _exceptionable = true) => (
|
|
190
|
+
const $ao0 = (input, _path, _exceptionable = true) => ("string" === typeof input.type || $guard(_exceptionable, {
|
|
114
191
|
path: _path + ".type",
|
|
115
|
-
expected: "
|
|
192
|
+
expected: "string",
|
|
116
193
|
value: input.type
|
|
117
|
-
}, errorFactory)) &&
|
|
194
|
+
}, errorFactory)) && ((null !== input.profile || $guard(_exceptionable, {
|
|
118
195
|
path: _path + ".profile",
|
|
119
|
-
expected: "(
|
|
196
|
+
expected: "(Array<string | RenderProfileObject> | RenderProfileObject | string)",
|
|
120
197
|
value: input.profile
|
|
121
|
-
}, errorFactory)) && (undefined
|
|
198
|
+
}, errorFactory)) && (undefined !== input.profile || $guard(_exceptionable, {
|
|
122
199
|
path: _path + ".profile",
|
|
123
|
-
expected: "(
|
|
200
|
+
expected: "(Array<string | RenderProfileObject> | RenderProfileObject | string)",
|
|
124
201
|
value: input.profile
|
|
125
|
-
}, errorFactory)) &&
|
|
202
|
+
}, errorFactory)) && ("string" === typeof input.profile || (Array.isArray(input.profile) && input.profile.every((elem, _index1) => (null !== elem || $guard(_exceptionable, {
|
|
203
|
+
path: _path + ".profile[" + _index1 + "]",
|
|
204
|
+
expected: "(RenderProfileObject | string)",
|
|
205
|
+
value: elem
|
|
206
|
+
}, errorFactory)) && (undefined !== elem || $guard(_exceptionable, {
|
|
207
|
+
path: _path + ".profile[" + _index1 + "]",
|
|
208
|
+
expected: "(RenderProfileObject | string)",
|
|
209
|
+
value: elem
|
|
210
|
+
}, errorFactory)) && ("string" === typeof elem || ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
|
|
211
|
+
path: _path + ".profile[" + _index1 + "]",
|
|
212
|
+
expected: "(RenderProfileObject | string)",
|
|
213
|
+
value: elem
|
|
214
|
+
}, errorFactory)) && $ao1(elem, _path + ".profile[" + _index1 + "]", true && _exceptionable) || $guard(_exceptionable, {
|
|
215
|
+
path: _path + ".profile[" + _index1 + "]",
|
|
216
|
+
expected: "(RenderProfileObject | string)",
|
|
217
|
+
value: elem
|
|
218
|
+
}, errorFactory))) || "object" === typeof input.profile && null !== input.profile && $ao1(input.profile, _path + ".profile", true && _exceptionable) || $guard(_exceptionable, {
|
|
126
219
|
path: _path + ".profile",
|
|
127
|
-
expected: "(
|
|
220
|
+
expected: "(Array<string | RenderProfileObject> | RenderProfileObject | string)",
|
|
221
|
+
value: input.profile
|
|
222
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
|
223
|
+
path: _path + ".profile",
|
|
224
|
+
expected: "(Array<string | RenderProfileObject> | RenderProfileObject | string)",
|
|
128
225
|
value: input.profile
|
|
129
226
|
}, errorFactory)));
|
|
130
|
-
const $ao1 = (input, _path, _exceptionable = true) => ("
|
|
227
|
+
const $ao1 = (input, _path, _exceptionable = true) => ("string" === typeof input.format || $guard(_exceptionable, {
|
|
131
228
|
path: _path + ".format",
|
|
132
|
-
expected: "
|
|
229
|
+
expected: "string",
|
|
133
230
|
value: input.format
|
|
134
|
-
}, errorFactory)) &&
|
|
231
|
+
}, errorFactory)) && (undefined === input.transcribe || ("object" === typeof input.transcribe && null !== input.transcribe || $guard(_exceptionable, {
|
|
232
|
+
path: _path + ".transcribe",
|
|
233
|
+
expected: "(__type | undefined)",
|
|
234
|
+
value: input.transcribe
|
|
235
|
+
}, errorFactory)) && $ao2(input.transcribe, _path + ".transcribe", true && _exceptionable) || $guard(_exceptionable, {
|
|
236
|
+
path: _path + ".transcribe",
|
|
237
|
+
expected: "(__type | undefined)",
|
|
238
|
+
value: input.transcribe
|
|
239
|
+
}, errorFactory)) && (undefined === input.translate || ("object" === typeof input.translate && null !== input.translate || $guard(_exceptionable, {
|
|
240
|
+
path: _path + ".translate",
|
|
241
|
+
expected: "(__type.o1 | undefined)",
|
|
242
|
+
value: input.translate
|
|
243
|
+
}, errorFactory)) && $ao3(input.translate, _path + ".translate", true && _exceptionable) || $guard(_exceptionable, {
|
|
244
|
+
path: _path + ".translate",
|
|
245
|
+
expected: "(__type.o1 | undefined)",
|
|
246
|
+
value: input.translate
|
|
247
|
+
}, errorFactory)) && (undefined === input.audio || ("object" === typeof input.audio && null !== input.audio && false === Array.isArray(input.audio) || $guard(_exceptionable, {
|
|
248
|
+
path: _path + ".audio",
|
|
249
|
+
expected: "(__type.o2 | undefined)",
|
|
250
|
+
value: input.audio
|
|
251
|
+
}, errorFactory)) && $ao4(input.audio, _path + ".audio", true && _exceptionable) || $guard(_exceptionable, {
|
|
252
|
+
path: _path + ".audio",
|
|
253
|
+
expected: "(__type.o2 | undefined)",
|
|
254
|
+
value: input.audio
|
|
255
|
+
}, errorFactory)) && true && (undefined === input.pick || (Array.isArray(input.pick) || $guard(_exceptionable, {
|
|
135
256
|
path: _path + ".pick",
|
|
136
257
|
expected: "(Array<string> | undefined)",
|
|
137
258
|
value: input.pick
|
|
138
|
-
}, errorFactory)) && input.pick.every((elem,
|
|
139
|
-
path: _path + ".pick[" +
|
|
259
|
+
}, errorFactory)) && input.pick.every((elem, _index2) => "string" === typeof elem || $guard(_exceptionable, {
|
|
260
|
+
path: _path + ".pick[" + _index2 + "]",
|
|
140
261
|
expected: "string",
|
|
141
262
|
value: elem
|
|
142
263
|
}, errorFactory)) || $guard(_exceptionable, {
|
|
@@ -144,80 +265,148 @@ export const assertGuardRenderPreset = (input, errorFactory) => {
|
|
|
144
265
|
expected: "(Array<string> | undefined)",
|
|
145
266
|
value: input.pick
|
|
146
267
|
}, errorFactory));
|
|
147
|
-
|
|
268
|
+
const $ao2 = (input, _path, _exceptionable = true) => "string" === typeof input.engine || $guard(_exceptionable, {
|
|
269
|
+
path: _path + ".engine",
|
|
270
|
+
expected: "string",
|
|
271
|
+
value: input.engine
|
|
272
|
+
}, errorFactory);
|
|
273
|
+
const $ao3 = (input, _path, _exceptionable = true) => "string" === typeof input.language || $guard(_exceptionable, {
|
|
274
|
+
path: _path + ".language",
|
|
275
|
+
expected: "string",
|
|
276
|
+
value: input.language
|
|
277
|
+
}, errorFactory);
|
|
278
|
+
const $ao4 = (input, _path, _exceptionable = true) => undefined === input.pan || "string" === typeof input.pan || $guard(_exceptionable, {
|
|
279
|
+
path: _path + ".pan",
|
|
280
|
+
expected: "(string | undefined)",
|
|
281
|
+
value: input.pan
|
|
282
|
+
}, errorFactory);
|
|
283
|
+
return ("object" === typeof input && null !== input || $guard(true, {
|
|
148
284
|
path: _path + "",
|
|
149
|
-
expected: "
|
|
285
|
+
expected: "RenderPresetObject",
|
|
150
286
|
value: input
|
|
151
287
|
}, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
|
|
152
288
|
path: _path + "",
|
|
153
|
-
expected: "
|
|
289
|
+
expected: "RenderPresetObject",
|
|
154
290
|
value: input
|
|
155
291
|
}, errorFactory);
|
|
156
292
|
})(input, "$input", true);
|
|
157
293
|
};
|
|
158
|
-
export const
|
|
159
|
-
const $io1 = input =>
|
|
294
|
+
export const stringifyRenderPresetObject = input => {
|
|
295
|
+
const $io1 = input => "string" === typeof input.format && (undefined === input.transcribe || "object" === typeof input.transcribe && null !== input.transcribe && $io2(input.transcribe)) && (undefined === input.translate || "object" === typeof input.translate && null !== input.translate && $io3(input.translate)) && (undefined === input.audio || "object" === typeof input.audio && null !== input.audio && false === Array.isArray(input.audio) && $io4(input.audio)) && true && (undefined === input.pick || Array.isArray(input.pick) && input.pick.every(elem => "string" === typeof elem));
|
|
296
|
+
const $io2 = input => "string" === typeof input.engine;
|
|
297
|
+
const $io3 = input => "string" === typeof input.language;
|
|
298
|
+
const $io4 = input => undefined === input.pan || "string" === typeof input.pan;
|
|
160
299
|
const $string = __typia.json.createStringify.string;
|
|
161
300
|
const $throws = __typia.json.createStringify.throws;
|
|
162
301
|
const $tail = __typia.json.createStringify.tail;
|
|
163
|
-
const $so0 = input => `{
|
|
302
|
+
const $so0 = input => `{"type":${$string(input.type)},"profile":${(() => {
|
|
164
303
|
if ("string" === typeof input.profile)
|
|
165
304
|
return $string(input.profile);
|
|
305
|
+
if (Array.isArray(input.profile))
|
|
306
|
+
return `[${input.profile.map(elem => (() => {
|
|
307
|
+
if ("string" === typeof elem)
|
|
308
|
+
return $string(elem);
|
|
309
|
+
if ("object" === typeof elem && null !== elem)
|
|
310
|
+
return $so1(elem);
|
|
311
|
+
$throws({
|
|
312
|
+
expected: "(RenderProfileObject | string)",
|
|
313
|
+
value: elem
|
|
314
|
+
});
|
|
315
|
+
})()).join(",")}]`;
|
|
166
316
|
if ("object" === typeof input.profile && null !== input.profile)
|
|
167
317
|
return $so1(input.profile);
|
|
168
318
|
$throws({
|
|
169
|
-
expected: "(
|
|
319
|
+
expected: "(Array<string | RenderProfileObject> | RenderProfileObject | string)",
|
|
170
320
|
value: input.profile
|
|
171
321
|
});
|
|
172
|
-
})() : undefined}`}`)}}`;
|
|
173
|
-
const $so1 = input => `{${undefined === input.transcribe || "function" === typeof input.transcribe ? "" : `"transcribe":${undefined !== input.transcribe ? JSON.stringify(input.transcribe) : undefined},`}${undefined === input.audio || "function" === typeof input.audio ? "" : `"audio":${undefined !== input.audio ? JSON.stringify(input.audio) : undefined},`}${undefined === input.video || "function" === typeof input.video ? "" : `"video":${undefined !== input.video ? JSON.stringify(input.video) : undefined},`}${undefined === input.pick ? "" : `"pick":${undefined !== input.pick ? `[${input.pick.map(elem => $string(elem)).join(",")}]` : undefined},`}"format":${(() => {
|
|
174
|
-
if ("string" === typeof input.format)
|
|
175
|
-
return $string(input.format);
|
|
176
|
-
if ("string" === typeof input.format)
|
|
177
|
-
return "\"" + input.format + "\"";
|
|
178
|
-
$throws({
|
|
179
|
-
expected: "(\"mp4\" | \"png\")",
|
|
180
|
-
value: input.format
|
|
181
|
-
});
|
|
182
322
|
})()}}`;
|
|
323
|
+
const $so1 = input => `{${undefined === input.transcribe ? "" : `"transcribe":${undefined !== input.transcribe ? `{"engine":${$string(input.transcribe.engine)}}` : undefined},`}${undefined === input.translate ? "" : `"translate":${undefined !== input.translate ? `{"language":${$string(input.translate.language)}}` : undefined},`}${undefined === input.audio ? "" : `"audio":${undefined !== input.audio ? $so4(input.audio) : undefined},`}${undefined === input.video || "function" === typeof input.video ? "" : `"video":${undefined !== input.video ? JSON.stringify(input.video) : undefined},`}${undefined === input.pick ? "" : `"pick":${undefined !== input.pick ? `[${input.pick.map(elem => $string(elem)).join(",")}]` : undefined},`}"format":${$string(input.format)}}`;
|
|
324
|
+
const $so4 = input => `{${$tail(`${undefined === input.pan ? "" : `"pan":${undefined !== input.pan ? $string(input.pan) : undefined}`}`)}}`;
|
|
183
325
|
return $so0(input);
|
|
184
326
|
};
|
|
185
|
-
export const
|
|
327
|
+
export const assertStringifyRenderPresetObject = (input, errorFactory) => { const assert = (input, errorFactory) => {
|
|
186
328
|
const __is = input => {
|
|
187
|
-
const $io0 = input =>
|
|
188
|
-
const $io1 = input =>
|
|
189
|
-
|
|
329
|
+
const $io0 = input => "string" === typeof input.type && (null !== input.profile && undefined !== input.profile && ("string" === typeof input.profile || (Array.isArray(input.profile) && input.profile.every(elem => null !== elem && undefined !== elem && ("string" === typeof elem || "object" === typeof elem && null !== elem && $io1(elem))) || "object" === typeof input.profile && null !== input.profile && $io1(input.profile))));
|
|
330
|
+
const $io1 = input => "string" === typeof input.format && (undefined === input.transcribe || "object" === typeof input.transcribe && null !== input.transcribe && $io2(input.transcribe)) && (undefined === input.translate || "object" === typeof input.translate && null !== input.translate && $io3(input.translate)) && (undefined === input.audio || "object" === typeof input.audio && null !== input.audio && false === Array.isArray(input.audio) && $io4(input.audio)) && true && (undefined === input.pick || Array.isArray(input.pick) && input.pick.every(elem => "string" === typeof elem));
|
|
331
|
+
const $io2 = input => "string" === typeof input.engine;
|
|
332
|
+
const $io3 = input => "string" === typeof input.language;
|
|
333
|
+
const $io4 = input => undefined === input.pan || "string" === typeof input.pan;
|
|
334
|
+
return "object" === typeof input && null !== input && $io0(input);
|
|
190
335
|
};
|
|
191
336
|
if (false === __is(input))
|
|
192
337
|
((input, _path, _exceptionable = true) => {
|
|
193
338
|
const $guard = __typia.json.createAssertStringify.guard;
|
|
194
|
-
const $ao0 = (input, _path, _exceptionable = true) => (
|
|
339
|
+
const $ao0 = (input, _path, _exceptionable = true) => ("string" === typeof input.type || $guard(_exceptionable, {
|
|
195
340
|
path: _path + ".type",
|
|
196
|
-
expected: "
|
|
341
|
+
expected: "string",
|
|
197
342
|
value: input.type
|
|
198
|
-
}, errorFactory)) &&
|
|
343
|
+
}, errorFactory)) && ((null !== input.profile || $guard(_exceptionable, {
|
|
344
|
+
path: _path + ".profile",
|
|
345
|
+
expected: "(Array<string | RenderProfileObject> | RenderProfileObject | string)",
|
|
346
|
+
value: input.profile
|
|
347
|
+
}, errorFactory)) && (undefined !== input.profile || $guard(_exceptionable, {
|
|
199
348
|
path: _path + ".profile",
|
|
200
|
-
expected: "(
|
|
349
|
+
expected: "(Array<string | RenderProfileObject> | RenderProfileObject | string)",
|
|
201
350
|
value: input.profile
|
|
202
|
-
}, errorFactory)) && (
|
|
351
|
+
}, errorFactory)) && ("string" === typeof input.profile || (Array.isArray(input.profile) && input.profile.every((elem, _index1) => (null !== elem || $guard(_exceptionable, {
|
|
352
|
+
path: _path + ".profile[" + _index1 + "]",
|
|
353
|
+
expected: "(RenderProfileObject | string)",
|
|
354
|
+
value: elem
|
|
355
|
+
}, errorFactory)) && (undefined !== elem || $guard(_exceptionable, {
|
|
356
|
+
path: _path + ".profile[" + _index1 + "]",
|
|
357
|
+
expected: "(RenderProfileObject | string)",
|
|
358
|
+
value: elem
|
|
359
|
+
}, errorFactory)) && ("string" === typeof elem || ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
|
|
360
|
+
path: _path + ".profile[" + _index1 + "]",
|
|
361
|
+
expected: "(RenderProfileObject | string)",
|
|
362
|
+
value: elem
|
|
363
|
+
}, errorFactory)) && $ao1(elem, _path + ".profile[" + _index1 + "]", true && _exceptionable) || $guard(_exceptionable, {
|
|
364
|
+
path: _path + ".profile[" + _index1 + "]",
|
|
365
|
+
expected: "(RenderProfileObject | string)",
|
|
366
|
+
value: elem
|
|
367
|
+
}, errorFactory))) || "object" === typeof input.profile && null !== input.profile && $ao1(input.profile, _path + ".profile", true && _exceptionable) || $guard(_exceptionable, {
|
|
203
368
|
path: _path + ".profile",
|
|
204
|
-
expected: "(
|
|
369
|
+
expected: "(Array<string | RenderProfileObject> | RenderProfileObject | string)",
|
|
205
370
|
value: input.profile
|
|
206
|
-
}, errorFactory))
|
|
371
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
|
207
372
|
path: _path + ".profile",
|
|
208
|
-
expected: "(
|
|
373
|
+
expected: "(Array<string | RenderProfileObject> | RenderProfileObject | string)",
|
|
209
374
|
value: input.profile
|
|
210
375
|
}, errorFactory)));
|
|
211
|
-
const $ao1 = (input, _path, _exceptionable = true) => ("
|
|
376
|
+
const $ao1 = (input, _path, _exceptionable = true) => ("string" === typeof input.format || $guard(_exceptionable, {
|
|
212
377
|
path: _path + ".format",
|
|
213
|
-
expected: "
|
|
378
|
+
expected: "string",
|
|
214
379
|
value: input.format
|
|
215
|
-
}, errorFactory)) &&
|
|
380
|
+
}, errorFactory)) && (undefined === input.transcribe || ("object" === typeof input.transcribe && null !== input.transcribe || $guard(_exceptionable, {
|
|
381
|
+
path: _path + ".transcribe",
|
|
382
|
+
expected: "(__type | undefined)",
|
|
383
|
+
value: input.transcribe
|
|
384
|
+
}, errorFactory)) && $ao2(input.transcribe, _path + ".transcribe", true && _exceptionable) || $guard(_exceptionable, {
|
|
385
|
+
path: _path + ".transcribe",
|
|
386
|
+
expected: "(__type | undefined)",
|
|
387
|
+
value: input.transcribe
|
|
388
|
+
}, errorFactory)) && (undefined === input.translate || ("object" === typeof input.translate && null !== input.translate || $guard(_exceptionable, {
|
|
389
|
+
path: _path + ".translate",
|
|
390
|
+
expected: "(__type.o1 | undefined)",
|
|
391
|
+
value: input.translate
|
|
392
|
+
}, errorFactory)) && $ao3(input.translate, _path + ".translate", true && _exceptionable) || $guard(_exceptionable, {
|
|
393
|
+
path: _path + ".translate",
|
|
394
|
+
expected: "(__type.o1 | undefined)",
|
|
395
|
+
value: input.translate
|
|
396
|
+
}, errorFactory)) && (undefined === input.audio || ("object" === typeof input.audio && null !== input.audio && false === Array.isArray(input.audio) || $guard(_exceptionable, {
|
|
397
|
+
path: _path + ".audio",
|
|
398
|
+
expected: "(__type.o2 | undefined)",
|
|
399
|
+
value: input.audio
|
|
400
|
+
}, errorFactory)) && $ao4(input.audio, _path + ".audio", true && _exceptionable) || $guard(_exceptionable, {
|
|
401
|
+
path: _path + ".audio",
|
|
402
|
+
expected: "(__type.o2 | undefined)",
|
|
403
|
+
value: input.audio
|
|
404
|
+
}, errorFactory)) && true && (undefined === input.pick || (Array.isArray(input.pick) || $guard(_exceptionable, {
|
|
216
405
|
path: _path + ".pick",
|
|
217
406
|
expected: "(Array<string> | undefined)",
|
|
218
407
|
value: input.pick
|
|
219
|
-
}, errorFactory)) && input.pick.every((elem,
|
|
220
|
-
path: _path + ".pick[" +
|
|
408
|
+
}, errorFactory)) && input.pick.every((elem, _index2) => "string" === typeof elem || $guard(_exceptionable, {
|
|
409
|
+
path: _path + ".pick[" + _index2 + "]",
|
|
221
410
|
expected: "string",
|
|
222
411
|
value: elem
|
|
223
412
|
}, errorFactory)) || $guard(_exceptionable, {
|
|
@@ -225,147 +414,156 @@ export const assertStringifyRenderPreset = (input, errorFactory) => { const asse
|
|
|
225
414
|
expected: "(Array<string> | undefined)",
|
|
226
415
|
value: input.pick
|
|
227
416
|
}, errorFactory));
|
|
228
|
-
|
|
417
|
+
const $ao2 = (input, _path, _exceptionable = true) => "string" === typeof input.engine || $guard(_exceptionable, {
|
|
418
|
+
path: _path + ".engine",
|
|
419
|
+
expected: "string",
|
|
420
|
+
value: input.engine
|
|
421
|
+
}, errorFactory);
|
|
422
|
+
const $ao3 = (input, _path, _exceptionable = true) => "string" === typeof input.language || $guard(_exceptionable, {
|
|
423
|
+
path: _path + ".language",
|
|
424
|
+
expected: "string",
|
|
425
|
+
value: input.language
|
|
426
|
+
}, errorFactory);
|
|
427
|
+
const $ao4 = (input, _path, _exceptionable = true) => undefined === input.pan || "string" === typeof input.pan || $guard(_exceptionable, {
|
|
428
|
+
path: _path + ".pan",
|
|
429
|
+
expected: "(string | undefined)",
|
|
430
|
+
value: input.pan
|
|
431
|
+
}, errorFactory);
|
|
432
|
+
return ("object" === typeof input && null !== input || $guard(true, {
|
|
229
433
|
path: _path + "",
|
|
230
|
-
expected: "
|
|
434
|
+
expected: "RenderPresetObject",
|
|
231
435
|
value: input
|
|
232
436
|
}, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
|
|
233
437
|
path: _path + "",
|
|
234
|
-
expected: "
|
|
438
|
+
expected: "RenderPresetObject",
|
|
235
439
|
value: input
|
|
236
440
|
}, errorFactory);
|
|
237
441
|
})(input, "$input", true);
|
|
238
442
|
return input;
|
|
239
443
|
}; const stringify = input => {
|
|
240
|
-
const $io1 = input =>
|
|
444
|
+
const $io1 = input => "string" === typeof input.format && (undefined === input.transcribe || "object" === typeof input.transcribe && null !== input.transcribe && $io2(input.transcribe)) && (undefined === input.translate || "object" === typeof input.translate && null !== input.translate && $io3(input.translate)) && (undefined === input.audio || "object" === typeof input.audio && null !== input.audio && false === Array.isArray(input.audio) && $io4(input.audio)) && true && (undefined === input.pick || Array.isArray(input.pick) && input.pick.every(elem => "string" === typeof elem));
|
|
445
|
+
const $io2 = input => "string" === typeof input.engine;
|
|
446
|
+
const $io3 = input => "string" === typeof input.language;
|
|
447
|
+
const $io4 = input => undefined === input.pan || "string" === typeof input.pan;
|
|
241
448
|
const $string = __typia.json.createAssertStringify.string;
|
|
242
449
|
const $throws = __typia.json.createAssertStringify.throws;
|
|
243
450
|
const $tail = __typia.json.createAssertStringify.tail;
|
|
244
|
-
const $so0 = input => `{
|
|
451
|
+
const $so0 = input => `{"type":${$string(input.type)},"profile":${(() => {
|
|
245
452
|
if ("string" === typeof input.profile)
|
|
246
453
|
return $string(input.profile);
|
|
454
|
+
if (Array.isArray(input.profile))
|
|
455
|
+
return `[${input.profile.map(elem => (() => {
|
|
456
|
+
if ("string" === typeof elem)
|
|
457
|
+
return $string(elem);
|
|
458
|
+
if ("object" === typeof elem && null !== elem)
|
|
459
|
+
return $so1(elem);
|
|
460
|
+
$throws({
|
|
461
|
+
expected: "(RenderProfileObject | string)",
|
|
462
|
+
value: elem
|
|
463
|
+
});
|
|
464
|
+
})()).join(",")}]`;
|
|
247
465
|
if ("object" === typeof input.profile && null !== input.profile)
|
|
248
466
|
return $so1(input.profile);
|
|
249
467
|
$throws({
|
|
250
|
-
expected: "(
|
|
468
|
+
expected: "(Array<string | RenderProfileObject> | RenderProfileObject | string)",
|
|
251
469
|
value: input.profile
|
|
252
470
|
});
|
|
253
|
-
})() : undefined}`}`)}}`;
|
|
254
|
-
const $so1 = input => `{${undefined === input.transcribe || "function" === typeof input.transcribe ? "" : `"transcribe":${undefined !== input.transcribe ? JSON.stringify(input.transcribe) : undefined},`}${undefined === input.audio || "function" === typeof input.audio ? "" : `"audio":${undefined !== input.audio ? JSON.stringify(input.audio) : undefined},`}${undefined === input.video || "function" === typeof input.video ? "" : `"video":${undefined !== input.video ? JSON.stringify(input.video) : undefined},`}${undefined === input.pick ? "" : `"pick":${undefined !== input.pick ? `[${input.pick.map(elem => $string(elem)).join(",")}]` : undefined},`}"format":${(() => {
|
|
255
|
-
if ("string" === typeof input.format)
|
|
256
|
-
return $string(input.format);
|
|
257
|
-
if ("string" === typeof input.format)
|
|
258
|
-
return "\"" + input.format + "\"";
|
|
259
|
-
$throws({
|
|
260
|
-
expected: "(\"mp4\" | \"png\")",
|
|
261
|
-
value: input.format
|
|
262
|
-
});
|
|
263
471
|
})()}}`;
|
|
472
|
+
const $so1 = input => `{${undefined === input.transcribe ? "" : `"transcribe":${undefined !== input.transcribe ? `{"engine":${$string(input.transcribe.engine)}}` : undefined},`}${undefined === input.translate ? "" : `"translate":${undefined !== input.translate ? `{"language":${$string(input.translate.language)}}` : undefined},`}${undefined === input.audio ? "" : `"audio":${undefined !== input.audio ? $so4(input.audio) : undefined},`}${undefined === input.video || "function" === typeof input.video ? "" : `"video":${undefined !== input.video ? JSON.stringify(input.video) : undefined},`}${undefined === input.pick ? "" : `"pick":${undefined !== input.pick ? `[${input.pick.map(elem => $string(elem)).join(",")}]` : undefined},`}"format":${$string(input.format)}}`;
|
|
473
|
+
const $so4 = input => `{${$tail(`${undefined === input.pan ? "" : `"pan":${undefined !== input.pan ? $string(input.pan) : undefined}`}`)}}`;
|
|
264
474
|
return $so0(input);
|
|
265
475
|
}; return stringify(assert(input, errorFactory)); };
|
|
266
|
-
export const
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
const
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
if (false === __is(input))
|
|
274
|
-
((input, _path, _exceptionable = true) => {
|
|
275
|
-
const $guard = __typia.createAssert.guard;
|
|
276
|
-
return "png" === input || "mp4" === input || $guard(true, {
|
|
277
|
-
path: _path + "",
|
|
278
|
-
expected: "(\"mp4\" | \"png\")",
|
|
279
|
-
value: input
|
|
280
|
-
}, errorFactory);
|
|
281
|
-
})(input, "$input", true);
|
|
282
|
-
return input;
|
|
283
|
-
};
|
|
284
|
-
export const randomRenderPresetProfileFormat = generator => {
|
|
285
|
-
const $pick = __typia.createRandom.pick;
|
|
286
|
-
return $pick([
|
|
287
|
-
() => "png",
|
|
288
|
-
() => "mp4"
|
|
289
|
-
])();
|
|
290
|
-
};
|
|
291
|
-
export const assertGuardRenderPresetProfileFormat = (input, errorFactory) => {
|
|
292
|
-
const __is = input => {
|
|
293
|
-
return "png" === input || "mp4" === input;
|
|
294
|
-
};
|
|
295
|
-
if (false === __is(input))
|
|
296
|
-
((input, _path, _exceptionable = true) => {
|
|
297
|
-
const $guard = __typia.createAssertGuard.guard;
|
|
298
|
-
return "png" === input || "mp4" === input || $guard(true, {
|
|
299
|
-
path: _path + "",
|
|
300
|
-
expected: "(\"mp4\" | \"png\")",
|
|
301
|
-
value: input
|
|
302
|
-
}, errorFactory);
|
|
303
|
-
})(input, "$input", true);
|
|
304
|
-
};
|
|
305
|
-
export const stringifyRenderPresetProfileFormat = input => {
|
|
306
|
-
const $string = __typia.json.createStringify.string;
|
|
307
|
-
const $throws = __typia.json.createStringify.throws;
|
|
308
|
-
return (() => {
|
|
309
|
-
if ("string" === typeof input)
|
|
310
|
-
return $string(input);
|
|
311
|
-
if ("string" === typeof input)
|
|
312
|
-
return "\"" + input + "\"";
|
|
313
|
-
$throws({
|
|
314
|
-
expected: "(\"mp4\" | \"png\")",
|
|
315
|
-
value: input
|
|
316
|
-
});
|
|
317
|
-
})();
|
|
318
|
-
};
|
|
319
|
-
export const assertStringifyRenderPresetProfileFormat = (input, errorFactory) => { const assert = (input, errorFactory) => {
|
|
320
|
-
const __is = input => {
|
|
321
|
-
return "png" === input || "mp4" === input;
|
|
322
|
-
};
|
|
323
|
-
if (false === __is(input))
|
|
324
|
-
((input, _path, _exceptionable = true) => {
|
|
325
|
-
const $guard = __typia.json.createAssertStringify.guard;
|
|
326
|
-
return "png" === input || "mp4" === input || $guard(true, {
|
|
327
|
-
path: _path + "",
|
|
328
|
-
expected: "(\"mp4\" | \"png\")",
|
|
329
|
-
value: input
|
|
330
|
-
}, errorFactory);
|
|
331
|
-
})(input, "$input", true);
|
|
332
|
-
return input;
|
|
333
|
-
}; const stringify = input => {
|
|
334
|
-
const $string = __typia.json.createAssertStringify.string;
|
|
335
|
-
const $throws = __typia.json.createAssertStringify.throws;
|
|
336
|
-
return (() => {
|
|
337
|
-
if ("string" === typeof input)
|
|
338
|
-
return $string(input);
|
|
339
|
-
if ("string" === typeof input)
|
|
340
|
-
return "\"" + input + "\"";
|
|
341
|
-
$throws({
|
|
342
|
-
expected: "(\"mp4\" | \"png\")",
|
|
343
|
-
value: input
|
|
344
|
-
});
|
|
345
|
-
})();
|
|
346
|
-
}; return stringify(assert(input, errorFactory)); };
|
|
347
|
-
export const isRenderPresetProfile = input => {
|
|
348
|
-
const $io0 = input => ("png" === input.format || "mp4" === input.format) && true && true && true && (undefined === input.pick || Array.isArray(input.pick) && input.pick.every(elem => "string" === typeof elem));
|
|
349
|
-
return "object" === typeof input && null !== input && $io0(input);
|
|
476
|
+
export const isRenderPreset = input => {
|
|
477
|
+
const $io0 = input => "string" === typeof input.type && (null !== input.profile && undefined !== input.profile && ("string" === typeof input.profile || (Array.isArray(input.profile) && input.profile.every(elem => null !== elem && undefined !== elem && ("string" === typeof elem || "object" === typeof elem && null !== elem && $io1(elem))) || "object" === typeof input.profile && null !== input.profile && $io1(input.profile))));
|
|
478
|
+
const $io1 = input => "string" === typeof input.format && (undefined === input.transcribe || "object" === typeof input.transcribe && null !== input.transcribe && $io2(input.transcribe)) && (undefined === input.translate || "object" === typeof input.translate && null !== input.translate && $io3(input.translate)) && (undefined === input.audio || "object" === typeof input.audio && null !== input.audio && false === Array.isArray(input.audio) && $io4(input.audio)) && true && (undefined === input.pick || Array.isArray(input.pick) && input.pick.every(elem => "string" === typeof elem));
|
|
479
|
+
const $io2 = input => "string" === typeof input.engine;
|
|
480
|
+
const $io3 = input => "string" === typeof input.language;
|
|
481
|
+
const $io4 = input => undefined === input.pan || "string" === typeof input.pan;
|
|
482
|
+
return null !== input && undefined !== input && ("string" === typeof input || "object" === typeof input && null !== input && $io0(input));
|
|
350
483
|
};
|
|
351
|
-
export const
|
|
484
|
+
export const assertRenderPreset = (input, errorFactory) => {
|
|
352
485
|
const __is = input => {
|
|
353
|
-
const $io0 = input =>
|
|
354
|
-
|
|
486
|
+
const $io0 = input => "string" === typeof input.type && (null !== input.profile && undefined !== input.profile && ("string" === typeof input.profile || (Array.isArray(input.profile) && input.profile.every(elem => null !== elem && undefined !== elem && ("string" === typeof elem || "object" === typeof elem && null !== elem && $io1(elem))) || "object" === typeof input.profile && null !== input.profile && $io1(input.profile))));
|
|
487
|
+
const $io1 = input => "string" === typeof input.format && (undefined === input.transcribe || "object" === typeof input.transcribe && null !== input.transcribe && $io2(input.transcribe)) && (undefined === input.translate || "object" === typeof input.translate && null !== input.translate && $io3(input.translate)) && (undefined === input.audio || "object" === typeof input.audio && null !== input.audio && false === Array.isArray(input.audio) && $io4(input.audio)) && true && (undefined === input.pick || Array.isArray(input.pick) && input.pick.every(elem => "string" === typeof elem));
|
|
488
|
+
const $io2 = input => "string" === typeof input.engine;
|
|
489
|
+
const $io3 = input => "string" === typeof input.language;
|
|
490
|
+
const $io4 = input => undefined === input.pan || "string" === typeof input.pan;
|
|
491
|
+
return null !== input && undefined !== input && ("string" === typeof input || "object" === typeof input && null !== input && $io0(input));
|
|
355
492
|
};
|
|
356
493
|
if (false === __is(input))
|
|
357
494
|
((input, _path, _exceptionable = true) => {
|
|
358
495
|
const $guard = __typia.createAssert.guard;
|
|
359
|
-
const $ao0 = (input, _path, _exceptionable = true) => ("
|
|
496
|
+
const $ao0 = (input, _path, _exceptionable = true) => ("string" === typeof input.type || $guard(_exceptionable, {
|
|
497
|
+
path: _path + ".type",
|
|
498
|
+
expected: "string",
|
|
499
|
+
value: input.type
|
|
500
|
+
}, errorFactory)) && ((null !== input.profile || $guard(_exceptionable, {
|
|
501
|
+
path: _path + ".profile",
|
|
502
|
+
expected: "(Array<string | RenderProfileObject> | RenderProfileObject | string)",
|
|
503
|
+
value: input.profile
|
|
504
|
+
}, errorFactory)) && (undefined !== input.profile || $guard(_exceptionable, {
|
|
505
|
+
path: _path + ".profile",
|
|
506
|
+
expected: "(Array<string | RenderProfileObject> | RenderProfileObject | string)",
|
|
507
|
+
value: input.profile
|
|
508
|
+
}, errorFactory)) && ("string" === typeof input.profile || (Array.isArray(input.profile) && input.profile.every((elem, _index1) => (null !== elem || $guard(_exceptionable, {
|
|
509
|
+
path: _path + ".profile[" + _index1 + "]",
|
|
510
|
+
expected: "(RenderProfileObject | string)",
|
|
511
|
+
value: elem
|
|
512
|
+
}, errorFactory)) && (undefined !== elem || $guard(_exceptionable, {
|
|
513
|
+
path: _path + ".profile[" + _index1 + "]",
|
|
514
|
+
expected: "(RenderProfileObject | string)",
|
|
515
|
+
value: elem
|
|
516
|
+
}, errorFactory)) && ("string" === typeof elem || ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
|
|
517
|
+
path: _path + ".profile[" + _index1 + "]",
|
|
518
|
+
expected: "(RenderProfileObject | string)",
|
|
519
|
+
value: elem
|
|
520
|
+
}, errorFactory)) && $ao1(elem, _path + ".profile[" + _index1 + "]", true && _exceptionable) || $guard(_exceptionable, {
|
|
521
|
+
path: _path + ".profile[" + _index1 + "]",
|
|
522
|
+
expected: "(RenderProfileObject | string)",
|
|
523
|
+
value: elem
|
|
524
|
+
}, errorFactory))) || "object" === typeof input.profile && null !== input.profile && $ao1(input.profile, _path + ".profile", true && _exceptionable) || $guard(_exceptionable, {
|
|
525
|
+
path: _path + ".profile",
|
|
526
|
+
expected: "(Array<string | RenderProfileObject> | RenderProfileObject | string)",
|
|
527
|
+
value: input.profile
|
|
528
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
|
529
|
+
path: _path + ".profile",
|
|
530
|
+
expected: "(Array<string | RenderProfileObject> | RenderProfileObject | string)",
|
|
531
|
+
value: input.profile
|
|
532
|
+
}, errorFactory)));
|
|
533
|
+
const $ao1 = (input, _path, _exceptionable = true) => ("string" === typeof input.format || $guard(_exceptionable, {
|
|
360
534
|
path: _path + ".format",
|
|
361
|
-
expected: "
|
|
535
|
+
expected: "string",
|
|
362
536
|
value: input.format
|
|
363
|
-
}, errorFactory)) &&
|
|
537
|
+
}, errorFactory)) && (undefined === input.transcribe || ("object" === typeof input.transcribe && null !== input.transcribe || $guard(_exceptionable, {
|
|
538
|
+
path: _path + ".transcribe",
|
|
539
|
+
expected: "(__type | undefined)",
|
|
540
|
+
value: input.transcribe
|
|
541
|
+
}, errorFactory)) && $ao2(input.transcribe, _path + ".transcribe", true && _exceptionable) || $guard(_exceptionable, {
|
|
542
|
+
path: _path + ".transcribe",
|
|
543
|
+
expected: "(__type | undefined)",
|
|
544
|
+
value: input.transcribe
|
|
545
|
+
}, errorFactory)) && (undefined === input.translate || ("object" === typeof input.translate && null !== input.translate || $guard(_exceptionable, {
|
|
546
|
+
path: _path + ".translate",
|
|
547
|
+
expected: "(__type.o1 | undefined)",
|
|
548
|
+
value: input.translate
|
|
549
|
+
}, errorFactory)) && $ao3(input.translate, _path + ".translate", true && _exceptionable) || $guard(_exceptionable, {
|
|
550
|
+
path: _path + ".translate",
|
|
551
|
+
expected: "(__type.o1 | undefined)",
|
|
552
|
+
value: input.translate
|
|
553
|
+
}, errorFactory)) && (undefined === input.audio || ("object" === typeof input.audio && null !== input.audio && false === Array.isArray(input.audio) || $guard(_exceptionable, {
|
|
554
|
+
path: _path + ".audio",
|
|
555
|
+
expected: "(__type.o2 | undefined)",
|
|
556
|
+
value: input.audio
|
|
557
|
+
}, errorFactory)) && $ao4(input.audio, _path + ".audio", true && _exceptionable) || $guard(_exceptionable, {
|
|
558
|
+
path: _path + ".audio",
|
|
559
|
+
expected: "(__type.o2 | undefined)",
|
|
560
|
+
value: input.audio
|
|
561
|
+
}, errorFactory)) && true && (undefined === input.pick || (Array.isArray(input.pick) || $guard(_exceptionable, {
|
|
364
562
|
path: _path + ".pick",
|
|
365
563
|
expected: "(Array<string> | undefined)",
|
|
366
564
|
value: input.pick
|
|
367
|
-
}, errorFactory)) && input.pick.every((elem,
|
|
368
|
-
path: _path + ".pick[" +
|
|
565
|
+
}, errorFactory)) && input.pick.every((elem, _index2) => "string" === typeof elem || $guard(_exceptionable, {
|
|
566
|
+
path: _path + ".pick[" + _index2 + "]",
|
|
369
567
|
expected: "string",
|
|
370
568
|
value: elem
|
|
371
569
|
}, errorFactory)) || $guard(_exceptionable, {
|
|
@@ -373,33 +571,68 @@ export const assertRenderPresetProfile = (input, errorFactory) => {
|
|
|
373
571
|
expected: "(Array<string> | undefined)",
|
|
374
572
|
value: input.pick
|
|
375
573
|
}, errorFactory));
|
|
376
|
-
|
|
574
|
+
const $ao2 = (input, _path, _exceptionable = true) => "string" === typeof input.engine || $guard(_exceptionable, {
|
|
575
|
+
path: _path + ".engine",
|
|
576
|
+
expected: "string",
|
|
577
|
+
value: input.engine
|
|
578
|
+
}, errorFactory);
|
|
579
|
+
const $ao3 = (input, _path, _exceptionable = true) => "string" === typeof input.language || $guard(_exceptionable, {
|
|
580
|
+
path: _path + ".language",
|
|
581
|
+
expected: "string",
|
|
582
|
+
value: input.language
|
|
583
|
+
}, errorFactory);
|
|
584
|
+
const $ao4 = (input, _path, _exceptionable = true) => undefined === input.pan || "string" === typeof input.pan || $guard(_exceptionable, {
|
|
585
|
+
path: _path + ".pan",
|
|
586
|
+
expected: "(string | undefined)",
|
|
587
|
+
value: input.pan
|
|
588
|
+
}, errorFactory);
|
|
589
|
+
return (null !== input || $guard(true, {
|
|
590
|
+
path: _path + "",
|
|
591
|
+
expected: "(RenderPresetObject | string)",
|
|
592
|
+
value: input
|
|
593
|
+
}, errorFactory)) && (undefined !== input || $guard(true, {
|
|
594
|
+
path: _path + "",
|
|
595
|
+
expected: "(RenderPresetObject | string)",
|
|
596
|
+
value: input
|
|
597
|
+
}, errorFactory)) && ("string" === typeof input || ("object" === typeof input && null !== input || $guard(true, {
|
|
377
598
|
path: _path + "",
|
|
378
|
-
expected: "
|
|
599
|
+
expected: "(RenderPresetObject | string)",
|
|
379
600
|
value: input
|
|
380
601
|
}, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
|
|
381
602
|
path: _path + "",
|
|
382
|
-
expected: "
|
|
603
|
+
expected: "(RenderPresetObject | string)",
|
|
383
604
|
value: input
|
|
384
|
-
}, errorFactory);
|
|
605
|
+
}, errorFactory));
|
|
385
606
|
})(input, "$input", true);
|
|
386
607
|
return input;
|
|
387
608
|
};
|
|
388
|
-
export const
|
|
389
|
-
const $pick = __typia.createRandom.pick;
|
|
609
|
+
export const randomRenderPreset = generator => {
|
|
390
610
|
const $generator = __typia.createRandom.generator;
|
|
611
|
+
const $pick = __typia.createRandom.pick;
|
|
391
612
|
const $ro0 = (_recursive = false, _depth = 0) => ({
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
() =>
|
|
395
|
-
|
|
613
|
+
type: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
|
|
614
|
+
profile: $pick([
|
|
615
|
+
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
|
|
616
|
+
() => (generator?.array ?? $generator.array)(() => $pick([
|
|
617
|
+
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
|
|
618
|
+
() => $ro1(_recursive, _recursive ? 1 + _depth : _depth)
|
|
619
|
+
])()),
|
|
620
|
+
() => $ro1(_recursive, _recursive ? 1 + _depth : _depth)
|
|
621
|
+
])()
|
|
622
|
+
});
|
|
623
|
+
const $ro1 = (_recursive = false, _depth = 0) => ({
|
|
624
|
+
format: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
|
|
396
625
|
transcribe: $pick([
|
|
397
|
-
() =>
|
|
398
|
-
() =>
|
|
626
|
+
() => undefined,
|
|
627
|
+
() => $ro2(_recursive, _recursive ? 1 + _depth : _depth)
|
|
628
|
+
])(),
|
|
629
|
+
translate: $pick([
|
|
630
|
+
() => undefined,
|
|
631
|
+
() => $ro3(_recursive, _recursive ? 1 + _depth : _depth)
|
|
399
632
|
])(),
|
|
400
633
|
audio: $pick([
|
|
401
|
-
() =>
|
|
402
|
-
() =>
|
|
634
|
+
() => undefined,
|
|
635
|
+
() => $ro4(_recursive, _recursive ? 1 + _depth : _depth)
|
|
403
636
|
])(),
|
|
404
637
|
video: $pick([
|
|
405
638
|
() => "any type used...",
|
|
@@ -410,26 +643,106 @@ export const randomRenderPresetProfile = generator => {
|
|
|
410
643
|
() => (generator?.array ?? $generator.array)(() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)())
|
|
411
644
|
])()
|
|
412
645
|
});
|
|
413
|
-
|
|
646
|
+
const $ro2 = (_recursive = false, _depth = 0) => ({
|
|
647
|
+
engine: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
|
|
648
|
+
});
|
|
649
|
+
const $ro3 = (_recursive = false, _depth = 0) => ({
|
|
650
|
+
language: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
|
|
651
|
+
});
|
|
652
|
+
const $ro4 = (_recursive = false, _depth = 0) => ({
|
|
653
|
+
pan: $pick([
|
|
654
|
+
() => undefined,
|
|
655
|
+
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
|
|
656
|
+
])()
|
|
657
|
+
});
|
|
658
|
+
return $pick([
|
|
659
|
+
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
|
|
660
|
+
() => $ro0()
|
|
661
|
+
])();
|
|
414
662
|
};
|
|
415
|
-
export const
|
|
663
|
+
export const assertGuardRenderPreset = (input, errorFactory) => {
|
|
416
664
|
const __is = input => {
|
|
417
|
-
const $io0 = input =>
|
|
418
|
-
|
|
665
|
+
const $io0 = input => "string" === typeof input.type && (null !== input.profile && undefined !== input.profile && ("string" === typeof input.profile || (Array.isArray(input.profile) && input.profile.every(elem => null !== elem && undefined !== elem && ("string" === typeof elem || "object" === typeof elem && null !== elem && $io1(elem))) || "object" === typeof input.profile && null !== input.profile && $io1(input.profile))));
|
|
666
|
+
const $io1 = input => "string" === typeof input.format && (undefined === input.transcribe || "object" === typeof input.transcribe && null !== input.transcribe && $io2(input.transcribe)) && (undefined === input.translate || "object" === typeof input.translate && null !== input.translate && $io3(input.translate)) && (undefined === input.audio || "object" === typeof input.audio && null !== input.audio && false === Array.isArray(input.audio) && $io4(input.audio)) && true && (undefined === input.pick || Array.isArray(input.pick) && input.pick.every(elem => "string" === typeof elem));
|
|
667
|
+
const $io2 = input => "string" === typeof input.engine;
|
|
668
|
+
const $io3 = input => "string" === typeof input.language;
|
|
669
|
+
const $io4 = input => undefined === input.pan || "string" === typeof input.pan;
|
|
670
|
+
return null !== input && undefined !== input && ("string" === typeof input || "object" === typeof input && null !== input && $io0(input));
|
|
419
671
|
};
|
|
420
672
|
if (false === __is(input))
|
|
421
673
|
((input, _path, _exceptionable = true) => {
|
|
422
674
|
const $guard = __typia.createAssertGuard.guard;
|
|
423
|
-
const $ao0 = (input, _path, _exceptionable = true) => ("
|
|
675
|
+
const $ao0 = (input, _path, _exceptionable = true) => ("string" === typeof input.type || $guard(_exceptionable, {
|
|
676
|
+
path: _path + ".type",
|
|
677
|
+
expected: "string",
|
|
678
|
+
value: input.type
|
|
679
|
+
}, errorFactory)) && ((null !== input.profile || $guard(_exceptionable, {
|
|
680
|
+
path: _path + ".profile",
|
|
681
|
+
expected: "(Array<string | RenderProfileObject> | RenderProfileObject | string)",
|
|
682
|
+
value: input.profile
|
|
683
|
+
}, errorFactory)) && (undefined !== input.profile || $guard(_exceptionable, {
|
|
684
|
+
path: _path + ".profile",
|
|
685
|
+
expected: "(Array<string | RenderProfileObject> | RenderProfileObject | string)",
|
|
686
|
+
value: input.profile
|
|
687
|
+
}, errorFactory)) && ("string" === typeof input.profile || (Array.isArray(input.profile) && input.profile.every((elem, _index1) => (null !== elem || $guard(_exceptionable, {
|
|
688
|
+
path: _path + ".profile[" + _index1 + "]",
|
|
689
|
+
expected: "(RenderProfileObject | string)",
|
|
690
|
+
value: elem
|
|
691
|
+
}, errorFactory)) && (undefined !== elem || $guard(_exceptionable, {
|
|
692
|
+
path: _path + ".profile[" + _index1 + "]",
|
|
693
|
+
expected: "(RenderProfileObject | string)",
|
|
694
|
+
value: elem
|
|
695
|
+
}, errorFactory)) && ("string" === typeof elem || ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
|
|
696
|
+
path: _path + ".profile[" + _index1 + "]",
|
|
697
|
+
expected: "(RenderProfileObject | string)",
|
|
698
|
+
value: elem
|
|
699
|
+
}, errorFactory)) && $ao1(elem, _path + ".profile[" + _index1 + "]", true && _exceptionable) || $guard(_exceptionable, {
|
|
700
|
+
path: _path + ".profile[" + _index1 + "]",
|
|
701
|
+
expected: "(RenderProfileObject | string)",
|
|
702
|
+
value: elem
|
|
703
|
+
}, errorFactory))) || "object" === typeof input.profile && null !== input.profile && $ao1(input.profile, _path + ".profile", true && _exceptionable) || $guard(_exceptionable, {
|
|
704
|
+
path: _path + ".profile",
|
|
705
|
+
expected: "(Array<string | RenderProfileObject> | RenderProfileObject | string)",
|
|
706
|
+
value: input.profile
|
|
707
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
|
708
|
+
path: _path + ".profile",
|
|
709
|
+
expected: "(Array<string | RenderProfileObject> | RenderProfileObject | string)",
|
|
710
|
+
value: input.profile
|
|
711
|
+
}, errorFactory)));
|
|
712
|
+
const $ao1 = (input, _path, _exceptionable = true) => ("string" === typeof input.format || $guard(_exceptionable, {
|
|
424
713
|
path: _path + ".format",
|
|
425
|
-
expected: "
|
|
714
|
+
expected: "string",
|
|
426
715
|
value: input.format
|
|
427
|
-
}, errorFactory)) &&
|
|
716
|
+
}, errorFactory)) && (undefined === input.transcribe || ("object" === typeof input.transcribe && null !== input.transcribe || $guard(_exceptionable, {
|
|
717
|
+
path: _path + ".transcribe",
|
|
718
|
+
expected: "(__type | undefined)",
|
|
719
|
+
value: input.transcribe
|
|
720
|
+
}, errorFactory)) && $ao2(input.transcribe, _path + ".transcribe", true && _exceptionable) || $guard(_exceptionable, {
|
|
721
|
+
path: _path + ".transcribe",
|
|
722
|
+
expected: "(__type | undefined)",
|
|
723
|
+
value: input.transcribe
|
|
724
|
+
}, errorFactory)) && (undefined === input.translate || ("object" === typeof input.translate && null !== input.translate || $guard(_exceptionable, {
|
|
725
|
+
path: _path + ".translate",
|
|
726
|
+
expected: "(__type.o1 | undefined)",
|
|
727
|
+
value: input.translate
|
|
728
|
+
}, errorFactory)) && $ao3(input.translate, _path + ".translate", true && _exceptionable) || $guard(_exceptionable, {
|
|
729
|
+
path: _path + ".translate",
|
|
730
|
+
expected: "(__type.o1 | undefined)",
|
|
731
|
+
value: input.translate
|
|
732
|
+
}, errorFactory)) && (undefined === input.audio || ("object" === typeof input.audio && null !== input.audio && false === Array.isArray(input.audio) || $guard(_exceptionable, {
|
|
733
|
+
path: _path + ".audio",
|
|
734
|
+
expected: "(__type.o2 | undefined)",
|
|
735
|
+
value: input.audio
|
|
736
|
+
}, errorFactory)) && $ao4(input.audio, _path + ".audio", true && _exceptionable) || $guard(_exceptionable, {
|
|
737
|
+
path: _path + ".audio",
|
|
738
|
+
expected: "(__type.o2 | undefined)",
|
|
739
|
+
value: input.audio
|
|
740
|
+
}, errorFactory)) && true && (undefined === input.pick || (Array.isArray(input.pick) || $guard(_exceptionable, {
|
|
428
741
|
path: _path + ".pick",
|
|
429
742
|
expected: "(Array<string> | undefined)",
|
|
430
743
|
value: input.pick
|
|
431
|
-
}, errorFactory)) && input.pick.every((elem,
|
|
432
|
-
path: _path + ".pick[" +
|
|
744
|
+
}, errorFactory)) && input.pick.every((elem, _index2) => "string" === typeof elem || $guard(_exceptionable, {
|
|
745
|
+
path: _path + ".pick[" + _index2 + "]",
|
|
433
746
|
expected: "string",
|
|
434
747
|
value: elem
|
|
435
748
|
}, errorFactory)) || $guard(_exceptionable, {
|
|
@@ -437,50 +750,165 @@ export const assertGuardRenderPresetProfile = (input, errorFactory) => {
|
|
|
437
750
|
expected: "(Array<string> | undefined)",
|
|
438
751
|
value: input.pick
|
|
439
752
|
}, errorFactory));
|
|
440
|
-
|
|
753
|
+
const $ao2 = (input, _path, _exceptionable = true) => "string" === typeof input.engine || $guard(_exceptionable, {
|
|
754
|
+
path: _path + ".engine",
|
|
755
|
+
expected: "string",
|
|
756
|
+
value: input.engine
|
|
757
|
+
}, errorFactory);
|
|
758
|
+
const $ao3 = (input, _path, _exceptionable = true) => "string" === typeof input.language || $guard(_exceptionable, {
|
|
759
|
+
path: _path + ".language",
|
|
760
|
+
expected: "string",
|
|
761
|
+
value: input.language
|
|
762
|
+
}, errorFactory);
|
|
763
|
+
const $ao4 = (input, _path, _exceptionable = true) => undefined === input.pan || "string" === typeof input.pan || $guard(_exceptionable, {
|
|
764
|
+
path: _path + ".pan",
|
|
765
|
+
expected: "(string | undefined)",
|
|
766
|
+
value: input.pan
|
|
767
|
+
}, errorFactory);
|
|
768
|
+
return (null !== input || $guard(true, {
|
|
441
769
|
path: _path + "",
|
|
442
|
-
expected: "
|
|
770
|
+
expected: "(RenderPresetObject | string)",
|
|
771
|
+
value: input
|
|
772
|
+
}, errorFactory)) && (undefined !== input || $guard(true, {
|
|
773
|
+
path: _path + "",
|
|
774
|
+
expected: "(RenderPresetObject | string)",
|
|
775
|
+
value: input
|
|
776
|
+
}, errorFactory)) && ("string" === typeof input || ("object" === typeof input && null !== input || $guard(true, {
|
|
777
|
+
path: _path + "",
|
|
778
|
+
expected: "(RenderPresetObject | string)",
|
|
443
779
|
value: input
|
|
444
780
|
}, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
|
|
445
781
|
path: _path + "",
|
|
446
|
-
expected: "
|
|
782
|
+
expected: "(RenderPresetObject | string)",
|
|
447
783
|
value: input
|
|
448
|
-
}, errorFactory);
|
|
784
|
+
}, errorFactory));
|
|
449
785
|
})(input, "$input", true);
|
|
450
786
|
};
|
|
451
|
-
export const
|
|
787
|
+
export const stringifyRenderPreset = input => {
|
|
788
|
+
const $io1 = input => "string" === typeof input.format && (undefined === input.transcribe || "object" === typeof input.transcribe && null !== input.transcribe && $io2(input.transcribe)) && (undefined === input.translate || "object" === typeof input.translate && null !== input.translate && $io3(input.translate)) && (undefined === input.audio || "object" === typeof input.audio && null !== input.audio && false === Array.isArray(input.audio) && $io4(input.audio)) && true && (undefined === input.pick || Array.isArray(input.pick) && input.pick.every(elem => "string" === typeof elem));
|
|
789
|
+
const $io2 = input => "string" === typeof input.engine;
|
|
790
|
+
const $io3 = input => "string" === typeof input.language;
|
|
791
|
+
const $io4 = input => undefined === input.pan || "string" === typeof input.pan;
|
|
452
792
|
const $string = __typia.json.createStringify.string;
|
|
453
793
|
const $throws = __typia.json.createStringify.throws;
|
|
454
|
-
const $
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
794
|
+
const $tail = __typia.json.createStringify.tail;
|
|
795
|
+
const $so0 = input => `{"type":${$string(input.type)},"profile":${(() => {
|
|
796
|
+
if ("string" === typeof input.profile)
|
|
797
|
+
return $string(input.profile);
|
|
798
|
+
if (Array.isArray(input.profile))
|
|
799
|
+
return `[${input.profile.map(elem => (() => {
|
|
800
|
+
if ("string" === typeof elem)
|
|
801
|
+
return $string(elem);
|
|
802
|
+
if ("object" === typeof elem && null !== elem)
|
|
803
|
+
return $so1(elem);
|
|
804
|
+
$throws({
|
|
805
|
+
expected: "(RenderProfileObject | string)",
|
|
806
|
+
value: elem
|
|
807
|
+
});
|
|
808
|
+
})()).join(",")}]`;
|
|
809
|
+
if ("object" === typeof input.profile && null !== input.profile)
|
|
810
|
+
return $so1(input.profile);
|
|
459
811
|
$throws({
|
|
460
|
-
expected: "(
|
|
461
|
-
value: input.
|
|
812
|
+
expected: "(Array<string | RenderProfileObject> | RenderProfileObject | string)",
|
|
813
|
+
value: input.profile
|
|
462
814
|
});
|
|
463
815
|
})()}}`;
|
|
464
|
-
|
|
816
|
+
const $so1 = input => `{${undefined === input.transcribe ? "" : `"transcribe":${undefined !== input.transcribe ? `{"engine":${$string(input.transcribe.engine)}}` : undefined},`}${undefined === input.translate ? "" : `"translate":${undefined !== input.translate ? `{"language":${$string(input.translate.language)}}` : undefined},`}${undefined === input.audio ? "" : `"audio":${undefined !== input.audio ? $so4(input.audio) : undefined},`}${undefined === input.video || "function" === typeof input.video ? "" : `"video":${undefined !== input.video ? JSON.stringify(input.video) : undefined},`}${undefined === input.pick ? "" : `"pick":${undefined !== input.pick ? `[${input.pick.map(elem => $string(elem)).join(",")}]` : undefined},`}"format":${$string(input.format)}}`;
|
|
817
|
+
const $so4 = input => `{${$tail(`${undefined === input.pan ? "" : `"pan":${undefined !== input.pan ? $string(input.pan) : undefined}`}`)}}`;
|
|
818
|
+
return (() => {
|
|
819
|
+
if ("string" === typeof input)
|
|
820
|
+
return $string(input);
|
|
821
|
+
if ("object" === typeof input && null !== input)
|
|
822
|
+
return $so0(input);
|
|
823
|
+
$throws({
|
|
824
|
+
expected: "(RenderPresetObject | string)",
|
|
825
|
+
value: input
|
|
826
|
+
});
|
|
827
|
+
})();
|
|
465
828
|
};
|
|
466
|
-
export const
|
|
829
|
+
export const assertStringifyRenderPreset = (input, errorFactory) => { const assert = (input, errorFactory) => {
|
|
467
830
|
const __is = input => {
|
|
468
|
-
const $io0 = input =>
|
|
469
|
-
|
|
831
|
+
const $io0 = input => "string" === typeof input.type && (null !== input.profile && undefined !== input.profile && ("string" === typeof input.profile || (Array.isArray(input.profile) && input.profile.every(elem => null !== elem && undefined !== elem && ("string" === typeof elem || "object" === typeof elem && null !== elem && $io1(elem))) || "object" === typeof input.profile && null !== input.profile && $io1(input.profile))));
|
|
832
|
+
const $io1 = input => "string" === typeof input.format && (undefined === input.transcribe || "object" === typeof input.transcribe && null !== input.transcribe && $io2(input.transcribe)) && (undefined === input.translate || "object" === typeof input.translate && null !== input.translate && $io3(input.translate)) && (undefined === input.audio || "object" === typeof input.audio && null !== input.audio && false === Array.isArray(input.audio) && $io4(input.audio)) && true && (undefined === input.pick || Array.isArray(input.pick) && input.pick.every(elem => "string" === typeof elem));
|
|
833
|
+
const $io2 = input => "string" === typeof input.engine;
|
|
834
|
+
const $io3 = input => "string" === typeof input.language;
|
|
835
|
+
const $io4 = input => undefined === input.pan || "string" === typeof input.pan;
|
|
836
|
+
return null !== input && undefined !== input && ("string" === typeof input || "object" === typeof input && null !== input && $io0(input));
|
|
470
837
|
};
|
|
471
838
|
if (false === __is(input))
|
|
472
839
|
((input, _path, _exceptionable = true) => {
|
|
473
840
|
const $guard = __typia.json.createAssertStringify.guard;
|
|
474
|
-
const $ao0 = (input, _path, _exceptionable = true) => ("
|
|
841
|
+
const $ao0 = (input, _path, _exceptionable = true) => ("string" === typeof input.type || $guard(_exceptionable, {
|
|
842
|
+
path: _path + ".type",
|
|
843
|
+
expected: "string",
|
|
844
|
+
value: input.type
|
|
845
|
+
}, errorFactory)) && ((null !== input.profile || $guard(_exceptionable, {
|
|
846
|
+
path: _path + ".profile",
|
|
847
|
+
expected: "(Array<string | RenderProfileObject> | RenderProfileObject | string)",
|
|
848
|
+
value: input.profile
|
|
849
|
+
}, errorFactory)) && (undefined !== input.profile || $guard(_exceptionable, {
|
|
850
|
+
path: _path + ".profile",
|
|
851
|
+
expected: "(Array<string | RenderProfileObject> | RenderProfileObject | string)",
|
|
852
|
+
value: input.profile
|
|
853
|
+
}, errorFactory)) && ("string" === typeof input.profile || (Array.isArray(input.profile) && input.profile.every((elem, _index1) => (null !== elem || $guard(_exceptionable, {
|
|
854
|
+
path: _path + ".profile[" + _index1 + "]",
|
|
855
|
+
expected: "(RenderProfileObject | string)",
|
|
856
|
+
value: elem
|
|
857
|
+
}, errorFactory)) && (undefined !== elem || $guard(_exceptionable, {
|
|
858
|
+
path: _path + ".profile[" + _index1 + "]",
|
|
859
|
+
expected: "(RenderProfileObject | string)",
|
|
860
|
+
value: elem
|
|
861
|
+
}, errorFactory)) && ("string" === typeof elem || ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
|
|
862
|
+
path: _path + ".profile[" + _index1 + "]",
|
|
863
|
+
expected: "(RenderProfileObject | string)",
|
|
864
|
+
value: elem
|
|
865
|
+
}, errorFactory)) && $ao1(elem, _path + ".profile[" + _index1 + "]", true && _exceptionable) || $guard(_exceptionable, {
|
|
866
|
+
path: _path + ".profile[" + _index1 + "]",
|
|
867
|
+
expected: "(RenderProfileObject | string)",
|
|
868
|
+
value: elem
|
|
869
|
+
}, errorFactory))) || "object" === typeof input.profile && null !== input.profile && $ao1(input.profile, _path + ".profile", true && _exceptionable) || $guard(_exceptionable, {
|
|
870
|
+
path: _path + ".profile",
|
|
871
|
+
expected: "(Array<string | RenderProfileObject> | RenderProfileObject | string)",
|
|
872
|
+
value: input.profile
|
|
873
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
|
874
|
+
path: _path + ".profile",
|
|
875
|
+
expected: "(Array<string | RenderProfileObject> | RenderProfileObject | string)",
|
|
876
|
+
value: input.profile
|
|
877
|
+
}, errorFactory)));
|
|
878
|
+
const $ao1 = (input, _path, _exceptionable = true) => ("string" === typeof input.format || $guard(_exceptionable, {
|
|
475
879
|
path: _path + ".format",
|
|
476
|
-
expected: "
|
|
880
|
+
expected: "string",
|
|
477
881
|
value: input.format
|
|
478
|
-
}, errorFactory)) &&
|
|
882
|
+
}, errorFactory)) && (undefined === input.transcribe || ("object" === typeof input.transcribe && null !== input.transcribe || $guard(_exceptionable, {
|
|
883
|
+
path: _path + ".transcribe",
|
|
884
|
+
expected: "(__type | undefined)",
|
|
885
|
+
value: input.transcribe
|
|
886
|
+
}, errorFactory)) && $ao2(input.transcribe, _path + ".transcribe", true && _exceptionable) || $guard(_exceptionable, {
|
|
887
|
+
path: _path + ".transcribe",
|
|
888
|
+
expected: "(__type | undefined)",
|
|
889
|
+
value: input.transcribe
|
|
890
|
+
}, errorFactory)) && (undefined === input.translate || ("object" === typeof input.translate && null !== input.translate || $guard(_exceptionable, {
|
|
891
|
+
path: _path + ".translate",
|
|
892
|
+
expected: "(__type.o1 | undefined)",
|
|
893
|
+
value: input.translate
|
|
894
|
+
}, errorFactory)) && $ao3(input.translate, _path + ".translate", true && _exceptionable) || $guard(_exceptionable, {
|
|
895
|
+
path: _path + ".translate",
|
|
896
|
+
expected: "(__type.o1 | undefined)",
|
|
897
|
+
value: input.translate
|
|
898
|
+
}, errorFactory)) && (undefined === input.audio || ("object" === typeof input.audio && null !== input.audio && false === Array.isArray(input.audio) || $guard(_exceptionable, {
|
|
899
|
+
path: _path + ".audio",
|
|
900
|
+
expected: "(__type.o2 | undefined)",
|
|
901
|
+
value: input.audio
|
|
902
|
+
}, errorFactory)) && $ao4(input.audio, _path + ".audio", true && _exceptionable) || $guard(_exceptionable, {
|
|
903
|
+
path: _path + ".audio",
|
|
904
|
+
expected: "(__type.o2 | undefined)",
|
|
905
|
+
value: input.audio
|
|
906
|
+
}, errorFactory)) && true && (undefined === input.pick || (Array.isArray(input.pick) || $guard(_exceptionable, {
|
|
479
907
|
path: _path + ".pick",
|
|
480
908
|
expected: "(Array<string> | undefined)",
|
|
481
909
|
value: input.pick
|
|
482
|
-
}, errorFactory)) && input.pick.every((elem,
|
|
483
|
-
path: _path + ".pick[" +
|
|
910
|
+
}, errorFactory)) && input.pick.every((elem, _index2) => "string" === typeof elem || $guard(_exceptionable, {
|
|
911
|
+
path: _path + ".pick[" + _index2 + "]",
|
|
484
912
|
expected: "string",
|
|
485
913
|
value: elem
|
|
486
914
|
}, errorFactory)) || $guard(_exceptionable, {
|
|
@@ -488,29 +916,79 @@ export const assertStringifyRenderPresetProfile = (input, errorFactory) => { con
|
|
|
488
916
|
expected: "(Array<string> | undefined)",
|
|
489
917
|
value: input.pick
|
|
490
918
|
}, errorFactory));
|
|
491
|
-
|
|
919
|
+
const $ao2 = (input, _path, _exceptionable = true) => "string" === typeof input.engine || $guard(_exceptionable, {
|
|
920
|
+
path: _path + ".engine",
|
|
921
|
+
expected: "string",
|
|
922
|
+
value: input.engine
|
|
923
|
+
}, errorFactory);
|
|
924
|
+
const $ao3 = (input, _path, _exceptionable = true) => "string" === typeof input.language || $guard(_exceptionable, {
|
|
925
|
+
path: _path + ".language",
|
|
926
|
+
expected: "string",
|
|
927
|
+
value: input.language
|
|
928
|
+
}, errorFactory);
|
|
929
|
+
const $ao4 = (input, _path, _exceptionable = true) => undefined === input.pan || "string" === typeof input.pan || $guard(_exceptionable, {
|
|
930
|
+
path: _path + ".pan",
|
|
931
|
+
expected: "(string | undefined)",
|
|
932
|
+
value: input.pan
|
|
933
|
+
}, errorFactory);
|
|
934
|
+
return (null !== input || $guard(true, {
|
|
935
|
+
path: _path + "",
|
|
936
|
+
expected: "(RenderPresetObject | string)",
|
|
937
|
+
value: input
|
|
938
|
+
}, errorFactory)) && (undefined !== input || $guard(true, {
|
|
492
939
|
path: _path + "",
|
|
493
|
-
expected: "
|
|
940
|
+
expected: "(RenderPresetObject | string)",
|
|
941
|
+
value: input
|
|
942
|
+
}, errorFactory)) && ("string" === typeof input || ("object" === typeof input && null !== input || $guard(true, {
|
|
943
|
+
path: _path + "",
|
|
944
|
+
expected: "(RenderPresetObject | string)",
|
|
494
945
|
value: input
|
|
495
946
|
}, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
|
|
496
947
|
path: _path + "",
|
|
497
|
-
expected: "
|
|
948
|
+
expected: "(RenderPresetObject | string)",
|
|
498
949
|
value: input
|
|
499
|
-
}, errorFactory);
|
|
950
|
+
}, errorFactory));
|
|
500
951
|
})(input, "$input", true);
|
|
501
952
|
return input;
|
|
502
953
|
}; const stringify = input => {
|
|
954
|
+
const $io1 = input => "string" === typeof input.format && (undefined === input.transcribe || "object" === typeof input.transcribe && null !== input.transcribe && $io2(input.transcribe)) && (undefined === input.translate || "object" === typeof input.translate && null !== input.translate && $io3(input.translate)) && (undefined === input.audio || "object" === typeof input.audio && null !== input.audio && false === Array.isArray(input.audio) && $io4(input.audio)) && true && (undefined === input.pick || Array.isArray(input.pick) && input.pick.every(elem => "string" === typeof elem));
|
|
955
|
+
const $io2 = input => "string" === typeof input.engine;
|
|
956
|
+
const $io3 = input => "string" === typeof input.language;
|
|
957
|
+
const $io4 = input => undefined === input.pan || "string" === typeof input.pan;
|
|
503
958
|
const $string = __typia.json.createAssertStringify.string;
|
|
504
959
|
const $throws = __typia.json.createAssertStringify.throws;
|
|
505
|
-
const $
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
960
|
+
const $tail = __typia.json.createAssertStringify.tail;
|
|
961
|
+
const $so0 = input => `{"type":${$string(input.type)},"profile":${(() => {
|
|
962
|
+
if ("string" === typeof input.profile)
|
|
963
|
+
return $string(input.profile);
|
|
964
|
+
if (Array.isArray(input.profile))
|
|
965
|
+
return `[${input.profile.map(elem => (() => {
|
|
966
|
+
if ("string" === typeof elem)
|
|
967
|
+
return $string(elem);
|
|
968
|
+
if ("object" === typeof elem && null !== elem)
|
|
969
|
+
return $so1(elem);
|
|
970
|
+
$throws({
|
|
971
|
+
expected: "(RenderProfileObject | string)",
|
|
972
|
+
value: elem
|
|
973
|
+
});
|
|
974
|
+
})()).join(",")}]`;
|
|
975
|
+
if ("object" === typeof input.profile && null !== input.profile)
|
|
976
|
+
return $so1(input.profile);
|
|
510
977
|
$throws({
|
|
511
|
-
expected: "(
|
|
512
|
-
value: input.
|
|
978
|
+
expected: "(Array<string | RenderProfileObject> | RenderProfileObject | string)",
|
|
979
|
+
value: input.profile
|
|
513
980
|
});
|
|
514
981
|
})()}}`;
|
|
515
|
-
|
|
982
|
+
const $so1 = input => `{${undefined === input.transcribe ? "" : `"transcribe":${undefined !== input.transcribe ? `{"engine":${$string(input.transcribe.engine)}}` : undefined},`}${undefined === input.translate ? "" : `"translate":${undefined !== input.translate ? `{"language":${$string(input.translate.language)}}` : undefined},`}${undefined === input.audio ? "" : `"audio":${undefined !== input.audio ? $so4(input.audio) : undefined},`}${undefined === input.video || "function" === typeof input.video ? "" : `"video":${undefined !== input.video ? JSON.stringify(input.video) : undefined},`}${undefined === input.pick ? "" : `"pick":${undefined !== input.pick ? `[${input.pick.map(elem => $string(elem)).join(",")}]` : undefined},`}"format":${$string(input.format)}}`;
|
|
983
|
+
const $so4 = input => `{${$tail(`${undefined === input.pan ? "" : `"pan":${undefined !== input.pan ? $string(input.pan) : undefined}`}`)}}`;
|
|
984
|
+
return (() => {
|
|
985
|
+
if ("string" === typeof input)
|
|
986
|
+
return $string(input);
|
|
987
|
+
if ("object" === typeof input && null !== input)
|
|
988
|
+
return $so0(input);
|
|
989
|
+
$throws({
|
|
990
|
+
expected: "(RenderPresetObject | string)",
|
|
991
|
+
value: input
|
|
992
|
+
});
|
|
993
|
+
})();
|
|
516
994
|
}; return stringify(assert(input, errorFactory)); };
|