@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,375 @@
|
|
|
1
|
+
import __typia from "typia";
|
|
2
|
+
export const isPermissionRecord = input => {
|
|
3
|
+
const $io0 = input => Array.isArray(input.permissions) && input.permissions.every(elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && $io1(elem));
|
|
4
|
+
const $io1 = input => (undefined === input.type || "string" === typeof input.type) && (undefined === input.method || "string" === typeof input.method) && (undefined === input.tags || Array.isArray(input.tags) && input.tags.every(elem => "string" === typeof elem));
|
|
5
|
+
return "object" === typeof input && null !== input && $io0(input);
|
|
6
|
+
};
|
|
7
|
+
export const assertPermissionRecord = (input, errorFactory) => {
|
|
8
|
+
const __is = input => {
|
|
9
|
+
const $io0 = input => Array.isArray(input.permissions) && input.permissions.every(elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && $io1(elem));
|
|
10
|
+
const $io1 = input => (undefined === input.type || "string" === typeof input.type) && (undefined === input.method || "string" === typeof input.method) && (undefined === input.tags || Array.isArray(input.tags) && input.tags.every(elem => "string" === typeof elem));
|
|
11
|
+
return "object" === typeof input && null !== 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) => (Array.isArray(input.permissions) || $guard(_exceptionable, {
|
|
17
|
+
path: _path + ".permissions",
|
|
18
|
+
expected: "Array<PermissionRecordPermisson>",
|
|
19
|
+
value: input.permissions
|
|
20
|
+
}, errorFactory)) && input.permissions.every((elem, _index1) => ("object" === typeof elem && null !== elem && false === Array.isArray(elem) || $guard(_exceptionable, {
|
|
21
|
+
path: _path + ".permissions[" + _index1 + "]",
|
|
22
|
+
expected: "PermissionRecordPermisson",
|
|
23
|
+
value: elem
|
|
24
|
+
}, errorFactory)) && $ao1(elem, _path + ".permissions[" + _index1 + "]", true && _exceptionable) || $guard(_exceptionable, {
|
|
25
|
+
path: _path + ".permissions[" + _index1 + "]",
|
|
26
|
+
expected: "PermissionRecordPermisson",
|
|
27
|
+
value: elem
|
|
28
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
|
29
|
+
path: _path + ".permissions",
|
|
30
|
+
expected: "Array<PermissionRecordPermisson>",
|
|
31
|
+
value: input.permissions
|
|
32
|
+
}, errorFactory);
|
|
33
|
+
const $ao1 = (input, _path, _exceptionable = true) => (undefined === input.type || "string" === typeof input.type || $guard(_exceptionable, {
|
|
34
|
+
path: _path + ".type",
|
|
35
|
+
expected: "(string | undefined)",
|
|
36
|
+
value: input.type
|
|
37
|
+
}, errorFactory)) && (undefined === input.method || "string" === typeof input.method || $guard(_exceptionable, {
|
|
38
|
+
path: _path + ".method",
|
|
39
|
+
expected: "(string | undefined)",
|
|
40
|
+
value: input.method
|
|
41
|
+
}, errorFactory)) && (undefined === input.tags || (Array.isArray(input.tags) || $guard(_exceptionable, {
|
|
42
|
+
path: _path + ".tags",
|
|
43
|
+
expected: "(Array<string> | undefined)",
|
|
44
|
+
value: input.tags
|
|
45
|
+
}, errorFactory)) && input.tags.every((elem, _index2) => "string" === typeof elem || $guard(_exceptionable, {
|
|
46
|
+
path: _path + ".tags[" + _index2 + "]",
|
|
47
|
+
expected: "string",
|
|
48
|
+
value: elem
|
|
49
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
|
50
|
+
path: _path + ".tags",
|
|
51
|
+
expected: "(Array<string> | undefined)",
|
|
52
|
+
value: input.tags
|
|
53
|
+
}, errorFactory));
|
|
54
|
+
return ("object" === typeof input && null !== input || $guard(true, {
|
|
55
|
+
path: _path + "",
|
|
56
|
+
expected: "PermissionRecord",
|
|
57
|
+
value: input
|
|
58
|
+
}, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
|
|
59
|
+
path: _path + "",
|
|
60
|
+
expected: "PermissionRecord",
|
|
61
|
+
value: input
|
|
62
|
+
}, errorFactory);
|
|
63
|
+
})(input, "$input", true);
|
|
64
|
+
return input;
|
|
65
|
+
};
|
|
66
|
+
export const randomPermissionRecord = generator => {
|
|
67
|
+
const $generator = __typia.createRandom.generator;
|
|
68
|
+
const $pick = __typia.createRandom.pick;
|
|
69
|
+
const $ro0 = (_recursive = false, _depth = 0) => ({
|
|
70
|
+
permissions: (generator?.array ?? $generator.array)(() => $ro1(_recursive, _recursive ? 1 + _depth : _depth))
|
|
71
|
+
});
|
|
72
|
+
const $ro1 = (_recursive = false, _depth = 0) => ({
|
|
73
|
+
type: $pick([
|
|
74
|
+
() => undefined,
|
|
75
|
+
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
|
|
76
|
+
])(),
|
|
77
|
+
method: $pick([
|
|
78
|
+
() => undefined,
|
|
79
|
+
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
|
|
80
|
+
])(),
|
|
81
|
+
tags: $pick([
|
|
82
|
+
() => undefined,
|
|
83
|
+
() => (generator?.array ?? $generator.array)(() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)())
|
|
84
|
+
])()
|
|
85
|
+
});
|
|
86
|
+
return $ro0();
|
|
87
|
+
};
|
|
88
|
+
export const assertGuardPermissionRecord = (input, errorFactory) => {
|
|
89
|
+
const __is = input => {
|
|
90
|
+
const $io0 = input => Array.isArray(input.permissions) && input.permissions.every(elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && $io1(elem));
|
|
91
|
+
const $io1 = input => (undefined === input.type || "string" === typeof input.type) && (undefined === input.method || "string" === typeof input.method) && (undefined === input.tags || Array.isArray(input.tags) && input.tags.every(elem => "string" === typeof elem));
|
|
92
|
+
return "object" === typeof input && null !== input && $io0(input);
|
|
93
|
+
};
|
|
94
|
+
if (false === __is(input))
|
|
95
|
+
((input, _path, _exceptionable = true) => {
|
|
96
|
+
const $guard = __typia.createAssertGuard.guard;
|
|
97
|
+
const $ao0 = (input, _path, _exceptionable = true) => (Array.isArray(input.permissions) || $guard(_exceptionable, {
|
|
98
|
+
path: _path + ".permissions",
|
|
99
|
+
expected: "Array<PermissionRecordPermisson>",
|
|
100
|
+
value: input.permissions
|
|
101
|
+
}, errorFactory)) && input.permissions.every((elem, _index1) => ("object" === typeof elem && null !== elem && false === Array.isArray(elem) || $guard(_exceptionable, {
|
|
102
|
+
path: _path + ".permissions[" + _index1 + "]",
|
|
103
|
+
expected: "PermissionRecordPermisson",
|
|
104
|
+
value: elem
|
|
105
|
+
}, errorFactory)) && $ao1(elem, _path + ".permissions[" + _index1 + "]", true && _exceptionable) || $guard(_exceptionable, {
|
|
106
|
+
path: _path + ".permissions[" + _index1 + "]",
|
|
107
|
+
expected: "PermissionRecordPermisson",
|
|
108
|
+
value: elem
|
|
109
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
|
110
|
+
path: _path + ".permissions",
|
|
111
|
+
expected: "Array<PermissionRecordPermisson>",
|
|
112
|
+
value: input.permissions
|
|
113
|
+
}, errorFactory);
|
|
114
|
+
const $ao1 = (input, _path, _exceptionable = true) => (undefined === input.type || "string" === typeof input.type || $guard(_exceptionable, {
|
|
115
|
+
path: _path + ".type",
|
|
116
|
+
expected: "(string | undefined)",
|
|
117
|
+
value: input.type
|
|
118
|
+
}, errorFactory)) && (undefined === input.method || "string" === typeof input.method || $guard(_exceptionable, {
|
|
119
|
+
path: _path + ".method",
|
|
120
|
+
expected: "(string | undefined)",
|
|
121
|
+
value: input.method
|
|
122
|
+
}, errorFactory)) && (undefined === input.tags || (Array.isArray(input.tags) || $guard(_exceptionable, {
|
|
123
|
+
path: _path + ".tags",
|
|
124
|
+
expected: "(Array<string> | undefined)",
|
|
125
|
+
value: input.tags
|
|
126
|
+
}, errorFactory)) && input.tags.every((elem, _index2) => "string" === typeof elem || $guard(_exceptionable, {
|
|
127
|
+
path: _path + ".tags[" + _index2 + "]",
|
|
128
|
+
expected: "string",
|
|
129
|
+
value: elem
|
|
130
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
|
131
|
+
path: _path + ".tags",
|
|
132
|
+
expected: "(Array<string> | undefined)",
|
|
133
|
+
value: input.tags
|
|
134
|
+
}, errorFactory));
|
|
135
|
+
return ("object" === typeof input && null !== input || $guard(true, {
|
|
136
|
+
path: _path + "",
|
|
137
|
+
expected: "PermissionRecord",
|
|
138
|
+
value: input
|
|
139
|
+
}, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
|
|
140
|
+
path: _path + "",
|
|
141
|
+
expected: "PermissionRecord",
|
|
142
|
+
value: input
|
|
143
|
+
}, errorFactory);
|
|
144
|
+
})(input, "$input", true);
|
|
145
|
+
};
|
|
146
|
+
export const stringifyPermissionRecord = input => {
|
|
147
|
+
const $io1 = input => (undefined === input.type || "string" === typeof input.type) && (undefined === input.method || "string" === typeof input.method) && (undefined === input.tags || Array.isArray(input.tags) && input.tags.every(elem => "string" === typeof elem));
|
|
148
|
+
const $string = __typia.json.createStringify.string;
|
|
149
|
+
const $tail = __typia.json.createStringify.tail;
|
|
150
|
+
const $so0 = input => `{"permissions":${`[${input.permissions.map(elem => $so1(elem)).join(",")}]`}}`;
|
|
151
|
+
const $so1 = input => `{${$tail(`${undefined === input.type ? "" : `"type":${undefined !== input.type ? $string(input.type) : undefined},`}${undefined === input.method ? "" : `"method":${undefined !== input.method ? $string(input.method) : undefined},`}${undefined === input.tags ? "" : `"tags":${undefined !== input.tags ? `[${input.tags.map(elem => $string(elem)).join(",")}]` : undefined}`}`)}}`;
|
|
152
|
+
return $so0(input);
|
|
153
|
+
};
|
|
154
|
+
export const assertStringifyPermissionRecord = (input, errorFactory) => { const assert = (input, errorFactory) => {
|
|
155
|
+
const __is = input => {
|
|
156
|
+
const $io0 = input => Array.isArray(input.permissions) && input.permissions.every(elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && $io1(elem));
|
|
157
|
+
const $io1 = input => (undefined === input.type || "string" === typeof input.type) && (undefined === input.method || "string" === typeof input.method) && (undefined === input.tags || Array.isArray(input.tags) && input.tags.every(elem => "string" === typeof elem));
|
|
158
|
+
return "object" === typeof input && null !== input && $io0(input);
|
|
159
|
+
};
|
|
160
|
+
if (false === __is(input))
|
|
161
|
+
((input, _path, _exceptionable = true) => {
|
|
162
|
+
const $guard = __typia.json.createAssertStringify.guard;
|
|
163
|
+
const $ao0 = (input, _path, _exceptionable = true) => (Array.isArray(input.permissions) || $guard(_exceptionable, {
|
|
164
|
+
path: _path + ".permissions",
|
|
165
|
+
expected: "Array<PermissionRecordPermisson>",
|
|
166
|
+
value: input.permissions
|
|
167
|
+
}, errorFactory)) && input.permissions.every((elem, _index1) => ("object" === typeof elem && null !== elem && false === Array.isArray(elem) || $guard(_exceptionable, {
|
|
168
|
+
path: _path + ".permissions[" + _index1 + "]",
|
|
169
|
+
expected: "PermissionRecordPermisson",
|
|
170
|
+
value: elem
|
|
171
|
+
}, errorFactory)) && $ao1(elem, _path + ".permissions[" + _index1 + "]", true && _exceptionable) || $guard(_exceptionable, {
|
|
172
|
+
path: _path + ".permissions[" + _index1 + "]",
|
|
173
|
+
expected: "PermissionRecordPermisson",
|
|
174
|
+
value: elem
|
|
175
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
|
176
|
+
path: _path + ".permissions",
|
|
177
|
+
expected: "Array<PermissionRecordPermisson>",
|
|
178
|
+
value: input.permissions
|
|
179
|
+
}, errorFactory);
|
|
180
|
+
const $ao1 = (input, _path, _exceptionable = true) => (undefined === input.type || "string" === typeof input.type || $guard(_exceptionable, {
|
|
181
|
+
path: _path + ".type",
|
|
182
|
+
expected: "(string | undefined)",
|
|
183
|
+
value: input.type
|
|
184
|
+
}, errorFactory)) && (undefined === input.method || "string" === typeof input.method || $guard(_exceptionable, {
|
|
185
|
+
path: _path + ".method",
|
|
186
|
+
expected: "(string | undefined)",
|
|
187
|
+
value: input.method
|
|
188
|
+
}, errorFactory)) && (undefined === input.tags || (Array.isArray(input.tags) || $guard(_exceptionable, {
|
|
189
|
+
path: _path + ".tags",
|
|
190
|
+
expected: "(Array<string> | undefined)",
|
|
191
|
+
value: input.tags
|
|
192
|
+
}, errorFactory)) && input.tags.every((elem, _index2) => "string" === typeof elem || $guard(_exceptionable, {
|
|
193
|
+
path: _path + ".tags[" + _index2 + "]",
|
|
194
|
+
expected: "string",
|
|
195
|
+
value: elem
|
|
196
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
|
197
|
+
path: _path + ".tags",
|
|
198
|
+
expected: "(Array<string> | undefined)",
|
|
199
|
+
value: input.tags
|
|
200
|
+
}, errorFactory));
|
|
201
|
+
return ("object" === typeof input && null !== input || $guard(true, {
|
|
202
|
+
path: _path + "",
|
|
203
|
+
expected: "PermissionRecord",
|
|
204
|
+
value: input
|
|
205
|
+
}, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
|
|
206
|
+
path: _path + "",
|
|
207
|
+
expected: "PermissionRecord",
|
|
208
|
+
value: input
|
|
209
|
+
}, errorFactory);
|
|
210
|
+
})(input, "$input", true);
|
|
211
|
+
return input;
|
|
212
|
+
}; const stringify = input => {
|
|
213
|
+
const $io1 = input => (undefined === input.type || "string" === typeof input.type) && (undefined === input.method || "string" === typeof input.method) && (undefined === input.tags || Array.isArray(input.tags) && input.tags.every(elem => "string" === typeof elem));
|
|
214
|
+
const $string = __typia.json.createAssertStringify.string;
|
|
215
|
+
const $tail = __typia.json.createAssertStringify.tail;
|
|
216
|
+
const $so0 = input => `{"permissions":${`[${input.permissions.map(elem => $so1(elem)).join(",")}]`}}`;
|
|
217
|
+
const $so1 = input => `{${$tail(`${undefined === input.type ? "" : `"type":${undefined !== input.type ? $string(input.type) : undefined},`}${undefined === input.method ? "" : `"method":${undefined !== input.method ? $string(input.method) : undefined},`}${undefined === input.tags ? "" : `"tags":${undefined !== input.tags ? `[${input.tags.map(elem => $string(elem)).join(",")}]` : undefined}`}`)}}`;
|
|
218
|
+
return $so0(input);
|
|
219
|
+
}; return stringify(assert(input, errorFactory)); };
|
|
220
|
+
export const isPermissionRecordPermisson = input => {
|
|
221
|
+
const $io0 = input => (undefined === input.type || "string" === typeof input.type) && (undefined === input.method || "string" === typeof input.method) && (undefined === input.tags || Array.isArray(input.tags) && input.tags.every(elem => "string" === typeof elem));
|
|
222
|
+
return "object" === typeof input && null !== input && false === Array.isArray(input) && $io0(input);
|
|
223
|
+
};
|
|
224
|
+
export const assertPermissionRecordPermisson = (input, errorFactory) => {
|
|
225
|
+
const __is = input => {
|
|
226
|
+
const $io0 = input => (undefined === input.type || "string" === typeof input.type) && (undefined === input.method || "string" === typeof input.method) && (undefined === input.tags || Array.isArray(input.tags) && input.tags.every(elem => "string" === typeof elem));
|
|
227
|
+
return "object" === typeof input && null !== input && false === Array.isArray(input) && $io0(input);
|
|
228
|
+
};
|
|
229
|
+
if (false === __is(input))
|
|
230
|
+
((input, _path, _exceptionable = true) => {
|
|
231
|
+
const $guard = __typia.createAssert.guard;
|
|
232
|
+
const $ao0 = (input, _path, _exceptionable = true) => (undefined === input.type || "string" === typeof input.type || $guard(_exceptionable, {
|
|
233
|
+
path: _path + ".type",
|
|
234
|
+
expected: "(string | undefined)",
|
|
235
|
+
value: input.type
|
|
236
|
+
}, errorFactory)) && (undefined === input.method || "string" === typeof input.method || $guard(_exceptionable, {
|
|
237
|
+
path: _path + ".method",
|
|
238
|
+
expected: "(string | undefined)",
|
|
239
|
+
value: input.method
|
|
240
|
+
}, errorFactory)) && (undefined === input.tags || (Array.isArray(input.tags) || $guard(_exceptionable, {
|
|
241
|
+
path: _path + ".tags",
|
|
242
|
+
expected: "(Array<string> | undefined)",
|
|
243
|
+
value: input.tags
|
|
244
|
+
}, errorFactory)) && input.tags.every((elem, _index1) => "string" === typeof elem || $guard(_exceptionable, {
|
|
245
|
+
path: _path + ".tags[" + _index1 + "]",
|
|
246
|
+
expected: "string",
|
|
247
|
+
value: elem
|
|
248
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
|
249
|
+
path: _path + ".tags",
|
|
250
|
+
expected: "(Array<string> | undefined)",
|
|
251
|
+
value: input.tags
|
|
252
|
+
}, errorFactory));
|
|
253
|
+
return ("object" === typeof input && null !== input && false === Array.isArray(input) || $guard(true, {
|
|
254
|
+
path: _path + "",
|
|
255
|
+
expected: "PermissionRecordPermisson",
|
|
256
|
+
value: input
|
|
257
|
+
}, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
|
|
258
|
+
path: _path + "",
|
|
259
|
+
expected: "PermissionRecordPermisson",
|
|
260
|
+
value: input
|
|
261
|
+
}, errorFactory);
|
|
262
|
+
})(input, "$input", true);
|
|
263
|
+
return input;
|
|
264
|
+
};
|
|
265
|
+
export const randomPermissionRecordPermisson = generator => {
|
|
266
|
+
const $generator = __typia.createRandom.generator;
|
|
267
|
+
const $pick = __typia.createRandom.pick;
|
|
268
|
+
const $ro0 = (_recursive = false, _depth = 0) => ({
|
|
269
|
+
type: $pick([
|
|
270
|
+
() => undefined,
|
|
271
|
+
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
|
|
272
|
+
])(),
|
|
273
|
+
method: $pick([
|
|
274
|
+
() => undefined,
|
|
275
|
+
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
|
|
276
|
+
])(),
|
|
277
|
+
tags: $pick([
|
|
278
|
+
() => undefined,
|
|
279
|
+
() => (generator?.array ?? $generator.array)(() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)())
|
|
280
|
+
])()
|
|
281
|
+
});
|
|
282
|
+
return $ro0();
|
|
283
|
+
};
|
|
284
|
+
export const assertGuardPermissionRecordPermisson = (input, errorFactory) => {
|
|
285
|
+
const __is = input => {
|
|
286
|
+
const $io0 = input => (undefined === input.type || "string" === typeof input.type) && (undefined === input.method || "string" === typeof input.method) && (undefined === input.tags || Array.isArray(input.tags) && input.tags.every(elem => "string" === typeof elem));
|
|
287
|
+
return "object" === typeof input && null !== input && false === Array.isArray(input) && $io0(input);
|
|
288
|
+
};
|
|
289
|
+
if (false === __is(input))
|
|
290
|
+
((input, _path, _exceptionable = true) => {
|
|
291
|
+
const $guard = __typia.createAssertGuard.guard;
|
|
292
|
+
const $ao0 = (input, _path, _exceptionable = true) => (undefined === input.type || "string" === typeof input.type || $guard(_exceptionable, {
|
|
293
|
+
path: _path + ".type",
|
|
294
|
+
expected: "(string | undefined)",
|
|
295
|
+
value: input.type
|
|
296
|
+
}, errorFactory)) && (undefined === input.method || "string" === typeof input.method || $guard(_exceptionable, {
|
|
297
|
+
path: _path + ".method",
|
|
298
|
+
expected: "(string | undefined)",
|
|
299
|
+
value: input.method
|
|
300
|
+
}, errorFactory)) && (undefined === input.tags || (Array.isArray(input.tags) || $guard(_exceptionable, {
|
|
301
|
+
path: _path + ".tags",
|
|
302
|
+
expected: "(Array<string> | undefined)",
|
|
303
|
+
value: input.tags
|
|
304
|
+
}, errorFactory)) && input.tags.every((elem, _index1) => "string" === typeof elem || $guard(_exceptionable, {
|
|
305
|
+
path: _path + ".tags[" + _index1 + "]",
|
|
306
|
+
expected: "string",
|
|
307
|
+
value: elem
|
|
308
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
|
309
|
+
path: _path + ".tags",
|
|
310
|
+
expected: "(Array<string> | undefined)",
|
|
311
|
+
value: input.tags
|
|
312
|
+
}, errorFactory));
|
|
313
|
+
return ("object" === typeof input && null !== input && false === Array.isArray(input) || $guard(true, {
|
|
314
|
+
path: _path + "",
|
|
315
|
+
expected: "PermissionRecordPermisson",
|
|
316
|
+
value: input
|
|
317
|
+
}, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
|
|
318
|
+
path: _path + "",
|
|
319
|
+
expected: "PermissionRecordPermisson",
|
|
320
|
+
value: input
|
|
321
|
+
}, errorFactory);
|
|
322
|
+
})(input, "$input", true);
|
|
323
|
+
};
|
|
324
|
+
export const stringifyPermissionRecordPermisson = input => {
|
|
325
|
+
const $string = __typia.json.createStringify.string;
|
|
326
|
+
const $tail = __typia.json.createStringify.tail;
|
|
327
|
+
const $so0 = input => `{${$tail(`${undefined === input.type ? "" : `"type":${undefined !== input.type ? $string(input.type) : undefined},`}${undefined === input.method ? "" : `"method":${undefined !== input.method ? $string(input.method) : undefined},`}${undefined === input.tags ? "" : `"tags":${undefined !== input.tags ? `[${input.tags.map(elem => $string(elem)).join(",")}]` : undefined}`}`)}}`;
|
|
328
|
+
return $so0(input);
|
|
329
|
+
};
|
|
330
|
+
export const assertStringifyPermissionRecordPermisson = (input, errorFactory) => { const assert = (input, errorFactory) => {
|
|
331
|
+
const __is = input => {
|
|
332
|
+
const $io0 = input => (undefined === input.type || "string" === typeof input.type) && (undefined === input.method || "string" === typeof input.method) && (undefined === input.tags || Array.isArray(input.tags) && input.tags.every(elem => "string" === typeof elem));
|
|
333
|
+
return "object" === typeof input && null !== input && false === Array.isArray(input) && $io0(input);
|
|
334
|
+
};
|
|
335
|
+
if (false === __is(input))
|
|
336
|
+
((input, _path, _exceptionable = true) => {
|
|
337
|
+
const $guard = __typia.json.createAssertStringify.guard;
|
|
338
|
+
const $ao0 = (input, _path, _exceptionable = true) => (undefined === input.type || "string" === typeof input.type || $guard(_exceptionable, {
|
|
339
|
+
path: _path + ".type",
|
|
340
|
+
expected: "(string | undefined)",
|
|
341
|
+
value: input.type
|
|
342
|
+
}, errorFactory)) && (undefined === input.method || "string" === typeof input.method || $guard(_exceptionable, {
|
|
343
|
+
path: _path + ".method",
|
|
344
|
+
expected: "(string | undefined)",
|
|
345
|
+
value: input.method
|
|
346
|
+
}, errorFactory)) && (undefined === input.tags || (Array.isArray(input.tags) || $guard(_exceptionable, {
|
|
347
|
+
path: _path + ".tags",
|
|
348
|
+
expected: "(Array<string> | undefined)",
|
|
349
|
+
value: input.tags
|
|
350
|
+
}, errorFactory)) && input.tags.every((elem, _index1) => "string" === typeof elem || $guard(_exceptionable, {
|
|
351
|
+
path: _path + ".tags[" + _index1 + "]",
|
|
352
|
+
expected: "string",
|
|
353
|
+
value: elem
|
|
354
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
|
355
|
+
path: _path + ".tags",
|
|
356
|
+
expected: "(Array<string> | undefined)",
|
|
357
|
+
value: input.tags
|
|
358
|
+
}, errorFactory));
|
|
359
|
+
return ("object" === typeof input && null !== input && false === Array.isArray(input) || $guard(true, {
|
|
360
|
+
path: _path + "",
|
|
361
|
+
expected: "PermissionRecordPermisson",
|
|
362
|
+
value: input
|
|
363
|
+
}, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
|
|
364
|
+
path: _path + "",
|
|
365
|
+
expected: "PermissionRecordPermisson",
|
|
366
|
+
value: input
|
|
367
|
+
}, errorFactory);
|
|
368
|
+
})(input, "$input", true);
|
|
369
|
+
return input;
|
|
370
|
+
}; const stringify = input => {
|
|
371
|
+
const $string = __typia.json.createAssertStringify.string;
|
|
372
|
+
const $tail = __typia.json.createAssertStringify.tail;
|
|
373
|
+
const $so0 = input => `{${$tail(`${undefined === input.type ? "" : `"type":${undefined !== input.type ? $string(input.type) : undefined},`}${undefined === input.method ? "" : `"method":${undefined !== input.method ? $string(input.method) : undefined},`}${undefined === input.tags ? "" : `"tags":${undefined !== input.tags ? `[${input.tags.map(elem => $string(elem)).join(",")}]` : undefined}`}`)}}`;
|
|
374
|
+
return $so0(input);
|
|
375
|
+
}; return stringify(assert(input, errorFactory)); };
|
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
import { type AssertionGuard as __AssertionGuard } from "typia";
|
|
2
|
+
import type { Message, RpcMethods } from '../common/index.js';
|
|
3
|
+
export interface PublishDomainRecords {
|
|
4
|
+
[":publish"]: PublishRecord;
|
|
5
|
+
[":publish.stats?"]: PublishStatsRecord;
|
|
6
|
+
[":publish.methods?"]: RpcMethods;
|
|
7
|
+
}
|
|
8
|
+
export type PublishRecord = YoutubePublishRecord | FacebookPublishRecord | FilePublishRecord;
|
|
9
|
+
export declare const isPublishRecord: (input: unknown) => input is PublishRecord;
|
|
10
|
+
export declare const assertPublishRecord: (input: unknown) => PublishRecord;
|
|
11
|
+
export declare const randomPublishRecord: () => PublishRecord;
|
|
12
|
+
export declare const assertGuardPublishRecord: __AssertionGuard<PublishRecord>;
|
|
13
|
+
export declare const stringifyPublishRecord: (input: PublishRecord) => string;
|
|
14
|
+
export declare const assertStringifyPublishRecord: (input: unknown) => string;
|
|
15
|
+
export type PublishStatsRecord = YoutubePublishStatsRecord | FacebookPublishStatsRecord | FilePublishStatsRecord;
|
|
16
|
+
export declare const isPublishStatsRecord: (input: unknown) => input is PublishStatsRecord;
|
|
17
|
+
export declare const assertPublishStatsRecord: (input: unknown) => PublishStatsRecord;
|
|
18
|
+
export declare const randomPublishStatsRecord: () => PublishStatsRecord;
|
|
19
|
+
export declare const assertGuardPublishStatsRecord: __AssertionGuard<PublishStatsRecord>;
|
|
20
|
+
export declare const stringifyPublishStatsRecord: (input: PublishStatsRecord) => string;
|
|
21
|
+
export declare const assertStringifyPublishStatsRecord: (input: unknown) => string;
|
|
22
|
+
interface PublishRecordCommon<Type extends PublishRecord["type"]> {
|
|
23
|
+
type: Type;
|
|
24
|
+
asset?: string;
|
|
25
|
+
connection?: string;
|
|
26
|
+
render?: unknown;
|
|
27
|
+
draft?: Record<string, unknown>;
|
|
28
|
+
published?: Record<string, unknown>;
|
|
29
|
+
remote?: Record<string, unknown>;
|
|
30
|
+
error?: {
|
|
31
|
+
method: string;
|
|
32
|
+
} | null;
|
|
33
|
+
messages?: Message[];
|
|
34
|
+
}
|
|
35
|
+
export interface PublishStatsRecordCommon {
|
|
36
|
+
status?: string;
|
|
37
|
+
substatus?: string;
|
|
38
|
+
messages?: Message[];
|
|
39
|
+
retrieved?: Record<string, unknown>;
|
|
40
|
+
defaults?: Record<string, unknown>;
|
|
41
|
+
}
|
|
42
|
+
export declare const isPublishStatsRecordCommon: (input: unknown) => input is PublishStatsRecordCommon;
|
|
43
|
+
export declare const assertPublishStatsRecordCommon: (input: unknown) => PublishStatsRecordCommon;
|
|
44
|
+
export declare const randomPublishStatsRecordCommon: () => PublishStatsRecordCommon;
|
|
45
|
+
export declare const assertGuardPublishStatsRecordCommon: __AssertionGuard<PublishStatsRecordCommon>;
|
|
46
|
+
export declare const stringifyPublishStatsRecordCommon: (input: PublishStatsRecordCommon) => string;
|
|
47
|
+
export declare const assertStringifyPublishStatsRecordCommon: (input: unknown) => string;
|
|
48
|
+
export interface YoutubePublishRecord extends PublishRecordCommon<"youtube"> {
|
|
49
|
+
draft?: {
|
|
50
|
+
snippet?: {
|
|
51
|
+
title?: string;
|
|
52
|
+
tags?: string[];
|
|
53
|
+
description?: string;
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
export declare const isYoutubePublishRecord: (input: unknown) => input is YoutubePublishRecord;
|
|
58
|
+
export declare const assertYoutubePublishRecord: (input: unknown) => YoutubePublishRecord;
|
|
59
|
+
export declare const randomYoutubePublishRecord: () => YoutubePublishRecord;
|
|
60
|
+
export declare const assertGuardYoutubePublishRecord: __AssertionGuard<YoutubePublishRecord>;
|
|
61
|
+
export declare const stringifyYoutubePublishRecord: (input: YoutubePublishRecord) => string;
|
|
62
|
+
export declare const assertStringifyYoutubePublishRecord: (input: unknown) => string;
|
|
63
|
+
export type YoutubePublishStatsRecord = PublishStatsRecordCommon;
|
|
64
|
+
export declare const isYoutubePublishStatsRecord: (input: unknown) => input is PublishStatsRecordCommon;
|
|
65
|
+
export declare const assertYoutubePublishStatsRecord: (input: unknown) => PublishStatsRecordCommon;
|
|
66
|
+
export declare const randomYoutubePublishStatsRecord: () => PublishStatsRecordCommon;
|
|
67
|
+
export declare const assertGuardYoutubePublishStatsRecord: __AssertionGuard<YoutubePublishStatsRecord>;
|
|
68
|
+
export declare const stringifyYoutubePublishStatsRecord: (input: PublishStatsRecordCommon) => string;
|
|
69
|
+
export declare const assertStringifyYoutubePublishStatsRecord: (input: unknown) => string;
|
|
70
|
+
export interface FacebookPublishRecord extends PublishRecordCommon<"facebook"> {
|
|
71
|
+
pageId?: string;
|
|
72
|
+
}
|
|
73
|
+
export declare const isFacebookPublishRecord: (input: unknown) => input is FacebookPublishRecord;
|
|
74
|
+
export declare const assertFacebookPublishRecord: (input: unknown) => FacebookPublishRecord;
|
|
75
|
+
export declare const randomFacebookPublishRecord: () => FacebookPublishRecord;
|
|
76
|
+
export declare const assertGuardFacebookPublishRecord: __AssertionGuard<FacebookPublishRecord>;
|
|
77
|
+
export declare const stringifyFacebookPublishRecord: (input: FacebookPublishRecord) => string;
|
|
78
|
+
export declare const assertStringifyFacebookPublishRecord: (input: unknown) => string;
|
|
79
|
+
export type FacebookPublishStatsRecord = PublishStatsRecordCommon;
|
|
80
|
+
export declare const isFacebookPublishStatsRecord: (input: unknown) => input is PublishStatsRecordCommon;
|
|
81
|
+
export declare const assertFacebookPublishStatsRecord: (input: unknown) => PublishStatsRecordCommon;
|
|
82
|
+
export declare const randomFacebookPublishStatsRecord: () => PublishStatsRecordCommon;
|
|
83
|
+
export declare const assertGuardFacebookPublishStatsRecord: __AssertionGuard<FacebookPublishStatsRecord>;
|
|
84
|
+
export declare const stringifyFacebookPublishStatsRecord: (input: PublishStatsRecordCommon) => string;
|
|
85
|
+
export declare const assertStringifyFacebookPublishStatsRecord: (input: unknown) => string;
|
|
86
|
+
export interface FilePublishRecord extends PublishRecordCommon<"file"> {
|
|
87
|
+
directory?: string;
|
|
88
|
+
filename?: string;
|
|
89
|
+
renders?: Record<string, FilePublishRender>;
|
|
90
|
+
draft?: FilePublishDraft;
|
|
91
|
+
remote?: FilePublishRemote;
|
|
92
|
+
published?: FilePublishPublished;
|
|
93
|
+
}
|
|
94
|
+
export declare const isFilePublishRecord: (input: unknown) => input is FilePublishRecord;
|
|
95
|
+
export declare const assertFilePublishRecord: (input: unknown) => FilePublishRecord;
|
|
96
|
+
export declare const randomFilePublishRecord: () => FilePublishRecord;
|
|
97
|
+
export declare const assertGuardFilePublishRecord: __AssertionGuard<FilePublishRecord>;
|
|
98
|
+
export declare const stringifyFilePublishRecord: (input: FilePublishRecord) => string;
|
|
99
|
+
export declare const assertStringifyFilePublishRecord: (input: unknown) => string;
|
|
100
|
+
export interface FilePublishRender {
|
|
101
|
+
name?: string;
|
|
102
|
+
path?: string;
|
|
103
|
+
collisionStrategy?: "overwrite" | "skip";
|
|
104
|
+
preset?: string;
|
|
105
|
+
type?: string;
|
|
106
|
+
profile?: unknown;
|
|
107
|
+
scene?: string;
|
|
108
|
+
}
|
|
109
|
+
export declare const isFilePublishRender: (input: unknown) => input is FilePublishRender;
|
|
110
|
+
export declare const assertFilePublishRender: (input: unknown) => FilePublishRender;
|
|
111
|
+
export declare const randomFilePublishRender: () => FilePublishRender;
|
|
112
|
+
export declare const assertGuardFilePublishRender: __AssertionGuard<FilePublishRender>;
|
|
113
|
+
export declare const stringifyFilePublishRender: (input: FilePublishRender) => string;
|
|
114
|
+
export declare const assertStringifyFilePublishRender: (input: unknown) => string;
|
|
115
|
+
export interface FilePublishPublished extends Record<string, unknown> {
|
|
116
|
+
directory?: string;
|
|
117
|
+
filename?: string;
|
|
118
|
+
}
|
|
119
|
+
export declare const isFilePublishPublished: (input: unknown) => input is FilePublishPublished;
|
|
120
|
+
export declare const assertFilePublishPublished: (input: unknown) => FilePublishPublished;
|
|
121
|
+
export declare const randomFilePublishPublished: () => FilePublishPublished;
|
|
122
|
+
export declare const assertGuardFilePublishPublished: __AssertionGuard<FilePublishPublished>;
|
|
123
|
+
export declare const stringifyFilePublishPublished: (input: FilePublishPublished) => string;
|
|
124
|
+
export declare const assertStringifyFilePublishPublished: (input: unknown) => string;
|
|
125
|
+
export interface FilePublishDraft extends Record<string, unknown> {
|
|
126
|
+
directory?: string;
|
|
127
|
+
filename?: string;
|
|
128
|
+
}
|
|
129
|
+
export declare const isFilePublishDraft: (input: unknown) => input is FilePublishDraft;
|
|
130
|
+
export declare const assertFilePublishDraft: (input: unknown) => FilePublishDraft;
|
|
131
|
+
export declare const randomFilePublishDraft: () => FilePublishDraft;
|
|
132
|
+
export declare const assertGuardFilePublishDraft: __AssertionGuard<FilePublishDraft>;
|
|
133
|
+
export declare const stringifyFilePublishDraft: (input: FilePublishDraft) => string;
|
|
134
|
+
export declare const assertStringifyFilePublishDraft: (input: unknown) => string;
|
|
135
|
+
export interface FilePublishRemote extends Record<string, unknown> {
|
|
136
|
+
directory?: string;
|
|
137
|
+
filename?: string;
|
|
138
|
+
renders?: Record<string, FilePublishRemoteRender>;
|
|
139
|
+
}
|
|
140
|
+
export declare const isFilePublishRemote: (input: unknown) => input is FilePublishRemote;
|
|
141
|
+
export declare const assertFilePublishRemote: (input: unknown) => FilePublishRemote;
|
|
142
|
+
export declare const randomFilePublishRemote: () => FilePublishRemote;
|
|
143
|
+
export declare const assertGuardFilePublishRemote: __AssertionGuard<FilePublishRemote>;
|
|
144
|
+
export declare const stringifyFilePublishRemote: (input: FilePublishRemote) => string;
|
|
145
|
+
export declare const assertStringifyFilePublishRemote: (input: unknown) => string;
|
|
146
|
+
export interface FilePublishRemoteRender {
|
|
147
|
+
path?: string;
|
|
148
|
+
messages?: Message[];
|
|
149
|
+
query?: unknown;
|
|
150
|
+
size?: string;
|
|
151
|
+
hash?: string;
|
|
152
|
+
source?: string;
|
|
153
|
+
}
|
|
154
|
+
export declare const isFilePublishRemoteRender: (input: unknown) => input is FilePublishRemoteRender;
|
|
155
|
+
export declare const assertFilePublishRemoteRender: (input: unknown) => FilePublishRemoteRender;
|
|
156
|
+
export declare const randomFilePublishRemoteRender: () => FilePublishRemoteRender;
|
|
157
|
+
export declare const assertGuardFilePublishRemoteRender: __AssertionGuard<FilePublishRemoteRender>;
|
|
158
|
+
export declare const stringifyFilePublishRemoteRender: (input: FilePublishRemoteRender) => string;
|
|
159
|
+
export declare const assertStringifyFilePublishRemoteRender: (input: unknown) => string;
|
|
160
|
+
export interface FilePublishStatsRecord extends PublishStatsRecordCommon {
|
|
161
|
+
retrieved?: FilePublishRetrieved;
|
|
162
|
+
defaults?: FilePublishDefaults;
|
|
163
|
+
}
|
|
164
|
+
export declare const isFilePublishStatsRecord: (input: unknown) => input is FilePublishStatsRecord;
|
|
165
|
+
export declare const assertFilePublishStatsRecord: (input: unknown) => FilePublishStatsRecord;
|
|
166
|
+
export declare const randomFilePublishStatsRecord: () => FilePublishStatsRecord;
|
|
167
|
+
export declare const assertGuardFilePublishStatsRecord: __AssertionGuard<FilePublishStatsRecord>;
|
|
168
|
+
export declare const stringifyFilePublishStatsRecord: (input: FilePublishStatsRecord) => string;
|
|
169
|
+
export declare const assertStringifyFilePublishStatsRecord: (input: unknown) => string;
|
|
170
|
+
export interface FilePublishRetrieved extends Record<string, unknown> {
|
|
171
|
+
filename?: string;
|
|
172
|
+
directory?: string;
|
|
173
|
+
renders?: Record<string, FilePublishRetrievedRender>;
|
|
174
|
+
}
|
|
175
|
+
export declare const isFilePublishRetrieved: (input: unknown) => input is FilePublishRetrieved;
|
|
176
|
+
export declare const assertFilePublishRetrieved: (input: unknown) => FilePublishRetrieved;
|
|
177
|
+
export declare const randomFilePublishRetrieved: () => FilePublishRetrieved;
|
|
178
|
+
export declare const assertGuardFilePublishRetrieved: __AssertionGuard<FilePublishRetrieved>;
|
|
179
|
+
export declare const stringifyFilePublishRetrieved: (input: FilePublishRetrieved) => string;
|
|
180
|
+
export declare const assertStringifyFilePublishRetrieved: (input: unknown) => string;
|
|
181
|
+
export interface FilePublishRetrievedRender {
|
|
182
|
+
path: string;
|
|
183
|
+
size?: string;
|
|
184
|
+
hash?: string;
|
|
185
|
+
}
|
|
186
|
+
export declare const isFilePublishRetrievedRender: (input: unknown) => input is FilePublishRetrievedRender;
|
|
187
|
+
export declare const assertFilePublishRetrievedRender: (input: unknown) => FilePublishRetrievedRender;
|
|
188
|
+
export declare const randomFilePublishRetrievedRender: () => FilePublishRetrievedRender;
|
|
189
|
+
export declare const assertGuardFilePublishRetrievedRender: __AssertionGuard<FilePublishRetrievedRender>;
|
|
190
|
+
export declare const stringifyFilePublishRetrievedRender: (input: FilePublishRetrievedRender) => string;
|
|
191
|
+
export declare const assertStringifyFilePublishRetrievedRender: (input: unknown) => string;
|
|
192
|
+
export interface FilePublishDefaults extends Record<string, unknown> {
|
|
193
|
+
directory: string;
|
|
194
|
+
filename: string;
|
|
195
|
+
renders: Record<string, FilePublishDefaultRender>;
|
|
196
|
+
}
|
|
197
|
+
export declare const isFilePublishDefaults: (input: unknown) => input is FilePublishDefaults;
|
|
198
|
+
export declare const assertFilePublishDefaults: (input: unknown) => FilePublishDefaults;
|
|
199
|
+
export declare const randomFilePublishDefaults: () => FilePublishDefaults;
|
|
200
|
+
export declare const assertGuardFilePublishDefaults: __AssertionGuard<FilePublishDefaults>;
|
|
201
|
+
export declare const stringifyFilePublishDefaults: (input: FilePublishDefaults) => string;
|
|
202
|
+
export declare const assertStringifyFilePublishDefaults: (input: unknown) => string;
|
|
203
|
+
export interface FilePublishDefaultRender {
|
|
204
|
+
path?: string;
|
|
205
|
+
collisionStrategy?: "skip" | "overwrite";
|
|
206
|
+
}
|
|
207
|
+
export declare const isFilePublishDefaultRender: (input: unknown) => input is FilePublishDefaultRender;
|
|
208
|
+
export declare const assertFilePublishDefaultRender: (input: unknown) => FilePublishDefaultRender;
|
|
209
|
+
export declare const randomFilePublishDefaultRender: () => FilePublishDefaultRender;
|
|
210
|
+
export declare const assertGuardFilePublishDefaultRender: __AssertionGuard<FilePublishDefaultRender>;
|
|
211
|
+
export declare const stringifyFilePublishDefaultRender: (input: FilePublishDefaultRender) => string;
|
|
212
|
+
export declare const assertStringifyFilePublishDefaultRender: (input: unknown) => string;
|
|
213
|
+
export {};
|