@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,516 @@
|
|
|
1
|
+
import __typia from "typia";
|
|
2
|
+
export const isRenderPreset = input => {
|
|
3
|
+
const $io0 = input => (undefined === input.type || "string" === typeof input.type) && true && (null !== input.profile && (undefined === input.profile || "string" === typeof input.profile || "object" === typeof input.profile && null !== input.profile && $io1(input.profile)));
|
|
4
|
+
const $io1 = input => ("png" === input.format || "mp4" === input.format) && true && true && true && (undefined === input.pick || Array.isArray(input.pick) && input.pick.every(elem => "string" === typeof elem));
|
|
5
|
+
return "object" === typeof input && null !== input && false === Array.isArray(input) && $io0(input);
|
|
6
|
+
};
|
|
7
|
+
export const assertRenderPreset = (input, errorFactory) => {
|
|
8
|
+
const __is = input => {
|
|
9
|
+
const $io0 = input => (undefined === input.type || "string" === typeof input.type) && true && (null !== input.profile && (undefined === input.profile || "string" === typeof input.profile || "object" === typeof input.profile && null !== input.profile && $io1(input.profile)));
|
|
10
|
+
const $io1 = input => ("png" === input.format || "mp4" === input.format) && true && true && true && (undefined === input.pick || Array.isArray(input.pick) && input.pick.every(elem => "string" === typeof elem));
|
|
11
|
+
return "object" === typeof input && null !== input && false === Array.isArray(input) && $io0(input);
|
|
12
|
+
};
|
|
13
|
+
if (false === __is(input))
|
|
14
|
+
((input, _path, _exceptionable = true) => {
|
|
15
|
+
const $guard = __typia.createAssert.guard;
|
|
16
|
+
const $ao0 = (input, _path, _exceptionable = true) => (undefined === input.type || "string" === typeof input.type || $guard(_exceptionable, {
|
|
17
|
+
path: _path + ".type",
|
|
18
|
+
expected: "(string | undefined)",
|
|
19
|
+
value: input.type
|
|
20
|
+
}, errorFactory)) && true && ((null !== input.profile || $guard(_exceptionable, {
|
|
21
|
+
path: _path + ".profile",
|
|
22
|
+
expected: "(RenderPresetProfile | string | undefined)",
|
|
23
|
+
value: input.profile
|
|
24
|
+
}, errorFactory)) && (undefined === input.profile || "string" === typeof input.profile || ("object" === typeof input.profile && null !== input.profile || $guard(_exceptionable, {
|
|
25
|
+
path: _path + ".profile",
|
|
26
|
+
expected: "(RenderPresetProfile | string | undefined)",
|
|
27
|
+
value: input.profile
|
|
28
|
+
}, errorFactory)) && $ao1(input.profile, _path + ".profile", true && _exceptionable) || $guard(_exceptionable, {
|
|
29
|
+
path: _path + ".profile",
|
|
30
|
+
expected: "(RenderPresetProfile | string | undefined)",
|
|
31
|
+
value: input.profile
|
|
32
|
+
}, errorFactory)));
|
|
33
|
+
const $ao1 = (input, _path, _exceptionable = true) => ("png" === input.format || "mp4" === input.format || $guard(_exceptionable, {
|
|
34
|
+
path: _path + ".format",
|
|
35
|
+
expected: "(\"mp4\" | \"png\")",
|
|
36
|
+
value: input.format
|
|
37
|
+
}, errorFactory)) && true && true && true && (undefined === input.pick || (Array.isArray(input.pick) || $guard(_exceptionable, {
|
|
38
|
+
path: _path + ".pick",
|
|
39
|
+
expected: "(Array<string> | undefined)",
|
|
40
|
+
value: input.pick
|
|
41
|
+
}, errorFactory)) && input.pick.every((elem, _index1) => "string" === typeof elem || $guard(_exceptionable, {
|
|
42
|
+
path: _path + ".pick[" + _index1 + "]",
|
|
43
|
+
expected: "string",
|
|
44
|
+
value: elem
|
|
45
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
|
46
|
+
path: _path + ".pick",
|
|
47
|
+
expected: "(Array<string> | undefined)",
|
|
48
|
+
value: input.pick
|
|
49
|
+
}, errorFactory));
|
|
50
|
+
return ("object" === typeof input && null !== input && false === Array.isArray(input) || $guard(true, {
|
|
51
|
+
path: _path + "",
|
|
52
|
+
expected: "RenderPreset",
|
|
53
|
+
value: input
|
|
54
|
+
}, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
|
|
55
|
+
path: _path + "",
|
|
56
|
+
expected: "RenderPreset",
|
|
57
|
+
value: input
|
|
58
|
+
}, errorFactory);
|
|
59
|
+
})(input, "$input", true);
|
|
60
|
+
return input;
|
|
61
|
+
};
|
|
62
|
+
export const randomRenderPreset = generator => {
|
|
63
|
+
const $generator = __typia.createRandom.generator;
|
|
64
|
+
const $pick = __typia.createRandom.pick;
|
|
65
|
+
const $ro0 = (_recursive = false, _depth = 0) => ({
|
|
66
|
+
type: $pick([
|
|
67
|
+
() => undefined,
|
|
68
|
+
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
|
|
69
|
+
])(),
|
|
70
|
+
description: $pick([
|
|
71
|
+
() => "any type used...",
|
|
72
|
+
() => undefined
|
|
73
|
+
])(),
|
|
74
|
+
profile: $pick([
|
|
75
|
+
() => undefined,
|
|
76
|
+
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
|
|
77
|
+
() => $ro1(_recursive, _recursive ? 1 + _depth : _depth)
|
|
78
|
+
])()
|
|
79
|
+
});
|
|
80
|
+
const $ro1 = (_recursive = false, _depth = 0) => ({
|
|
81
|
+
format: $pick([
|
|
82
|
+
() => "png",
|
|
83
|
+
() => "mp4"
|
|
84
|
+
])(),
|
|
85
|
+
transcribe: $pick([
|
|
86
|
+
() => "any type used...",
|
|
87
|
+
() => undefined
|
|
88
|
+
])(),
|
|
89
|
+
audio: $pick([
|
|
90
|
+
() => "any type used...",
|
|
91
|
+
() => undefined
|
|
92
|
+
])(),
|
|
93
|
+
video: $pick([
|
|
94
|
+
() => "any type used...",
|
|
95
|
+
() => undefined
|
|
96
|
+
])(),
|
|
97
|
+
pick: $pick([
|
|
98
|
+
() => undefined,
|
|
99
|
+
() => (generator?.array ?? $generator.array)(() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)())
|
|
100
|
+
])()
|
|
101
|
+
});
|
|
102
|
+
return $ro0();
|
|
103
|
+
};
|
|
104
|
+
export const assertGuardRenderPreset = (input, errorFactory) => {
|
|
105
|
+
const __is = input => {
|
|
106
|
+
const $io0 = input => (undefined === input.type || "string" === typeof input.type) && true && (null !== input.profile && (undefined === input.profile || "string" === typeof input.profile || "object" === typeof input.profile && null !== input.profile && $io1(input.profile)));
|
|
107
|
+
const $io1 = input => ("png" === input.format || "mp4" === input.format) && true && true && true && (undefined === input.pick || Array.isArray(input.pick) && input.pick.every(elem => "string" === typeof elem));
|
|
108
|
+
return "object" === typeof input && null !== input && false === Array.isArray(input) && $io0(input);
|
|
109
|
+
};
|
|
110
|
+
if (false === __is(input))
|
|
111
|
+
((input, _path, _exceptionable = true) => {
|
|
112
|
+
const $guard = __typia.createAssertGuard.guard;
|
|
113
|
+
const $ao0 = (input, _path, _exceptionable = true) => (undefined === input.type || "string" === typeof input.type || $guard(_exceptionable, {
|
|
114
|
+
path: _path + ".type",
|
|
115
|
+
expected: "(string | undefined)",
|
|
116
|
+
value: input.type
|
|
117
|
+
}, errorFactory)) && true && ((null !== input.profile || $guard(_exceptionable, {
|
|
118
|
+
path: _path + ".profile",
|
|
119
|
+
expected: "(RenderPresetProfile | string | undefined)",
|
|
120
|
+
value: input.profile
|
|
121
|
+
}, errorFactory)) && (undefined === input.profile || "string" === typeof input.profile || ("object" === typeof input.profile && null !== input.profile || $guard(_exceptionable, {
|
|
122
|
+
path: _path + ".profile",
|
|
123
|
+
expected: "(RenderPresetProfile | string | undefined)",
|
|
124
|
+
value: input.profile
|
|
125
|
+
}, errorFactory)) && $ao1(input.profile, _path + ".profile", true && _exceptionable) || $guard(_exceptionable, {
|
|
126
|
+
path: _path + ".profile",
|
|
127
|
+
expected: "(RenderPresetProfile | string | undefined)",
|
|
128
|
+
value: input.profile
|
|
129
|
+
}, errorFactory)));
|
|
130
|
+
const $ao1 = (input, _path, _exceptionable = true) => ("png" === input.format || "mp4" === input.format || $guard(_exceptionable, {
|
|
131
|
+
path: _path + ".format",
|
|
132
|
+
expected: "(\"mp4\" | \"png\")",
|
|
133
|
+
value: input.format
|
|
134
|
+
}, errorFactory)) && true && true && true && (undefined === input.pick || (Array.isArray(input.pick) || $guard(_exceptionable, {
|
|
135
|
+
path: _path + ".pick",
|
|
136
|
+
expected: "(Array<string> | undefined)",
|
|
137
|
+
value: input.pick
|
|
138
|
+
}, errorFactory)) && input.pick.every((elem, _index1) => "string" === typeof elem || $guard(_exceptionable, {
|
|
139
|
+
path: _path + ".pick[" + _index1 + "]",
|
|
140
|
+
expected: "string",
|
|
141
|
+
value: elem
|
|
142
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
|
143
|
+
path: _path + ".pick",
|
|
144
|
+
expected: "(Array<string> | undefined)",
|
|
145
|
+
value: input.pick
|
|
146
|
+
}, errorFactory));
|
|
147
|
+
return ("object" === typeof input && null !== input && false === Array.isArray(input) || $guard(true, {
|
|
148
|
+
path: _path + "",
|
|
149
|
+
expected: "RenderPreset",
|
|
150
|
+
value: input
|
|
151
|
+
}, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
|
|
152
|
+
path: _path + "",
|
|
153
|
+
expected: "RenderPreset",
|
|
154
|
+
value: input
|
|
155
|
+
}, errorFactory);
|
|
156
|
+
})(input, "$input", true);
|
|
157
|
+
};
|
|
158
|
+
export const stringifyRenderPreset = input => {
|
|
159
|
+
const $io1 = input => ("png" === input.format || "mp4" === input.format) && true && true && true && (undefined === input.pick || Array.isArray(input.pick) && input.pick.every(elem => "string" === typeof elem));
|
|
160
|
+
const $string = __typia.json.createStringify.string;
|
|
161
|
+
const $throws = __typia.json.createStringify.throws;
|
|
162
|
+
const $tail = __typia.json.createStringify.tail;
|
|
163
|
+
const $so0 = input => `{${$tail(`${undefined === input.type ? "" : `"type":${undefined !== input.type ? $string(input.type) : undefined},`}${undefined === input.description || "function" === typeof input.description ? "" : `"description":${undefined !== input.description ? JSON.stringify(input.description) : undefined},`}${undefined === input.profile ? "" : `"profile":${undefined !== input.profile ? (() => {
|
|
164
|
+
if ("string" === typeof input.profile)
|
|
165
|
+
return $string(input.profile);
|
|
166
|
+
if ("object" === typeof input.profile && null !== input.profile)
|
|
167
|
+
return $so1(input.profile);
|
|
168
|
+
$throws({
|
|
169
|
+
expected: "(RenderPresetProfile | string | undefined)",
|
|
170
|
+
value: input.profile
|
|
171
|
+
});
|
|
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
|
+
})()}}`;
|
|
183
|
+
return $so0(input);
|
|
184
|
+
};
|
|
185
|
+
export const assertStringifyRenderPreset = (input, errorFactory) => { const assert = (input, errorFactory) => {
|
|
186
|
+
const __is = input => {
|
|
187
|
+
const $io0 = input => (undefined === input.type || "string" === typeof input.type) && true && (null !== input.profile && (undefined === input.profile || "string" === typeof input.profile || "object" === typeof input.profile && null !== input.profile && $io1(input.profile)));
|
|
188
|
+
const $io1 = input => ("png" === input.format || "mp4" === input.format) && true && true && true && (undefined === input.pick || Array.isArray(input.pick) && input.pick.every(elem => "string" === typeof elem));
|
|
189
|
+
return "object" === typeof input && null !== input && false === Array.isArray(input) && $io0(input);
|
|
190
|
+
};
|
|
191
|
+
if (false === __is(input))
|
|
192
|
+
((input, _path, _exceptionable = true) => {
|
|
193
|
+
const $guard = __typia.json.createAssertStringify.guard;
|
|
194
|
+
const $ao0 = (input, _path, _exceptionable = true) => (undefined === input.type || "string" === typeof input.type || $guard(_exceptionable, {
|
|
195
|
+
path: _path + ".type",
|
|
196
|
+
expected: "(string | undefined)",
|
|
197
|
+
value: input.type
|
|
198
|
+
}, errorFactory)) && true && ((null !== input.profile || $guard(_exceptionable, {
|
|
199
|
+
path: _path + ".profile",
|
|
200
|
+
expected: "(RenderPresetProfile | string | undefined)",
|
|
201
|
+
value: input.profile
|
|
202
|
+
}, errorFactory)) && (undefined === input.profile || "string" === typeof input.profile || ("object" === typeof input.profile && null !== input.profile || $guard(_exceptionable, {
|
|
203
|
+
path: _path + ".profile",
|
|
204
|
+
expected: "(RenderPresetProfile | string | undefined)",
|
|
205
|
+
value: input.profile
|
|
206
|
+
}, errorFactory)) && $ao1(input.profile, _path + ".profile", true && _exceptionable) || $guard(_exceptionable, {
|
|
207
|
+
path: _path + ".profile",
|
|
208
|
+
expected: "(RenderPresetProfile | string | undefined)",
|
|
209
|
+
value: input.profile
|
|
210
|
+
}, errorFactory)));
|
|
211
|
+
const $ao1 = (input, _path, _exceptionable = true) => ("png" === input.format || "mp4" === input.format || $guard(_exceptionable, {
|
|
212
|
+
path: _path + ".format",
|
|
213
|
+
expected: "(\"mp4\" | \"png\")",
|
|
214
|
+
value: input.format
|
|
215
|
+
}, errorFactory)) && true && true && true && (undefined === input.pick || (Array.isArray(input.pick) || $guard(_exceptionable, {
|
|
216
|
+
path: _path + ".pick",
|
|
217
|
+
expected: "(Array<string> | undefined)",
|
|
218
|
+
value: input.pick
|
|
219
|
+
}, errorFactory)) && input.pick.every((elem, _index1) => "string" === typeof elem || $guard(_exceptionable, {
|
|
220
|
+
path: _path + ".pick[" + _index1 + "]",
|
|
221
|
+
expected: "string",
|
|
222
|
+
value: elem
|
|
223
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
|
224
|
+
path: _path + ".pick",
|
|
225
|
+
expected: "(Array<string> | undefined)",
|
|
226
|
+
value: input.pick
|
|
227
|
+
}, errorFactory));
|
|
228
|
+
return ("object" === typeof input && null !== input && false === Array.isArray(input) || $guard(true, {
|
|
229
|
+
path: _path + "",
|
|
230
|
+
expected: "RenderPreset",
|
|
231
|
+
value: input
|
|
232
|
+
}, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
|
|
233
|
+
path: _path + "",
|
|
234
|
+
expected: "RenderPreset",
|
|
235
|
+
value: input
|
|
236
|
+
}, errorFactory);
|
|
237
|
+
})(input, "$input", true);
|
|
238
|
+
return input;
|
|
239
|
+
}; const stringify = input => {
|
|
240
|
+
const $io1 = input => ("png" === input.format || "mp4" === input.format) && true && true && true && (undefined === input.pick || Array.isArray(input.pick) && input.pick.every(elem => "string" === typeof elem));
|
|
241
|
+
const $string = __typia.json.createAssertStringify.string;
|
|
242
|
+
const $throws = __typia.json.createAssertStringify.throws;
|
|
243
|
+
const $tail = __typia.json.createAssertStringify.tail;
|
|
244
|
+
const $so0 = input => `{${$tail(`${undefined === input.type ? "" : `"type":${undefined !== input.type ? $string(input.type) : undefined},`}${undefined === input.description || "function" === typeof input.description ? "" : `"description":${undefined !== input.description ? JSON.stringify(input.description) : undefined},`}${undefined === input.profile ? "" : `"profile":${undefined !== input.profile ? (() => {
|
|
245
|
+
if ("string" === typeof input.profile)
|
|
246
|
+
return $string(input.profile);
|
|
247
|
+
if ("object" === typeof input.profile && null !== input.profile)
|
|
248
|
+
return $so1(input.profile);
|
|
249
|
+
$throws({
|
|
250
|
+
expected: "(RenderPresetProfile | string | undefined)",
|
|
251
|
+
value: input.profile
|
|
252
|
+
});
|
|
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
|
+
})()}}`;
|
|
264
|
+
return $so0(input);
|
|
265
|
+
}; return stringify(assert(input, errorFactory)); };
|
|
266
|
+
export const isRenderPresetProfileFormat = input => {
|
|
267
|
+
return "png" === input || "mp4" === input;
|
|
268
|
+
};
|
|
269
|
+
export const assertRenderPresetProfileFormat = (input, errorFactory) => {
|
|
270
|
+
const __is = input => {
|
|
271
|
+
return "png" === input || "mp4" === input;
|
|
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);
|
|
350
|
+
};
|
|
351
|
+
export const assertRenderPresetProfile = (input, errorFactory) => {
|
|
352
|
+
const __is = input => {
|
|
353
|
+
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));
|
|
354
|
+
return "object" === typeof input && null !== input && $io0(input);
|
|
355
|
+
};
|
|
356
|
+
if (false === __is(input))
|
|
357
|
+
((input, _path, _exceptionable = true) => {
|
|
358
|
+
const $guard = __typia.createAssert.guard;
|
|
359
|
+
const $ao0 = (input, _path, _exceptionable = true) => ("png" === input.format || "mp4" === input.format || $guard(_exceptionable, {
|
|
360
|
+
path: _path + ".format",
|
|
361
|
+
expected: "(\"mp4\" | \"png\")",
|
|
362
|
+
value: input.format
|
|
363
|
+
}, errorFactory)) && true && true && true && (undefined === input.pick || (Array.isArray(input.pick) || $guard(_exceptionable, {
|
|
364
|
+
path: _path + ".pick",
|
|
365
|
+
expected: "(Array<string> | undefined)",
|
|
366
|
+
value: input.pick
|
|
367
|
+
}, errorFactory)) && input.pick.every((elem, _index1) => "string" === typeof elem || $guard(_exceptionable, {
|
|
368
|
+
path: _path + ".pick[" + _index1 + "]",
|
|
369
|
+
expected: "string",
|
|
370
|
+
value: elem
|
|
371
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
|
372
|
+
path: _path + ".pick",
|
|
373
|
+
expected: "(Array<string> | undefined)",
|
|
374
|
+
value: input.pick
|
|
375
|
+
}, errorFactory));
|
|
376
|
+
return ("object" === typeof input && null !== input || $guard(true, {
|
|
377
|
+
path: _path + "",
|
|
378
|
+
expected: "RenderPresetProfile",
|
|
379
|
+
value: input
|
|
380
|
+
}, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
|
|
381
|
+
path: _path + "",
|
|
382
|
+
expected: "RenderPresetProfile",
|
|
383
|
+
value: input
|
|
384
|
+
}, errorFactory);
|
|
385
|
+
})(input, "$input", true);
|
|
386
|
+
return input;
|
|
387
|
+
};
|
|
388
|
+
export const randomRenderPresetProfile = generator => {
|
|
389
|
+
const $pick = __typia.createRandom.pick;
|
|
390
|
+
const $generator = __typia.createRandom.generator;
|
|
391
|
+
const $ro0 = (_recursive = false, _depth = 0) => ({
|
|
392
|
+
format: $pick([
|
|
393
|
+
() => "png",
|
|
394
|
+
() => "mp4"
|
|
395
|
+
])(),
|
|
396
|
+
transcribe: $pick([
|
|
397
|
+
() => "any type used...",
|
|
398
|
+
() => undefined
|
|
399
|
+
])(),
|
|
400
|
+
audio: $pick([
|
|
401
|
+
() => "any type used...",
|
|
402
|
+
() => undefined
|
|
403
|
+
])(),
|
|
404
|
+
video: $pick([
|
|
405
|
+
() => "any type used...",
|
|
406
|
+
() => undefined
|
|
407
|
+
])(),
|
|
408
|
+
pick: $pick([
|
|
409
|
+
() => undefined,
|
|
410
|
+
() => (generator?.array ?? $generator.array)(() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)())
|
|
411
|
+
])()
|
|
412
|
+
});
|
|
413
|
+
return $ro0();
|
|
414
|
+
};
|
|
415
|
+
export const assertGuardRenderPresetProfile = (input, errorFactory) => {
|
|
416
|
+
const __is = input => {
|
|
417
|
+
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));
|
|
418
|
+
return "object" === typeof input && null !== input && $io0(input);
|
|
419
|
+
};
|
|
420
|
+
if (false === __is(input))
|
|
421
|
+
((input, _path, _exceptionable = true) => {
|
|
422
|
+
const $guard = __typia.createAssertGuard.guard;
|
|
423
|
+
const $ao0 = (input, _path, _exceptionable = true) => ("png" === input.format || "mp4" === input.format || $guard(_exceptionable, {
|
|
424
|
+
path: _path + ".format",
|
|
425
|
+
expected: "(\"mp4\" | \"png\")",
|
|
426
|
+
value: input.format
|
|
427
|
+
}, errorFactory)) && true && true && true && (undefined === input.pick || (Array.isArray(input.pick) || $guard(_exceptionable, {
|
|
428
|
+
path: _path + ".pick",
|
|
429
|
+
expected: "(Array<string> | undefined)",
|
|
430
|
+
value: input.pick
|
|
431
|
+
}, errorFactory)) && input.pick.every((elem, _index1) => "string" === typeof elem || $guard(_exceptionable, {
|
|
432
|
+
path: _path + ".pick[" + _index1 + "]",
|
|
433
|
+
expected: "string",
|
|
434
|
+
value: elem
|
|
435
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
|
436
|
+
path: _path + ".pick",
|
|
437
|
+
expected: "(Array<string> | undefined)",
|
|
438
|
+
value: input.pick
|
|
439
|
+
}, errorFactory));
|
|
440
|
+
return ("object" === typeof input && null !== input || $guard(true, {
|
|
441
|
+
path: _path + "",
|
|
442
|
+
expected: "RenderPresetProfile",
|
|
443
|
+
value: input
|
|
444
|
+
}, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
|
|
445
|
+
path: _path + "",
|
|
446
|
+
expected: "RenderPresetProfile",
|
|
447
|
+
value: input
|
|
448
|
+
}, errorFactory);
|
|
449
|
+
})(input, "$input", true);
|
|
450
|
+
};
|
|
451
|
+
export const stringifyRenderPresetProfile = input => {
|
|
452
|
+
const $string = __typia.json.createStringify.string;
|
|
453
|
+
const $throws = __typia.json.createStringify.throws;
|
|
454
|
+
const $so0 = 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":${(() => {
|
|
455
|
+
if ("string" === typeof input.format)
|
|
456
|
+
return $string(input.format);
|
|
457
|
+
if ("string" === typeof input.format)
|
|
458
|
+
return "\"" + input.format + "\"";
|
|
459
|
+
$throws({
|
|
460
|
+
expected: "(\"mp4\" | \"png\")",
|
|
461
|
+
value: input.format
|
|
462
|
+
});
|
|
463
|
+
})()}}`;
|
|
464
|
+
return $so0(input);
|
|
465
|
+
};
|
|
466
|
+
export const assertStringifyRenderPresetProfile = (input, errorFactory) => { const assert = (input, errorFactory) => {
|
|
467
|
+
const __is = input => {
|
|
468
|
+
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));
|
|
469
|
+
return "object" === typeof input && null !== input && $io0(input);
|
|
470
|
+
};
|
|
471
|
+
if (false === __is(input))
|
|
472
|
+
((input, _path, _exceptionable = true) => {
|
|
473
|
+
const $guard = __typia.json.createAssertStringify.guard;
|
|
474
|
+
const $ao0 = (input, _path, _exceptionable = true) => ("png" === input.format || "mp4" === input.format || $guard(_exceptionable, {
|
|
475
|
+
path: _path + ".format",
|
|
476
|
+
expected: "(\"mp4\" | \"png\")",
|
|
477
|
+
value: input.format
|
|
478
|
+
}, errorFactory)) && true && true && true && (undefined === input.pick || (Array.isArray(input.pick) || $guard(_exceptionable, {
|
|
479
|
+
path: _path + ".pick",
|
|
480
|
+
expected: "(Array<string> | undefined)",
|
|
481
|
+
value: input.pick
|
|
482
|
+
}, errorFactory)) && input.pick.every((elem, _index1) => "string" === typeof elem || $guard(_exceptionable, {
|
|
483
|
+
path: _path + ".pick[" + _index1 + "]",
|
|
484
|
+
expected: "string",
|
|
485
|
+
value: elem
|
|
486
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
|
487
|
+
path: _path + ".pick",
|
|
488
|
+
expected: "(Array<string> | undefined)",
|
|
489
|
+
value: input.pick
|
|
490
|
+
}, errorFactory));
|
|
491
|
+
return ("object" === typeof input && null !== input || $guard(true, {
|
|
492
|
+
path: _path + "",
|
|
493
|
+
expected: "RenderPresetProfile",
|
|
494
|
+
value: input
|
|
495
|
+
}, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
|
|
496
|
+
path: _path + "",
|
|
497
|
+
expected: "RenderPresetProfile",
|
|
498
|
+
value: input
|
|
499
|
+
}, errorFactory);
|
|
500
|
+
})(input, "$input", true);
|
|
501
|
+
return input;
|
|
502
|
+
}; const stringify = input => {
|
|
503
|
+
const $string = __typia.json.createAssertStringify.string;
|
|
504
|
+
const $throws = __typia.json.createAssertStringify.throws;
|
|
505
|
+
const $so0 = 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":${(() => {
|
|
506
|
+
if ("string" === typeof input.format)
|
|
507
|
+
return $string(input.format);
|
|
508
|
+
if ("string" === typeof input.format)
|
|
509
|
+
return "\"" + input.format + "\"";
|
|
510
|
+
$throws({
|
|
511
|
+
expected: "(\"mp4\" | \"png\")",
|
|
512
|
+
value: input.format
|
|
513
|
+
});
|
|
514
|
+
})()}}`;
|
|
515
|
+
return $so0(input);
|
|
516
|
+
}; return stringify(assert(input, errorFactory)); };
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { type AssertionGuard as __AssertionGuard } from "typia";
|
|
2
|
+
export type Search<Type extends "simple" | "conditional" = "simple"> = {
|
|
3
|
+
type: Type;
|
|
4
|
+
} & Type extends "simple" ? SimpleSearch : ConditionalSearch;
|
|
5
|
+
export declare const isSearch: (input: unknown) => input is SimpleSearch;
|
|
6
|
+
export declare const assertSearch: (input: unknown) => SimpleSearch;
|
|
7
|
+
export declare const randomSearch: () => SimpleSearch;
|
|
8
|
+
export declare const assertGuardSearch: __AssertionGuard<Search>;
|
|
9
|
+
export declare const stringifySearch: (input: SimpleSearch) => string;
|
|
10
|
+
export declare const assertStringifySearch: (input: unknown) => string;
|
|
11
|
+
export interface SimpleSearch {
|
|
12
|
+
type: "simple";
|
|
13
|
+
user?: string;
|
|
14
|
+
mode?: "fuzzy" | "exact" | "similarity";
|
|
15
|
+
query?: string;
|
|
16
|
+
count?: number;
|
|
17
|
+
deleted?: boolean;
|
|
18
|
+
hidden?: boolean;
|
|
19
|
+
sortBy?: string;
|
|
20
|
+
refreshInterval?: number;
|
|
21
|
+
highlight?: SearchHighlightOption;
|
|
22
|
+
}
|
|
23
|
+
export declare const isSimpleSearch: (input: unknown) => input is SimpleSearch;
|
|
24
|
+
export declare const assertSimpleSearch: (input: unknown) => SimpleSearch;
|
|
25
|
+
export declare const randomSimpleSearch: () => SimpleSearch;
|
|
26
|
+
export declare const assertGuardSimpleSearch: __AssertionGuard<SimpleSearch>;
|
|
27
|
+
export declare const stringifySimpleSearch: (input: SimpleSearch) => string;
|
|
28
|
+
export declare const assertStringifySimpleSearch: (input: unknown) => string;
|
|
29
|
+
export interface ConditionalSearch {
|
|
30
|
+
type: "conditional";
|
|
31
|
+
user?: string;
|
|
32
|
+
searchIds?: string[];
|
|
33
|
+
searches?: string[];
|
|
34
|
+
mode?: "fuzzy" | "exact" | "similarity";
|
|
35
|
+
query?: string;
|
|
36
|
+
sort?: string;
|
|
37
|
+
hidden?: boolean;
|
|
38
|
+
deleted?: boolean;
|
|
39
|
+
count?: number;
|
|
40
|
+
refreshInterval?: number;
|
|
41
|
+
highlight?: SearchHighlightOption;
|
|
42
|
+
timeField?: string;
|
|
43
|
+
startTime?: string;
|
|
44
|
+
endTime?: string;
|
|
45
|
+
geoField?: string;
|
|
46
|
+
geoBounds?: {
|
|
47
|
+
x1: number;
|
|
48
|
+
y1: number;
|
|
49
|
+
x2: number;
|
|
50
|
+
y2: number;
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
export declare const isConditionalSearch: (input: unknown) => input is ConditionalSearch;
|
|
54
|
+
export declare const assertConditionalSearch: (input: unknown) => ConditionalSearch;
|
|
55
|
+
export declare const randomConditionalSearch: () => ConditionalSearch;
|
|
56
|
+
export declare const assertGuardConditionalSearch: __AssertionGuard<ConditionalSearch>;
|
|
57
|
+
export declare const stringifyConditionalSearch: (input: ConditionalSearch) => string;
|
|
58
|
+
export declare const assertStringifyConditionalSearch: (input: unknown) => string;
|
|
59
|
+
export interface SearchHighlightOption {
|
|
60
|
+
fields: {
|
|
61
|
+
[field: string]: unknown;
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
export declare const isSearchHighlightOption: (input: unknown) => input is SearchHighlightOption;
|
|
65
|
+
export declare const assertSearchHighlightOption: (input: unknown) => SearchHighlightOption;
|
|
66
|
+
export declare const randomSearchHighlightOption: () => SearchHighlightOption;
|
|
67
|
+
export declare const assertGuardSearchHighlightOption: __AssertionGuard<SearchHighlightOption>;
|
|
68
|
+
export declare const stringifySearchHighlightOption: (input: SearchHighlightOption) => string;
|
|
69
|
+
export declare const assertStringifySearchHighlightOption: (input: unknown) => string;
|