@nxtedition/types 23.0.3 → 23.0.5

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,8 @@
1
+ import { type AssertionGuard as __AssertionGuard } from "typia";
2
+ export type IsoTimestamp = string;
3
+ export declare const isIsoTimestamp: (input: unknown) => input is string;
4
+ export declare const assertIsoTimestamp: (input: unknown) => string;
5
+ export declare const randomIsoTimestamp: () => string;
6
+ export declare const assertGuardIsoTimestamp: __AssertionGuard<IsoTimestamp>;
7
+ export declare const stringifyIsoTimestamp: (input: string) => string;
8
+ export declare const assertStringifyIsoTimestamp: (input: unknown) => string;
@@ -0,0 +1,59 @@
1
+ import __typia from "typia";
2
+ export const isIsoTimestamp = input => {
3
+ return "string" === typeof input;
4
+ };
5
+ export const assertIsoTimestamp = (input, errorFactory) => {
6
+ const __is = input => {
7
+ return "string" === typeof input;
8
+ };
9
+ if (false === __is(input))
10
+ ((input, _path, _exceptionable = true) => {
11
+ const $guard = __typia.createAssert.guard;
12
+ return "string" === typeof input || $guard(true, {
13
+ path: _path + "",
14
+ expected: "string",
15
+ value: input
16
+ }, errorFactory);
17
+ })(input, "$input", true);
18
+ return input;
19
+ };
20
+ export const randomIsoTimestamp = generator => {
21
+ const $generator = __typia.createRandom.generator;
22
+ return (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)();
23
+ };
24
+ export const assertGuardIsoTimestamp = (input, errorFactory) => {
25
+ const __is = input => {
26
+ return "string" === typeof input;
27
+ };
28
+ if (false === __is(input))
29
+ ((input, _path, _exceptionable = true) => {
30
+ const $guard = __typia.createAssertGuard.guard;
31
+ return "string" === typeof input || $guard(true, {
32
+ path: _path + "",
33
+ expected: "string",
34
+ value: input
35
+ }, errorFactory);
36
+ })(input, "$input", true);
37
+ };
38
+ export const stringifyIsoTimestamp = input => {
39
+ const $string = __typia.json.createStringify.string;
40
+ return $string(input);
41
+ };
42
+ export const assertStringifyIsoTimestamp = (input, errorFactory) => { const assert = (input, errorFactory) => {
43
+ const __is = input => {
44
+ return "string" === typeof input;
45
+ };
46
+ if (false === __is(input))
47
+ ((input, _path, _exceptionable = true) => {
48
+ const $guard = __typia.json.createAssertStringify.guard;
49
+ return "string" === typeof input || $guard(true, {
50
+ path: _path + "",
51
+ expected: "string",
52
+ value: input
53
+ }, errorFactory);
54
+ })(input, "$input", true);
55
+ return input;
56
+ }; const stringify = input => {
57
+ const $string = __typia.json.createAssertStringify.string;
58
+ return $string(input);
59
+ }; return stringify(assert(input, errorFactory)); };
@@ -1,10 +1,15 @@
1
1
  import { type AssertionGuard as __AssertionGuard } from "typia";
2
2
  export * from './block.js';
3
3
  export * from './clone.js';
4
+ export * from './date.js';
4
5
  export * from './file.js';
5
6
  export * from './location.js';
6
7
  export * from './nxtpression.js';
7
8
  export * from './lock.js';
9
+ export * from './media.js';
10
+ export * from './pipeline.js';
11
+ export * from './promoted-tag.js';
12
+ export * from './render-preset.js';
8
13
  export * from './rule.js';
9
14
  export * from './search.js';
10
15
  export * from './settings.js';
@@ -1,10 +1,15 @@
1
1
  import __typia from "typia";
2
2
  export * from './block.js';
3
3
  export * from './clone.js';
4
+ export * from './date.js';
4
5
  export * from './file.js';
5
6
  export * from './location.js';
6
7
  export * from './nxtpression.js';
7
8
  export * from './lock.js';
