@shadowob/flash-types 1.1.3

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.
@@ -0,0 +1,1403 @@
1
+ import * as __typia_transform__accessExpressionAsString from "typia/lib/internal/_accessExpressionAsString.js";
2
+ import * as __typia_transform__validateReport from "typia/lib/internal/_validateReport.js";
3
+ import * as __typia_transform__assertGuard from "typia/lib/internal/_assertGuard.js";
4
+ // ═══════════════════════════════════════════════════════════════
5
+ // @shadowob/flash-types — Typia Validators
6
+ //
7
+ // Runtime validation powered by typia.
8
+ // Import and call these to validate data at system boundaries.
9
+ // ═══════════════════════════════════════════════════════════════
10
+ import typia from 'typia';
11
+ import type { CardRecord, DeckRecord, MaterialRecord, SkillRecord } from './records.js';
12
+ import type { AppSettings, UserSettings } from './settings.js';
13
+ // ── Card ──
14
+ export const validateCard = (() => { const _io0 = (input: any): boolean => "string" === typeof input.id && "string" === typeof input.kind && "string" === typeof input.title && (undefined === input.summary || "string" === typeof input.summary) && (undefined === input.content || "string" === typeof input.content) && (null === input.sourceId || "string" === typeof input.sourceId) && (Array.isArray(input.linkedCardIds) && input.linkedCardIds.every((elem: any) => "string" === typeof elem)) && ("object" === typeof input.meta && null !== input.meta && false === Array.isArray(input.meta) && _io1(input.meta)) && (Array.isArray(input.tags) && input.tags.every((elem: any) => "string" === typeof elem)) && "string" === typeof input.priority && "boolean" === typeof input.autoGenerated && "number" === typeof input.rating && (Array.isArray(input.deckIds) && input.deckIds.every((elem: any) => "string" === typeof elem)) && (undefined === input.filePath || "string" === typeof input.filePath) && (undefined === input.fileMime || "string" === typeof input.fileMime) && "number" === typeof input.createdAt && "number" === typeof input.updatedAt && (undefined === input.projectId || "string" === typeof input.projectId); const _io1 = (input: any): boolean => Object.keys(input).every((key: any) => {
15
+ const value = input[key];
16
+ if (undefined === value)
17
+ return true;
18
+ return true;
19
+ }); const _vo0 = (input: any, _path: string, _exceptionable: boolean = true): boolean => ["string" === typeof input.id || _report(_exceptionable, {
20
+ path: _path + ".id",
21
+ expected: "string",
22
+ value: input.id
23
+ }), "string" === typeof input.kind || _report(_exceptionable, {
24
+ path: _path + ".kind",
25
+ expected: "string",
26
+ value: input.kind
27
+ }), "string" === typeof input.title || _report(_exceptionable, {
28
+ path: _path + ".title",
29
+ expected: "string",
30
+ value: input.title
31
+ }), undefined === input.summary || "string" === typeof input.summary || _report(_exceptionable, {
32
+ path: _path + ".summary",
33
+ expected: "(string | undefined)",
34
+ value: input.summary
35
+ }), undefined === input.content || "string" === typeof input.content || _report(_exceptionable, {
36
+ path: _path + ".content",
37
+ expected: "(string | undefined)",
38
+ value: input.content
39
+ }), null === input.sourceId || "string" === typeof input.sourceId || _report(_exceptionable, {
40
+ path: _path + ".sourceId",
41
+ expected: "(null | string)",
42
+ value: input.sourceId
43
+ }), (Array.isArray(input.linkedCardIds) || _report(_exceptionable, {
44
+ path: _path + ".linkedCardIds",
45
+ expected: "Array<string>",
46
+ value: input.linkedCardIds
47
+ })) && input.linkedCardIds.map((elem: any, _index4: number) => "string" === typeof elem || _report(_exceptionable, {
48
+ path: _path + ".linkedCardIds[" + _index4 + "]",
49
+ expected: "string",
50
+ value: elem
51
+ })).every((flag: boolean) => flag) || _report(_exceptionable, {
52
+ path: _path + ".linkedCardIds",
53
+ expected: "Array<string>",
54
+ value: input.linkedCardIds
55
+ }), ("object" === typeof input.meta && null !== input.meta && false === Array.isArray(input.meta) || _report(_exceptionable, {
56
+ path: _path + ".meta",
57
+ expected: "Record<string, unknown>",
58
+ value: input.meta
59
+ })) && _vo1(input.meta, _path + ".meta", true && _exceptionable) || _report(_exceptionable, {
60
+ path: _path + ".meta",
61
+ expected: "Record<string, unknown>",
62
+ value: input.meta
63
+ }), (Array.isArray(input.tags) || _report(_exceptionable, {
64
+ path: _path + ".tags",
65
+ expected: "Array<string>",
66
+ value: input.tags
67
+ })) && input.tags.map((elem: any, _index5: number) => "string" === typeof elem || _report(_exceptionable, {
68
+ path: _path + ".tags[" + _index5 + "]",
69
+ expected: "string",
70
+ value: elem
71
+ })).every((flag: boolean) => flag) || _report(_exceptionable, {
72
+ path: _path + ".tags",
73
+ expected: "Array<string>",
74
+ value: input.tags
75
+ }), "string" === typeof input.priority || _report(_exceptionable, {
76
+ path: _path + ".priority",
77
+ expected: "string",
78
+ value: input.priority
79
+ }), "boolean" === typeof input.autoGenerated || _report(_exceptionable, {
80
+ path: _path + ".autoGenerated",
81
+ expected: "boolean",
82
+ value: input.autoGenerated
83
+ }), "number" === typeof input.rating || _report(_exceptionable, {
84
+ path: _path + ".rating",
85
+ expected: "number",
86
+ value: input.rating
87
+ }), (Array.isArray(input.deckIds) || _report(_exceptionable, {
88
+ path: _path + ".deckIds",
89
+ expected: "Array<string>",
90
+ value: input.deckIds
91
+ })) && input.deckIds.map((elem: any, _index6: number) => "string" === typeof elem || _report(_exceptionable, {
92
+ path: _path + ".deckIds[" + _index6 + "]",
93
+ expected: "string",
94
+ value: elem
95
+ })).every((flag: boolean) => flag) || _report(_exceptionable, {
96
+ path: _path + ".deckIds",
97
+ expected: "Array<string>",
98
+ value: input.deckIds
99
+ }), undefined === input.filePath || "string" === typeof input.filePath || _report(_exceptionable, {
100
+ path: _path + ".filePath",
101
+ expected: "(string | undefined)",
102
+ value: input.filePath
103
+ }), undefined === input.fileMime || "string" === typeof input.fileMime || _report(_exceptionable, {
104
+ path: _path + ".fileMime",
105
+ expected: "(string | undefined)",
106
+ value: input.fileMime
107
+ }), "number" === typeof input.createdAt || _report(_exceptionable, {
108
+ path: _path + ".createdAt",
109
+ expected: "number",
110
+ value: input.createdAt
111
+ }), "number" === typeof input.updatedAt || _report(_exceptionable, {
112
+ path: _path + ".updatedAt",
113
+ expected: "number",
114
+ value: input.updatedAt
115
+ }), undefined === input.projectId || "string" === typeof input.projectId || _report(_exceptionable, {
116
+ path: _path + ".projectId",
117
+ expected: "(string | undefined)",
118
+ value: input.projectId
119
+ })].every((flag: boolean) => flag); const _vo1 = (input: any, _path: string, _exceptionable: boolean = true): boolean => [false === _exceptionable || Object.keys(input).map((key: any) => {
120
+ const value = input[key];
121
+ if (undefined === value)
122
+ return true;
123
+ return true;
124
+ }).every((flag: boolean) => flag)].every((flag: boolean) => flag); const __is = (input: any): input is CardRecord => "object" === typeof input && null !== input && _io0(input); let errors: any; let _report: any; return (input: any): import("typia").IValidation<CardRecord> => {
125
+ if (false === __is(input)) {
126
+ errors = [];
127
+ _report = (__typia_transform__validateReport._validateReport as any)(errors);
128
+ ((input: any, _path: string, _exceptionable: boolean = true) => ("object" === typeof input && null !== input || _report(true, {
129
+ path: _path + "",
130
+ expected: "CardRecord",
131
+ value: input
132
+ })) && _vo0(input, _path + "", true) || _report(true, {
133
+ path: _path + "",
134
+ expected: "CardRecord",
135
+ value: input
136
+ }))(input, "$input", true);
137
+ const success = 0 === errors.length;
138
+ return success ? {
139
+ success,
140
+ data: input
141
+ } : {
142
+ success,
143
+ errors,
144
+ data: input
145
+ } as any;
146
+ }
147
+ return {
148
+ success: true,
149
+ data: input
150
+ } as any;
151
+ }; })();
152
+ export const isCard = (() => { const _io0 = (input: any): boolean => "string" === typeof input.id && "string" === typeof input.kind && "string" === typeof input.title && (undefined === input.summary || "string" === typeof input.summary) && (undefined === input.content || "string" === typeof input.content) && (null === input.sourceId || "string" === typeof input.sourceId) && (Array.isArray(input.linkedCardIds) && input.linkedCardIds.every((elem: any) => "string" === typeof elem)) && ("object" === typeof input.meta && null !== input.meta && false === Array.isArray(input.meta) && _io1(input.meta)) && (Array.isArray(input.tags) && input.tags.every((elem: any) => "string" === typeof elem)) && "string" === typeof input.priority && "boolean" === typeof input.autoGenerated && "number" === typeof input.rating && (Array.isArray(input.deckIds) && input.deckIds.every((elem: any) => "string" === typeof elem)) && (undefined === input.filePath || "string" === typeof input.filePath) && (undefined === input.fileMime || "string" === typeof input.fileMime) && "number" === typeof input.createdAt && "number" === typeof input.updatedAt && (undefined === input.projectId || "string" === typeof input.projectId); const _io1 = (input: any): boolean => Object.keys(input).every((key: any) => {
153
+ const value = input[key];
154
+ if (undefined === value)
155
+ return true;
156
+ return true;
157
+ }); return (input: any): input is CardRecord => "object" === typeof input && null !== input && _io0(input); })();
158
+ export const assertCard = (() => { const _io0 = (input: any): boolean => "string" === typeof input.id && "string" === typeof input.kind && "string" === typeof input.title && (undefined === input.summary || "string" === typeof input.summary) && (undefined === input.content || "string" === typeof input.content) && (null === input.sourceId || "string" === typeof input.sourceId) && (Array.isArray(input.linkedCardIds) && input.linkedCardIds.every((elem: any) => "string" === typeof elem)) && ("object" === typeof input.meta && null !== input.meta && false === Array.isArray(input.meta) && _io1(input.meta)) && (Array.isArray(input.tags) && input.tags.every((elem: any) => "string" === typeof elem)) && "string" === typeof input.priority && "boolean" === typeof input.autoGenerated && "number" === typeof input.rating && (Array.isArray(input.deckIds) && input.deckIds.every((elem: any) => "string" === typeof elem)) && (undefined === input.filePath || "string" === typeof input.filePath) && (undefined === input.fileMime || "string" === typeof input.fileMime) && "number" === typeof input.createdAt && "number" === typeof input.updatedAt && (undefined === input.projectId || "string" === typeof input.projectId); const _io1 = (input: any): boolean => Object.keys(input).every((key: any) => {
159
+ const value = input[key];
160
+ if (undefined === value)
161
+ return true;
162
+ return true;
163
+ }); const _ao0 = (input: any, _path: string, _exceptionable: boolean = true): boolean => ("string" === typeof input.id || __typia_transform__assertGuard._assertGuard(_exceptionable, {
164
+ method: "typia.createAssert",
165
+ path: _path + ".id",
166
+ expected: "string",
167
+ value: input.id
168
+ }, _errorFactory)) && ("string" === typeof input.kind || __typia_transform__assertGuard._assertGuard(_exceptionable, {
169
+ method: "typia.createAssert",
170
+ path: _path + ".kind",
171
+ expected: "string",
172
+ value: input.kind
173
+ }, _errorFactory)) && ("string" === typeof input.title || __typia_transform__assertGuard._assertGuard(_exceptionable, {
174
+ method: "typia.createAssert",
175
+ path: _path + ".title",
176
+ expected: "string",
177
+ value: input.title
178
+ }, _errorFactory)) && (undefined === input.summary || "string" === typeof input.summary || __typia_transform__assertGuard._assertGuard(_exceptionable, {
179
+ method: "typia.createAssert",
180
+ path: _path + ".summary",
181
+ expected: "(string | undefined)",
182
+ value: input.summary
183
+ }, _errorFactory)) && (undefined === input.content || "string" === typeof input.content || __typia_transform__assertGuard._assertGuard(_exceptionable, {
184
+ method: "typia.createAssert",
185
+ path: _path + ".content",
186
+ expected: "(string | undefined)",
187
+ value: input.content
188
+ }, _errorFactory)) && (null === input.sourceId || "string" === typeof input.sourceId || __typia_transform__assertGuard._assertGuard(_exceptionable, {
189
+ method: "typia.createAssert",
190
+ path: _path + ".sourceId",
191
+ expected: "(null | string)",
192
+ value: input.sourceId
193
+ }, _errorFactory)) && ((Array.isArray(input.linkedCardIds) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
194
+ method: "typia.createAssert",
195
+ path: _path + ".linkedCardIds",
196
+ expected: "Array<string>",
197
+ value: input.linkedCardIds
198
+ }, _errorFactory)) && input.linkedCardIds.every((elem: any, _index4: number) => "string" === typeof elem || __typia_transform__assertGuard._assertGuard(_exceptionable, {
199
+ method: "typia.createAssert",
200
+ path: _path + ".linkedCardIds[" + _index4 + "]",
201
+ expected: "string",
202
+ value: elem
203
+ }, _errorFactory)) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
204
+ method: "typia.createAssert",
205
+ path: _path + ".linkedCardIds",
206
+ expected: "Array<string>",
207
+ value: input.linkedCardIds
208
+ }, _errorFactory)) && (("object" === typeof input.meta && null !== input.meta && false === Array.isArray(input.meta) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
209
+ method: "typia.createAssert",
210
+ path: _path + ".meta",
211
+ expected: "Record<string, unknown>",
212
+ value: input.meta
213
+ }, _errorFactory)) && _ao1(input.meta, _path + ".meta", true && _exceptionable) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
214
+ method: "typia.createAssert",
215
+ path: _path + ".meta",
216
+ expected: "Record<string, unknown>",
217
+ value: input.meta
218
+ }, _errorFactory)) && ((Array.isArray(input.tags) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
219
+ method: "typia.createAssert",
220
+ path: _path + ".tags",
221
+ expected: "Array<string>",
222
+ value: input.tags
223
+ }, _errorFactory)) && input.tags.every((elem: any, _index5: number) => "string" === typeof elem || __typia_transform__assertGuard._assertGuard(_exceptionable, {
224
+ method: "typia.createAssert",
225
+ path: _path + ".tags[" + _index5 + "]",
226
+ expected: "string",
227
+ value: elem
228
+ }, _errorFactory)) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
229
+ method: "typia.createAssert",
230
+ path: _path + ".tags",
231
+ expected: "Array<string>",
232
+ value: input.tags
233
+ }, _errorFactory)) && ("string" === typeof input.priority || __typia_transform__assertGuard._assertGuard(_exceptionable, {
234
+ method: "typia.createAssert",
235
+ path: _path + ".priority",
236
+ expected: "string",
237
+ value: input.priority
238
+ }, _errorFactory)) && ("boolean" === typeof input.autoGenerated || __typia_transform__assertGuard._assertGuard(_exceptionable, {
239
+ method: "typia.createAssert",
240
+ path: _path + ".autoGenerated",
241
+ expected: "boolean",
242
+ value: input.autoGenerated
243
+ }, _errorFactory)) && ("number" === typeof input.rating || __typia_transform__assertGuard._assertGuard(_exceptionable, {
244
+ method: "typia.createAssert",
245
+ path: _path + ".rating",
246
+ expected: "number",
247
+ value: input.rating
248
+ }, _errorFactory)) && ((Array.isArray(input.deckIds) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
249
+ method: "typia.createAssert",
250
+ path: _path + ".deckIds",
251
+ expected: "Array<string>",
252
+ value: input.deckIds
253
+ }, _errorFactory)) && input.deckIds.every((elem: any, _index6: number) => "string" === typeof elem || __typia_transform__assertGuard._assertGuard(_exceptionable, {
254
+ method: "typia.createAssert",
255
+ path: _path + ".deckIds[" + _index6 + "]",
256
+ expected: "string",
257
+ value: elem
258
+ }, _errorFactory)) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
259
+ method: "typia.createAssert",
260
+ path: _path + ".deckIds",
261
+ expected: "Array<string>",
262
+ value: input.deckIds
263
+ }, _errorFactory)) && (undefined === input.filePath || "string" === typeof input.filePath || __typia_transform__assertGuard._assertGuard(_exceptionable, {
264
+ method: "typia.createAssert",
265
+ path: _path + ".filePath",
266
+ expected: "(string | undefined)",
267
+ value: input.filePath
268
+ }, _errorFactory)) && (undefined === input.fileMime || "string" === typeof input.fileMime || __typia_transform__assertGuard._assertGuard(_exceptionable, {
269
+ method: "typia.createAssert",
270
+ path: _path + ".fileMime",
271
+ expected: "(string | undefined)",
272
+ value: input.fileMime
273
+ }, _errorFactory)) && ("number" === typeof input.createdAt || __typia_transform__assertGuard._assertGuard(_exceptionable, {
274
+ method: "typia.createAssert",
275
+ path: _path + ".createdAt",
276
+ expected: "number",
277
+ value: input.createdAt
278
+ }, _errorFactory)) && ("number" === typeof input.updatedAt || __typia_transform__assertGuard._assertGuard(_exceptionable, {
279
+ method: "typia.createAssert",
280
+ path: _path + ".updatedAt",
281
+ expected: "number",
282
+ value: input.updatedAt
283
+ }, _errorFactory)) && (undefined === input.projectId || "string" === typeof input.projectId || __typia_transform__assertGuard._assertGuard(_exceptionable, {
284
+ method: "typia.createAssert",
285
+ path: _path + ".projectId",
286
+ expected: "(string | undefined)",
287
+ value: input.projectId
288
+ }, _errorFactory)); const _ao1 = (input: any, _path: string, _exceptionable: boolean = true): boolean => false === _exceptionable || Object.keys(input).every((key: any) => {
289
+ const value = input[key];
290
+ if (undefined === value)
291
+ return true;
292
+ return true;
293
+ }); const __is = (input: any): input is CardRecord => "object" === typeof input && null !== input && _io0(input); let _errorFactory: any; return (input: any, errorFactory?: (p: import("typia").TypeGuardError.IProps) => Error): CardRecord => {
294
+ if (false === __is(input)) {
295
+ _errorFactory = errorFactory;
296
+ ((input: any, _path: string, _exceptionable: boolean = true) => ("object" === typeof input && null !== input || __typia_transform__assertGuard._assertGuard(true, {
297
+ method: "typia.createAssert",
298
+ path: _path + "",
299
+ expected: "CardRecord",
300
+ value: input
301
+ }, _errorFactory)) && _ao0(input, _path + "", true) || __typia_transform__assertGuard._assertGuard(true, {
302
+ method: "typia.createAssert",
303
+ path: _path + "",
304
+ expected: "CardRecord",
305
+ value: input
306
+ }, _errorFactory))(input, "$input", true);
307
+ }
308
+ return input;
309
+ }; })();
310
+ // ── Material ──
311
+ export const validateMaterial = (() => { const _io0 = (input: any): boolean => "string" === typeof input.id && "string" === typeof input.name && "string" === typeof input.type && "string" === typeof input.mimeType && "number" === typeof input.size && "string" === typeof input.path && (undefined === input.content || "string" === typeof input.content) && "string" === typeof input.status && (Array.isArray(input.cardIds) && input.cardIds.every((elem: any) => "string" === typeof elem)) && "number" === typeof input.uploadedAt && (undefined === input.projectId || "string" === typeof input.projectId); const _vo0 = (input: any, _path: string, _exceptionable: boolean = true): boolean => ["string" === typeof input.id || _report(_exceptionable, {
312
+ path: _path + ".id",
313
+ expected: "string",
314
+ value: input.id
315
+ }), "string" === typeof input.name || _report(_exceptionable, {
316
+ path: _path + ".name",
317
+ expected: "string",
318
+ value: input.name
319
+ }), "string" === typeof input.type || _report(_exceptionable, {
320
+ path: _path + ".type",
321
+ expected: "string",
322
+ value: input.type
323
+ }), "string" === typeof input.mimeType || _report(_exceptionable, {
324
+ path: _path + ".mimeType",
325
+ expected: "string",
326
+ value: input.mimeType
327
+ }), "number" === typeof input.size || _report(_exceptionable, {
328
+ path: _path + ".size",
329
+ expected: "number",
330
+ value: input.size
331
+ }), "string" === typeof input.path || _report(_exceptionable, {
332
+ path: _path + ".path",
333
+ expected: "string",
334
+ value: input.path
335
+ }), undefined === input.content || "string" === typeof input.content || _report(_exceptionable, {
336
+ path: _path + ".content",
337
+ expected: "(string | undefined)",
338
+ value: input.content
339
+ }), "string" === typeof input.status || _report(_exceptionable, {
340
+ path: _path + ".status",
341
+ expected: "string",
342
+ value: input.status
343
+ }), (Array.isArray(input.cardIds) || _report(_exceptionable, {
344
+ path: _path + ".cardIds",
345
+ expected: "Array<string>",
346
+ value: input.cardIds
347
+ })) && input.cardIds.map((elem: any, _index2: number) => "string" === typeof elem || _report(_exceptionable, {
348
+ path: _path + ".cardIds[" + _index2 + "]",
349
+ expected: "string",
350
+ value: elem
351
+ })).every((flag: boolean) => flag) || _report(_exceptionable, {
352
+ path: _path + ".cardIds",
353
+ expected: "Array<string>",
354
+ value: input.cardIds
355
+ }), "number" === typeof input.uploadedAt || _report(_exceptionable, {
356
+ path: _path + ".uploadedAt",
357
+ expected: "number",
358
+ value: input.uploadedAt
359
+ }), undefined === input.projectId || "string" === typeof input.projectId || _report(_exceptionable, {
360
+ path: _path + ".projectId",
361
+ expected: "(string | undefined)",
362
+ value: input.projectId
363
+ })].every((flag: boolean) => flag); const __is = (input: any): input is MaterialRecord => "object" === typeof input && null !== input && _io0(input); let errors: any; let _report: any; return (input: any): import("typia").IValidation<MaterialRecord> => {
364
+ if (false === __is(input)) {
365
+ errors = [];
366
+ _report = (__typia_transform__validateReport._validateReport as any)(errors);
367
+ ((input: any, _path: string, _exceptionable: boolean = true) => ("object" === typeof input && null !== input || _report(true, {
368
+ path: _path + "",
369
+ expected: "MaterialRecord",
370
+ value: input
371
+ })) && _vo0(input, _path + "", true) || _report(true, {
372
+ path: _path + "",
373
+ expected: "MaterialRecord",
374
+ value: input
375
+ }))(input, "$input", true);
376
+ const success = 0 === errors.length;
377
+ return success ? {
378
+ success,
379
+ data: input
380
+ } : {
381
+ success,
382
+ errors,
383
+ data: input
384
+ } as any;
385
+ }
386
+ return {
387
+ success: true,
388
+ data: input
389
+ } as any;
390
+ }; })();
391
+ export const isMaterial = (() => { const _io0 = (input: any): boolean => "string" === typeof input.id && "string" === typeof input.name && "string" === typeof input.type && "string" === typeof input.mimeType && "number" === typeof input.size && "string" === typeof input.path && (undefined === input.content || "string" === typeof input.content) && "string" === typeof input.status && (Array.isArray(input.cardIds) && input.cardIds.every((elem: any) => "string" === typeof elem)) && "number" === typeof input.uploadedAt && (undefined === input.projectId || "string" === typeof input.projectId); return (input: any): input is MaterialRecord => "object" === typeof input && null !== input && _io0(input); })();
392
+ export const assertMaterial = (() => { const _io0 = (input: any): boolean => "string" === typeof input.id && "string" === typeof input.name && "string" === typeof input.type && "string" === typeof input.mimeType && "number" === typeof input.size && "string" === typeof input.path && (undefined === input.content || "string" === typeof input.content) && "string" === typeof input.status && (Array.isArray(input.cardIds) && input.cardIds.every((elem: any) => "string" === typeof elem)) && "number" === typeof input.uploadedAt && (undefined === input.projectId || "string" === typeof input.projectId); const _ao0 = (input: any, _path: string, _exceptionable: boolean = true): boolean => ("string" === typeof input.id || __typia_transform__assertGuard._assertGuard(_exceptionable, {
393
+ method: "typia.createAssert",
394
+ path: _path + ".id",
395
+ expected: "string",
396
+ value: input.id
397
+ }, _errorFactory)) && ("string" === typeof input.name || __typia_transform__assertGuard._assertGuard(_exceptionable, {
398
+ method: "typia.createAssert",
399
+ path: _path + ".name",
400
+ expected: "string",
401
+ value: input.name
402
+ }, _errorFactory)) && ("string" === typeof input.type || __typia_transform__assertGuard._assertGuard(_exceptionable, {
403
+ method: "typia.createAssert",
404
+ path: _path + ".type",
405
+ expected: "string",
406
+ value: input.type
407
+ }, _errorFactory)) && ("string" === typeof input.mimeType || __typia_transform__assertGuard._assertGuard(_exceptionable, {
408
+ method: "typia.createAssert",
409
+ path: _path + ".mimeType",
410
+ expected: "string",
411
+ value: input.mimeType
412
+ }, _errorFactory)) && ("number" === typeof input.size || __typia_transform__assertGuard._assertGuard(_exceptionable, {
413
+ method: "typia.createAssert",
414
+ path: _path + ".size",
415
+ expected: "number",
416
+ value: input.size
417
+ }, _errorFactory)) && ("string" === typeof input.path || __typia_transform__assertGuard._assertGuard(_exceptionable, {
418
+ method: "typia.createAssert",
419
+ path: _path + ".path",
420
+ expected: "string",
421
+ value: input.path
422
+ }, _errorFactory)) && (undefined === input.content || "string" === typeof input.content || __typia_transform__assertGuard._assertGuard(_exceptionable, {
423
+ method: "typia.createAssert",
424
+ path: _path + ".content",
425
+ expected: "(string | undefined)",
426
+ value: input.content
427
+ }, _errorFactory)) && ("string" === typeof input.status || __typia_transform__assertGuard._assertGuard(_exceptionable, {
428
+ method: "typia.createAssert",
429
+ path: _path + ".status",
430
+ expected: "string",
431
+ value: input.status
432
+ }, _errorFactory)) && ((Array.isArray(input.cardIds) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
433
+ method: "typia.createAssert",
434
+ path: _path + ".cardIds",
435
+ expected: "Array<string>",
436
+ value: input.cardIds
437
+ }, _errorFactory)) && input.cardIds.every((elem: any, _index2: number) => "string" === typeof elem || __typia_transform__assertGuard._assertGuard(_exceptionable, {
438
+ method: "typia.createAssert",
439
+ path: _path + ".cardIds[" + _index2 + "]",
440
+ expected: "string",
441
+ value: elem
442
+ }, _errorFactory)) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
443
+ method: "typia.createAssert",
444
+ path: _path + ".cardIds",
445
+ expected: "Array<string>",
446
+ value: input.cardIds
447
+ }, _errorFactory)) && ("number" === typeof input.uploadedAt || __typia_transform__assertGuard._assertGuard(_exceptionable, {
448
+ method: "typia.createAssert",
449
+ path: _path + ".uploadedAt",
450
+ expected: "number",
451
+ value: input.uploadedAt
452
+ }, _errorFactory)) && (undefined === input.projectId || "string" === typeof input.projectId || __typia_transform__assertGuard._assertGuard(_exceptionable, {
453
+ method: "typia.createAssert",
454
+ path: _path + ".projectId",
455
+ expected: "(string | undefined)",
456
+ value: input.projectId
457
+ }, _errorFactory)); const __is = (input: any): input is MaterialRecord => "object" === typeof input && null !== input && _io0(input); let _errorFactory: any; return (input: any, errorFactory?: (p: import("typia").TypeGuardError.IProps) => Error): MaterialRecord => {
458
+ if (false === __is(input)) {
459
+ _errorFactory = errorFactory;
460
+ ((input: any, _path: string, _exceptionable: boolean = true) => ("object" === typeof input && null !== input || __typia_transform__assertGuard._assertGuard(true, {
461
+ method: "typia.createAssert",
462
+ path: _path + "",
463
+ expected: "MaterialRecord",
464
+ value: input
465
+ }, _errorFactory)) && _ao0(input, _path + "", true) || __typia_transform__assertGuard._assertGuard(true, {
466
+ method: "typia.createAssert",
467
+ path: _path + "",
468
+ expected: "MaterialRecord",
469
+ value: input
470
+ }, _errorFactory))(input, "$input", true);
471
+ }
472
+ return input;
473
+ }; })();
474
+ // ── Deck ──
475
+ export const validateDeck = (() => { const _io0 = (input: any): boolean => "string" === typeof input.id && "string" === typeof input.title && "string" === typeof input.description && (Array.isArray(input.outline) && input.outline.every((elem: any) => "object" === typeof elem && null !== elem && _io1(elem))) && (null === input.theme || "object" === typeof input.theme && null !== input.theme && false === Array.isArray(input.theme) && _io2(input.theme)) && (undefined === input.autoCreatedReason || "string" === typeof input.autoCreatedReason) && "number" === typeof input.createdAt && "number" === typeof input.updatedAt && (undefined === input.projectId || "string" === typeof input.projectId); const _io1 = (input: any): boolean => "string" === typeof input.id && "number" === typeof input.slideIndex && "string" === typeof input.title && "string" === typeof input.type && (Array.isArray(input.keyPoints) && input.keyPoints.every((elem: any) => "string" === typeof elem)) && (Array.isArray(input.materialRefs) && input.materialRefs.every((elem: any) => "string" === typeof elem)) && (Array.isArray(input.cardRefs) && input.cardRefs.every((elem: any) => "string" === typeof elem)) && "string" === typeof input.notes; const _io2 = (input: any): boolean => (undefined === input.name || "string" === typeof input.name) && (undefined === input.appearance || "string" === typeof input.appearance) && (undefined === input.colorScheme || "object" === typeof input.colorScheme && null !== input.colorScheme && false === Array.isArray(input.colorScheme) && _io3(input.colorScheme)) && (undefined === input.fontScheme || "object" === typeof input.fontScheme && null !== input.fontScheme && false === Array.isArray(input.fontScheme) && _io3(input.fontScheme)); const _io3 = (input: any): boolean => Object.keys(input).every((key: any) => {
476
+ const value = input[key];
477
+ if (undefined === value)
478
+ return true;
479
+ return "string" === typeof value;
480
+ }); const _vo0 = (input: any, _path: string, _exceptionable: boolean = true): boolean => ["string" === typeof input.id || _report(_exceptionable, {
481
+ path: _path + ".id",
482
+ expected: "string",
483
+ value: input.id
484
+ }), "string" === typeof input.title || _report(_exceptionable, {
485
+ path: _path + ".title",
486
+ expected: "string",
487
+ value: input.title
488
+ }), "string" === typeof input.description || _report(_exceptionable, {
489
+ path: _path + ".description",
490
+ expected: "string",
491
+ value: input.description
492
+ }), (Array.isArray(input.outline) || _report(_exceptionable, {
493
+ path: _path + ".outline",
494
+ expected: "Array<OutlineItemRecord>",
495
+ value: input.outline
496
+ })) && input.outline.map((elem: any, _index5: number) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
497
+ path: _path + ".outline[" + _index5 + "]",
498
+ expected: "OutlineItemRecord",
499
+ value: elem
500
+ })) && _vo1(elem, _path + ".outline[" + _index5 + "]", true && _exceptionable) || _report(_exceptionable, {
501
+ path: _path + ".outline[" + _index5 + "]",
502
+ expected: "OutlineItemRecord",
503
+ value: elem
504
+ })).every((flag: boolean) => flag) || _report(_exceptionable, {
505
+ path: _path + ".outline",
506
+ expected: "Array<OutlineItemRecord>",
507
+ value: input.outline
508
+ }), null === input.theme || ("object" === typeof input.theme && null !== input.theme && false === Array.isArray(input.theme) || _report(_exceptionable, {
509
+ path: _path + ".theme",
510
+ expected: "(ThemeRefRecord | null)",
511
+ value: input.theme
512
+ })) && _vo2(input.theme, _path + ".theme", true && _exceptionable) || _report(_exceptionable, {
513
+ path: _path + ".theme",
514
+ expected: "(ThemeRefRecord | null)",
515
+ value: input.theme
516
+ }), undefined === input.autoCreatedReason || "string" === typeof input.autoCreatedReason || _report(_exceptionable, {
517
+ path: _path + ".autoCreatedReason",
518
+ expected: "(string | undefined)",
519
+ value: input.autoCreatedReason
520
+ }), "number" === typeof input.createdAt || _report(_exceptionable, {
521
+ path: _path + ".createdAt",
522
+ expected: "number",
523
+ value: input.createdAt
524
+ }), "number" === typeof input.updatedAt || _report(_exceptionable, {
525
+ path: _path + ".updatedAt",
526
+ expected: "number",
527
+ value: input.updatedAt
528
+ }), undefined === input.projectId || "string" === typeof input.projectId || _report(_exceptionable, {
529
+ path: _path + ".projectId",
530
+ expected: "(string | undefined)",
531
+ value: input.projectId
532
+ })].every((flag: boolean) => flag); const _vo1 = (input: any, _path: string, _exceptionable: boolean = true): boolean => ["string" === typeof input.id || _report(_exceptionable, {
533
+ path: _path + ".id",
534
+ expected: "string",
535
+ value: input.id
536
+ }), "number" === typeof input.slideIndex || _report(_exceptionable, {
537
+ path: _path + ".slideIndex",
538
+ expected: "number",
539
+ value: input.slideIndex
540
+ }), "string" === typeof input.title || _report(_exceptionable, {
541
+ path: _path + ".title",
542
+ expected: "string",
543
+ value: input.title
544
+ }), "string" === typeof input.type || _report(_exceptionable, {
545
+ path: _path + ".type",
546
+ expected: "string",
547
+ value: input.type
548
+ }), (Array.isArray(input.keyPoints) || _report(_exceptionable, {
549
+ path: _path + ".keyPoints",
550
+ expected: "Array<string>",
551
+ value: input.keyPoints
552
+ })) && input.keyPoints.map((elem: any, _index6: number) => "string" === typeof elem || _report(_exceptionable, {
553
+ path: _path + ".keyPoints[" + _index6 + "]",
554
+ expected: "string",
555
+ value: elem
556
+ })).every((flag: boolean) => flag) || _report(_exceptionable, {
557
+ path: _path + ".keyPoints",
558
+ expected: "Array<string>",
559
+ value: input.keyPoints
560
+ }), (Array.isArray(input.materialRefs) || _report(_exceptionable, {
561
+ path: _path + ".materialRefs",
562
+ expected: "Array<string>",
563
+ value: input.materialRefs
564
+ })) && input.materialRefs.map((elem: any, _index7: number) => "string" === typeof elem || _report(_exceptionable, {
565
+ path: _path + ".materialRefs[" + _index7 + "]",
566
+ expected: "string",
567
+ value: elem
568
+ })).every((flag: boolean) => flag) || _report(_exceptionable, {
569
+ path: _path + ".materialRefs",
570
+ expected: "Array<string>",
571
+ value: input.materialRefs
572
+ }), (Array.isArray(input.cardRefs) || _report(_exceptionable, {
573
+ path: _path + ".cardRefs",
574
+ expected: "Array<string>",
575
+ value: input.cardRefs
576
+ })) && input.cardRefs.map((elem: any, _index8: number) => "string" === typeof elem || _report(_exceptionable, {
577
+ path: _path + ".cardRefs[" + _index8 + "]",
578
+ expected: "string",
579
+ value: elem
580
+ })).every((flag: boolean) => flag) || _report(_exceptionable, {
581
+ path: _path + ".cardRefs",
582
+ expected: "Array<string>",
583
+ value: input.cardRefs
584
+ }), "string" === typeof input.notes || _report(_exceptionable, {
585
+ path: _path + ".notes",
586
+ expected: "string",
587
+ value: input.notes
588
+ })].every((flag: boolean) => flag); const _vo2 = (input: any, _path: string, _exceptionable: boolean = true): boolean => [undefined === input.name || "string" === typeof input.name || _report(_exceptionable, {
589
+ path: _path + ".name",
590
+ expected: "(string | undefined)",
591
+ value: input.name
592
+ }), undefined === input.appearance || "string" === typeof input.appearance || _report(_exceptionable, {
593
+ path: _path + ".appearance",
594
+ expected: "(string | undefined)",
595
+ value: input.appearance
596
+ }), undefined === input.colorScheme || ("object" === typeof input.colorScheme && null !== input.colorScheme && false === Array.isArray(input.colorScheme) || _report(_exceptionable, {
597
+ path: _path + ".colorScheme",
598
+ expected: "(Record<string, string> | undefined)",
599
+ value: input.colorScheme
600
+ })) && _vo3(input.colorScheme, _path + ".colorScheme", true && _exceptionable) || _report(_exceptionable, {
601
+ path: _path + ".colorScheme",
602
+ expected: "(Record<string, string> | undefined)",
603
+ value: input.colorScheme
604
+ }), undefined === input.fontScheme || ("object" === typeof input.fontScheme && null !== input.fontScheme && false === Array.isArray(input.fontScheme) || _report(_exceptionable, {
605
+ path: _path + ".fontScheme",
606
+ expected: "(Record<string, string> | undefined)",
607
+ value: input.fontScheme
608
+ })) && _vo3(input.fontScheme, _path + ".fontScheme", true && _exceptionable) || _report(_exceptionable, {
609
+ path: _path + ".fontScheme",
610
+ expected: "(Record<string, string> | undefined)",
611
+ value: input.fontScheme
612
+ })].every((flag: boolean) => flag); const _vo3 = (input: any, _path: string, _exceptionable: boolean = true): boolean => [false === _exceptionable || Object.keys(input).map((key: any) => {
613
+ const value = input[key];
614
+ if (undefined === value)
615
+ return true;
616
+ return "string" === typeof value || _report(_exceptionable, {
617
+ path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
618
+ expected: "string",
619
+ value: value
620
+ });
621
+ }).every((flag: boolean) => flag)].every((flag: boolean) => flag); const __is = (input: any): input is DeckRecord => "object" === typeof input && null !== input && _io0(input); let errors: any; let _report: any; return (input: any): import("typia").IValidation<DeckRecord> => {
622
+ if (false === __is(input)) {
623
+ errors = [];
624
+ _report = (__typia_transform__validateReport._validateReport as any)(errors);
625
+ ((input: any, _path: string, _exceptionable: boolean = true) => ("object" === typeof input && null !== input || _report(true, {
626
+ path: _path + "",
627
+ expected: "DeckRecord",
628
+ value: input
629
+ })) && _vo0(input, _path + "", true) || _report(true, {
630
+ path: _path + "",
631
+ expected: "DeckRecord",
632
+ value: input
633
+ }))(input, "$input", true);
634
+ const success = 0 === errors.length;
635
+ return success ? {
636
+ success,
637
+ data: input
638
+ } : {
639
+ success,
640
+ errors,
641
+ data: input
642
+ } as any;
643
+ }
644
+ return {
645
+ success: true,
646
+ data: input
647
+ } as any;
648
+ }; })();
649
+ export const isDeck = (() => { const _io0 = (input: any): boolean => "string" === typeof input.id && "string" === typeof input.title && "string" === typeof input.description && (Array.isArray(input.outline) && input.outline.every((elem: any) => "object" === typeof elem && null !== elem && _io1(elem))) && (null === input.theme || "object" === typeof input.theme && null !== input.theme && false === Array.isArray(input.theme) && _io2(input.theme)) && (undefined === input.autoCreatedReason || "string" === typeof input.autoCreatedReason) && "number" === typeof input.createdAt && "number" === typeof input.updatedAt && (undefined === input.projectId || "string" === typeof input.projectId); const _io1 = (input: any): boolean => "string" === typeof input.id && "number" === typeof input.slideIndex && "string" === typeof input.title && "string" === typeof input.type && (Array.isArray(input.keyPoints) && input.keyPoints.every((elem: any) => "string" === typeof elem)) && (Array.isArray(input.materialRefs) && input.materialRefs.every((elem: any) => "string" === typeof elem)) && (Array.isArray(input.cardRefs) && input.cardRefs.every((elem: any) => "string" === typeof elem)) && "string" === typeof input.notes; const _io2 = (input: any): boolean => (undefined === input.name || "string" === typeof input.name) && (undefined === input.appearance || "string" === typeof input.appearance) && (undefined === input.colorScheme || "object" === typeof input.colorScheme && null !== input.colorScheme && false === Array.isArray(input.colorScheme) && _io3(input.colorScheme)) && (undefined === input.fontScheme || "object" === typeof input.fontScheme && null !== input.fontScheme && false === Array.isArray(input.fontScheme) && _io3(input.fontScheme)); const _io3 = (input: any): boolean => Object.keys(input).every((key: any) => {
650
+ const value = input[key];
651
+ if (undefined === value)
652
+ return true;
653
+ return "string" === typeof value;
654
+ }); return (input: any): input is DeckRecord => "object" === typeof input && null !== input && _io0(input); })();
655
+ export const assertDeck = (() => { const _io0 = (input: any): boolean => "string" === typeof input.id && "string" === typeof input.title && "string" === typeof input.description && (Array.isArray(input.outline) && input.outline.every((elem: any) => "object" === typeof elem && null !== elem && _io1(elem))) && (null === input.theme || "object" === typeof input.theme && null !== input.theme && false === Array.isArray(input.theme) && _io2(input.theme)) && (undefined === input.autoCreatedReason || "string" === typeof input.autoCreatedReason) && "number" === typeof input.createdAt && "number" === typeof input.updatedAt && (undefined === input.projectId || "string" === typeof input.projectId); const _io1 = (input: any): boolean => "string" === typeof input.id && "number" === typeof input.slideIndex && "string" === typeof input.title && "string" === typeof input.type && (Array.isArray(input.keyPoints) && input.keyPoints.every((elem: any) => "string" === typeof elem)) && (Array.isArray(input.materialRefs) && input.materialRefs.every((elem: any) => "string" === typeof elem)) && (Array.isArray(input.cardRefs) && input.cardRefs.every((elem: any) => "string" === typeof elem)) && "string" === typeof input.notes; const _io2 = (input: any): boolean => (undefined === input.name || "string" === typeof input.name) && (undefined === input.appearance || "string" === typeof input.appearance) && (undefined === input.colorScheme || "object" === typeof input.colorScheme && null !== input.colorScheme && false === Array.isArray(input.colorScheme) && _io3(input.colorScheme)) && (undefined === input.fontScheme || "object" === typeof input.fontScheme && null !== input.fontScheme && false === Array.isArray(input.fontScheme) && _io3(input.fontScheme)); const _io3 = (input: any): boolean => Object.keys(input).every((key: any) => {
656
+ const value = input[key];
657
+ if (undefined === value)
658
+ return true;
659
+ return "string" === typeof value;
660
+ }); const _ao0 = (input: any, _path: string, _exceptionable: boolean = true): boolean => ("string" === typeof input.id || __typia_transform__assertGuard._assertGuard(_exceptionable, {
661
+ method: "typia.createAssert",
662
+ path: _path + ".id",
663
+ expected: "string",
664
+ value: input.id
665
+ }, _errorFactory)) && ("string" === typeof input.title || __typia_transform__assertGuard._assertGuard(_exceptionable, {
666
+ method: "typia.createAssert",
667
+ path: _path + ".title",
668
+ expected: "string",
669
+ value: input.title
670
+ }, _errorFactory)) && ("string" === typeof input.description || __typia_transform__assertGuard._assertGuard(_exceptionable, {
671
+ method: "typia.createAssert",
672
+ path: _path + ".description",
673
+ expected: "string",
674
+ value: input.description
675
+ }, _errorFactory)) && ((Array.isArray(input.outline) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
676
+ method: "typia.createAssert",
677
+ path: _path + ".outline",
678
+ expected: "Array<OutlineItemRecord>",
679
+ value: input.outline
680
+ }, _errorFactory)) && input.outline.every((elem: any, _index5: number) => ("object" === typeof elem && null !== elem || __typia_transform__assertGuard._assertGuard(_exceptionable, {
681
+ method: "typia.createAssert",
682
+ path: _path + ".outline[" + _index5 + "]",
683
+ expected: "OutlineItemRecord",
684
+ value: elem
685
+ }, _errorFactory)) && _ao1(elem, _path + ".outline[" + _index5 + "]", true && _exceptionable) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
686
+ method: "typia.createAssert",
687
+ path: _path + ".outline[" + _index5 + "]",
688
+ expected: "OutlineItemRecord",
689
+ value: elem
690
+ }, _errorFactory)) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
691
+ method: "typia.createAssert",
692
+ path: _path + ".outline",
693
+ expected: "Array<OutlineItemRecord>",
694
+ value: input.outline
695
+ }, _errorFactory)) && (null === input.theme || ("object" === typeof input.theme && null !== input.theme && false === Array.isArray(input.theme) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
696
+ method: "typia.createAssert",
697
+ path: _path + ".theme",
698
+ expected: "(ThemeRefRecord | null)",
699
+ value: input.theme
700
+ }, _errorFactory)) && _ao2(input.theme, _path + ".theme", true && _exceptionable) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
701
+ method: "typia.createAssert",
702
+ path: _path + ".theme",
703
+ expected: "(ThemeRefRecord | null)",
704
+ value: input.theme
705
+ }, _errorFactory)) && (undefined === input.autoCreatedReason || "string" === typeof input.autoCreatedReason || __typia_transform__assertGuard._assertGuard(_exceptionable, {
706
+ method: "typia.createAssert",
707
+ path: _path + ".autoCreatedReason",
708
+ expected: "(string | undefined)",
709
+ value: input.autoCreatedReason
710
+ }, _errorFactory)) && ("number" === typeof input.createdAt || __typia_transform__assertGuard._assertGuard(_exceptionable, {
711
+ method: "typia.createAssert",
712
+ path: _path + ".createdAt",
713
+ expected: "number",
714
+ value: input.createdAt
715
+ }, _errorFactory)) && ("number" === typeof input.updatedAt || __typia_transform__assertGuard._assertGuard(_exceptionable, {
716
+ method: "typia.createAssert",
717
+ path: _path + ".updatedAt",
718
+ expected: "number",
719
+ value: input.updatedAt
720
+ }, _errorFactory)) && (undefined === input.projectId || "string" === typeof input.projectId || __typia_transform__assertGuard._assertGuard(_exceptionable, {
721
+ method: "typia.createAssert",
722
+ path: _path + ".projectId",
723
+ expected: "(string | undefined)",
724
+ value: input.projectId
725
+ }, _errorFactory)); const _ao1 = (input: any, _path: string, _exceptionable: boolean = true): boolean => ("string" === typeof input.id || __typia_transform__assertGuard._assertGuard(_exceptionable, {
726
+ method: "typia.createAssert",
727
+ path: _path + ".id",
728
+ expected: "string",
729
+ value: input.id
730
+ }, _errorFactory)) && ("number" === typeof input.slideIndex || __typia_transform__assertGuard._assertGuard(_exceptionable, {
731
+ method: "typia.createAssert",
732
+ path: _path + ".slideIndex",
733
+ expected: "number",
734
+ value: input.slideIndex
735
+ }, _errorFactory)) && ("string" === typeof input.title || __typia_transform__assertGuard._assertGuard(_exceptionable, {
736
+ method: "typia.createAssert",
737
+ path: _path + ".title",
738
+ expected: "string",
739
+ value: input.title
740
+ }, _errorFactory)) && ("string" === typeof input.type || __typia_transform__assertGuard._assertGuard(_exceptionable, {
741
+ method: "typia.createAssert",
742
+ path: _path + ".type",
743
+ expected: "string",
744
+ value: input.type
745
+ }, _errorFactory)) && ((Array.isArray(input.keyPoints) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
746
+ method: "typia.createAssert",
747
+ path: _path + ".keyPoints",
748
+ expected: "Array<string>",
749
+ value: input.keyPoints
750
+ }, _errorFactory)) && input.keyPoints.every((elem: any, _index6: number) => "string" === typeof elem || __typia_transform__assertGuard._assertGuard(_exceptionable, {
751
+ method: "typia.createAssert",
752
+ path: _path + ".keyPoints[" + _index6 + "]",
753
+ expected: "string",
754
+ value: elem
755
+ }, _errorFactory)) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
756
+ method: "typia.createAssert",
757
+ path: _path + ".keyPoints",
758
+ expected: "Array<string>",
759
+ value: input.keyPoints
760
+ }, _errorFactory)) && ((Array.isArray(input.materialRefs) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
761
+ method: "typia.createAssert",
762
+ path: _path + ".materialRefs",
763
+ expected: "Array<string>",
764
+ value: input.materialRefs
765
+ }, _errorFactory)) && input.materialRefs.every((elem: any, _index7: number) => "string" === typeof elem || __typia_transform__assertGuard._assertGuard(_exceptionable, {
766
+ method: "typia.createAssert",
767
+ path: _path + ".materialRefs[" + _index7 + "]",
768
+ expected: "string",
769
+ value: elem
770
+ }, _errorFactory)) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
771
+ method: "typia.createAssert",
772
+ path: _path + ".materialRefs",
773
+ expected: "Array<string>",
774
+ value: input.materialRefs
775
+ }, _errorFactory)) && ((Array.isArray(input.cardRefs) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
776
+ method: "typia.createAssert",
777
+ path: _path + ".cardRefs",
778
+ expected: "Array<string>",
779
+ value: input.cardRefs
780
+ }, _errorFactory)) && input.cardRefs.every((elem: any, _index8: number) => "string" === typeof elem || __typia_transform__assertGuard._assertGuard(_exceptionable, {
781
+ method: "typia.createAssert",
782
+ path: _path + ".cardRefs[" + _index8 + "]",
783
+ expected: "string",
784
+ value: elem
785
+ }, _errorFactory)) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
786
+ method: "typia.createAssert",
787
+ path: _path + ".cardRefs",
788
+ expected: "Array<string>",
789
+ value: input.cardRefs
790
+ }, _errorFactory)) && ("string" === typeof input.notes || __typia_transform__assertGuard._assertGuard(_exceptionable, {
791
+ method: "typia.createAssert",
792
+ path: _path + ".notes",
793
+ expected: "string",
794
+ value: input.notes
795
+ }, _errorFactory)); const _ao2 = (input: any, _path: string, _exceptionable: boolean = true): boolean => (undefined === input.name || "string" === typeof input.name || __typia_transform__assertGuard._assertGuard(_exceptionable, {
796
+ method: "typia.createAssert",
797
+ path: _path + ".name",
798
+ expected: "(string | undefined)",
799
+ value: input.name
800
+ }, _errorFactory)) && (undefined === input.appearance || "string" === typeof input.appearance || __typia_transform__assertGuard._assertGuard(_exceptionable, {
801
+ method: "typia.createAssert",
802
+ path: _path + ".appearance",
803
+ expected: "(string | undefined)",
804
+ value: input.appearance
805
+ }, _errorFactory)) && (undefined === input.colorScheme || ("object" === typeof input.colorScheme && null !== input.colorScheme && false === Array.isArray(input.colorScheme) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
806
+ method: "typia.createAssert",
807
+ path: _path + ".colorScheme",
808
+ expected: "(Record<string, string> | undefined)",
809
+ value: input.colorScheme
810
+ }, _errorFactory)) && _ao3(input.colorScheme, _path + ".colorScheme", true && _exceptionable) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
811
+ method: "typia.createAssert",
812
+ path: _path + ".colorScheme",
813
+ expected: "(Record<string, string> | undefined)",
814
+ value: input.colorScheme
815
+ }, _errorFactory)) && (undefined === input.fontScheme || ("object" === typeof input.fontScheme && null !== input.fontScheme && false === Array.isArray(input.fontScheme) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
816
+ method: "typia.createAssert",
817
+ path: _path + ".fontScheme",
818
+ expected: "(Record<string, string> | undefined)",
819
+ value: input.fontScheme
820
+ }, _errorFactory)) && _ao3(input.fontScheme, _path + ".fontScheme", true && _exceptionable) || __typia_transform__assertGuard._assertGuard(_exceptionable, {
821
+ method: "typia.createAssert",
822
+ path: _path + ".fontScheme",
823
+ expected: "(Record<string, string> | undefined)",
824
+ value: input.fontScheme
825
+ }, _errorFactory)); const _ao3 = (input: any, _path: string, _exceptionable: boolean = true): boolean => false === _exceptionable || Object.keys(input).every((key: any) => {
826
+ const value = input[key];
827
+ if (undefined === value)
828
+ return true;
829
+ return "string" === typeof value || __typia_transform__assertGuard._assertGuard(_exceptionable, {
830
+ method: "typia.createAssert",
831
+ path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
832
+ expected: "string",
833
+ value: value
834
+ }, _errorFactory);
835
+ }); const __is = (input: any): input is DeckRecord => "object" === typeof input && null !== input && _io0(input); let _errorFactory: any; return (input: any, errorFactory?: (p: import("typia").TypeGuardError.IProps) => Error): DeckRecord => {
836
+ if (false === __is(input)) {
837
+ _errorFactory = errorFactory;
838
+ ((input: any, _path: string, _exceptionable: boolean = true) => ("object" === typeof input && null !== input || __typia_transform__assertGuard._assertGuard(true, {
839
+ method: "typia.createAssert",
840
+ path: _path + "",
841
+ expected: "DeckRecord",
842
+ value: input
843
+ }, _errorFactory)) && _ao0(input, _path + "", true) || __typia_transform__assertGuard._assertGuard(true, {
844
+ method: "typia.createAssert",
845
+ path: _path + "",
846
+ expected: "DeckRecord",
847
+ value: input
848
+ }, _errorFactory))(input, "$input", true);
849
+ }
850
+ return input;
851
+ }; })();
852
+ // ── Skill ──
853
+ export const validateSkill = (() => { const _io0 = (input: any): boolean => "string" === typeof input.id && "string" === typeof input.name && "string" === typeof input.emoji && "string" === typeof input.category && "string" === typeof input.description && "boolean" === typeof input.builtin && "string" === typeof input.status && "string" === typeof input.version && (undefined === input.skillPath || "string" === typeof input.skillPath) && (undefined === input.source || "string" === typeof input.source); const _vo0 = (input: any, _path: string, _exceptionable: boolean = true): boolean => ["string" === typeof input.id || _report(_exceptionable, {
854
+ path: _path + ".id",
855
+ expected: "string",
856
+ value: input.id
857
+ }), "string" === typeof input.name || _report(_exceptionable, {
858
+ path: _path + ".name",
859
+ expected: "string",
860
+ value: input.name
861
+ }), "string" === typeof input.emoji || _report(_exceptionable, {
862
+ path: _path + ".emoji",
863
+ expected: "string",
864
+ value: input.emoji
865
+ }), "string" === typeof input.category || _report(_exceptionable, {
866
+ path: _path + ".category",
867
+ expected: "string",
868
+ value: input.category
869
+ }), "string" === typeof input.description || _report(_exceptionable, {
870
+ path: _path + ".description",
871
+ expected: "string",
872
+ value: input.description
873
+ }), "boolean" === typeof input.builtin || _report(_exceptionable, {
874
+ path: _path + ".builtin",
875
+ expected: "boolean",
876
+ value: input.builtin
877
+ }), "string" === typeof input.status || _report(_exceptionable, {
878
+ path: _path + ".status",
879
+ expected: "string",
880
+ value: input.status
881
+ }), "string" === typeof input.version || _report(_exceptionable, {
882
+ path: _path + ".version",
883
+ expected: "string",
884
+ value: input.version
885
+ }), undefined === input.skillPath || "string" === typeof input.skillPath || _report(_exceptionable, {
886
+ path: _path + ".skillPath",
887
+ expected: "(string | undefined)",
888
+ value: input.skillPath
889
+ }), undefined === input.source || "string" === typeof input.source || _report(_exceptionable, {
890
+ path: _path + ".source",
891
+ expected: "(string | undefined)",
892
+ value: input.source
893
+ })].every((flag: boolean) => flag); const __is = (input: any): input is SkillRecord => "object" === typeof input && null !== input && _io0(input); let errors: any; let _report: any; return (input: any): import("typia").IValidation<SkillRecord> => {
894
+ if (false === __is(input)) {
895
+ errors = [];
896
+ _report = (__typia_transform__validateReport._validateReport as any)(errors);
897
+ ((input: any, _path: string, _exceptionable: boolean = true) => ("object" === typeof input && null !== input || _report(true, {
898
+ path: _path + "",
899
+ expected: "SkillRecord",
900
+ value: input
901
+ })) && _vo0(input, _path + "", true) || _report(true, {
902
+ path: _path + "",
903
+ expected: "SkillRecord",
904
+ value: input
905
+ }))(input, "$input", true);
906
+ const success = 0 === errors.length;
907
+ return success ? {
908
+ success,
909
+ data: input
910
+ } : {
911
+ success,
912
+ errors,
913
+ data: input
914
+ } as any;
915
+ }
916
+ return {
917
+ success: true,
918
+ data: input
919
+ } as any;
920
+ }; })();
921
+ export const isSkill = (() => { const _io0 = (input: any): boolean => "string" === typeof input.id && "string" === typeof input.name && "string" === typeof input.emoji && "string" === typeof input.category && "string" === typeof input.description && "boolean" === typeof input.builtin && "string" === typeof input.status && "string" === typeof input.version && (undefined === input.skillPath || "string" === typeof input.skillPath) && (undefined === input.source || "string" === typeof input.source); return (input: any): input is SkillRecord => "object" === typeof input && null !== input && _io0(input); })();
922
+ // ── Settings ──
923
+ export const validateUserSettings = (() => { const _io0 = (input: any): boolean => "string" === typeof input.displayName && "string" === typeof input.language && "string" === typeof input.aiLanguage && (Array.isArray(input.defaultResearchGoals) && input.defaultResearchGoals.every((elem: any) => "string" === typeof elem)) && "boolean" === typeof input.autoCurate && "boolean" === typeof input.autoPipeline && "boolean" === typeof input.notifications && "boolean" === typeof input.autoInspire && "boolean" === typeof input.autoResearch && "number" === typeof input.heartbeatInterval && "boolean" === typeof input.autoConsumeTodos; const _vo0 = (input: any, _path: string, _exceptionable: boolean = true): boolean => ["string" === typeof input.displayName || _report(_exceptionable, {
924
+ path: _path + ".displayName",
925
+ expected: "string",
926
+ value: input.displayName
927
+ }), "string" === typeof input.language || _report(_exceptionable, {
928
+ path: _path + ".language",
929
+ expected: "string",
930
+ value: input.language
931
+ }), "string" === typeof input.aiLanguage || _report(_exceptionable, {
932
+ path: _path + ".aiLanguage",
933
+ expected: "string",
934
+ value: input.aiLanguage
935
+ }), (Array.isArray(input.defaultResearchGoals) || _report(_exceptionable, {
936
+ path: _path + ".defaultResearchGoals",
937
+ expected: "Array<string>",
938
+ value: input.defaultResearchGoals
939
+ })) && input.defaultResearchGoals.map((elem: any, _index2: number) => "string" === typeof elem || _report(_exceptionable, {
940
+ path: _path + ".defaultResearchGoals[" + _index2 + "]",
941
+ expected: "string",
942
+ value: elem
943
+ })).every((flag: boolean) => flag) || _report(_exceptionable, {
944
+ path: _path + ".defaultResearchGoals",
945
+ expected: "Array<string>",
946
+ value: input.defaultResearchGoals
947
+ }), "boolean" === typeof input.autoCurate || _report(_exceptionable, {
948
+ path: _path + ".autoCurate",
949
+ expected: "boolean",
950
+ value: input.autoCurate
951
+ }), "boolean" === typeof input.autoPipeline || _report(_exceptionable, {
952
+ path: _path + ".autoPipeline",
953
+ expected: "boolean",
954
+ value: input.autoPipeline
955
+ }), "boolean" === typeof input.notifications || _report(_exceptionable, {
956
+ path: _path + ".notifications",
957
+ expected: "boolean",
958
+ value: input.notifications
959
+ }), "boolean" === typeof input.autoInspire || _report(_exceptionable, {
960
+ path: _path + ".autoInspire",
961
+ expected: "boolean",
962
+ value: input.autoInspire
963
+ }), "boolean" === typeof input.autoResearch || _report(_exceptionable, {
964
+ path: _path + ".autoResearch",
965
+ expected: "boolean",
966
+ value: input.autoResearch
967
+ }), "number" === typeof input.heartbeatInterval || _report(_exceptionable, {
968
+ path: _path + ".heartbeatInterval",
969
+ expected: "number",
970
+ value: input.heartbeatInterval
971
+ }), "boolean" === typeof input.autoConsumeTodos || _report(_exceptionable, {
972
+ path: _path + ".autoConsumeTodos",
973
+ expected: "boolean",
974
+ value: input.autoConsumeTodos
975
+ })].every((flag: boolean) => flag); const __is = (input: any): input is UserSettings => "object" === typeof input && null !== input && _io0(input); let errors: any; let _report: any; return (input: any): import("typia").IValidation<UserSettings> => {
976
+ if (false === __is(input)) {
977
+ errors = [];
978
+ _report = (__typia_transform__validateReport._validateReport as any)(errors);
979
+ ((input: any, _path: string, _exceptionable: boolean = true) => ("object" === typeof input && null !== input || _report(true, {
980
+ path: _path + "",
981
+ expected: "UserSettings",
982
+ value: input
983
+ })) && _vo0(input, _path + "", true) || _report(true, {
984
+ path: _path + "",
985
+ expected: "UserSettings",
986
+ value: input
987
+ }))(input, "$input", true);
988
+ const success = 0 === errors.length;
989
+ return success ? {
990
+ success,
991
+ data: input
992
+ } : {
993
+ success,
994
+ errors,
995
+ data: input
996
+ } as any;
997
+ }
998
+ return {
999
+ success: true,
1000
+ data: input
1001
+ } as any;
1002
+ }; })();
1003
+ export const validateAppSettings = (() => { const _io0 = (input: any): boolean => "object" === typeof input.userSettings && null !== input.userSettings && _io1(input.userSettings); const _io1 = (input: any): boolean => "string" === typeof input.displayName && "string" === typeof input.language && "string" === typeof input.aiLanguage && (Array.isArray(input.defaultResearchGoals) && input.defaultResearchGoals.every((elem: any) => "string" === typeof elem)) && "boolean" === typeof input.autoCurate && "boolean" === typeof input.autoPipeline && "boolean" === typeof input.notifications && "boolean" === typeof input.autoInspire && "boolean" === typeof input.autoResearch && "number" === typeof input.heartbeatInterval && "boolean" === typeof input.autoConsumeTodos; const _vo0 = (input: any, _path: string, _exceptionable: boolean = true): boolean => [("object" === typeof input.userSettings && null !== input.userSettings || _report(_exceptionable, {
1004
+ path: _path + ".userSettings",
1005
+ expected: "UserSettings",
1006
+ value: input.userSettings
1007
+ })) && _vo1(input.userSettings, _path + ".userSettings", true && _exceptionable) || _report(_exceptionable, {
1008
+ path: _path + ".userSettings",
1009
+ expected: "UserSettings",
1010
+ value: input.userSettings
1011
+ })].every((flag: boolean) => flag); const _vo1 = (input: any, _path: string, _exceptionable: boolean = true): boolean => ["string" === typeof input.displayName || _report(_exceptionable, {
1012
+ path: _path + ".displayName",
1013
+ expected: "string",
1014
+ value: input.displayName
1015
+ }), "string" === typeof input.language || _report(_exceptionable, {
1016
+ path: _path + ".language",
1017
+ expected: "string",
1018
+ value: input.language
1019
+ }), "string" === typeof input.aiLanguage || _report(_exceptionable, {
1020
+ path: _path + ".aiLanguage",
1021
+ expected: "string",
1022
+ value: input.aiLanguage
1023
+ }), (Array.isArray(input.defaultResearchGoals) || _report(_exceptionable, {
1024
+ path: _path + ".defaultResearchGoals",
1025
+ expected: "Array<string>",
1026
+ value: input.defaultResearchGoals
1027
+ })) && input.defaultResearchGoals.map((elem: any, _index2: number) => "string" === typeof elem || _report(_exceptionable, {
1028
+ path: _path + ".defaultResearchGoals[" + _index2 + "]",
1029
+ expected: "string",
1030
+ value: elem
1031
+ })).every((flag: boolean) => flag) || _report(_exceptionable, {
1032
+ path: _path + ".defaultResearchGoals",
1033
+ expected: "Array<string>",
1034
+ value: input.defaultResearchGoals
1035
+ }), "boolean" === typeof input.autoCurate || _report(_exceptionable, {
1036
+ path: _path + ".autoCurate",
1037
+ expected: "boolean",
1038
+ value: input.autoCurate
1039
+ }), "boolean" === typeof input.autoPipeline || _report(_exceptionable, {
1040
+ path: _path + ".autoPipeline",
1041
+ expected: "boolean",
1042
+ value: input.autoPipeline
1043
+ }), "boolean" === typeof input.notifications || _report(_exceptionable, {
1044
+ path: _path + ".notifications",
1045
+ expected: "boolean",
1046
+ value: input.notifications
1047
+ }), "boolean" === typeof input.autoInspire || _report(_exceptionable, {
1048
+ path: _path + ".autoInspire",
1049
+ expected: "boolean",
1050
+ value: input.autoInspire
1051
+ }), "boolean" === typeof input.autoResearch || _report(_exceptionable, {
1052
+ path: _path + ".autoResearch",
1053
+ expected: "boolean",
1054
+ value: input.autoResearch
1055
+ }), "number" === typeof input.heartbeatInterval || _report(_exceptionable, {
1056
+ path: _path + ".heartbeatInterval",
1057
+ expected: "number",
1058
+ value: input.heartbeatInterval
1059
+ }), "boolean" === typeof input.autoConsumeTodos || _report(_exceptionable, {
1060
+ path: _path + ".autoConsumeTodos",
1061
+ expected: "boolean",
1062
+ value: input.autoConsumeTodos
1063
+ })].every((flag: boolean) => flag); const __is = (input: any): input is AppSettings => "object" === typeof input && null !== input && _io0(input); let errors: any; let _report: any; return (input: any): import("typia").IValidation<AppSettings> => {
1064
+ if (false === __is(input)) {
1065
+ errors = [];
1066
+ _report = (__typia_transform__validateReport._validateReport as any)(errors);
1067
+ ((input: any, _path: string, _exceptionable: boolean = true) => ("object" === typeof input && null !== input || _report(true, {
1068
+ path: _path + "",
1069
+ expected: "AppSettings",
1070
+ value: input
1071
+ })) && _vo0(input, _path + "", true) || _report(true, {
1072
+ path: _path + "",
1073
+ expected: "AppSettings",
1074
+ value: input
1075
+ }))(input, "$input", true);
1076
+ const success = 0 === errors.length;
1077
+ return success ? {
1078
+ success,
1079
+ data: input
1080
+ } : {
1081
+ success,
1082
+ errors,
1083
+ data: input
1084
+ } as any;
1085
+ }
1086
+ return {
1087
+ success: true,
1088
+ data: input
1089
+ } as any;
1090
+ }; })();
1091
+ // ── Partial updates ──
1092
+ export const validatePartialCard = (() => { const _io0 = (input: any): boolean => (undefined === input.id || "string" === typeof input.id) && (undefined === input.kind || "string" === typeof input.kind) && (undefined === input.title || "string" === typeof input.title) && (undefined === input.summary || "string" === typeof input.summary) && (undefined === input.content || "string" === typeof input.content) && (null === input.sourceId || undefined === input.sourceId || "string" === typeof input.sourceId) && (undefined === input.linkedCardIds || Array.isArray(input.linkedCardIds) && input.linkedCardIds.every((elem: any) => "string" === typeof elem)) && (undefined === input.meta || "object" === typeof input.meta && null !== input.meta && false === Array.isArray(input.meta) && _io1(input.meta)) && (undefined === input.tags || Array.isArray(input.tags) && input.tags.every((elem: any) => "string" === typeof elem)) && (undefined === input.priority || "string" === typeof input.priority) && (undefined === input.autoGenerated || "boolean" === typeof input.autoGenerated) && (undefined === input.rating || "number" === typeof input.rating) && (undefined === input.deckIds || Array.isArray(input.deckIds) && input.deckIds.every((elem: any) => "string" === typeof elem)) && (undefined === input.filePath || "string" === typeof input.filePath) && (undefined === input.fileMime || "string" === typeof input.fileMime) && (undefined === input.createdAt || "number" === typeof input.createdAt) && (undefined === input.updatedAt || "number" === typeof input.updatedAt) && (undefined === input.projectId || "string" === typeof input.projectId); const _io1 = (input: any): boolean => Object.keys(input).every((key: any) => {
1093
+ const value = input[key];
1094
+ if (undefined === value)
1095
+ return true;
1096
+ return true;
1097
+ }); const _vo0 = (input: any, _path: string, _exceptionable: boolean = true): boolean => [undefined === input.id || "string" === typeof input.id || _report(_exceptionable, {
1098
+ path: _path + ".id",
1099
+ expected: "(string | undefined)",
1100
+ value: input.id
1101
+ }), undefined === input.kind || "string" === typeof input.kind || _report(_exceptionable, {
1102
+ path: _path + ".kind",
1103
+ expected: "(string | undefined)",
1104
+ value: input.kind
1105
+ }), undefined === input.title || "string" === typeof input.title || _report(_exceptionable, {
1106
+ path: _path + ".title",
1107
+ expected: "(string | undefined)",
1108
+ value: input.title
1109
+ }), undefined === input.summary || "string" === typeof input.summary || _report(_exceptionable, {
1110
+ path: _path + ".summary",
1111
+ expected: "(string | undefined)",
1112
+ value: input.summary
1113
+ }), undefined === input.content || "string" === typeof input.content || _report(_exceptionable, {
1114
+ path: _path + ".content",
1115
+ expected: "(string | undefined)",
1116
+ value: input.content
1117
+ }), null === input.sourceId || undefined === input.sourceId || "string" === typeof input.sourceId || _report(_exceptionable, {
1118
+ path: _path + ".sourceId",
1119
+ expected: "(null | string | undefined)",
1120
+ value: input.sourceId
1121
+ }), undefined === input.linkedCardIds || (Array.isArray(input.linkedCardIds) || _report(_exceptionable, {
1122
+ path: _path + ".linkedCardIds",
1123
+ expected: "(Array<string> | undefined)",
1124
+ value: input.linkedCardIds
1125
+ })) && input.linkedCardIds.map((elem: any, _index4: number) => "string" === typeof elem || _report(_exceptionable, {
1126
+ path: _path + ".linkedCardIds[" + _index4 + "]",
1127
+ expected: "string",
1128
+ value: elem
1129
+ })).every((flag: boolean) => flag) || _report(_exceptionable, {
1130
+ path: _path + ".linkedCardIds",
1131
+ expected: "(Array<string> | undefined)",
1132
+ value: input.linkedCardIds
1133
+ }), undefined === input.meta || ("object" === typeof input.meta && null !== input.meta && false === Array.isArray(input.meta) || _report(_exceptionable, {
1134
+ path: _path + ".meta",
1135
+ expected: "(Record<string, unknown> | undefined)",
1136
+ value: input.meta
1137
+ })) && _vo1(input.meta, _path + ".meta", true && _exceptionable) || _report(_exceptionable, {
1138
+ path: _path + ".meta",
1139
+ expected: "(Record<string, unknown> | undefined)",
1140
+ value: input.meta
1141
+ }), undefined === input.tags || (Array.isArray(input.tags) || _report(_exceptionable, {
1142
+ path: _path + ".tags",
1143
+ expected: "(Array<string> | undefined)",
1144
+ value: input.tags
1145
+ })) && input.tags.map((elem: any, _index5: number) => "string" === typeof elem || _report(_exceptionable, {
1146
+ path: _path + ".tags[" + _index5 + "]",
1147
+ expected: "string",
1148
+ value: elem
1149
+ })).every((flag: boolean) => flag) || _report(_exceptionable, {
1150
+ path: _path + ".tags",
1151
+ expected: "(Array<string> | undefined)",
1152
+ value: input.tags
1153
+ }), undefined === input.priority || "string" === typeof input.priority || _report(_exceptionable, {
1154
+ path: _path + ".priority",
1155
+ expected: "(string | undefined)",
1156
+ value: input.priority
1157
+ }), undefined === input.autoGenerated || "boolean" === typeof input.autoGenerated || _report(_exceptionable, {
1158
+ path: _path + ".autoGenerated",
1159
+ expected: "(boolean | undefined)",
1160
+ value: input.autoGenerated
1161
+ }), undefined === input.rating || "number" === typeof input.rating || _report(_exceptionable, {
1162
+ path: _path + ".rating",
1163
+ expected: "(number | undefined)",
1164
+ value: input.rating
1165
+ }), undefined === input.deckIds || (Array.isArray(input.deckIds) || _report(_exceptionable, {
1166
+ path: _path + ".deckIds",
1167
+ expected: "(Array<string> | undefined)",
1168
+ value: input.deckIds
1169
+ })) && input.deckIds.map((elem: any, _index6: number) => "string" === typeof elem || _report(_exceptionable, {
1170
+ path: _path + ".deckIds[" + _index6 + "]",
1171
+ expected: "string",
1172
+ value: elem
1173
+ })).every((flag: boolean) => flag) || _report(_exceptionable, {
1174
+ path: _path + ".deckIds",
1175
+ expected: "(Array<string> | undefined)",
1176
+ value: input.deckIds
1177
+ }), undefined === input.filePath || "string" === typeof input.filePath || _report(_exceptionable, {
1178
+ path: _path + ".filePath",
1179
+ expected: "(string | undefined)",
1180
+ value: input.filePath
1181
+ }), undefined === input.fileMime || "string" === typeof input.fileMime || _report(_exceptionable, {
1182
+ path: _path + ".fileMime",
1183
+ expected: "(string | undefined)",
1184
+ value: input.fileMime
1185
+ }), undefined === input.createdAt || "number" === typeof input.createdAt || _report(_exceptionable, {
1186
+ path: _path + ".createdAt",
1187
+ expected: "(number | undefined)",
1188
+ value: input.createdAt
1189
+ }), undefined === input.updatedAt || "number" === typeof input.updatedAt || _report(_exceptionable, {
1190
+ path: _path + ".updatedAt",
1191
+ expected: "(number | undefined)",
1192
+ value: input.updatedAt
1193
+ }), undefined === input.projectId || "string" === typeof input.projectId || _report(_exceptionable, {
1194
+ path: _path + ".projectId",
1195
+ expected: "(string | undefined)",
1196
+ value: input.projectId
1197
+ })].every((flag: boolean) => flag); const _vo1 = (input: any, _path: string, _exceptionable: boolean = true): boolean => [false === _exceptionable || Object.keys(input).map((key: any) => {
1198
+ const value = input[key];
1199
+ if (undefined === value)
1200
+ return true;
1201
+ return true;
1202
+ }).every((flag: boolean) => flag)].every((flag: boolean) => flag); const __is = (input: any): input is Partial<CardRecord> => "object" === typeof input && null !== input && false === Array.isArray(input) && _io0(input); let errors: any; let _report: any; return (input: any): import("typia").IValidation<Partial<CardRecord>> => {
1203
+ if (false === __is(input)) {
1204
+ errors = [];
1205
+ _report = (__typia_transform__validateReport._validateReport as any)(errors);
1206
+ ((input: any, _path: string, _exceptionable: boolean = true) => ("object" === typeof input && null !== input && false === Array.isArray(input) || _report(true, {
1207
+ path: _path + "",
1208
+ expected: "Partial<CardRecord>",
1209
+ value: input
1210
+ })) && _vo0(input, _path + "", true) || _report(true, {
1211
+ path: _path + "",
1212
+ expected: "Partial<CardRecord>",
1213
+ value: input
1214
+ }))(input, "$input", true);
1215
+ const success = 0 === errors.length;
1216
+ return success ? {
1217
+ success,
1218
+ data: input
1219
+ } : {
1220
+ success,
1221
+ errors,
1222
+ data: input
1223
+ } as any;
1224
+ }
1225
+ return {
1226
+ success: true,
1227
+ data: input
1228
+ } as any;
1229
+ }; })();
1230
+ export const validatePartialDeck = (() => { const _io0 = (input: any): boolean => (undefined === input.id || "string" === typeof input.id) && (undefined === input.title || "string" === typeof input.title) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.outline || Array.isArray(input.outline) && input.outline.every((elem: any) => "object" === typeof elem && null !== elem && _io1(elem))) && (null === input.theme || undefined === input.theme || "object" === typeof input.theme && null !== input.theme && false === Array.isArray(input.theme) && _io2(input.theme)) && (undefined === input.autoCreatedReason || "string" === typeof input.autoCreatedReason) && (undefined === input.createdAt || "number" === typeof input.createdAt) && (undefined === input.updatedAt || "number" === typeof input.updatedAt) && (undefined === input.projectId || "string" === typeof input.projectId); const _io1 = (input: any): boolean => "string" === typeof input.id && "number" === typeof input.slideIndex && "string" === typeof input.title && "string" === typeof input.type && (Array.isArray(input.keyPoints) && input.keyPoints.every((elem: any) => "string" === typeof elem)) && (Array.isArray(input.materialRefs) && input.materialRefs.every((elem: any) => "string" === typeof elem)) && (Array.isArray(input.cardRefs) && input.cardRefs.every((elem: any) => "string" === typeof elem)) && "string" === typeof input.notes; const _io2 = (input: any): boolean => (undefined === input.name || "string" === typeof input.name) && (undefined === input.appearance || "string" === typeof input.appearance) && (undefined === input.colorScheme || "object" === typeof input.colorScheme && null !== input.colorScheme && false === Array.isArray(input.colorScheme) && _io3(input.colorScheme)) && (undefined === input.fontScheme || "object" === typeof input.fontScheme && null !== input.fontScheme && false === Array.isArray(input.fontScheme) && _io3(input.fontScheme)); const _io3 = (input: any): boolean => Object.keys(input).every((key: any) => {
1231
+ const value = input[key];
1232
+ if (undefined === value)
1233
+ return true;
1234
+ return "string" === typeof value;
1235
+ }); const _vo0 = (input: any, _path: string, _exceptionable: boolean = true): boolean => [undefined === input.id || "string" === typeof input.id || _report(_exceptionable, {
1236
+ path: _path + ".id",
1237
+ expected: "(string | undefined)",
1238
+ value: input.id
1239
+ }), undefined === input.title || "string" === typeof input.title || _report(_exceptionable, {
1240
+ path: _path + ".title",
1241
+ expected: "(string | undefined)",
1242
+ value: input.title
1243
+ }), undefined === input.description || "string" === typeof input.description || _report(_exceptionable, {
1244
+ path: _path + ".description",
1245
+ expected: "(string | undefined)",
1246
+ value: input.description
1247
+ }), undefined === input.outline || (Array.isArray(input.outline) || _report(_exceptionable, {
1248
+ path: _path + ".outline",
1249
+ expected: "(Array<OutlineItemRecord> | undefined)",
1250
+ value: input.outline
1251
+ })) && input.outline.map((elem: any, _index5: number) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
1252
+ path: _path + ".outline[" + _index5 + "]",
1253
+ expected: "OutlineItemRecord",
1254
+ value: elem
1255
+ })) && _vo1(elem, _path + ".outline[" + _index5 + "]", true && _exceptionable) || _report(_exceptionable, {
1256
+ path: _path + ".outline[" + _index5 + "]",
1257
+ expected: "OutlineItemRecord",
1258
+ value: elem
1259
+ })).every((flag: boolean) => flag) || _report(_exceptionable, {
1260
+ path: _path + ".outline",
1261
+ expected: "(Array<OutlineItemRecord> | undefined)",
1262
+ value: input.outline
1263
+ }), null === input.theme || undefined === input.theme || ("object" === typeof input.theme && null !== input.theme && false === Array.isArray(input.theme) || _report(_exceptionable, {
1264
+ path: _path + ".theme",
1265
+ expected: "(ThemeRefRecord | null | undefined)",
1266
+ value: input.theme
1267
+ })) && _vo2(input.theme, _path + ".theme", true && _exceptionable) || _report(_exceptionable, {
1268
+ path: _path + ".theme",
1269
+ expected: "(ThemeRefRecord | null | undefined)",
1270
+ value: input.theme
1271
+ }), undefined === input.autoCreatedReason || "string" === typeof input.autoCreatedReason || _report(_exceptionable, {
1272
+ path: _path + ".autoCreatedReason",
1273
+ expected: "(string | undefined)",
1274
+ value: input.autoCreatedReason
1275
+ }), undefined === input.createdAt || "number" === typeof input.createdAt || _report(_exceptionable, {
1276
+ path: _path + ".createdAt",
1277
+ expected: "(number | undefined)",
1278
+ value: input.createdAt
1279
+ }), undefined === input.updatedAt || "number" === typeof input.updatedAt || _report(_exceptionable, {
1280
+ path: _path + ".updatedAt",
1281
+ expected: "(number | undefined)",
1282
+ value: input.updatedAt
1283
+ }), undefined === input.projectId || "string" === typeof input.projectId || _report(_exceptionable, {
1284
+ path: _path + ".projectId",
1285
+ expected: "(string | undefined)",
1286
+ value: input.projectId
1287
+ })].every((flag: boolean) => flag); const _vo1 = (input: any, _path: string, _exceptionable: boolean = true): boolean => ["string" === typeof input.id || _report(_exceptionable, {
1288
+ path: _path + ".id",
1289
+ expected: "string",
1290
+ value: input.id
1291
+ }), "number" === typeof input.slideIndex || _report(_exceptionable, {
1292
+ path: _path + ".slideIndex",
1293
+ expected: "number",
1294
+ value: input.slideIndex
1295
+ }), "string" === typeof input.title || _report(_exceptionable, {
1296
+ path: _path + ".title",
1297
+ expected: "string",
1298
+ value: input.title
1299
+ }), "string" === typeof input.type || _report(_exceptionable, {
1300
+ path: _path + ".type",
1301
+ expected: "string",
1302
+ value: input.type
1303
+ }), (Array.isArray(input.keyPoints) || _report(_exceptionable, {
1304
+ path: _path + ".keyPoints",
1305
+ expected: "Array<string>",
1306
+ value: input.keyPoints
1307
+ })) && input.keyPoints.map((elem: any, _index6: number) => "string" === typeof elem || _report(_exceptionable, {
1308
+ path: _path + ".keyPoints[" + _index6 + "]",
1309
+ expected: "string",
1310
+ value: elem
1311
+ })).every((flag: boolean) => flag) || _report(_exceptionable, {
1312
+ path: _path + ".keyPoints",
1313
+ expected: "Array<string>",
1314
+ value: input.keyPoints
1315
+ }), (Array.isArray(input.materialRefs) || _report(_exceptionable, {
1316
+ path: _path + ".materialRefs",
1317
+ expected: "Array<string>",
1318
+ value: input.materialRefs
1319
+ })) && input.materialRefs.map((elem: any, _index7: number) => "string" === typeof elem || _report(_exceptionable, {
1320
+ path: _path + ".materialRefs[" + _index7 + "]",
1321
+ expected: "string",
1322
+ value: elem
1323
+ })).every((flag: boolean) => flag) || _report(_exceptionable, {
1324
+ path: _path + ".materialRefs",
1325
+ expected: "Array<string>",
1326
+ value: input.materialRefs
1327
+ }), (Array.isArray(input.cardRefs) || _report(_exceptionable, {
1328
+ path: _path + ".cardRefs",
1329
+ expected: "Array<string>",
1330
+ value: input.cardRefs
1331
+ })) && input.cardRefs.map((elem: any, _index8: number) => "string" === typeof elem || _report(_exceptionable, {
1332
+ path: _path + ".cardRefs[" + _index8 + "]",
1333
+ expected: "string",
1334
+ value: elem
1335
+ })).every((flag: boolean) => flag) || _report(_exceptionable, {
1336
+ path: _path + ".cardRefs",
1337
+ expected: "Array<string>",
1338
+ value: input.cardRefs
1339
+ }), "string" === typeof input.notes || _report(_exceptionable, {
1340
+ path: _path + ".notes",
1341
+ expected: "string",
1342
+ value: input.notes
1343
+ })].every((flag: boolean) => flag); const _vo2 = (input: any, _path: string, _exceptionable: boolean = true): boolean => [undefined === input.name || "string" === typeof input.name || _report(_exceptionable, {
1344
+ path: _path + ".name",
1345
+ expected: "(string | undefined)",
1346
+ value: input.name
1347
+ }), undefined === input.appearance || "string" === typeof input.appearance || _report(_exceptionable, {
1348
+ path: _path + ".appearance",
1349
+ expected: "(string | undefined)",
1350
+ value: input.appearance
1351
+ }), undefined === input.colorScheme || ("object" === typeof input.colorScheme && null !== input.colorScheme && false === Array.isArray(input.colorScheme) || _report(_exceptionable, {
1352
+ path: _path + ".colorScheme",
1353
+ expected: "(Record<string, string> | undefined)",
1354
+ value: input.colorScheme
1355
+ })) && _vo3(input.colorScheme, _path + ".colorScheme", true && _exceptionable) || _report(_exceptionable, {
1356
+ path: _path + ".colorScheme",
1357
+ expected: "(Record<string, string> | undefined)",
1358
+ value: input.colorScheme
1359
+ }), undefined === input.fontScheme || ("object" === typeof input.fontScheme && null !== input.fontScheme && false === Array.isArray(input.fontScheme) || _report(_exceptionable, {
1360
+ path: _path + ".fontScheme",
1361
+ expected: "(Record<string, string> | undefined)",
1362
+ value: input.fontScheme
1363
+ })) && _vo3(input.fontScheme, _path + ".fontScheme", true && _exceptionable) || _report(_exceptionable, {
1364
+ path: _path + ".fontScheme",
1365
+ expected: "(Record<string, string> | undefined)",
1366
+ value: input.fontScheme
1367
+ })].every((flag: boolean) => flag); const _vo3 = (input: any, _path: string, _exceptionable: boolean = true): boolean => [false === _exceptionable || Object.keys(input).map((key: any) => {
1368
+ const value = input[key];
1369
+ if (undefined === value)
1370
+ return true;
1371
+ return "string" === typeof value || _report(_exceptionable, {
1372
+ path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
1373
+ expected: "string",
1374
+ value: value
1375
+ });
1376
+ }).every((flag: boolean) => flag)].every((flag: boolean) => flag); const __is = (input: any): input is Partial<DeckRecord> => "object" === typeof input && null !== input && false === Array.isArray(input) && _io0(input); let errors: any; let _report: any; return (input: any): import("typia").IValidation<Partial<DeckRecord>> => {
1377
+ if (false === __is(input)) {
1378
+ errors = [];
1379
+ _report = (__typia_transform__validateReport._validateReport as any)(errors);
1380
+ ((input: any, _path: string, _exceptionable: boolean = true) => ("object" === typeof input && null !== input && false === Array.isArray(input) || _report(true, {
1381
+ path: _path + "",
1382
+ expected: "Partial<DeckRecord>",
1383
+ value: input
1384
+ })) && _vo0(input, _path + "", true) || _report(true, {
1385
+ path: _path + "",
1386
+ expected: "Partial<DeckRecord>",
1387
+ value: input
1388
+ }))(input, "$input", true);
1389
+ const success = 0 === errors.length;
1390
+ return success ? {
1391
+ success,
1392
+ data: input
1393
+ } : {
1394
+ success,
1395
+ errors,
1396
+ data: input
1397
+ } as any;
1398
+ }
1399
+ return {
1400
+ success: true,
1401
+ data: input
1402
+ } as any;
1403
+ }; })();