@nxtedition/types 1.4.0 → 1.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/common/settings.d.ts +8 -4
- package/dist/common/settings.js +99 -25
- package/dist/domains/asset.d.ts +26 -0
- package/dist/domains/asset.js +310 -0
- package/dist/domains/contact.d.ts +16 -0
- package/dist/domains/contact.js +149 -0
- package/dist/domains/general.d.ts +55 -0
- package/dist/domains/general.js +681 -0
- package/dist/domains/index.d.ts +3 -1
- package/dist/domains/index.js +1 -0
- package/dist/domains/media.d.ts +34 -0
- package/dist/domains/media.js +497 -0
- package/dist/domains/permission.d.ts +73 -12
- package/dist/domains/permission.js +1689 -138
- package/dist/domains/settings.js +72 -8
- package/dist/index.d.ts +3 -0
- package/package.json +1 -1
package/dist/domains/asset.d.ts
CHANGED
|
@@ -3,6 +3,8 @@ export interface AssetDomainRecords {
|
|
|
3
3
|
":asset.title?": AssetTitleRecord;
|
|
4
4
|
":asset.types?": AssetTypesRecord;
|
|
5
5
|
":asset.assignees?": AssetAssigneesRecord;
|
|
6
|
+
":asset.refs?": AssetRefsRecord;
|
|
7
|
+
":asset.tags?": AssetTagsRecord;
|
|
6
8
|
}
|
|
7
9
|
export interface AssetTitleRecord {
|
|
8
10
|
value?: string;
|
|
@@ -31,3 +33,27 @@ export declare const randomAssetAssigneesRecord: () => AssetAssigneesRecord;
|
|
|
31
33
|
export declare const assertGuardAssetAssigneesRecord: __AssertionGuard<AssetAssigneesRecord>;
|
|
32
34
|
export declare const stringifyAssetAssigneesRecord: (input: AssetAssigneesRecord) => string;
|
|
33
35
|
export declare const assertStringifyAssetAssigneesRecord: (input: unknown) => string;
|
|
36
|
+
export interface AssetRefsRecord {
|
|
37
|
+
value?: AssetRef[];
|
|
38
|
+
}
|
|
39
|
+
export declare const isAssetRefsRecord: (input: unknown) => input is AssetRefsRecord;
|
|
40
|
+
export declare const assertAssetRefsRecord: (input: unknown) => AssetRefsRecord;
|
|
41
|
+
export declare const randomAssetRefsRecord: () => AssetRefsRecord;
|
|
42
|
+
export declare const assertGuardAssetRefsRecord: __AssertionGuard<AssetRefsRecord>;
|
|
43
|
+
export declare const stringifyAssetRefsRecord: (input: AssetRefsRecord) => string;
|
|
44
|
+
export declare const assertStringifyAssetRefsRecord: (input: unknown) => string;
|
|
45
|
+
interface AssetRef {
|
|
46
|
+
id: string;
|
|
47
|
+
key: string;
|
|
48
|
+
value: string;
|
|
49
|
+
}
|
|
50
|
+
export interface AssetTagsRecord {
|
|
51
|
+
value?: string[];
|
|
52
|
+
}
|
|
53
|
+
export declare const isAssetTagsRecord: (input: unknown) => input is AssetTagsRecord;
|
|
54
|
+
export declare const assertAssetTagsRecord: (input: unknown) => AssetTagsRecord;
|
|
55
|
+
export declare const randomAssetTagsRecord: () => AssetTagsRecord;
|
|
56
|
+
export declare const assertGuardAssetTagsRecord: __AssertionGuard<AssetTagsRecord>;
|
|
57
|
+
export declare const stringifyAssetTagsRecord: (input: AssetTagsRecord) => string;
|
|
58
|
+
export declare const assertStringifyAssetTagsRecord: (input: unknown) => string;
|
|
59
|
+
export {};
|
package/dist/domains/asset.js
CHANGED
|
@@ -347,3 +347,313 @@ export const assertStringifyAssetAssigneesRecord = (input, errorFactory) => { co
|
|
|
347
347
|
const $so0 = input => `{${$tail(`${undefined === input.value ? "" : `"value":${undefined !== input.value ? `[${input.value.map(elem => $string(elem)).join(",")}]` : undefined}`}`)}}`;
|
|
348
348
|
return $so0(input);
|
|
349
349
|
}; return stringify(assert(input, errorFactory)); };
|
|
350
|
+
export const isAssetRefsRecord = input => {
|
|
351
|
+
const $io0 = input => undefined === input.value || Array.isArray(input.value) && input.value.every(elem => "object" === typeof elem && null !== elem && $io1(elem));
|
|
352
|
+
const $io1 = input => "string" === typeof input.id && "string" === typeof input.key && "string" === typeof input.value;
|
|
353
|
+
return "object" === typeof input && null !== input && false === Array.isArray(input) && $io0(input);
|
|
354
|
+
};
|
|
355
|
+
export const assertAssetRefsRecord = (input, errorFactory) => {
|
|
356
|
+
const __is = input => {
|
|
357
|
+
const $io0 = input => undefined === input.value || Array.isArray(input.value) && input.value.every(elem => "object" === typeof elem && null !== elem && $io1(elem));
|
|
358
|
+
const $io1 = input => "string" === typeof input.id && "string" === typeof input.key && "string" === typeof input.value;
|
|
359
|
+
return "object" === typeof input && null !== input && false === Array.isArray(input) && $io0(input);
|
|
360
|
+
};
|
|
361
|
+
if (false === __is(input))
|
|
362
|
+
((input, _path, _exceptionable = true) => {
|
|
363
|
+
const $guard = __typia.createAssert.guard;
|
|
364
|
+
const $ao0 = (input, _path, _exceptionable = true) => undefined === input.value || (Array.isArray(input.value) || $guard(_exceptionable, {
|
|
365
|
+
path: _path + ".value",
|
|
366
|
+
expected: "(Array<AssetRef> | undefined)",
|
|
367
|
+
value: input.value
|
|
368
|
+
}, errorFactory)) && input.value.every((elem, _index1) => ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
|
|
369
|
+
path: _path + ".value[" + _index1 + "]",
|
|
370
|
+
expected: "AssetRef",
|
|
371
|
+
value: elem
|
|
372
|
+
}, errorFactory)) && $ao1(elem, _path + ".value[" + _index1 + "]", true && _exceptionable) || $guard(_exceptionable, {
|
|
373
|
+
path: _path + ".value[" + _index1 + "]",
|
|
374
|
+
expected: "AssetRef",
|
|
375
|
+
value: elem
|
|
376
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
|
377
|
+
path: _path + ".value",
|
|
378
|
+
expected: "(Array<AssetRef> | undefined)",
|
|
379
|
+
value: input.value
|
|
380
|
+
}, errorFactory);
|
|
381
|
+
const $ao1 = (input, _path, _exceptionable = true) => ("string" === typeof input.id || $guard(_exceptionable, {
|
|
382
|
+
path: _path + ".id",
|
|
383
|
+
expected: "string",
|
|
384
|
+
value: input.id
|
|
385
|
+
}, errorFactory)) && ("string" === typeof input.key || $guard(_exceptionable, {
|
|
386
|
+
path: _path + ".key",
|
|
387
|
+
expected: "string",
|
|
388
|
+
value: input.key
|
|
389
|
+
}, errorFactory)) && ("string" === typeof input.value || $guard(_exceptionable, {
|
|
390
|
+
path: _path + ".value",
|
|
391
|
+
expected: "string",
|
|
392
|
+
value: input.value
|
|
393
|
+
}, errorFactory));
|
|
394
|
+
return ("object" === typeof input && null !== input && false === Array.isArray(input) || $guard(true, {
|
|
395
|
+
path: _path + "",
|
|
396
|
+
expected: "AssetRefsRecord",
|
|
397
|
+
value: input
|
|
398
|
+
}, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
|
|
399
|
+
path: _path + "",
|
|
400
|
+
expected: "AssetRefsRecord",
|
|
401
|
+
value: input
|
|
402
|
+
}, errorFactory);
|
|
403
|
+
})(input, "$input", true);
|
|
404
|
+
return input;
|
|
405
|
+
};
|
|
406
|
+
export const randomAssetRefsRecord = generator => {
|
|
407
|
+
const $generator = __typia.createRandom.generator;
|
|
408
|
+
const $pick = __typia.createRandom.pick;
|
|
409
|
+
const $ro0 = (_recursive = false, _depth = 0) => ({
|
|
410
|
+
value: $pick([
|
|
411
|
+
() => undefined,
|
|
412
|
+
() => (generator?.array ?? $generator.array)(() => $ro1(_recursive, _recursive ? 1 + _depth : _depth))
|
|
413
|
+
])()
|
|
414
|
+
});
|
|
415
|
+
const $ro1 = (_recursive = false, _depth = 0) => ({
|
|
416
|
+
id: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
|
|
417
|
+
key: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
|
|
418
|
+
value: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
|
|
419
|
+
});
|
|
420
|
+
return $ro0();
|
|
421
|
+
};
|
|
422
|
+
export const assertGuardAssetRefsRecord = (input, errorFactory) => {
|
|
423
|
+
const __is = input => {
|
|
424
|
+
const $io0 = input => undefined === input.value || Array.isArray(input.value) && input.value.every(elem => "object" === typeof elem && null !== elem && $io1(elem));
|
|
425
|
+
const $io1 = input => "string" === typeof input.id && "string" === typeof input.key && "string" === typeof input.value;
|
|
426
|
+
return "object" === typeof input && null !== input && false === Array.isArray(input) && $io0(input);
|
|
427
|
+
};
|
|
428
|
+
if (false === __is(input))
|
|
429
|
+
((input, _path, _exceptionable = true) => {
|
|
430
|
+
const $guard = __typia.createAssertGuard.guard;
|
|
431
|
+
const $ao0 = (input, _path, _exceptionable = true) => undefined === input.value || (Array.isArray(input.value) || $guard(_exceptionable, {
|
|
432
|
+
path: _path + ".value",
|
|
433
|
+
expected: "(Array<AssetRef> | undefined)",
|
|
434
|
+
value: input.value
|
|
435
|
+
}, errorFactory)) && input.value.every((elem, _index1) => ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
|
|
436
|
+
path: _path + ".value[" + _index1 + "]",
|
|
437
|
+
expected: "AssetRef",
|
|
438
|
+
value: elem
|
|
439
|
+
}, errorFactory)) && $ao1(elem, _path + ".value[" + _index1 + "]", true && _exceptionable) || $guard(_exceptionable, {
|
|
440
|
+
path: _path + ".value[" + _index1 + "]",
|
|
441
|
+
expected: "AssetRef",
|
|
442
|
+
value: elem
|
|
443
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
|
444
|
+
path: _path + ".value",
|
|
445
|
+
expected: "(Array<AssetRef> | undefined)",
|
|
446
|
+
value: input.value
|
|
447
|
+
}, errorFactory);
|
|
448
|
+
const $ao1 = (input, _path, _exceptionable = true) => ("string" === typeof input.id || $guard(_exceptionable, {
|
|
449
|
+
path: _path + ".id",
|
|
450
|
+
expected: "string",
|
|
451
|
+
value: input.id
|
|
452
|
+
}, errorFactory)) && ("string" === typeof input.key || $guard(_exceptionable, {
|
|
453
|
+
path: _path + ".key",
|
|
454
|
+
expected: "string",
|
|
455
|
+
value: input.key
|
|
456
|
+
}, errorFactory)) && ("string" === typeof input.value || $guard(_exceptionable, {
|
|
457
|
+
path: _path + ".value",
|
|
458
|
+
expected: "string",
|
|
459
|
+
value: input.value
|
|
460
|
+
}, errorFactory));
|
|
461
|
+
return ("object" === typeof input && null !== input && false === Array.isArray(input) || $guard(true, {
|
|
462
|
+
path: _path + "",
|
|
463
|
+
expected: "AssetRefsRecord",
|
|
464
|
+
value: input
|
|
465
|
+
}, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
|
|
466
|
+
path: _path + "",
|
|
467
|
+
expected: "AssetRefsRecord",
|
|
468
|
+
value: input
|
|
469
|
+
}, errorFactory);
|
|
470
|
+
})(input, "$input", true);
|
|
471
|
+
};
|
|
472
|
+
export const stringifyAssetRefsRecord = input => {
|
|
473
|
+
const $io1 = input => "string" === typeof input.id && "string" === typeof input.key && "string" === typeof input.value;
|
|
474
|
+
const $string = __typia.json.createStringify.string;
|
|
475
|
+
const $tail = __typia.json.createStringify.tail;
|
|
476
|
+
const $so0 = input => `{${$tail(`${undefined === input.value ? "" : `"value":${undefined !== input.value ? `[${input.value.map(elem => `{"id":${$string(elem.id)},"key":${$string(elem.key)},"value":${$string(elem.value)}}`).join(",")}]` : undefined}`}`)}}`;
|
|
477
|
+
return $so0(input);
|
|
478
|
+
};
|
|
479
|
+
export const assertStringifyAssetRefsRecord = (input, errorFactory) => { const assert = (input, errorFactory) => {
|
|
480
|
+
const __is = input => {
|
|
481
|
+
const $io0 = input => undefined === input.value || Array.isArray(input.value) && input.value.every(elem => "object" === typeof elem && null !== elem && $io1(elem));
|
|
482
|
+
const $io1 = input => "string" === typeof input.id && "string" === typeof input.key && "string" === typeof input.value;
|
|
483
|
+
return "object" === typeof input && null !== input && false === Array.isArray(input) && $io0(input);
|
|
484
|
+
};
|
|
485
|
+
if (false === __is(input))
|
|
486
|
+
((input, _path, _exceptionable = true) => {
|
|
487
|
+
const $guard = __typia.json.createAssertStringify.guard;
|
|
488
|
+
const $ao0 = (input, _path, _exceptionable = true) => undefined === input.value || (Array.isArray(input.value) || $guard(_exceptionable, {
|
|
489
|
+
path: _path + ".value",
|
|
490
|
+
expected: "(Array<AssetRef> | undefined)",
|
|
491
|
+
value: input.value
|
|
492
|
+
}, errorFactory)) && input.value.every((elem, _index1) => ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
|
|
493
|
+
path: _path + ".value[" + _index1 + "]",
|
|
494
|
+
expected: "AssetRef",
|
|
495
|
+
value: elem
|
|
496
|
+
}, errorFactory)) && $ao1(elem, _path + ".value[" + _index1 + "]", true && _exceptionable) || $guard(_exceptionable, {
|
|
497
|
+
path: _path + ".value[" + _index1 + "]",
|
|
498
|
+
expected: "AssetRef",
|
|
499
|
+
value: elem
|
|
500
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
|
501
|
+
path: _path + ".value",
|
|
502
|
+
expected: "(Array<AssetRef> | undefined)",
|
|
503
|
+
value: input.value
|
|
504
|
+
}, errorFactory);
|
|
505
|
+
const $ao1 = (input, _path, _exceptionable = true) => ("string" === typeof input.id || $guard(_exceptionable, {
|
|
506
|
+
path: _path + ".id",
|
|
507
|
+
expected: "string",
|
|
508
|
+
value: input.id
|
|
509
|
+
}, errorFactory)) && ("string" === typeof input.key || $guard(_exceptionable, {
|
|
510
|
+
path: _path + ".key",
|
|
511
|
+
expected: "string",
|
|
512
|
+
value: input.key
|
|
513
|
+
}, errorFactory)) && ("string" === typeof input.value || $guard(_exceptionable, {
|
|
514
|
+
path: _path + ".value",
|
|
515
|
+
expected: "string",
|
|
516
|
+
value: input.value
|
|
517
|
+
}, errorFactory));
|
|
518
|
+
return ("object" === typeof input && null !== input && false === Array.isArray(input) || $guard(true, {
|
|
519
|
+
path: _path + "",
|
|
520
|
+
expected: "AssetRefsRecord",
|
|
521
|
+
value: input
|
|
522
|
+
}, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
|
|
523
|
+
path: _path + "",
|
|
524
|
+
expected: "AssetRefsRecord",
|
|
525
|
+
value: input
|
|
526
|
+
}, errorFactory);
|
|
527
|
+
})(input, "$input", true);
|
|
528
|
+
return input;
|
|
529
|
+
}; const stringify = input => {
|
|
530
|
+
const $io1 = input => "string" === typeof input.id && "string" === typeof input.key && "string" === typeof input.value;
|
|
531
|
+
const $string = __typia.json.createAssertStringify.string;
|
|
532
|
+
const $tail = __typia.json.createAssertStringify.tail;
|
|
533
|
+
const $so0 = input => `{${$tail(`${undefined === input.value ? "" : `"value":${undefined !== input.value ? `[${input.value.map(elem => `{"id":${$string(elem.id)},"key":${$string(elem.key)},"value":${$string(elem.value)}}`).join(",")}]` : undefined}`}`)}}`;
|
|
534
|
+
return $so0(input);
|
|
535
|
+
}; return stringify(assert(input, errorFactory)); };
|
|
536
|
+
export const isAssetTagsRecord = input => {
|
|
537
|
+
const $io0 = input => undefined === input.value || Array.isArray(input.value) && input.value.every(elem => "string" === typeof elem);
|
|
538
|
+
return "object" === typeof input && null !== input && false === Array.isArray(input) && $io0(input);
|
|
539
|
+
};
|
|
540
|
+
export const assertAssetTagsRecord = (input, errorFactory) => {
|
|
541
|
+
const __is = input => {
|
|
542
|
+
const $io0 = input => undefined === input.value || Array.isArray(input.value) && input.value.every(elem => "string" === typeof elem);
|
|
543
|
+
return "object" === typeof input && null !== input && false === Array.isArray(input) && $io0(input);
|
|
544
|
+
};
|
|
545
|
+
if (false === __is(input))
|
|
546
|
+
((input, _path, _exceptionable = true) => {
|
|
547
|
+
const $guard = __typia.createAssert.guard;
|
|
548
|
+
const $ao0 = (input, _path, _exceptionable = true) => undefined === input.value || (Array.isArray(input.value) || $guard(_exceptionable, {
|
|
549
|
+
path: _path + ".value",
|
|
550
|
+
expected: "(Array<string> | undefined)",
|
|
551
|
+
value: input.value
|
|
552
|
+
}, errorFactory)) && input.value.every((elem, _index1) => "string" === typeof elem || $guard(_exceptionable, {
|
|
553
|
+
path: _path + ".value[" + _index1 + "]",
|
|
554
|
+
expected: "string",
|
|
555
|
+
value: elem
|
|
556
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
|
557
|
+
path: _path + ".value",
|
|
558
|
+
expected: "(Array<string> | undefined)",
|
|
559
|
+
value: input.value
|
|
560
|
+
}, errorFactory);
|
|
561
|
+
return ("object" === typeof input && null !== input && false === Array.isArray(input) || $guard(true, {
|
|
562
|
+
path: _path + "",
|
|
563
|
+
expected: "AssetTagsRecord",
|
|
564
|
+
value: input
|
|
565
|
+
}, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
|
|
566
|
+
path: _path + "",
|
|
567
|
+
expected: "AssetTagsRecord",
|
|
568
|
+
value: input
|
|
569
|
+
}, errorFactory);
|
|
570
|
+
})(input, "$input", true);
|
|
571
|
+
return input;
|
|
572
|
+
};
|
|
573
|
+
export const randomAssetTagsRecord = generator => {
|
|
574
|
+
const $generator = __typia.createRandom.generator;
|
|
575
|
+
const $pick = __typia.createRandom.pick;
|
|
576
|
+
const $ro0 = (_recursive = false, _depth = 0) => ({
|
|
577
|
+
value: $pick([
|
|
578
|
+
() => undefined,
|
|
579
|
+
() => (generator?.array ?? $generator.array)(() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)())
|
|
580
|
+
])()
|
|
581
|
+
});
|
|
582
|
+
return $ro0();
|
|
583
|
+
};
|
|
584
|
+
export const assertGuardAssetTagsRecord = (input, errorFactory) => {
|
|
585
|
+
const __is = input => {
|
|
586
|
+
const $io0 = input => undefined === input.value || Array.isArray(input.value) && input.value.every(elem => "string" === typeof elem);
|
|
587
|
+
return "object" === typeof input && null !== input && false === Array.isArray(input) && $io0(input);
|
|
588
|
+
};
|
|
589
|
+
if (false === __is(input))
|
|
590
|
+
((input, _path, _exceptionable = true) => {
|
|
591
|
+
const $guard = __typia.createAssertGuard.guard;
|
|
592
|
+
const $ao0 = (input, _path, _exceptionable = true) => undefined === input.value || (Array.isArray(input.value) || $guard(_exceptionable, {
|
|
593
|
+
path: _path + ".value",
|
|
594
|
+
expected: "(Array<string> | undefined)",
|
|
595
|
+
value: input.value
|
|
596
|
+
}, errorFactory)) && input.value.every((elem, _index1) => "string" === typeof elem || $guard(_exceptionable, {
|
|
597
|
+
path: _path + ".value[" + _index1 + "]",
|
|
598
|
+
expected: "string",
|
|
599
|
+
value: elem
|
|
600
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
|
601
|
+
path: _path + ".value",
|
|
602
|
+
expected: "(Array<string> | undefined)",
|
|
603
|
+
value: input.value
|
|
604
|
+
}, errorFactory);
|
|
605
|
+
return ("object" === typeof input && null !== input && false === Array.isArray(input) || $guard(true, {
|
|
606
|
+
path: _path + "",
|
|
607
|
+
expected: "AssetTagsRecord",
|
|
608
|
+
value: input
|
|
609
|
+
}, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
|
|
610
|
+
path: _path + "",
|
|
611
|
+
expected: "AssetTagsRecord",
|
|
612
|
+
value: input
|
|
613
|
+
}, errorFactory);
|
|
614
|
+
})(input, "$input", true);
|
|
615
|
+
};
|
|
616
|
+
export const stringifyAssetTagsRecord = input => {
|
|
617
|
+
const $string = __typia.json.createStringify.string;
|
|
618
|
+
const $tail = __typia.json.createStringify.tail;
|
|
619
|
+
const $so0 = input => `{${$tail(`${undefined === input.value ? "" : `"value":${undefined !== input.value ? `[${input.value.map(elem => $string(elem)).join(",")}]` : undefined}`}`)}}`;
|
|
620
|
+
return $so0(input);
|
|
621
|
+
};
|
|
622
|
+
export const assertStringifyAssetTagsRecord = (input, errorFactory) => { const assert = (input, errorFactory) => {
|
|
623
|
+
const __is = input => {
|
|
624
|
+
const $io0 = input => undefined === input.value || Array.isArray(input.value) && input.value.every(elem => "string" === typeof elem);
|
|
625
|
+
return "object" === typeof input && null !== input && false === Array.isArray(input) && $io0(input);
|
|
626
|
+
};
|
|
627
|
+
if (false === __is(input))
|
|
628
|
+
((input, _path, _exceptionable = true) => {
|
|
629
|
+
const $guard = __typia.json.createAssertStringify.guard;
|
|
630
|
+
const $ao0 = (input, _path, _exceptionable = true) => undefined === input.value || (Array.isArray(input.value) || $guard(_exceptionable, {
|
|
631
|
+
path: _path + ".value",
|
|
632
|
+
expected: "(Array<string> | undefined)",
|
|
633
|
+
value: input.value
|
|
634
|
+
}, errorFactory)) && input.value.every((elem, _index1) => "string" === typeof elem || $guard(_exceptionable, {
|
|
635
|
+
path: _path + ".value[" + _index1 + "]",
|
|
636
|
+
expected: "string",
|
|
637
|
+
value: elem
|
|
638
|
+
}, errorFactory)) || $guard(_exceptionable, {
|
|
639
|
+
path: _path + ".value",
|
|
640
|
+
expected: "(Array<string> | undefined)",
|
|
641
|
+
value: input.value
|
|
642
|
+
}, errorFactory);
|
|
643
|
+
return ("object" === typeof input && null !== input && false === Array.isArray(input) || $guard(true, {
|
|
644
|
+
path: _path + "",
|
|
645
|
+
expected: "AssetTagsRecord",
|
|
646
|
+
value: input
|
|
647
|
+
}, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
|
|
648
|
+
path: _path + "",
|
|
649
|
+
expected: "AssetTagsRecord",
|
|
650
|
+
value: input
|
|
651
|
+
}, errorFactory);
|
|
652
|
+
})(input, "$input", true);
|
|
653
|
+
return input;
|
|
654
|
+
}; const stringify = input => {
|
|
655
|
+
const $string = __typia.json.createAssertStringify.string;
|
|
656
|
+
const $tail = __typia.json.createAssertStringify.tail;
|
|
657
|
+
const $so0 = input => `{${$tail(`${undefined === input.value ? "" : `"value":${undefined !== input.value ? `[${input.value.map(elem => $string(elem)).join(",")}]` : undefined}`}`)}}`;
|
|
658
|
+
return $so0(input);
|
|
659
|
+
}; return stringify(assert(input, errorFactory)); };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type AssertionGuard as __AssertionGuard } from "typia";
|
|
2
|
+
export interface ContactDomainRecords {
|
|
3
|
+
":contact": ContactRecord;
|
|
4
|
+
}
|
|
5
|
+
export interface ContactRecord {
|
|
6
|
+
title?: string;
|
|
7
|
+
email?: string;
|
|
8
|
+
firstName?: string;
|
|
9
|
+
lastName?: string;
|
|
10
|
+
}
|
|
11
|
+
export declare const isContactRecord: (input: unknown) => input is ContactRecord;
|
|
12
|
+
export declare const assertContactRecord: (input: unknown) => ContactRecord;
|
|
13
|
+
export declare const randomContactRecord: () => ContactRecord;
|
|
14
|
+
export declare const assertGuardContactRecord: __AssertionGuard<ContactRecord>;
|
|
15
|
+
export declare const stringifyContactRecord: (input: ContactRecord) => string;
|
|
16
|
+
export declare const assertStringifyContactRecord: (input: unknown) => string;
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import __typia from "typia";
|
|
2
|
+
export const isContactRecord = input => {
|
|
3
|
+
const $io0 = input => (undefined === input.title || "string" === typeof input.title) && (undefined === input.email || "string" === typeof input.email) && (undefined === input.firstName || "string" === typeof input.firstName) && (undefined === input.lastName || "string" === typeof input.lastName);
|
|
4
|
+
return "object" === typeof input && null !== input && false === Array.isArray(input) && $io0(input);
|
|
5
|
+
};
|
|
6
|
+
export const assertContactRecord = (input, errorFactory) => {
|
|
7
|
+
const __is = input => {
|
|
8
|
+
const $io0 = input => (undefined === input.title || "string" === typeof input.title) && (undefined === input.email || "string" === typeof input.email) && (undefined === input.firstName || "string" === typeof input.firstName) && (undefined === input.lastName || "string" === typeof input.lastName);
|
|
9
|
+
return "object" === typeof input && null !== input && false === Array.isArray(input) && $io0(input);
|
|
10
|
+
};
|
|
11
|
+
if (false === __is(input))
|
|
12
|
+
((input, _path, _exceptionable = true) => {
|
|
13
|
+
const $guard = __typia.createAssert.guard;
|
|
14
|
+
const $ao0 = (input, _path, _exceptionable = true) => (undefined === input.title || "string" === typeof input.title || $guard(_exceptionable, {
|
|
15
|
+
path: _path + ".title",
|
|
16
|
+
expected: "(string | undefined)",
|
|
17
|
+
value: input.title
|
|
18
|
+
}, errorFactory)) && (undefined === input.email || "string" === typeof input.email || $guard(_exceptionable, {
|
|
19
|
+
path: _path + ".email",
|
|
20
|
+
expected: "(string | undefined)",
|
|
21
|
+
value: input.email
|
|
22
|
+
}, errorFactory)) && (undefined === input.firstName || "string" === typeof input.firstName || $guard(_exceptionable, {
|
|
23
|
+
path: _path + ".firstName",
|
|
24
|
+
expected: "(string | undefined)",
|
|
25
|
+
value: input.firstName
|
|
26
|
+
}, errorFactory)) && (undefined === input.lastName || "string" === typeof input.lastName || $guard(_exceptionable, {
|
|
27
|
+
path: _path + ".lastName",
|
|
28
|
+
expected: "(string | undefined)",
|
|
29
|
+
value: input.lastName
|
|
30
|
+
}, errorFactory));
|
|
31
|
+
return ("object" === typeof input && null !== input && false === Array.isArray(input) || $guard(true, {
|
|
32
|
+
path: _path + "",
|
|
33
|
+
expected: "ContactRecord",
|
|
34
|
+
value: input
|
|
35
|
+
}, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
|
|
36
|
+
path: _path + "",
|
|
37
|
+
expected: "ContactRecord",
|
|
38
|
+
value: input
|
|
39
|
+
}, errorFactory);
|
|
40
|
+
})(input, "$input", true);
|
|
41
|
+
return input;
|
|
42
|
+
};
|
|
43
|
+
export const randomContactRecord = generator => {
|
|
44
|
+
const $generator = __typia.createRandom.generator;
|
|
45
|
+
const $pick = __typia.createRandom.pick;
|
|
46
|
+
const $ro0 = (_recursive = false, _depth = 0) => ({
|
|
47
|
+
title: $pick([
|
|
48
|
+
() => undefined,
|
|
49
|
+
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
|
|
50
|
+
])(),
|
|
51
|
+
email: $pick([
|
|
52
|
+
() => undefined,
|
|
53
|
+
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
|
|
54
|
+
])(),
|
|
55
|
+
firstName: $pick([
|
|
56
|
+
() => undefined,
|
|
57
|
+
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
|
|
58
|
+
])(),
|
|
59
|
+
lastName: $pick([
|
|
60
|
+
() => undefined,
|
|
61
|
+
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
|
|
62
|
+
])()
|
|
63
|
+
});
|
|
64
|
+
return $ro0();
|
|
65
|
+
};
|
|
66
|
+
export const assertGuardContactRecord = (input, errorFactory) => {
|
|
67
|
+
const __is = input => {
|
|
68
|
+
const $io0 = input => (undefined === input.title || "string" === typeof input.title) && (undefined === input.email || "string" === typeof input.email) && (undefined === input.firstName || "string" === typeof input.firstName) && (undefined === input.lastName || "string" === typeof input.lastName);
|
|
69
|
+
return "object" === typeof input && null !== input && false === Array.isArray(input) && $io0(input);
|
|
70
|
+
};
|
|
71
|
+
if (false === __is(input))
|
|
72
|
+
((input, _path, _exceptionable = true) => {
|
|
73
|
+
const $guard = __typia.createAssertGuard.guard;
|
|
74
|
+
const $ao0 = (input, _path, _exceptionable = true) => (undefined === input.title || "string" === typeof input.title || $guard(_exceptionable, {
|
|
75
|
+
path: _path + ".title",
|
|
76
|
+
expected: "(string | undefined)",
|
|
77
|
+
value: input.title
|
|
78
|
+
}, errorFactory)) && (undefined === input.email || "string" === typeof input.email || $guard(_exceptionable, {
|
|
79
|
+
path: _path + ".email",
|
|
80
|
+
expected: "(string | undefined)",
|
|
81
|
+
value: input.email
|
|
82
|
+
}, errorFactory)) && (undefined === input.firstName || "string" === typeof input.firstName || $guard(_exceptionable, {
|
|
83
|
+
path: _path + ".firstName",
|
|
84
|
+
expected: "(string | undefined)",
|
|
85
|
+
value: input.firstName
|
|
86
|
+
}, errorFactory)) && (undefined === input.lastName || "string" === typeof input.lastName || $guard(_exceptionable, {
|
|
87
|
+
path: _path + ".lastName",
|
|
88
|
+
expected: "(string | undefined)",
|
|
89
|
+
value: input.lastName
|
|
90
|
+
}, errorFactory));
|
|
91
|
+
return ("object" === typeof input && null !== input && false === Array.isArray(input) || $guard(true, {
|
|
92
|
+
path: _path + "",
|
|
93
|
+
expected: "ContactRecord",
|
|
94
|
+
value: input
|
|
95
|
+
}, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
|
|
96
|
+
path: _path + "",
|
|
97
|
+
expected: "ContactRecord",
|
|
98
|
+
value: input
|
|
99
|
+
}, errorFactory);
|
|
100
|
+
})(input, "$input", true);
|
|
101
|
+
};
|
|
102
|
+
export const stringifyContactRecord = input => {
|
|
103
|
+
const $string = __typia.json.createStringify.string;
|
|
104
|
+
const $tail = __typia.json.createStringify.tail;
|
|
105
|
+
const $so0 = input => `{${$tail(`${undefined === input.title ? "" : `"title":${undefined !== input.title ? $string(input.title) : undefined},`}${undefined === input.email ? "" : `"email":${undefined !== input.email ? $string(input.email) : undefined},`}${undefined === input.firstName ? "" : `"firstName":${undefined !== input.firstName ? $string(input.firstName) : undefined},`}${undefined === input.lastName ? "" : `"lastName":${undefined !== input.lastName ? $string(input.lastName) : undefined}`}`)}}`;
|
|
106
|
+
return $so0(input);
|
|
107
|
+
};
|
|
108
|
+
export const assertStringifyContactRecord = (input, errorFactory) => { const assert = (input, errorFactory) => {
|
|
109
|
+
const __is = input => {
|
|
110
|
+
const $io0 = input => (undefined === input.title || "string" === typeof input.title) && (undefined === input.email || "string" === typeof input.email) && (undefined === input.firstName || "string" === typeof input.firstName) && (undefined === input.lastName || "string" === typeof input.lastName);
|
|
111
|
+
return "object" === typeof input && null !== input && false === Array.isArray(input) && $io0(input);
|
|
112
|
+
};
|
|
113
|
+
if (false === __is(input))
|
|
114
|
+
((input, _path, _exceptionable = true) => {
|
|
115
|
+
const $guard = __typia.json.createAssertStringify.guard;
|
|
116
|
+
const $ao0 = (input, _path, _exceptionable = true) => (undefined === input.title || "string" === typeof input.title || $guard(_exceptionable, {
|
|
117
|
+
path: _path + ".title",
|
|
118
|
+
expected: "(string | undefined)",
|
|
119
|
+
value: input.title
|
|
120
|
+
}, errorFactory)) && (undefined === input.email || "string" === typeof input.email || $guard(_exceptionable, {
|
|
121
|
+
path: _path + ".email",
|
|
122
|
+
expected: "(string | undefined)",
|
|
123
|
+
value: input.email
|
|
124
|
+
}, errorFactory)) && (undefined === input.firstName || "string" === typeof input.firstName || $guard(_exceptionable, {
|
|
125
|
+
path: _path + ".firstName",
|
|
126
|
+
expected: "(string | undefined)",
|
|
127
|
+
value: input.firstName
|
|
128
|
+
}, errorFactory)) && (undefined === input.lastName || "string" === typeof input.lastName || $guard(_exceptionable, {
|
|
129
|
+
path: _path + ".lastName",
|
|
130
|
+
expected: "(string | undefined)",
|
|
131
|
+
value: input.lastName
|
|
132
|
+
}, errorFactory));
|
|
133
|
+
return ("object" === typeof input && null !== input && false === Array.isArray(input) || $guard(true, {
|
|
134
|
+
path: _path + "",
|
|
135
|
+
expected: "ContactRecord",
|
|
136
|
+
value: input
|
|
137
|
+
}, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
|
|
138
|
+
path: _path + "",
|
|
139
|
+
expected: "ContactRecord",
|
|
140
|
+
value: input
|
|
141
|
+
}, errorFactory);
|
|
142
|
+
})(input, "$input", true);
|
|
143
|
+
return input;
|
|
144
|
+
}; const stringify = input => {
|
|
145
|
+
const $string = __typia.json.createAssertStringify.string;
|
|
146
|
+
const $tail = __typia.json.createAssertStringify.tail;
|
|
147
|
+
const $so0 = input => `{${$tail(`${undefined === input.title ? "" : `"title":${undefined !== input.title ? $string(input.title) : undefined},`}${undefined === input.email ? "" : `"email":${undefined !== input.email ? $string(input.email) : undefined},`}${undefined === input.firstName ? "" : `"firstName":${undefined !== input.firstName ? $string(input.firstName) : undefined},`}${undefined === input.lastName ? "" : `"lastName":${undefined !== input.lastName ? $string(input.lastName) : undefined}`}`)}}`;
|
|
148
|
+
return $so0(input);
|
|
149
|
+
}; return stringify(assert(input, errorFactory)); };
|
|
@@ -2,6 +2,10 @@ import { type AssertionGuard as __AssertionGuard } from "typia";
|
|
|
2
2
|
export interface GeneralDomainRecords {
|
|
3
3
|
":general.title": GeneralTitleRecord;
|
|
4
4
|
":general.tags": GeneralTagsRecord;
|
|
5
|
+
":general.created": GeneralCreatedRecord;
|
|
6
|
+
":general.poster": GeneralPosterRecord;
|
|
7
|
+
":general.status": GeneralStatusRecord;
|
|
8
|
+
":general.description": GeneralDescriptionRecord;
|
|
5
9
|
}
|
|
6
10
|
export interface GeneralTitleRecord {
|
|
7
11
|
value?: string;
|
|
@@ -21,3 +25,54 @@ export declare const randomGeneralTagsRecord: () => GeneralTagsRecord;
|
|
|
21
25
|
export declare const assertGuardGeneralTagsRecord: __AssertionGuard<GeneralTagsRecord>;
|
|
22
26
|
export declare const stringifyGeneralTagsRecord: (input: GeneralTagsRecord) => string;
|
|
23
27
|
export declare const assertStringifyGeneralTagsRecord: (input: unknown) => string;
|
|
28
|
+
export interface GeneralCreatedRecord {
|
|
29
|
+
time?: string;
|
|
30
|
+
user?: string;
|
|
31
|
+
origin?: string;
|
|
32
|
+
}
|
|
33
|
+
export declare const isGeneralCreatedRecord: (input: unknown) => input is GeneralCreatedRecord;
|
|
34
|
+
export declare const assertGeneralCreatedRecord: (input: unknown) => GeneralCreatedRecord;
|
|
35
|
+
export declare const randomGeneralCreatedRecord: () => GeneralCreatedRecord;
|
|
36
|
+
export declare const assertGuardGeneralCreatedRecord: __AssertionGuard<GeneralCreatedRecord>;
|
|
37
|
+
export declare const stringifyGeneralCreatedRecord: (input: GeneralCreatedRecord) => string;
|
|
38
|
+
export declare const assertStringifyGeneralCreatedRecord: (input: unknown) => string;
|
|
39
|
+
export interface GeneralPosterRecord {
|
|
40
|
+
input?: {
|
|
41
|
+
type?: string;
|
|
42
|
+
file?: string;
|
|
43
|
+
};
|
|
44
|
+
preset?: string;
|
|
45
|
+
}
|
|
46
|
+
export declare const isGeneralPosterRecord: (input: unknown) => input is GeneralPosterRecord;
|
|
47
|
+
export declare const assertGeneralPosterRecord: (input: unknown) => GeneralPosterRecord;
|
|
48
|
+
export declare const randomGeneralPosterRecord: () => GeneralPosterRecord;
|
|
49
|
+
export declare const assertGuardGeneralPosterRecord: __AssertionGuard<GeneralPosterRecord>;
|
|
50
|
+
export declare const stringifyGeneralPosterRecord: (input: GeneralPosterRecord) => string;
|
|
51
|
+
export declare const assertStringifyGeneralPosterRecord: (input: unknown) => string;
|
|
52
|
+
export type GeneralStatusRecord = {
|
|
53
|
+
[messageId: string]: GeneralStatusRecordValue;
|
|
54
|
+
};
|
|
55
|
+
export declare const isGeneralStatusRecord: (input: unknown) => input is GeneralStatusRecord;
|
|
56
|
+
export declare const assertGeneralStatusRecord: (input: unknown) => GeneralStatusRecord;
|
|
57
|
+
export declare const randomGeneralStatusRecord: () => GeneralStatusRecord;
|
|
58
|
+
export declare const assertGuardGeneralStatusRecord: __AssertionGuard<GeneralStatusRecord>;
|
|
59
|
+
export declare const stringifyGeneralStatusRecord: (input: GeneralStatusRecord) => string;
|
|
60
|
+
export declare const assertStringifyGeneralStatusRecord: (input: unknown) => string;
|
|
61
|
+
export interface GeneralStatusRecordValue {
|
|
62
|
+
expose?: boolean;
|
|
63
|
+
}
|
|
64
|
+
export declare const isGeneralStatusRecordValue: (input: unknown) => input is GeneralStatusRecordValue;
|
|
65
|
+
export declare const assertGeneralStatusRecordValue: (input: unknown) => GeneralStatusRecordValue;
|
|
66
|
+
export declare const randomGeneralStatusRecordValue: () => GeneralStatusRecordValue;
|
|
67
|
+
export declare const assertGuardGeneralStatusRecordValue: __AssertionGuard<GeneralStatusRecordValue>;
|
|
68
|
+
export declare const stringifyGeneralStatusRecordValue: (input: GeneralStatusRecordValue) => string;
|
|
69
|
+
export declare const assertStringifyGeneralStatusRecordValue: (input: unknown) => string;
|
|
70
|
+
export interface GeneralDescriptionRecord {
|
|
71
|
+
value?: string;
|
|
72
|
+
}
|
|
73
|
+
export declare const isGeneralDescriptionRecord: (input: unknown) => input is GeneralDescriptionRecord;
|
|
74
|
+
export declare const assertGeneralDescriptionRecord: (input: unknown) => GeneralDescriptionRecord;
|
|
75
|
+
export declare const randomGeneralDescriptionRecord: () => GeneralDescriptionRecord;
|
|
76
|
+
export declare const assertGuardGeneralDescriptionRecord: __AssertionGuard<GeneralDescriptionRecord>;
|
|
77
|
+
export declare const stringifyGeneralDescriptionRecord: (input: GeneralDescriptionRecord) => string;
|
|
78
|
+
export declare const assertStringifyGeneralDescriptionRecord: (input: unknown) => string;
|