@nxtedition/types 23.0.11 → 23.0.13
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 +61 -1
- package/dist/app.js +218 -10
- package/dist/common/file.d.ts +1 -1
- package/dist/common/file.js +32 -32
- package/dist/common/index.d.ts +1 -0
- package/dist/common/index.js +1 -0
- package/dist/common/settings.d.ts +34 -6
- package/dist/common/settings.js +1399 -535
- package/dist/common/user-notification.d.ts +8 -0
- package/dist/common/user-notification.js +85 -0
- package/dist/domains/asset.d.ts +23 -0
- package/dist/domains/asset.js +248 -0
- package/dist/domains/comment-reaction.d.ts +15 -0
- package/dist/domains/comment-reaction.js +115 -0
- package/dist/domains/comment-read-mark.d.ts +15 -0
- package/dist/domains/comment-read-mark.js +115 -0
- package/dist/domains/comment.d.ts +153 -0
- package/dist/domains/comment.js +5729 -0
- package/dist/domains/connection.d.ts +1 -1
- package/dist/domains/connection.js +118 -118
- package/dist/domains/deepstream.d.ts +14 -0
- package/dist/domains/deepstream.js +139 -0
- package/dist/domains/edit.d.ts +17 -0
- package/dist/domains/edit.js +224 -0
- package/dist/domains/index.d.ts +17 -1
- package/dist/domains/index.js +8 -0
- package/dist/domains/planning.d.ts +1 -1
- package/dist/domains/planning.js +29 -23
- package/dist/domains/publish.d.ts +1 -0
- package/dist/domains/publish.js +142 -46
- package/dist/domains/published.d.ts +2 -1
- package/dist/domains/published.js +50 -10
- package/dist/domains/settings.js +1401 -534
- package/dist/domains/subtitle-style.d.ts +13 -0
- package/dist/domains/subtitle-style.js +123 -0
- package/dist/domains/user-notification-status.d.ts +55 -0
- package/dist/domains/user-notification-status.js +715 -0
- package/dist/domains/user-notification.d.ts +118 -0
- package/dist/domains/user-notification.js +3040 -0
- package/dist/domains/user.d.ts +42 -8
- package/dist/domains/user.js +352 -12
- package/dist/index.d.ts +23 -1
- package/dist/index.js +30 -13
- package/dist/schema.json +1438 -35
- package/package.json +1 -1
package/dist/app.d.ts
CHANGED
|
@@ -2,7 +2,15 @@ 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:
|
|
5
|
+
showOpenDialog: (options: OpenDialogOptions) => string[] | undefined;
|
|
6
|
+
showOpenDialogAsync: (options: OpenDialogOptions) => Promise<{
|
|
7
|
+
canceled: boolean;
|
|
8
|
+
filePaths: string[];
|
|
9
|
+
}>;
|
|
10
|
+
showSaveDialogAsync: (options: SaveDialogOptions) => Promise<{
|
|
11
|
+
canceled: boolean;
|
|
12
|
+
filePath: string;
|
|
13
|
+
}>;
|
|
6
14
|
getCurrentVersion: () => Promise<string>;
|
|
7
15
|
getLatestVersion: () => Promise<string>;
|
|
8
16
|
triggerUpdate: (latestVersion: string) => void;
|
|
@@ -10,6 +18,9 @@ export interface ElectronHubApi {
|
|
|
10
18
|
openInApp: (...args: unknown[]) => void;
|
|
11
19
|
installDavinciPlugin: (url: string) => Promise<void>;
|
|
12
20
|
clipboard: unknown;
|
|
21
|
+
downloadFile: (options: DownloadFileOptions) => void;
|
|
22
|
+
showItemInFolder: (fullPath: string) => void;
|
|
23
|
+
openPath: (path: string) => void;
|
|
13
24
|
}
|
|
14
25
|
export declare const isElectronHubApi: (input: unknown) => input is ElectronHubApi;
|
|
15
26
|
export declare const assertElectronHubApi: (input: unknown) => ElectronHubApi;
|
|
@@ -17,3 +28,52 @@ export declare const randomElectronHubApi: () => ElectronHubApi;
|
|
|
17
28
|
export declare const assertGuardElectronHubApi: __AssertionGuard<ElectronHubApi>;
|
|
18
29
|
export declare const stringifyElectronHubApi: (input: ElectronHubApi) => string;
|
|
19
30
|
export declare const assertStringifyElectronHubApi: (input: unknown) => string;
|
|
31
|
+
export interface DownloadFileOptions {
|
|
32
|
+
/**
|
|
33
|
+
* URL of the resource to download.
|
|
34
|
+
*/
|
|
35
|
+
url: string;
|
|
36
|
+
filename?: string;
|
|
37
|
+
directory?: string;
|
|
38
|
+
/** If present, filename and directory will be ignored. */
|
|
39
|
+
path?: string;
|
|
40
|
+
}
|
|
41
|
+
export declare const isDownloadFileOptions: (input: unknown) => input is DownloadFileOptions;
|
|
42
|
+
export declare const assertDownloadFileOptions: (input: unknown) => DownloadFileOptions;
|
|
43
|
+
export declare const randomDownloadFileOptions: () => DownloadFileOptions;
|
|
44
|
+
export declare const assertGuardDownloadFileOptions: __AssertionGuard<DownloadFileOptions>;
|
|
45
|
+
export declare const stringifyDownloadFileOptions: (input: DownloadFileOptions) => string;
|
|
46
|
+
export declare const assertStringifyDownloadFileOptions: (input: unknown) => string;
|
|
47
|
+
interface OpenDialogOptions {
|
|
48
|
+
title?: string;
|
|
49
|
+
defaultDirectory?: string;
|
|
50
|
+
defaultFilename?: string;
|
|
51
|
+
/** If present, defaultDirectory and defaultFilename will be ignored. */
|
|
52
|
+
defaultPath?: string;
|
|
53
|
+
buttonLabel?: string;
|
|
54
|
+
filters?: Array<{
|
|
55
|
+
name: string;
|
|
56
|
+
extensions: string[];
|
|
57
|
+
}>;
|
|
58
|
+
properties?: Array<"openFile" | "openDirectory" | "multiSelections" | "showHiddenFiles" | "createDirectory" | "promptToCreate" | "noResolveAliases" | "treatPackageAsDirectory" | "dontAddToRecent">;
|
|
59
|
+
message?: string;
|
|
60
|
+
securityScopedBookmarks?: boolean;
|
|
61
|
+
}
|
|
62
|
+
interface SaveDialogOptions {
|
|
63
|
+
title?: string;
|
|
64
|
+
defaultDirectory?: string;
|
|
65
|
+
defaultFilename?: string;
|
|
66
|
+
/** If present, defaultDirectory and defaultFilename will be ignored. */
|
|
67
|
+
defaultPath?: string;
|
|
68
|
+
buttonLabel?: string;
|
|
69
|
+
filters?: Array<{
|
|
70
|
+
name: string;
|
|
71
|
+
extensions: string[];
|
|
72
|
+
}>;
|
|
73
|
+
message?: string;
|
|
74
|
+
nameFieldLabel?: string;
|
|
75
|
+
showsTagField?: boolean;
|
|
76
|
+
properties?: Array<"showHiddenFiles" | "createDirectory" | "treatPackageAsDirectory" | "showOverwriteConfirmation" | "dontAddToRecent">;
|
|
77
|
+
securityScopedBookmarks?: boolean;
|
|
78
|
+
}
|
|
79
|
+
export {};
|
package/dist/app.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
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;
|
|
3
|
+
const $io0 = input => true && true && true && true && true && true && true && true && true && true && true && true && true && true && true;
|
|
4
4
|
return "object" === typeof input && null !== input && $io0(input);
|
|
5
5
|
};
|
|
6
6
|
export const assertElectronHubApi = (input, errorFactory) => {
|
|
7
7
|
const __is = input => {
|
|
8
|
-
const $io0 = input => true && true && true && true && true && true && true && true && true && true;
|
|
8
|
+
const $io0 = input => true && true && true && true && true && true && true && true && true && true && true && true && true && true && true;
|
|
9
9
|
return "object" === typeof input && null !== input && $io0(input);
|
|
10
10
|
};
|
|
11
11
|
if (false === __is(input))
|
|
@@ -23,6 +23,14 @@ export const assertElectronHubApi = (input, errorFactory) => {
|
|
|
23
23
|
path: _path + ".showOpenDialog",
|
|
24
24
|
expected: "unknown",
|
|
25
25
|
value: input.showOpenDialog
|
|
26
|
+
}, errorFactory)) && (true || $guard(_exceptionable, {
|
|
27
|
+
path: _path + ".showOpenDialogAsync",
|
|
28
|
+
expected: "unknown",
|
|
29
|
+
value: input.showOpenDialogAsync
|
|
30
|
+
}, errorFactory)) && (true || $guard(_exceptionable, {
|
|
31
|
+
path: _path + ".showSaveDialogAsync",
|
|
32
|
+
expected: "unknown",
|
|
33
|
+
value: input.showSaveDialogAsync
|
|
26
34
|
}, errorFactory)) && (true || $guard(_exceptionable, {
|
|
27
35
|
path: _path + ".getCurrentVersion",
|
|
28
36
|
expected: "unknown",
|
|
@@ -47,7 +55,19 @@ export const assertElectronHubApi = (input, errorFactory) => {
|
|
|
47
55
|
path: _path + ".installDavinciPlugin",
|
|
48
56
|
expected: "unknown",
|
|
49
57
|
value: input.installDavinciPlugin
|
|
50
|
-
}, errorFactory)) && true
|
|
58
|
+
}, errorFactory)) && true && (true || $guard(_exceptionable, {
|
|
59
|
+
path: _path + ".downloadFile",
|
|
60
|
+
expected: "unknown",
|
|
61
|
+
value: input.downloadFile
|
|
62
|
+
}, errorFactory)) && (true || $guard(_exceptionable, {
|
|
63
|
+
path: _path + ".showItemInFolder",
|
|
64
|
+
expected: "unknown",
|
|
65
|
+
value: input.showItemInFolder
|
|
66
|
+
}, errorFactory)) && (true || $guard(_exceptionable, {
|
|
67
|
+
path: _path + ".openPath",
|
|
68
|
+
expected: "unknown",
|
|
69
|
+
value: input.openPath
|
|
70
|
+
}, errorFactory));
|
|
51
71
|
return ("object" === typeof input && null !== input || $guard(true, {
|
|
52
72
|
path: _path + "",
|
|
53
73
|
expected: "ElectronHubApi",
|
|
@@ -65,19 +85,24 @@ export const randomElectronHubApi = generator => {
|
|
|
65
85
|
startDrag: undefined,
|
|
66
86
|
getWebdavPath: undefined,
|
|
67
87
|
showOpenDialog: undefined,
|
|
88
|
+
showOpenDialogAsync: undefined,
|
|
89
|
+
showSaveDialogAsync: undefined,
|
|
68
90
|
getCurrentVersion: undefined,
|
|
69
91
|
getLatestVersion: undefined,
|
|
70
92
|
triggerUpdate: undefined,
|
|
71
93
|
controlDownloadItem: undefined,
|
|
72
94
|
openInApp: undefined,
|
|
73
95
|
installDavinciPlugin: undefined,
|
|
74
|
-
clipboard: "any type used..."
|
|
96
|
+
clipboard: "any type used...",
|
|
97
|
+
downloadFile: undefined,
|
|
98
|
+
showItemInFolder: undefined,
|
|
99
|
+
openPath: undefined
|
|
75
100
|
});
|
|
76
101
|
return $ro0();
|
|
77
102
|
};
|
|
78
103
|
export const assertGuardElectronHubApi = (input, errorFactory) => {
|
|
79
104
|
const __is = input => {
|
|
80
|
-
const $io0 = input => true && true && true && true && true && true && true && true && true && true;
|
|
105
|
+
const $io0 = input => true && true && true && true && true && true && true && true && true && true && true && true && true && true && true;
|
|
81
106
|
return "object" === typeof input && null !== input && $io0(input);
|
|
82
107
|
};
|
|
83
108
|
if (false === __is(input))
|
|
@@ -95,6 +120,14 @@ export const assertGuardElectronHubApi = (input, errorFactory) => {
|
|
|
95
120
|
path: _path + ".showOpenDialog",
|
|
96
121
|
expected: "unknown",
|
|
97
122
|
value: input.showOpenDialog
|
|
123
|
+
}, errorFactory)) && (true || $guard(_exceptionable, {
|
|
124
|
+
path: _path + ".showOpenDialogAsync",
|
|
125
|
+
expected: "unknown",
|
|
126
|
+
value: input.showOpenDialogAsync
|
|
127
|
+
}, errorFactory)) && (true || $guard(_exceptionable, {
|
|
128
|
+
path: _path + ".showSaveDialogAsync",
|
|
129
|
+
expected: "unknown",
|
|
130
|
+
value: input.showSaveDialogAsync
|
|
98
131
|
}, errorFactory)) && (true || $guard(_exceptionable, {
|
|
99
132
|
path: _path + ".getCurrentVersion",
|
|
100
133
|
expected: "unknown",
|
|
@@ -119,7 +152,19 @@ export const assertGuardElectronHubApi = (input, errorFactory) => {
|
|
|
119
152
|
path: _path + ".installDavinciPlugin",
|
|
120
153
|
expected: "unknown",
|
|
121
154
|
value: input.installDavinciPlugin
|
|
122
|
-
}, errorFactory)) && true
|
|
155
|
+
}, errorFactory)) && true && (true || $guard(_exceptionable, {
|
|
156
|
+
path: _path + ".downloadFile",
|
|
157
|
+
expected: "unknown",
|
|
158
|
+
value: input.downloadFile
|
|
159
|
+
}, errorFactory)) && (true || $guard(_exceptionable, {
|
|
160
|
+
path: _path + ".showItemInFolder",
|
|
161
|
+
expected: "unknown",
|
|
162
|
+
value: input.showItemInFolder
|
|
163
|
+
}, errorFactory)) && (true || $guard(_exceptionable, {
|
|
164
|
+
path: _path + ".openPath",
|
|
165
|
+
expected: "unknown",
|
|
166
|
+
value: input.openPath
|
|
167
|
+
}, errorFactory));
|
|
123
168
|
return ("object" === typeof input && null !== input || $guard(true, {
|
|
124
169
|
path: _path + "",
|
|
125
170
|
expected: "ElectronHubApi",
|
|
@@ -132,12 +177,12 @@ export const assertGuardElectronHubApi = (input, errorFactory) => {
|
|
|
132
177
|
})(input, "$input", true);
|
|
133
178
|
};
|
|
134
179
|
export const stringifyElectronHubApi = input => {
|
|
135
|
-
const $so0 = input => `{${undefined === input.clipboard || "function" === typeof input.clipboard ? "" : `"clipboard":${undefined !== input.clipboard ? JSON.stringify(input.clipboard) : undefined}
|
|
180
|
+
const $so0 = input => `{${undefined === input.clipboard || "function" === typeof input.clipboard ? "" : `"clipboard":${undefined !== input.clipboard ? JSON.stringify(input.clipboard) : undefined},`}}`;
|
|
136
181
|
return $so0(input);
|
|
137
182
|
};
|
|
138
183
|
export const assertStringifyElectronHubApi = (input, errorFactory) => { const assert = (input, errorFactory) => {
|
|
139
184
|
const __is = input => {
|
|
140
|
-
const $io0 = input => true && true && true && true && true && true && true && true && true && true;
|
|
185
|
+
const $io0 = input => true && true && true && true && true && true && true && true && true && true && true && true && true && true && true;
|
|
141
186
|
return "object" === typeof input && null !== input && $io0(input);
|
|
142
187
|
};
|
|
143
188
|
if (false === __is(input))
|
|
@@ -155,6 +200,14 @@ export const assertStringifyElectronHubApi = (input, errorFactory) => { const as
|
|
|
155
200
|
path: _path + ".showOpenDialog",
|
|
156
201
|
expected: "unknown",
|
|
157
202
|
value: input.showOpenDialog
|
|
203
|
+
}, errorFactory)) && (true || $guard(_exceptionable, {
|
|
204
|
+
path: _path + ".showOpenDialogAsync",
|
|
205
|
+
expected: "unknown",
|
|
206
|
+
value: input.showOpenDialogAsync
|
|
207
|
+
}, errorFactory)) && (true || $guard(_exceptionable, {
|
|
208
|
+
path: _path + ".showSaveDialogAsync",
|
|
209
|
+
expected: "unknown",
|
|
210
|
+
value: input.showSaveDialogAsync
|
|
158
211
|
}, errorFactory)) && (true || $guard(_exceptionable, {
|
|
159
212
|
path: _path + ".getCurrentVersion",
|
|
160
213
|
expected: "unknown",
|
|
@@ -179,7 +232,19 @@ export const assertStringifyElectronHubApi = (input, errorFactory) => { const as
|
|
|
179
232
|
path: _path + ".installDavinciPlugin",
|
|
180
233
|
expected: "unknown",
|
|
181
234
|
value: input.installDavinciPlugin
|
|
182
|
-
}, errorFactory)) && true
|
|
235
|
+
}, errorFactory)) && true && (true || $guard(_exceptionable, {
|
|
236
|
+
path: _path + ".downloadFile",
|
|
237
|
+
expected: "unknown",
|
|
238
|
+
value: input.downloadFile
|
|
239
|
+
}, errorFactory)) && (true || $guard(_exceptionable, {
|
|
240
|
+
path: _path + ".showItemInFolder",
|
|
241
|
+
expected: "unknown",
|
|
242
|
+
value: input.showItemInFolder
|
|
243
|
+
}, errorFactory)) && (true || $guard(_exceptionable, {
|
|
244
|
+
path: _path + ".openPath",
|
|
245
|
+
expected: "unknown",
|
|
246
|
+
value: input.openPath
|
|
247
|
+
}, errorFactory));
|
|
183
248
|
return ("object" === typeof input && null !== input || $guard(true, {
|
|
184
249
|
path: _path + "",
|
|
185
250
|
expected: "ElectronHubApi",
|
|
@@ -192,6 +257,149 @@ export const assertStringifyElectronHubApi = (input, errorFactory) => { const as
|
|
|
192
257
|
})(input, "$input", true);
|
|
193
258
|
return input;
|
|
194
259
|
}; const stringify = input => {
|
|
195
|
-
const $so0 = input => `{${undefined === input.clipboard || "function" === typeof input.clipboard ? "" : `"clipboard":${undefined !== input.clipboard ? JSON.stringify(input.clipboard) : undefined}
|
|
260
|
+
const $so0 = input => `{${undefined === input.clipboard || "function" === typeof input.clipboard ? "" : `"clipboard":${undefined !== input.clipboard ? JSON.stringify(input.clipboard) : undefined},`}}`;
|
|
261
|
+
return $so0(input);
|
|
262
|
+
}; return stringify(assert(input, errorFactory)); };
|
|
263
|
+
export const isDownloadFileOptions = input => {
|
|
264
|
+
const $io0 = input => "string" === typeof input.url && (undefined === input.filename || "string" === typeof input.filename) && (undefined === input.directory || "string" === typeof input.directory) && (undefined === input.path || "string" === typeof input.path);
|
|
265
|
+
return "object" === typeof input && null !== input && $io0(input);
|
|
266
|
+
};
|
|
267
|
+
export const assertDownloadFileOptions = (input, errorFactory) => {
|
|
268
|
+
const __is = input => {
|
|
269
|
+
const $io0 = input => "string" === typeof input.url && (undefined === input.filename || "string" === typeof input.filename) && (undefined === input.directory || "string" === typeof input.directory) && (undefined === input.path || "string" === typeof input.path);
|
|
270
|
+
return "object" === typeof input && null !== input && $io0(input);
|
|
271
|
+
};
|
|
272
|
+
if (false === __is(input))
|
|
273
|
+
((input, _path, _exceptionable = true) => {
|
|
274
|
+
const $guard = __typia.createAssert.guard;
|
|
275
|
+
const $ao0 = (input, _path, _exceptionable = true) => ("string" === typeof input.url || $guard(_exceptionable, {
|
|
276
|
+
path: _path + ".url",
|
|
277
|
+
expected: "string",
|
|
278
|
+
value: input.url
|
|
279
|
+
}, errorFactory)) && (undefined === input.filename || "string" === typeof input.filename || $guard(_exceptionable, {
|
|
280
|
+
path: _path + ".filename",
|
|
281
|
+
expected: "(string | undefined)",
|
|
282
|
+
value: input.filename
|
|
283
|
+
}, errorFactory)) && (undefined === input.directory || "string" === typeof input.directory || $guard(_exceptionable, {
|
|
284
|
+
path: _path + ".directory",
|
|
285
|
+
expected: "(string | undefined)",
|
|
286
|
+
value: input.directory
|
|
287
|
+
}, errorFactory)) && (undefined === input.path || "string" === typeof input.path || $guard(_exceptionable, {
|
|
288
|
+
path: _path + ".path",
|
|
289
|
+
expected: "(string | undefined)",
|
|
290
|
+
value: input.path
|
|
291
|
+
}, errorFactory));
|
|
292
|
+
return ("object" === typeof input && null !== input || $guard(true, {
|
|
293
|
+
path: _path + "",
|
|
294
|
+
expected: "DownloadFileOptions",
|
|
295
|
+
value: input
|
|
296
|
+
}, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
|
|
297
|
+
path: _path + "",
|
|
298
|
+
expected: "DownloadFileOptions",
|
|
299
|
+
value: input
|
|
300
|
+
}, errorFactory);
|
|
301
|
+
})(input, "$input", true);
|
|
302
|
+
return input;
|
|
303
|
+
};
|
|
304
|
+
export const randomDownloadFileOptions = generator => {
|
|
305
|
+
const $generator = __typia.createRandom.generator;
|
|
306
|
+
const $pick = __typia.createRandom.pick;
|
|
307
|
+
const $ro0 = (_recursive = false, _depth = 0) => ({
|
|
308
|
+
url: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
|
|
309
|
+
filename: $pick([
|
|
310
|
+
() => undefined,
|
|
311
|
+
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
|
|
312
|
+
])(),
|
|
313
|
+
directory: $pick([
|
|
314
|
+
() => undefined,
|
|
315
|
+
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
|
|
316
|
+
])(),
|
|
317
|
+
path: $pick([
|
|
318
|
+
() => undefined,
|
|
319
|
+
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
|
|
320
|
+
])()
|
|
321
|
+
});
|
|
322
|
+
return $ro0();
|
|
323
|
+
};
|
|
324
|
+
export const assertGuardDownloadFileOptions = (input, errorFactory) => {
|
|
325
|
+
const __is = input => {
|
|
326
|
+
const $io0 = input => "string" === typeof input.url && (undefined === input.filename || "string" === typeof input.filename) && (undefined === input.directory || "string" === typeof input.directory) && (undefined === input.path || "string" === typeof input.path);
|
|
327
|
+
return "object" === typeof input && null !== input && $io0(input);
|
|
328
|
+
};
|
|
329
|
+
if (false === __is(input))
|
|
330
|
+
((input, _path, _exceptionable = true) => {
|
|
331
|
+
const $guard = __typia.createAssertGuard.guard;
|
|
332
|
+
const $ao0 = (input, _path, _exceptionable = true) => ("string" === typeof input.url || $guard(_exceptionable, {
|
|
333
|
+
path: _path + ".url",
|
|
334
|
+
expected: "string",
|
|
335
|
+
value: input.url
|
|
336
|
+
}, errorFactory)) && (undefined === input.filename || "string" === typeof input.filename || $guard(_exceptionable, {
|
|
337
|
+
path: _path + ".filename",
|
|
338
|
+
expected: "(string | undefined)",
|
|
339
|
+
value: input.filename
|
|
340
|
+
}, errorFactory)) && (undefined === input.directory || "string" === typeof input.directory || $guard(_exceptionable, {
|
|
341
|
+
path: _path + ".directory",
|
|
342
|
+
expected: "(string | undefined)",
|
|
343
|
+
value: input.directory
|
|
344
|
+
}, errorFactory)) && (undefined === input.path || "string" === typeof input.path || $guard(_exceptionable, {
|
|
345
|
+
path: _path + ".path",
|
|
346
|
+
expected: "(string | undefined)",
|
|
347
|
+
value: input.path
|
|
348
|
+
}, errorFactory));
|
|
349
|
+
return ("object" === typeof input && null !== input || $guard(true, {
|
|
350
|
+
path: _path + "",
|
|
351
|
+
expected: "DownloadFileOptions",
|
|
352
|
+
value: input
|
|
353
|
+
}, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
|
|
354
|
+
path: _path + "",
|
|
355
|
+
expected: "DownloadFileOptions",
|
|
356
|
+
value: input
|
|
357
|
+
}, errorFactory);
|
|
358
|
+
})(input, "$input", true);
|
|
359
|
+
};
|
|
360
|
+
export const stringifyDownloadFileOptions = input => {
|
|
361
|
+
const $string = __typia.json.createStringify.string;
|
|
362
|
+
const $so0 = input => `{${undefined === input.filename ? "" : `"filename":${undefined !== input.filename ? $string(input.filename) : undefined},`}${undefined === input.directory ? "" : `"directory":${undefined !== input.directory ? $string(input.directory) : undefined},`}${undefined === input.path ? "" : `"path":${undefined !== input.path ? $string(input.path) : undefined},`}"url":${$string(input.url)}}`;
|
|
363
|
+
return $so0(input);
|
|
364
|
+
};
|
|
365
|
+
export const assertStringifyDownloadFileOptions = (input, errorFactory) => { const assert = (input, errorFactory) => {
|
|
366
|
+
const __is = input => {
|
|
367
|
+
const $io0 = input => "string" === typeof input.url && (undefined === input.filename || "string" === typeof input.filename) && (undefined === input.directory || "string" === typeof input.directory) && (undefined === input.path || "string" === typeof input.path);
|
|
368
|
+
return "object" === typeof input && null !== input && $io0(input);
|
|
369
|
+
};
|
|
370
|
+
if (false === __is(input))
|
|
371
|
+
((input, _path, _exceptionable = true) => {
|
|
372
|
+
const $guard = __typia.json.createAssertStringify.guard;
|
|
373
|
+
const $ao0 = (input, _path, _exceptionable = true) => ("string" === typeof input.url || $guard(_exceptionable, {
|
|
374
|
+
path: _path + ".url",
|
|
375
|
+
expected: "string",
|
|
376
|
+
value: input.url
|
|
377
|
+
}, errorFactory)) && (undefined === input.filename || "string" === typeof input.filename || $guard(_exceptionable, {
|
|
378
|
+
path: _path + ".filename",
|
|
379
|
+
expected: "(string | undefined)",
|
|
380
|
+
value: input.filename
|
|
381
|
+
}, errorFactory)) && (undefined === input.directory || "string" === typeof input.directory || $guard(_exceptionable, {
|
|
382
|
+
path: _path + ".directory",
|
|
383
|
+
expected: "(string | undefined)",
|
|
384
|
+
value: input.directory
|
|
385
|
+
}, errorFactory)) && (undefined === input.path || "string" === typeof input.path || $guard(_exceptionable, {
|
|
386
|
+
path: _path + ".path",
|
|
387
|
+
expected: "(string | undefined)",
|
|
388
|
+
value: input.path
|
|
389
|
+
}, errorFactory));
|
|
390
|
+
return ("object" === typeof input && null !== input || $guard(true, {
|
|
391
|
+
path: _path + "",
|
|
392
|
+
expected: "DownloadFileOptions",
|
|
393
|
+
value: input
|
|
394
|
+
}, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
|
|
395
|
+
path: _path + "",
|
|
396
|
+
expected: "DownloadFileOptions",
|
|
397
|
+
value: input
|
|
398
|
+
}, errorFactory);
|
|
399
|
+
})(input, "$input", true);
|
|
400
|
+
return input;
|
|
401
|
+
}; const stringify = input => {
|
|
402
|
+
const $string = __typia.json.createAssertStringify.string;
|
|
403
|
+
const $so0 = input => `{${undefined === input.filename ? "" : `"filename":${undefined !== input.filename ? $string(input.filename) : undefined},`}${undefined === input.directory ? "" : `"directory":${undefined !== input.directory ? $string(input.directory) : undefined},`}${undefined === input.path ? "" : `"path":${undefined !== input.path ? $string(input.path) : undefined},`}"url":${$string(input.url)}}`;
|
|
196
404
|
return $so0(input);
|
|
197
405
|
}; return stringify(assert(input, errorFactory)); };
|
package/dist/common/file.d.ts
CHANGED
|
@@ -15,7 +15,7 @@ export interface File {
|
|
|
15
15
|
tags: string[];
|
|
16
16
|
resumable: string;
|
|
17
17
|
mimeType: string;
|
|
18
|
-
|
|
18
|
+
encoding: string;
|
|
19
19
|
hash: string & tags.Pattern<"^([A-Fa-f0-9]{32})?$">;
|
|
20
20
|
btime: number & tags.Minimum<0> & tags.Type<"uint64">;
|
|
21
21
|
completed: boolean;
|