9
+ export * from './media.js';
10
+ export * from './pipeline.js';
11
+ export * from './promoted-tag.js';
12
+ export * from './render-preset.js';
8
13
  export * from './rule.js';
9
14
  export * from './search.js';
10
15
  export * from './settings.js';
@@ -0,0 +1,8 @@
1
+ import { type AssertionGuard as __AssertionGuard } from "typia";
2
+ export type MediaType = "audio" | "video" | "image";
3
+ export declare const isMediaType: (input: unknown) => input is MediaType;
4
+ export declare const assertMediaType: (input: unknown) => MediaType;
5
+ export declare const randomMediaType: () => MediaType;
6
+ export declare const assertGuardMediaType: __AssertionGuard<MediaType>;
7
+ export declare const stringifyMediaType: (input: MediaType) => string;
8
+ export declare const assertStringifyMediaType: (input: unknown) => string;
@@ -0,0 +1,83 @@
1
+ import __typia from "typia";
2
+ export const isMediaType = input => {
3
+ return "audio" === input || "video" === input || "image" === input;
4
+ };
5
+ export const assertMediaType = (input, errorFactory) => {
6
+ const __is = input => {
7
+ return "audio" === input || "video" === input || "image" === input;
8
+ };
9
+ if (false === __is(input))
10
+ ((input, _path, _exceptionable = true) => {
11
+ const $guard = __typia.createAssert.guard;
12
+ return "audio" === input || "video" === input || "image" === input || $guard(true, {
13
+ path: _path + "",
14
+ expected: "(\"audio\" | \"image\" | \"video\")",
15
+ value: input
16
+ }, errorFactory);
17
+ })(input, "$input", true);
18
+ return input;
19
+ };
20
+ export const randomMediaType = generator => {
21
+ const $pick = __typia.createRandom.pick;
22
+ return $pick([
23
+ () => "audio",
24
+ () => "video",
25
+ () => "image"
26
+ ])();
27
+ };
28
+ export const assertGuardMediaType = (input, errorFactory) => {
29
+ const __is = input => {
30
+ return "audio" === input || "video" === input || "image" === input;
31
+ };
32
+ if (false === __is(input))
33
+ ((input, _path, _exceptionable = true) => {
34
+ const $guard = __typia.createAssertGuard.guard;
35
+ return "audio" === input || "video" === input || "image" === input || $guard(true, {
36
+ path: _path + "",
37
+ expected: "(\"audio\" | \"image\" | \"video\")",
38
+ value: input
39
+ }, errorFactory);
40
+ })(input, "$input", true);
41
+ };
42
+ export const stringifyMediaType = input => {
43
+ const $string = __typia.json.createStringify.string;
44
+ const $throws = __typia.json.createStringify.throws;
45
+ return (() => {
46
+ if ("string" === typeof input)
47
+ return $string(input);
48
+ if ("string" === typeof input)
49
+ return "\"" + input + "\"";
50
+ $throws({
51
+ expected: "(\"audio\" | \"image\" | \"video\")",
52
+ value: input
53
+ });
54
+ })();
55
+ };
56
+ export const assertStringifyMediaType = (input, errorFactory) => { const assert = (input, errorFactory) => {
57
+ const __is = input => {
58
+ return "audio" === input || "video" === input || "image" === input;
59
+ };
60
+ if (false === __is(input))
61
+ ((input, _path, _exceptionable = true) => {
62
+ const $guard = __typia.json.createAssertStringify.guard;
63
+ return "audio" === input || "video" === input || "image" === input || $guard(true, {
64
+ path: _path + "",
65
+ expected: "(\"audio\" | \"image\" | \"video\")",
66
+ value: input
67
+ }, errorFactory);
68
+ })(input, "$input", true);
69
+ return input;
70
+ }; const stringify = input => {
71
+ const $string = __typia.json.createAssertStringify.string;
72
+ const $throws = __typia.json.createAssertStringify.throws;
73
+ return (() => {
74
+ if ("string" === typeof input)
75
+ return $string(input);
76
+ if ("string" === typeof input)
77
+ return "\"" + input + "\"";
78
+ $throws({
79
+ expected: "(\"audio\" | \"image\" | \"video\")",
80
+ value: input
81
+ });
82
+ })();
83
+ }; return stringify(assert(input, errorFactory)); };
@@ -0,0 +1,8 @@
1
+ import { type AssertionGuard as __AssertionGuard } from "typia";
2
+ export type PipelineSortMode = "default" | "manual" | "az" | "za" | "newest" | "oldest" | "mostrecent" | "leastrecent";
3
+ export declare const isPipelineSortMode: (input: unknown) => input is PipelineSortMode;
4
+ export declare const assertPipelineSortMode: (input: unknown) => PipelineSortMode;
5
+ export declare const randomPipelineSortMode: () => PipelineSortMode;
6
+ export declare const assertGuardPipelineSortMode: __AssertionGuard<PipelineSortMode>;
7
+ export declare const stringifyPipelineSortMode: (input: PipelineSortMode) => string;
8
+ export declare const assertStringifyPipelineSortMode: (input: unknown) => string;
@@ -0,0 +1,88 @@
1
+ import __typia from "typia";
2
+ export const isPipelineSortMode = input => {
3
+ return "default" === input || "manual" === input || "az" === input || "za" === input || "newest" === input || "oldest" === input || "mostrecent" === input || "leastrecent" === input;
4
+ };
5
+ export const assertPipelineSortMode = (input, errorFactory) => {
6
+ const __is = input => {
7
+ return "default" === input || "manual" === input || "az" === input || "za" === input || "newest" === input || "oldest" === input || "mostrecent" === input || "leastrecent" === input;
8
+ };
9
+ if (false === __is(input))
10
+ ((input, _path, _exceptionable = true) => {
11
+ const $guard = __typia.createAssert.guard;
12
+ return "default" === input || "manual" === input || "az" === input || "za" === input || "newest" === input || "oldest" === input || "mostrecent" === input || "leastrecent" === input || $guard(true, {
13
+ path: _path + "",
14
+ expected: "(\"az\" | \"default\" | \"leastrecent\" | \"manual\" | \"mostrecent\" | \"newest\" | \"oldest\" | \"za\")",
15
+ value: input
16
+ }, errorFactory);
17
+ })(input, "$input", true);
18
+ return input;
19
+ };
20
+ export const randomPipelineSortMode = generator => {
21
+ const $pick = __typia.createRandom.pick;
22
+ return $pick([
23
+ () => "default",
24
+ () => "manual",
25
+ () => "az",
26
+ () => "za",
27
+ () => "newest",
28
+ () => "oldest",
29
+ () => "mostrecent",
30
+ () => "leastrecent"
31
+ ])();
32
+ };
33
+ export const assertGuardPipelineSortMode = (input, errorFactory) => {
34
+ const __is = input => {
35
+ return "default" === input || "manual" === input || "az" === input || "za" === input || "newest" === input || "oldest" === input || "mostrecent" === input || "leastrecent" === input;
36
+ };
37
+ if (false === __is(input))
38
+ ((input, _path, _exceptionable = true) => {
39
+ const $guard = __typia.createAssertGuard.guard;
40
+ return "default" === input || "manual" === input || "az" === input || "za" === input || "newest" === input || "oldest" === input || "mostrecent" === input || "leastrecent" === input || $guard(true, {
41
+ path: _path + "",
42
+ expected: "(\"az\" | \"default\" | \"leastrecent\" | \"manual\" | \"mostrecent\" | \"newest\" | \"oldest\" | \"za\")",
43
+ value: input
44
+ }, errorFactory);
45
+ })(input, "$input", true);
46
+ };
47
+ export const stringifyPipelineSortMode = input => {
48
+ const $string = __typia.json.createStringify.string;
49
+ const $throws = __typia.json.createStringify.throws;
50
+ return (() => {
51
+ if ("string" === typeof input)
52
+ return $string(input);
53
+ if ("string" === typeof input)
54
+ return "\"" + input + "\"";
55
+ $throws({
56
+ expected: "(\"az\" | \"default\" | \"leastrecent\" | \"manual\" | \"mostrecent\" | \"newest\" | \"oldest\" | \"za\")",
57
+ value: input
58
+ });
59
+ })();
60
+ };
61
+ export const assertStringifyPipelineSortMode = (input, errorFactory) => { const assert = (input, errorFactory) => {
62
+ const __is = input => {
63
+ return "default" === input || "manual" === input || "az" === input || "za" === input || "newest" === input || "oldest" === input || "mostrecent" === input || "leastrecent" === input;
64
+ };
65
+ if (false === __is(input))
66
+ ((input, _path, _exceptionable = true) => {
67
+ const $guard = __typia.json.createAssertStringify.guard;
68
+ return "default" === input || "manual" === input || "az" === input || "za" === input || "newest" === input || "oldest" === input || "mostrecent" === input || "leastrecent" === input || $guard(true, {
69
+ path: _path + "",
70
+ expected: "(\"az\" | \"default\" | \"leastrecent\" | \"manual\" | \"mostrecent\" | \"newest\" | \"oldest\" | \"za\")",
71
+ value: input
72
+ }, errorFactory);
73
+ })(input, "$input", true);
74
+ return input;
75
+ }; const stringify = input => {
76
+ const $string = __typia.json.createAssertStringify.string;
77
+ const $throws = __typia.json.createAssertStringify.throws;
78
+ return (() => {
79
+ if ("string" === typeof input)
80
+ return $string(input);
81
+ if ("string" === typeof input)
82
+ return "\"" + input + "\"";
83
+ $throws({
84
+ expected: "(\"az\" | \"default\" | \"leastrecent\" | \"manual\" | \"mostrecent\" | \"newest\" | \"oldest\" | \"za\")",
85
+ value: input
86
+ });
87
+ })();
88
+ }; return stringify(assert(input, errorFactory)); };
@@ -0,0 +1,13 @@
1
+ import { type AssertionGuard as __AssertionGuard } from "typia";
2
+ export interface PromotedTag {
3
+ name: string | null;
4
+ icon: string | null;
5
+ color: string | null;
6
+ description: string | null;
7
+ }
8
+ export declare const isPromotedTag: (input: unknown) => input is PromotedTag;
9
+ export declare const assertPromotedTag: (input: unknown) => PromotedTag;
10
+ export declare const randomPromotedTag: () => PromotedTag;
11
+ export declare const assertGuardPromotedTag: __AssertionGuard<PromotedTag>;
12
+ export declare const stringifyPromotedTag: (input: PromotedTag) => string;
13
+ export declare const assertStringifyPromotedTag: (input: unknown) => string;
@@ -0,0 +1,147 @@
1
+ import __typia from "typia";
2
+ export const isPromotedTag = input => {
3
+ const $io0 = input => (null === input.name || "string" === typeof input.name) && (null === input.icon || "string" === typeof input.icon) && (null === input.color || "string" === typeof input.color) && (null === input.description || "string" === typeof input.description);
4
+ return "object" === typeof input && null !== input && $io0(input);
5
+ };
6
+ export const assertPromotedTag = (input, errorFactory) => {
7
+ const __is = input => {
8
+ const $io0 = input => (null === input.name || "string" === typeof input.name) && (null === input.icon || "string" === typeof input.icon) && (null === input.color || "string" === typeof input.color) && (null === input.description || "string" === typeof input.description);
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) => (null === input.name || "string" === typeof input.name || $guard(_exceptionable, {
15
+ path: _path + ".name",
16
+ expected: "(null | string)",
17
+ value: input.name
18
+ }, errorFactory)) && (null === input.icon || "string" === typeof input.icon || $guard(_exceptionable, {
19
+ path: _path + ".icon",
20
+ expected: "(null | string)",
21
+ value: input.icon
22
+ }, errorFactory)) && (null === input.color || "string" === typeof input.color || $guard(_exceptionable, {
23
+ path: _path + ".color",
24
+ expected: "(null | string)",
25
+ value: input.color
26
+ }, errorFactory)) && (null === input.description || "string" === typeof input.description || $guard(_exceptionable, {
27
+ path: _path + ".description",
28
+ expected: "(null | string)",
29
+ value: input.description
30
+ }, errorFactory));
31
+ return ("object" === typeof input && null !== input || $guard(true, {
32
+ path: _path + "",
33
+ expected: "PromotedTag",
34
+ value: input
35
+ }, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
36
+ path: _path + "",
37
+ expected: "PromotedTag",
38
+ value: input
39
+ }, errorFactory);
40
+ })(input, "$input", true);
41
+ return input;
42
+ };
43
+ export const randomPromotedTag = generator => {
44
+ const $generator = __typia.createRandom.generator;
45
+ const $pick = __typia.createRandom.pick;
46
+ const $ro0 = (_recursive = false, _depth = 0) => ({
47
+ name: $pick([
48
+ () => null,
49
+ () => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
50
+ ])(),
51
+ icon: $pick([
52
+ () => null,
53
+ () => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
54
+ ])(),
55
+ color: $pick([
56
+ () => null,
57
+ () => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
58
+ ])(),
59
+ description: $pick([
60
+ () => null,
61
+ () => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
62
+ ])()
63
+ });
64
+ return $ro0();
65
+ };
66
+ export const assertGuardPromotedTag = (input, errorFactory) => {
67
+ const __is = input => {
68
+ const $io0 = input => (null === input.name || "string" === typeof input.name) && (null === input.icon || "string" === typeof input.icon) && (null === input.color || "string" === typeof input.color) && (null === input.description || "string" === typeof input.description);
69
+ return "object" === typeof input && null !== 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) => (null === input.name || "string" === typeof input.name || $guard(_exceptionable, {
75
+ path: _path + ".name",
76
+ expected: "(null | string)",
77
+ value: input.name
78
+ }, errorFactory)) && (null === input.icon || "string" === typeof input.icon || $guard(_exceptionable, {
79
+ path: _path + ".icon",
80
+ expected: "(null | string)",
81
+ value: input.icon
82
+ }, errorFactory)) && (null === input.color || "string" === typeof input.color || $guard(_exceptionable, {
83
+ path: _path + ".color",
84
+ expected: "(null | string)",
85
+ value: input.color
86
+ }, errorFactory)) && (null === input.description || "string" === typeof input.description || $guard(_exceptionable, {
87
+ path: _path + ".description",
88
+ expected: "(null | string)",
89
+ value: input.description
90
+ }, errorFactory));
91
+ return ("object" === typeof input && null !== input || $guard(true, {
92
+ path: _path + "",
93
+ expected: "PromotedTag",
94
+ value: input
95
+ }, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
96
+ path: _path + "",
97
+ expected: "PromotedTag",
98
+ value: input
99
+ }, errorFactory);
100
+ })(input, "$input", true);
101
+ };
102
+ export const stringifyPromotedTag = input => {
103
+ const $string = __typia.json.createStringify.string;
104
+ const $so0 = input => `{"name":${null !== input.name ? $string(input.name) : "null"},"icon":${null !== input.icon ? $string(input.icon) : "null"},"color":${null !== input.color ? $string(input.color) : "null"},"description":${null !== input.description ? $string(input.description) : "null"}}`;
105
+ return $so0(input);
106
+ };
107
+ export const assertStringifyPromotedTag = (input, errorFactory) => { const assert = (input, errorFactory) => {
108
+ const __is = input => {
109
+ const $io0 = input => (null === input.name || "string" === typeof input.name) && (null === input.icon || "string" === typeof input.icon) && (null === input.color || "string" === typeof input.color) && (null === input.description || "string" === typeof input.description);
110
+ return "object" === typeof input && null !== input && $io0(input);
111
+ };
112
+ if (false === __is(input))
113
+ ((input, _path, _exceptionable = true) => {
114
+ const $guard = __typia.json.createAssertStringify.guard;
115
+ const $ao0 = (input, _path, _exceptionable = true) => (null === input.name || "string" === typeof input.name || $guard(_exceptionable, {
116
+ path: _path + ".name",
117
+ expected: "(null | string)",
118
+ value: input.name
119
+ }, errorFactory)) && (null === input.icon || "string" === typeof input.icon || $guard(_exceptionable, {
120
+ path: _path + ".icon",
121
+ expected: "(null | string)",
122
+ value: input.icon
123
+ }, errorFactory)) && (null === input.color || "string" === typeof input.color || $guard(_exceptionable, {
124
+ path: _path + ".color",
125
+ expected: "(null | string)",
126
+ value: input.color
127
+ }, errorFactory)) && (null === input.description || "string" === typeof input.description || $guard(_exceptionable, {
128
+ path: _path + ".description",
129
+ expected: "(null | string)",
130
+ value: input.description
131
+ }, errorFactory));
132
+ return ("object" === typeof input && null !== input || $guard(true, {
133
+ path: _path + "",
134
+ expected: "PromotedTag",
135
+ value: input
136
+ }, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
137
+ path: _path + "",
138
+ expected: "PromotedTag",
139
+ value: input
140
+ }, errorFactory);
141
+ })(input, "$input", true);
142
+ return input;
143
+ }; const stringify = input => {
144
+ const $string = __typia.json.createAssertStringify.string;
145
+ const $so0 = input => `{"name":${null !== input.name ? $string(input.name) : "null"},"icon":${null !== input.icon ? $string(input.icon) : "null"},"color":${null !== input.color ? $string(input.color) : "null"},"description":${null !== input.description ? $string(input.description) : "null"}}`;
146
+ return $so0(input);
147
+ }; return stringify(assert(input, errorFactory)); };
@@ -0,0 +1,32 @@
1
+ import { type AssertionGuard as __AssertionGuard } from "typia";
2
+ export interface RenderPreset {
3
+ type?: string;
4
+ description?: unknown;
5
+ profile?: string | RenderPresetProfile;
6
+ }
7
+ export declare const isRenderPreset: (input: unknown) => input is RenderPreset;
8
+ export declare const assertRenderPreset: (input: unknown) => RenderPreset;
9
+ export declare const randomRenderPreset: () => RenderPreset;
10
+ export declare const assertGuardRenderPreset: __AssertionGuard<RenderPreset>;
11
+ export declare const stringifyRenderPreset: (input: RenderPreset) => string;
12
+ export declare const assertStringifyRenderPreset: (input: unknown) => string;
13
+ export type RenderPresetProfileFormat = "png" | "mp4";
14
+ export declare const isRenderPresetProfileFormat: (input: unknown) => input is RenderPresetProfileFormat;
15
+ export declare const assertRenderPresetProfileFormat: (input: unknown) => RenderPresetProfileFormat;
16
+ export declare const randomRenderPresetProfileFormat: () => RenderPresetProfileFormat;
17
+ export declare const assertGuardRenderPresetProfileFormat: __AssertionGuard<RenderPresetProfileFormat>;
18
+ export declare const stringifyRenderPresetProfileFormat: (input: RenderPresetProfileFormat) => string;
19
+ export declare const assertStringifyRenderPresetProfileFormat: (input: unknown) => string;
20
+ export interface RenderPresetProfile {
21
+ format: RenderPresetProfileFormat;
22
+ transcribe?: unknown;
23
+ audio?: unknown;
24
+ video?: unknown;
25
+ pick?: string[];
26
+ }
27
+ export declare const isRenderPresetProfile: (input: unknown) => input is RenderPresetProfile;
28
+ export declare const assertRenderPresetProfile: (input: unknown) => RenderPresetProfile;
29
+ export declare const randomRenderPresetProfile: () => RenderPresetProfile;
30
+ export declare const assertGuardRenderPresetProfile: __AssertionGuard<RenderPresetProfile>;
31
+ export declare const stringifyRenderPresetProfile: (input: RenderPresetProfile) => string;
32
+ export declare const assertStringifyRenderPresetProfile: (input: unknown) => string;