@nestia/sdk 3.9.1 → 3.10.0-dev.20240803-2
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/lib/executable/internal/NestiaConfigLoader.js +539 -593
- package/lib/executable/internal/NestiaConfigLoader.js.map +1 -1
- package/lib/generates/SwaggerGenerator.js +50 -58
- package/lib/generates/SwaggerGenerator.js.map +1 -1
- package/lib/generates/internal/SdkAliasCollection.js +5 -9
- package/lib/generates/internal/SdkAliasCollection.js.map +1 -1
- package/lib/generates/internal/SdkDistributionComposer.js +26 -31
- package/lib/generates/internal/SdkDistributionComposer.js.map +1 -1
- package/lib/generates/internal/SdkHttpFunctionProgrammer.js +10 -18
- package/lib/generates/internal/SdkHttpFunctionProgrammer.js.map +1 -1
- package/lib/generates/internal/SdkHttpNamespaceProgrammer.js +10 -18
- package/lib/generates/internal/SdkHttpNamespaceProgrammer.js.map +1 -1
- package/package.json +7 -7
|
@@ -68,602 +68,548 @@ var NestiaConfigLoader;
|
|
|
68
68
|
? loaded.default
|
|
69
69
|
: loaded;
|
|
70
70
|
try {
|
|
71
|
-
return ((input
|
|
72
|
-
const
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
value: input.name
|
|
609
|
-
}, errorFactory)) && (undefined === input.description || "string" === typeof input.description || $guard(_exceptionable, {
|
|
610
|
-
path: _path + ".description",
|
|
611
|
-
expected: "(string | undefined)",
|
|
612
|
-
value: input.description
|
|
613
|
-
}, errorFactory));
|
|
614
|
-
const $ao21 = (input, _path, _exceptionable = true) => ("string" === typeof input.output || $guard(_exceptionable, {
|
|
615
|
-
path: _path + ".output",
|
|
616
|
-
expected: "string",
|
|
617
|
-
value: input.output
|
|
618
|
-
}, errorFactory)) && (undefined === input.keyword || "boolean" === typeof input.keyword || $guard(_exceptionable, {
|
|
619
|
-
path: _path + ".keyword",
|
|
620
|
-
expected: "(boolean | undefined)",
|
|
621
|
-
value: input.keyword
|
|
622
|
-
}, errorFactory)) && (null === input.separate || undefined === input.separate || "function" === typeof input.separate || $guard(_exceptionable, {
|
|
623
|
-
path: _path + ".separate",
|
|
624
|
-
expected: "(null | undefined)",
|
|
625
|
-
value: input.separate
|
|
626
|
-
}, errorFactory)) && (undefined === input.beautify || "number" === typeof input.beautify || "boolean" === typeof input.beautify || $guard(_exceptionable, {
|
|
627
|
-
path: _path + ".beautify",
|
|
628
|
-
expected: "(boolean | number | undefined)",
|
|
629
|
-
value: input.beautify
|
|
630
|
-
}, errorFactory));
|
|
631
|
-
const $au0 = (input, _path, _exceptionable = true) => (() => {
|
|
632
|
-
if ("apiKey" === input.type)
|
|
633
|
-
return $ao10(input, _path, true && _exceptionable);
|
|
634
|
-
else if ("basic" === input.scheme)
|
|
635
|
-
return $ao11(input, _path, true && _exceptionable);
|
|
636
|
-
else if ("bearer" === input.scheme)
|
|
637
|
-
return $ao12(input, _path, true && _exceptionable);
|
|
638
|
-
else if ("oauth2" === input.type)
|
|
639
|
-
return $ao13(input, _path, true && _exceptionable);
|
|
640
|
-
else if ("openIdConnect" === input.type)
|
|
641
|
-
return $ao19(input, _path, true && _exceptionable);
|
|
642
|
-
else
|
|
643
|
-
return $guard(_exceptionable, {
|
|
644
|
-
path: _path,
|
|
645
|
-
expected: "(OpenApi.ISecurityScheme.IApiKey | OpenApi.ISecurityScheme.IHttpBasic | OpenApi.ISecurityScheme.IHttpBearer | OpenApi.ISecurityScheme.IOAuth2 | OpenApi.ISecurityScheme.IOpenId)",
|
|
646
|
-
value: input
|
|
647
|
-
}, errorFactory);
|
|
648
|
-
})();
|
|
649
|
-
return ("object" === typeof input && null !== input || $guard(true, {
|
|
650
|
-
path: _path + "",
|
|
651
|
-
expected: "INestiaConfig",
|
|
652
|
-
value: input
|
|
653
|
-
}, errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
|
|
654
|
-
path: _path + "",
|
|
655
|
-
expected: "INestiaConfig",
|
|
656
|
-
value: input
|
|
657
|
-
}, errorFactory);
|
|
658
|
-
})(input, "$input", true);
|
|
71
|
+
return (() => { const $guard = typia_1.default.assert.guard; const $join = typia_1.default.assert.join; const $io0 = input => null !== input.input && undefined !== input.input && ("function" === typeof input.input || "string" === typeof input.input || (Array.isArray(input.input) && input.input.every(elem => "string" === typeof elem) || "object" === typeof input.input && null !== input.input && $io1(input.input))) && (undefined === input.swagger || "object" === typeof input.swagger && null !== input.swagger && $io2(input.swagger)) && (undefined === input.openai || "object" === typeof input.openai && null !== input.openai && $io21(input.openai)) && (undefined === input.output || "string" === typeof input.output) && (undefined === input.distribute || "string" === typeof input.distribute) && (undefined === input.simulate || "boolean" === typeof input.simulate) && (undefined === input.e2e || "string" === typeof input.e2e) && (undefined === input.propagate || "boolean" === typeof input.propagate) && (undefined === input.clone || "boolean" === typeof input.clone) && (undefined === input.primitive || "boolean" === typeof input.primitive) && (undefined === input.assert || "boolean" === typeof input.assert) && (undefined === input.json || "boolean" === typeof input.json); const $io1 = input => Array.isArray(input.include) && input.include.every(elem => "string" === typeof elem) && (undefined === input.exclude || Array.isArray(input.exclude) && input.exclude.every(elem => "string" === typeof elem)); const $io2 = input => "string" === typeof input.output && (undefined === input.openapi || "2.0" === input.openapi || "3.0" === input.openapi || "3.1" === input.openapi) && (undefined === input.beautify || "number" === typeof input.beautify || "boolean" === typeof input.beautify) && (undefined === input.additional || "boolean" === typeof input.additional) && (undefined === input.info || "object" === typeof input.info && null !== input.info && false === Array.isArray(input.info) && $io3(input.info)) && (undefined === input.servers || Array.isArray(input.servers) && input.servers.every(elem => "object" === typeof elem && null !== elem && $io6(elem))) && (undefined === input.security || "object" === typeof input.security && null !== input.security && false === Array.isArray(input.security) && $io9(input.security)) && (undefined === input.tags || Array.isArray(input.tags) && input.tags.every(elem => "object" === typeof elem && null !== elem && $io20(elem))) && (undefined === input.decompose || "boolean" === typeof input.decompose); const $io3 = input => (undefined === input.title || "string" === typeof input.title) && (undefined === input.summary || "string" === typeof input.summary) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.termsOfService || "string" === typeof input.termsOfService) && (undefined === input.contact || "object" === typeof input.contact && null !== input.contact && false === Array.isArray(input.contact) && $io4(input.contact)) && (undefined === input.license || "object" === typeof input.license && null !== input.license && $io5(input.license)) && (undefined === input.version || "string" === typeof input.version); const $io4 = input => (undefined === input.name || "string" === typeof input.name) && (undefined === input.url || "string" === typeof input.url) && (undefined === input.email || "string" === typeof input.email && /^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i.test(input.email)); const $io5 = input => "string" === typeof input.name && (undefined === input.identifier || "string" === typeof input.identifier) && (undefined === input.url || "string" === typeof input.url); const $io6 = input => "string" === typeof input.url && (undefined === input.description || "string" === typeof input.description) && (undefined === input.variables || "object" === typeof input.variables && null !== input.variables && false === Array.isArray(input.variables) && $io7(input.variables)); const $io7 = input => Object.keys(input).every(key => {
|
|
72
|
+
const value = input[key];
|
|
73
|
+
if (undefined === value)
|
|
74
|
+
return true;
|
|
75
|
+
return "object" === typeof value && null !== value && $io8(value);
|
|
76
|
+
}); const $io8 = input => "string" === typeof input["default"] && (undefined === input["enum"] || Array.isArray(input["enum"]) && input["enum"].every(elem => "string" === typeof elem)) && (undefined === input.description || "string" === typeof input.description); const $io9 = input => Object.keys(input).every(key => {
|
|
77
|
+
const value = input[key];
|
|
78
|
+
if (undefined === value)
|
|
79
|
+
return true;
|
|
80
|
+
return "object" === typeof value && null !== value && $iu0(value);
|
|
81
|
+
}); const $io10 = input => "apiKey" === input.type && (undefined === input["in"] || "query" === input["in"] || "header" === input["in"] || "cookie" === input["in"]) && (undefined === input.name || "string" === typeof input.name) && (undefined === input.description || "string" === typeof input.description); const $io11 = input => "http" === input.type && "basic" === input.scheme && (undefined === input.description || "string" === typeof input.description); const $io12 = input => "http" === input.type && "bearer" === input.scheme && (undefined === input.bearerFormat || "string" === typeof input.bearerFormat) && (undefined === input.description || "string" === typeof input.description); const $io13 = input => "oauth2" === input.type && ("object" === typeof input.flows && null !== input.flows && false === Array.isArray(input.flows) && $io14(input.flows)) && (undefined === input.description || "string" === typeof input.description); const $io14 = input => (undefined === input.authorizationCode || "object" === typeof input.authorizationCode && null !== input.authorizationCode && false === Array.isArray(input.authorizationCode) && $io15(input.authorizationCode)) && (undefined === input.implicit || "object" === typeof input.implicit && null !== input.implicit && false === Array.isArray(input.implicit) && $io17(input.implicit)) && (undefined === input.password || "object" === typeof input.password && null !== input.password && false === Array.isArray(input.password) && $io18(input.password)) && (undefined === input.clientCredentials || "object" === typeof input.clientCredentials && null !== input.clientCredentials && false === Array.isArray(input.clientCredentials) && $io18(input.clientCredentials)); const $io15 = input => (undefined === input.authorizationUrl || "string" === typeof input.authorizationUrl) && (undefined === input.tokenUrl || "string" === typeof input.tokenUrl) && (undefined === input.refreshUrl || "string" === typeof input.refreshUrl) && (undefined === input.scopes || "object" === typeof input.scopes && null !== input.scopes && false === Array.isArray(input.scopes) && $io16(input.scopes)); const $io16 = input => Object.keys(input).every(key => {
|
|
82
|
+
const value = input[key];
|
|
83
|
+
if (undefined === value)
|
|
84
|
+
return true;
|
|
85
|
+
return "string" === typeof value;
|
|
86
|
+
}); const $io17 = input => (undefined === input.authorizationUrl || "string" === typeof input.authorizationUrl) && (undefined === input.refreshUrl || "string" === typeof input.refreshUrl) && (undefined === input.scopes || "object" === typeof input.scopes && null !== input.scopes && false === Array.isArray(input.scopes) && $io16(input.scopes)); const $io18 = input => (undefined === input.tokenUrl || "string" === typeof input.tokenUrl) && (undefined === input.refreshUrl || "string" === typeof input.refreshUrl) && (undefined === input.scopes || "object" === typeof input.scopes && null !== input.scopes && false === Array.isArray(input.scopes) && $io16(input.scopes)); const $io19 = input => "openIdConnect" === input.type && "string" === typeof input.openIdConnectUrl && (undefined === input.description || "string" === typeof input.description); const $io20 = input => "string" === typeof input.name && (undefined === input.description || "string" === typeof input.description); const $io21 = input => "string" === typeof input.output && (undefined === input.keyword || "boolean" === typeof input.keyword) && (null === input.separate || undefined === input.separate || "function" === typeof input.separate) && (undefined === input.beautify || "number" === typeof input.beautify || "boolean" === typeof input.beautify); const $iu0 = input => (() => {
|
|
87
|
+
if ("apiKey" === input.type)
|
|
88
|
+
return $io10(input);
|
|
89
|
+
else if ("basic" === input.scheme)
|
|
90
|
+
return $io11(input);
|
|
91
|
+
else if ("bearer" === input.scheme)
|
|
92
|
+
return $io12(input);
|
|
93
|
+
else if ("oauth2" === input.type)
|
|
94
|
+
return $io13(input);
|
|
95
|
+
else if ("openIdConnect" === input.type)
|
|
96
|
+
return $io19(input);
|
|
97
|
+
else
|
|
98
|
+
return false;
|
|
99
|
+
})(); const $ao0 = (input, _path, _exceptionable = true) => (null !== input.input || $guard(_exceptionable, {
|
|
100
|
+
path: _path + ".input",
|
|
101
|
+
expected: "(Array<string> | INestiaConfig.IInput | string)",
|
|
102
|
+
value: input.input
|
|
103
|
+
}, _errorFactory)) && (undefined !== input.input || $guard(_exceptionable, {
|
|
104
|
+
path: _path + ".input",
|
|
105
|
+
expected: "(Array<string> | INestiaConfig.IInput | string)",
|
|
106
|
+
value: input.input
|
|
107
|
+
}, _errorFactory)) && ("function" === typeof input.input || "string" === typeof input.input || (Array.isArray(input.input) && input.input.every((elem, _index7) => "string" === typeof elem || $guard(_exceptionable, {
|
|
108
|
+
path: _path + ".input[" + _index7 + "]",
|
|
109
|
+
expected: "string",
|
|
110
|
+
value: elem
|
|
111
|
+
}, _errorFactory)) || "object" === typeof input.input && null !== input.input && $ao1(input.input, _path + ".input", true && _exceptionable) || $guard(_exceptionable, {
|
|
112
|
+
path: _path + ".input",
|
|
113
|
+
expected: "(Array<string> | INestiaConfig.IInput | string)",
|
|
114
|
+
value: input.input
|
|
115
|
+
}, _errorFactory)) || $guard(_exceptionable, {
|
|
116
|
+
path: _path + ".input",
|
|
117
|
+
expected: "(Array<string> | INestiaConfig.IInput | string)",
|
|
118
|
+
value: input.input
|
|
119
|
+
}, _errorFactory)) && (undefined === input.swagger || ("object" === typeof input.swagger && null !== input.swagger || $guard(_exceptionable, {
|
|
120
|
+
path: _path + ".swagger",
|
|
121
|
+
expected: "(INestiaConfig.ISwaggerConfig | undefined)",
|
|
122
|
+
value: input.swagger
|
|
123
|
+
}, _errorFactory)) && $ao2(input.swagger, _path + ".swagger", true && _exceptionable) || $guard(_exceptionable, {
|
|
124
|
+
path: _path + ".swagger",
|
|
125
|
+
expected: "(INestiaConfig.ISwaggerConfig | undefined)",
|
|
126
|
+
value: input.swagger
|
|
127
|
+
}, _errorFactory)) && (undefined === input.openai || ("object" === typeof input.openai && null !== input.openai || $guard(_exceptionable, {
|
|
128
|
+
path: _path + ".openai",
|
|
129
|
+
expected: "(INestiaConfig.IOpenAiConnfig | undefined)",
|
|
130
|
+
value: input.openai
|
|
131
|
+
}, _errorFactory)) && $ao21(input.openai, _path + ".openai", true && _exceptionable) || $guard(_exceptionable, {
|
|
132
|
+
path: _path + ".openai",
|
|
133
|
+
expected: "(INestiaConfig.IOpenAiConnfig | undefined)",
|
|
134
|
+
value: input.openai
|
|
135
|
+
}, _errorFactory)) && (undefined === input.output || "string" === typeof input.output || $guard(_exceptionable, {
|
|
136
|
+
path: _path + ".output",
|
|
137
|
+
expected: "(string | undefined)",
|
|
138
|
+
value: input.output
|
|
139
|
+
}, _errorFactory)) && (undefined === input.distribute || "string" === typeof input.distribute || $guard(_exceptionable, {
|
|
140
|
+
path: _path + ".distribute",
|
|
141
|
+
expected: "(string | undefined)",
|
|
142
|
+
value: input.distribute
|
|
143
|
+
}, _errorFactory)) && (undefined === input.simulate || "boolean" === typeof input.simulate || $guard(_exceptionable, {
|
|
144
|
+
path: _path + ".simulate",
|
|
145
|
+
expected: "(boolean | undefined)",
|
|
146
|
+
value: input.simulate
|
|
147
|
+
}, _errorFactory)) && (undefined === input.e2e || "string" === typeof input.e2e || $guard(_exceptionable, {
|
|
148
|
+
path: _path + ".e2e",
|
|
149
|
+
expected: "(string | undefined)",
|
|
150
|
+
value: input.e2e
|
|
151
|
+
}, _errorFactory)) && (undefined === input.propagate || "boolean" === typeof input.propagate || $guard(_exceptionable, {
|
|
152
|
+
path: _path + ".propagate",
|
|
153
|
+
expected: "(boolean | undefined)",
|
|
154
|
+
value: input.propagate
|
|
155
|
+
}, _errorFactory)) && (undefined === input.clone || "boolean" === typeof input.clone || $guard(_exceptionable, {
|
|
156
|
+
path: _path + ".clone",
|
|
157
|
+
expected: "(boolean | undefined)",
|
|
158
|
+
value: input.clone
|
|
159
|
+
}, _errorFactory)) && (undefined === input.primitive || "boolean" === typeof input.primitive || $guard(_exceptionable, {
|
|
160
|
+
path: _path + ".primitive",
|
|
161
|
+
expected: "(boolean | undefined)",
|
|
162
|
+
value: input.primitive
|
|
163
|
+
}, _errorFactory)) && (undefined === input.assert || "boolean" === typeof input.assert || $guard(_exceptionable, {
|
|
164
|
+
path: _path + ".assert",
|
|
165
|
+
expected: "(boolean | undefined)",
|
|
166
|
+
value: input.assert
|
|
167
|
+
}, _errorFactory)) && (undefined === input.json || "boolean" === typeof input.json || $guard(_exceptionable, {
|
|
168
|
+
path: _path + ".json",
|
|
169
|
+
expected: "(boolean | undefined)",
|
|
170
|
+
value: input.json
|
|
171
|
+
}, _errorFactory)); const $ao1 = (input, _path, _exceptionable = true) => ((Array.isArray(input.include) || $guard(_exceptionable, {
|
|
172
|
+
path: _path + ".include",
|
|
173
|
+
expected: "Array<string>",
|
|
174
|
+
value: input.include
|
|
175
|
+
}, _errorFactory)) && input.include.every((elem, _index8) => "string" === typeof elem || $guard(_exceptionable, {
|
|
176
|
+
path: _path + ".include[" + _index8 + "]",
|
|
177
|
+
expected: "string",
|
|
178
|
+
value: elem
|
|
179
|
+
}, _errorFactory)) || $guard(_exceptionable, {
|
|
180
|
+
path: _path + ".include",
|
|
181
|
+
expected: "Array<string>",
|
|
182
|
+
value: input.include
|
|
183
|
+
}, _errorFactory)) && (undefined === input.exclude || (Array.isArray(input.exclude) || $guard(_exceptionable, {
|
|
184
|
+
path: _path + ".exclude",
|
|
185
|
+
expected: "(Array<string> | undefined)",
|
|
186
|
+
value: input.exclude
|
|
187
|
+
}, _errorFactory)) && input.exclude.every((elem, _index9) => "string" === typeof elem || $guard(_exceptionable, {
|
|
188
|
+
path: _path + ".exclude[" + _index9 + "]",
|
|
189
|
+
expected: "string",
|
|
190
|
+
value: elem
|
|
191
|
+
}, _errorFactory)) || $guard(_exceptionable, {
|
|
192
|
+
path: _path + ".exclude",
|
|
193
|
+
expected: "(Array<string> | undefined)",
|
|
194
|
+
value: input.exclude
|
|
195
|
+
}, _errorFactory)); const $ao2 = (input, _path, _exceptionable = true) => ("string" === typeof input.output || $guard(_exceptionable, {
|
|
196
|
+
path: _path + ".output",
|
|
197
|
+
expected: "string",
|
|
198
|
+
value: input.output
|
|
199
|
+
}, _errorFactory)) && (undefined === input.openapi || "2.0" === input.openapi || "3.0" === input.openapi || "3.1" === input.openapi || $guard(_exceptionable, {
|
|
200
|
+
path: _path + ".openapi",
|
|
201
|
+
expected: "(\"2.0\" | \"3.0\" | \"3.1\" | undefined)",
|
|
202
|
+
value: input.openapi
|
|
203
|
+
}, _errorFactory)) && (undefined === input.beautify || "number" === typeof input.beautify || "boolean" === typeof input.beautify || $guard(_exceptionable, {
|
|
204
|
+
path: _path + ".beautify",
|
|
205
|
+
expected: "(boolean | number | undefined)",
|
|
206
|
+
value: input.beautify
|
|
207
|
+
}, _errorFactory)) && (undefined === input.additional || "boolean" === typeof input.additional || $guard(_exceptionable, {
|
|
208
|
+
path: _path + ".additional",
|
|
209
|
+
expected: "(boolean | undefined)",
|
|
210
|
+
value: input.additional
|
|
211
|
+
}, _errorFactory)) && (undefined === input.info || ("object" === typeof input.info && null !== input.info && false === Array.isArray(input.info) || $guard(_exceptionable, {
|
|
212
|
+
path: _path + ".info",
|
|
213
|
+
expected: "(Partial<OpenApi.IDocument.IInfo> | undefined)",
|
|
214
|
+
value: input.info
|
|
215
|
+
}, _errorFactory)) && $ao3(input.info, _path + ".info", true && _exceptionable) || $guard(_exceptionable, {
|
|
216
|
+
path: _path + ".info",
|
|
217
|
+
expected: "(Partial<OpenApi.IDocument.IInfo> | undefined)",
|
|
218
|
+
value: input.info
|
|
219
|
+
}, _errorFactory)) && (undefined === input.servers || (Array.isArray(input.servers) || $guard(_exceptionable, {
|
|
220
|
+
path: _path + ".servers",
|
|
221
|
+
expected: "(Array<OpenApi.IServer> | undefined)",
|
|
222
|
+
value: input.servers
|
|
223
|
+
}, _errorFactory)) && input.servers.every((elem, _index10) => ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
|
|
224
|
+
path: _path + ".servers[" + _index10 + "]",
|
|
225
|
+
expected: "OpenApi.IServer",
|
|
226
|
+
value: elem
|
|
227
|
+
}, _errorFactory)) && $ao6(elem, _path + ".servers[" + _index10 + "]", true && _exceptionable) || $guard(_exceptionable, {
|
|
228
|
+
path: _path + ".servers[" + _index10 + "]",
|
|
229
|
+
expected: "OpenApi.IServer",
|
|
230
|
+
value: elem
|
|
231
|
+
}, _errorFactory)) || $guard(_exceptionable, {
|
|
232
|
+
path: _path + ".servers",
|
|
233
|
+
expected: "(Array<OpenApi.IServer> | undefined)",
|
|
234
|
+
value: input.servers
|
|
235
|
+
}, _errorFactory)) && (undefined === input.security || ("object" === typeof input.security && null !== input.security && false === Array.isArray(input.security) || $guard(_exceptionable, {
|
|
236
|
+
path: _path + ".security",
|
|
237
|
+
expected: "(Record<string, OpenApi.ISecurityScheme> | undefined)",
|
|
238
|
+
value: input.security
|
|
239
|
+
}, _errorFactory)) && $ao9(input.security, _path + ".security", true && _exceptionable) || $guard(_exceptionable, {
|
|
240
|
+
path: _path + ".security",
|
|
241
|
+
expected: "(Record<string, OpenApi.ISecurityScheme> | undefined)",
|
|
242
|
+
value: input.security
|
|
243
|
+
}, _errorFactory)) && (undefined === input.tags || (Array.isArray(input.tags) || $guard(_exceptionable, {
|
|
244
|
+
path: _path + ".tags",
|
|
245
|
+
expected: "(Array<OpenApi.IDocument.ITag> | undefined)",
|
|
246
|
+
value: input.tags
|
|
247
|
+
}, _errorFactory)) && input.tags.every((elem, _index11) => ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
|
|
248
|
+
path: _path + ".tags[" + _index11 + "]",
|
|
249
|
+
expected: "OpenApi.IDocument.ITag",
|
|
250
|
+
value: elem
|
|
251
|
+
}, _errorFactory)) && $ao20(elem, _path + ".tags[" + _index11 + "]", true && _exceptionable) || $guard(_exceptionable, {
|
|
252
|
+
path: _path + ".tags[" + _index11 + "]",
|
|
253
|
+
expected: "OpenApi.IDocument.ITag",
|
|
254
|
+
value: elem
|
|
255
|
+
}, _errorFactory)) || $guard(_exceptionable, {
|
|
256
|
+
path: _path + ".tags",
|
|
257
|
+
expected: "(Array<OpenApi.IDocument.ITag> | undefined)",
|
|
258
|
+
value: input.tags
|
|
259
|
+
}, _errorFactory)) && (undefined === input.decompose || "boolean" === typeof input.decompose || $guard(_exceptionable, {
|
|
260
|
+
path: _path + ".decompose",
|
|
261
|
+
expected: "(boolean | undefined)",
|
|
262
|
+
value: input.decompose
|
|
263
|
+
}, _errorFactory)); const $ao3 = (input, _path, _exceptionable = true) => (undefined === input.title || "string" === typeof input.title || $guard(_exceptionable, {
|
|
264
|
+
path: _path + ".title",
|
|
265
|
+
expected: "(string | undefined)",
|
|
266
|
+
value: input.title
|
|
267
|
+
}, _errorFactory)) && (undefined === input.summary || "string" === typeof input.summary || $guard(_exceptionable, {
|
|
268
|
+
path: _path + ".summary",
|
|
269
|
+
expected: "(string | undefined)",
|
|
270
|
+
value: input.summary
|
|
271
|
+
}, _errorFactory)) && (undefined === input.description || "string" === typeof input.description || $guard(_exceptionable, {
|
|
272
|
+
path: _path + ".description",
|
|
273
|
+
expected: "(string | undefined)",
|
|
274
|
+
value: input.description
|
|
275
|
+
}, _errorFactory)) && (undefined === input.termsOfService || "string" === typeof input.termsOfService || $guard(_exceptionable, {
|
|
276
|
+
path: _path + ".termsOfService",
|
|
277
|
+
expected: "(string | undefined)",
|
|
278
|
+
value: input.termsOfService
|
|
279
|
+
}, _errorFactory)) && (undefined === input.contact || ("object" === typeof input.contact && null !== input.contact && false === Array.isArray(input.contact) || $guard(_exceptionable, {
|
|
280
|
+
path: _path + ".contact",
|
|
281
|
+
expected: "(OpenApi.IDocument.IContact | undefined)",
|
|
282
|
+
value: input.contact
|
|
283
|
+
}, _errorFactory)) && $ao4(input.contact, _path + ".contact", true && _exceptionable) || $guard(_exceptionable, {
|
|
284
|
+
path: _path + ".contact",
|
|
285
|
+
expected: "(OpenApi.IDocument.IContact | undefined)",
|
|
286
|
+
value: input.contact
|
|
287
|
+
}, _errorFactory)) && (undefined === input.license || ("object" === typeof input.license && null !== input.license || $guard(_exceptionable, {
|
|
288
|
+
path: _path + ".license",
|
|
289
|
+
expected: "(OpenApi.IDocument.ILicense | undefined)",
|
|
290
|
+
value: input.license
|
|
291
|
+
}, _errorFactory)) && $ao5(input.license, _path + ".license", true && _exceptionable) || $guard(_exceptionable, {
|
|
292
|
+
path: _path + ".license",
|
|
293
|
+
expected: "(OpenApi.IDocument.ILicense | undefined)",
|
|
294
|
+
value: input.license
|
|
295
|
+
}, _errorFactory)) && (undefined === input.version || "string" === typeof input.version || $guard(_exceptionable, {
|
|
296
|
+
path: _path + ".version",
|
|
297
|
+
expected: "(string | undefined)",
|
|
298
|
+
value: input.version
|
|
299
|
+
}, _errorFactory)); const $ao4 = (input, _path, _exceptionable = true) => (undefined === input.name || "string" === typeof input.name || $guard(_exceptionable, {
|
|
300
|
+
path: _path + ".name",
|
|
301
|
+
expected: "(string | undefined)",
|
|
302
|
+
value: input.name
|
|
303
|
+
}, _errorFactory)) && (undefined === input.url || "string" === typeof input.url || $guard(_exceptionable, {
|
|
304
|
+
path: _path + ".url",
|
|
305
|
+
expected: "(string | undefined)",
|
|
306
|
+
value: input.url
|
|
307
|
+
}, _errorFactory)) && (undefined === input.email || "string" === typeof input.email && (/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i.test(input.email) || $guard(_exceptionable, {
|
|
308
|
+
path: _path + ".email",
|
|
309
|
+
expected: "string & Format<\"email\">",
|
|
310
|
+
value: input.email
|
|
311
|
+
}, _errorFactory)) || $guard(_exceptionable, {
|
|
312
|
+
path: _path + ".email",
|
|
313
|
+
expected: "((string & Format<\"email\">) | undefined)",
|
|
314
|
+
value: input.email
|
|
315
|
+
}, _errorFactory)); const $ao5 = (input, _path, _exceptionable = true) => ("string" === typeof input.name || $guard(_exceptionable, {
|
|
316
|
+
path: _path + ".name",
|
|
317
|
+
expected: "string",
|
|
318
|
+
value: input.name
|
|
319
|
+
}, _errorFactory)) && (undefined === input.identifier || "string" === typeof input.identifier || $guard(_exceptionable, {
|
|
320
|
+
path: _path + ".identifier",
|
|
321
|
+
expected: "(string | undefined)",
|
|
322
|
+
value: input.identifier
|
|
323
|
+
}, _errorFactory)) && (undefined === input.url || "string" === typeof input.url || $guard(_exceptionable, {
|
|
324
|
+
path: _path + ".url",
|
|
325
|
+
expected: "(string | undefined)",
|
|
326
|
+
value: input.url
|
|
327
|
+
}, _errorFactory)); const $ao6 = (input, _path, _exceptionable = true) => ("string" === typeof input.url || $guard(_exceptionable, {
|
|
328
|
+
path: _path + ".url",
|
|
329
|
+
expected: "string",
|
|
330
|
+
value: input.url
|
|
331
|
+
}, _errorFactory)) && (undefined === input.description || "string" === typeof input.description || $guard(_exceptionable, {
|
|
332
|
+
path: _path + ".description",
|
|
333
|
+
expected: "(string | undefined)",
|
|
334
|
+
value: input.description
|
|
335
|
+
}, _errorFactory)) && (undefined === input.variables || ("object" === typeof input.variables && null !== input.variables && false === Array.isArray(input.variables) || $guard(_exceptionable, {
|
|
336
|
+
path: _path + ".variables",
|
|
337
|
+
expected: "(Record<string, OpenApi.IServer.IVariable> | undefined)",
|
|
338
|
+
value: input.variables
|
|
339
|
+
}, _errorFactory)) && $ao7(input.variables, _path + ".variables", true && _exceptionable) || $guard(_exceptionable, {
|
|
340
|
+
path: _path + ".variables",
|
|
341
|
+
expected: "(Record<string, OpenApi.IServer.IVariable> | undefined)",
|
|
342
|
+
value: input.variables
|
|
343
|
+
}, _errorFactory)); const $ao7 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every(key => {
|
|
344
|
+
const value = input[key];
|
|
345
|
+
if (undefined === value)
|
|
346
|
+
return true;
|
|
347
|
+
return ("object" === typeof value && null !== value || $guard(_exceptionable, {
|
|
348
|
+
path: _path + $join(key),
|
|
349
|
+
expected: "OpenApi.IServer.IVariable",
|
|
350
|
+
value: value
|
|
351
|
+
}, _errorFactory)) && $ao8(value, _path + $join(key), true && _exceptionable) || $guard(_exceptionable, {
|
|
352
|
+
path: _path + $join(key),
|
|
353
|
+
expected: "OpenApi.IServer.IVariable",
|
|
354
|
+
value: value
|
|
355
|
+
}, _errorFactory);
|
|
356
|
+
}); const $ao8 = (input, _path, _exceptionable = true) => ("string" === typeof input["default"] || $guard(_exceptionable, {
|
|
357
|
+
path: _path + "[\"default\"]",
|
|
358
|
+
expected: "string",
|
|
359
|
+
value: input["default"]
|
|
360
|
+
}, _errorFactory)) && (undefined === input["enum"] || (Array.isArray(input["enum"]) || $guard(_exceptionable, {
|
|
361
|
+
path: _path + "[\"enum\"]",
|
|
362
|
+
expected: "(Array<string> | undefined)",
|
|
363
|
+
value: input["enum"]
|
|
364
|
+
}, _errorFactory)) && input["enum"].every((elem, _index12) => "string" === typeof elem || $guard(_exceptionable, {
|
|
365
|
+
path: _path + "[\"enum\"][" + _index12 + "]",
|
|
366
|
+
expected: "string",
|
|
367
|
+
value: elem
|
|
368
|
+
}, _errorFactory)) || $guard(_exceptionable, {
|
|
369
|
+
path: _path + "[\"enum\"]",
|
|
370
|
+
expected: "(Array<string> | undefined)",
|
|
371
|
+
value: input["enum"]
|
|
372
|
+
}, _errorFactory)) && (undefined === input.description || "string" === typeof input.description || $guard(_exceptionable, {
|
|
373
|
+
path: _path + ".description",
|
|
374
|
+
expected: "(string | undefined)",
|
|
375
|
+
value: input.description
|
|
376
|
+
}, _errorFactory)); const $ao9 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every(key => {
|
|
377
|
+
const value = input[key];
|
|
378
|
+
if (undefined === value)
|
|
379
|
+
return true;
|
|
380
|
+
return ("object" === typeof value && null !== value || $guard(_exceptionable, {
|
|
381
|
+
path: _path + $join(key),
|
|
382
|
+
expected: "(OpenApi.ISecurityScheme.IApiKey | OpenApi.ISecurityScheme.IHttpBasic | OpenApi.ISecurityScheme.IHttpBearer | OpenApi.ISecurityScheme.IOAuth2 | OpenApi.ISecurityScheme.IOpenId)",
|
|
383
|
+
value: value
|
|
384
|
+
}, _errorFactory)) && $au0(value, _path + $join(key), true && _exceptionable) || $guard(_exceptionable, {
|
|
385
|
+
path: _path + $join(key),
|
|
386
|
+
expected: "(OpenApi.ISecurityScheme.IApiKey | OpenApi.ISecurityScheme.IHttpBasic | OpenApi.ISecurityScheme.IHttpBearer | OpenApi.ISecurityScheme.IOAuth2 | OpenApi.ISecurityScheme.IOpenId)",
|
|
387
|
+
value: value
|
|
388
|
+
}, _errorFactory);
|
|
389
|
+
}); const $ao10 = (input, _path, _exceptionable = true) => ("apiKey" === input.type || $guard(_exceptionable, {
|
|
390
|
+
path: _path + ".type",
|
|
391
|
+
expected: "\"apiKey\"",
|
|
392
|
+
value: input.type
|
|
393
|
+
}, _errorFactory)) && (undefined === input["in"] || "query" === input["in"] || "header" === input["in"] || "cookie" === input["in"] || $guard(_exceptionable, {
|
|
394
|
+
path: _path + "[\"in\"]",
|
|
395
|
+
expected: "(\"cookie\" | \"header\" | \"query\" | undefined)",
|
|
396
|
+
value: input["in"]
|
|
397
|
+
}, _errorFactory)) && (undefined === input.name || "string" === typeof input.name || $guard(_exceptionable, {
|
|
398
|
+
path: _path + ".name",
|
|
399
|
+
expected: "(string | undefined)",
|
|
400
|
+
value: input.name
|
|
401
|
+
}, _errorFactory)) && (undefined === input.description || "string" === typeof input.description || $guard(_exceptionable, {
|
|
402
|
+
path: _path + ".description",
|
|
403
|
+
expected: "(string | undefined)",
|
|
404
|
+
value: input.description
|
|
405
|
+
}, _errorFactory)); const $ao11 = (input, _path, _exceptionable = true) => ("http" === input.type || $guard(_exceptionable, {
|
|
406
|
+
path: _path + ".type",
|
|
407
|
+
expected: "\"http\"",
|
|
408
|
+
value: input.type
|
|
409
|
+
}, _errorFactory)) && ("basic" === input.scheme || $guard(_exceptionable, {
|
|
410
|
+
path: _path + ".scheme",
|
|
411
|
+
expected: "\"basic\"",
|
|
412
|
+
value: input.scheme
|
|
413
|
+
}, _errorFactory)) && (undefined === input.description || "string" === typeof input.description || $guard(_exceptionable, {
|
|
414
|
+
path: _path + ".description",
|
|
415
|
+
expected: "(string | undefined)",
|
|
416
|
+
value: input.description
|
|
417
|
+
}, _errorFactory)); const $ao12 = (input, _path, _exceptionable = true) => ("http" === input.type || $guard(_exceptionable, {
|
|
418
|
+
path: _path + ".type",
|
|
419
|
+
expected: "\"http\"",
|
|
420
|
+
value: input.type
|
|
421
|
+
}, _errorFactory)) && ("bearer" === input.scheme || $guard(_exceptionable, {
|
|
422
|
+
path: _path + ".scheme",
|
|
423
|
+
expected: "\"bearer\"",
|
|
424
|
+
value: input.scheme
|
|
425
|
+
}, _errorFactory)) && (undefined === input.bearerFormat || "string" === typeof input.bearerFormat || $guard(_exceptionable, {
|
|
426
|
+
path: _path + ".bearerFormat",
|
|
427
|
+
expected: "(string | undefined)",
|
|
428
|
+
value: input.bearerFormat
|
|
429
|
+
}, _errorFactory)) && (undefined === input.description || "string" === typeof input.description || $guard(_exceptionable, {
|
|
430
|
+
path: _path + ".description",
|
|
431
|
+
expected: "(string | undefined)",
|
|
432
|
+
value: input.description
|
|
433
|
+
}, _errorFactory)); const $ao13 = (input, _path, _exceptionable = true) => ("oauth2" === input.type || $guard(_exceptionable, {
|
|
434
|
+
path: _path + ".type",
|
|
435
|
+
expected: "\"oauth2\"",
|
|
436
|
+
value: input.type
|
|
437
|
+
}, _errorFactory)) && (("object" === typeof input.flows && null !== input.flows && false === Array.isArray(input.flows) || $guard(_exceptionable, {
|
|
438
|
+
path: _path + ".flows",
|
|
439
|
+
expected: "OpenApi.ISecurityScheme.IOAuth2.IFlowSet",
|
|
440
|
+
value: input.flows
|
|
441
|
+
}, _errorFactory)) && $ao14(input.flows, _path + ".flows", true && _exceptionable) || $guard(_exceptionable, {
|
|
442
|
+
path: _path + ".flows",
|
|
443
|
+
expected: "OpenApi.ISecurityScheme.IOAuth2.IFlowSet",
|
|
444
|
+
value: input.flows
|
|
445
|
+
}, _errorFactory)) && (undefined === input.description || "string" === typeof input.description || $guard(_exceptionable, {
|
|
446
|
+
path: _path + ".description",
|
|
447
|
+
expected: "(string | undefined)",
|
|
448
|
+
value: input.description
|
|
449
|
+
}, _errorFactory)); const $ao14 = (input, _path, _exceptionable = true) => (undefined === input.authorizationCode || ("object" === typeof input.authorizationCode && null !== input.authorizationCode && false === Array.isArray(input.authorizationCode) || $guard(_exceptionable, {
|
|
450
|
+
path: _path + ".authorizationCode",
|
|
451
|
+
expected: "(OpenApi.ISecurityScheme.IOAuth2.IFlow | undefined)",
|
|
452
|
+
value: input.authorizationCode
|
|
453
|
+
}, _errorFactory)) && $ao15(input.authorizationCode, _path + ".authorizationCode", true && _exceptionable) || $guard(_exceptionable, {
|
|
454
|
+
path: _path + ".authorizationCode",
|
|
455
|
+
expected: "(OpenApi.ISecurityScheme.IOAuth2.IFlow | undefined)",
|
|
456
|
+
value: input.authorizationCode
|
|
457
|
+
}, _errorFactory)) && (undefined === input.implicit || ("object" === typeof input.implicit && null !== input.implicit && false === Array.isArray(input.implicit) || $guard(_exceptionable, {
|
|
458
|
+
path: _path + ".implicit",
|
|
459
|
+
expected: "(Omit<OpenApi.ISecurityScheme.IOAuth2.IFlow, \"tokenUrl\"> | undefined)",
|
|
460
|
+
value: input.implicit
|
|
461
|
+
}, _errorFactory)) && $ao17(input.implicit, _path + ".implicit", true && _exceptionable) || $guard(_exceptionable, {
|
|
462
|
+
path: _path + ".implicit",
|
|
463
|
+
expected: "(Omit<OpenApi.ISecurityScheme.IOAuth2.IFlow, \"tokenUrl\"> | undefined)",
|
|
464
|
+
value: input.implicit
|
|
465
|
+
}, _errorFactory)) && (undefined === input.password || ("object" === typeof input.password && null !== input.password && false === Array.isArray(input.password) || $guard(_exceptionable, {
|
|
466
|
+
path: _path + ".password",
|
|
467
|
+
expected: "(Omit<OpenApi.ISecurityScheme.IOAuth2.IFlow, \"authorizationUrl\"> | undefined)",
|
|
468
|
+
value: input.password
|
|
469
|
+
}, _errorFactory)) && $ao18(input.password, _path + ".password", true && _exceptionable) || $guard(_exceptionable, {
|
|
470
|
+
path: _path + ".password",
|
|
471
|
+
expected: "(Omit<OpenApi.ISecurityScheme.IOAuth2.IFlow, \"authorizationUrl\"> | undefined)",
|
|
472
|
+
value: input.password
|
|
473
|
+
}, _errorFactory)) && (undefined === input.clientCredentials || ("object" === typeof input.clientCredentials && null !== input.clientCredentials && false === Array.isArray(input.clientCredentials) || $guard(_exceptionable, {
|
|
474
|
+
path: _path + ".clientCredentials",
|
|
475
|
+
expected: "(Omit<OpenApi.ISecurityScheme.IOAuth2.IFlow, \"authorizationUrl\"> | undefined)",
|
|
476
|
+
value: input.clientCredentials
|
|
477
|
+
}, _errorFactory)) && $ao18(input.clientCredentials, _path + ".clientCredentials", true && _exceptionable) || $guard(_exceptionable, {
|
|
478
|
+
path: _path + ".clientCredentials",
|
|
479
|
+
expected: "(Omit<OpenApi.ISecurityScheme.IOAuth2.IFlow, \"authorizationUrl\"> | undefined)",
|
|
480
|
+
value: input.clientCredentials
|
|
481
|
+
}, _errorFactory)); const $ao15 = (input, _path, _exceptionable = true) => (undefined === input.authorizationUrl || "string" === typeof input.authorizationUrl || $guard(_exceptionable, {
|
|
482
|
+
path: _path + ".authorizationUrl",
|
|
483
|
+
expected: "(string | undefined)",
|
|
484
|
+
value: input.authorizationUrl
|
|
485
|
+
}, _errorFactory)) && (undefined === input.tokenUrl || "string" === typeof input.tokenUrl || $guard(_exceptionable, {
|
|
486
|
+
path: _path + ".tokenUrl",
|
|
487
|
+
expected: "(string | undefined)",
|
|
488
|
+
value: input.tokenUrl
|
|
489
|
+
}, _errorFactory)) && (undefined === input.refreshUrl || "string" === typeof input.refreshUrl || $guard(_exceptionable, {
|
|
490
|
+
path: _path + ".refreshUrl",
|
|
491
|
+
expected: "(string | undefined)",
|
|
492
|
+
value: input.refreshUrl
|
|
493
|
+
}, _errorFactory)) && (undefined === input.scopes || ("object" === typeof input.scopes && null !== input.scopes && false === Array.isArray(input.scopes) || $guard(_exceptionable, {
|
|
494
|
+
path: _path + ".scopes",
|
|
495
|
+
expected: "(Record<string, string> | undefined)",
|
|
496
|
+
value: input.scopes
|
|
497
|
+
}, _errorFactory)) && $ao16(input.scopes, _path + ".scopes", true && _exceptionable) || $guard(_exceptionable, {
|
|
498
|
+
path: _path + ".scopes",
|
|
499
|
+
expected: "(Record<string, string> | undefined)",
|
|
500
|
+
value: input.scopes
|
|
501
|
+
}, _errorFactory)); const $ao16 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every(key => {
|
|
502
|
+
const value = input[key];
|
|
503
|
+
if (undefined === value)
|
|
504
|
+
return true;
|
|
505
|
+
return "string" === typeof value || $guard(_exceptionable, {
|
|
506
|
+
path: _path + $join(key),
|
|
507
|
+
expected: "string",
|
|
508
|
+
value: value
|
|
509
|
+
}, _errorFactory);
|
|
510
|
+
}); const $ao17 = (input, _path, _exceptionable = true) => (undefined === input.authorizationUrl || "string" === typeof input.authorizationUrl || $guard(_exceptionable, {
|
|
511
|
+
path: _path + ".authorizationUrl",
|
|
512
|
+
expected: "(string | undefined)",
|
|
513
|
+
value: input.authorizationUrl
|
|
514
|
+
}, _errorFactory)) && (undefined === input.refreshUrl || "string" === typeof input.refreshUrl || $guard(_exceptionable, {
|
|
515
|
+
path: _path + ".refreshUrl",
|
|
516
|
+
expected: "(string | undefined)",
|
|
517
|
+
value: input.refreshUrl
|
|
518
|
+
}, _errorFactory)) && (undefined === input.scopes || ("object" === typeof input.scopes && null !== input.scopes && false === Array.isArray(input.scopes) || $guard(_exceptionable, {
|
|
519
|
+
path: _path + ".scopes",
|
|
520
|
+
expected: "(Record<string, string> | undefined)",
|
|
521
|
+
value: input.scopes
|
|
522
|
+
}, _errorFactory)) && $ao16(input.scopes, _path + ".scopes", true && _exceptionable) || $guard(_exceptionable, {
|
|
523
|
+
path: _path + ".scopes",
|
|
524
|
+
expected: "(Record<string, string> | undefined)",
|
|
525
|
+
value: input.scopes
|
|
526
|
+
}, _errorFactory)); const $ao18 = (input, _path, _exceptionable = true) => (undefined === input.tokenUrl || "string" === typeof input.tokenUrl || $guard(_exceptionable, {
|
|
527
|
+
path: _path + ".tokenUrl",
|
|
528
|
+
expected: "(string | undefined)",
|
|
529
|
+
value: input.tokenUrl
|
|
530
|
+
}, _errorFactory)) && (undefined === input.refreshUrl || "string" === typeof input.refreshUrl || $guard(_exceptionable, {
|
|
531
|
+
path: _path + ".refreshUrl",
|
|
532
|
+
expected: "(string | undefined)",
|
|
533
|
+
value: input.refreshUrl
|
|
534
|
+
}, _errorFactory)) && (undefined === input.scopes || ("object" === typeof input.scopes && null !== input.scopes && false === Array.isArray(input.scopes) || $guard(_exceptionable, {
|
|
535
|
+
path: _path + ".scopes",
|
|
536
|
+
expected: "(Record<string, string> | undefined)",
|
|
537
|
+
value: input.scopes
|
|
538
|
+
}, _errorFactory)) && $ao16(input.scopes, _path + ".scopes", true && _exceptionable) || $guard(_exceptionable, {
|
|
539
|
+
path: _path + ".scopes",
|
|
540
|
+
expected: "(Record<string, string> | undefined)",
|
|
541
|
+
value: input.scopes
|
|
542
|
+
}, _errorFactory)); const $ao19 = (input, _path, _exceptionable = true) => ("openIdConnect" === input.type || $guard(_exceptionable, {
|
|
543
|
+
path: _path + ".type",
|
|
544
|
+
expected: "\"openIdConnect\"",
|
|
545
|
+
value: input.type
|
|
546
|
+
}, _errorFactory)) && ("string" === typeof input.openIdConnectUrl || $guard(_exceptionable, {
|
|
547
|
+
path: _path + ".openIdConnectUrl",
|
|
548
|
+
expected: "string",
|
|
549
|
+
value: input.openIdConnectUrl
|
|
550
|
+
}, _errorFactory)) && (undefined === input.description || "string" === typeof input.description || $guard(_exceptionable, {
|
|
551
|
+
path: _path + ".description",
|
|
552
|
+
expected: "(string | undefined)",
|
|
553
|
+
value: input.description
|
|
554
|
+
}, _errorFactory)); const $ao20 = (input, _path, _exceptionable = true) => ("string" === typeof input.name || $guard(_exceptionable, {
|
|
555
|
+
path: _path + ".name",
|
|
556
|
+
expected: "string",
|
|
557
|
+
value: input.name
|
|
558
|
+
}, _errorFactory)) && (undefined === input.description || "string" === typeof input.description || $guard(_exceptionable, {
|
|
559
|
+
path: _path + ".description",
|
|
560
|
+
expected: "(string | undefined)",
|
|
561
|
+
value: input.description
|
|
562
|
+
}, _errorFactory)); const $ao21 = (input, _path, _exceptionable = true) => ("string" === typeof input.output || $guard(_exceptionable, {
|
|
563
|
+
path: _path + ".output",
|
|
564
|
+
expected: "string",
|
|
565
|
+
value: input.output
|
|
566
|
+
}, _errorFactory)) && (undefined === input.keyword || "boolean" === typeof input.keyword || $guard(_exceptionable, {
|
|
567
|
+
path: _path + ".keyword",
|
|
568
|
+
expected: "(boolean | undefined)",
|
|
569
|
+
value: input.keyword
|
|
570
|
+
}, _errorFactory)) && (null === input.separate || undefined === input.separate || "function" === typeof input.separate || $guard(_exceptionable, {
|
|
571
|
+
path: _path + ".separate",
|
|
572
|
+
expected: "(null | undefined)",
|
|
573
|
+
value: input.separate
|
|
574
|
+
}, _errorFactory)) && (undefined === input.beautify || "number" === typeof input.beautify || "boolean" === typeof input.beautify || $guard(_exceptionable, {
|
|
575
|
+
path: _path + ".beautify",
|
|
576
|
+
expected: "(boolean | number | undefined)",
|
|
577
|
+
value: input.beautify
|
|
578
|
+
}, _errorFactory)); const $au0 = (input, _path, _exceptionable = true) => (() => {
|
|
579
|
+
if ("apiKey" === input.type)
|
|
580
|
+
return $ao10(input, _path, true && _exceptionable);
|
|
581
|
+
else if ("basic" === input.scheme)
|
|
582
|
+
return $ao11(input, _path, true && _exceptionable);
|
|
583
|
+
else if ("bearer" === input.scheme)
|
|
584
|
+
return $ao12(input, _path, true && _exceptionable);
|
|
585
|
+
else if ("oauth2" === input.type)
|
|
586
|
+
return $ao13(input, _path, true && _exceptionable);
|
|
587
|
+
else if ("openIdConnect" === input.type)
|
|
588
|
+
return $ao19(input, _path, true && _exceptionable);
|
|
589
|
+
else
|
|
590
|
+
return $guard(_exceptionable, {
|
|
591
|
+
path: _path,
|
|
592
|
+
expected: "(OpenApi.ISecurityScheme.IApiKey | OpenApi.ISecurityScheme.IHttpBasic | OpenApi.ISecurityScheme.IHttpBearer | OpenApi.ISecurityScheme.IOAuth2 | OpenApi.ISecurityScheme.IOpenId)",
|
|
593
|
+
value: input
|
|
594
|
+
}, _errorFactory);
|
|
595
|
+
})(); const __is = input => "object" === typeof input && null !== input && $io0(input); let _errorFactory; return (input, errorFactory) => {
|
|
596
|
+
if (false === __is(input)) {
|
|
597
|
+
_errorFactory = errorFactory;
|
|
598
|
+
((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || $guard(true, {
|
|
599
|
+
path: _path + "",
|
|
600
|
+
expected: "INestiaConfig",
|
|
601
|
+
value: input
|
|
602
|
+
}, _errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
|
|
603
|
+
path: _path + "",
|
|
604
|
+
expected: "INestiaConfig",
|
|
605
|
+
value: input
|
|
606
|
+
}, _errorFactory))(input, "$input", true);
|
|
607
|
+
}
|
|
659
608
|
return input;
|
|
660
|
-
})(config);
|
|
609
|
+
}; })()(config);
|
|
661
610
|
}
|
|
662
611
|
catch (exp) {
|
|
663
|
-
if ((input =>
|
|
664
|
-
const $io0 = input => "string" === typeof input.method && (undefined === input.path || "string" === typeof input.path) && "string" === typeof input.expected && true && true && "string" === typeof input.name && "string" === typeof input.message && (undefined === input.stack || "string" === typeof input.stack);
|
|
665
|
-
return "object" === typeof input && null !== input && $io0(input);
|
|
666
|
-
})(exp))
|
|
612
|
+
if ((() => { const $io0 = input => "string" === typeof input.method && (undefined === input.path || "string" === typeof input.path) && "string" === typeof input.expected && true && true && "string" === typeof input.name && "string" === typeof input.message && (undefined === input.stack || "string" === typeof input.stack); return input => "object" === typeof input && null !== input && $io0(input); })()(exp))
|
|
667
613
|
exp.message = `invalid "${file}" data.`;
|
|
668
614
|
throw exp;
|
|
669
615
|
}
|