@nxtedition/types 23.0.25 → 23.0.26

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/app.d.ts CHANGED
@@ -2,7 +2,6 @@ import { type AssertionGuard as __AssertionGuard } from "typia";
2
2
  export interface ElectronHubApi {
3
3
  startDrag: (file: string, base: string) => void;
4
4
  getWebdavPath: () => string;
5
- showOpenDialog: (options: OpenDialogOptions) => string[] | undefined;
6
5
  showOpenDialogAsync: (options: OpenDialogOptions) => Promise<{
7
6
  canceled: boolean;
8
7
  filePaths: string[];
package/dist/app.js CHANGED
@@ -1,12 +1,12 @@
1
1
  import __typia from "typia";
2
2
  export const isElectronHubApi = input => {
3
- const $io0 = input => true && true && true && true && true && true && true && true && true && true && true && ("object" === typeof input.clipboard && null !== input.clipboard && $io1(input.clipboard)) && true && true && true;
3
+ const $io0 = input => true && true && true && true && true && true && true && true && true && true && ("object" === typeof input.clipboard && null !== input.clipboard && $io1(input.clipboard)) && true && true && true;
4
4
  const $io1 = input => true && true;
5
5
  return "object" === typeof input && null !== input && $io0(input);
6
6
  };
7
7
  export const assertElectronHubApi = (input, errorFactory) => {
8
8
  const __is = input => {
9
- const $io0 = input => true && true && true && true && true && true && true && true && true && true && true && ("object" === typeof input.clipboard && null !== input.clipboard && $io1(input.clipboard)) && true && true && true;
9
+ const $io0 = input => true && true && true && true && true && true && true && true && true && true && ("object" === typeof input.clipboard && null !== input.clipboard && $io1(input.clipboard)) && true && true && true;
10
10
  const $io1 = input => true && true;
11
11
  return "object" === typeof input && null !== input && $io0(input);
12
12
  };
@@ -21,10 +21,6 @@ export const assertElectronHubApi = (input, errorFactory) => {
21
21
  path: _path + ".getWebdavPath",
22
22
  expected: "unknown",
23
23
  value: input.getWebdavPath
24
- }, errorFactory)) && (true || $guard(_exceptionable, {
25
- path: _path + ".showOpenDialog",
26
- expected: "unknown",
27
- value: input.showOpenDialog
28
24
  }, errorFactory)) && (true || $guard(_exceptionable, {
29
25
  path: _path + ".showOpenDialogAsync",
30
26
  expected: "unknown",
@@ -103,7 +99,6 @@ export const randomElectronHubApi = generator => {
103
99
  const $ro0 = (_recursive = false, _depth = 0) => ({
104
100
  startDrag: undefined,
105
101
  getWebdavPath: undefined,
106
- showOpenDialog: undefined,
107
102
  showOpenDialogAsync: undefined,
108
103
  showSaveDialogAsync: undefined,
109
104
  getCurrentVersion: undefined,
@@ -125,7 +120,7 @@ export const randomElectronHubApi = generator => {
125
120
  };
126
121
  export const assertGuardElectronHubApi = (input, errorFactory) => {
127
122
  const __is = input => {
128
- const $io0 = input => true && true && true && true && true && true && true && true && true && true && true && ("object" === typeof input.clipboard && null !== input.clipboard && $io1(input.clipboard)) && true && true && true;
123
+ const $io0 = input => true && true && true && true && true && true && true && true && true && true && ("object" === typeof input.clipboard && null !== input.clipboard && $io1(input.clipboard)) && true && true && true;
129
124
  const $io1 = input => true && true;
130
125
  return "object" === typeof input && null !== input && $io0(input);
131
126
  };
@@ -140,10 +135,6 @@ export const assertGuardElectronHubApi = (input, errorFactory) => {
140
135
  path: _path + ".getWebdavPath",
141
136
  expected: "unknown",
142
137
  value: input.getWebdavPath
143
- }, errorFactory)) && (true || $guard(_exceptionable, {
144
- path: _path + ".showOpenDialog",
145
- expected: "unknown",
146
- value: input.showOpenDialog
147
138
  }, errorFactory)) && (true || $guard(_exceptionable, {
148
139
  path: _path + ".showOpenDialogAsync",
149
140
  expected: "unknown",
@@ -225,7 +216,7 @@ export const stringifyElectronHubApi = input => {
225
216
  };
226
217
  export const assertStringifyElectronHubApi = (input, errorFactory) => { const assert = (input, errorFactory) => {
227
218
  const __is = input => {
228
- const $io0 = input => true && true && true && true && true && true && true && true && true && true && true && ("object" === typeof input.clipboard && null !== input.clipboard && $io1(input.clipboard)) && true && true && true;
219
+ const $io0 = input => true && true && true && true && true && true && true && true && true && true && ("object" === typeof input.clipboard && null !== input.clipboard && $io1(input.clipboard)) && true && true && true;
229
220
  const $io1 = input => true && true;
230
221
  return "object" === typeof input && null !== input && $io0(input);
231
222
  };
@@ -240,10 +231,6 @@ export const assertStringifyElectronHubApi = (input, errorFactory) => { const as
240
231
  path: _path + ".getWebdavPath",
241
232
  expected: "unknown",
242
233
  value: input.getWebdavPath
243
- }, errorFactory)) && (true || $guard(_exceptionable, {
244
- path: _path + ".showOpenDialog",
245
- expected: "unknown",
246
- value: input.showOpenDialog
247
234
  }, errorFactory)) && (true || $guard(_exceptionable, {
248
235
  path: _path + ".showOpenDialogAsync",
249
236
  expected: "unknown",
@@ -1,17 +1,31 @@
1
1
  import { type AssertionGuard as __AssertionGuard } from "typia";
2
2
  import { tags } from 'typia';
3
3
  import { NxtError } from './error.js';
4
+ export type FileRef = {
5
+ file?: string;
6
+ offset?: number;
7
+ start?: number;
8
+ end?: number;
9
+ };
10
+ export declare const isFileRef: (input: unknown) => input is FileRef;
11
+ export declare const assertFileRef: (input: unknown) => FileRef;
12
+ export declare const randomFileRef: () => FileRef;
13
+ export declare const assertGuardFileRef: __AssertionGuard<FileRef>;
14
+ export declare const stringifyFileRef: (input: FileRef) => string;
15
+ export declare const assertStringifyFileRef: (input: unknown) => string;
16
+ export type FileRefs = Array<FileRef>;
17
+ export declare const isFileRefs: (input: unknown) => input is FileRefs;
18
+ export declare const assertFileRefs: (input: unknown) => FileRefs;
19
+ export declare const randomFileRefs: () => any[];
20
+ export declare const assertGuardFileRefs: __AssertionGuard<FileRefs>;
21
+ export declare const stringifyFileRefs: (input: FileRefs) => string;
22
+ export declare const assertStringifyFileRefs: (input: unknown) => string;
4
23
  export interface File {
5
24
  id: string & tags.Pattern<"^[0-9A-Za-z~][0-9A-Za-z~._: -]*$">;
6
25
  size: (number & tags.Minimum<0> & tags.Type<"uint64">) | null;
7
26
  seekable: boolean;
8
27
  deleted: boolean;
9
- refs: Array<{
10
- file?: string;
11
- offset?: number;
12
- start?: number;
13
- end?: number;
14
- }>;
28
+ refs: FileRefs;
15
29
  tags: string[];
16
30
  resumable: string;
17
31
  mimeType: string;
@@ -1,4 +1,324 @@
1
1
  import __typia from "typia";
2
+ export const isFileRef = input => {
3
+ const $io0 = input => (undefined === input.file || "string" === typeof input.file) && (undefined === input.offset || "number" === typeof input.offset) && (undefined === input.start || "number" === typeof input.start) && (undefined === input.end || "number" === typeof input.end);
4
+ return "object" === typeof input && null !== input && false === Array.isArray(input) && $io0(input);
5
+ };
6
+ export const assertFileRef = (input, errorFactory) => {
7
+ const __is = input => {
8
+ const $io0 = input => (undefined === input.file || "string" === typeof input.file) && (undefined === input.offset || "number" === typeof input.offset) && (undefined === input.start || "number" === typeof input.start) && (undefined === input.end || "number" === typeof input.end);
9
+ return "object" === typeof input && null !== input && false === Array.isArray(input) && $io0(input);
10
+ };
11
+ if (false === __is(input))
12
+ ((input, _path, _exceptionable = true) => {
13
+ const $guard = __typia.createAssert.guard;
14
+ const $ao0 = (input, _path, _exceptionable = true) => (undefined === input.file || "string" === typeof input.file || $guard(_exceptionable, {
15
+ path: _path + ".file",
16
+ expected: "(string | undefined)",
17
+ value: input.file
18
+ }, errorFactory)) && (undefined === input.offset || "number" === typeof input.offset || $guard(_exceptionable, {
19
+ path: _path + ".offset",
20
+ expected: "(number | undefined)",
21
+ value: input.offset
22
+ }, errorFactory)) && (undefined === input.start || "number" === typeof input.start || $guard(_exceptionable, {
23
+ path: _path + ".start",
24
+ expected: "(number | undefined)",
25
+ value: input.start
26
+ }, errorFactory)) && (undefined === input.end || "number" === typeof input.end || $guard(_exceptionable, {
27
+ path: _path + ".end",
28
+ expected: "(number | undefined)",
29
+ value: input.end
30
+ }, errorFactory));
31
+ return ("object" === typeof input && null !== input && false === Array.isArray(input) || $guard(true, {
32
+ path: _path + "",
33
+ expected: "FileRef",
34
+ value: input
35
+ }, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
36
+ path: _path + "",
37
+ expected: "FileRef",
38
+ value: input
39
+ }, errorFactory);
40
+ })(input, "$input", true);
41
+ return input;
42
+ };
43
+ export const randomFileRef = generator => {
44
+ const $generator = __typia.createRandom.generator;
45
+ const $pick = __typia.createRandom.pick;
46
+ const $ro0 = (_recursive = false, _depth = 0) => ({
47
+ file: $pick([
48
+ () => undefined,
49
+ () => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
50
+ ])(),
51
+ offset: $pick([
52
+ () => undefined,
53
+ () => (generator?.customs ?? $generator.customs)?.number?.([]) ?? (generator?.number ?? $generator.number)(0, 100)
54
+ ])(),
55
+ start: $pick([
56
+ () => undefined,
57
+ () => (generator?.customs ?? $generator.customs)?.number?.([]) ?? (generator?.number ?? $generator.number)(0, 100)
58
+ ])(),
59
+ end: $pick([
60
+ () => undefined,
61
+ () => (generator?.customs ?? $generator.customs)?.number?.([]) ?? (generator?.number ?? $generator.number)(0, 100)
62
+ ])()
63
+ });
64
+ return $ro0();
65
+ };
66
+ export const assertGuardFileRef = (input, errorFactory) => {
67
+ const __is = input => {
68
+ const $io0 = input => (undefined === input.file || "string" === typeof input.file) && (undefined === input.offset || "number" === typeof input.offset) && (undefined === input.start || "number" === typeof input.start) && (undefined === input.end || "number" === typeof input.end);
69
+ return "object" === typeof input && null !== input && false === Array.isArray(input) && $io0(input);
70
+ };
71
+ if (false === __is(input))
72
+ ((input, _path, _exceptionable = true) => {
73
+ const $guard = __typia.createAssertGuard.guard;
74
+ const $ao0 = (input, _path, _exceptionable = true) => (undefined === input.file || "string" === typeof input.file || $guard(_exceptionable, {
75
+ path: _path + ".file",
76
+ expected: "(string | undefined)",
77
+ value: input.file
78
+ }, errorFactory)) && (undefined === input.offset || "number" === typeof input.offset || $guard(_exceptionable, {
79
+ path: _path + ".offset",
80
+ expected: "(number | undefined)",
81
+ value: input.offset
82
+ }, errorFactory)) && (undefined === input.start || "number" === typeof input.start || $guard(_exceptionable, {
83
+ path: _path + ".start",
84
+ expected: "(number | undefined)",
85
+ value: input.start
86
+ }, errorFactory)) && (undefined === input.end || "number" === typeof input.end || $guard(_exceptionable, {
87
+ path: _path + ".end",
88
+ expected: "(number | undefined)",
89
+ value: input.end
90
+ }, errorFactory));
91
+ return ("object" === typeof input && null !== input && false === Array.isArray(input) || $guard(true, {
92
+ path: _path + "",
93
+ expected: "FileRef",
94
+ value: input
95
+ }, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
96
+ path: _path + "",
97
+ expected: "FileRef",
98
+ value: input
99
+ }, errorFactory);
100
+ })(input, "$input", true);
101
+ };
102
+ export const stringifyFileRef = input => {
103
+ const $string = __typia.json.createStringify.string;
104
+ const $tail = __typia.json.createStringify.tail;
105
+ const $so0 = input => `{${$tail(`${undefined === input.file ? "" : `"file":${undefined !== input.file ? $string(input.file) : undefined},`}${undefined === input.offset ? "" : `"offset":${undefined !== input.offset ? input.offset : undefined},`}${undefined === input.start ? "" : `"start":${undefined !== input.start ? input.start : undefined},`}${undefined === input.end ? "" : `"end":${undefined !== input.end ? input.end : undefined}`}`)}}`;
106
+ return $so0(input);
107
+ };
108
+ export const assertStringifyFileRef = (input, errorFactory) => { const assert = (input, errorFactory) => {
109
+ const __is = input => {
110
+ const $io0 = input => (undefined === input.file || "string" === typeof input.file) && (undefined === input.offset || "number" === typeof input.offset && !Number.isNaN(input.offset)) && (undefined === input.start || "number" === typeof input.start && !Number.isNaN(input.start)) && (undefined === input.end || "number" === typeof input.end && !Number.isNaN(input.end));
111
+ return "object" === typeof input && null !== input && false === Array.isArray(input) && $io0(input);
112
+ };
113
+ if (false === __is(input))
114
+ ((input, _path, _exceptionable = true) => {
115
+ const $guard = __typia.json.createAssertStringify.guard;
116
+ const $ao0 = (input, _path, _exceptionable = true) => (undefined === input.file || "string" === typeof input.file || $guard(_exceptionable, {
117
+ path: _path + ".file",
118
+ expected: "(string | undefined)",
119
+ value: input.file
120
+ }, errorFactory)) && (undefined === input.offset || "number" === typeof input.offset && !Number.isNaN(input.offset) || $guard(_exceptionable, {
121
+ path: _path + ".offset",
122
+ expected: "(number | undefined)",
123
+ value: input.offset
124
+ }, errorFactory)) && (undefined === input.start || "number" === typeof input.start && !Number.isNaN(input.start) || $guard(_exceptionable, {
125
+ path: _path + ".start",
126
+ expected: "(number | undefined)",
127
+ value: input.start
128
+ }, errorFactory)) && (undefined === input.end || "number" === typeof input.end && !Number.isNaN(input.end) || $guard(_exceptionable, {
129
+ path: _path + ".end",
130
+ expected: "(number | undefined)",
131
+ value: input.end
132
+ }, errorFactory));
133
+ return ("object" === typeof input && null !== input && false === Array.isArray(input) || $guard(true, {
134
+ path: _path + "",
135
+ expected: "FileRef",
136
+ value: input
137
+ }, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
138
+ path: _path + "",
139
+ expected: "FileRef",
140
+ value: input
141
+ }, errorFactory);
142
+ })(input, "$input", true);
143
+ return input;
144
+ }; const stringify = input => {
145
+ const $string = __typia.json.createAssertStringify.string;
146
+ const $tail = __typia.json.createAssertStringify.tail;
147
+ const $so0 = input => `{${$tail(`${undefined === input.file ? "" : `"file":${undefined !== input.file ? $string(input.file) : undefined},`}${undefined === input.offset ? "" : `"offset":${undefined !== input.offset ? input.offset : undefined},`}${undefined === input.start ? "" : `"start":${undefined !== input.start ? input.start : undefined},`}${undefined === input.end ? "" : `"end":${undefined !== input.end ? input.end : undefined}`}`)}}`;
148
+ return $so0(input);
149
+ }; return stringify(assert(input, errorFactory)); };
150
+ export const isFileRefs = input => {
151
+ const $io0 = input => (undefined === input.file || "string" === typeof input.file) && (undefined === input.offset || "number" === typeof input.offset) && (undefined === input.start || "number" === typeof input.start) && (undefined === input.end || "number" === typeof input.end);
152
+ return Array.isArray(input) && input.every(elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && $io0(elem));
153
+ };
154
+ export const assertFileRefs = (input, errorFactory) => {
155
+ const __is = input => {
156
+ const $io0 = input => (undefined === input.file || "string" === typeof input.file) && (undefined === input.offset || "number" === typeof input.offset) && (undefined === input.start || "number" === typeof input.start) && (undefined === input.end || "number" === typeof input.end);
157
+ return Array.isArray(input) && input.every(elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && $io0(elem));
158
+ };
159
+ if (false === __is(input))
160
+ ((input, _path, _exceptionable = true) => {
161
+ const $guard = __typia.createAssert.guard;
162
+ const $ao0 = (input, _path, _exceptionable = true) => (undefined === input.file || "string" === typeof input.file || $guard(_exceptionable, {
163
+ path: _path + ".file",
164
+ expected: "(string | undefined)",
165
+ value: input.file
166
+ }, errorFactory)) && (undefined === input.offset || "number" === typeof input.offset || $guard(_exceptionable, {
167
+ path: _path + ".offset",
168
+ expected: "(number | undefined)",
169
+ value: input.offset
170
+ }, errorFactory)) && (undefined === input.start || "number" === typeof input.start || $guard(_exceptionable, {
171
+ path: _path + ".start",
172
+ expected: "(number | undefined)",
173
+ value: input.start
174
+ }, errorFactory)) && (undefined === input.end || "number" === typeof input.end || $guard(_exceptionable, {
175
+ path: _path + ".end",
176
+ expected: "(number | undefined)",
177
+ value: input.end
178
+ }, errorFactory));
179
+ return (Array.isArray(input) || $guard(true, {
180
+ path: _path + "",
181
+ expected: "FileRefs",
182
+ value: input
183
+ }, errorFactory)) && input.every((elem, _index1) => ("object" === typeof elem && null !== elem && false === Array.isArray(elem) || $guard(true, {
184
+ path: _path + "[" + _index1 + "]",
185
+ expected: "FileRef",
186
+ value: elem
187
+ }, errorFactory)) && $ao0(elem, _path + "[" + _index1 + "]", true) || $guard(true, {
188
+ path: _path + "[" + _index1 + "]",
189
+ expected: "FileRef",
190
+ value: elem
191
+ }, errorFactory)) || $guard(true, {
192
+ path: _path + "",
193
+ expected: "FileRefs",
194
+ value: input
195
+ }, errorFactory);
196
+ })(input, "$input", true);
197
+ return input;
198
+ };
199
+ export const randomFileRefs = generator => {
200
+ const $generator = __typia.createRandom.generator;
201
+ const $pick = __typia.createRandom.pick;
202
+ const $ro0 = (_recursive = false, _depth = 0) => ({
203
+ file: $pick([
204
+ () => undefined,
205
+ () => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
206
+ ])(),
207
+ offset: $pick([
208
+ () => undefined,
209
+ () => (generator?.customs ?? $generator.customs)?.number?.([]) ?? (generator?.number ?? $generator.number)(0, 100)
210
+ ])(),
211
+ start: $pick([
212
+ () => undefined,
213
+ () => (generator?.customs ?? $generator.customs)?.number?.([]) ?? (generator?.number ?? $generator.number)(0, 100)
214
+ ])(),
215
+ end: $pick([
216
+ () => undefined,
217
+ () => (generator?.customs ?? $generator.customs)?.number?.([]) ?? (generator?.number ?? $generator.number)(0, 100)
218
+ ])()
219
+ });
220
+ return (generator?.array ?? $generator.array)(() => $ro0());
221
+ };
222
+ export const assertGuardFileRefs = (input, errorFactory) => {
223
+ const __is = input => {
224
+ const $io0 = input => (undefined === input.file || "string" === typeof input.file) && (undefined === input.offset || "number" === typeof input.offset) && (undefined === input.start || "number" === typeof input.start) && (undefined === input.end || "number" === typeof input.end);
225
+ return Array.isArray(input) && input.every(elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && $io0(elem));
226
+ };
227
+ if (false === __is(input))
228
+ ((input, _path, _exceptionable = true) => {
229
+ const $guard = __typia.createAssertGuard.guard;
230
+ const $ao0 = (input, _path, _exceptionable = true) => (undefined === input.file || "string" === typeof input.file || $guard(_exceptionable, {
231
+ path: _path + ".file",
232
+ expected: "(string | undefined)",
233
+ value: input.file
234
+ }, errorFactory)) && (undefined === input.offset || "number" === typeof input.offset || $guard(_exceptionable, {
235
+ path: _path + ".offset",
236
+ expected: "(number | undefined)",
237
+ value: input.offset
238
+ }, errorFactory)) && (undefined === input.start || "number" === typeof input.start || $guard(_exceptionable, {
239
+ path: _path + ".start",
240
+ expected: "(number | undefined)",
241
+ value: input.start
242
+ }, errorFactory)) && (undefined === input.end || "number" === typeof input.end || $guard(_exceptionable, {
243
+ path: _path + ".end",
244
+ expected: "(number | undefined)",
245
+ value: input.end
246
+ }, errorFactory));
247
+ return (Array.isArray(input) || $guard(true, {
248
+ path: _path + "",
249
+ expected: "FileRefs",
250
+ value: input
251
+ }, errorFactory)) && input.every((elem, _index1) => ("object" === typeof elem && null !== elem && false === Array.isArray(elem) || $guard(true, {
252
+ path: _path + "[" + _index1 + "]",
253
+ expected: "FileRef",
254
+ value: elem
255
+ }, errorFactory)) && $ao0(elem, _path + "[" + _index1 + "]", true) || $guard(true, {
256
+ path: _path + "[" + _index1 + "]",
257
+ expected: "FileRef",
258
+ value: elem
259
+ }, errorFactory)) || $guard(true, {
260
+ path: _path + "",
261
+ expected: "FileRefs",
262
+ value: input
263
+ }, errorFactory);
264
+ })(input, "$input", true);
265
+ };
266
+ export const stringifyFileRefs = input => {
267
+ const $string = __typia.json.createStringify.string;
268
+ const $tail = __typia.json.createStringify.tail;
269
+ const $so0 = input => `{${$tail(`${undefined === input.file ? "" : `"file":${undefined !== input.file ? $string(input.file) : undefined},`}${undefined === input.offset ? "" : `"offset":${undefined !== input.offset ? input.offset : undefined},`}${undefined === input.start ? "" : `"start":${undefined !== input.start ? input.start : undefined},`}${undefined === input.end ? "" : `"end":${undefined !== input.end ? input.end : undefined}`}`)}}`;
270
+ return `[${input.map(elem => $so0(elem)).join(",")}]`;
271
+ };
272
+ export const assertStringifyFileRefs = (input, errorFactory) => { const assert = (input, errorFactory) => {
273
+ const __is = input => {
274
+ const $io0 = input => (undefined === input.file || "string" === typeof input.file) && (undefined === input.offset || "number" === typeof input.offset && !Number.isNaN(input.offset)) && (undefined === input.start || "number" === typeof input.start && !Number.isNaN(input.start)) && (undefined === input.end || "number" === typeof input.end && !Number.isNaN(input.end));
275
+ return Array.isArray(input) && input.every(elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && $io0(elem));
276
+ };
277
+ if (false === __is(input))
278
+ ((input, _path, _exceptionable = true) => {
279
+ const $guard = __typia.json.createAssertStringify.guard;
280
+ const $ao0 = (input, _path, _exceptionable = true) => (undefined === input.file || "string" === typeof input.file || $guard(_exceptionable, {
281
+ path: _path + ".file",
282
+ expected: "(string | undefined)",
283
+ value: input.file
284
+ }, errorFactory)) && (undefined === input.offset || "number" === typeof input.offset && !Number.isNaN(input.offset) || $guard(_exceptionable, {
285
+ path: _path + ".offset",
286
+ expected: "(number | undefined)",
287
+ value: input.offset
288
+ }, errorFactory)) && (undefined === input.start || "number" === typeof input.start && !Number.isNaN(input.start) || $guard(_exceptionable, {
289
+ path: _path + ".start",
290
+ expected: "(number | undefined)",
291
+ value: input.start
292
+ }, errorFactory)) && (undefined === input.end || "number" === typeof input.end && !Number.isNaN(input.end) || $guard(_exceptionable, {
293
+ path: _path + ".end",
294
+ expected: "(number | undefined)",
295
+ value: input.end
296
+ }, errorFactory));
297
+ return (Array.isArray(input) || $guard(true, {
298
+ path: _path + "",
299
+ expected: "FileRefs",
300
+ value: input
301
+ }, errorFactory)) && input.every((elem, _index1) => ("object" === typeof elem && null !== elem && false === Array.isArray(elem) || $guard(true, {
302
+ path: _path + "[" + _index1 + "]",
303
+ expected: "FileRef",
304
+ value: elem
305
+ }, errorFactory)) && $ao0(elem, _path + "[" + _index1 + "]", true) || $guard(true, {
306
+ path: _path + "[" + _index1 + "]",
307
+ expected: "FileRef",
308
+ value: elem
309
+ }, errorFactory)) || $guard(true, {
310
+ path: _path + "",
311
+ expected: "FileRefs",
312
+ value: input
313
+ }, errorFactory);
314
+ })(input, "$input", true);
315
+ return input;
316
+ }; const stringify = input => {
317
+ const $string = __typia.json.createAssertStringify.string;
318
+ const $tail = __typia.json.createAssertStringify.tail;
319
+ const $so0 = input => `{${$tail(`${undefined === input.file ? "" : `"file":${undefined !== input.file ? $string(input.file) : undefined},`}${undefined === input.offset ? "" : `"offset":${undefined !== input.offset ? input.offset : undefined},`}${undefined === input.start ? "" : `"start":${undefined !== input.start ? input.start : undefined},`}${undefined === input.end ? "" : `"end":${undefined !== input.end ? input.end : undefined}`}`)}}`;
320
+ return `[${input.map(elem => $so0(elem)).join(",")}]`;
321
+ }; return stringify(assert(input, errorFactory)); };
2
322
  export const isFile = input => {
3
323
  const $io0 = input => "string" === typeof input.id && /^[0-9A-Za-z~][0-9A-Za-z~._: -]*$/.test(input.id) && (null === input.size || "number" === typeof input.size && (0 <= input.size && (Math.floor(input.size) === input.size && 0 <= input.size && input.size <= 18446744073709552000))) && "boolean" === typeof input.seekable && "boolean" === typeof input.deleted && (Array.isArray(input.refs) && input.refs.every(elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && $io1(elem))) && (Array.isArray(input.tags) && input.tags.every(elem => "string" === typeof elem)) && "string" === typeof input.resumable && "string" === typeof input.mimeType && "string" === typeof input.encoding && ("string" === typeof input.hash && /^([A-Fa-f0-9]{32})?$/.test(input.hash)) && ("number" === typeof input.btime && (0 <= input.btime && (Math.floor(input.btime) === input.btime && 0 <= input.btime && input.btime <= 18446744073709552000))) && "boolean" === typeof input.completed && (undefined !== input.error && (null === input.error || (Array.isArray(input.error) && input.error.every(elem => "object" === typeof elem && null !== elem && $io2(elem)) || "object" === typeof input.error && null !== input.error && $io2(input.error))));
4
324
  const $io1 = input => (undefined === input.file || "string" === typeof input.file) && (undefined === input.offset || "number" === typeof input.offset) && (undefined === input.start || "number" === typeof input.start) && (undefined === input.end || "number" === typeof input.end);
@@ -60,19 +380,19 @@ export const assertFile = (input, errorFactory) => {
60
380
  value: input.deleted
61
381
  }, errorFactory)) && ((Array.isArray(input.refs) || $guard(_exceptionable, {
62
382
  path: _path + ".refs",
63
- expected: "Array<__type>",
383
+ expected: "FileRefs",
64
384
  value: input.refs
65
385
  }, errorFactory)) && input.refs.every((elem, _index1) => ("object" === typeof elem && null !== elem && false === Array.isArray(elem) || $guard(_exceptionable, {
66
386
  path: _path + ".refs[" + _index1 + "]",
67
- expected: "__type",
387
+ expected: "FileRef",
68
388
  value: elem
69
389
  }, errorFactory)) && $ao1(elem, _path + ".refs[" + _index1 + "]", true && _exceptionable) || $guard(_exceptionable, {
70
390
  path: _path + ".refs[" + _index1 + "]",
71
- expected: "__type",
391
+ expected: "FileRef",
72
392
  value: elem
73
393
  }, errorFactory)) || $guard(_exceptionable, {
74
394
  path: _path + ".refs",
75
- expected: "Array<__type>",
395
+ expected: "FileRefs",
76
396
  value: input.refs
77
397
  }, errorFactory)) && ((Array.isArray(input.tags) || $guard(_exceptionable, {
78
398
  path: _path + ".tags",
@@ -422,19 +742,19 @@ export const assertGuardFile = (input, errorFactory) => {
422
742
  value: input.deleted
423
743
  }, errorFactory)) && ((Array.isArray(input.refs) || $guard(_exceptionable, {
424
744
  path: _path + ".refs",
425
- expected: "Array<__type>",
745
+ expected: "FileRefs",
426
746
  value: input.refs
427
747
  }, errorFactory)) && input.refs.every((elem, _index1) => ("object" === typeof elem && null !== elem && false === Array.isArray(elem) || $guard(_exceptionable, {
428
748
  path: _path + ".refs[" + _index1 + "]",
429
- expected: "__type",
749
+ expected: "FileRef",
430
750
  value: elem
431
751
  }, errorFactory)) && $ao1(elem, _path + ".refs[" + _index1 + "]", true && _exceptionable) || $guard(_exceptionable, {
432
752
  path: _path + ".refs[" + _index1 + "]",
433
- expected: "__type",
753
+ expected: "FileRef",
434
754
  value: elem
435
755
  }, errorFactory)) || $guard(_exceptionable, {
436
756
  path: _path + ".refs",
437
- expected: "Array<__type>",
757
+ expected: "FileRefs",
438
758
  value: input.refs
439
759
  }, errorFactory)) && ((Array.isArray(input.tags) || $guard(_exceptionable, {
440
760
  path: _path + ".tags",
@@ -686,19 +1006,19 @@ export const assertStringifyFile = (input, errorFactory) => { const assert = (in
686
1006
  value: input.deleted
687
1007
  }, errorFactory)) && ((Array.isArray(input.refs) || $guard(_exceptionable, {
688
1008
  path: _path + ".refs",
689
- expected: "Array<__type>",
1009
+ expected: "FileRefs",
690
1010
  value: input.refs
691
1011
  }, errorFactory)) && input.refs.every((elem, _index1) => ("object" === typeof elem && null !== elem && false === Array.isArray(elem) || $guard(_exceptionable, {
692
1012
  path: _path + ".refs[" + _index1 + "]",
693
- expected: "__type",
1013
+ expected: "FileRef",
694
1014
  value: elem
695
1015
  }, errorFactory)) && $ao1(elem, _path + ".refs[" + _index1 + "]", true && _exceptionable) || $guard(_exceptionable, {
696
1016
  path: _path + ".refs[" + _index1 + "]",
697
- expected: "__type",
1017
+ expected: "FileRef",
698
1018
  value: elem
699
1019
  }, errorFactory)) || $guard(_exceptionable, {
700
1020
  path: _path + ".refs",
701
- expected: "Array<__type>",
1021
+ expected: "FileRefs",
702
1022
  value: input.refs
703
1023
  }, errorFactory)) && ((Array.isArray(input.tags) || $guard(_exceptionable, {
704
1024
  path: _path + ".tags",
@@ -1063,19 +1383,19 @@ export const assertFileStats = (input, errorFactory) => {
1063
1383
  value: input.deleted
1064
1384
  }, errorFactory)) && ((Array.isArray(input.refs) || $guard(_exceptionable, {
1065
1385
  path: _path + ".refs",
1066
- expected: "Array<__type>",
1386
+ expected: "FileRefs",
1067
1387
  value: input.refs
1068
1388
  }, errorFactory)) && input.refs.every((elem, _index5) => ("object" === typeof elem && null !== elem && false === Array.isArray(elem) || $guard(_exceptionable, {
1069
1389
  path: _path + ".refs[" + _index5 + "]",
1070
- expected: "__type",
1390
+ expected: "FileRef",
1071
1391
  value: elem
1072
1392
  }, errorFactory)) && $ao1(elem, _path + ".refs[" + _index5 + "]", true && _exceptionable) || $guard(_exceptionable, {
1073
1393
  path: _path + ".refs[" + _index5 + "]",
1074
- expected: "__type",
1394
+ expected: "FileRef",
1075
1395
  value: elem
1076
1396
  }, errorFactory)) || $guard(_exceptionable, {
1077
1397
  path: _path + ".refs",
1078
- expected: "Array<__type>",
1398
+ expected: "FileRefs",
1079
1399
  value: input.refs
1080
1400
  }, errorFactory)) && ((Array.isArray(input.tags) || $guard(_exceptionable, {
1081
1401
  path: _path + ".tags",
@@ -1575,19 +1895,19 @@ export const assertGuardFileStats = (input, errorFactory) => {
1575
1895
  value: input.deleted
1576
1896
  }, errorFactory)) && ((Array.isArray(input.refs) || $guard(_exceptionable, {
1577
1897
  path: _path + ".refs",
1578
- expected: "Array<__type>",
1898
+ expected: "FileRefs",
1579
1899
  value: input.refs
1580
1900
  }, errorFactory)) && input.refs.every((elem, _index5) => ("object" === typeof elem && null !== elem && false === Array.isArray(elem) || $guard(_exceptionable, {
1581
1901
  path: _path + ".refs[" + _index5 + "]",
1582
- expected: "__type",
1902
+ expected: "FileRef",
1583
1903
  value: elem
1584
1904
  }, errorFactory)) && $ao1(elem, _path + ".refs[" + _index5 + "]", true && _exceptionable) || $guard(_exceptionable, {
1585
1905
  path: _path + ".refs[" + _index5 + "]",
1586
- expected: "__type",
1906
+ expected: "FileRef",
1587
1907
  value: elem
1588
1908
  }, errorFactory)) || $guard(_exceptionable, {
1589
1909
  path: _path + ".refs",
1590
- expected: "Array<__type>",
1910
+ expected: "FileRefs",
1591
1911
  value: input.refs
1592
1912
  }, errorFactory)) && ((Array.isArray(input.tags) || $guard(_exceptionable, {
1593
1913
  path: _path + ".tags",
@@ -1947,19 +2267,19 @@ export const assertStringifyFileStats = (input, errorFactory) => { const assert
1947
2267
  value: input.deleted
1948
2268
  }, errorFactory)) && ((Array.isArray(input.refs) || $guard(_exceptionable, {
1949
2269
  path: _path + ".refs",
1950
- expected: "Array<__type>",
2270
+ expected: "FileRefs",
1951
2271
  value: input.refs
1952
2272
  }, errorFactory)) && input.refs.every((elem, _index5) => ("object" === typeof elem && null !== elem && false === Array.isArray(elem) || $guard(_exceptionable, {
1953
2273
  path: _path + ".refs[" + _index5 + "]",
1954
- expected: "__type",
2274
+ expected: "FileRef",
1955
2275
  value: elem
1956
2276
  }, errorFactory)) && $ao1(elem, _path + ".refs[" + _index5 + "]", true && _exceptionable) || $guard(_exceptionable, {
1957
2277
  path: _path + ".refs[" + _index5 + "]",
1958
- expected: "__type",
2278
+ expected: "FileRef",
1959
2279
  value: elem
1960
2280
  }, errorFactory)) || $guard(_exceptionable, {
1961
2281
  path: _path + ".refs",
1962
- expected: "Array<__type>",
2282
+ expected: "FileRefs",
1963
2283
  value: input.refs
1964
2284
  }, errorFactory)) && ((Array.isArray(input.tags) || $guard(_exceptionable, {
1965
2285
  path: _path + ".tags",