@nxtedition/types 1.0.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.
@@ -0,0 +1,13 @@
1
+ import { type AssertionGuard as __AssertionGuard } from "typia";
2
+ export interface RoleDomainRecords {
3
+ ":role.tags": RoleTagsRecord;
4
+ }
5
+ export interface RoleTagsRecord {
6
+ value: string[];
7
+ }
8
+ export declare const isRoleTagsRecord: (input: unknown) => input is RoleTagsRecord;
9
+ export declare const assertRoleTagsRecord: (input: unknown) => RoleTagsRecord;
10
+ export declare const randomRoleTagsRecord: () => RoleTagsRecord;
11
+ export declare const assertGuardRoleTagsRecord: __AssertionGuard<RoleTagsRecord>;
12
+ export declare const stringifyRoleTagsRecord: (input: RoleTagsRecord) => string;
13
+ export declare const assertStringifyRoleTagsRecord: (input: unknown) => string;
@@ -0,0 +1,119 @@
1
+ import __typia from "typia";
2
+ export const isRoleTagsRecord = input => {
3
+ const $io0 = input => Array.isArray(input.value) && input.value.every(elem => "string" === typeof elem);
4
+ return "object" === typeof input && null !== input && $io0(input);
5
+ };
6
+ export const assertRoleTagsRecord = (input, errorFactory) => {
7
+ const __is = input => {
8
+ const $io0 = input => Array.isArray(input.value) && input.value.every(elem => "string" === typeof elem);
9
+ return "object" === typeof input && null !== 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) => (Array.isArray(input.value) || $guard(_exceptionable, {
15
+ path: _path + ".value",
16
+ expected: "Array<string>",
17
+ value: input.value
18
+ }, errorFactory)) && input.value.every((elem, _index1) => "string" === typeof elem || $guard(_exceptionable, {
19
+ path: _path + ".value[" + _index1 + "]",
20
+ expected: "string",
21
+ value: elem
22
+ }, errorFactory)) || $guard(_exceptionable, {
23
+ path: _path + ".value",
24
+ expected: "Array<string>",
25
+ value: input.value
26
+ }, errorFactory);
27
+ return ("object" === typeof input && null !== input || $guard(true, {
28
+ path: _path + "",
29
+ expected: "RoleTagsRecord",
30
+ value: input
31
+ }, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
32
+ path: _path + "",
33
+ expected: "RoleTagsRecord",
34
+ value: input
35
+ }, errorFactory);
36
+ })(input, "$input", true);
37
+ return input;
38
+ };
39
+ export const randomRoleTagsRecord = generator => {
40
+ const $generator = __typia.createRandom.generator;
41
+ const $ro0 = (_recursive = false, _depth = 0) => ({
42
+ value: (generator?.array ?? $generator.array)(() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)())
43
+ });
44
+ return $ro0();
45
+ };
46
+ export const assertGuardRoleTagsRecord = (input, errorFactory) => {
47
+ const __is = input => {
48
+ const $io0 = input => Array.isArray(input.value) && input.value.every(elem => "string" === typeof elem);
49
+ return "object" === typeof input && null !== input && $io0(input);
50
+ };
51
+ if (false === __is(input))
52
+ ((input, _path, _exceptionable = true) => {
53
+ const $guard = __typia.createAssertGuard.guard;
54
+ const $ao0 = (input, _path, _exceptionable = true) => (Array.isArray(input.value) || $guard(_exceptionable, {
55
+ path: _path + ".value",
56
+ expected: "Array<string>",
57
+ value: input.value
58
+ }, errorFactory)) && input.value.every((elem, _index1) => "string" === typeof elem || $guard(_exceptionable, {
59
+ path: _path + ".value[" + _index1 + "]",
60
+ expected: "string",
61
+ value: elem
62
+ }, errorFactory)) || $guard(_exceptionable, {
63
+ path: _path + ".value",
64
+ expected: "Array<string>",
65
+ value: input.value
66
+ }, errorFactory);
67
+ return ("object" === typeof input && null !== input || $guard(true, {
68
+ path: _path + "",
69
+ expected: "RoleTagsRecord",
70
+ value: input
71
+ }, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
72
+ path: _path + "",
73
+ expected: "RoleTagsRecord",
74
+ value: input
75
+ }, errorFactory);
76
+ })(input, "$input", true);
77
+ };
78
+ export const stringifyRoleTagsRecord = input => {
79
+ const $string = __typia.json.createStringify.string;
80
+ const $so0 = input => `{"value":${`[${input.value.map(elem => $string(elem)).join(",")}]`}}`;
81
+ return $so0(input);
82
+ };
83
+ export const assertStringifyRoleTagsRecord = (input, errorFactory) => { const assert = (input, errorFactory) => {
84
+ const __is = input => {
85
+ const $io0 = input => Array.isArray(input.value) && input.value.every(elem => "string" === typeof elem);
86
+ return "object" === typeof input && null !== input && $io0(input);
87
+ };
88
+ if (false === __is(input))
89
+ ((input, _path, _exceptionable = true) => {
90
+ const $guard = __typia.json.createAssertStringify.guard;
91
+ const $ao0 = (input, _path, _exceptionable = true) => (Array.isArray(input.value) || $guard(_exceptionable, {
92
+ path: _path + ".value",
93
+ expected: "Array<string>",
94
+ value: input.value
95
+ }, errorFactory)) && input.value.every((elem, _index1) => "string" === typeof elem || $guard(_exceptionable, {
96
+ path: _path + ".value[" + _index1 + "]",
97
+ expected: "string",
98
+ value: elem
99
+ }, errorFactory)) || $guard(_exceptionable, {
100
+ path: _path + ".value",
101
+ expected: "Array<string>",
102
+ value: input.value
103
+ }, errorFactory);
104
+ return ("object" === typeof input && null !== input || $guard(true, {
105
+ path: _path + "",
106
+ expected: "RoleTagsRecord",
107
+ value: input
108
+ }, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
109
+ path: _path + "",
110
+ expected: "RoleTagsRecord",
111
+ value: input
112
+ }, errorFactory);
113
+ })(input, "$input", true);
114
+ return input;
115
+ }; const stringify = input => {
116
+ const $string = __typia.json.createAssertStringify.string;
117
+ const $so0 = input => `{"value":${`[${input.value.map(elem => $string(elem)).join(",")}]`}}`;
118
+ return $so0(input);
119
+ }; return stringify(assert(input, errorFactory)); };
@@ -0,0 +1,13 @@
1
+ import { type AssertionGuard as __AssertionGuard } from "typia";
2
+ export interface ScriptDomainRecords {
3
+ ":script.children": ScriptChildrenRecord;
4
+ }
5
+ export interface ScriptChildrenRecord {
6
+ value?: string[];
7
+ }
8
+ export declare const isScriptChildrenRecord: (input: unknown) => input is ScriptChildrenRecord;
9
+ export declare const assertScriptChildrenRecord: (input: unknown) => ScriptChildrenRecord;
10
+ export declare const randomScriptChildrenRecord: () => ScriptChildrenRecord;
11
+ export declare const assertGuardScriptChildrenRecord: __AssertionGuard<ScriptChildrenRecord>;
12
+ export declare const stringifyScriptChildrenRecord: (input: ScriptChildrenRecord) => string;
13
+ export declare const assertStringifyScriptChildrenRecord: (input: unknown) => string;
@@ -0,0 +1,125 @@
1
+ import __typia from "typia";
2
+ export const isScriptChildrenRecord = input => {
3
+ const $io0 = input => undefined === input.value || Array.isArray(input.value) && input.value.every(elem => "string" === typeof elem);
4
+ return "object" === typeof input && null !== input && false === Array.isArray(input) && $io0(input);
5
+ };
6
+ export const assertScriptChildrenRecord = (input, errorFactory) => {
7
+ const __is = input => {
8
+ const $io0 = input => undefined === input.value || Array.isArray(input.value) && input.value.every(elem => "string" === typeof elem);
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.value || (Array.isArray(input.value) || $guard(_exceptionable, {
15
+ path: _path + ".value",
16
+ expected: "(Array<string> | undefined)",
17
+ value: input.value
18
+ }, errorFactory)) && input.value.every((elem, _index1) => "string" === typeof elem || $guard(_exceptionable, {
19
+ path: _path + ".value[" + _index1 + "]",
20
+ expected: "string",
21
+ value: elem
22
+ }, errorFactory)) || $guard(_exceptionable, {
23
+ path: _path + ".value",
24
+ expected: "(Array<string> | undefined)",
25
+ value: input.value
26
+ }, errorFactory);
27
+ return ("object" === typeof input && null !== input && false === Array.isArray(input) || $guard(true, {
28
+ path: _path + "",
29
+ expected: "ScriptChildrenRecord",
30
+ value: input
31
+ }, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
32
+ path: _path + "",
33
+ expected: "ScriptChildrenRecord",
34
+ value: input
35
+ }, errorFactory);
36
+ })(input, "$input", true);
37
+ return input;
38
+ };
39
+ export const randomScriptChildrenRecord = generator => {
40
+ const $generator = __typia.createRandom.generator;
41
+ const $pick = __typia.createRandom.pick;
42
+ const $ro0 = (_recursive = false, _depth = 0) => ({
43
+ value: $pick([
44
+ () => undefined,
45
+ () => (generator?.array ?? $generator.array)(() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)())
46
+ ])()
47
+ });
48
+ return $ro0();
49
+ };
50
+ export const assertGuardScriptChildrenRecord = (input, errorFactory) => {
51
+ const __is = input => {
52
+ const $io0 = input => undefined === input.value || Array.isArray(input.value) && input.value.every(elem => "string" === typeof elem);
53
+ return "object" === typeof input && null !== input && false === Array.isArray(input) && $io0(input);
54
+ };
55
+ if (false === __is(input))
56
+ ((input, _path, _exceptionable = true) => {
57
+ const $guard = __typia.createAssertGuard.guard;
58
+ const $ao0 = (input, _path, _exceptionable = true) => undefined === input.value || (Array.isArray(input.value) || $guard(_exceptionable, {
59
+ path: _path + ".value",
60
+ expected: "(Array<string> | undefined)",
61
+ value: input.value
62
+ }, errorFactory)) && input.value.every((elem, _index1) => "string" === typeof elem || $guard(_exceptionable, {
63
+ path: _path + ".value[" + _index1 + "]",
64
+ expected: "string",
65
+ value: elem
66
+ }, errorFactory)) || $guard(_exceptionable, {
67
+ path: _path + ".value",
68
+ expected: "(Array<string> | undefined)",
69
+ value: input.value
70
+ }, errorFactory);
71
+ return ("object" === typeof input && null !== input && false === Array.isArray(input) || $guard(true, {
72
+ path: _path + "",
73
+ expected: "ScriptChildrenRecord",
74
+ value: input
75
+ }, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
76
+ path: _path + "",
77
+ expected: "ScriptChildrenRecord",
78
+ value: input
79
+ }, errorFactory);
80
+ })(input, "$input", true);
81
+ };
82
+ export const stringifyScriptChildrenRecord = input => {
83
+ const $string = __typia.json.createStringify.string;
84
+ const $tail = __typia.json.createStringify.tail;
85
+ const $so0 = input => `{${$tail(`${undefined === input.value ? "" : `"value":${undefined !== input.value ? `[${input.value.map(elem => $string(elem)).join(",")}]` : undefined}`}`)}}`;
86
+ return $so0(input);
87
+ };
88
+ export const assertStringifyScriptChildrenRecord = (input, errorFactory) => { const assert = (input, errorFactory) => {
89
+ const __is = input => {
90
+ const $io0 = input => undefined === input.value || Array.isArray(input.value) && input.value.every(elem => "string" === typeof elem);
91
+ return "object" === typeof input && null !== input && false === Array.isArray(input) && $io0(input);
92
+ };
93
+ if (false === __is(input))
94
+ ((input, _path, _exceptionable = true) => {
95
+ const $guard = __typia.json.createAssertStringify.guard;
96
+ const $ao0 = (input, _path, _exceptionable = true) => undefined === input.value || (Array.isArray(input.value) || $guard(_exceptionable, {
97
+ path: _path + ".value",
98
+ expected: "(Array<string> | undefined)",
99
+ value: input.value
100
+ }, errorFactory)) && input.value.every((elem, _index1) => "string" === typeof elem || $guard(_exceptionable, {
101
+ path: _path + ".value[" + _index1 + "]",
102
+ expected: "string",
103
+ value: elem
104
+ }, errorFactory)) || $guard(_exceptionable, {
105
+ path: _path + ".value",
106
+ expected: "(Array<string> | undefined)",
107
+ value: input.value
108
+ }, errorFactory);
109
+ return ("object" === typeof input && null !== input && false === Array.isArray(input) || $guard(true, {
110
+ path: _path + "",
111
+ expected: "ScriptChildrenRecord",
112
+ value: input
113
+ }, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
114
+ path: _path + "",
115
+ expected: "ScriptChildrenRecord",
116
+ value: input
117
+ }, errorFactory);
118
+ })(input, "$input", true);
119
+ return input;
120
+ }; const stringify = input => {
121
+ const $string = __typia.json.createAssertStringify.string;
122
+ const $tail = __typia.json.createAssertStringify.tail;
123
+ const $so0 = input => `{${$tail(`${undefined === input.value ? "" : `"value":${undefined !== input.value ? `[${input.value.map(elem => $string(elem)).join(",")}]` : undefined}`}`)}}`;
124
+ return $so0(input);
125
+ }; return stringify(assert(input, errorFactory)); };
@@ -0,0 +1,13 @@
1
+ import { type AssertionGuard as __AssertionGuard } from "typia";
2
+ export interface SearchDomainRecords {
3
+ ":search": SearchRecord;
4
+ }
5
+ export interface SearchRecord {
6
+ hits: string[];
7
+ }
8
+ export declare const isSearchRecord: (input: unknown) => input is SearchRecord;
9
+ export declare const assertSearchRecord: (input: unknown) => SearchRecord;
10
+ export declare const randomSearchRecord: () => SearchRecord;
11
+ export declare const assertGuardSearchRecord: __AssertionGuard<SearchRecord>;
12
+ export declare const stringifySearchRecord: (input: SearchRecord) => string;
13
+ export declare const assertStringifySearchRecord: (input: unknown) => string;
@@ -0,0 +1,119 @@
1
+ import __typia from "typia";
2
+ export const isSearchRecord = input => {
3
+ const $io0 = input => Array.isArray(input.hits) && input.hits.every(elem => "string" === typeof elem);
4
+ return "object" === typeof input && null !== input && $io0(input);
5
+ };
6
+ export const assertSearchRecord = (input, errorFactory) => {
7
+ const __is = input => {
8
+ const $io0 = input => Array.isArray(input.hits) && input.hits.every(elem => "string" === typeof elem);
9
+ return "object" === typeof input && null !== 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) => (Array.isArray(input.hits) || $guard(_exceptionable, {
15
+ path: _path + ".hits",
16
+ expected: "Array<string>",
17
+ value: input.hits
18
+ }, errorFactory)) && input.hits.every((elem, _index1) => "string" === typeof elem || $guard(_exceptionable, {
19
+ path: _path + ".hits[" + _index1 + "]",
20
+ expected: "string",
21
+ value: elem
22
+ }, errorFactory)) || $guard(_exceptionable, {
23
+ path: _path + ".hits",
24
+ expected: "Array<string>",
25
+ value: input.hits
26
+ }, errorFactory);
27
+ return ("object" === typeof input && null !== input || $guard(true, {
28
+ path: _path + "",
29
+ expected: "SearchRecord",
30
+ value: input
31
+ }, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
32
+ path: _path + "",
33
+ expected: "SearchRecord",
34
+ value: input
35
+ }, errorFactory);
36
+ })(input, "$input", true);
37
+ return input;
38
+ };
39
+ export const randomSearchRecord = generator => {
40
+ const $generator = __typia.createRandom.generator;
41
+ const $ro0 = (_recursive = false, _depth = 0) => ({
42
+ hits: (generator?.array ?? $generator.array)(() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)())
43
+ });
44
+ return $ro0();
45
+ };
46
+ export const assertGuardSearchRecord = (input, errorFactory) => {
47
+ const __is = input => {
48
+ const $io0 = input => Array.isArray(input.hits) && input.hits.every(elem => "string" === typeof elem);
49
+ return "object" === typeof input && null !== input && $io0(input);
50
+ };
51
+ if (false === __is(input))
52
+ ((input, _path, _exceptionable = true) => {
53
+ const $guard = __typia.createAssertGuard.guard;
54
+ const $ao0 = (input, _path, _exceptionable = true) => (Array.isArray(input.hits) || $guard(_exceptionable, {
55
+ path: _path + ".hits",
56
+ expected: "Array<string>",
57
+ value: input.hits
58
+ }, errorFactory)) && input.hits.every((elem, _index1) => "string" === typeof elem || $guard(_exceptionable, {
59
+ path: _path + ".hits[" + _index1 + "]",
60
+ expected: "string",
61
+ value: elem
62
+ }, errorFactory)) || $guard(_exceptionable, {
63
+ path: _path + ".hits",
64
+ expected: "Array<string>",
65
+ value: input.hits
66
+ }, errorFactory);
67
+ return ("object" === typeof input && null !== input || $guard(true, {
68
+ path: _path + "",
69
+ expected: "SearchRecord",
70
+ value: input
71
+ }, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
72
+ path: _path + "",
73
+ expected: "SearchRecord",
74
+ value: input
75
+ }, errorFactory);
76
+ })(input, "$input", true);
77
+ };
78
+ export const stringifySearchRecord = input => {
79
+ const $string = __typia.json.createStringify.string;
80
+ const $so0 = input => `{"hits":${`[${input.hits.map(elem => $string(elem)).join(",")}]`}}`;
81
+ return $so0(input);
82
+ };
83
+ export const assertStringifySearchRecord = (input, errorFactory) => { const assert = (input, errorFactory) => {
84
+ const __is = input => {
85
+ const $io0 = input => Array.isArray(input.hits) && input.hits.every(elem => "string" === typeof elem);
86
+ return "object" === typeof input && null !== input && $io0(input);
87
+ };
88
+ if (false === __is(input))
89
+ ((input, _path, _exceptionable = true) => {
90
+ const $guard = __typia.json.createAssertStringify.guard;
91
+ const $ao0 = (input, _path, _exceptionable = true) => (Array.isArray(input.hits) || $guard(_exceptionable, {
92
+ path: _path + ".hits",
93
+ expected: "Array<string>",
94
+ value: input.hits
95
+ }, errorFactory)) && input.hits.every((elem, _index1) => "string" === typeof elem || $guard(_exceptionable, {
96
+ path: _path + ".hits[" + _index1 + "]",
97
+ expected: "string",
98
+ value: elem
99
+ }, errorFactory)) || $guard(_exceptionable, {
100
+ path: _path + ".hits",
101
+ expected: "Array<string>",
102
+ value: input.hits
103
+ }, errorFactory);
104
+ return ("object" === typeof input && null !== input || $guard(true, {
105
+ path: _path + "",
106
+ expected: "SearchRecord",
107
+ value: input
108
+ }, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
109
+ path: _path + "",
110
+ expected: "SearchRecord",
111
+ value: input
112
+ }, errorFactory);
113
+ })(input, "$input", true);
114
+ return input;
115
+ }; const stringify = input => {
116
+ const $string = __typia.json.createAssertStringify.string;
117
+ const $so0 = input => `{"hits":${`[${input.hits.map(elem => $string(elem)).join(",")}]`}}`;
118
+ return $so0(input);
119
+ }; return stringify(assert(input, errorFactory)); };
@@ -0,0 +1,13 @@
1
+ import { type AssertionGuard as __AssertionGuard } from "typia";
2
+ import type { Settings } from '../common/index.js';
3
+ import type { PartialDeep } from 'type-fest';
4
+ export interface SettingsDomainRecords {
5
+ ":settings": SettingsRecord;
6
+ }
7
+ export type SettingsRecord = PartialDeep<Settings>;
8
+ export declare const isSettingsRecord: (input: unknown) => input is import("type-fest/source/partial-deep.js").PartialObjectDeep<Settings, {}>;
9
+ export declare const assertSettingsRecord: (input: unknown) => import("type-fest/source/partial-deep.js").PartialObjectDeep<Settings, {}>;
10
+ export declare const randomSettingsRecord: () => import("type-fest/source/partial-deep.js").PartialObjectDeep<Settings, {}>;
11
+ export declare const assertGuardSettingsRecord: __AssertionGuard<SettingsRecord>;
12
+ export declare const stringifySettingsRecord: (input: import("type-fest/source/partial-deep.js").PartialObjectDeep<Settings, {}>) => string;
13
+ export declare const assertStringifySettingsRecord: (input: unknown) => string;