@nestia/sdk 1.4.11 → 1.4.13-dev.20230726
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/INestiaConfig.d.ts +6 -15
- package/lib/analyses/ControllerAnalyzer.js +21 -2
- package/lib/analyses/ControllerAnalyzer.js.map +1 -1
- package/lib/analyses/ReflectAnalyzer.d.ts +1 -0
- package/lib/analyses/ReflectAnalyzer.js +8 -0
- package/lib/analyses/ReflectAnalyzer.js.map +1 -1
- package/lib/analyses/SecurityAnalyzer.d.ts +3 -0
- package/lib/analyses/SecurityAnalyzer.js +25 -0
- package/lib/analyses/SecurityAnalyzer.js.map +1 -0
- package/lib/executable/internal/NestiaSdkConfig.js +67 -67
- package/lib/executable/internal/NestiaSdkConfig.js.map +1 -1
- package/lib/generates/SwaggerGenerator.js +42 -0
- package/lib/generates/SwaggerGenerator.js.map +1 -1
- package/lib/generates/internal/SdkFunctionProgrammer.js +1 -1
- package/lib/generates/internal/SdkFunctionProgrammer.js.map +1 -1
- package/lib/structures/IController.d.ts +2 -0
- package/lib/structures/IRoute.d.ts +1 -0
- package/lib/structures/ISwaggerComponents.d.ts +26 -0
- package/lib/structures/ISwaggerComponents.js +3 -0
- package/lib/structures/ISwaggerComponents.js.map +1 -0
- package/lib/structures/ISwaggerDocument.d.ts +70 -86
- package/lib/structures/ISwaggerRoute.d.ts +43 -0
- package/lib/structures/ISwaggerRoute.js +3 -0
- package/lib/structures/ISwaggerRoute.js.map +1 -0
- package/lib/structures/ISwaggerSecurityScheme.d.ts +50 -0
- package/lib/structures/ISwaggerSecurityScheme.js +3 -0
- package/lib/structures/ISwaggerSecurityScheme.js.map +1 -0
- package/package.json +4 -3
- package/src/INestiaConfig.ts +6 -22
- package/src/analyses/ControllerAnalyzer.ts +24 -1
- package/src/analyses/ReflectAnalyzer.ts +10 -2
- package/src/analyses/SecurityAnalyzer.ts +20 -0
- package/src/generates/SwaggerGenerator.ts +90 -10
- package/src/generates/internal/SdkFunctionProgrammer.ts +1 -1
- package/src/structures/IController.ts +2 -0
- package/src/structures/IRoute.ts +1 -0
- package/src/structures/ISwaggerComponents.ts +29 -0
- package/src/structures/ISwaggerDocument.ts +77 -105
- package/src/structures/ISwaggerRoute.ts +47 -0
- package/src/structures/ISwaggerSecurityScheme.ts +57 -0
package/lib/INestiaConfig.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type ts from "typescript";
|
|
2
2
|
import type { ISwaggerDocument } from "./structures/ISwaggerDocument";
|
|
3
|
+
import { ISwaggerSecurityScheme } from "./structures/ISwaggerSecurityScheme";
|
|
3
4
|
import type { StripEnums } from "./utils/StripEnums";
|
|
4
5
|
/**
|
|
5
6
|
* Definition for the `nestia.config.ts` file.
|
|
@@ -162,21 +163,11 @@ export declare namespace INestiaConfig {
|
|
|
162
163
|
servers?: ISwaggerDocument.IServer[];
|
|
163
164
|
/**
|
|
164
165
|
* Security schemes.
|
|
166
|
+
*
|
|
167
|
+
* When generating `swagger.json` file through `nestia`, if your controllers or
|
|
168
|
+
* theirs methods have a security key which is not enrolled in here property,
|
|
169
|
+
* it would be an error.
|
|
165
170
|
*/
|
|
166
|
-
security?: Record<string,
|
|
167
|
-
}
|
|
168
|
-
namespace ISwaggerConfig {
|
|
169
|
-
type ISecurityScheme = IApiKey | Exclude<ISwaggerDocument.ISecurityScheme, ISwaggerDocument.ISecurityScheme.IApiKey>;
|
|
170
|
-
interface IApiKey {
|
|
171
|
-
type: "apiKey";
|
|
172
|
-
/**
|
|
173
|
-
* @default header
|
|
174
|
-
*/
|
|
175
|
-
in?: "header" | "query" | "cookie";
|
|
176
|
-
/**
|
|
177
|
-
* @default Authorization
|
|
178
|
-
*/
|
|
179
|
-
name?: string;
|
|
180
|
-
}
|
|
171
|
+
security?: Record<string, ISwaggerSecurityScheme>;
|
|
181
172
|
}
|
|
182
173
|
}
|
|
@@ -11,6 +11,7 @@ const PathUtil_1 = require("../utils/PathUtil");
|
|
|
11
11
|
const GenericAnalyzer_1 = require("./GenericAnalyzer");
|
|
12
12
|
const ImportAnalyzer_1 = require("./ImportAnalyzer");
|
|
13
13
|
const PathAnalyzer_1 = require("./PathAnalyzer");
|
|
14
|
+
const SecurityAnalyzer_1 = require("./SecurityAnalyzer");
|
|
14
15
|
var ControllerAnalyzer;
|
|
15
16
|
(function (ControllerAnalyzer) {
|
|
16
17
|
function analyze(checker, sourceFile, controller) {
|
|
@@ -71,8 +72,26 @@ var ControllerAnalyzer;
|
|
|
71
72
|
const imports = importDict
|
|
72
73
|
.toJSON()
|
|
73
74
|
.map((pair) => [pair.first, pair.second.toJSON()]);
|
|
74
|
-
//
|
|
75
|
+
// PARSE COMMENT TAGS
|
|
75
76
|
const tags = signature.getJsDocTags();
|
|
77
|
+
const security = SecurityAnalyzer_1.SecurityAnalyzer.merge(...controller.security, ...func.security, ...tags
|
|
78
|
+
.filter((tag) => tag.name === "security")
|
|
79
|
+
.map((tag) => {
|
|
80
|
+
var _a;
|
|
81
|
+
return ((_a = tag.text) !== null && _a !== void 0 ? _a : []).map((text) => {
|
|
82
|
+
const line = text.text
|
|
83
|
+
.split(" ")
|
|
84
|
+
.filter((s) => s.trim())
|
|
85
|
+
.filter((s) => !!s.length);
|
|
86
|
+
if (line.length === 0)
|
|
87
|
+
return {};
|
|
88
|
+
return {
|
|
89
|
+
[line[0]]: line.slice(1),
|
|
90
|
+
};
|
|
91
|
+
});
|
|
92
|
+
})
|
|
93
|
+
.flat());
|
|
94
|
+
// CONSTRUCT COMMON DATA
|
|
76
95
|
const common = Object.assign(Object.assign({}, func), { parameters, output: Object.assign(Object.assign({}, outputType), { contentType: func.contentType }), imports, status: func.status, symbol: `${controller.name}.${func.name}()`, location: `${declaration.getSourceFile().fileName}:${declaration.pos}`, description: CommentFactory_1.CommentFactory.description(symbol), tags, setHeaders: tags
|
|
77
96
|
.filter((t) => {
|
|
78
97
|
var _a;
|
|
@@ -92,7 +111,7 @@ var ControllerAnalyzer;
|
|
|
92
111
|
type: "assigner",
|
|
93
112
|
source: t.text[0].text,
|
|
94
113
|
};
|
|
95
|
-
}) });
|
|
114
|
+
}), security });
|
|
96
115
|
// CONFIGURE PATHS
|
|
97
116
|
const pathList = [];
|
|
98
117
|
for (const controllerPath of controller.paths)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ControllerAnalyzer.js","sourceRoot":"","sources":["../../src/analyses/ControllerAnalyzer.ts"],"names":[],"mappings":";;;;;;AAAA,oDAAiD;AACjD,4DAA4B;AAE5B,uEAAoE;AAKpE,gDAA6C;AAC7C,uDAAoD;AACpD,qDAAkD;AAClD,iDAA8C;
|
|
1
|
+
{"version":3,"file":"ControllerAnalyzer.js","sourceRoot":"","sources":["../../src/analyses/ControllerAnalyzer.ts"],"names":[],"mappings":";;;;;;AAAA,oDAAiD;AACjD,4DAA4B;AAE5B,uEAAoE;AAKpE,gDAA6C;AAC7C,uDAAoD;AACpD,qDAAkD;AAClD,iDAA8C;AAC9C,yDAAsD;AAEtD,IAAiB,kBAAkB,CAgRlC;AAhRD,WAAiB,kBAAkB;IAC/B,SAAgB,OAAO,CACnB,OAAuB,EACvB,UAAyB,EACzB,UAAuB;QAEvB,wBAAwB;QACxB,MAAM,GAAG,GAAa,EAAE,CAAC;QACzB,oBAAE,CAAC,YAAY,CAAC,UAAU,EAAE,CAAC,IAAI,EAAE,EAAE;;YACjC,IACI,oBAAE,CAAC,kBAAkB,CAAC,IAAI,CAAC;gBAC3B,CAAA,MAAA,IAAI,CAAC,IAAI,0CAAE,WAAW,MAAK,UAAU,CAAC,IAAI,EAC5C;gBACE,yBAAyB;gBACzB,GAAG,CAAC,IAAI,CAAC,GAAG,mBAAmB,CAAC,OAAO,EAAE,UAAU,EAAE,IAAI,CAAC,CAAC,CAAC;gBAC5D,OAAO;aACV;QACL,CAAC,CAAC,CAAC;QACH,OAAO,GAAG,CAAC;IACf,CAAC;IAlBe,0BAAO,UAkBtB,CAAA;IAED;;gEAE4D;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;QAChB,MAAM,KAAK,GAAsB,+BAAc,CAAC,OAAO,CACnD,OAAO,EACP,WAAW,EACX,UAAU,EACV,IAAI,CACP,CAAC;QACF,IAAI,KAAK,KAAK,IAAI;YACd,MAAM,IAAI,KAAK,CACX,YAAY,MAAM,iCAAiC,MAAM,IAAI,IAAI,GAAG,CACvE,CAAC;QACN,uCACO,KAAK,KACR,IAAI;YACJ,QAAQ,EACR,IAAI,EAAE,KAAK,IACb;IACN,CAAC;AACL,CAAC,EAhRgB,kBAAkB,kCAAlB,kBAAkB,QAgRlC"}
|
|
@@ -34,9 +34,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
34
34
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
35
35
|
exports.ReflectAnalyzer = void 0;
|
|
36
36
|
const Constants = __importStar(require("@nestjs/common/constants"));
|
|
37
|
+
require("reflect-metadata");
|
|
37
38
|
const module_1 = require("tstl/ranges/module");
|
|
38
39
|
const ArrayUtil_1 = require("../utils/ArrayUtil");
|
|
39
40
|
const PathAnalyzer_1 = require("./PathAnalyzer");
|
|
41
|
+
const SecurityAnalyzer_1 = require("./SecurityAnalyzer");
|
|
40
42
|
var ReflectAnalyzer;
|
|
41
43
|
(function (ReflectAnalyzer) {
|
|
42
44
|
function analyze(unique, file) {
|
|
@@ -91,6 +93,7 @@ var ReflectAnalyzer;
|
|
|
91
93
|
name,
|
|
92
94
|
paths,
|
|
93
95
|
functions: [],
|
|
96
|
+
security: _Get_security(creator),
|
|
94
97
|
};
|
|
95
98
|
// PARSE CHILDREN DATA
|
|
96
99
|
for (const tuple of _Get_prototype_entries(creator)) {
|
|
@@ -120,6 +123,10 @@ var ReflectAnalyzer;
|
|
|
120
123
|
else
|
|
121
124
|
return value;
|
|
122
125
|
}
|
|
126
|
+
function _Get_security(value) {
|
|
127
|
+
const entire = Reflect.getMetadata("swagger/apiSecurity", value);
|
|
128
|
+
return entire ? SecurityAnalyzer_1.SecurityAnalyzer.merge(...entire) : [];
|
|
129
|
+
}
|
|
123
130
|
/* ---------------------------------------------------------
|
|
124
131
|
FUNCTION
|
|
125
132
|
--------------------------------------------------------- */
|
|
@@ -148,6 +155,7 @@ var ReflectAnalyzer;
|
|
|
148
155
|
contentType: (_f = (_e = (_d = Reflect.getMetadata(Constants.HEADERS_METADATA, proto)) === null || _d === void 0 ? void 0 : _d.find((h) => typeof (h === null || h === void 0 ? void 0 : h.name) === "string" &&
|
|
149
156
|
typeof (h === null || h === void 0 ? void 0 : h.value) === "string" &&
|
|
150
157
|
h.name.toLowerCase() === "content-type")) === null || _e === void 0 ? void 0 : _e.value) !== null && _f !== void 0 ? _f : "application/json",
|
|
158
|
+
security: _Get_security(proto),
|
|
151
159
|
};
|
|
152
160
|
// PARSE CHILDREN DATA
|
|
153
161
|
const nestParameters = Reflect.getMetadata(Constants.ROUTE_ARGS_METADATA, classProto.constructor, name);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReflectAnalyzer.js","sourceRoot":"","sources":["../../src/analyses/ReflectAnalyzer.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,oEAAsD;AACtD,+CAA2C;AAI3C,kDAA+C;AAC/C,iDAA8C;
|
|
1
|
+
{"version":3,"file":"ReflectAnalyzer.js","sourceRoot":"","sources":["../../src/analyses/ReflectAnalyzer.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,oEAAsD;AACtD,4BAA0B;AAC1B,+CAA2C;AAI3C,kDAA+C;AAC/C,iDAA8C;AAC9C,yDAAsD;AAMtD,IAAiB,eAAe,CAsU/B;AAtUD,WAAiB,eAAe;IAC5B,SAAsB,OAAO,CACzB,MAAoB,EACpB,IAAY;;YAEZ,MAAM,MAAM,GAAY,MAAM,CAAC,GAAS,EAAE;gBACtC,IAAI;oBACA,OAAO,yBAAa,IAAI,uCAAC,CAAC;iBAC7B;gBAAC,OAAO,GA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,MAAM,IAAI,GAAI,KAAK,CAAC,OAAe,CAAC,IAAI,CAAC;oBACzC,MAAM,QAAQ,GAAI,KAAK,CAAC,OAAe,CAAC,QAAQ,CAAC;oBACjD,IAAI,IAAI,KAAK,SAAS,IAAI,QAAQ,KAAK,SAAS;wBAC5C,OAAO;4BACH,IAAI;4BACJ,QAAQ;yBACX,CAAC;oBACN,OAAO,SAAS,CAAC;gBACrB,CAAC,CAAC,EAAE;aACP,CAAC;SACL;aAAM,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,KAAK,YAAY;YAC1C,OAAO;gBACH,MAAM,EAAE,IAAI;gBACZ,IAAI,EAAE,KAAK,CAAC,IAAI;gBAChB,QAAQ,EAAE,OAAO;gBACjB,KAAK,EAAE,KAAK,CAAC,KAAK;gBAClB,KAAK,EAAE,SAAS;aACnB,CAAC;;YACD,OAAO,IAAI,CAAC;IACrB,CAAC;IAaD,MAAM,oBAAoB,GAAG;QACzB,SAAS;QACT,SAAS;QACT,SAAS;QACT,MAAM;QACN,OAAO;QACP,OAAO;QACP,SAAS;QACT,SAAS;QACT,SAAS;QACT,SAAS;QACT,SAAS;QACT,SAAS;KACH,CAAC;AACf,CAAC,EAtUgB,eAAe,+BAAf,eAAe,QAsU/B"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SecurityAnalyzer = void 0;
|
|
4
|
+
const MapUtil_1 = require("../utils/MapUtil");
|
|
5
|
+
var SecurityAnalyzer;
|
|
6
|
+
(function (SecurityAnalyzer) {
|
|
7
|
+
SecurityAnalyzer.merge = (...entire) => {
|
|
8
|
+
const dict = new Map();
|
|
9
|
+
for (const obj of entire)
|
|
10
|
+
for (const [key, value] of Object.entries(obj)) {
|
|
11
|
+
const set = MapUtil_1.MapUtil.take(dict, key, () => new Set());
|
|
12
|
+
for (const val of value)
|
|
13
|
+
set.add(val);
|
|
14
|
+
}
|
|
15
|
+
const output = [];
|
|
16
|
+
for (const [key, set] of dict) {
|
|
17
|
+
const obj = {
|
|
18
|
+
[key]: [...set],
|
|
19
|
+
};
|
|
20
|
+
output.push(obj);
|
|
21
|
+
}
|
|
22
|
+
return output;
|
|
23
|
+
};
|
|
24
|
+
})(SecurityAnalyzer || (exports.SecurityAnalyzer = SecurityAnalyzer = {}));
|
|
25
|
+
//# sourceMappingURL=SecurityAnalyzer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SecurityAnalyzer.js","sourceRoot":"","sources":["../../src/analyses/SecurityAnalyzer.ts"],"names":[],"mappings":";;;AAAA,8CAA2C;AAE3C,IAAiB,gBAAgB,CAiBhC;AAjBD,WAAiB,gBAAgB;IAChB,sBAAK,GAAG,CAAC,GAAG,MAAkC,EAAE,EAAE;QAC3D,MAAM,IAAI,GAA6B,IAAI,GAAG,EAAE,CAAC;QACjD,KAAK,MAAM,GAAG,IAAI,MAAM;YACpB,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE;gBAC5C,MAAM,GAAG,GAAG,iBAAO,CAAC,IAAI,CAAC,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,IAAI,GAAG,EAAE,CAAC,CAAC;gBACrD,KAAK,MAAM,GAAG,IAAI,KAAK;oBAAE,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;aACzC;QACL,MAAM,MAAM,GAA+B,EAAE,CAAC;QAC9C,KAAK,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC,IAAI,IAAI,EAAE;YAC3B,MAAM,GAAG,GAAG;gBACR,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC;aAClB,CAAC;YACF,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;SACpB;QACD,OAAO,MAAM,CAAC;IAClB,CAAC,CAAC;AACN,CAAC,EAjBgB,gBAAgB,gCAAhB,gBAAgB,QAiBhC"}
|
|
@@ -64,12 +64,12 @@ var NestiaSdkConfig;
|
|
|
64
64
|
const cloned = JSON.parse(JSON.stringify(config));
|
|
65
65
|
return (input => {
|
|
66
66
|
const __is = input => {
|
|
67
|
+
const $is_url = typia_1.assert.is_url;
|
|
67
68
|
const $join = typia_1.assert.join;
|
|
68
|
-
const $is_custom = typia_1.assert.is_custom;
|
|
69
69
|
const $io0 = input => (undefined === input.swagger || "object" === typeof input.swagger && null !== input.swagger && $io1(input.swagger)) && (null !== input.input && undefined !== input.input && ("string" === typeof input.input || (Array.isArray(input.input) && input.input.every(elem => "string" === typeof elem) || "object" === typeof input.input && null !== input.input && $io15(input.input)))) && (undefined === input.output || "string" === typeof input.output) && (undefined === input.distribute || "string" === typeof input.distribute) && (undefined === input.e2e || "string" === typeof input.e2e) && (undefined === input.compilerOptions || "object" === typeof input.compilerOptions && null !== input.compilerOptions && false === Array.isArray(input.compilerOptions) && $io16(input.compilerOptions)) && (undefined === input.assert || "boolean" === typeof input.assert) && (undefined === input.json || "boolean" === typeof input.json) && (undefined === input.primitive || "boolean" === typeof input.primitive) && (undefined === input.simulate || "boolean" === typeof input.simulate);
|
|
70
70
|
const $io1 = input => "string" === typeof input.output && (undefined === input.info || "object" === typeof input.info && null !== input.info && false === Array.isArray(input.info) && $io2(input.info)) && (undefined === input.servers || Array.isArray(input.servers) && input.servers.every(elem => "object" === typeof elem && null !== elem && $io3(elem))) && (undefined === input.security || "object" === typeof input.security && null !== input.security && false === Array.isArray(input.security) && $io4(input.security));
|
|
71
71
|
const $io2 = input => (undefined === input.version || "string" === typeof input.version) && (undefined === input.title || "string" === typeof input.title) && (undefined === input.description || "string" === typeof input.description);
|
|
72
|
-
const $io3 = input => "string" === typeof input.url && (undefined === input.description || "string" === typeof input.description);
|
|
72
|
+
const $io3 = input => "string" === typeof input.url && $is_url(input.url) && (undefined === input.description || "string" === typeof input.description);
|
|
73
73
|
const $io4 = input => Object.keys(input).every(key => {
|
|
74
74
|
const value = input[key];
|
|
75
75
|
if (undefined === value)
|
|
@@ -80,11 +80,12 @@ var NestiaSdkConfig;
|
|
|
80
80
|
});
|
|
81
81
|
const $io5 = input => "http" === input.type && "basic" === input.schema;
|
|
82
82
|
const $io6 = input => "http" === input.type && "bearer" === input.scheme && (undefined === input.bearerFormat || "string" === typeof input.bearerFormat);
|
|
83
|
-
const $io7 = input => "
|
|
84
|
-
const $io8 = input => "
|
|
85
|
-
const $io9 = input =>
|
|
86
|
-
const $io10 = input => "
|
|
87
|
-
const $io11 = input =>
|
|
83
|
+
const $io7 = input => "apiKey" === input.type && (undefined === input["in"] || "header" === input["in"] || "query" === input["in"] || "cookie" === input["in"]) && (undefined === input.name || "string" === typeof input.name);
|
|
84
|
+
const $io8 = input => "openIdConnect" === input.type && "string" === typeof input.openIdConnectUrl;
|
|
85
|
+
const $io9 = input => "oauth2" === input.type && ("object" === typeof input.flows && null !== input.flows && false === Array.isArray(input.flows) && $io10(input.flows)) && (undefined === input.description || "string" === typeof input.description);
|
|
86
|
+
const $io10 = input => (undefined === input.authorizationCode || "object" === typeof input.authorizationCode && null !== input.authorizationCode && $io11(input.authorizationCode)) && (undefined === input.implicit || "object" === typeof input.implicit && null !== input.implicit && $io13(input.implicit)) && (undefined === input.password || "object" === typeof input.password && null !== input.password && $io14(input.password)) && (undefined === input.clientCredentials || "object" === typeof input.clientCredentials && null !== input.clientCredentials && $io14(input.clientCredentials));
|
|
87
|
+
const $io11 = input => "string" === typeof input.authorizationUrl && "string" === typeof input.tokenUrl && "string" === typeof input.refreshUrl && (undefined === input.scopes || "object" === typeof input.scopes && null !== input.scopes && false === Array.isArray(input.scopes) && $io12(input.scopes));
|
|
88
|
+
const $io12 = input => Object.keys(input).every(key => {
|
|
88
89
|
const value = input[key];
|
|
89
90
|
if (undefined === value)
|
|
90
91
|
return true;
|
|
@@ -92,9 +93,8 @@ var NestiaSdkConfig;
|
|
|
92
93
|
return "string" === typeof value;
|
|
93
94
|
return true;
|
|
94
95
|
});
|
|
95
|
-
const $
|
|
96
|
-
const $
|
|
97
|
-
const $io14 = input => "apiKey" === input.type && (undefined === input["in"] || "header" === input["in"] || "query" === input["in"] || "cookie" === input["in"]) && (undefined === input.name || "string" === typeof input.name && $is_custom("default", "string", "Authorization", input.name));
|
|
96
|
+
const $io13 = input => "string" === typeof input.authorizationUrl && "string" === typeof input.refreshUrl && (undefined === input.scopes || "object" === typeof input.scopes && null !== input.scopes && false === Array.isArray(input.scopes) && $io12(input.scopes));
|
|
97
|
+
const $io14 = input => "string" === typeof input.tokenUrl && "string" === typeof input.refreshUrl && (undefined === input.scopes || "object" === typeof input.scopes && null !== input.scopes && false === Array.isArray(input.scopes) && $io12(input.scopes));
|
|
98
98
|
const $io15 = 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));
|
|
99
99
|
const $io16 = input => (undefined === input.allowImportingTsExtensions || "boolean" === typeof input.allowImportingTsExtensions) && (undefined === input.allowJs || "boolean" === typeof input.allowJs) && (undefined === input.allowArbitraryExtensions || "boolean" === typeof input.allowArbitraryExtensions) && (undefined === input.allowSyntheticDefaultImports || "boolean" === typeof input.allowSyntheticDefaultImports) && (undefined === input.allowUmdGlobalAccess || "boolean" === typeof input.allowUmdGlobalAccess) && (undefined === input.allowUnreachableCode || "boolean" === typeof input.allowUnreachableCode) && (undefined === input.allowUnusedLabels || "boolean" === typeof input.allowUnusedLabels) && (undefined === input.alwaysStrict || "boolean" === typeof input.alwaysStrict) && (undefined === input.baseUrl || "string" === typeof input.baseUrl) && (undefined === input.charset || "string" === typeof input.charset) && (undefined === input.checkJs || "boolean" === typeof input.checkJs) && (undefined === input.customConditions || Array.isArray(input.customConditions) && input.customConditions.every(elem => "string" === typeof elem)) && (undefined === input.declaration || "boolean" === typeof input.declaration) && (undefined === input.declarationMap || "boolean" === typeof input.declarationMap) && (undefined === input.emitDeclarationOnly || "boolean" === typeof input.emitDeclarationOnly) && (undefined === input.declarationDir || "string" === typeof input.declarationDir) && (undefined === input.disableSizeLimit || "boolean" === typeof input.disableSizeLimit) && (undefined === input.disableSourceOfProjectReferenceRedirect || "boolean" === typeof input.disableSourceOfProjectReferenceRedirect) && (undefined === input.disableSolutionSearching || "boolean" === typeof input.disableSolutionSearching) && (undefined === input.disableReferencedProjectLoad || "boolean" === typeof input.disableReferencedProjectLoad) && (undefined === input.downlevelIteration || "boolean" === typeof input.downlevelIteration) && (undefined === input.emitBOM || "boolean" === typeof input.emitBOM) && (undefined === input.emitDecoratorMetadata || "boolean" === typeof input.emitDecoratorMetadata) && (undefined === input.exactOptionalPropertyTypes || "boolean" === typeof input.exactOptionalPropertyTypes) && (undefined === input.experimentalDecorators || "boolean" === typeof input.experimentalDecorators) && (undefined === input.forceConsistentCasingInFileNames || "boolean" === typeof input.forceConsistentCasingInFileNames) && (undefined === input.ignoreDeprecations || "string" === typeof input.ignoreDeprecations) && (undefined === input.importHelpers || "boolean" === typeof input.importHelpers) && true && (undefined === input.inlineSourceMap || "boolean" === typeof input.inlineSourceMap) && (undefined === input.inlineSources || "boolean" === typeof input.inlineSources) && (undefined === input.isolatedModules || "boolean" === typeof input.isolatedModules) && true && (undefined === input.keyofStringsOnly || "boolean" === typeof input.keyofStringsOnly) && (undefined === input.lib || Array.isArray(input.lib) && input.lib.every(elem => "string" === typeof elem)) && (undefined === input.locale || "string" === typeof input.locale) && (undefined === input.mapRoot || "string" === typeof input.mapRoot) && true && true && true && (undefined === input.moduleSuffixes || Array.isArray(input.moduleSuffixes) && input.moduleSuffixes.every(elem => "string" === typeof elem)) && true && true && (undefined === input.noEmit || "boolean" === typeof input.noEmit) && (undefined === input.noEmitHelpers || "boolean" === typeof input.noEmitHelpers) && (undefined === input.noEmitOnError || "boolean" === typeof input.noEmitOnError) && (undefined === input.noErrorTruncation || "boolean" === typeof input.noErrorTruncation) && (undefined === input.noFallthroughCasesInSwitch || "boolean" === typeof input.noFallthroughCasesInSwitch) && (undefined === input.noImplicitAny || "boolean" === typeof input.noImplicitAny) && (undefined === input.noImplicitReturns || "boolean" === typeof input.noImplicitReturns) && (undefined === input.noImplicitThis || "boolean" === typeof input.noImplicitThis) && (undefined === input.noStrictGenericChecks || "boolean" === typeof input.noStrictGenericChecks) && (undefined === input.noUnusedLocals || "boolean" === typeof input.noUnusedLocals) && (undefined === input.noUnusedParameters || "boolean" === typeof input.noUnusedParameters) && (undefined === input.noImplicitUseStrict || "boolean" === typeof input.noImplicitUseStrict) && (undefined === input.noPropertyAccessFromIndexSignature || "boolean" === typeof input.noPropertyAccessFromIndexSignature) && (undefined === input.assumeChangesOnlyAffectDirectDependencies || "boolean" === typeof input.assumeChangesOnlyAffectDirectDependencies) && (undefined === input.noLib || "boolean" === typeof input.noLib) && (undefined === input.noResolve || "boolean" === typeof input.noResolve) && (undefined === input.noUncheckedIndexedAccess || "boolean" === typeof input.noUncheckedIndexedAccess) && (undefined === input.out || "string" === typeof input.out) && (undefined === input.outDir || "string" === typeof input.outDir) && (undefined === input.outFile || "string" === typeof input.outFile) && (undefined === input.paths || "object" === typeof input.paths && null !== input.paths && false === Array.isArray(input.paths) && $io17(input.paths)) && (undefined === input.preserveConstEnums || "boolean" === typeof input.preserveConstEnums) && (undefined === input.noImplicitOverride || "boolean" === typeof input.noImplicitOverride) && (undefined === input.preserveSymlinks || "boolean" === typeof input.preserveSymlinks) && (undefined === input.preserveValueImports || "boolean" === typeof input.preserveValueImports) && (undefined === input.project || "string" === typeof input.project) && (undefined === input.reactNamespace || "string" === typeof input.reactNamespace) && (undefined === input.jsxFactory || "string" === typeof input.jsxFactory) && (undefined === input.jsxFragmentFactory || "string" === typeof input.jsxFragmentFactory) && (undefined === input.jsxImportSource || "string" === typeof input.jsxImportSource) && (undefined === input.composite || "boolean" === typeof input.composite) && (undefined === input.incremental || "boolean" === typeof input.incremental) && (undefined === input.tsBuildInfoFile || "string" === typeof input.tsBuildInfoFile) && (undefined === input.removeComments || "boolean" === typeof input.removeComments) && (undefined === input.resolvePackageJsonExports || "boolean" === typeof input.resolvePackageJsonExports) && (undefined === input.resolvePackageJsonImports || "boolean" === typeof input.resolvePackageJsonImports) && (undefined === input.rootDir || "string" === typeof input.rootDir) && (undefined === input.rootDirs || Array.isArray(input.rootDirs) && input.rootDirs.every(elem => "string" === typeof elem)) && (undefined === input.skipLibCheck || "boolean" === typeof input.skipLibCheck) && (undefined === input.skipDefaultLibCheck || "boolean" === typeof input.skipDefaultLibCheck) && (undefined === input.sourceMap || "boolean" === typeof input.sourceMap) && (undefined === input.sourceRoot || "string" === typeof input.sourceRoot) && (undefined === input.strict || "boolean" === typeof input.strict) && (undefined === input.strictFunctionTypes || "boolean" === typeof input.strictFunctionTypes) && (undefined === input.strictBindCallApply || "boolean" === typeof input.strictBindCallApply) && (undefined === input.strictNullChecks || "boolean" === typeof input.strictNullChecks) && (undefined === input.strictPropertyInitialization || "boolean" === typeof input.strictPropertyInitialization) && (undefined === input.stripInternal || "boolean" === typeof input.stripInternal) && (undefined === input.suppressExcessPropertyErrors || "boolean" === typeof input.suppressExcessPropertyErrors) && (undefined === input.suppressImplicitAnyIndexErrors || "boolean" === typeof input.suppressImplicitAnyIndexErrors) && true && (undefined === input.traceResolution || "boolean" === typeof input.traceResolution) && (undefined === input.useUnknownInCatchVariables || "boolean" === typeof input.useUnknownInCatchVariables) && (undefined === input.resolveJsonModule || "boolean" === typeof input.resolveJsonModule) && (undefined === input.types || Array.isArray(input.types) && input.types.every(elem => "string" === typeof elem)) && (undefined === input.typeRoots || Array.isArray(input.typeRoots) && input.typeRoots.every(elem => "string" === typeof elem)) && (undefined === input.verbatimModuleSyntax || "boolean" === typeof input.verbatimModuleSyntax) && (undefined === input.esModuleInterop || "boolean" === typeof input.esModuleInterop) && (undefined === input.useDefineForClassFields || "boolean" === typeof input.useDefineForClassFields) && Object.keys(input).every(key => {
|
|
100
100
|
const value = input[key];
|
|
@@ -117,12 +117,12 @@ var NestiaSdkConfig;
|
|
|
117
117
|
return $io5(input);
|
|
118
118
|
if (undefined !== input.scheme)
|
|
119
119
|
return $io6(input);
|
|
120
|
-
if ("
|
|
120
|
+
if ("apiKey" === input.type)
|
|
121
121
|
return $io7(input);
|
|
122
|
-
if ("
|
|
122
|
+
if ("openIdConnect" === input.type)
|
|
123
123
|
return $io8(input);
|
|
124
|
-
if ("
|
|
125
|
-
return $
|
|
124
|
+
if ("oauth2" === input.type)
|
|
125
|
+
return $io9(input);
|
|
126
126
|
return false;
|
|
127
127
|
})();
|
|
128
128
|
return "object" === typeof input && null !== input && $io0(input);
|
|
@@ -130,8 +130,8 @@ var NestiaSdkConfig;
|
|
|
130
130
|
if (false === __is(input))
|
|
131
131
|
((input, _path, _exceptionable = true) => {
|
|
132
132
|
const $guard = typia_1.assert.guard;
|
|
133
|
+
const $is_url = typia_1.assert.is_url;
|
|
133
134
|
const $join = typia_1.assert.join;
|
|
134
|
-
const $is_custom = typia_1.assert.is_custom;
|
|
135
135
|
const $ao0 = (input, _path, _exceptionable = true) => (undefined === input.swagger || ("object" === typeof input.swagger && null !== input.swagger || $guard(_exceptionable, {
|
|
136
136
|
path: _path + ".swagger",
|
|
137
137
|
expected: "(INestiaConfig.ISwaggerConfig | undefined)",
|
|
@@ -227,11 +227,11 @@ var NestiaSdkConfig;
|
|
|
227
227
|
value: input.servers
|
|
228
228
|
})) && (undefined === input.security || ("object" === typeof input.security && null !== input.security && false === Array.isArray(input.security) || $guard(_exceptionable, {
|
|
229
229
|
path: _path + ".security",
|
|
230
|
-
expected: "(Record<string,
|
|
230
|
+
expected: "(Record<string, ISwaggerSecurityScheme> | undefined)",
|
|
231
231
|
value: input.security
|
|
232
232
|
})) && $ao4(input.security, _path + ".security", true && _exceptionable) || $guard(_exceptionable, {
|
|
233
233
|
path: _path + ".security",
|
|
234
|
-
expected: "(Record<string,
|
|
234
|
+
expected: "(Record<string, ISwaggerSecurityScheme> | undefined)",
|
|
235
235
|
value: input.security
|
|
236
236
|
}));
|
|
237
237
|
const $ao2 = (input, _path, _exceptionable = true) => (undefined === input.version || "string" === typeof input.version || $guard(_exceptionable, {
|
|
@@ -247,7 +247,11 @@ var NestiaSdkConfig;
|
|
|
247
247
|
expected: "(string | undefined)",
|
|
248
248
|
value: input.description
|
|
249
249
|
}));
|
|
250
|
-
const $ao3 = (input, _path, _exceptionable = true) => ("string" === typeof input.url || $guard(_exceptionable, {
|
|
250
|
+
const $ao3 = (input, _path, _exceptionable = true) => ("string" === typeof input.url && ($is_url(input.url) || $guard(_exceptionable, {
|
|
251
|
+
path: _path + ".url",
|
|
252
|
+
expected: "string (@format url)",
|
|
253
|
+
value: input.url
|
|
254
|
+
})) || $guard(_exceptionable, {
|
|
251
255
|
path: _path + ".url",
|
|
252
256
|
expected: "string",
|
|
253
257
|
value: input.url
|
|
@@ -263,11 +267,11 @@ var NestiaSdkConfig;
|
|
|
263
267
|
if (RegExp(/(.*)/).test(key))
|
|
264
268
|
return ("object" === typeof value && null !== value || $guard(_exceptionable, {
|
|
265
269
|
path: _path + $join(key),
|
|
266
|
-
expected: "(
|
|
270
|
+
expected: "(ISwaggerSecurityScheme.IApiKey | ISwaggerSecurityScheme.IHttpBasic | ISwaggerSecurityScheme.IHttpBearer | ISwaggerSecurityScheme.IOAuth2 | ISwaggerSecurityScheme.IOpenId)",
|
|
267
271
|
value: value
|
|
268
272
|
})) && $au0(value, _path + $join(key), true && _exceptionable) || $guard(_exceptionable, {
|
|
269
273
|
path: _path + $join(key),
|
|
270
|
-
expected: "(
|
|
274
|
+
expected: "(ISwaggerSecurityScheme.IApiKey | ISwaggerSecurityScheme.IHttpBasic | ISwaggerSecurityScheme.IHttpBearer | ISwaggerSecurityScheme.IOAuth2 | ISwaggerSecurityScheme.IOpenId)",
|
|
271
275
|
value: value
|
|
272
276
|
});
|
|
273
277
|
return true;
|
|
@@ -294,7 +298,20 @@ var NestiaSdkConfig;
|
|
|
294
298
|
expected: "(string | undefined)",
|
|
295
299
|
value: input.bearerFormat
|
|
296
300
|
}));
|
|
297
|
-
const $ao7 = (input, _path, _exceptionable = true) => ("
|
|
301
|
+
const $ao7 = (input, _path, _exceptionable = true) => ("apiKey" === input.type || $guard(_exceptionable, {
|
|
302
|
+
path: _path + ".type",
|
|
303
|
+
expected: "\"apiKey\"",
|
|
304
|
+
value: input.type
|
|
305
|
+
})) && (undefined === input["in"] || "header" === input["in"] || "query" === input["in"] || "cookie" === input["in"] || $guard(_exceptionable, {
|
|
306
|
+
path: _path + "[\"in\"]",
|
|
307
|
+
expected: "(\"cookie\" | \"header\" | \"query\" | undefined)",
|
|
308
|
+
value: input["in"]
|
|
309
|
+
})) && (undefined === input.name || "string" === typeof input.name || $guard(_exceptionable, {
|
|
310
|
+
path: _path + ".name",
|
|
311
|
+
expected: "(string | undefined)",
|
|
312
|
+
value: input.name
|
|
313
|
+
}));
|
|
314
|
+
const $ao8 = (input, _path, _exceptionable = true) => ("openIdConnect" === input.type || $guard(_exceptionable, {
|
|
298
315
|
path: _path + ".type",
|
|
299
316
|
expected: "\"openIdConnect\"",
|
|
300
317
|
value: input.type
|
|
@@ -303,57 +320,57 @@ var NestiaSdkConfig;
|
|
|
303
320
|
expected: "string",
|
|
304
321
|
value: input.openIdConnectUrl
|
|
305
322
|
}));
|
|
306
|
-
const $
|
|
323
|
+
const $ao9 = (input, _path, _exceptionable = true) => ("oauth2" === input.type || $guard(_exceptionable, {
|
|
307
324
|
path: _path + ".type",
|
|
308
325
|
expected: "\"oauth2\"",
|
|
309
326
|
value: input.type
|
|
310
327
|
})) && (("object" === typeof input.flows && null !== input.flows && false === Array.isArray(input.flows) || $guard(_exceptionable, {
|
|
311
328
|
path: _path + ".flows",
|
|
312
|
-
expected: "
|
|
329
|
+
expected: "ISwaggerSecurityScheme.IOAuth2.IFlowSet",
|
|
313
330
|
value: input.flows
|
|
314
|
-
})) && $
|
|
331
|
+
})) && $ao10(input.flows, _path + ".flows", true && _exceptionable) || $guard(_exceptionable, {
|
|
315
332
|
path: _path + ".flows",
|
|
316
|
-
expected: "
|
|
333
|
+
expected: "ISwaggerSecurityScheme.IOAuth2.IFlowSet",
|
|
317
334
|
value: input.flows
|
|
318
335
|
})) && (undefined === input.description || "string" === typeof input.description || $guard(_exceptionable, {
|
|
319
336
|
path: _path + ".description",
|
|
320
337
|
expected: "(string | undefined)",
|
|
321
338
|
value: input.description
|
|
322
339
|
}));
|
|
323
|
-
const $
|
|
340
|
+
const $ao10 = (input, _path, _exceptionable = true) => (undefined === input.authorizationCode || ("object" === typeof input.authorizationCode && null !== input.authorizationCode || $guard(_exceptionable, {
|
|
324
341
|
path: _path + ".authorizationCode",
|
|
325
|
-
expected: "(
|
|
342
|
+
expected: "(ISwaggerSecurityScheme.IOAuth2.IFlow | undefined)",
|
|
326
343
|
value: input.authorizationCode
|
|
327
|
-
})) && $
|
|
344
|
+
})) && $ao11(input.authorizationCode, _path + ".authorizationCode", true && _exceptionable) || $guard(_exceptionable, {
|
|
328
345
|
path: _path + ".authorizationCode",
|
|
329
|
-
expected: "(
|
|
346
|
+
expected: "(ISwaggerSecurityScheme.IOAuth2.IFlow | undefined)",
|
|
330
347
|
value: input.authorizationCode
|
|
331
348
|
})) && (undefined === input.implicit || ("object" === typeof input.implicit && null !== input.implicit || $guard(_exceptionable, {
|
|
332
349
|
path: _path + ".implicit",
|
|
333
|
-
expected: "(Omit<
|
|
350
|
+
expected: "(Omit<ISwaggerSecurityScheme.IOAuth2.IFlow, \"tokenUrl\"> | undefined)",
|
|
334
351
|
value: input.implicit
|
|
335
|
-
})) && $
|
|
352
|
+
})) && $ao13(input.implicit, _path + ".implicit", true && _exceptionable) || $guard(_exceptionable, {
|
|
336
353
|
path: _path + ".implicit",
|
|
337
|
-
expected: "(Omit<
|
|
354
|
+
expected: "(Omit<ISwaggerSecurityScheme.IOAuth2.IFlow, \"tokenUrl\"> | undefined)",
|
|
338
355
|
value: input.implicit
|
|
339
356
|
})) && (undefined === input.password || ("object" === typeof input.password && null !== input.password || $guard(_exceptionable, {
|
|
340
357
|
path: _path + ".password",
|
|
341
|
-
expected: "(Omit<
|
|
358
|
+
expected: "(Omit<ISwaggerSecurityScheme.IOAuth2.IFlow, \"authorizationUrl\"> | undefined)",
|
|
342
359
|
value: input.password
|
|
343
|
-
})) && $
|
|
360
|
+
})) && $ao14(input.password, _path + ".password", true && _exceptionable) || $guard(_exceptionable, {
|
|
344
361
|
path: _path + ".password",
|
|
345
|
-
expected: "(Omit<
|
|
362
|
+
expected: "(Omit<ISwaggerSecurityScheme.IOAuth2.IFlow, \"authorizationUrl\"> | undefined)",
|
|
346
363
|
value: input.password
|
|
347
364
|
})) && (undefined === input.clientCredentials || ("object" === typeof input.clientCredentials && null !== input.clientCredentials || $guard(_exceptionable, {
|
|
348
365
|
path: _path + ".clientCredentials",
|
|
349
|
-
expected: "(Omit<
|
|
366
|
+
expected: "(Omit<ISwaggerSecurityScheme.IOAuth2.IFlow, \"authorizationUrl\"> | undefined)",
|
|
350
367
|
value: input.clientCredentials
|
|
351
|
-
})) && $
|
|
368
|
+
})) && $ao14(input.clientCredentials, _path + ".clientCredentials", true && _exceptionable) || $guard(_exceptionable, {
|
|
352
369
|
path: _path + ".clientCredentials",
|
|
353
|
-
expected: "(Omit<
|
|
370
|
+
expected: "(Omit<ISwaggerSecurityScheme.IOAuth2.IFlow, \"authorizationUrl\"> | undefined)",
|
|
354
371
|
value: input.clientCredentials
|
|
355
372
|
}));
|
|
356
|
-
const $
|
|
373
|
+
const $ao11 = (input, _path, _exceptionable = true) => ("string" === typeof input.authorizationUrl || $guard(_exceptionable, {
|
|
357
374
|
path: _path + ".authorizationUrl",
|
|
358
375
|
expected: "string",
|
|
359
376
|
value: input.authorizationUrl
|
|
@@ -369,12 +386,12 @@ var NestiaSdkConfig;
|
|
|
369
386
|
path: _path + ".scopes",
|
|
370
387
|
expected: "(Record<string, string> | undefined)",
|
|
371
388
|
value: input.scopes
|
|
372
|
-
})) && $
|
|
389
|
+
})) && $ao12(input.scopes, _path + ".scopes", true && _exceptionable) || $guard(_exceptionable, {
|
|
373
390
|
path: _path + ".scopes",
|
|
374
391
|
expected: "(Record<string, string> | undefined)",
|
|
375
392
|
value: input.scopes
|
|
376
393
|
}));
|
|
377
|
-
const $
|
|
394
|
+
const $ao12 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every(key => {
|
|
378
395
|
const value = input[key];
|
|
379
396
|
if (undefined === value)
|
|
380
397
|
return true;
|
|
@@ -386,7 +403,7 @@ var NestiaSdkConfig;
|
|
|
386
403
|
});
|
|
387
404
|
return true;
|
|
388
405
|
});
|
|
389
|
-
const $
|
|
406
|
+
const $ao13 = (input, _path, _exceptionable = true) => ("string" === typeof input.authorizationUrl || $guard(_exceptionable, {
|
|
390
407
|
path: _path + ".authorizationUrl",
|
|
391
408
|
expected: "string",
|
|
392
409
|
value: input.authorizationUrl
|
|
@@ -398,12 +415,12 @@ var NestiaSdkConfig;
|
|
|
398
415
|
path: _path + ".scopes",
|
|
399
416
|
expected: "(Record<string, string> | undefined)",
|
|
400
417
|
value: input.scopes
|
|
401
|
-
})) && $
|
|
418
|
+
})) && $ao12(input.scopes, _path + ".scopes", true && _exceptionable) || $guard(_exceptionable, {
|
|
402
419
|
path: _path + ".scopes",
|
|
403
420
|
expected: "(Record<string, string> | undefined)",
|
|
404
421
|
value: input.scopes
|
|
405
422
|
}));
|
|
406
|
-
const $
|
|
423
|
+
const $ao14 = (input, _path, _exceptionable = true) => ("string" === typeof input.tokenUrl || $guard(_exceptionable, {
|
|
407
424
|
path: _path + ".tokenUrl",
|
|
408
425
|
expected: "string",
|
|
409
426
|
value: input.tokenUrl
|
|
@@ -415,28 +432,11 @@ var NestiaSdkConfig;
|
|
|
415
432
|
path: _path + ".scopes",
|
|
416
433
|
expected: "(Record<string, string> | undefined)",
|
|
417
434
|
value: input.scopes
|
|
418
|
-
})) && $
|
|
435
|
+
})) && $ao12(input.scopes, _path + ".scopes", true && _exceptionable) || $guard(_exceptionable, {
|
|
419
436
|
path: _path + ".scopes",
|
|
420
437
|
expected: "(Record<string, string> | undefined)",
|
|
421
438
|
value: input.scopes
|
|
422
439
|
}));
|
|
423
|
-
const $ao14 = (input, _path, _exceptionable = true) => ("apiKey" === input.type || $guard(_exceptionable, {
|
|
424
|
-
path: _path + ".type",
|
|
425
|
-
expected: "\"apiKey\"",
|
|
426
|
-
value: input.type
|
|
427
|
-
})) && (undefined === input["in"] || "header" === input["in"] || "query" === input["in"] || "cookie" === input["in"] || $guard(_exceptionable, {
|
|
428
|
-
path: _path + "[\"in\"]",
|
|
429
|
-
expected: "(\"cookie\" | \"header\" | \"query\" | undefined)",
|
|
430
|
-
value: input["in"]
|
|
431
|
-
})) && (undefined === input.name || "string" === typeof input.name && ($is_custom("default", "string", "Authorization", input.name) || $guard(_exceptionable, {
|
|
432
|
-
path: _path + ".name",
|
|
433
|
-
expected: "string (@default Authorization)",
|
|
434
|
-
value: input.name
|
|
435
|
-
})) || $guard(_exceptionable, {
|
|
436
|
-
path: _path + ".name",
|
|
437
|
-
expected: "(string | undefined)",
|
|
438
|
-
value: input.name
|
|
439
|
-
}));
|
|
440
440
|
const $ao15 = (input, _path, _exceptionable = true) => ((Array.isArray(input.include) || $guard(_exceptionable, {
|
|
441
441
|
path: _path + ".include",
|
|
442
442
|
expected: "Array<string>",
|
|
@@ -923,15 +923,15 @@ var NestiaSdkConfig;
|
|
|
923
923
|
return $ao5(input, _path, true && _exceptionable);
|
|
924
924
|
if (undefined !== input.scheme)
|
|
925
925
|
return $ao6(input, _path, true && _exceptionable);
|
|
926
|
-
if ("
|
|
926
|
+
if ("apiKey" === input.type)
|
|
927
927
|
return $ao7(input, _path, true && _exceptionable);
|
|
928
|
-
if ("
|
|
928
|
+
if ("openIdConnect" === input.type)
|
|
929
929
|
return $ao8(input, _path, true && _exceptionable);
|
|
930
|
-
if ("
|
|
931
|
-
return $
|
|
930
|
+
if ("oauth2" === input.type)
|
|
931
|
+
return $ao9(input, _path, true && _exceptionable);
|
|
932
932
|
return $guard(_exceptionable, {
|
|
933
933
|
path: _path,
|
|
934
|
-
expected: "(
|
|
934
|
+
expected: "(ISwaggerSecurityScheme.IHttpBasic | ISwaggerSecurityScheme.IHttpBearer | ISwaggerSecurityScheme.IApiKey | ISwaggerSecurityScheme.IOpenId | ISwaggerSecurityScheme.IOAuth2)",
|
|
935
935
|
value: input
|
|
936
936
|
});
|
|
937
937
|
})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NestiaSdkConfig.js","sourceRoot":"","sources":["../../../src/executable/internal/NestiaSdkConfig.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,4CAAoB;AACpB,gDAAwB;AACxB,gDAAkC;AAClC,qDAAkD;AAElD,iCAA+B;AAI/B,IAAiB,eAAe,CA0B/B;AA1BD,WAAiB,eAAe;IAC5B,SAAgB,GAAG;QACf,OAAO,SAAS,CAAC,GAAG,EAAE,CAAC;IAC3B,CAAC;IAFe,mBAAG,MAElB,CAAA;IAED,MAAM,SAAS,GAAG,IAAI,qBAAS,CAAC,GAAS,EAAE;QACvC,IAAI,YAAE,CAAC,UAAU,CAAC,kBAAkB,CAAC,KAAK,KAAK;YAAE,OAAO,IAAI,CAAC;QAE7D,MAAM,CAAC,QAAQ,CAAC;YACZ,IAAI,EAAE,KAAK;YACX,eAAe,EAAE;gBACb,MAAM,EAAE,UAAU;gBAClB,MAAM,EAAE,IAAI;aACf;SACJ,CAAC,CAAC;QAEH,MAAM,MAAM,GACR,yBAAa,cAAI,CAAC,OAAO,CAAC,kBAAkB,CAAC,uCAAC,CAAC;QACnD,IAAI,OAAO,MAAM,KAAK,QAAQ;YAC1B,MAAM,IAAI,KAAK,CAAC,kDAAkD,CAAC,CAAC;QAExE,MAAM,MAAM,GACR,OAAO,MAAM,CAAC,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC;QACjE,MAAM,MAAM,GAAkB,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