@nxtedition/types 23.0.22 → 23.0.23

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.
@@ -10,6 +10,9 @@ export * from './media.js';
10
10
  export * from './pipeline.js';
11
11
  export * from './promoted-tag.js';
12
12
  export * from './render-preset.js';
13
+ export * from './render-profile.js';
14
+ export * from './render-query.js';
15
+ export * from './render-scene.js';
13
16
  export * from './rule.js';
14
17
  export * from './search.js';
15
18
  export * from './settings.js';
@@ -10,6 +10,9 @@ export * from './media.js';
10
10
  export * from './pipeline.js';
11
11
  export * from './promoted-tag.js';
12
12
  export * from './render-preset.js';
13
+ export * from './render-profile.js';
14
+ export * from './render-query.js';
15
+ export * from './render-scene.js';
13
16
  export * from './rule.js';
14
17
  export * from './search.js';
15
18
  export * from './settings.js';
@@ -4,13 +4,13 @@ export type Nxtpression<ReturnValue = string, Context extends object = object> =
4
4
  * TS-HACK: this property doesn't really exist on the nxtpression string,
5
5
  * it is only here to make sure the generic Context won't get stripped.
6
6
  */
7
- __context?: Context;
7
+ __context: Context;
8
8
  /**
9
9
  * TS-HACK: this property doesn't really exist on the nxtpression string,
10
10
  * it is only here to make sure the generic Context won't get stripped.
11
11
  */
12
- __returnValue?: ReturnValue;
13
- }) | string;
12
+ __returnValue: ReturnValue;
13
+ }) | string | ReturnValue;
14
14
  export declare const isNxtpression: (input: unknown) => input is Nxtpression<string, object>;
15
15
  export declare const assertNxtpression: (input: unknown) => Nxtpression<string, object>;
16
16
  export declare const randomNxtpression: () => string;
@@ -1,6 +1,6 @@
1
1
  import __typia from "typia";
