@nestia/sdk 3.9.1 → 3.10.0-dev.20240803

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