@nxtedition/types 1.0.0
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/README.md +62 -0
- package/dist/common/block.d.ts +25 -0
- package/dist/common/block.js +571 -0
- package/dist/common/index.d.ts +32 -0
- package/dist/common/index.js +565 -0
- package/dist/common/lock.d.ts +12 -0
- package/dist/common/lock.js +152 -0
- package/dist/common/settings.d.ts +150 -0
- package/dist/common/settings.js +2642 -0
- package/dist/domains/asset.d.ts +23 -0
- package/dist/domains/asset.js +225 -0
- package/dist/domains/connection.d.ts +62 -0
- package/dist/domains/connection.js +1167 -0
- package/dist/domains/event.d.ts +18 -0
- package/dist/domains/event.js +165 -0
- package/dist/domains/general.d.ts +23 -0
- package/dist/domains/general.js +225 -0
- package/dist/domains/index.d.ts +25 -0
- package/dist/domains/index.js +12 -0
- package/dist/domains/media.d.ts +32 -0
- package/dist/domains/media.js +465 -0
- package/dist/domains/permission.d.ts +24 -0
- package/dist/domains/permission.js +375 -0
- package/dist/domains/publish.d.ts +213 -0
- package/dist/domains/publish.js +9664 -0
- package/dist/domains/role.d.ts +13 -0
- package/dist/domains/role.js +119 -0
- package/dist/domains/script.d.ts +13 -0
- package/dist/domains/script.js +125 -0
- package/dist/domains/search.d.ts +13 -0
- package/dist/domains/search.js +119 -0
- package/dist/domains/settings.d.ts +13 -0
- package/dist/domains/settings.js +2765 -0
- package/dist/domains/template.d.ts +23 -0
- package/dist/domains/template.js +372 -0
- package/dist/index.d.ts +24 -0
- package/dist/index.js +2 -0
- package/package.json +34 -0
|
@@ -0,0 +1,465 @@
|
|
|
1
|
+
import __typia from "typia";
|
|
2
|
+
export const isMediaSourceRecord = input => {
|
|
3
|
+
const $io0 = input => (undefined === input.input || "object" === typeof input.input && null !== input.input && false === Array.isArray(input.input) && $io1(input.input)) && (undefined === input.lang || "string" === typeof input.lang) && (undefined === input.subtitle || "string" === typeof input.subtitle) && (undefined === input.video || "object" === typeof input.video && null !== input.video && false === Array.isArray(input.video) && $io2(input.video)) && (undefined === input.start || "number" === typeof input.start) && (undefined === input.end || "number" === typeof input.end) && (undefined === input.transcribe || "object" === typeof input.transcribe && null !== input.transcribe && false === Array.isArray(input.transcribe) && $io4(input.transcribe));
|
|
4
|
+
const $io1 = input => (undefined === input.type || "string" === typeof input.type) && (undefined === input.file || "string" === typeof input.file);
|
|
5
|
+
const $io2 = input => undefined === input.crop || "object" === typeof input.crop && null !== input.crop && false === Array.isArray(input.crop) && $io3(input.crop);
|
|
6
|
+
const $io3 = input => (undefined === input.x || "number" === typeof input.x) && (undefined === input.y || "number" === typeof input.y) && (undefined === input.width || "number" === typeof input.width) && (undefined === input.height || "number" === typeof input.height);
|
|
7
|
+
const $io4 = input => (undefined === input.language || "string" === typeof input.language) && (undefined === input.pan || Array.isArray(input.pan) && input.pan.every(elem => "number" === typeof elem));
|
|
8
|
+
return "object" === typeof input && null !== input && false === Array.isArray(input) && $io0(input);
|
|
9
|
+
};
|
|
10
|
+
export const assertMediaSourceRecord = (input, errorFactory) => {
|
|
11
|
+
const __is = input => {
|
|
12
|
+
const $io0 = input => (undefined === input.input || "object" === typeof input.input && null !== input.input && false === Array.isArray(input.input) && $io1(input.input)) && (undefined === input.lang || "string" === typeof input.lang) && (undefined === input.subtitle || "string" === typeof input.subtitle) && (undefined === input.video || "object" === typeof input.video && null !== input.video && false === Array.isArray(input.video) && $io2(input.video)) && (undefined === input.start || "number" === typeof input.start) && (undefined === input.end || "number" === typeof input.end) && (undefined === input.transcribe || "object" === typeof input.transcribe && null !== input.transcribe && false === Array.isArray(input.transcribe) && $io4(input.transcribe));
|
|
13
|
+
const $io1 = input => (undefined === input.type || "string" === typeof input.type) && (undefined === input.file || "string" === typeof input.file);
|
|
14
|
+
const $io2 = input => undefined === input.crop || "object" === typeof input.crop && null !== input.crop && false === Array.isArray(input.crop) && $io3(input.crop);
|
|
15
|
+
const $io3 = input => (undefined === input.x || "number" === typeof input.x) && (undefined === input.y || "number" === typeof input.y) && (undefined === input.width || "number" === typeof input.width) && (undefined === input.height || "number" === typeof input.height);
|
|
16
|
+
const $io4 = input => (undefined === input.language || "string" === typeof input.language) && (undefined === input.pan || Array.isArray(input.pan) && input.pan.every(elem => "number" === typeof elem));
|
|
17
|
+
return "object" === typeof input && null !== input && false === Array.isArray(input) && $io0(input);
|
|
18
|
+
};
|
|
19
|
+
if (false === __is(input))
|
|
20
|
+
((input, _path, _exceptionable = true) => {
|
|
21
|
+
const $guard = __typia.createAssert.guard;
|
|
22
|
+
const $ao0 = (input, _path, _exceptionable = true) => (undefined === input.input || ("object" === typeof input.input && null !== input.input && false === Array.isArray(input.input) || $guard(_exceptionable, {
|
|
23
|
+
path: _path + ".input",
|
|
24
|
+
expected: "(__type | undefined)",
|
|
25
|
+
value: input.input
|
|
26
|
+
}, errorFactory)) && $ao1(input.input, _path + ".input", true && _exceptionable) || $guard(_exceptionable, {
|
|
27
|
+
path: _path + ".input",
|
|
28
|
+
expected: "(__type | undefined)",
|
|
29
|
+
value: input.input
|
|
30
|
+
}, errorFactory)) && (undefined === input.lang || "string" === typeof input.lang || $guard(_exceptionable, {
|
|
31
|
+
path: _path + ".lang",
|
|
32
|
+
expected: "(string | undefined)",
|
|
33
|
+
value: input.lang
|
|
34
|
+
}, errorFactory)) && (undefined === input.subtitle || "string" === typeof input.subtitle || $guard(_exceptionable, {
|
|
35
|
+
path: _path + ".subtitle",
|
|
36
|
+
expected: "(string | undefined)",
|
|
37
|
+
value: input.subtitle
|
|
38
|
+
}, errorFactory)) && (undefined === input.video || ("object" === typeof input.video && null !== input.video && false === Array.isArray(input.video) || $guard(_exceptionable, {
|
|
39
|
+
path: _path + ".video",
|
|
40
|
+
expected: "(__type.o1 | undefined)",
|
|
41
|
+
value: input.video
|
|
42
|
+
}, errorFactory)) && $ao2(input.video, _path + ".video", true && _exceptionable) || $guard(_exceptionable, {
|
|
43
|
+
path: _path + ".video",
|
|
44
|
+
expected: "(__type.o1 | undefined)",
|
|
45
|
+
value: input.video
|
|
46
|
+
}, errorFactory)) && (undefined === input.start || "number" === typeof input.start || $guard(_exceptionable, {
|
|
47
|
+
path: _path + ".start",
|
|
48
|
+
expected: "(number | undefined)",
|
|
49
|
+
value: input.start
|
|
50
|
+
}, errorFactory)) && (undefined === input.end || "number" === typeof input.end || $guard(_exceptionable, {
|
|
51
|
+
path: _path + ".end",
|
|
52
|
+
expected: "(number | undefined)",
|
|
53
|
+
value: input.end
|
|
54
|
+
}, errorFactory)) && (undefined === input.transcribe || ("object" === typeof input.transcribe && null !== input.transcribe && false === Array.isArray(input.transcribe) || $guard(_exceptionable, {
|
|
55
|
+
path: _path + ".transcribe",
|
|
56
|
+
expected: "(__type.o3 | undefined)",
|
|
57
|
+
value: input.transcribe
|
|
58
|
+
}, errorFactory)) && $ao4(input.transcribe, _path + ".transcribe", true && _exceptionable) || $guard(_exceptionable, {
|
|
59
|
+
path: _path + ".transcribe",
|
|
60
|
+
expected: "(__type.o3 | undefined)",
|
|
61
|
+
value: input.transcribe
|
|
62
|
+
}, errorFactory));
|
|
63
|
+
const $ao1 = (input, _path, _exceptionable = true) => (undefined === input.type || "string" === typeof input.type || $guard(_exceptionable, {
|
|
64
|
+
path: _path + ".type",
|
|
65
|
+
expected: "(string | undefined)",
|
|
66
|
+
value: input.type
|
|
67
|
+
}, errorFactory)) && (undefined === input.file || "string" === typeof input.file || $guard(_exceptionable, {
|
|
68
|
+
path: _path + ".file",
|
|
69
|
+
expected: "(string | undefined)",
|
|
70
|
+
value: input.file
|
|
71
|
+
}, errorFactory));
|
|
72
|
+
const $ao2 = (input, _path, _exceptionable = true) => undefined === input.crop || ("object" === typeof input.crop && null !== input.crop && false === Array.isArray(input.crop) || $guard(_exceptionable, {
|
|
73
|
+
path: _path + ".crop",
|
|
74
|
+
expected: "(__type.o2 | undefined)",
|
|
75
|
+
value: input.crop
|
|
76
|
+
}, errorFactory)) && $ao3(input.crop, _path + ".crop", true && _exceptionable) || $guard(_exceptionable, {
|
|
77
|
+
path: _path + ".crop",
|
|
78
|
+
expected: "(__type.o2 | undefined)",
|
|
79
|
+
value: input.crop
|
|
80
|
+
}, errorFactory);
|
|
81
|
+
const $ao3 = (input, _path, _exceptionable = true) => (undefined === input.x || "number" === typeof input.x || $guard(_exceptionable, {
|
|
82
|
+
path: _path + ".x",
|
|
83
|
+
expected: "(number | undefined)",
|
|
84
|
+
value: input.x
|
|
85
|
+
}, errorFactory)) && (undefined === input.y || "number" === typeof input.y || $guard(_exceptionable, {
|
|
86
|
+
path: _path + ".y",
|
|
87
|
+
expected: "(number | undefined)",
|
|
88
|
+
value: input.y
|
|
89
|
+
}, errorFactory)) && (undefined === input.width || "number" === typeof input.width || $guard(_exceptionable, {
|
|
90
|
+
path: _path + ".width",
|
|
91
|
+
expected: "(number | undefined)",
|
|
92
|
+
value: input.width
|
|
93
|
+
}, errorFactory)) && (undefined === input.height || "number" === typeof input.height || $guard(_exceptionable, {
|
|
94
|
+
path: _path + ".height",
|
|
95
|
+
expected: "(number | undefined)",
|
|
96
|
+
value: input.height
|
|
97
|
+
}, errorFactory));
|
|
98
|
+
const $ao4 = (input, _path, _exceptionable = true) => (undefined === input.language || "string" === typeof input.language || $guard(_exceptionable, {
|
|
99
|
+
path: _path + ".language",
|
|
100
|
+
expected: "(string | undefined)",
|
|
101
|
+
value: input.language
|
|
102
|
+
}, errorFactory)) && (undefined === input.pan || (Array.isArray(input.pan) || $guard(_exceptionable, {
|
|
103
|
+
path: _path + ".pan",
|
|
104
|
+
expected: "(Array<number> | undefined)",
|
|
105
|
+
value: input.pan
|
|
106
|
+
}, errorFactory)) && input.pan.every((elem, _index1) => "number" === typeof elem || $guard(_exceptionable, {
|
|
107
|
+
path: _path + ".pan[" + _index1 + "]",
|
|
108
|
+
expected: "number",
|
|
109
|
+
value: elem
|
|
110
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
|
111
|
+
path: _path + ".pan",
|
|
112
|
+
expected: "(Array<number> | undefined)",
|
|
113
|
+
value: input.pan
|
|
114
|
+
}, errorFactory));
|
|
115
|
+
return ("object" === typeof input && null !== input && false === Array.isArray(input) || $guard(true, {
|
|
116
|
+
path: _path + "",
|
|
117
|
+
expected: "MediaSourceRecord",
|
|
118
|
+
value: input
|
|
119
|
+
}, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
|
|
120
|
+
path: _path + "",
|
|
121
|
+
expected: "MediaSourceRecord",
|
|
122
|
+
value: input
|
|
123
|
+
}, errorFactory);
|
|
124
|
+
})(input, "$input", true);
|
|
125
|
+
return input;
|
|
126
|
+
};
|
|
127
|
+
export const randomMediaSourceRecord = generator => {
|
|
128
|
+
const $pick = __typia.createRandom.pick;
|
|
129
|
+
const $generator = __typia.createRandom.generator;
|
|
130
|
+
const $ro0 = (_recursive = false, _depth = 0) => ({
|
|
131
|
+
input: $pick([
|
|
132
|
+
() => undefined,
|
|
133
|
+
() => $ro1(_recursive, _recursive ? 1 + _depth : _depth)
|
|
134
|
+
])(),
|
|
135
|
+
lang: $pick([
|
|
136
|
+
() => undefined,
|
|
137
|
+
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
|
|
138
|
+
])(),
|
|
139
|
+
subtitle: $pick([
|
|
140
|
+
() => undefined,
|
|
141
|
+
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
|
|
142
|
+
])(),
|
|
143
|
+
video: $pick([
|
|
144
|
+
() => undefined,
|
|
145
|
+
() => $ro2(_recursive, _recursive ? 1 + _depth : _depth)
|
|
146
|
+
])(),
|
|
147
|
+
start: $pick([
|
|
148
|
+
() => undefined,
|
|
149
|
+
() => (generator?.customs ?? $generator.customs)?.number?.([]) ?? (generator?.number ?? $generator.number)(0, 100)
|
|
150
|
+
])(),
|
|
151
|
+
end: $pick([
|
|
152
|
+
() => undefined,
|
|
153
|
+
() => (generator?.customs ?? $generator.customs)?.number?.([]) ?? (generator?.number ?? $generator.number)(0, 100)
|
|
154
|
+
])(),
|
|
155
|
+
transcribe: $pick([
|
|
156
|
+
() => undefined,
|
|
157
|
+
() => $ro4(_recursive, _recursive ? 1 + _depth : _depth)
|
|
158
|
+
])()
|
|
159
|
+
});
|
|
160
|
+
const $ro1 = (_recursive = false, _depth = 0) => ({
|
|
161
|
+
type: $pick([
|
|
162
|
+
() => undefined,
|
|
163
|
+
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
|
|
164
|
+
])(),
|
|
165
|
+
file: $pick([
|
|
166
|
+
() => undefined,
|
|
167
|
+
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
|
|
168
|
+
])()
|
|
169
|
+
});
|
|
170
|
+
const $ro2 = (_recursive = false, _depth = 0) => ({
|
|
171
|
+
crop: $pick([
|
|
172
|
+
() => undefined,
|
|
173
|
+
() => $ro3(_recursive, _recursive ? 1 + _depth : _depth)
|
|
174
|
+
])()
|
|
175
|
+
});
|
|
176
|
+
const $ro3 = (_recursive = false, _depth = 0) => ({
|
|
177
|
+
x: $pick([
|
|
178
|
+
() => undefined,
|
|
179
|
+
() => (generator?.customs ?? $generator.customs)?.number?.([]) ?? (generator?.number ?? $generator.number)(0, 100)
|
|
180
|
+
])(),
|
|
181
|
+
y: $pick([
|
|
182
|
+
() => undefined,
|
|
183
|
+
() => (generator?.customs ?? $generator.customs)?.number?.([]) ?? (generator?.number ?? $generator.number)(0, 100)
|
|
184
|
+
])(),
|
|
185
|
+
width: $pick([
|
|
186
|
+
() => undefined,
|
|
187
|
+
() => (generator?.customs ?? $generator.customs)?.number?.([]) ?? (generator?.number ?? $generator.number)(0, 100)
|
|
188
|
+
])(),
|
|
189
|
+
height: $pick([
|
|
190
|
+
() => undefined,
|
|
191
|
+
() => (generator?.customs ?? $generator.customs)?.number?.([]) ?? (generator?.number ?? $generator.number)(0, 100)
|
|
192
|
+
])()
|
|
193
|
+
});
|
|
194
|
+
const $ro4 = (_recursive = false, _depth = 0) => ({
|
|
195
|
+
language: $pick([
|
|
196
|
+
() => undefined,
|
|
197
|
+
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
|
|
198
|
+
])(),
|
|
199
|
+
pan: $pick([
|
|
200
|
+
() => undefined,
|
|
201
|
+
() => (generator?.array ?? $generator.array)(() => (generator?.customs ?? $generator.customs)?.number?.([]) ?? (generator?.number ?? $generator.number)(0, 100))
|
|
202
|
+
])()
|
|
203
|
+
});
|
|
204
|
+
return $ro0();
|
|
205
|
+
};
|
|
206
|
+
export const assertGuardMediaSourceRecord = (input, errorFactory) => {
|
|
207
|
+
const __is = input => {
|
|
208
|
+
const $io0 = input => (undefined === input.input || "object" === typeof input.input && null !== input.input && false === Array.isArray(input.input) && $io1(input.input)) && (undefined === input.lang || "string" === typeof input.lang) && (undefined === input.subtitle || "string" === typeof input.subtitle) && (undefined === input.video || "object" === typeof input.video && null !== input.video && false === Array.isArray(input.video) && $io2(input.video)) && (undefined === input.start || "number" === typeof input.start) && (undefined === input.end || "number" === typeof input.end) && (undefined === input.transcribe || "object" === typeof input.transcribe && null !== input.transcribe && false === Array.isArray(input.transcribe) && $io4(input.transcribe));
|
|
209
|
+
const $io1 = input => (undefined === input.type || "string" === typeof input.type) && (undefined === input.file || "string" === typeof input.file);
|
|
210
|
+
const $io2 = input => undefined === input.crop || "object" === typeof input.crop && null !== input.crop && false === Array.isArray(input.crop) && $io3(input.crop);
|
|
211
|
+
const $io3 = input => (undefined === input.x || "number" === typeof input.x) && (undefined === input.y || "number" === typeof input.y) && (undefined === input.width || "number" === typeof input.width) && (undefined === input.height || "number" === typeof input.height);
|
|
212
|
+
const $io4 = input => (undefined === input.language || "string" === typeof input.language) && (undefined === input.pan || Array.isArray(input.pan) && input.pan.every(elem => "number" === typeof elem));
|
|
213
|
+
return "object" === typeof input && null !== input && false === Array.isArray(input) && $io0(input);
|
|
214
|
+
};
|
|
215
|
+
if (false === __is(input))
|
|
216
|
+
((input, _path, _exceptionable = true) => {
|
|
217
|
+
const $guard = __typia.createAssertGuard.guard;
|
|
218
|
+
const $ao0 = (input, _path, _exceptionable = true) => (undefined === input.input || ("object" === typeof input.input && null !== input.input && false === Array.isArray(input.input) || $guard(_exceptionable, {
|
|
219
|
+
path: _path + ".input",
|
|
220
|
+
expected: "(__type | undefined)",
|
|
221
|
+
value: input.input
|
|
222
|
+
}, errorFactory)) && $ao1(input.input, _path + ".input", true && _exceptionable) || $guard(_exceptionable, {
|
|
223
|
+
path: _path + ".input",
|
|
224
|
+
expected: "(__type | undefined)",
|
|
225
|
+
value: input.input
|
|
226
|
+
}, errorFactory)) && (undefined === input.lang || "string" === typeof input.lang || $guard(_exceptionable, {
|
|
227
|
+
path: _path + ".lang",
|
|
228
|
+
expected: "(string | undefined)",
|
|
229
|
+
value: input.lang
|
|
230
|
+
}, errorFactory)) && (undefined === input.subtitle || "string" === typeof input.subtitle || $guard(_exceptionable, {
|
|
231
|
+
path: _path + ".subtitle",
|
|
232
|
+
expected: "(string | undefined)",
|
|
233
|
+
value: input.subtitle
|
|
234
|
+
}, errorFactory)) && (undefined === input.video || ("object" === typeof input.video && null !== input.video && false === Array.isArray(input.video) || $guard(_exceptionable, {
|
|
235
|
+
path: _path + ".video",
|
|
236
|
+
expected: "(__type.o1 | undefined)",
|
|
237
|
+
value: input.video
|
|
238
|
+
}, errorFactory)) && $ao2(input.video, _path + ".video", true && _exceptionable) || $guard(_exceptionable, {
|
|
239
|
+
path: _path + ".video",
|
|
240
|
+
expected: "(__type.o1 | undefined)",
|
|
241
|
+
value: input.video
|
|
242
|
+
}, errorFactory)) && (undefined === input.start || "number" === typeof input.start || $guard(_exceptionable, {
|
|
243
|
+
path: _path + ".start",
|
|
244
|
+
expected: "(number | undefined)",
|
|
245
|
+
value: input.start
|
|
246
|
+
}, errorFactory)) && (undefined === input.end || "number" === typeof input.end || $guard(_exceptionable, {
|
|
247
|
+
path: _path + ".end",
|
|
248
|
+
expected: "(number | undefined)",
|
|
249
|
+
value: input.end
|
|
250
|
+
}, errorFactory)) && (undefined === input.transcribe || ("object" === typeof input.transcribe && null !== input.transcribe && false === Array.isArray(input.transcribe) || $guard(_exceptionable, {
|
|
251
|
+
path: _path + ".transcribe",
|
|
252
|
+
expected: "(__type.o3 | undefined)",
|
|
253
|
+
value: input.transcribe
|
|
254
|
+
}, errorFactory)) && $ao4(input.transcribe, _path + ".transcribe", true && _exceptionable) || $guard(_exceptionable, {
|
|
255
|
+
path: _path + ".transcribe",
|
|
256
|
+
expected: "(__type.o3 | undefined)",
|
|
257
|
+
value: input.transcribe
|
|
258
|
+
}, errorFactory));
|
|
259
|
+
const $ao1 = (input, _path, _exceptionable = true) => (undefined === input.type || "string" === typeof input.type || $guard(_exceptionable, {
|
|
260
|
+
path: _path + ".type",
|
|
261
|
+
expected: "(string | undefined)",
|
|
262
|
+
value: input.type
|
|
263
|
+
}, errorFactory)) && (undefined === input.file || "string" === typeof input.file || $guard(_exceptionable, {
|
|
264
|
+
path: _path + ".file",
|
|
265
|
+
expected: "(string | undefined)",
|
|
266
|
+
value: input.file
|
|
267
|
+
}, errorFactory));
|
|
268
|
+
const $ao2 = (input, _path, _exceptionable = true) => undefined === input.crop || ("object" === typeof input.crop && null !== input.crop && false === Array.isArray(input.crop) || $guard(_exceptionable, {
|
|
269
|
+
path: _path + ".crop",
|
|
270
|
+
expected: "(__type.o2 | undefined)",
|
|
271
|
+
value: input.crop
|
|
272
|
+
}, errorFactory)) && $ao3(input.crop, _path + ".crop", true && _exceptionable) || $guard(_exceptionable, {
|
|
273
|
+
path: _path + ".crop",
|
|
274
|
+
expected: "(__type.o2 | undefined)",
|
|
275
|
+
value: input.crop
|
|
276
|
+
}, errorFactory);
|
|
277
|
+
const $ao3 = (input, _path, _exceptionable = true) => (undefined === input.x || "number" === typeof input.x || $guard(_exceptionable, {
|
|
278
|
+
path: _path + ".x",
|
|
279
|
+
expected: "(number | undefined)",
|
|
280
|
+
value: input.x
|
|
281
|
+
}, errorFactory)) && (undefined === input.y || "number" === typeof input.y || $guard(_exceptionable, {
|
|
282
|
+
path: _path + ".y",
|
|
283
|
+
expected: "(number | undefined)",
|
|
284
|
+
value: input.y
|
|
285
|
+
}, errorFactory)) && (undefined === input.width || "number" === typeof input.width || $guard(_exceptionable, {
|
|
286
|
+
path: _path + ".width",
|
|
287
|
+
expected: "(number | undefined)",
|
|
288
|
+
value: input.width
|
|
289
|
+
}, errorFactory)) && (undefined === input.height || "number" === typeof input.height || $guard(_exceptionable, {
|
|
290
|
+
path: _path + ".height",
|
|
291
|
+
expected: "(number | undefined)",
|
|
292
|
+
value: input.height
|
|
293
|
+
}, errorFactory));
|
|
294
|
+
const $ao4 = (input, _path, _exceptionable = true) => (undefined === input.language || "string" === typeof input.language || $guard(_exceptionable, {
|
|
295
|
+
path: _path + ".language",
|
|
296
|
+
expected: "(string | undefined)",
|
|
297
|
+
value: input.language
|
|
298
|
+
}, errorFactory)) && (undefined === input.pan || (Array.isArray(input.pan) || $guard(_exceptionable, {
|
|
299
|
+
path: _path + ".pan",
|
|
300
|
+
expected: "(Array<number> | undefined)",
|
|
301
|
+
value: input.pan
|
|
302
|
+
}, errorFactory)) && input.pan.every((elem, _index1) => "number" === typeof elem || $guard(_exceptionable, {
|
|
303
|
+
path: _path + ".pan[" + _index1 + "]",
|
|
304
|
+
expected: "number",
|
|
305
|
+
value: elem
|
|
306
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
|
307
|
+
path: _path + ".pan",
|
|
308
|
+
expected: "(Array<number> | undefined)",
|
|
309
|
+
value: input.pan
|
|
310
|
+
}, errorFactory));
|
|
311
|
+
return ("object" === typeof input && null !== input && false === Array.isArray(input) || $guard(true, {
|
|
312
|
+
path: _path + "",
|
|
313
|
+
expected: "MediaSourceRecord",
|
|
314
|
+
value: input
|
|
315
|
+
}, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
|
|
316
|
+
path: _path + "",
|
|
317
|
+
expected: "MediaSourceRecord",
|
|
318
|
+
value: input
|
|
319
|
+
}, errorFactory);
|
|
320
|
+
})(input, "$input", true);
|
|
321
|
+
};
|
|
322
|
+
export const stringifyMediaSourceRecord = input => {
|
|
323
|
+
const $io1 = input => (undefined === input.type || "string" === typeof input.type) && (undefined === input.file || "string" === typeof input.file);
|
|
324
|
+
const $io2 = input => undefined === input.crop || "object" === typeof input.crop && null !== input.crop && false === Array.isArray(input.crop) && $io3(input.crop);
|
|
325
|
+
const $io3 = input => (undefined === input.x || "number" === typeof input.x) && (undefined === input.y || "number" === typeof input.y) && (undefined === input.width || "number" === typeof input.width) && (undefined === input.height || "number" === typeof input.height);
|
|
326
|
+
const $io4 = input => (undefined === input.language || "string" === typeof input.language) && (undefined === input.pan || Array.isArray(input.pan) && input.pan.every(elem => "number" === typeof elem));
|
|
327
|
+
const $string = __typia.json.createStringify.string;
|
|
328
|
+
const $tail = __typia.json.createStringify.tail;
|
|
329
|
+
const $so0 = input => `{${$tail(`${undefined === input.input ? "" : `"input":${undefined !== input.input ? $so1(input.input) : undefined},`}${undefined === input.lang ? "" : `"lang":${undefined !== input.lang ? $string(input.lang) : undefined},`}${undefined === input.subtitle ? "" : `"subtitle":${undefined !== input.subtitle ? $string(input.subtitle) : undefined},`}${undefined === input.video ? "" : `"video":${undefined !== input.video ? $so2(input.video) : undefined},`}${undefined === input.start ? "" : `"start":${undefined !== input.start ? input.start : undefined},`}${undefined === input.end ? "" : `"end":${undefined !== input.end ? input.end : undefined},`}${undefined === input.transcribe ? "" : `"transcribe":${undefined !== input.transcribe ? $so4(input.transcribe) : undefined}`}`)}}`;
|
|
330
|
+
const $so1 = input => `{${$tail(`${undefined === input.type ? "" : `"type":${undefined !== input.type ? $string(input.type) : undefined},`}${undefined === input.file ? "" : `"file":${undefined !== input.file ? $string(input.file) : undefined}`}`)}}`;
|
|
331
|
+
const $so2 = input => `{${$tail(`${undefined === input.crop ? "" : `"crop":${undefined !== input.crop ? $so3(input.crop) : undefined}`}`)}}`;
|
|
332
|
+
const $so3 = input => `{${$tail(`${undefined === input.x ? "" : `"x":${undefined !== input.x ? input.x : undefined},`}${undefined === input.y ? "" : `"y":${undefined !== input.y ? input.y : undefined},`}${undefined === input.width ? "" : `"width":${undefined !== input.width ? input.width : undefined},`}${undefined === input.height ? "" : `"height":${undefined !== input.height ? input.height : undefined}`}`)}}`;
|
|
333
|
+
const $so4 = input => `{${$tail(`${undefined === input.language ? "" : `"language":${undefined !== input.language ? $string(input.language) : undefined},`}${undefined === input.pan ? "" : `"pan":${undefined !== input.pan ? `[${input.pan.map(elem => elem).join(",")}]` : undefined}`}`)}}`;
|
|
334
|
+
return $so0(input);
|
|
335
|
+
};
|
|
336
|
+
export const assertStringifyMediaSourceRecord = (input, errorFactory) => { const assert = (input, errorFactory) => {
|
|
337
|
+
const __is = input => {
|
|
338
|
+
const $io0 = input => (undefined === input.input || "object" === typeof input.input && null !== input.input && false === Array.isArray(input.input) && $io1(input.input)) && (undefined === input.lang || "string" === typeof input.lang) && (undefined === input.subtitle || "string" === typeof input.subtitle) && (undefined === input.video || "object" === typeof input.video && null !== input.video && false === Array.isArray(input.video) && $io2(input.video)) && (undefined === input.start || "number" === typeof input.start && !Number.isNaN(input.start)) && (undefined === input.end || "number" === typeof input.end && !Number.isNaN(input.end)) && (undefined === input.transcribe || "object" === typeof input.transcribe && null !== input.transcribe && false === Array.isArray(input.transcribe) && $io4(input.transcribe));
|
|
339
|
+
const $io1 = input => (undefined === input.type || "string" === typeof input.type) && (undefined === input.file || "string" === typeof input.file);
|
|
340
|
+
const $io2 = input => undefined === input.crop || "object" === typeof input.crop && null !== input.crop && false === Array.isArray(input.crop) && $io3(input.crop);
|
|
341
|
+
const $io3 = input => (undefined === input.x || "number" === typeof input.x && !Number.isNaN(input.x)) && (undefined === input.y || "number" === typeof input.y && !Number.isNaN(input.y)) && (undefined === input.width || "number" === typeof input.width && !Number.isNaN(input.width)) && (undefined === input.height || "number" === typeof input.height && !Number.isNaN(input.height));
|
|
342
|
+
const $io4 = input => (undefined === input.language || "string" === typeof input.language) && (undefined === input.pan || Array.isArray(input.pan) && input.pan.every(elem => "number" === typeof elem && !Number.isNaN(elem)));
|
|
343
|
+
return "object" === typeof input && null !== input && false === Array.isArray(input) && $io0(input);
|
|
344
|
+
};
|
|
345
|
+
if (false === __is(input))
|
|
346
|
+
((input, _path, _exceptionable = true) => {
|
|
347
|
+
const $guard = __typia.json.createAssertStringify.guard;
|
|
348
|
+
const $ao0 = (input, _path, _exceptionable = true) => (undefined === input.input || ("object" === typeof input.input && null !== input.input && false === Array.isArray(input.input) || $guard(_exceptionable, {
|
|
349
|
+
path: _path + ".input",
|
|
350
|
+
expected: "(__type | undefined)",
|
|
351
|
+
value: input.input
|
|
352
|
+
}, errorFactory)) && $ao1(input.input, _path + ".input", true && _exceptionable) || $guard(_exceptionable, {
|
|
353
|
+
path: _path + ".input",
|
|
354
|
+
expected: "(__type | undefined)",
|
|
355
|
+
value: input.input
|
|
356
|
+
}, errorFactory)) && (undefined === input.lang || "string" === typeof input.lang || $guard(_exceptionable, {
|
|
357
|
+
path: _path + ".lang",
|
|
358
|
+
expected: "(string | undefined)",
|
|
359
|
+
value: input.lang
|
|
360
|
+
}, errorFactory)) && (undefined === input.subtitle || "string" === typeof input.subtitle || $guard(_exceptionable, {
|
|
361
|
+
path: _path + ".subtitle",
|
|
362
|
+
expected: "(string | undefined)",
|
|
363
|
+
value: input.subtitle
|
|
364
|
+
}, errorFactory)) && (undefined === input.video || ("object" === typeof input.video && null !== input.video && false === Array.isArray(input.video) || $guard(_exceptionable, {
|
|
365
|
+
path: _path + ".video",
|
|
366
|
+
expected: "(__type.o1 | undefined)",
|
|
367
|
+
value: input.video
|
|
368
|
+
}, errorFactory)) && $ao2(input.video, _path + ".video", true && _exceptionable) || $guard(_exceptionable, {
|
|
369
|
+
path: _path + ".video",
|
|
370
|
+
expected: "(__type.o1 | undefined)",
|
|
371
|
+
value: input.video
|
|
372
|
+
}, errorFactory)) && (undefined === input.start || "number" === typeof input.start && !Number.isNaN(input.start) || $guard(_exceptionable, {
|
|
373
|
+
path: _path + ".start",
|
|
374
|
+
expected: "(number | undefined)",
|
|
375
|
+
value: input.start
|
|
376
|
+
}, errorFactory)) && (undefined === input.end || "number" === typeof input.end && !Number.isNaN(input.end) || $guard(_exceptionable, {
|
|
377
|
+
path: _path + ".end",
|
|
378
|
+
expected: "(number | undefined)",
|
|
379
|
+
value: input.end
|
|
380
|
+
}, errorFactory)) && (undefined === input.transcribe || ("object" === typeof input.transcribe && null !== input.transcribe && false === Array.isArray(input.transcribe) || $guard(_exceptionable, {
|
|
381
|
+
path: _path + ".transcribe",
|
|
382
|
+
expected: "(__type.o3 | undefined)",
|
|
383
|
+
value: input.transcribe
|
|
384
|
+
}, errorFactory)) && $ao4(input.transcribe, _path + ".transcribe", true && _exceptionable) || $guard(_exceptionable, {
|
|
385
|
+
path: _path + ".transcribe",
|
|
386
|
+
expected: "(__type.o3 | undefined)",
|
|
387
|
+
value: input.transcribe
|
|
388
|
+
}, errorFactory));
|
|
389
|
+
const $ao1 = (input, _path, _exceptionable = true) => (undefined === input.type || "string" === typeof input.type || $guard(_exceptionable, {
|
|
390
|
+
path: _path + ".type",
|
|
391
|
+
expected: "(string | undefined)",
|
|
392
|
+
value: input.type
|
|
393
|
+
}, errorFactory)) && (undefined === input.file || "string" === typeof input.file || $guard(_exceptionable, {
|
|
394
|
+
path: _path + ".file",
|
|
395
|
+
expected: "(string | undefined)",
|
|
396
|
+
value: input.file
|
|
397
|
+
}, errorFactory));
|
|
398
|
+
const $ao2 = (input, _path, _exceptionable = true) => undefined === input.crop || ("object" === typeof input.crop && null !== input.crop && false === Array.isArray(input.crop) || $guard(_exceptionable, {
|
|
399
|
+
path: _path + ".crop",
|
|
400
|
+
expected: "(__type.o2 | undefined)",
|
|
401
|
+
value: input.crop
|
|
402
|
+
}, errorFactory)) && $ao3(input.crop, _path + ".crop", true && _exceptionable) || $guard(_exceptionable, {
|
|
403
|
+
path: _path + ".crop",
|
|
404
|
+
expected: "(__type.o2 | undefined)",
|
|
405
|
+
value: input.crop
|
|
406
|
+
}, errorFactory);
|
|
407
|
+
const $ao3 = (input, _path, _exceptionable = true) => (undefined === input.x || "number" === typeof input.x && !Number.isNaN(input.x) || $guard(_exceptionable, {
|
|
408
|
+
path: _path + ".x",
|
|
409
|
+
expected: "(number | undefined)",
|
|
410
|
+
value: input.x
|
|
411
|
+
}, errorFactory)) && (undefined === input.y || "number" === typeof input.y && !Number.isNaN(input.y) || $guard(_exceptionable, {
|
|
412
|
+
path: _path + ".y",
|
|
413
|
+
expected: "(number | undefined)",
|
|
414
|
+
value: input.y
|
|
415
|
+
}, errorFactory)) && (undefined === input.width || "number" === typeof input.width && !Number.isNaN(input.width) || $guard(_exceptionable, {
|
|
416
|
+
path: _path + ".width",
|
|
417
|
+
expected: "(number | undefined)",
|
|
418
|
+
value: input.width
|
|
419
|
+
}, errorFactory)) && (undefined === input.height || "number" === typeof input.height && !Number.isNaN(input.height) || $guard(_exceptionable, {
|
|
420
|
+
path: _path + ".height",
|
|
421
|
+
expected: "(number | undefined)",
|
|
422
|
+
value: input.height
|
|
423
|
+
}, errorFactory));
|
|
424
|
+
const $ao4 = (input, _path, _exceptionable = true) => (undefined === input.language || "string" === typeof input.language || $guard(_exceptionable, {
|
|
425
|
+
path: _path + ".language",
|
|
426
|
+
expected: "(string | undefined)",
|
|
427
|
+
value: input.language
|
|
428
|
+
}, errorFactory)) && (undefined === input.pan || (Array.isArray(input.pan) || $guard(_exceptionable, {
|
|
429
|
+
path: _path + ".pan",
|
|
430
|
+
expected: "(Array<number> | undefined)",
|
|
431
|
+
value: input.pan
|
|
432
|
+
}, errorFactory)) && input.pan.every((elem, _index1) => "number" === typeof elem && !Number.isNaN(elem) || $guard(_exceptionable, {
|
|
433
|
+
path: _path + ".pan[" + _index1 + "]",
|
|
434
|
+
expected: "number",
|
|
435
|
+
value: elem
|
|
436
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
|
437
|
+
path: _path + ".pan",
|
|
438
|
+
expected: "(Array<number> | undefined)",
|
|
439
|
+
value: input.pan
|
|
440
|
+
}, errorFactory));
|
|
441
|
+
return ("object" === typeof input && null !== input && false === Array.isArray(input) || $guard(true, {
|
|
442
|
+
path: _path + "",
|
|
443
|
+
expected: "MediaSourceRecord",
|
|
444
|
+
value: input
|
|
445
|
+
}, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
|
|
446
|
+
path: _path + "",
|
|
447
|
+
expected: "MediaSourceRecord",
|
|
448
|
+
value: input
|
|
449
|
+
}, errorFactory);
|
|
450
|
+
})(input, "$input", true);
|
|
451
|
+
return input;
|
|
452
|
+
}; const stringify = input => {
|
|
453
|
+
const $io1 = input => (undefined === input.type || "string" === typeof input.type) && (undefined === input.file || "string" === typeof input.file);
|
|
454
|
+
const $io2 = input => undefined === input.crop || "object" === typeof input.crop && null !== input.crop && false === Array.isArray(input.crop) && $io3(input.crop);
|
|
455
|
+
const $io3 = input => (undefined === input.x || "number" === typeof input.x) && (undefined === input.y || "number" === typeof input.y) && (undefined === input.width || "number" === typeof input.width) && (undefined === input.height || "number" === typeof input.height);
|
|
456
|
+
const $io4 = input => (undefined === input.language || "string" === typeof input.language) && (undefined === input.pan || Array.isArray(input.pan) && input.pan.every(elem => "number" === typeof elem));
|
|
457
|
+
const $string = __typia.json.createAssertStringify.string;
|
|
458
|
+
const $tail = __typia.json.createAssertStringify.tail;
|
|
459
|
+
const $so0 = input => `{${$tail(`${undefined === input.input ? "" : `"input":${undefined !== input.input ? $so1(input.input) : undefined},`}${undefined === input.lang ? "" : `"lang":${undefined !== input.lang ? $string(input.lang) : undefined},`}${undefined === input.subtitle ? "" : `"subtitle":${undefined !== input.subtitle ? $string(input.subtitle) : undefined},`}${undefined === input.video ? "" : `"video":${undefined !== input.video ? $so2(input.video) : undefined},`}${undefined === input.start ? "" : `"start":${undefined !== input.start ? input.start : undefined},`}${undefined === input.end ? "" : `"end":${undefined !== input.end ? input.end : undefined},`}${undefined === input.transcribe ? "" : `"transcribe":${undefined !== input.transcribe ? $so4(input.transcribe) : undefined}`}`)}}`;
|
|
460
|
+
const $so1 = input => `{${$tail(`${undefined === input.type ? "" : `"type":${undefined !== input.type ? $string(input.type) : undefined},`}${undefined === input.file ? "" : `"file":${undefined !== input.file ? $string(input.file) : undefined}`}`)}}`;
|
|
461
|
+
const $so2 = input => `{${$tail(`${undefined === input.crop ? "" : `"crop":${undefined !== input.crop ? $so3(input.crop) : undefined}`}`)}}`;
|
|
462
|
+
const $so3 = input => `{${$tail(`${undefined === input.x ? "" : `"x":${undefined !== input.x ? input.x : undefined},`}${undefined === input.y ? "" : `"y":${undefined !== input.y ? input.y : undefined},`}${undefined === input.width ? "" : `"width":${undefined !== input.width ? input.width : undefined},`}${undefined === input.height ? "" : `"height":${undefined !== input.height ? input.height : undefined}`}`)}}`;
|
|
463
|
+
const $so4 = input => `{${$tail(`${undefined === input.language ? "" : `"language":${undefined !== input.language ? $string(input.language) : undefined},`}${undefined === input.pan ? "" : `"pan":${undefined !== input.pan ? `[${input.pan.map(elem => elem).join(",")}]` : undefined}`}`)}}`;
|
|
464
|
+
return $so0(input);
|
|
465
|
+
}; return stringify(assert(input, errorFactory)); };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { type AssertionGuard as __AssertionGuard } from "typia";
|
|
2
|
+
export interface PermissionDomainRecords {
|
|
3
|
+
":permission?": PermissionRecord;
|
|
4
|
+
}
|
|
5
|
+
export interface PermissionRecord {
|
|
6
|
+
permissions: PermissionRecordPermisson[];
|
|
7
|
+
}
|
|
8
|
+
export declare const isPermissionRecord: (input: unknown) => input is PermissionRecord;
|
|
9
|
+
export declare const assertPermissionRecord: (input: unknown) => PermissionRecord;
|
|
10
|
+
export declare const randomPermissionRecord: () => PermissionRecord;
|
|
11
|
+
export declare const assertGuardPermissionRecord: __AssertionGuard<PermissionRecord>;
|
|
12
|
+
export declare const stringifyPermissionRecord: (input: PermissionRecord) => string;
|
|
13
|
+
export declare const assertStringifyPermissionRecord: (input: unknown) => string;
|
|
14
|
+
export interface PermissionRecordPermisson {
|
|
15
|
+
type?: string;
|
|
16
|
+
method?: string;
|
|
17
|
+
tags?: string[];
|
|
18
|
+
}
|
|
19
|
+
export declare const isPermissionRecordPermisson: (input: unknown) => input is PermissionRecordPermisson;
|
|
20
|
+
export declare const assertPermissionRecordPermisson: (input: unknown) => PermissionRecordPermisson;
|
|
21
|
+
export declare const randomPermissionRecordPermisson: () => PermissionRecordPermisson;
|
|
22
|
+
export declare const assertGuardPermissionRecordPermisson: __AssertionGuard<PermissionRecordPermisson>;
|
|
23
|
+
export declare const stringifyPermissionRecordPermisson: (input: PermissionRecordPermisson) => string;
|
|
24
|
+
export declare const assertStringifyPermissionRecordPermisson: (input: unknown) => string;
|