@nxtedition/types 1.5.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.
@@ -4,6 +4,7 @@ export interface AssetDomainRecords {
4
4
  ":asset.types?": AssetTypesRecord;
5
5
  ":asset.assignees?": AssetAssigneesRecord;
6
6
  ":asset.refs?": AssetRefsRecord;
7
+ ":asset.tags?": AssetTagsRecord;
7
8
  }
8
9
  export interface AssetTitleRecord {
9
10
  value?: string;
@@ -46,4 +47,13 @@ interface AssetRef {
46
47
  key: string;
47
48
  value: string;
48
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;
49
59
  export {};
@@ -533,3 +533,127 @@ export const assertStringifyAssetRefsRecord = (input, errorFactory) => { const a
533
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
534
  return $so0(input);
535
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)); };
@@ -1,5 +1,6 @@
1
1
  import type { AssetDomainRecords } from './asset.js';
2
2
  import type { ConnectionDomainRecords } from './connection.js';
3
+ import type { ContactDomainRecords } from './contact.js';
3
4
  import type { EventDomainRecords } from './event.js';
4
5
  import type { GeneralDomainRecords } from './general.js';
5
6
  import type { MediaDomainRecords } from './media.js';
@@ -13,6 +14,7 @@ import type { SettingsDomainRecords } from './settings.js';
13
14
  import type { TemplateDomainRecords } from './template.js';
14
15
  export * from './asset.js';
15
16
  export * from './connection.js';
17
+ export * from './contact.js';
16
18
  export * from './event.js';
17
19
  export * from './general.js';
18
20
  export * from './media.js';
@@ -24,4 +26,4 @@ export * from './script.js';
24
26
  export * from './search.js';
25
27
  export * from './settings.js';
26
28
  export * from './template.js';
27
- export type DomainRecords = AssetDomainRecords & ConnectionDomainRecords & EventDomainRecords & GeneralDomainRecords & MediaDomainRecords & PermissionDomainRecords & PlanningDomainRecords & PublishDomainRecords & RoleDomainRecords & ScriptDomainRecords & SearchDomainRecords & SettingsDomainRecords & TemplateDomainRecords;
29
+ export type DomainRecords = AssetDomainRecords & ConnectionDomainRecords & ContactDomainRecords & EventDomainRecords & GeneralDomainRecords & MediaDomainRecords & PermissionDomainRecords & PlanningDomainRecords & PublishDomainRecords & RoleDomainRecords & ScriptDomainRecords & SearchDomainRecords & SettingsDomainRecords & TemplateDomainRecords;
@@ -1,5 +1,6 @@
1
1
  export * from './asset.js';
2
2
  export * from './connection.js';
3
+ export * from './contact.js';
3
4
  export * from './event.js';
4
5
  export * from './general.js';
5
6
  export * from './media.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nxtedition/types",
3
- "version": "1.5.0",
3
+ "version": "1.6.0",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "prepare": "ts-patch install && typia patch",