2
2
  export const isNxtpression = input => {
3
- const $io0 = input => "number" === typeof input.length && (undefined === input.__context || "object" === typeof input.__context && null !== input.__context && false === Array.isArray(input.__context) && $io1(input.__context)) && (undefined === input.__returnValue || "string" === typeof input.__returnValue) && Object.keys(input).every(key => {
3
+ const $io0 = input => "number" === typeof input.length && ("object" === typeof input.__context && null !== input.__context && true) && "string" === typeof input.__returnValue && Object.keys(input).every(key => {
4
4
  if (["length", "__context", "__returnValue"].some(prop => key === prop))
5
5
  return true;
6
6
  const value = input[key];
@@ -10,12 +10,11 @@ export const isNxtpression = input => {
10
10
  return "string" === typeof value;
11
11
  return true;
12
12
  });
13
- const $io1 = input => true;
14
13
  return null !== input && undefined !== input && ("string" === typeof input || "object" === typeof input && null !== input && $io0(input));
15
14
  };
16
15
  export const assertNxtpression = (input, errorFactory) => {
17
16
  const __is = input => {
18
- const $io0 = input => "number" === typeof input.length && (undefined === input.__context || "object" === typeof input.__context && null !== input.__context && false === Array.isArray(input.__context) && $io1(input.__context)) && (undefined === input.__returnValue || "string" === typeof input.__returnValue) && Object.keys(input).every(key => {
17
+ const $io0 = input => "number" === typeof input.length && ("object" === typeof input.__context && null !== input.__context && true) && "string" === typeof input.__returnValue && Object.keys(input).every(key => {
19
18
  if (["length", "__context", "__returnValue"].some(prop => key === prop))
20
19
  return true;
21
20
  const value = input[key];
@@ -25,7 +24,6 @@ export const assertNxtpression = (input, errorFactory) => {
25
24
  return "string" === typeof value;
26
25
  return true;
27
26
  });
28
- const $io1 = input => true;
29
27
  return null !== input && undefined !== input && ("string" === typeof input || "object" === typeof input && null !== input && $io0(input));
30
28
  };
31
29
  if (false === __is(input))
@@ -36,17 +34,17 @@ export const assertNxtpression = (input, errorFactory) => {
36
34
  path: _path + ".length",
37
35
  expected: "number",
38
36
  value: input.length
39
- }, errorFactory)) && (undefined === input.__context || ("object" === typeof input.__context && null !== input.__context && false === Array.isArray(input.__context) || $guard(_exceptionable, {
37
+ }, errorFactory)) && (("object" === typeof input.__context && null !== input.__context && false === Array.isArray(input.__context) || $guard(_exceptionable, {
40
38
  path: _path + ".__context",
41
- expected: "(object | undefined)",
39
+ expected: "object",
42
40
  value: input.__context
43
41
  }, errorFactory)) && $ao1(input.__context, _path + ".__context", true && _exceptionable) || $guard(_exceptionable, {
44
42
  path: _path + ".__context",
45
- expected: "(object | undefined)",
43
+ expected: "object",
46
44
  value: input.__context
47
- }, errorFactory)) && (undefined === input.__returnValue || "string" === typeof input.__returnValue || $guard(_exceptionable, {
45
+ }, errorFactory)) && ("string" === typeof input.__returnValue || $guard(_exceptionable, {
48
46
  path: _path + ".__returnValue",
49
- expected: "(string | undefined)",
47
+ expected: "string",
50
48
  value: input.__returnValue
51
49
  }, errorFactory)) && (false === _exceptionable || Object.keys(input).every(key => {
52
50
  if (["length", "__context", "__returnValue"].some(prop => key === prop))
@@ -65,19 +63,19 @@ export const assertNxtpression = (input, errorFactory) => {
65
63
  const $ao1 = (input, _path, _exceptionable = true) => true;
66
64
  return (null !== input || $guard(true, {
67
65
  path: _path + "",
68
- expected: "(String & { __context?: object | undefined; __returnValue?: string | undefined; } | string)",
66
+ expected: "(String & { __context: object; __returnValue: string; } | string)",
69
67
  value: input
70
68
  }, errorFactory)) && (undefined !== input || $guard(true, {
71
69
  path: _path + "",
72
- expected: "(String & { __context?: object | undefined; __returnValue?: string | undefined; } | string)",
70
+ expected: "(String & { __context: object; __returnValue: string; } | string)",
73
71
  value: input
74
72
  }, errorFactory)) && ("string" === typeof input || ("object" === typeof input && null !== input || $guard(true, {
75
73
  path: _path + "",
76
- expected: "(String & { __context?: object | undefined; __returnValue?: string | undefined; } | string)",
74
+ expected: "(String & { __context: object; __returnValue: string; } | string)",
77
75
  value: input
78
76
  }, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
79
77
  path: _path + "",
80
- expected: "(String & { __context?: object | undefined; __returnValue?: string | undefined; } | string)",
78
+ expected: "(String & { __context: object; __returnValue: string; } | string)",
81
79
  value: input
82
80
  }, errorFactory));
83
81
  })(input, "$input", true);
@@ -89,14 +87,8 @@ export const randomNxtpression = generator => {
89
87
  const $ro0 = (_recursive = false, _depth = 0) => {
90
88
  const output = {
91
89
  length: (generator?.customs ?? $generator.customs)?.number?.([]) ?? (generator?.number ?? $generator.number)(0, 100),
92
- __context: $pick([
93
- () => undefined,
94
- () => $ro1(_recursive, _recursive ? 1 + _depth : _depth)
95
- ])(),
96
- __returnValue: $pick([
97
- () => undefined,
98
- () => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
99
- ])()
90
+ __context: $ro1(_recursive, _recursive ? 1 + _depth : _depth),
91
+ __returnValue: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
100
92
  };
101
93
  (generator?.array ?? $generator.array)(() => output[(generator?.customs ?? $generator.customs)?.number?.([]) ?? (generator?.number ?? $generator.number)(0, 100)] = (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(), (generator?.integer ?? $generator.integer)(0, 3));
102
94
  return output;
@@ -109,7 +101,7 @@ export const randomNxtpression = generator => {
109
101
  };
110
102
  export const assertGuardNxtpression = (input, errorFactory) => {
111
103
  const __is = input => {
112
- const $io0 = input => "number" === typeof input.length && (undefined === input.__context || "object" === typeof input.__context && null !== input.__context && false === Array.isArray(input.__context) && $io1(input.__context)) && (undefined === input.__returnValue || "string" === typeof input.__returnValue) && Object.keys(input).every(key => {
104
+ const $io0 = input => "number" === typeof input.length && ("object" === typeof input.__context && null !== input.__context && true) && "string" === typeof input.__returnValue && Object.keys(input).every(key => {
113
105
  if (["length", "__context", "__returnValue"].some(prop => key === prop))
114
106
  return true;
115
107
  const value = input[key];
@@ -119,7 +111,6 @@ export const assertGuardNxtpression = (input, errorFactory) => {
119
111
  return "string" === typeof value;
120
112
  return true;
121
113
  });
122
- const $io1 = input => true;
123
114
  return null !== input && undefined !== input && ("string" === typeof input || "object" === typeof input && null !== input && $io0(input));
124
115
  };
125
116
  if (false === __is(input))
@@ -130,17 +121,17 @@ export const assertGuardNxtpression = (input, errorFactory) => {
130
121
  path: _path + ".length",
131
122
  expected: "number",
132
123
  value: input.length
133
- }, errorFactory)) && (undefined === input.__context || ("object" === typeof input.__context && null !== input.__context && false === Array.isArray(input.__context) || $guard(_exceptionable, {
124
+ }, errorFactory)) && (("object" === typeof input.__context && null !== input.__context && false === Array.isArray(input.__context) || $guard(_exceptionable, {
134
125
  path: _path + ".__context",
135
- expected: "(object | undefined)",
126
+ expected: "object",
136
127
  value: input.__context
137
128
  }, errorFactory)) && $ao1(input.__context, _path + ".__context", true && _exceptionable) || $guard(_exceptionable, {
138
129
  path: _path + ".__context",
139
- expected: "(object | undefined)",
130
+ expected: "object",
140
131
  value: input.__context
141
- }, errorFactory)) && (undefined === input.__returnValue || "string" === typeof input.__returnValue || $guard(_exceptionable, {
132
+ }, errorFactory)) && ("string" === typeof input.__returnValue || $guard(_exceptionable, {
142
133
  path: _path + ".__returnValue",
143
- expected: "(string | undefined)",
134
+ expected: "string",
144
135
  value: input.__returnValue
145
136
  }, errorFactory)) && (false === _exceptionable || Object.keys(input).every(key => {
146
137
  if (["length", "__context", "__returnValue"].some(prop => key === prop))
@@ -159,19 +150,19 @@ export const assertGuardNxtpression = (input, errorFactory) => {
159
150
  const $ao1 = (input, _path, _exceptionable = true) => true;
160
151
  return (null !== input || $guard(true, {
161
152
  path: _path + "",
162
- expected: "(String & { __context?: object | undefined; __returnValue?: string | undefined; } | string)",
153
+ expected: "(String & { __context: object; __returnValue: string; } | string)",
163
154
  value: input
164
155
  }, errorFactory)) && (undefined !== input || $guard(true, {
165
156
  path: _path + "",
166
- expected: "(String & { __context?: object | undefined; __returnValue?: string | undefined; } | string)",
157
+ expected: "(String & { __context: object; __returnValue: string; } | string)",
167
158
  value: input
168
159
  }, errorFactory)) && ("string" === typeof input || ("object" === typeof input && null !== input || $guard(true, {
169
160
  path: _path + "",
170
- expected: "(String & { __context?: object | undefined; __returnValue?: string | undefined; } | string)",
161
+ expected: "(String & { __context: object; __returnValue: string; } | string)",
171
162
  value: input
172
163
  }, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
173
164
  path: _path + "",
174
- expected: "(String & { __context?: object | undefined; __returnValue?: string | undefined; } | string)",
165
+ expected: "(String & { __context: object; __returnValue: string; } | string)",
175
166
  value: input
176
167
  }, errorFactory));
177
168
  })(input, "$input", true);
@@ -181,8 +172,8 @@ export const stringifyNxtpression = input => {
181
172
  const $string = __typia.json.createStringify.string;
182
173
  const $throws = __typia.json.createStringify.throws;
183
174
  const $tail = __typia.json.createStringify.tail;
184
- const $so0 = input => `{${$tail(`${undefined === input.__context ? "" : `"__context":${undefined !== input.__context ? "{}" : undefined},`}${undefined === input.__returnValue ? "" : `"__returnValue":${undefined !== input.__returnValue ? $string(input.__returnValue) : undefined},`}"length":${input.length},${Object.entries(input).map(([key, value]) => { if (undefined === value)
185
- return ""; if (["__context", "__returnValue", "length"].some(regular => regular === key))
175
+ const $so0 = input => `{${$tail(`"length":${input.length},"__context":{},"__returnValue":${$string(input.__returnValue)},${Object.entries(input).map(([key, value]) => { if (undefined === value)
176
+ return ""; if (["length", "__context", "__returnValue"].some(regular => regular === key))
186
177
  return ""; if (RegExp(/^[+-]?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?$/).test(key))
187
178
  return `${JSON.stringify(key)}:${$string(value)}`; return ""; }).filter(str => "" !== str).join(",")}`)}}`;
188
179
  return (() => {
@@ -191,14 +182,14 @@ export const stringifyNxtpression = input => {
191
182
  if ("object" === typeof input && null !== input)
192
183
  return $so0(input);
193
184
  $throws({
194
- expected: "(String & { __context?: object | undefined; __returnValue?: string | undefined; } | string)",
185
+ expected: "(String & { __context: object; __returnValue: string; } | string)",
195
186
  value: input
196
187
  });
197
188
  })();
198
189
  };
199
190
  export const assertStringifyNxtpression = (input, errorFactory) => { const assert = (input, errorFactory) => {
200
191
  const __is = input => {
201
- const $io0 = input => "number" === typeof input.length && !Number.isNaN(input.length) && (undefined === input.__context || "object" === typeof input.__context && null !== input.__context && false === Array.isArray(input.__context) && $io1(input.__context)) && (undefined === input.__returnValue || "string" === typeof input.__returnValue) && Object.keys(input).every(key => {
192
+ const $io0 = input => "number" === typeof input.length && !Number.isNaN(input.length) && ("object" === typeof input.__context && null !== input.__context && true) && "string" === typeof input.__returnValue && Object.keys(input).every(key => {
202
193
  if (["length", "__context", "__returnValue"].some(prop => key === prop))
203
194
  return true;
204
195
  const value = input[key];
@@ -208,7 +199,6 @@ export const assertStringifyNxtpression = (input, errorFactory) => { const asser
208
199
  return "string" === typeof value;
209
200
  return true;
210
201
  });
211
- const $io1 = input => true;
212
202
  return null !== input && undefined !== input && ("string" === typeof input || "object" === typeof input && null !== input && $io0(input));
213
203
  };
214
204
  if (false === __is(input))
@@ -219,17 +209,17 @@ export const assertStringifyNxtpression = (input, errorFactory) => { const asser
219
209
  path: _path + ".length",
220
210
  expected: "number",
221
211
  value: input.length
222
- }, errorFactory)) && (undefined === input.__context || ("object" === typeof input.__context && null !== input.__context && false === Array.isArray(input.__context) || $guard(_exceptionable, {
212
+ }, errorFactory)) && (("object" === typeof input.__context && null !== input.__context && false === Array.isArray(input.__context) || $guard(_exceptionable, {
223
213
  path: _path + ".__context",
224
- expected: "(object | undefined)",
214
+ expected: "object",
225
215
  value: input.__context
226
216
  }, errorFactory)) && $ao1(input.__context, _path + ".__context", true && _exceptionable) || $guard(_exceptionable, {
227
217
  path: _path + ".__context",
228
- expected: "(object | undefined)",
218
+ expected: "object",
229
219
  value: input.__context
230
- }, errorFactory)) && (undefined === input.__returnValue || "string" === typeof input.__returnValue || $guard(_exceptionable, {
220
+ }, errorFactory)) && ("string" === typeof input.__returnValue || $guard(_exceptionable, {
231
221
  path: _path + ".__returnValue",
232
- expected: "(string | undefined)",
222
+ expected: "string",
233
223
  value: input.__returnValue
234
224
  }, errorFactory)) && (false === _exceptionable || Object.keys(input).every(key => {
235
225
  if (["length", "__context", "__returnValue"].some(prop => key === prop))
@@ -248,19 +238,19 @@ export const assertStringifyNxtpression = (input, errorFactory) => { const asser
248
238
  const $ao1 = (input, _path, _exceptionable = true) => true;
249
239
  return (null !== input || $guard(true, {
250
240
  path: _path + "",
251
- expected: "(String & { __context?: object | undefined; __returnValue?: string | undefined; } | string)",
241
+ expected: "(String & { __context: object; __returnValue: string; } | string)",
252
242
  value: input
253
243
  }, errorFactory)) && (undefined !== input || $guard(true, {
254
244
  path: _path + "",
255
- expected: "(String & { __context?: object | undefined; __returnValue?: string | undefined; } | string)",
245
+ expected: "(String & { __context: object; __returnValue: string; } | string)",
256
246
  value: input
257
247
  }, errorFactory)) && ("string" === typeof input || ("object" === typeof input && null !== input || $guard(true, {
258
248
  path: _path + "",
259
- expected: "(String & { __context?: object | undefined; __returnValue?: string | undefined; } | string)",
249
+ expected: "(String & { __context: object; __returnValue: string; } | string)",
260
250
  value: input
261
251
  }, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
262
252
  path: _path + "",
263
- expected: "(String & { __context?: object | undefined; __returnValue?: string | undefined; } | string)",
253
+ expected: "(String & { __context: object; __returnValue: string; } | string)",
264
254
  value: input
265
255
  }, errorFactory));
266
256
  })(input, "$input", true);
@@ -270,8 +260,8 @@ export const assertStringifyNxtpression = (input, errorFactory) => { const asser
270
260
  const $string = __typia.json.createAssertStringify.string;
271
261
  const $throws = __typia.json.createAssertStringify.throws;
272
262
  const $tail = __typia.json.createAssertStringify.tail;
273
- const $so0 = input => `{${$tail(`${undefined === input.__context ? "" : `"__context":${undefined !== input.__context ? "{}" : undefined},`}${undefined === input.__returnValue ? "" : `"__returnValue":${undefined !== input.__returnValue ? $string(input.__returnValue) : undefined},`}"length":${input.length},${Object.entries(input).map(([key, value]) => { if (undefined === value)
274
- return ""; if (["__context", "__returnValue", "length"].some(regular => regular === key))
263
+ const $so0 = input => `{${$tail(`"length":${input.length},"__context":{},"__returnValue":${$string(input.__returnValue)},${Object.entries(input).map(([key, value]) => { if (undefined === value)
264
+ return ""; if (["length", "__context", "__returnValue"].some(regular => regular === key))
275
265
  return ""; if (RegExp(/^[+-]?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?$/).test(key))
276
266
  return `${JSON.stringify(key)}:${$string(value)}`; return ""; }).filter(str => "" !== str).join(",")}`)}}`;
277
267
  return (() => {
@@ -280,7 +270,7 @@ export const assertStringifyNxtpression = (input, errorFactory) => { const asser
280
270
  if ("object" === typeof input && null !== input)
281
271
  return $so0(input);
282
272
  $throws({
283
- expected: "(String & { __context?: object | undefined; __returnValue?: string | undefined; } | string)",
273
+ expected: "(String & { __context: object; __returnValue: string; } | string)",
284
274
  value: input
285
275
  });
286
276
  })();
@@ -1,32 +1,20 @@
1
1
  import { type AssertionGuard as __AssertionGuard } from "typia";
2
- export interface RenderPreset {
3
- type?: string;
4
- description?: unknown;
5
- profile?: string | RenderPresetProfile;
2
+ import type { RenderQuery } from './render-query.js';
3
+ import type { RenderProfile } from './render-profile.js';
4
+ export interface RenderPresetObject {
5
+ type: RenderQuery["type"];
6
+ profile: RenderProfile;
6
7
  }
8
+ export declare const isRenderPresetObject: (input: unknown) => input is RenderPresetObject;
9
+ export declare const assertRenderPresetObject: (input: unknown) => RenderPresetObject;
10
+ export declare const randomRenderPresetObject: () => RenderPresetObject;
11
+ export declare const assertGuardRenderPresetObject: __AssertionGuard<RenderPresetObject>;
12
+ export declare const stringifyRenderPresetObject: (input: RenderPresetObject) => string;
13
+ export declare const assertStringifyRenderPresetObject: (input: unknown) => string;
14
+ export type RenderPreset = RenderPresetObject | string;
7
15
  export declare const isRenderPreset: (input: unknown) => input is RenderPreset;
8
16
  export declare const assertRenderPreset: (input: unknown) => RenderPreset;
9
17
  export declare const randomRenderPreset: () => RenderPreset;
10
18
  export declare const assertGuardRenderPreset: __AssertionGuard<RenderPreset>;
11
19
  export declare const stringifyRenderPreset: (input: RenderPreset) => string;
12
20
  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;