@nxtedition/types 23.0.31 → 23.0.33
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/app.d.ts +45 -3
- package/dist/app.js +254 -6
- package/dist/common/block.d.ts +1 -1
- package/dist/common/file.d.ts +10 -11
- package/dist/common/render-preset.js +230 -22
- package/dist/common/render-profile.d.ts +17 -0
- package/dist/common/render-profile.js +344 -18
- package/dist/common/render-query.js +830 -169
- package/dist/common/render-scene.d.ts +7 -0
- package/dist/common/render-scene.js +1258 -144
- package/dist/common/settings.d.ts +41 -26
- package/dist/common/settings.js +1888 -1574
- package/dist/domains/event.d.ts +21 -19
- package/dist/domains/event.js +460 -44
- package/dist/domains/general.d.ts +6 -0
- package/dist/domains/media.d.ts +4 -0
- package/dist/domains/media.js +827 -89
- package/dist/domains/panel.d.ts +268 -1
- package/dist/domains/publish.d.ts +1128 -6
- package/dist/domains/publish.js +10806 -3560
- package/dist/domains/render.js +826 -163
- package/dist/domains/settings.d.ts +1 -10
- package/dist/domains/settings.js +1 -6649
- package/dist/index.d.ts +13 -1
- package/dist/index.js +1 -0
- package/dist/nxtpression.d.ts +110 -0
- package/dist/nxtpression.js +323 -0
- package/dist/schema.json +2183 -1904
- package/dist/tsdoc-metadata.json +11 -0
- package/package.json +10 -3
package/dist/index.d.ts
CHANGED
|
@@ -14,6 +14,7 @@ export declare const randomDomains: () => Domains;
|
|
|
14
14
|
export declare const assertGuardDomains: __AssertionGuard<Domains>;
|
|
15
15
|
export declare const stringifyDomains: (input: Domains) => string;
|
|
16
16
|
export declare const assertStringifyDomains: (input: unknown) => string;
|
|
17
|
+
export * from './nxtpression.js';
|
|
17
18
|
export type Records = {
|
|
18
19
|
[Property in Domains as `${string}${Property}`]: DomainRecords[Property];
|
|
19
20
|
} & {
|
|
@@ -21,8 +22,13 @@ export type Records = {
|
|
|
21
22
|
} & {
|
|
22
23
|
[Property in keyof DesignDomainRecords as `${string}${Property}${string}`]: DesignDomainRecords[Property];
|
|
23
24
|
} & {
|
|
25
|
+
"media.subtitles": {
|
|
26
|
+
languages?: Record<string, string>;
|
|
27
|
+
fontFaces?: SubtitleFontFace[];
|
|
28
|
+
};
|
|
24
29
|
"media.subtitles?": {
|
|
25
|
-
languages
|
|
30
|
+
languages?: Record<string, string>;
|
|
31
|
+
fontFaces?: SubtitleFontFace[];
|
|
26
32
|
};
|
|
27
33
|
"media.transcribe?": {
|
|
28
34
|
engines: Record<string, string>;
|
|
@@ -67,3 +73,9 @@ export type Records = {
|
|
|
67
73
|
interface DomainRows {
|
|
68
74
|
rows: string[];
|
|
69
75
|
}
|
|
76
|
+
interface SubtitleFontFace {
|
|
77
|
+
family: string;
|
|
78
|
+
asset?: string;
|
|
79
|
+
weight?: "normal" | "bold";
|
|
80
|
+
style?: "normal" | "italic";
|
|
81
|
+
}
|
package/dist/index.js
CHANGED
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { type AssertionGuard as __AssertionGuard } from "typia";
|
|
2
|
+
import type { DomainRecords } from './domains/index.js';
|
|
3
|
+
import type { Records } from './index.js';
|
|
4
|
+
import type { Observable } from 'rxjs';
|
|
5
|
+
type Paths<Data> = keyof Data & string;
|
|
6
|
+
type Get<Data, Path extends string> = Path extends keyof Data ? Data[Path] : unknown;
|
|
7
|
+
type RecordStateNumber = 0 | 1 | 2 | 3 | 4;
|
|
8
|
+
type RecordStateString = "VOID" | "CLIENT" | "SERVER" | "STALE" | "PROVIDER";
|
|
9
|
+
type RecordState = RecordStateNumber | RecordStateString;
|
|
10
|
+
type _UnaryFunction<T, U> = (arg: T extends null ? never : T) => U;
|
|
11
|
+
export interface Underscore {
|
|
12
|
+
<T>(input: T): T;
|
|
13
|
+
<T, U>(input: T, fn1: _UnaryFunction<T, U>): U;
|
|
14
|
+
<T, U, V>(input: T, fn1: _UnaryFunction<T, U>, fn2: _UnaryFunction<U, V>): V;
|
|
15
|
+
<T, U, V, W>(input: T, fn1: _UnaryFunction<T, U>, fn2: _UnaryFunction<U, V>, fn3: _UnaryFunction<V, W>): W;
|
|
16
|
+
<T, U, V, W, X>(input: T, fn1: _UnaryFunction<T, U>, fn2: _UnaryFunction<U, V>, fn3: _UnaryFunction<V, W>, fn4: _UnaryFunction<W, X>): X;
|
|
17
|
+
<T, U, V, W, X, Y>(input: T, fn1: _UnaryFunction<T, U>, fn2: _UnaryFunction<U, V>, fn3: _UnaryFunction<V, W>, fn4: _UnaryFunction<W, X>, fn5: _UnaryFunction<X, Y>): Y;
|
|
18
|
+
<T, U, V, W, X, Y, Z>(input: T, fn1: _UnaryFunction<T, U>, fn2: _UnaryFunction<U, V>, fn3: _UnaryFunction<V, W>, fn4: _UnaryFunction<W, X>, fn5: _UnaryFunction<X, Y>, fn6: _UnaryFunction<Y, Z>): Z;
|
|
19
|
+
/**
|
|
20
|
+
* Creates a function which returns the input assetId, only if the asset is of the provided type.
|
|
21
|
+
* @param type Asset type to filter on, e.g. "general" or "media"
|
|
22
|
+
*/
|
|
23
|
+
asset: (type: string, state?: number, suspend?: boolean) => (id: string) => string | null;
|
|
24
|
+
/**
|
|
25
|
+
* @deprecated
|
|
26
|
+
*/
|
|
27
|
+
ds: <Postfix extends keyof DomainRecords, Data extends DomainRecords[Postfix] = DomainRecords[Postfix]>(postfix: Postfix, state?: number, suspend?: boolean) => (assetId: string) => Data;
|
|
28
|
+
/**
|
|
29
|
+
* Get a deepstream record
|
|
30
|
+
*
|
|
31
|
+
* Takes a postfix (typically a :domain) and optionally record path and/or
|
|
32
|
+
* desired state. Returns a function which takes a prefix (typically an asset
|
|
33
|
+
* ID).
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* _.get(':contact') // (assetId: string) => ContactRecord
|
|
37
|
+
*
|
|
38
|
+
* @example
|
|
39
|
+
* _.get(':contact', null, 'server') // (assetId: string) => ContactRecord
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* _.get(':contact', 'firstName') // (assetId: string) => string | undefined
|
|
43
|
+
*
|
|
44
|
+
* @example
|
|
45
|
+
* _.get(':contact', 'firstName', 'server') // (assetId: string) => string | undefined
|
|
46
|
+
*/
|
|
47
|
+
get<Postfix extends keyof DomainRecords, Data extends DomainRecords[Postfix] = DomainRecords[Postfix], Path extends Paths<Data> | string | null | undefined = Paths<Data>>(postfix: Postfix, path: Path, state?: RecordState, suspend?: boolean): (assetId: string) => Path extends undefined | null ? Partial<Data> : Path extends Paths<Data> ? Get<Data, Path> | undefined : unknown;
|
|
48
|
+
get<Postfix extends keyof DomainRecords, Data extends DomainRecords[Postfix] = DomainRecords[Postfix]>(postfix: Postfix): (assetId: string) => Partial<Data>;
|
|
49
|
+
timer<V>(dueTime: number): (dueValue?: V) => V;
|
|
50
|
+
fetch(options?: RequestInit, suspend?: boolean): (resource: string) => NxtpressionFetch;
|
|
51
|
+
}
|
|
52
|
+
export interface NxtpressionNxt {
|
|
53
|
+
/**
|
|
54
|
+
* HTTP fetch
|
|
55
|
+
*/
|
|
56
|
+
fetch(url: string, options?: RequestInit, suspend?: boolean): NxtpressionFetch;
|
|
57
|
+
observe<Value>(observable: Observable<Value>, suspend?: boolean): Value;
|
|
58
|
+
then<Value>(promise: Promise<Value>, suspend?: boolean): Value;
|
|
59
|
+
suspend(): void;
|
|
60
|
+
/**
|
|
61
|
+
* Creates a function which returns the input assetId, only if the asset is of the provided type.
|
|
62
|
+
* @param type Asset type to filter on, e.g. "general" or "media"
|
|
63
|
+
*/
|
|
64
|
+
asset: (assetId: string, type: string, state?: number, suspend?: boolean) => (assetId: string) => string | null;
|
|
65
|
+
/**
|
|
66
|
+
* @deprecated
|
|
67
|
+
*/
|
|
68
|
+
ds<Name extends keyof Records, Data extends Records[Name] & string>(name: Name, state?: RecordState, suspend?: boolean): Data;
|
|
69
|
+
/**
|
|
70
|
+
* Get a record.
|
|
71
|
+
*/
|
|
72
|
+
get<Name extends keyof Records, Data extends Records[Name] = Records[Name], Path extends Paths<Data> | undefined | null = undefined>(name: Name, path?: Path, state?: RecordState, suspend?: boolean): Path extends undefined | null ? Data : Path extends Paths<Data> ? Get<Data, Path> : unknown;
|
|
73
|
+
get<Name extends keyof Records, Data extends Records[Name] = Records[Name]>(name: Name): Partial<Data>;
|
|
74
|
+
/**
|
|
75
|
+
* TODO: what is this doing?
|
|
76
|
+
*/
|
|
77
|
+
wrap: <V>(value: V, suspend?: boolean) => unknown;
|
|
78
|
+
timer<V>(dueTime: number, dueValue: V, suspend?: boolean): V;
|
|
79
|
+
hash(value: unknown): string;
|
|
80
|
+
}
|
|
81
|
+
export declare const isNxtpressionNxt: (input: unknown) => input is NxtpressionNxt;
|
|
82
|
+
export declare const assertNxtpressionNxt: (input: unknown) => NxtpressionNxt;
|
|
83
|
+
export declare const randomNxtpressionNxt: () => {
|
|
84
|
+
fetch: never;
|
|
85
|
+
observe: never;
|
|
86
|
+
then: never;
|
|
87
|
+
suspend: never;
|
|
88
|
+
asset: never;
|
|
89
|
+
ds: never;
|
|
90
|
+
get: never;
|
|
91
|
+
wrap: never;
|
|
92
|
+
timer: never;
|
|
93
|
+
hash: never;
|
|
94
|
+
};
|
|
95
|
+
export declare const assertGuardNxtpressionNxt: __AssertionGuard<NxtpressionNxt>;
|
|
96
|
+
export declare const stringifyNxtpressionNxt: (input: NxtpressionNxt) => string;
|
|
97
|
+
export declare const assertStringifyNxtpressionNxt: (input: unknown) => string;
|
|
98
|
+
export interface NxtpressionFetch {
|
|
99
|
+
body: string | null;
|
|
100
|
+
status: number | null;
|
|
101
|
+
headers: Record<string, string>;
|
|
102
|
+
err: any;
|
|
103
|
+
}
|
|
104
|
+
export declare const isNxtpressionFetch: (input: unknown) => input is NxtpressionFetch;
|
|
105
|
+
export declare const assertNxtpressionFetch: (input: unknown) => NxtpressionFetch;
|
|
106
|
+
export declare const randomNxtpressionFetch: () => NxtpressionFetch;
|
|
107
|
+
export declare const assertGuardNxtpressionFetch: __AssertionGuard<NxtpressionFetch>;
|
|
108
|
+
export declare const stringifyNxtpressionFetch: (input: NxtpressionFetch) => string;
|
|
109
|
+
export declare const assertStringifyNxtpressionFetch: (input: unknown) => string;
|
|
110
|
+
export {};
|
|
@@ -0,0 +1,323 @@
|
|
|
1
|
+
import __typia from "typia";
|
|
2
|
+
export const isNxtpressionNxt = input => {
|
|
3
|
+
const $io0 = input => true && true;
|
|
4
|
+
return "object" === typeof input && null !== input && $io0(input);
|
|
5
|
+
};
|
|
6
|
+
export const assertNxtpressionNxt = (input, errorFactory) => {
|
|
7
|
+
const __is = input => {
|
|
8
|
+
const $io0 = input => true && true;
|
|
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) => (true || $guard(_exceptionable, {
|
|
15
|
+
path: _path + ".asset",
|
|
16
|
+
expected: "unknown",
|
|
17
|
+
value: input.asset
|
|
18
|
+
}, errorFactory)) && (true || $guard(_exceptionable, {
|
|
19
|
+
path: _path + ".wrap",
|
|
20
|
+
expected: "unknown",
|
|
21
|
+
value: input.wrap
|
|
22
|
+
}, errorFactory));
|
|
23
|
+
return ("object" === typeof input && null !== input || $guard(true, {
|
|
24
|
+
path: _path + "",
|
|
25
|
+
expected: "NxtpressionNxt",
|
|
26
|
+
value: input
|
|
27
|
+
}, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
|
|
28
|
+
path: _path + "",
|
|
29
|
+
expected: "NxtpressionNxt",
|
|
30
|
+
value: input
|
|
31
|
+
}, errorFactory);
|
|
32
|
+
})(input, "$input", true);
|
|
33
|
+
return input;
|
|
34
|
+
};
|
|
35
|
+
export const randomNxtpressionNxt = generator => {
|
|
36
|
+
const $ro0 = (_recursive = false, _depth = 0) => ({
|
|
37
|
+
asset: undefined,
|
|
38
|
+
wrap: undefined
|
|
39
|
+
});
|
|
40
|
+
return $ro0();
|
|
41
|
+
};
|
|
42
|
+
export const assertGuardNxtpressionNxt = (input, errorFactory) => {
|
|
43
|
+
const __is = input => {
|
|
44
|
+
const $io0 = input => true && true;
|
|
45
|
+
return "object" === typeof input && null !== input && $io0(input);
|
|
46
|
+
};
|
|
47
|
+
if (false === __is(input))
|
|
48
|
+
((input, _path, _exceptionable = true) => {
|
|
49
|
+
const $guard = __typia.createAssertGuard.guard;
|
|
50
|
+
const $ao0 = (input, _path, _exceptionable = true) => (true || $guard(_exceptionable, {
|
|
51
|
+
path: _path + ".asset",
|
|
52
|
+
expected: "unknown",
|
|
53
|
+
value: input.asset
|
|
54
|
+
}, errorFactory)) && (true || $guard(_exceptionable, {
|
|
55
|
+
path: _path + ".wrap",
|
|
56
|
+
expected: "unknown",
|
|
57
|
+
value: input.wrap
|
|
58
|
+
}, errorFactory));
|
|
59
|
+
return ("object" === typeof input && null !== input || $guard(true, {
|
|
60
|
+
path: _path + "",
|
|
61
|
+
expected: "NxtpressionNxt",
|
|
62
|
+
value: input
|
|
63
|
+
}, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
|
|
64
|
+
path: _path + "",
|
|
65
|
+
expected: "NxtpressionNxt",
|
|
66
|
+
value: input
|
|
67
|
+
}, errorFactory);
|
|
68
|
+
})(input, "$input", true);
|
|
69
|
+
};
|
|
70
|
+
export const stringifyNxtpressionNxt = input => {
|
|
71
|
+
const $so0 = input => "{}";
|
|
72
|
+
return $so0(input);
|
|
73
|
+
};
|
|
74
|
+
export const assertStringifyNxtpressionNxt = (input, errorFactory) => { const assert = (input, errorFactory) => {
|
|
75
|
+
const __is = input => {
|
|
76
|
+
const $io0 = input => true && true;
|
|
77
|
+
return "object" === typeof input && null !== input && $io0(input);
|
|
78
|
+
};
|
|
79
|
+
if (false === __is(input))
|
|
80
|
+
((input, _path, _exceptionable = true) => {
|
|
81
|
+
const $guard = __typia.json.createAssertStringify.guard;
|
|
82
|
+
const $ao0 = (input, _path, _exceptionable = true) => (true || $guard(_exceptionable, {
|
|
83
|
+
path: _path + ".asset",
|
|
84
|
+
expected: "unknown",
|
|
85
|
+
value: input.asset
|
|
86
|
+
}, errorFactory)) && (true || $guard(_exceptionable, {
|
|
87
|
+
path: _path + ".wrap",
|
|
88
|
+
expected: "unknown",
|
|
89
|
+
value: input.wrap
|
|
90
|
+
}, errorFactory));
|
|
91
|
+
return ("object" === typeof input && null !== input || $guard(true, {
|
|
92
|
+
path: _path + "",
|
|
93
|
+
expected: "NxtpressionNxt",
|
|
94
|
+
value: input
|
|
95
|
+
}, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
|
|
96
|
+
path: _path + "",
|
|
97
|
+
expected: "NxtpressionNxt",
|
|
98
|
+
value: input
|
|
99
|
+
}, errorFactory);
|
|
100
|
+
})(input, "$input", true);
|
|
101
|
+
return input;
|
|
102
|
+
}; const stringify = input => {
|
|
103
|
+
const $so0 = input => "{}";
|
|
104
|
+
return $so0(input);
|
|
105
|
+
}; return stringify(assert(input, errorFactory)); };
|
|
106
|
+
export const isNxtpressionFetch = input => {
|
|
107
|
+
const $io0 = input => (null === input.body || "string" === typeof input.body) && (null === input.status || "number" === typeof input.status) && ("object" === typeof input.headers && null !== input.headers && false === Array.isArray(input.headers) && $io1(input.headers)) && true;
|
|
108
|
+
const $io1 = input => Object.keys(input).every(key => {
|
|
109
|
+
const value = input[key];
|
|
110
|
+
if (undefined === value)
|
|
111
|
+
return true;
|
|
112
|
+
return "string" === typeof value;
|
|
113
|
+
});
|
|
114
|
+
return "object" === typeof input && null !== input && $io0(input);
|
|
115
|
+
};
|
|
116
|
+
export const assertNxtpressionFetch = (input, errorFactory) => {
|
|
117
|
+
const __is = input => {
|
|
118
|
+
const $io0 = input => (null === input.body || "string" === typeof input.body) && (null === input.status || "number" === typeof input.status) && ("object" === typeof input.headers && null !== input.headers && false === Array.isArray(input.headers) && $io1(input.headers)) && true;
|
|
119
|
+
const $io1 = input => Object.keys(input).every(key => {
|
|
120
|
+
const value = input[key];
|
|
121
|
+
if (undefined === value)
|
|
122
|
+
return true;
|
|
123
|
+
return "string" === typeof value;
|
|
124
|
+
});
|
|
125
|
+
return "object" === typeof input && null !== input && $io0(input);
|
|
126
|
+
};
|
|
127
|
+
if (false === __is(input))
|
|
128
|
+
((input, _path, _exceptionable = true) => {
|
|
129
|
+
const $guard = __typia.createAssert.guard;
|
|
130
|
+
const $join = __typia.createAssert.join;
|
|
131
|
+
const $ao0 = (input, _path, _exceptionable = true) => (null === input.body || "string" === typeof input.body || $guard(_exceptionable, {
|
|
132
|
+
path: _path + ".body",
|
|
133
|
+
expected: "(null | string)",
|
|
134
|
+
value: input.body
|
|
135
|
+
}, errorFactory)) && (null === input.status || "number" === typeof input.status || $guard(_exceptionable, {
|
|
136
|
+
path: _path + ".status",
|
|
137
|
+
expected: "(null | number)",
|
|
138
|
+
value: input.status
|
|
139
|
+
}, errorFactory)) && (("object" === typeof input.headers && null !== input.headers && false === Array.isArray(input.headers) || $guard(_exceptionable, {
|
|
140
|
+
path: _path + ".headers",
|
|
141
|
+
expected: "Record<string, string>",
|
|
142
|
+
value: input.headers
|
|
143
|
+
}, errorFactory)) && $ao1(input.headers, _path + ".headers", true && _exceptionable) || $guard(_exceptionable, {
|
|
144
|
+
path: _path + ".headers",
|
|
145
|
+
expected: "Record<string, string>",
|
|
146
|
+
value: input.headers
|
|
147
|
+
}, errorFactory)) && true;
|
|
148
|
+
const $ao1 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every(key => {
|
|
149
|
+
const value = input[key];
|
|
150
|
+
if (undefined === value)
|
|
151
|
+
return true;
|
|
152
|
+
return "string" === typeof value || $guard(_exceptionable, {
|
|
153
|
+
path: _path + $join(key),
|
|
154
|
+
expected: "string",
|
|
155
|
+
value: value
|
|
156
|
+
}, errorFactory);
|
|
157
|
+
});
|
|
158
|
+
return ("object" === typeof input && null !== input || $guard(true, {
|
|
159
|
+
path: _path + "",
|
|
160
|
+
expected: "NxtpressionFetch",
|
|
161
|
+
value: input
|
|
162
|
+
}, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
|
|
163
|
+
path: _path + "",
|
|
164
|
+
expected: "NxtpressionFetch",
|
|
165
|
+
value: input
|
|
166
|
+
}, errorFactory);
|
|
167
|
+
})(input, "$input", true);
|
|
168
|
+
return input;
|
|
169
|
+
};
|
|
170
|
+
export const randomNxtpressionFetch = generator => {
|
|
171
|
+
const $generator = __typia.createRandom.generator;
|
|
172
|
+
const $pick = __typia.createRandom.pick;
|
|
173
|
+
const $ro0 = (_recursive = false, _depth = 0) => ({
|
|
174
|
+
body: $pick([
|
|
175
|
+
() => null,
|
|
176
|
+
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
|
|
177
|
+
])(),
|
|
178
|
+
status: $pick([
|
|
179
|
+
() => null,
|
|
180
|
+
() => (generator?.customs ?? $generator.customs)?.number?.([]) ?? (generator?.number ?? $generator.number)(0, 100)
|
|
181
|
+
])(),
|
|
182
|
+
headers: $ro1(_recursive, _recursive ? 1 + _depth : _depth),
|
|
183
|
+
err: "any type used..."
|
|
184
|
+
});
|
|
185
|
+
const $ro1 = (_recursive = false, _depth = 0) => {
|
|
186
|
+
const output = {};
|
|
187
|
+
(generator?.array ?? $generator.array)(() => output[(generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()] = (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(), (generator?.integer ?? $generator.integer)(0, 3));
|
|
188
|
+
return output;
|
|
189
|
+
};
|
|
190
|
+
return $ro0();
|
|
191
|
+
};
|
|
192
|
+
export const assertGuardNxtpressionFetch = (input, errorFactory) => {
|
|
193
|
+
const __is = input => {
|
|
194
|
+
const $io0 = input => (null === input.body || "string" === typeof input.body) && (null === input.status || "number" === typeof input.status) && ("object" === typeof input.headers && null !== input.headers && false === Array.isArray(input.headers) && $io1(input.headers)) && true;
|
|
195
|
+
const $io1 = input => Object.keys(input).every(key => {
|
|
196
|
+
const value = input[key];
|
|
197
|
+
if (undefined === value)
|
|
198
|
+
return true;
|
|
199
|
+
return "string" === typeof value;
|
|
200
|
+
});
|
|
201
|
+
return "object" === typeof input && null !== input && $io0(input);
|
|
202
|
+
};
|
|
203
|
+
if (false === __is(input))
|
|
204
|
+
((input, _path, _exceptionable = true) => {
|
|
205
|
+
const $guard = __typia.createAssertGuard.guard;
|
|
206
|
+
const $join = __typia.createAssertGuard.join;
|
|
207
|
+
const $ao0 = (input, _path, _exceptionable = true) => (null === input.body || "string" === typeof input.body || $guard(_exceptionable, {
|
|
208
|
+
path: _path + ".body",
|
|
209
|
+
expected: "(null | string)",
|
|
210
|
+
value: input.body
|
|
211
|
+
}, errorFactory)) && (null === input.status || "number" === typeof input.status || $guard(_exceptionable, {
|
|
212
|
+
path: _path + ".status",
|
|
213
|
+
expected: "(null | number)",
|
|
214
|
+
value: input.status
|
|
215
|
+
}, errorFactory)) && (("object" === typeof input.headers && null !== input.headers && false === Array.isArray(input.headers) || $guard(_exceptionable, {
|
|
216
|
+
path: _path + ".headers",
|
|
217
|
+
expected: "Record<string, string>",
|
|
218
|
+
value: input.headers
|
|
219
|
+
}, errorFactory)) && $ao1(input.headers, _path + ".headers", true && _exceptionable) || $guard(_exceptionable, {
|
|
220
|
+
path: _path + ".headers",
|
|
221
|
+
expected: "Record<string, string>",
|
|
222
|
+
value: input.headers
|
|
223
|
+
}, errorFactory)) && true;
|
|
224
|
+
const $ao1 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every(key => {
|
|
225
|
+
const value = input[key];
|
|
226
|
+
if (undefined === value)
|
|
227
|
+
return true;
|
|
228
|
+
return "string" === typeof value || $guard(_exceptionable, {
|
|
229
|
+
path: _path + $join(key),
|
|
230
|
+
expected: "string",
|
|
231
|
+
value: value
|
|
232
|
+
}, errorFactory);
|
|
233
|
+
});
|
|
234
|
+
return ("object" === typeof input && null !== input || $guard(true, {
|
|
235
|
+
path: _path + "",
|
|
236
|
+
expected: "NxtpressionFetch",
|
|
237
|
+
value: input
|
|
238
|
+
}, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
|
|
239
|
+
path: _path + "",
|
|
240
|
+
expected: "NxtpressionFetch",
|
|
241
|
+
value: input
|
|
242
|
+
}, errorFactory);
|
|
243
|
+
})(input, "$input", true);
|
|
244
|
+
};
|
|
245
|
+
export const stringifyNxtpressionFetch = input => {
|
|
246
|
+
const $io1 = input => Object.keys(input).every(key => {
|
|
247
|
+
const value = input[key];
|
|
248
|
+
if (undefined === value)
|
|
249
|
+
return true;
|
|
250
|
+
return "string" === typeof value;
|
|
251
|
+
});
|
|
252
|
+
const $string = __typia.json.createStringify.string;
|
|
253
|
+
const $so0 = input => `{${undefined === input.err || "function" === typeof input.err ? "" : `"err":${undefined !== input.err ? JSON.stringify(input.err) : undefined},`}"body":${null !== input.body ? $string(input.body) : "null"},"status":${null !== input.status ? input.status : "null"},"headers":${$so1(input.headers)}}`;
|
|
254
|
+
const $so1 = input => `{${Object.entries(input).map(([key, value]) => { if (undefined === value)
|
|
255
|
+
return ""; return `${JSON.stringify(key)}:${$string(value)}`; }).filter(str => "" !== str).join(",")}}`;
|
|
256
|
+
return $so0(input);
|
|
257
|
+
};
|
|
258
|
+
export const assertStringifyNxtpressionFetch = (input, errorFactory) => { const assert = (input, errorFactory) => {
|
|
259
|
+
const __is = input => {
|
|
260
|
+
const $io0 = input => (null === input.body || "string" === typeof input.body) && (null === input.status || "number" === typeof input.status && !Number.isNaN(input.status)) && ("object" === typeof input.headers && null !== input.headers && false === Array.isArray(input.headers) && $io1(input.headers)) && true;
|
|
261
|
+
const $io1 = input => Object.keys(input).every(key => {
|
|
262
|
+
const value = input[key];
|
|
263
|
+
if (undefined === value)
|
|
264
|
+
return true;
|
|
265
|
+
return "string" === typeof value;
|
|
266
|
+
});
|
|
267
|
+
return "object" === typeof input && null !== input && $io0(input);
|
|
268
|
+
};
|
|
269
|
+
if (false === __is(input))
|
|
270
|
+
((input, _path, _exceptionable = true) => {
|
|
271
|
+
const $guard = __typia.json.createAssertStringify.guard;
|
|
272
|
+
const $join = __typia.json.createAssertStringify.join;
|
|
273
|
+
const $ao0 = (input, _path, _exceptionable = true) => (null === input.body || "string" === typeof input.body || $guard(_exceptionable, {
|
|
274
|
+
path: _path + ".body",
|
|
275
|
+
expected: "(null | string)",
|
|
276
|
+
value: input.body
|
|
277
|
+
}, errorFactory)) && (null === input.status || "number" === typeof input.status && !Number.isNaN(input.status) || $guard(_exceptionable, {
|
|
278
|
+
path: _path + ".status",
|
|
279
|
+
expected: "(null | number)",
|
|
280
|
+
value: input.status
|
|
281
|
+
}, errorFactory)) && (("object" === typeof input.headers && null !== input.headers && false === Array.isArray(input.headers) || $guard(_exceptionable, {
|
|
282
|
+
path: _path + ".headers",
|
|
283
|
+
expected: "Record<string, string>",
|
|
284
|
+
value: input.headers
|
|
285
|
+
}, errorFactory)) && $ao1(input.headers, _path + ".headers", true && _exceptionable) || $guard(_exceptionable, {
|
|
286
|
+
path: _path + ".headers",
|
|
287
|
+
expected: "Record<string, string>",
|
|
288
|
+
value: input.headers
|
|
289
|
+
}, errorFactory)) && true;
|
|
290
|
+
const $ao1 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every(key => {
|
|
291
|
+
const value = input[key];
|
|
292
|
+
if (undefined === value)
|
|
293
|
+
return true;
|
|
294
|
+
return "string" === typeof value || $guard(_exceptionable, {
|
|
295
|
+
path: _path + $join(key),
|
|
296
|
+
expected: "string",
|
|
297
|
+
value: value
|
|
298
|
+
}, errorFactory);
|
|
299
|
+
});
|
|
300
|
+
return ("object" === typeof input && null !== input || $guard(true, {
|
|
301
|
+
path: _path + "",
|
|
302
|
+
expected: "NxtpressionFetch",
|
|
303
|
+
value: input
|
|
304
|
+
}, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
|
|
305
|
+
path: _path + "",
|
|
306
|
+
expected: "NxtpressionFetch",
|
|
307
|
+
value: input
|
|
308
|
+
}, errorFactory);
|
|
309
|
+
})(input, "$input", true);
|
|
310
|
+
return input;
|
|
311
|
+
}; const stringify = input => {
|
|
312
|
+
const $io1 = input => Object.keys(input).every(key => {
|
|
313
|
+
const value = input[key];
|
|
314
|
+
if (undefined === value)
|
|
315
|
+
return true;
|
|
316
|
+
return "string" === typeof value;
|
|
317
|
+
});
|
|
318
|
+
const $string = __typia.json.createAssertStringify.string;
|
|
319
|
+
const $so0 = input => `{${undefined === input.err || "function" === typeof input.err ? "" : `"err":${undefined !== input.err ? JSON.stringify(input.err) : undefined},`}"body":${null !== input.body ? $string(input.body) : "null"},"status":${null !== input.status ? input.status : "null"},"headers":${$so1(input.headers)}}`;
|
|
320
|
+
const $so1 = input => `{${Object.entries(input).map(([key, value]) => { if (undefined === value)
|
|
321
|
+
return ""; return `${JSON.stringify(key)}:${$string(value)}`; }).filter(str => "" !== str).join(",")}}`;
|
|
322
|
+
return $so0(input);
|
|
323
|
+
}; return stringify(assert(input, errorFactory)); };
|