@nxtedition/types 1.6.9 → 1.6.10

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,971 @@
1
+ import __typia from "typia";
2
+ export const isFileReplicateRecord = input => {
3
+ const $io0 = input => Array.isArray(input.replicas) && input.replicas.every(elem => "string" === typeof elem) && (null === input.error || "object" === typeof input.error && null !== input.error && $io1(input.error));
4
+ const $io1 = input => "string" === typeof input.message && (undefined === input.type || "string" === typeof input.type) && (undefined === input.code || "string" === typeof input.code) && (undefined === input.exitCode || "number" === typeof input.exitCode) && (undefined === input.signalCode || "number" === typeof input.signalCode) && (undefined === input.statusCode || "number" === typeof input.statusCode) && (undefined === input.headers || "object" === typeof input.headers && null !== input.headers && false === Array.isArray(input.headers) && $io2(input.headers)) && (undefined === input.data || "object" === typeof input.data && null !== input.data && false === Array.isArray(input.data) && $io3(input.data)) && (null === input.cause || undefined === input.cause || "object" === typeof input.cause && null !== input.cause && $io1(input.cause)) && (null === input.errors || undefined === input.errors || Array.isArray(input.errors) && input.errors.every(elem => "object" === typeof elem && null !== elem && $io1(elem)));
5
+ const $io2 = input => Object.keys(input).every(key => {
6
+ const value = input[key];
7
+ if (undefined === value)
8
+ return true;
9
+ return "string" === typeof value;
10
+ });
11
+ const $io3 = input => true;
12
+ return "object" === typeof input && null !== input && $io0(input);
13
+ };
14
+ export const assertFileReplicateRecord = (input, errorFactory) => {
15
+ const __is = input => {
16
+ const $io0 = input => Array.isArray(input.replicas) && input.replicas.every(elem => "string" === typeof elem) && (null === input.error || "object" === typeof input.error && null !== input.error && $io1(input.error));
17
+ const $io1 = input => "string" === typeof input.message && (undefined === input.type || "string" === typeof input.type) && (undefined === input.code || "string" === typeof input.code) && (undefined === input.exitCode || "number" === typeof input.exitCode) && (undefined === input.signalCode || "number" === typeof input.signalCode) && (undefined === input.statusCode || "number" === typeof input.statusCode) && (undefined === input.headers || "object" === typeof input.headers && null !== input.headers && false === Array.isArray(input.headers) && $io2(input.headers)) && (undefined === input.data || "object" === typeof input.data && null !== input.data && false === Array.isArray(input.data) && $io3(input.data)) && (null === input.cause || undefined === input.cause || "object" === typeof input.cause && null !== input.cause && $io1(input.cause)) && (null === input.errors || undefined === input.errors || Array.isArray(input.errors) && input.errors.every(elem => "object" === typeof elem && null !== elem && $io1(elem)));
18
+ const $io2 = input => Object.keys(input).every(key => {
19
+ const value = input[key];
20
+ if (undefined === value)
21
+ return true;
22
+ return "string" === typeof value;
23
+ });
24
+ const $io3 = input => true;
25
+ return "object" === typeof input && null !== input && $io0(input);
26
+ };
27
+ if (false === __is(input))
28
+ ((input, _path, _exceptionable = true) => {
29
+ const $guard = __typia.createAssert.guard;
30
+ const $join = __typia.createAssert.join;
31
+ const $ao0 = (input, _path, _exceptionable = true) => ((Array.isArray(input.replicas) || $guard(_exceptionable, {
32
+ path: _path + ".replicas",
33
+ expected: "Array<string>",
34
+ value: input.replicas
35
+ }, errorFactory)) && input.replicas.every((elem, _index1) => "string" === typeof elem || $guard(_exceptionable, {
36
+ path: _path + ".replicas[" + _index1 + "]",
37
+ expected: "string",
38
+ value: elem
39
+ }, errorFactory)) || $guard(_exceptionable, {
40
+ path: _path + ".replicas",
41
+ expected: "Array<string>",
42
+ value: input.replicas
43
+ }, errorFactory)) && (null === input.error || ("object" === typeof input.error && null !== input.error || $guard(_exceptionable, {
44
+ path: _path + ".error",
45
+ expected: "(NxtError | null)",
46
+ value: input.error
47
+ }, errorFactory)) && $ao1(input.error, _path + ".error", true && _exceptionable) || $guard(_exceptionable, {
48
+ path: _path + ".error",
49
+ expected: "(NxtError | null)",
50
+ value: input.error
51
+ }, errorFactory));
52
+ const $ao1 = (input, _path, _exceptionable = true) => ("string" === typeof input.message || $guard(_exceptionable, {
53
+ path: _path + ".message",
54
+ expected: "string",
55
+ value: input.message
56
+ }, errorFactory)) && (undefined === input.type || "string" === typeof input.type || $guard(_exceptionable, {
57
+ path: _path + ".type",
58
+ expected: "(string | undefined)",
59
+ value: input.type
60
+ }, errorFactory)) && (undefined === input.code || "string" === typeof input.code || $guard(_exceptionable, {
61
+ path: _path + ".code",
62
+ expected: "(string | undefined)",
63
+ value: input.code
64
+ }, errorFactory)) && (undefined === input.exitCode || "number" === typeof input.exitCode || $guard(_exceptionable, {
65
+ path: _path + ".exitCode",
66
+ expected: "(number | undefined)",
67
+ value: input.exitCode
68
+ }, errorFactory)) && (undefined === input.signalCode || "number" === typeof input.signalCode || $guard(_exceptionable, {
69
+ path: _path + ".signalCode",
70
+ expected: "(number | undefined)",
71
+ value: input.signalCode
72
+ }, errorFactory)) && (undefined === input.statusCode || "number" === typeof input.statusCode || $guard(_exceptionable, {
73
+ path: _path + ".statusCode",
74
+ expected: "(number | undefined)",
75
+ value: input.statusCode
76
+ }, errorFactory)) && (undefined === input.headers || ("object" === typeof input.headers && null !== input.headers && false === Array.isArray(input.headers) || $guard(_exceptionable, {
77
+ path: _path + ".headers",
78
+ expected: "(Record<string, string> | undefined)",
79
+ value: input.headers
80
+ }, errorFactory)) && $ao2(input.headers, _path + ".headers", true && _exceptionable) || $guard(_exceptionable, {
81
+ path: _path + ".headers",
82
+ expected: "(Record<string, string> | undefined)",
83
+ value: input.headers
84
+ }, errorFactory)) && (undefined === input.data || ("object" === typeof input.data && null !== input.data && false === Array.isArray(input.data) || $guard(_exceptionable, {
85
+ path: _path + ".data",
86
+ expected: "(object | undefined)",
87
+ value: input.data
88
+ }, errorFactory)) && $ao3(input.data, _path + ".data", true && _exceptionable) || $guard(_exceptionable, {
89
+ path: _path + ".data",
90
+ expected: "(object | undefined)",
91
+ value: input.data
92
+ }, errorFactory)) && (null === input.cause || undefined === input.cause || ("object" === typeof input.cause && null !== input.cause || $guard(_exceptionable, {
93
+ path: _path + ".cause",
94
+ expected: "(NxtError | null | undefined)",
95
+ value: input.cause
96
+ }, errorFactory)) && $ao1(input.cause, _path + ".cause", true && _exceptionable) || $guard(_exceptionable, {
97
+ path: _path + ".cause",
98
+ expected: "(NxtError | null | undefined)",
99
+ value: input.cause
100
+ }, errorFactory)) && (null === input.errors || undefined === input.errors || (Array.isArray(input.errors) || $guard(_exceptionable, {
101
+ path: _path + ".errors",
102
+ expected: "(Array<NxtError> | null | undefined)",
103
+ value: input.errors
104
+ }, errorFactory)) && input.errors.every((elem, _index2) => ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
105
+ path: _path + ".errors[" + _index2 + "]",
106
+ expected: "NxtError",
107
+ value: elem
108
+ }, errorFactory)) && $ao1(elem, _path + ".errors[" + _index2 + "]", true && _exceptionable) || $guard(_exceptionable, {
109
+ path: _path + ".errors[" + _index2 + "]",
110
+ expected: "NxtError",
111
+ value: elem
112
+ }, errorFactory)) || $guard(_exceptionable, {
113
+ path: _path + ".errors",
114
+ expected: "(Array<NxtError> | null | undefined)",
115
+ value: input.errors
116
+ }, errorFactory));
117
+ const $ao2 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every(key => {
118
+ const value = input[key];
119
+ if (undefined === value)
120
+ return true;
121
+ return "string" === typeof value || $guard(_exceptionable, {
122
+ path: _path + $join(key),
123
+ expected: "string",
124
+ value: value
125
+ }, errorFactory);
126
+ });
127
+ const $ao3 = (input, _path, _exceptionable = true) => true;
128
+ return ("object" === typeof input && null !== input || $guard(true, {
129
+ path: _path + "",
130
+ expected: "FileReplicateRecord",
131
+ value: input
132
+ }, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
133
+ path: _path + "",
134
+ expected: "FileReplicateRecord",
135
+ value: input
136
+ }, errorFactory);
137
+ })(input, "$input", true);
138
+ return input;
139
+ };
140
+ export const randomFileReplicateRecord = generator => {
141
+ const $generator = __typia.createRandom.generator;
142
+ const $pick = __typia.createRandom.pick;
143
+ const $ro0 = (_recursive = false, _depth = 0) => ({
144
+ replicas: (generator?.array ?? $generator.array)(() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()),
145
+ error: $pick([
146
+ () => null,
147
+ () => $ro1(_recursive, _recursive ? 1 + _depth : _depth)
148
+ ])()
149
+ });
150
+ const $ro1 = (_recursive = true, _depth = 0) => ({
151
+ message: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
152
+ type: $pick([
153
+ () => undefined,
154
+ () => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
155
+ ])(),
156
+ code: $pick([
157
+ () => undefined,
158
+ () => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
159
+ ])(),
160
+ exitCode: $pick([
161
+ () => undefined,
162
+ () => (generator?.customs ?? $generator.customs)?.number?.([]) ?? (generator?.number ?? $generator.number)(0, 100)
163
+ ])(),
164
+ signalCode: $pick([
165
+ () => undefined,
166
+ () => (generator?.customs ?? $generator.customs)?.number?.([]) ?? (generator?.number ?? $generator.number)(0, 100)
167
+ ])(),
168
+ statusCode: $pick([
169
+ () => undefined,
170
+ () => (generator?.customs ?? $generator.customs)?.number?.([]) ?? (generator?.number ?? $generator.number)(0, 100)
171
+ ])(),
172
+ headers: $pick([
173
+ () => undefined,
174
+ () => $ro2(true, _recursive ? 1 + _depth : _depth)
175
+ ])(),
176
+ data: $pick([
177
+ () => undefined,
178
+ () => $ro3(true, _recursive ? 1 + _depth : _depth)
179
+ ])(),
180
+ cause: $pick([
181
+ () => undefined,
182
+ () => null,
183
+ () => $ro1(true, _recursive ? 1 + _depth : _depth)
184
+ ])(),
185
+ errors: $pick([
186
+ () => undefined,
187
+ () => null,
188
+ () => _recursive && 5 < _depth ? [] : 5 >= _depth ? (generator?.array ?? $generator.array)(() => $ro1(true, _recursive ? 1 + _depth : _depth)) : []
189
+ ])()
190
+ });
191
+ const $ro2 = (_recursive = false, _depth = 0) => {
192
+ const output = {};
193
+ (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));
194
+ return output;
195
+ };
196
+ const $ro3 = (_recursive = false, _depth = 0) => {};
197
+ return $ro0();
198
+ };
199
+ export const assertGuardFileReplicateRecord = (input, errorFactory) => {
200
+ const __is = input => {
201
+ const $io0 = input => Array.isArray(input.replicas) && input.replicas.every(elem => "string" === typeof elem) && (null === input.error || "object" === typeof input.error && null !== input.error && $io1(input.error));
202
+ const $io1 = input => "string" === typeof input.message && (undefined === input.type || "string" === typeof input.type) && (undefined === input.code || "string" === typeof input.code) && (undefined === input.exitCode || "number" === typeof input.exitCode) && (undefined === input.signalCode || "number" === typeof input.signalCode) && (undefined === input.statusCode || "number" === typeof input.statusCode) && (undefined === input.headers || "object" === typeof input.headers && null !== input.headers && false === Array.isArray(input.headers) && $io2(input.headers)) && (undefined === input.data || "object" === typeof input.data && null !== input.data && false === Array.isArray(input.data) && $io3(input.data)) && (null === input.cause || undefined === input.cause || "object" === typeof input.cause && null !== input.cause && $io1(input.cause)) && (null === input.errors || undefined === input.errors || Array.isArray(input.errors) && input.errors.every(elem => "object" === typeof elem && null !== elem && $io1(elem)));
203
+ const $io2 = input => Object.keys(input).every(key => {
204
+ const value = input[key];
205
+ if (undefined === value)
206
+ return true;
207
+ return "string" === typeof value;
208
+ });
209
+ const $io3 = input => true;
210
+ return "object" === typeof input && null !== input && $io0(input);
211
+ };
212
+ if (false === __is(input))
213
+ ((input, _path, _exceptionable = true) => {
214
+ const $guard = __typia.createAssertGuard.guard;
215
+ const $join = __typia.createAssertGuard.join;
216
+ const $ao0 = (input, _path, _exceptionable = true) => ((Array.isArray(input.replicas) || $guard(_exceptionable, {
217
+ path: _path + ".replicas",
218
+ expected: "Array<string>",
219
+ value: input.replicas
220
+ }, errorFactory)) && input.replicas.every((elem, _index1) => "string" === typeof elem || $guard(_exceptionable, {
221
+ path: _path + ".replicas[" + _index1 + "]",
222
+ expected: "string",
223
+ value: elem
224
+ }, errorFactory)) || $guard(_exceptionable, {
225
+ path: _path + ".replicas",
226
+ expected: "Array<string>",
227
+ value: input.replicas
228
+ }, errorFactory)) && (null === input.error || ("object" === typeof input.error && null !== input.error || $guard(_exceptionable, {
229
+ path: _path + ".error",
230
+ expected: "(NxtError | null)",
231
+ value: input.error
232
+ }, errorFactory)) && $ao1(input.error, _path + ".error", true && _exceptionable) || $guard(_exceptionable, {
233
+ path: _path + ".error",
234
+ expected: "(NxtError | null)",
235
+ value: input.error
236
+ }, errorFactory));
237
+ const $ao1 = (input, _path, _exceptionable = true) => ("string" === typeof input.message || $guard(_exceptionable, {
238
+ path: _path + ".message",
239
+ expected: "string",
240
+ value: input.message
241
+ }, errorFactory)) && (undefined === input.type || "string" === typeof input.type || $guard(_exceptionable, {
242
+ path: _path + ".type",
243
+ expected: "(string | undefined)",
244
+ value: input.type
245
+ }, errorFactory)) && (undefined === input.code || "string" === typeof input.code || $guard(_exceptionable, {
246
+ path: _path + ".code",
247
+ expected: "(string | undefined)",
248
+ value: input.code
249
+ }, errorFactory)) && (undefined === input.exitCode || "number" === typeof input.exitCode || $guard(_exceptionable, {
250
+ path: _path + ".exitCode",
251
+ expected: "(number | undefined)",
252
+ value: input.exitCode
253
+ }, errorFactory)) && (undefined === input.signalCode || "number" === typeof input.signalCode || $guard(_exceptionable, {
254
+ path: _path + ".signalCode",
255
+ expected: "(number | undefined)",
256
+ value: input.signalCode
257
+ }, errorFactory)) && (undefined === input.statusCode || "number" === typeof input.statusCode || $guard(_exceptionable, {
258
+ path: _path + ".statusCode",
259
+ expected: "(number | undefined)",
260
+ value: input.statusCode
261
+ }, errorFactory)) && (undefined === input.headers || ("object" === typeof input.headers && null !== input.headers && false === Array.isArray(input.headers) || $guard(_exceptionable, {
262
+ path: _path + ".headers",
263
+ expected: "(Record<string, string> | undefined)",
264
+ value: input.headers
265
+ }, errorFactory)) && $ao2(input.headers, _path + ".headers", true && _exceptionable) || $guard(_exceptionable, {
266
+ path: _path + ".headers",
267
+ expected: "(Record<string, string> | undefined)",
268
+ value: input.headers
269
+ }, errorFactory)) && (undefined === input.data || ("object" === typeof input.data && null !== input.data && false === Array.isArray(input.data) || $guard(_exceptionable, {
270
+ path: _path + ".data",
271
+ expected: "(object | undefined)",
272
+ value: input.data
273
+ }, errorFactory)) && $ao3(input.data, _path + ".data", true && _exceptionable) || $guard(_exceptionable, {
274
+ path: _path + ".data",
275
+ expected: "(object | undefined)",
276
+ value: input.data
277
+ }, errorFactory)) && (null === input.cause || undefined === input.cause || ("object" === typeof input.cause && null !== input.cause || $guard(_exceptionable, {
278
+ path: _path + ".cause",
279
+ expected: "(NxtError | null | undefined)",
280
+ value: input.cause
281
+ }, errorFactory)) && $ao1(input.cause, _path + ".cause", true && _exceptionable) || $guard(_exceptionable, {
282
+ path: _path + ".cause",
283
+ expected: "(NxtError | null | undefined)",
284
+ value: input.cause
285
+ }, errorFactory)) && (null === input.errors || undefined === input.errors || (Array.isArray(input.errors) || $guard(_exceptionable, {
286
+ path: _path + ".errors",
287
+ expected: "(Array<NxtError> | null | undefined)",
288
+ value: input.errors
289
+ }, errorFactory)) && input.errors.every((elem, _index2) => ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
290
+ path: _path + ".errors[" + _index2 + "]",
291
+ expected: "NxtError",
292
+ value: elem
293
+ }, errorFactory)) && $ao1(elem, _path + ".errors[" + _index2 + "]", true && _exceptionable) || $guard(_exceptionable, {
294
+ path: _path + ".errors[" + _index2 + "]",
295
+ expected: "NxtError",
296
+ value: elem
297
+ }, errorFactory)) || $guard(_exceptionable, {
298
+ path: _path + ".errors",
299
+ expected: "(Array<NxtError> | null | undefined)",
300
+ value: input.errors
301
+ }, errorFactory));
302
+ const $ao2 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every(key => {
303
+ const value = input[key];
304
+ if (undefined === value)
305
+ return true;
306
+ return "string" === typeof value || $guard(_exceptionable, {
307
+ path: _path + $join(key),
308
+ expected: "string",
309
+ value: value
310
+ }, errorFactory);
311
+ });
312
+ const $ao3 = (input, _path, _exceptionable = true) => true;
313
+ return ("object" === typeof input && null !== input || $guard(true, {
314
+ path: _path + "",
315
+ expected: "FileReplicateRecord",
316
+ value: input
317
+ }, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
318
+ path: _path + "",
319
+ expected: "FileReplicateRecord",
320
+ value: input
321
+ }, errorFactory);
322
+ })(input, "$input", true);
323
+ };
324
+ export const stringifyFileReplicateRecord = input => {
325
+ const $io1 = input => "string" === typeof input.message && (undefined === input.type || "string" === typeof input.type) && (undefined === input.code || "string" === typeof input.code) && (undefined === input.exitCode || "number" === typeof input.exitCode) && (undefined === input.signalCode || "number" === typeof input.signalCode) && (undefined === input.statusCode || "number" === typeof input.statusCode) && (undefined === input.headers || "object" === typeof input.headers && null !== input.headers && false === Array.isArray(input.headers) && $io2(input.headers)) && (undefined === input.data || "object" === typeof input.data && null !== input.data && false === Array.isArray(input.data) && $io3(input.data)) && (null === input.cause || undefined === input.cause || "object" === typeof input.cause && null !== input.cause && $io1(input.cause)) && (null === input.errors || undefined === input.errors || Array.isArray(input.errors) && input.errors.every(elem => "object" === typeof elem && null !== elem && $io1(elem)));
326
+ const $io2 = input => Object.keys(input).every(key => {
327
+ const value = input[key];
328
+ if (undefined === value)
329
+ return true;
330
+ return "string" === typeof value;
331
+ });
332
+ const $io3 = input => true;
333
+ const $string = __typia.json.createStringify.string;
334
+ const $so0 = input => `{"replicas":${`[${input.replicas.map(elem => $string(elem)).join(",")}]`},"error":${null !== input.error ? $so1(input.error) : "null"}}`;
335
+ const $so1 = input => `{${undefined === input.type ? "" : `"type":${undefined !== input.type ? $string(input.type) : undefined},`}${undefined === input.code ? "" : `"code":${undefined !== input.code ? $string(input.code) : undefined},`}${undefined === input.exitCode ? "" : `"exitCode":${undefined !== input.exitCode ? input.exitCode : undefined},`}${undefined === input.signalCode ? "" : `"signalCode":${undefined !== input.signalCode ? input.signalCode : undefined},`}${undefined === input.statusCode ? "" : `"statusCode":${undefined !== input.statusCode ? input.statusCode : undefined},`}${undefined === input.headers ? "" : `"headers":${undefined !== input.headers ? $so2(input.headers) : undefined},`}${undefined === input.data ? "" : `"data":${undefined !== input.data ? "{}" : undefined},`}${undefined === input.cause ? "" : `"cause":${undefined !== input.cause ? null !== input.cause ? $so1(input.cause) : "null" : undefined},`}${undefined === input.errors ? "" : `"errors":${undefined !== input.errors ? null !== input.errors ? `[${input.errors.map(elem => $so1(elem)).join(",")}]` : "null" : undefined},`}"message":${$string(input.message)}}`;
336
+ const $so2 = input => `{${Object.entries(input).map(([key, value]) => { if (undefined === value)
337
+ return ""; return `${JSON.stringify(key)}:${$string(value)}`; }).filter(str => "" !== str).join(",")}}`;
338
+ return $so0(input);
339
+ };
340
+ export const assertStringifyFileReplicateRecord = (input, errorFactory) => { const assert = (input, errorFactory) => {
341
+ const __is = input => {
342
+ const $io0 = input => Array.isArray(input.replicas) && input.replicas.every(elem => "string" === typeof elem) && (null === input.error || "object" === typeof input.error && null !== input.error && $io1(input.error));
343
+ const $io1 = input => "string" === typeof input.message && (undefined === input.type || "string" === typeof input.type) && (undefined === input.code || "string" === typeof input.code) && (undefined === input.exitCode || "number" === typeof input.exitCode && !Number.isNaN(input.exitCode)) && (undefined === input.signalCode || "number" === typeof input.signalCode && !Number.isNaN(input.signalCode)) && (undefined === input.statusCode || "number" === typeof input.statusCode && !Number.isNaN(input.statusCode)) && (undefined === input.headers || "object" === typeof input.headers && null !== input.headers && false === Array.isArray(input.headers) && $io2(input.headers)) && (undefined === input.data || "object" === typeof input.data && null !== input.data && false === Array.isArray(input.data) && $io3(input.data)) && (null === input.cause || undefined === input.cause || "object" === typeof input.cause && null !== input.cause && $io1(input.cause)) && (null === input.errors || undefined === input.errors || Array.isArray(input.errors) && input.errors.every(elem => "object" === typeof elem && null !== elem && $io1(elem)));
344
+ const $io2 = input => Object.keys(input).every(key => {
345
+ const value = input[key];
346
+ if (undefined === value)
347
+ return true;
348
+ return "string" === typeof value;
349
+ });
350
+ const $io3 = input => true;
351
+ return "object" === typeof input && null !== input && $io0(input);
352
+ };
353
+ if (false === __is(input))
354
+ ((input, _path, _exceptionable = true) => {
355
+ const $guard = __typia.json.createAssertStringify.guard;
356
+ const $join = __typia.json.createAssertStringify.join;
357
+ const $ao0 = (input, _path, _exceptionable = true) => ((Array.isArray(input.replicas) || $guard(_exceptionable, {
358
+ path: _path + ".replicas",
359
+ expected: "Array<string>",
360
+ value: input.replicas
361
+ }, errorFactory)) && input.replicas.every((elem, _index1) => "string" === typeof elem || $guard(_exceptionable, {
362
+ path: _path + ".replicas[" + _index1 + "]",
363
+ expected: "string",
364
+ value: elem
365
+ }, errorFactory)) || $guard(_exceptionable, {
366
+ path: _path + ".replicas",
367
+ expected: "Array<string>",
368
+ value: input.replicas
369
+ }, errorFactory)) && (null === input.error || ("object" === typeof input.error && null !== input.error || $guard(_exceptionable, {
370
+ path: _path + ".error",
371
+ expected: "(NxtError | null)",
372
+ value: input.error
373
+ }, errorFactory)) && $ao1(input.error, _path + ".error", true && _exceptionable) || $guard(_exceptionable, {
374
+ path: _path + ".error",
375
+ expected: "(NxtError | null)",
376
+ value: input.error
377
+ }, errorFactory));
378
+ const $ao1 = (input, _path, _exceptionable = true) => ("string" === typeof input.message || $guard(_exceptionable, {
379
+ path: _path + ".message",
380
+ expected: "string",
381
+ value: input.message
382
+ }, errorFactory)) && (undefined === input.type || "string" === typeof input.type || $guard(_exceptionable, {
383
+ path: _path + ".type",
384
+ expected: "(string | undefined)",
385
+ value: input.type
386
+ }, errorFactory)) && (undefined === input.code || "string" === typeof input.code || $guard(_exceptionable, {
387
+ path: _path + ".code",
388
+ expected: "(string | undefined)",
389
+ value: input.code
390
+ }, errorFactory)) && (undefined === input.exitCode || "number" === typeof input.exitCode && !Number.isNaN(input.exitCode) || $guard(_exceptionable, {
391
+ path: _path + ".exitCode",
392
+ expected: "(number | undefined)",
393
+ value: input.exitCode
394
+ }, errorFactory)) && (undefined === input.signalCode || "number" === typeof input.signalCode && !Number.isNaN(input.signalCode) || $guard(_exceptionable, {
395
+ path: _path + ".signalCode",
396
+ expected: "(number | undefined)",
397
+ value: input.signalCode
398
+ }, errorFactory)) && (undefined === input.statusCode || "number" === typeof input.statusCode && !Number.isNaN(input.statusCode) || $guard(_exceptionable, {
399
+ path: _path + ".statusCode",
400
+ expected: "(number | undefined)",
401
+ value: input.statusCode
402
+ }, errorFactory)) && (undefined === input.headers || ("object" === typeof input.headers && null !== input.headers && false === Array.isArray(input.headers) || $guard(_exceptionable, {
403
+ path: _path + ".headers",
404
+ expected: "(Record<string, string> | undefined)",
405
+ value: input.headers
406
+ }, errorFactory)) && $ao2(input.headers, _path + ".headers", true && _exceptionable) || $guard(_exceptionable, {
407
+ path: _path + ".headers",
408
+ expected: "(Record<string, string> | undefined)",
409
+ value: input.headers
410
+ }, errorFactory)) && (undefined === input.data || ("object" === typeof input.data && null !== input.data && false === Array.isArray(input.data) || $guard(_exceptionable, {
411
+ path: _path + ".data",
412
+ expected: "(object | undefined)",
413
+ value: input.data
414
+ }, errorFactory)) && $ao3(input.data, _path + ".data", true && _exceptionable) || $guard(_exceptionable, {
415
+ path: _path + ".data",
416
+ expected: "(object | undefined)",
417
+ value: input.data
418
+ }, errorFactory)) && (null === input.cause || undefined === input.cause || ("object" === typeof input.cause && null !== input.cause || $guard(_exceptionable, {
419
+ path: _path + ".cause",
420
+ expected: "(NxtError | null | undefined)",
421
+ value: input.cause
422
+ }, errorFactory)) && $ao1(input.cause, _path + ".cause", true && _exceptionable) || $guard(_exceptionable, {
423
+ path: _path + ".cause",
424
+ expected: "(NxtError | null | undefined)",
425
+ value: input.cause
426
+ }, errorFactory)) && (null === input.errors || undefined === input.errors || (Array.isArray(input.errors) || $guard(_exceptionable, {
427
+ path: _path + ".errors",
428
+ expected: "(Array<NxtError> | null | undefined)",
429
+ value: input.errors
430
+ }, errorFactory)) && input.errors.every((elem, _index2) => ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
431
+ path: _path + ".errors[" + _index2 + "]",
432
+ expected: "NxtError",
433
+ value: elem
434
+ }, errorFactory)) && $ao1(elem, _path + ".errors[" + _index2 + "]", true && _exceptionable) || $guard(_exceptionable, {
435
+ path: _path + ".errors[" + _index2 + "]",
436
+ expected: "NxtError",
437
+ value: elem
438
+ }, errorFactory)) || $guard(_exceptionable, {
439
+ path: _path + ".errors",
440
+ expected: "(Array<NxtError> | null | undefined)",
441
+ value: input.errors
442
+ }, errorFactory));
443
+ const $ao2 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every(key => {
444
+ const value = input[key];
445
+ if (undefined === value)
446
+ return true;
447
+ return "string" === typeof value || $guard(_exceptionable, {
448
+ path: _path + $join(key),
449
+ expected: "string",
450
+ value: value
451
+ }, errorFactory);
452
+ });
453
+ const $ao3 = (input, _path, _exceptionable = true) => true;
454
+ return ("object" === typeof input && null !== input || $guard(true, {
455
+ path: _path + "",
456
+ expected: "FileReplicateRecord",
457
+ value: input
458
+ }, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
459
+ path: _path + "",
460
+ expected: "FileReplicateRecord",
461
+ value: input
462
+ }, errorFactory);
463
+ })(input, "$input", true);
464
+ return input;
465
+ }; const stringify = input => {
466
+ const $io1 = input => "string" === typeof input.message && (undefined === input.type || "string" === typeof input.type) && (undefined === input.code || "string" === typeof input.code) && (undefined === input.exitCode || "number" === typeof input.exitCode) && (undefined === input.signalCode || "number" === typeof input.signalCode) && (undefined === input.statusCode || "number" === typeof input.statusCode) && (undefined === input.headers || "object" === typeof input.headers && null !== input.headers && false === Array.isArray(input.headers) && $io2(input.headers)) && (undefined === input.data || "object" === typeof input.data && null !== input.data && false === Array.isArray(input.data) && $io3(input.data)) && (null === input.cause || undefined === input.cause || "object" === typeof input.cause && null !== input.cause && $io1(input.cause)) && (null === input.errors || undefined === input.errors || Array.isArray(input.errors) && input.errors.every(elem => "object" === typeof elem && null !== elem && $io1(elem)));
467
+ const $io2 = input => Object.keys(input).every(key => {
468
+ const value = input[key];
469
+ if (undefined === value)
470
+ return true;
471
+ return "string" === typeof value;
472
+ });
473
+ const $io3 = input => true;
474
+ const $string = __typia.json.createAssertStringify.string;
475
+ const $so0 = input => `{"replicas":${`[${input.replicas.map(elem => $string(elem)).join(",")}]`},"error":${null !== input.error ? $so1(input.error) : "null"}}`;
476
+ const $so1 = input => `{${undefined === input.type ? "" : `"type":${undefined !== input.type ? $string(input.type) : undefined},`}${undefined === input.code ? "" : `"code":${undefined !== input.code ? $string(input.code) : undefined},`}${undefined === input.exitCode ? "" : `"exitCode":${undefined !== input.exitCode ? input.exitCode : undefined},`}${undefined === input.signalCode ? "" : `"signalCode":${undefined !== input.signalCode ? input.signalCode : undefined},`}${undefined === input.statusCode ? "" : `"statusCode":${undefined !== input.statusCode ? input.statusCode : undefined},`}${undefined === input.headers ? "" : `"headers":${undefined !== input.headers ? $so2(input.headers) : undefined},`}${undefined === input.data ? "" : `"data":${undefined !== input.data ? "{}" : undefined},`}${undefined === input.cause ? "" : `"cause":${undefined !== input.cause ? null !== input.cause ? $so1(input.cause) : "null" : undefined},`}${undefined === input.errors ? "" : `"errors":${undefined !== input.errors ? null !== input.errors ? `[${input.errors.map(elem => $so1(elem)).join(",")}]` : "null" : undefined},`}"message":${$string(input.message)}}`;
477
+ const $so2 = input => `{${Object.entries(input).map(([key, value]) => { if (undefined === value)
478
+ return ""; return `${JSON.stringify(key)}:${$string(value)}`; }).filter(str => "" !== str).join(",")}}`;
479
+ return $so0(input);
480
+ }; return stringify(assert(input, errorFactory)); };
481
+ export const isFileReplica = input => {
482
+ const $io0 = input => "string" === typeof input.name && ("ok" === input.status || "error" === input.status) && (null === input.error || "object" === typeof input.error && null !== input.error && $io1(input.error));
483
+ const $io1 = input => "string" === typeof input.message && (undefined === input.type || "string" === typeof input.type) && (undefined === input.code || "string" === typeof input.code) && (undefined === input.exitCode || "number" === typeof input.exitCode) && (undefined === input.signalCode || "number" === typeof input.signalCode) && (undefined === input.statusCode || "number" === typeof input.statusCode) && (undefined === input.headers || "object" === typeof input.headers && null !== input.headers && false === Array.isArray(input.headers) && $io2(input.headers)) && (undefined === input.data || "object" === typeof input.data && null !== input.data && false === Array.isArray(input.data) && $io3(input.data)) && (null === input.cause || undefined === input.cause || "object" === typeof input.cause && null !== input.cause && $io1(input.cause)) && (null === input.errors || undefined === input.errors || Array.isArray(input.errors) && input.errors.every(elem => "object" === typeof elem && null !== elem && $io1(elem)));
484
+ const $io2 = input => Object.keys(input).every(key => {
485
+ const value = input[key];
486
+ if (undefined === value)
487
+ return true;
488
+ return "string" === typeof value;
489
+ });
490
+ const $io3 = input => true;
491
+ return "object" === typeof input && null !== input && $io0(input);
492
+ };
493
+ export const assertFileReplica = (input, errorFactory) => {
494
+ const __is = input => {
495
+ const $io0 = input => "string" === typeof input.name && ("ok" === input.status || "error" === input.status) && (null === input.error || "object" === typeof input.error && null !== input.error && $io1(input.error));
496
+ const $io1 = input => "string" === typeof input.message && (undefined === input.type || "string" === typeof input.type) && (undefined === input.code || "string" === typeof input.code) && (undefined === input.exitCode || "number" === typeof input.exitCode) && (undefined === input.signalCode || "number" === typeof input.signalCode) && (undefined === input.statusCode || "number" === typeof input.statusCode) && (undefined === input.headers || "object" === typeof input.headers && null !== input.headers && false === Array.isArray(input.headers) && $io2(input.headers)) && (undefined === input.data || "object" === typeof input.data && null !== input.data && false === Array.isArray(input.data) && $io3(input.data)) && (null === input.cause || undefined === input.cause || "object" === typeof input.cause && null !== input.cause && $io1(input.cause)) && (null === input.errors || undefined === input.errors || Array.isArray(input.errors) && input.errors.every(elem => "object" === typeof elem && null !== elem && $io1(elem)));
497
+ const $io2 = input => Object.keys(input).every(key => {
498
+ const value = input[key];
499
+ if (undefined === value)
500
+ return true;
501
+ return "string" === typeof value;
502
+ });
503
+ const $io3 = input => true;
504
+ return "object" === typeof input && null !== input && $io0(input);
505
+ };
506
+ if (false === __is(input))
507
+ ((input, _path, _exceptionable = true) => {
508
+ const $guard = __typia.createAssert.guard;
509
+ const $join = __typia.createAssert.join;
510
+ const $ao0 = (input, _path, _exceptionable = true) => ("string" === typeof input.name || $guard(_exceptionable, {
511
+ path: _path + ".name",
512
+ expected: "string",
513
+ value: input.name
514
+ }, errorFactory)) && ("ok" === input.status || "error" === input.status || $guard(_exceptionable, {
515
+ path: _path + ".status",
516
+ expected: "(\"error\" | \"ok\")",
517
+ value: input.status
518
+ }, errorFactory)) && (null === input.error || ("object" === typeof input.error && null !== input.error || $guard(_exceptionable, {
519
+ path: _path + ".error",
520
+ expected: "(NxtError | null)",
521
+ value: input.error
522
+ }, errorFactory)) && $ao1(input.error, _path + ".error", true && _exceptionable) || $guard(_exceptionable, {
523
+ path: _path + ".error",
524
+ expected: "(NxtError | null)",
525
+ value: input.error
526
+ }, errorFactory));
527
+ const $ao1 = (input, _path, _exceptionable = true) => ("string" === typeof input.message || $guard(_exceptionable, {
528
+ path: _path + ".message",
529
+ expected: "string",
530
+ value: input.message
531
+ }, errorFactory)) && (undefined === input.type || "string" === typeof input.type || $guard(_exceptionable, {
532
+ path: _path + ".type",
533
+ expected: "(string | undefined)",
534
+ value: input.type
535
+ }, errorFactory)) && (undefined === input.code || "string" === typeof input.code || $guard(_exceptionable, {
536
+ path: _path + ".code",
537
+ expected: "(string | undefined)",
538
+ value: input.code
539
+ }, errorFactory)) && (undefined === input.exitCode || "number" === typeof input.exitCode || $guard(_exceptionable, {
540
+ path: _path + ".exitCode",
541
+ expected: "(number | undefined)",
542
+ value: input.exitCode
543
+ }, errorFactory)) && (undefined === input.signalCode || "number" === typeof input.signalCode || $guard(_exceptionable, {
544
+ path: _path + ".signalCode",
545
+ expected: "(number | undefined)",
546
+ value: input.signalCode
547
+ }, errorFactory)) && (undefined === input.statusCode || "number" === typeof input.statusCode || $guard(_exceptionable, {
548
+ path: _path + ".statusCode",
549
+ expected: "(number | undefined)",
550
+ value: input.statusCode
551
+ }, errorFactory)) && (undefined === input.headers || ("object" === typeof input.headers && null !== input.headers && false === Array.isArray(input.headers) || $guard(_exceptionable, {
552
+ path: _path + ".headers",
553
+ expected: "(Record<string, string> | undefined)",
554
+ value: input.headers
555
+ }, errorFactory)) && $ao2(input.headers, _path + ".headers", true && _exceptionable) || $guard(_exceptionable, {
556
+ path: _path + ".headers",
557
+ expected: "(Record<string, string> | undefined)",
558
+ value: input.headers
559
+ }, errorFactory)) && (undefined === input.data || ("object" === typeof input.data && null !== input.data && false === Array.isArray(input.data) || $guard(_exceptionable, {
560
+ path: _path + ".data",
561
+ expected: "(object | undefined)",
562
+ value: input.data
563
+ }, errorFactory)) && $ao3(input.data, _path + ".data", true && _exceptionable) || $guard(_exceptionable, {
564
+ path: _path + ".data",
565
+ expected: "(object | undefined)",
566
+ value: input.data
567
+ }, errorFactory)) && (null === input.cause || undefined === input.cause || ("object" === typeof input.cause && null !== input.cause || $guard(_exceptionable, {
568
+ path: _path + ".cause",
569
+ expected: "(NxtError | null | undefined)",
570
+ value: input.cause
571
+ }, errorFactory)) && $ao1(input.cause, _path + ".cause", true && _exceptionable) || $guard(_exceptionable, {
572
+ path: _path + ".cause",
573
+ expected: "(NxtError | null | undefined)",
574
+ value: input.cause
575
+ }, errorFactory)) && (null === input.errors || undefined === input.errors || (Array.isArray(input.errors) || $guard(_exceptionable, {
576
+ path: _path + ".errors",
577
+ expected: "(Array<NxtError> | null | undefined)",
578
+ value: input.errors
579
+ }, errorFactory)) && input.errors.every((elem, _index1) => ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
580
+ path: _path + ".errors[" + _index1 + "]",
581
+ expected: "NxtError",
582
+ value: elem
583
+ }, errorFactory)) && $ao1(elem, _path + ".errors[" + _index1 + "]", true && _exceptionable) || $guard(_exceptionable, {
584
+ path: _path + ".errors[" + _index1 + "]",
585
+ expected: "NxtError",
586
+ value: elem
587
+ }, errorFactory)) || $guard(_exceptionable, {
588
+ path: _path + ".errors",
589
+ expected: "(Array<NxtError> | null | undefined)",
590
+ value: input.errors
591
+ }, errorFactory));
592
+ const $ao2 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every(key => {
593
+ const value = input[key];
594
+ if (undefined === value)
595
+ return true;
596
+ return "string" === typeof value || $guard(_exceptionable, {
597
+ path: _path + $join(key),
598
+ expected: "string",
599
+ value: value
600
+ }, errorFactory);
601
+ });
602
+ const $ao3 = (input, _path, _exceptionable = true) => true;
603
+ return ("object" === typeof input && null !== input || $guard(true, {
604
+ path: _path + "",
605
+ expected: "FileReplica",
606
+ value: input
607
+ }, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
608
+ path: _path + "",
609
+ expected: "FileReplica",
610
+ value: input
611
+ }, errorFactory);
612
+ })(input, "$input", true);
613
+ return input;
614
+ };
615
+ export const randomFileReplica = generator => {
616
+ const $generator = __typia.createRandom.generator;
617
+ const $pick = __typia.createRandom.pick;
618
+ const $ro0 = (_recursive = false, _depth = 0) => ({
619
+ name: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
620
+ status: $pick([
621
+ () => "ok",
622
+ () => "error"
623
+ ])(),
624
+ error: $pick([
625
+ () => null,
626
+ () => $ro1(_recursive, _recursive ? 1 + _depth : _depth)
627
+ ])()
628
+ });
629
+ const $ro1 = (_recursive = true, _depth = 0) => ({
630
+ message: (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)(),
631
+ type: $pick([
632
+ () => undefined,
633
+ () => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
634
+ ])(),
635
+ code: $pick([
636
+ () => undefined,
637
+ () => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
638
+ ])(),
639
+ exitCode: $pick([
640
+ () => undefined,
641
+ () => (generator?.customs ?? $generator.customs)?.number?.([]) ?? (generator?.number ?? $generator.number)(0, 100)
642
+ ])(),
643
+ signalCode: $pick([
644
+ () => undefined,
645
+ () => (generator?.customs ?? $generator.customs)?.number?.([]) ?? (generator?.number ?? $generator.number)(0, 100)
646
+ ])(),
647
+ statusCode: $pick([
648
+ () => undefined,
649
+ () => (generator?.customs ?? $generator.customs)?.number?.([]) ?? (generator?.number ?? $generator.number)(0, 100)
650
+ ])(),
651
+ headers: $pick([
652
+ () => undefined,
653
+ () => $ro2(true, _recursive ? 1 + _depth : _depth)
654
+ ])(),
655
+ data: $pick([
656
+ () => undefined,
657
+ () => $ro3(true, _recursive ? 1 + _depth : _depth)
658
+ ])(),
659
+ cause: $pick([
660
+ () => undefined,
661
+ () => null,
662
+ () => $ro1(true, _recursive ? 1 + _depth : _depth)
663
+ ])(),
664
+ errors: $pick([
665
+ () => undefined,
666
+ () => null,
667
+ () => _recursive && 5 < _depth ? [] : 5 >= _depth ? (generator?.array ?? $generator.array)(() => $ro1(true, _recursive ? 1 + _depth : _depth)) : []
668
+ ])()
669
+ });
670
+ const $ro2 = (_recursive = false, _depth = 0) => {
671
+ const output = {};
672
+ (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));
673
+ return output;
674
+ };
675
+ const $ro3 = (_recursive = false, _depth = 0) => {};
676
+ return $ro0();
677
+ };
678
+ export const assertGuardFileReplica = (input, errorFactory) => {
679
+ const __is = input => {
680
+ const $io0 = input => "string" === typeof input.name && ("ok" === input.status || "error" === input.status) && (null === input.error || "object" === typeof input.error && null !== input.error && $io1(input.error));
681
+ const $io1 = input => "string" === typeof input.message && (undefined === input.type || "string" === typeof input.type) && (undefined === input.code || "string" === typeof input.code) && (undefined === input.exitCode || "number" === typeof input.exitCode) && (undefined === input.signalCode || "number" === typeof input.signalCode) && (undefined === input.statusCode || "number" === typeof input.statusCode) && (undefined === input.headers || "object" === typeof input.headers && null !== input.headers && false === Array.isArray(input.headers) && $io2(input.headers)) && (undefined === input.data || "object" === typeof input.data && null !== input.data && false === Array.isArray(input.data) && $io3(input.data)) && (null === input.cause || undefined === input.cause || "object" === typeof input.cause && null !== input.cause && $io1(input.cause)) && (null === input.errors || undefined === input.errors || Array.isArray(input.errors) && input.errors.every(elem => "object" === typeof elem && null !== elem && $io1(elem)));
682
+ const $io2 = input => Object.keys(input).every(key => {
683
+ const value = input[key];
684
+ if (undefined === value)
685
+ return true;
686
+ return "string" === typeof value;
687
+ });
688
+ const $io3 = input => true;
689
+ return "object" === typeof input && null !== input && $io0(input);
690
+ };
691
+ if (false === __is(input))
692
+ ((input, _path, _exceptionable = true) => {
693
+ const $guard = __typia.createAssertGuard.guard;
694
+ const $join = __typia.createAssertGuard.join;
695
+ const $ao0 = (input, _path, _exceptionable = true) => ("string" === typeof input.name || $guard(_exceptionable, {
696
+ path: _path + ".name",
697
+ expected: "string",
698
+ value: input.name
699
+ }, errorFactory)) && ("ok" === input.status || "error" === input.status || $guard(_exceptionable, {
700
+ path: _path + ".status",
701
+ expected: "(\"error\" | \"ok\")",
702
+ value: input.status
703
+ }, errorFactory)) && (null === input.error || ("object" === typeof input.error && null !== input.error || $guard(_exceptionable, {
704
+ path: _path + ".error",
705
+ expected: "(NxtError | null)",
706
+ value: input.error
707
+ }, errorFactory)) && $ao1(input.error, _path + ".error", true && _exceptionable) || $guard(_exceptionable, {
708
+ path: _path + ".error",
709
+ expected: "(NxtError | null)",
710
+ value: input.error
711
+ }, errorFactory));
712
+ const $ao1 = (input, _path, _exceptionable = true) => ("string" === typeof input.message || $guard(_exceptionable, {
713
+ path: _path + ".message",
714
+ expected: "string",
715
+ value: input.message
716
+ }, errorFactory)) && (undefined === input.type || "string" === typeof input.type || $guard(_exceptionable, {
717
+ path: _path + ".type",
718
+ expected: "(string | undefined)",
719
+ value: input.type
720
+ }, errorFactory)) && (undefined === input.code || "string" === typeof input.code || $guard(_exceptionable, {
721
+ path: _path + ".code",
722
+ expected: "(string | undefined)",
723
+ value: input.code
724
+ }, errorFactory)) && (undefined === input.exitCode || "number" === typeof input.exitCode || $guard(_exceptionable, {
725
+ path: _path + ".exitCode",
726
+ expected: "(number | undefined)",
727
+ value: input.exitCode
728
+ }, errorFactory)) && (undefined === input.signalCode || "number" === typeof input.signalCode || $guard(_exceptionable, {
729
+ path: _path + ".signalCode",
730
+ expected: "(number | undefined)",
731
+ value: input.signalCode
732
+ }, errorFactory)) && (undefined === input.statusCode || "number" === typeof input.statusCode || $guard(_exceptionable, {
733
+ path: _path + ".statusCode",
734
+ expected: "(number | undefined)",
735
+ value: input.statusCode
736
+ }, errorFactory)) && (undefined === input.headers || ("object" === typeof input.headers && null !== input.headers && false === Array.isArray(input.headers) || $guard(_exceptionable, {
737
+ path: _path + ".headers",
738
+ expected: "(Record<string, string> | undefined)",
739
+ value: input.headers
740
+ }, errorFactory)) && $ao2(input.headers, _path + ".headers", true && _exceptionable) || $guard(_exceptionable, {
741
+ path: _path + ".headers",
742
+ expected: "(Record<string, string> | undefined)",
743
+ value: input.headers
744
+ }, errorFactory)) && (undefined === input.data || ("object" === typeof input.data && null !== input.data && false === Array.isArray(input.data) || $guard(_exceptionable, {
745
+ path: _path + ".data",
746
+ expected: "(object | undefined)",
747
+ value: input.data
748
+ }, errorFactory)) && $ao3(input.data, _path + ".data", true && _exceptionable) || $guard(_exceptionable, {
749
+ path: _path + ".data",
750
+ expected: "(object | undefined)",
751
+ value: input.data
752
+ }, errorFactory)) && (null === input.cause || undefined === input.cause || ("object" === typeof input.cause && null !== input.cause || $guard(_exceptionable, {
753
+ path: _path + ".cause",
754
+ expected: "(NxtError | null | undefined)",
755
+ value: input.cause
756
+ }, errorFactory)) && $ao1(input.cause, _path + ".cause", true && _exceptionable) || $guard(_exceptionable, {
757
+ path: _path + ".cause",
758
+ expected: "(NxtError | null | undefined)",
759
+ value: input.cause
760
+ }, errorFactory)) && (null === input.errors || undefined === input.errors || (Array.isArray(input.errors) || $guard(_exceptionable, {
761
+ path: _path + ".errors",
762
+ expected: "(Array<NxtError> | null | undefined)",
763
+ value: input.errors
764
+ }, errorFactory)) && input.errors.every((elem, _index1) => ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
765
+ path: _path + ".errors[" + _index1 + "]",
766
+ expected: "NxtError",
767
+ value: elem
768
+ }, errorFactory)) && $ao1(elem, _path + ".errors[" + _index1 + "]", true && _exceptionable) || $guard(_exceptionable, {
769
+ path: _path + ".errors[" + _index1 + "]",
770
+ expected: "NxtError",
771
+ value: elem
772
+ }, errorFactory)) || $guard(_exceptionable, {
773
+ path: _path + ".errors",
774
+ expected: "(Array<NxtError> | null | undefined)",
775
+ value: input.errors
776
+ }, errorFactory));
777
+ const $ao2 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every(key => {
778
+ const value = input[key];
779
+ if (undefined === value)
780
+ return true;
781
+ return "string" === typeof value || $guard(_exceptionable, {
782
+ path: _path + $join(key),
783
+ expected: "string",
784
+ value: value
785
+ }, errorFactory);
786
+ });
787
+ const $ao3 = (input, _path, _exceptionable = true) => true;
788
+ return ("object" === typeof input && null !== input || $guard(true, {
789
+ path: _path + "",
790
+ expected: "FileReplica",
791
+ value: input
792
+ }, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
793
+ path: _path + "",
794
+ expected: "FileReplica",
795
+ value: input
796
+ }, errorFactory);
797
+ })(input, "$input", true);
798
+ };
799
+ export const stringifyFileReplica = input => {
800
+ const $io1 = input => "string" === typeof input.message && (undefined === input.type || "string" === typeof input.type) && (undefined === input.code || "string" === typeof input.code) && (undefined === input.exitCode || "number" === typeof input.exitCode) && (undefined === input.signalCode || "number" === typeof input.signalCode) && (undefined === input.statusCode || "number" === typeof input.statusCode) && (undefined === input.headers || "object" === typeof input.headers && null !== input.headers && false === Array.isArray(input.headers) && $io2(input.headers)) && (undefined === input.data || "object" === typeof input.data && null !== input.data && false === Array.isArray(input.data) && $io3(input.data)) && (null === input.cause || undefined === input.cause || "object" === typeof input.cause && null !== input.cause && $io1(input.cause)) && (null === input.errors || undefined === input.errors || Array.isArray(input.errors) && input.errors.every(elem => "object" === typeof elem && null !== elem && $io1(elem)));
801
+ const $io2 = input => Object.keys(input).every(key => {
802
+ const value = input[key];
803
+ if (undefined === value)
804
+ return true;
805
+ return "string" === typeof value;
806
+ });
807
+ const $io3 = input => true;
808
+ const $string = __typia.json.createStringify.string;
809
+ const $throws = __typia.json.createStringify.throws;
810
+ const $so0 = input => `{"name":${$string(input.name)},"status":${(() => {
811
+ if ("string" === typeof input.status)
812
+ return $string(input.status);
813
+ if ("string" === typeof input.status)
814
+ return "\"" + input.status + "\"";
815
+ $throws({
816
+ expected: "(\"error\" | \"ok\")",
817
+ value: input.status
818
+ });
819
+ })()},"error":${null !== input.error ? $so1(input.error) : "null"}}`;
820
+ const $so1 = input => `{${undefined === input.type ? "" : `"type":${undefined !== input.type ? $string(input.type) : undefined},`}${undefined === input.code ? "" : `"code":${undefined !== input.code ? $string(input.code) : undefined},`}${undefined === input.exitCode ? "" : `"exitCode":${undefined !== input.exitCode ? input.exitCode : undefined},`}${undefined === input.signalCode ? "" : `"signalCode":${undefined !== input.signalCode ? input.signalCode : undefined},`}${undefined === input.statusCode ? "" : `"statusCode":${undefined !== input.statusCode ? input.statusCode : undefined},`}${undefined === input.headers ? "" : `"headers":${undefined !== input.headers ? $so2(input.headers) : undefined},`}${undefined === input.data ? "" : `"data":${undefined !== input.data ? "{}" : undefined},`}${undefined === input.cause ? "" : `"cause":${undefined !== input.cause ? null !== input.cause ? $so1(input.cause) : "null" : undefined},`}${undefined === input.errors ? "" : `"errors":${undefined !== input.errors ? null !== input.errors ? `[${input.errors.map(elem => $so1(elem)).join(",")}]` : "null" : undefined},`}"message":${$string(input.message)}}`;
821
+ const $so2 = input => `{${Object.entries(input).map(([key, value]) => { if (undefined === value)
822
+ return ""; return `${JSON.stringify(key)}:${$string(value)}`; }).filter(str => "" !== str).join(",")}}`;
823
+ return $so0(input);
824
+ };
825
+ export const assertStringifyFileReplica = (input, errorFactory) => { const assert = (input, errorFactory) => {
826
+ const __is = input => {
827
+ const $io0 = input => "string" === typeof input.name && ("ok" === input.status || "error" === input.status) && (null === input.error || "object" === typeof input.error && null !== input.error && $io1(input.error));
828
+ const $io1 = input => "string" === typeof input.message && (undefined === input.type || "string" === typeof input.type) && (undefined === input.code || "string" === typeof input.code) && (undefined === input.exitCode || "number" === typeof input.exitCode && !Number.isNaN(input.exitCode)) && (undefined === input.signalCode || "number" === typeof input.signalCode && !Number.isNaN(input.signalCode)) && (undefined === input.statusCode || "number" === typeof input.statusCode && !Number.isNaN(input.statusCode)) && (undefined === input.headers || "object" === typeof input.headers && null !== input.headers && false === Array.isArray(input.headers) && $io2(input.headers)) && (undefined === input.data || "object" === typeof input.data && null !== input.data && false === Array.isArray(input.data) && $io3(input.data)) && (null === input.cause || undefined === input.cause || "object" === typeof input.cause && null !== input.cause && $io1(input.cause)) && (null === input.errors || undefined === input.errors || Array.isArray(input.errors) && input.errors.every(elem => "object" === typeof elem && null !== elem && $io1(elem)));
829
+ const $io2 = input => Object.keys(input).every(key => {
830
+ const value = input[key];
831
+ if (undefined === value)
832
+ return true;
833
+ return "string" === typeof value;
834
+ });
835
+ const $io3 = input => true;
836
+ return "object" === typeof input && null !== input && $io0(input);
837
+ };
838
+ if (false === __is(input))
839
+ ((input, _path, _exceptionable = true) => {
840
+ const $guard = __typia.json.createAssertStringify.guard;
841
+ const $join = __typia.json.createAssertStringify.join;
842
+ const $ao0 = (input, _path, _exceptionable = true) => ("string" === typeof input.name || $guard(_exceptionable, {
843
+ path: _path + ".name",
844
+ expected: "string",
845
+ value: input.name
846
+ }, errorFactory)) && ("ok" === input.status || "error" === input.status || $guard(_exceptionable, {
847
+ path: _path + ".status",
848
+ expected: "(\"error\" | \"ok\")",
849
+ value: input.status
850
+ }, errorFactory)) && (null === input.error || ("object" === typeof input.error && null !== input.error || $guard(_exceptionable, {
851
+ path: _path + ".error",
852
+ expected: "(NxtError | null)",
853
+ value: input.error
854
+ }, errorFactory)) && $ao1(input.error, _path + ".error", true && _exceptionable) || $guard(_exceptionable, {
855
+ path: _path + ".error",
856
+ expected: "(NxtError | null)",
857
+ value: input.error
858
+ }, errorFactory));
859
+ const $ao1 = (input, _path, _exceptionable = true) => ("string" === typeof input.message || $guard(_exceptionable, {
860
+ path: _path + ".message",
861
+ expected: "string",
862
+ value: input.message
863
+ }, errorFactory)) && (undefined === input.type || "string" === typeof input.type || $guard(_exceptionable, {
864
+ path: _path + ".type",
865
+ expected: "(string | undefined)",
866
+ value: input.type
867
+ }, errorFactory)) && (undefined === input.code || "string" === typeof input.code || $guard(_exceptionable, {
868
+ path: _path + ".code",
869
+ expected: "(string | undefined)",
870
+ value: input.code
871
+ }, errorFactory)) && (undefined === input.exitCode || "number" === typeof input.exitCode && !Number.isNaN(input.exitCode) || $guard(_exceptionable, {
872
+ path: _path + ".exitCode",
873
+ expected: "(number | undefined)",
874
+ value: input.exitCode
875
+ }, errorFactory)) && (undefined === input.signalCode || "number" === typeof input.signalCode && !Number.isNaN(input.signalCode) || $guard(_exceptionable, {
876
+ path: _path + ".signalCode",
877
+ expected: "(number | undefined)",
878
+ value: input.signalCode
879
+ }, errorFactory)) && (undefined === input.statusCode || "number" === typeof input.statusCode && !Number.isNaN(input.statusCode) || $guard(_exceptionable, {
880
+ path: _path + ".statusCode",
881
+ expected: "(number | undefined)",
882
+ value: input.statusCode
883
+ }, errorFactory)) && (undefined === input.headers || ("object" === typeof input.headers && null !== input.headers && false === Array.isArray(input.headers) || $guard(_exceptionable, {
884
+ path: _path + ".headers",
885
+ expected: "(Record<string, string> | undefined)",
886
+ value: input.headers
887
+ }, errorFactory)) && $ao2(input.headers, _path + ".headers", true && _exceptionable) || $guard(_exceptionable, {
888
+ path: _path + ".headers",
889
+ expected: "(Record<string, string> | undefined)",
890
+ value: input.headers
891
+ }, errorFactory)) && (undefined === input.data || ("object" === typeof input.data && null !== input.data && false === Array.isArray(input.data) || $guard(_exceptionable, {
892
+ path: _path + ".data",
893
+ expected: "(object | undefined)",
894
+ value: input.data
895
+ }, errorFactory)) && $ao3(input.data, _path + ".data", true && _exceptionable) || $guard(_exceptionable, {
896
+ path: _path + ".data",
897
+ expected: "(object | undefined)",
898
+ value: input.data
899
+ }, errorFactory)) && (null === input.cause || undefined === input.cause || ("object" === typeof input.cause && null !== input.cause || $guard(_exceptionable, {
900
+ path: _path + ".cause",
901
+ expected: "(NxtError | null | undefined)",
902
+ value: input.cause
903
+ }, errorFactory)) && $ao1(input.cause, _path + ".cause", true && _exceptionable) || $guard(_exceptionable, {
904
+ path: _path + ".cause",
905
+ expected: "(NxtError | null | undefined)",
906
+ value: input.cause
907
+ }, errorFactory)) && (null === input.errors || undefined === input.errors || (Array.isArray(input.errors) || $guard(_exceptionable, {
908
+ path: _path + ".errors",
909
+ expected: "(Array<NxtError> | null | undefined)",
910
+ value: input.errors
911
+ }, errorFactory)) && input.errors.every((elem, _index1) => ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
912
+ path: _path + ".errors[" + _index1 + "]",
913
+ expected: "NxtError",
914
+ value: elem
915
+ }, errorFactory)) && $ao1(elem, _path + ".errors[" + _index1 + "]", true && _exceptionable) || $guard(_exceptionable, {
916
+ path: _path + ".errors[" + _index1 + "]",
917
+ expected: "NxtError",
918
+ value: elem
919
+ }, errorFactory)) || $guard(_exceptionable, {
920
+ path: _path + ".errors",
921
+ expected: "(Array<NxtError> | null | undefined)",
922
+ value: input.errors
923
+ }, errorFactory));
924
+ const $ao2 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every(key => {
925
+ const value = input[key];
926
+ if (undefined === value)
927
+ return true;
928
+ return "string" === typeof value || $guard(_exceptionable, {
929
+ path: _path + $join(key),
930
+ expected: "string",
931
+ value: value
932
+ }, errorFactory);
933
+ });
934
+ const $ao3 = (input, _path, _exceptionable = true) => true;
935
+ return ("object" === typeof input && null !== input || $guard(true, {
936
+ path: _path + "",
937
+ expected: "FileReplica",
938
+ value: input
939
+ }, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
940
+ path: _path + "",
941
+ expected: "FileReplica",
942
+ value: input
943
+ }, errorFactory);
944
+ })(input, "$input", true);
945
+ return input;
946
+ }; const stringify = input => {
947
+ const $io1 = input => "string" === typeof input.message && (undefined === input.type || "string" === typeof input.type) && (undefined === input.code || "string" === typeof input.code) && (undefined === input.exitCode || "number" === typeof input.exitCode) && (undefined === input.signalCode || "number" === typeof input.signalCode) && (undefined === input.statusCode || "number" === typeof input.statusCode) && (undefined === input.headers || "object" === typeof input.headers && null !== input.headers && false === Array.isArray(input.headers) && $io2(input.headers)) && (undefined === input.data || "object" === typeof input.data && null !== input.data && false === Array.isArray(input.data) && $io3(input.data)) && (null === input.cause || undefined === input.cause || "object" === typeof input.cause && null !== input.cause && $io1(input.cause)) && (null === input.errors || undefined === input.errors || Array.isArray(input.errors) && input.errors.every(elem => "object" === typeof elem && null !== elem && $io1(elem)));
948
+ const $io2 = input => Object.keys(input).every(key => {
949
+ const value = input[key];
950
+ if (undefined === value)
951
+ return true;
952
+ return "string" === typeof value;
953
+ });
954
+ const $io3 = input => true;
955
+ const $string = __typia.json.createAssertStringify.string;
956
+ const $throws = __typia.json.createAssertStringify.throws;
957
+ const $so0 = input => `{"name":${$string(input.name)},"status":${(() => {
958
+ if ("string" === typeof input.status)
959
+ return $string(input.status);
960
+ if ("string" === typeof input.status)
961
+ return "\"" + input.status + "\"";
962
+ $throws({
963
+ expected: "(\"error\" | \"ok\")",
964
+ value: input.status
965
+ });
966
+ })()},"error":${null !== input.error ? $so1(input.error) : "null"}}`;
967
+ const $so1 = input => `{${undefined === input.type ? "" : `"type":${undefined !== input.type ? $string(input.type) : undefined},`}${undefined === input.code ? "" : `"code":${undefined !== input.code ? $string(input.code) : undefined},`}${undefined === input.exitCode ? "" : `"exitCode":${undefined !== input.exitCode ? input.exitCode : undefined},`}${undefined === input.signalCode ? "" : `"signalCode":${undefined !== input.signalCode ? input.signalCode : undefined},`}${undefined === input.statusCode ? "" : `"statusCode":${undefined !== input.statusCode ? input.statusCode : undefined},`}${undefined === input.headers ? "" : `"headers":${undefined !== input.headers ? $so2(input.headers) : undefined},`}${undefined === input.data ? "" : `"data":${undefined !== input.data ? "{}" : undefined},`}${undefined === input.cause ? "" : `"cause":${undefined !== input.cause ? null !== input.cause ? $so1(input.cause) : "null" : undefined},`}${undefined === input.errors ? "" : `"errors":${undefined !== input.errors ? null !== input.errors ? `[${input.errors.map(elem => $so1(elem)).join(",")}]` : "null" : undefined},`}"message":${$string(input.message)}}`;
968
+ const $so2 = input => `{${Object.entries(input).map(([key, value]) => { if (undefined === value)
969
+ return ""; return `${JSON.stringify(key)}:${$string(value)}`; }).filter(str => "" !== str).join(",")}}`;
970
+ return $so0(input);
971
+ }; return stringify(assert(input, errorFactory)); };