@nestia/sdk 1.2.2-dev.20230504-2 → 1.2.2-dev.20230504-3
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.
|
@@ -19,5 +19,10 @@
|
|
|
19
19
|
"bugs": {
|
|
20
20
|
"url": "https://github.com/samchon/nestia/issues"
|
|
21
21
|
},
|
|
22
|
-
"homepage": "https://github.com/samchon/nestia#readme"
|
|
22
|
+
"homepage": "https://github.com/samchon/nestia#readme",
|
|
23
|
+
"files": [
|
|
24
|
+
"lib",
|
|
25
|
+
"package.json",
|
|
26
|
+
"README.md"
|
|
27
|
+
]
|
|
23
28
|
}
|
package/lib/INestiaConfig.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import ts from "typescript";
|
|
2
|
-
import { ISwaggerDocument } from "./structures/ISwaggerDocument";
|
|
1
|
+
import type ts from "typescript";
|
|
2
|
+
import type { ISwaggerDocument } from "./structures/ISwaggerDocument";
|
|
3
3
|
import type { StripEnums } from "./utils/StripEnums";
|
|
4
4
|
/**
|
|
5
5
|
* Definition for the `nestia.config.ts` file.
|
|
@@ -7,6 +7,12 @@ import type { StripEnums } from "./utils/StripEnums";
|
|
|
7
7
|
* @author Jeongho Nam - https://github.com/samchon
|
|
8
8
|
*/
|
|
9
9
|
export interface INestiaConfig {
|
|
10
|
+
/**
|
|
11
|
+
* Building `swagger.json` is also possible.
|
|
12
|
+
*
|
|
13
|
+
* If not specified, you can't build the `swagger.json`.
|
|
14
|
+
*/
|
|
15
|
+
swagger?: INestiaConfig.ISwaggerConfig;
|
|
10
16
|
/**
|
|
11
17
|
* List of files or directories containing the NestJS controller classes.
|
|
12
18
|
*/
|
|
@@ -17,16 +23,6 @@ export interface INestiaConfig {
|
|
|
17
23
|
* If not configured, you can't build the SDK library.
|
|
18
24
|
*/
|
|
19
25
|
output?: string;
|
|
20
|
-
/**
|
|
21
|
-
* Target directory that e2e test functions would be placed in.
|
|
22
|
-
*
|
|
23
|
-
* If you configure this property and runs `npx nestia e2e` command,
|
|
24
|
-
* `@nestia/sdk` will analyze your NestJS backend server code, and
|
|
25
|
-
* generates e2e test functions for every API endpoints.
|
|
26
|
-
*
|
|
27
|
-
* If not configured, you can't run `npx nestia e2e` command.
|
|
28
|
-
*/
|
|
29
|
-
e2e?: string;
|
|
30
26
|
/**
|
|
31
27
|
* Target directory that SDK distribution files would be placed in.
|
|
32
28
|
*
|
|
@@ -40,6 +36,16 @@ export interface INestiaConfig {
|
|
|
40
36
|
* Recommend to use `"packages/api"` value.
|
|
41
37
|
*/
|
|
42
38
|
distribute?: string;
|
|
39
|
+
/**
|
|
40
|
+
* Target directory that e2e test functions would be placed in.
|
|
41
|
+
*
|
|
42
|
+
* If you configure this property and runs `npx nestia e2e` command,
|
|
43
|
+
* `@nestia/sdk` will analyze your NestJS backend server code, and
|
|
44
|
+
* generates e2e test functions for every API endpoints.
|
|
45
|
+
*
|
|
46
|
+
* If not configured, you can't run `npx nestia e2e` command.
|
|
47
|
+
*/
|
|
48
|
+
e2e?: string;
|
|
43
49
|
/**
|
|
44
50
|
* Compiler options for the TypeScript.
|
|
45
51
|
*
|
|
@@ -102,12 +108,6 @@ export interface INestiaConfig {
|
|
|
102
108
|
* @default true
|
|
103
109
|
*/
|
|
104
110
|
primitive?: boolean;
|
|
105
|
-
/**
|
|
106
|
-
* Building `swagger.json` is also possible.
|
|
107
|
-
*
|
|
108
|
-
* If not specified, you can't build the `swagger.json`.
|
|
109
|
-
*/
|
|
110
|
-
swagger?: INestiaConfig.ISwaggerConfig;
|
|
111
111
|
}
|
|
112
112
|
export declare namespace INestiaConfig {
|
|
113
113
|
/**
|
|
@@ -70,68 +70,72 @@ var NestiaSdkConfig;
|
|
|
70
70
|
const __is = input => {
|
|
71
71
|
const $join = typia_1.assert.join;
|
|
72
72
|
const $is_custom = typia_1.assert.is_custom;
|
|
73
|
-
const $io0 = input => 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 && $
|
|
74
|
-
const $io1 = input =>
|
|
75
|
-
const $io2 = input =>
|
|
73
|
+
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 && $io13(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) && $io14(input.compilerOptions)) && (undefined === input.assert || "boolean" === typeof input.assert) && (undefined === input.json || "boolean" === typeof input.json) && (undefined === input.primitive || "boolean" === typeof input.primitive);
|
|
74
|
+
const $io1 = input => "string" === typeof input.output && (undefined === input.security || "object" === typeof input.security && null !== input.security && false === Array.isArray(input.security) && $io2(input.security));
|
|
75
|
+
const $io2 = input => Object.keys(input).every(key => {
|
|
76
76
|
const value = input[key];
|
|
77
77
|
if (undefined === value)
|
|
78
78
|
return true;
|
|
79
79
|
if (RegExp(/(.*)/).test(key))
|
|
80
|
-
return
|
|
80
|
+
return "object" === typeof value && null !== value && $iu0(value);
|
|
81
81
|
return true;
|
|
82
82
|
});
|
|
83
|
-
const $io3 = input =>
|
|
83
|
+
const $io3 = input => "http" === input.type && "basic" === input.schema;
|
|
84
|
+
const $io4 = input => "http" === input.type && "bearer" === input.scheme && (undefined === input.bearerFormat || "string" === typeof input.bearerFormat);
|
|
85
|
+
const $io5 = input => "openIdConnect" === input.type && "string" === typeof input.openIdConnectUrl;
|
|
86
|
+
const $io6 = input => "oauth2" === input.type && ("object" === typeof input.flows && null !== input.flows && false === Array.isArray(input.flows) && $io7(input.flows)) && (undefined === input.description || "string" === typeof input.description);
|
|
87
|
+
const $io7 = input => (undefined === input.authorizationCode || "object" === typeof input.authorizationCode && null !== input.authorizationCode && $io8(input.authorizationCode)) && (undefined === input.implicit || "object" === typeof input.implicit && null !== input.implicit && $io10(input.implicit)) && (undefined === input.password || "object" === typeof input.password && null !== input.password && $io11(input.password)) && (undefined === input.clientCredentials || "object" === typeof input.clientCredentials && null !== input.clientCredentials && $io11(input.clientCredentials));
|
|
88
|
+
const $io8 = 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) && $io9(input.scopes));
|
|
89
|
+
const $io9 = input => Object.keys(input).every(key => {
|
|
84
90
|
const value = input[key];
|
|
85
91
|
if (undefined === value)
|
|
86
92
|
return true;
|
|
87
93
|
if (RegExp(/(.*)/).test(key))
|
|
88
|
-
return
|
|
94
|
+
return "string" === typeof value;
|
|
89
95
|
return true;
|
|
90
96
|
});
|
|
91
|
-
const $
|
|
92
|
-
const $
|
|
97
|
+
const $io10 = input => "string" === typeof input.authorizationUrl && "string" === typeof input.refreshUrl && (undefined === input.scopes || "object" === typeof input.scopes && null !== input.scopes && false === Array.isArray(input.scopes) && $io9(input.scopes));
|
|
98
|
+
const $io11 = input => "string" === typeof input.tokenUrl && "string" === typeof input.refreshUrl && (undefined === input.scopes || "object" === typeof input.scopes && null !== input.scopes && false === Array.isArray(input.scopes) && $io9(input.scopes));
|
|
99
|
+
const $io12 = 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));
|
|
100
|
+
const $io13 = 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));
|
|
101
|
+
const $io14 = input => (undefined === input.allowJs || "boolean" === typeof input.allowJs) && (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.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.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) && $io15(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.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.esModuleInterop || "boolean" === typeof input.esModuleInterop) && (undefined === input.useDefineForClassFields || "boolean" === typeof input.useDefineForClassFields) && Object.keys(input).every(key => {
|
|
93
102
|
const value = input[key];
|
|
94
103
|
if (undefined === value)
|
|
95
104
|
return true;
|
|
96
105
|
if (RegExp(/(.*)/).test(key))
|
|
97
|
-
return
|
|
106
|
+
return true;
|
|
98
107
|
return true;
|
|
99
108
|
});
|
|
100
|
-
const $
|
|
101
|
-
const $io7 = input => "http" === input.type && "bearer" === input.scheme && (undefined === input.bearerFormat || "string" === typeof input.bearerFormat);
|
|
102
|
-
const $io8 = input => "openIdConnect" === input.type && "string" === typeof input.openIdConnectUrl;
|
|
103
|
-
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);
|
|
104
|
-
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));
|
|
105
|
-
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));
|
|
106
|
-
const $io12 = input => Object.keys(input).every(key => {
|
|
109
|
+
const $io15 = input => Object.keys(input).every(key => {
|
|
107
110
|
const value = input[key];
|
|
108
111
|
if (undefined === value)
|
|
109
112
|
return true;
|
|
110
113
|
if (RegExp(/(.*)/).test(key))
|
|
111
|
-
return "string" === typeof
|
|
114
|
+
return Array.isArray(value) && value.every(elem => "string" === typeof elem);
|
|
112
115
|
return true;
|
|
113
116
|
});
|
|
114
|
-
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));
|
|
115
|
-
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));
|
|
116
|
-
const $io15 = 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));
|
|
117
117
|
const $iu0 = input => (() => {
|
|
118
118
|
if (undefined !== input.schema)
|
|
119
|
-
return $
|
|
119
|
+
return $io3(input);
|
|
120
120
|
if (undefined !== input.scheme)
|
|
121
|
-
return $
|
|
121
|
+
return $io4(input);
|
|
122
122
|
if ("openIdConnect" === input.type)
|
|
123
|
-
return $
|
|
123
|
+
return $io5(input);
|
|
124
124
|
if ("oauth2" === input.type)
|
|
125
|
-
return $
|
|
125
|
+
return $io6(input);
|
|
126
126
|
if ("apiKey" === input.type)
|
|
127
|
-
return $
|
|
127
|
+
return $io12(input);
|
|
128
128
|
return false;
|
|
129
129
|
})();
|
|
130
130
|
return "object" === typeof input && null !== input && $io0(input);
|
|
131
131
|
};
|
|
132
132
|
if (false === __is(input))
|
|
133
133
|
((input, _path, _exceptionable = true) => {
|
|
134
|
-
const $ao0 = (input, _path, _exceptionable = true) => (null !== input.
|
|
134
|
+
const $ao0 = (input, _path, _exceptionable = true) => (undefined === input.swagger || ("object" === typeof input.swagger && null !== input.swagger || $guard(_exceptionable, {
|
|
135
|
+
path: _path + ".swagger",
|
|
136
|
+
expected: "(INestiaConfig.ISwaggerConfig | undefined)",
|
|
137
|
+
value: input.swagger
|
|
138
|
+
})) && $ao1(input.swagger, _path + ".swagger", true && _exceptionable)) && ((null !== input.input || $guard(_exceptionable, {
|
|
135
139
|
path: _path + ".input",
|
|
136
140
|
expected: "(Array<string> | INestiaConfig.IInput | string)",
|
|
137
141
|
value: input.input
|
|
@@ -143,23 +147,23 @@ var NestiaSdkConfig;
|
|
|
143
147
|
path: _path + ".input[" + _index1 + "]",
|
|
144
148
|
expected: "string",
|
|
145
149
|
value: elem
|
|
146
|
-
})) || "object" === typeof input.input && null !== input.input && $
|
|
150
|
+
})) || "object" === typeof input.input && null !== input.input && $ao13(input.input, _path + ".input", true && _exceptionable)))) && (undefined === input.output || "string" === typeof input.output || $guard(_exceptionable, {
|
|
147
151
|
path: _path + ".output",
|
|
148
152
|
expected: "(string | undefined)",
|
|
149
153
|
value: input.output
|
|
150
|
-
})) && (undefined === input.e2e || "string" === typeof input.e2e || $guard(_exceptionable, {
|
|
151
|
-
path: _path + ".e2e",
|
|
152
|
-
expected: "(string | undefined)",
|
|
153
|
-
value: input.e2e
|
|
154
154
|
})) && (undefined === input.distribute || "string" === typeof input.distribute || $guard(_exceptionable, {
|
|
155
155
|
path: _path + ".distribute",
|
|
156
156
|
expected: "(string | undefined)",
|
|
157
157
|
value: input.distribute
|
|
158
|
+
})) && (undefined === input.e2e || "string" === typeof input.e2e || $guard(_exceptionable, {
|
|
159
|
+
path: _path + ".e2e",
|
|
160
|
+
expected: "(string | undefined)",
|
|
161
|
+
value: input.e2e
|
|
158
162
|
})) && (undefined === input.compilerOptions || ("object" === typeof input.compilerOptions && null !== input.compilerOptions && false === Array.isArray(input.compilerOptions) || $guard(_exceptionable, {
|
|
159
163
|
path: _path + ".compilerOptions",
|
|
160
164
|
expected: "(StripEnums<ts.CompilerOptions> | undefined)",
|
|
161
165
|
value: input.compilerOptions
|
|
162
|
-
})) && $
|
|
166
|
+
})) && $ao14(input.compilerOptions, _path + ".compilerOptions", true && _exceptionable)) && (undefined === input.assert || "boolean" === typeof input.assert || $guard(_exceptionable, {
|
|
163
167
|
path: _path + ".assert",
|
|
164
168
|
expected: "(boolean | undefined)",
|
|
165
169
|
value: input.assert
|
|
@@ -171,12 +175,162 @@ var NestiaSdkConfig;
|
|
|
171
175
|
path: _path + ".primitive",
|
|
172
176
|
expected: "(boolean | undefined)",
|
|
173
177
|
value: input.primitive
|
|
174
|
-
}))
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
178
|
+
}));
|
|
179
|
+
const $ao1 = (input, _path, _exceptionable = true) => ("string" === typeof input.output || $guard(_exceptionable, {
|
|
180
|
+
path: _path + ".output",
|
|
181
|
+
expected: "string",
|
|
182
|
+
value: input.output
|
|
183
|
+
})) && (undefined === input.security || ("object" === typeof input.security && null !== input.security && false === Array.isArray(input.security) || $guard(_exceptionable, {
|
|
184
|
+
path: _path + ".security",
|
|
185
|
+
expected: "(Record<string, INestiaConfig.ISwaggerConfig.ISecurityScheme> | undefined)",
|
|
186
|
+
value: input.security
|
|
187
|
+
})) && $ao2(input.security, _path + ".security", true && _exceptionable));
|
|
188
|
+
const $ao2 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every(key => {
|
|
189
|
+
const value = input[key];
|
|
190
|
+
if (undefined === value)
|
|
191
|
+
return true;
|
|
192
|
+
if (RegExp(/(.*)/).test(key))
|
|
193
|
+
return ("object" === typeof value && null !== value || $guard(_exceptionable, {
|
|
194
|
+
path: _path + $join(key),
|
|
195
|
+
expected: "(INestiaConfig.ISwaggerConfig.IApiKey | ISwaggerDocument.ISecurityScheme.IHttpBasic | ISwaggerDocument.ISecurityScheme.IHttpBearer | ISwaggerDocument.ISecurityScheme.IOAuth2 | ISwaggerDocument.ISecurityScheme.IOpenId)",
|
|
196
|
+
value: value
|
|
197
|
+
})) && $au0(value, _path + $join(key), true && _exceptionable);
|
|
198
|
+
return true;
|
|
199
|
+
});
|
|
200
|
+
const $ao3 = (input, _path, _exceptionable = true) => ("http" === input.type || $guard(_exceptionable, {
|
|
201
|
+
path: _path + ".type",
|
|
202
|
+
expected: "\"http\"",
|
|
203
|
+
value: input.type
|
|
204
|
+
})) && ("basic" === input.schema || $guard(_exceptionable, {
|
|
205
|
+
path: _path + ".schema",
|
|
206
|
+
expected: "\"basic\"",
|
|
207
|
+
value: input.schema
|
|
208
|
+
}));
|
|
209
|
+
const $ao4 = (input, _path, _exceptionable = true) => ("http" === input.type || $guard(_exceptionable, {
|
|
210
|
+
path: _path + ".type",
|
|
211
|
+
expected: "\"http\"",
|
|
212
|
+
value: input.type
|
|
213
|
+
})) && ("bearer" === input.scheme || $guard(_exceptionable, {
|
|
214
|
+
path: _path + ".scheme",
|
|
215
|
+
expected: "\"bearer\"",
|
|
216
|
+
value: input.scheme
|
|
217
|
+
})) && (undefined === input.bearerFormat || "string" === typeof input.bearerFormat || $guard(_exceptionable, {
|
|
218
|
+
path: _path + ".bearerFormat",
|
|
219
|
+
expected: "(string | undefined)",
|
|
220
|
+
value: input.bearerFormat
|
|
221
|
+
}));
|
|
222
|
+
const $ao5 = (input, _path, _exceptionable = true) => ("openIdConnect" === input.type || $guard(_exceptionable, {
|
|
223
|
+
path: _path + ".type",
|
|
224
|
+
expected: "\"openIdConnect\"",
|
|
225
|
+
value: input.type
|
|
226
|
+
})) && ("string" === typeof input.openIdConnectUrl || $guard(_exceptionable, {
|
|
227
|
+
path: _path + ".openIdConnectUrl",
|
|
228
|
+
expected: "string",
|
|
229
|
+
value: input.openIdConnectUrl
|
|
230
|
+
}));
|
|
231
|
+
const $ao6 = (input, _path, _exceptionable = true) => ("oauth2" === input.type || $guard(_exceptionable, {
|
|
232
|
+
path: _path + ".type",
|
|
233
|
+
expected: "\"oauth2\"",
|
|
234
|
+
value: input.type
|
|
235
|
+
})) && (("object" === typeof input.flows && null !== input.flows && false === Array.isArray(input.flows) || $guard(_exceptionable, {
|
|
236
|
+
path: _path + ".flows",
|
|
237
|
+
expected: "ISwaggerDocument.ISecurityScheme.IOAuth2.IFlowSet",
|
|
238
|
+
value: input.flows
|
|
239
|
+
})) && $ao7(input.flows, _path + ".flows", true && _exceptionable)) && (undefined === input.description || "string" === typeof input.description || $guard(_exceptionable, {
|
|
240
|
+
path: _path + ".description",
|
|
241
|
+
expected: "(string | undefined)",
|
|
242
|
+
value: input.description
|
|
243
|
+
}));
|
|
244
|
+
const $ao7 = (input, _path, _exceptionable = true) => (undefined === input.authorizationCode || ("object" === typeof input.authorizationCode && null !== input.authorizationCode || $guard(_exceptionable, {
|
|
245
|
+
path: _path + ".authorizationCode",
|
|
246
|
+
expected: "(ISwaggerDocument.ISecurityScheme.IOAuth2.IFlow | undefined)",
|
|
247
|
+
value: input.authorizationCode
|
|
248
|
+
})) && $ao8(input.authorizationCode, _path + ".authorizationCode", true && _exceptionable)) && (undefined === input.implicit || ("object" === typeof input.implicit && null !== input.implicit || $guard(_exceptionable, {
|
|
249
|
+
path: _path + ".implicit",
|
|
250
|
+
expected: "(Omit<ISwaggerDocument.ISecurityScheme.IOAuth2.IFlow, \"tokenUrl\"> | undefined)",
|
|
251
|
+
value: input.implicit
|
|
252
|
+
})) && $ao10(input.implicit, _path + ".implicit", true && _exceptionable)) && (undefined === input.password || ("object" === typeof input.password && null !== input.password || $guard(_exceptionable, {
|
|
253
|
+
path: _path + ".password",
|
|
254
|
+
expected: "(Omit<ISwaggerDocument.ISecurityScheme.IOAuth2.IFlow, \"authorizationUrl\"> | undefined)",
|
|
255
|
+
value: input.password
|
|
256
|
+
})) && $ao11(input.password, _path + ".password", true && _exceptionable)) && (undefined === input.clientCredentials || ("object" === typeof input.clientCredentials && null !== input.clientCredentials || $guard(_exceptionable, {
|
|
257
|
+
path: _path + ".clientCredentials",
|
|
258
|
+
expected: "(Omit<ISwaggerDocument.ISecurityScheme.IOAuth2.IFlow, \"authorizationUrl\"> | undefined)",
|
|
259
|
+
value: input.clientCredentials
|
|
260
|
+
})) && $ao11(input.clientCredentials, _path + ".clientCredentials", true && _exceptionable));
|
|
261
|
+
const $ao8 = (input, _path, _exceptionable = true) => ("string" === typeof input.authorizationUrl || $guard(_exceptionable, {
|
|
262
|
+
path: _path + ".authorizationUrl",
|
|
263
|
+
expected: "string",
|
|
264
|
+
value: input.authorizationUrl
|
|
265
|
+
})) && ("string" === typeof input.tokenUrl || $guard(_exceptionable, {
|
|
266
|
+
path: _path + ".tokenUrl",
|
|
267
|
+
expected: "string",
|
|
268
|
+
value: input.tokenUrl
|
|
269
|
+
})) && ("string" === typeof input.refreshUrl || $guard(_exceptionable, {
|
|
270
|
+
path: _path + ".refreshUrl",
|
|
271
|
+
expected: "string",
|
|
272
|
+
value: input.refreshUrl
|
|
273
|
+
})) && (undefined === input.scopes || ("object" === typeof input.scopes && null !== input.scopes && false === Array.isArray(input.scopes) || $guard(_exceptionable, {
|
|
274
|
+
path: _path + ".scopes",
|
|
275
|
+
expected: "(Record<string, string> | undefined)",
|
|
276
|
+
value: input.scopes
|
|
277
|
+
})) && $ao9(input.scopes, _path + ".scopes", true && _exceptionable));
|
|
278
|
+
const $ao9 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every(key => {
|
|
279
|
+
const value = input[key];
|
|
280
|
+
if (undefined === value)
|
|
281
|
+
return true;
|
|
282
|
+
if (RegExp(/(.*)/).test(key))
|
|
283
|
+
return "string" === typeof value || $guard(_exceptionable, {
|
|
284
|
+
path: _path + $join(key),
|
|
285
|
+
expected: "string",
|
|
286
|
+
value: value
|
|
287
|
+
});
|
|
288
|
+
return true;
|
|
289
|
+
});
|
|
290
|
+
const $ao10 = (input, _path, _exceptionable = true) => ("string" === typeof input.authorizationUrl || $guard(_exceptionable, {
|
|
291
|
+
path: _path + ".authorizationUrl",
|
|
292
|
+
expected: "string",
|
|
293
|
+
value: input.authorizationUrl
|
|
294
|
+
})) && ("string" === typeof input.refreshUrl || $guard(_exceptionable, {
|
|
295
|
+
path: _path + ".refreshUrl",
|
|
296
|
+
expected: "string",
|
|
297
|
+
value: input.refreshUrl
|
|
298
|
+
})) && (undefined === input.scopes || ("object" === typeof input.scopes && null !== input.scopes && false === Array.isArray(input.scopes) || $guard(_exceptionable, {
|
|
299
|
+
path: _path + ".scopes",
|
|
300
|
+
expected: "(Record<string, string> | undefined)",
|
|
301
|
+
value: input.scopes
|
|
302
|
+
})) && $ao9(input.scopes, _path + ".scopes", true && _exceptionable));
|
|
303
|
+
const $ao11 = (input, _path, _exceptionable = true) => ("string" === typeof input.tokenUrl || $guard(_exceptionable, {
|
|
304
|
+
path: _path + ".tokenUrl",
|
|
305
|
+
expected: "string",
|
|
306
|
+
value: input.tokenUrl
|
|
307
|
+
})) && ("string" === typeof input.refreshUrl || $guard(_exceptionable, {
|
|
308
|
+
path: _path + ".refreshUrl",
|
|
309
|
+
expected: "string",
|
|
310
|
+
value: input.refreshUrl
|
|
311
|
+
})) && (undefined === input.scopes || ("object" === typeof input.scopes && null !== input.scopes && false === Array.isArray(input.scopes) || $guard(_exceptionable, {
|
|
312
|
+
path: _path + ".scopes",
|
|
313
|
+
expected: "(Record<string, string> | undefined)",
|
|
314
|
+
value: input.scopes
|
|
315
|
+
})) && $ao9(input.scopes, _path + ".scopes", true && _exceptionable));
|
|
316
|
+
const $ao12 = (input, _path, _exceptionable = true) => ("apiKey" === input.type || $guard(_exceptionable, {
|
|
317
|
+
path: _path + ".type",
|
|
318
|
+
expected: "\"apiKey\"",
|
|
319
|
+
value: input.type
|
|
320
|
+
})) && (undefined === input["in"] || "header" === input["in"] || "query" === input["in"] || "cookie" === input["in"] || $guard(_exceptionable, {
|
|
321
|
+
path: _path + "[\"in\"]",
|
|
322
|
+
expected: "(\"cookie\" | \"header\" | \"query\" | undefined)",
|
|
323
|
+
value: input["in"]
|
|
324
|
+
})) && (undefined === input.name || "string" === typeof input.name && ($is_custom("default", "string", "Authorization", input.name) || $guard(_exceptionable, {
|
|
325
|
+
path: _path + ".name",
|
|
326
|
+
expected: "string (@default Authorization)",
|
|
327
|
+
value: input.name
|
|
328
|
+
})) || $guard(_exceptionable, {
|
|
329
|
+
path: _path + ".name",
|
|
330
|
+
expected: "(string | undefined)",
|
|
331
|
+
value: input.name
|
|
332
|
+
}));
|
|
333
|
+
const $ao13 = (input, _path, _exceptionable = true) => (Array.isArray(input.include) || $guard(_exceptionable, {
|
|
180
334
|
path: _path + ".include",
|
|
181
335
|
expected: "Array<string>",
|
|
182
336
|
value: input.include
|
|
@@ -193,7 +347,7 @@ var NestiaSdkConfig;
|
|
|
193
347
|
expected: "string",
|
|
194
348
|
value: elem
|
|
195
349
|
})));
|
|
196
|
-
const $
|
|
350
|
+
const $ao14 = (input, _path, _exceptionable = true) => (undefined === input.allowJs || "boolean" === typeof input.allowJs || $guard(_exceptionable, {
|
|
197
351
|
path: _path + ".allowJs",
|
|
198
352
|
expected: "(boolean | undefined)",
|
|
199
353
|
value: input.allowJs
|
|
@@ -413,7 +567,7 @@ var NestiaSdkConfig;
|
|
|
413
567
|
path: _path + ".paths",
|
|
414
568
|
expected: "(ts.MapLike<Array<string>> | undefined)",
|
|
415
569
|
value: input.paths
|
|
416
|
-
})) && $
|
|
570
|
+
})) && $ao15(input.paths, _path + ".paths", true && _exceptionable)) && (undefined === input.preserveConstEnums || "boolean" === typeof input.preserveConstEnums || $guard(_exceptionable, {
|
|
417
571
|
path: _path + ".preserveConstEnums",
|
|
418
572
|
expected: "(boolean | undefined)",
|
|
419
573
|
value: input.preserveConstEnums
|
|
@@ -569,7 +723,7 @@ var NestiaSdkConfig;
|
|
|
569
723
|
return true;
|
|
570
724
|
return true;
|
|
571
725
|
}));
|
|
572
|
-
const $
|
|
726
|
+
const $ao15 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every(key => {
|
|
573
727
|
const value = input[key];
|
|
574
728
|
if (undefined === value)
|
|
575
729
|
return true;
|
|
@@ -585,171 +739,17 @@ var NestiaSdkConfig;
|
|
|
585
739
|
}));
|
|
586
740
|
return true;
|
|
587
741
|
});
|
|
588
|
-
const $ao4 = (input, _path, _exceptionable = true) => ("string" === typeof input.output || $guard(_exceptionable, {
|
|
589
|
-
path: _path + ".output",
|
|
590
|
-
expected: "string",
|
|
591
|
-
value: input.output
|
|
592
|
-
})) && (undefined === input.security || ("object" === typeof input.security && null !== input.security && false === Array.isArray(input.security) || $guard(_exceptionable, {
|
|
593
|
-
path: _path + ".security",
|
|
594
|
-
expected: "(Record<string, INestiaConfig.ISwaggerConfig.ISecurityScheme> | undefined)",
|
|
595
|
-
value: input.security
|
|
596
|
-
})) && $ao5(input.security, _path + ".security", true && _exceptionable));
|
|
597
|
-
const $ao5 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every(key => {
|
|
598
|
-
const value = input[key];
|
|
599
|
-
if (undefined === value)
|
|
600
|
-
return true;
|
|
601
|
-
if (RegExp(/(.*)/).test(key))
|
|
602
|
-
return ("object" === typeof value && null !== value || $guard(_exceptionable, {
|
|
603
|
-
path: _path + $join(key),
|
|
604
|
-
expected: "(INestiaConfig.ISwaggerConfig.IApiKey | ISwaggerDocument.ISecurityScheme.IHttpBasic | ISwaggerDocument.ISecurityScheme.IHttpBearer | ISwaggerDocument.ISecurityScheme.IOAuth2 | ISwaggerDocument.ISecurityScheme.IOpenId)",
|
|
605
|
-
value: value
|
|
606
|
-
})) && $au0(value, _path + $join(key), true && _exceptionable);
|
|
607
|
-
return true;
|
|
608
|
-
});
|
|
609
|
-
const $ao6 = (input, _path, _exceptionable = true) => ("http" === input.type || $guard(_exceptionable, {
|
|
610
|
-
path: _path + ".type",
|
|
611
|
-
expected: "\"http\"",
|
|
612
|
-
value: input.type
|
|
613
|
-
})) && ("basic" === input.schema || $guard(_exceptionable, {
|
|
614
|
-
path: _path + ".schema",
|
|
615
|
-
expected: "\"basic\"",
|
|
616
|
-
value: input.schema
|
|
617
|
-
}));
|
|
618
|
-
const $ao7 = (input, _path, _exceptionable = true) => ("http" === input.type || $guard(_exceptionable, {
|
|
619
|
-
path: _path + ".type",
|
|
620
|
-
expected: "\"http\"",
|
|
621
|
-
value: input.type
|
|
622
|
-
})) && ("bearer" === input.scheme || $guard(_exceptionable, {
|
|
623
|
-
path: _path + ".scheme",
|
|
624
|
-
expected: "\"bearer\"",
|
|
625
|
-
value: input.scheme
|
|
626
|
-
})) && (undefined === input.bearerFormat || "string" === typeof input.bearerFormat || $guard(_exceptionable, {
|
|
627
|
-
path: _path + ".bearerFormat",
|
|
628
|
-
expected: "(string | undefined)",
|
|
629
|
-
value: input.bearerFormat
|
|
630
|
-
}));
|
|
631
|
-
const $ao8 = (input, _path, _exceptionable = true) => ("openIdConnect" === input.type || $guard(_exceptionable, {
|
|
632
|
-
path: _path + ".type",
|
|
633
|
-
expected: "\"openIdConnect\"",
|
|
634
|
-
value: input.type
|
|
635
|
-
})) && ("string" === typeof input.openIdConnectUrl || $guard(_exceptionable, {
|
|
636
|
-
path: _path + ".openIdConnectUrl",
|
|
637
|
-
expected: "string",
|
|
638
|
-
value: input.openIdConnectUrl
|
|
639
|
-
}));
|
|
640
|
-
const $ao9 = (input, _path, _exceptionable = true) => ("oauth2" === input.type || $guard(_exceptionable, {
|
|
641
|
-
path: _path + ".type",
|
|
642
|
-
expected: "\"oauth2\"",
|
|
643
|
-
value: input.type
|
|
644
|
-
})) && (("object" === typeof input.flows && null !== input.flows && false === Array.isArray(input.flows) || $guard(_exceptionable, {
|
|
645
|
-
path: _path + ".flows",
|
|
646
|
-
expected: "ISwaggerDocument.ISecurityScheme.IOAuth2.IFlowSet",
|
|
647
|
-
value: input.flows
|
|
648
|
-
})) && $ao10(input.flows, _path + ".flows", true && _exceptionable)) && (undefined === input.description || "string" === typeof input.description || $guard(_exceptionable, {
|
|
649
|
-
path: _path + ".description",
|
|
650
|
-
expected: "(string | undefined)",
|
|
651
|
-
value: input.description
|
|
652
|
-
}));
|
|
653
|
-
const $ao10 = (input, _path, _exceptionable = true) => (undefined === input.authorizationCode || ("object" === typeof input.authorizationCode && null !== input.authorizationCode || $guard(_exceptionable, {
|
|
654
|
-
path: _path + ".authorizationCode",
|
|
655
|
-
expected: "(ISwaggerDocument.ISecurityScheme.IOAuth2.IFlow | undefined)",
|
|
656
|
-
value: input.authorizationCode
|
|
657
|
-
})) && $ao11(input.authorizationCode, _path + ".authorizationCode", true && _exceptionable)) && (undefined === input.implicit || ("object" === typeof input.implicit && null !== input.implicit || $guard(_exceptionable, {
|
|
658
|
-
path: _path + ".implicit",
|
|
659
|
-
expected: "(Omit<ISwaggerDocument.ISecurityScheme.IOAuth2.IFlow, \"tokenUrl\"> | undefined)",
|
|
660
|
-
value: input.implicit
|
|
661
|
-
})) && $ao13(input.implicit, _path + ".implicit", true && _exceptionable)) && (undefined === input.password || ("object" === typeof input.password && null !== input.password || $guard(_exceptionable, {
|
|
662
|
-
path: _path + ".password",
|
|
663
|
-
expected: "(Omit<ISwaggerDocument.ISecurityScheme.IOAuth2.IFlow, \"authorizationUrl\"> | undefined)",
|
|
664
|
-
value: input.password
|
|
665
|
-
})) && $ao14(input.password, _path + ".password", true && _exceptionable)) && (undefined === input.clientCredentials || ("object" === typeof input.clientCredentials && null !== input.clientCredentials || $guard(_exceptionable, {
|
|
666
|
-
path: _path + ".clientCredentials",
|
|
667
|
-
expected: "(Omit<ISwaggerDocument.ISecurityScheme.IOAuth2.IFlow, \"authorizationUrl\"> | undefined)",
|
|
668
|
-
value: input.clientCredentials
|
|
669
|
-
})) && $ao14(input.clientCredentials, _path + ".clientCredentials", true && _exceptionable));
|
|
670
|
-
const $ao11 = (input, _path, _exceptionable = true) => ("string" === typeof input.authorizationUrl || $guard(_exceptionable, {
|
|
671
|
-
path: _path + ".authorizationUrl",
|
|
672
|
-
expected: "string",
|
|
673
|
-
value: input.authorizationUrl
|
|
674
|
-
})) && ("string" === typeof input.tokenUrl || $guard(_exceptionable, {
|
|
675
|
-
path: _path + ".tokenUrl",
|
|
676
|
-
expected: "string",
|
|
677
|
-
value: input.tokenUrl
|
|
678
|
-
})) && ("string" === typeof input.refreshUrl || $guard(_exceptionable, {
|
|
679
|
-
path: _path + ".refreshUrl",
|
|
680
|
-
expected: "string",
|
|
681
|
-
value: input.refreshUrl
|
|
682
|
-
})) && (undefined === input.scopes || ("object" === typeof input.scopes && null !== input.scopes && false === Array.isArray(input.scopes) || $guard(_exceptionable, {
|
|
683
|
-
path: _path + ".scopes",
|
|
684
|
-
expected: "(Record<string, string> | undefined)",
|
|
685
|
-
value: input.scopes
|
|
686
|
-
})) && $ao12(input.scopes, _path + ".scopes", true && _exceptionable));
|
|
687
|
-
const $ao12 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every(key => {
|
|
688
|
-
const value = input[key];
|
|
689
|
-
if (undefined === value)
|
|
690
|
-
return true;
|
|
691
|
-
if (RegExp(/(.*)/).test(key))
|
|
692
|
-
return "string" === typeof value || $guard(_exceptionable, {
|
|
693
|
-
path: _path + $join(key),
|
|
694
|
-
expected: "string",
|
|
695
|
-
value: value
|
|
696
|
-
});
|
|
697
|
-
return true;
|
|
698
|
-
});
|
|
699
|
-
const $ao13 = (input, _path, _exceptionable = true) => ("string" === typeof input.authorizationUrl || $guard(_exceptionable, {
|
|
700
|
-
path: _path + ".authorizationUrl",
|
|
701
|
-
expected: "string",
|
|
702
|
-
value: input.authorizationUrl
|
|
703
|
-
})) && ("string" === typeof input.refreshUrl || $guard(_exceptionable, {
|
|
704
|
-
path: _path + ".refreshUrl",
|
|
705
|
-
expected: "string",
|
|
706
|
-
value: input.refreshUrl
|
|
707
|
-
})) && (undefined === input.scopes || ("object" === typeof input.scopes && null !== input.scopes && false === Array.isArray(input.scopes) || $guard(_exceptionable, {
|
|
708
|
-
path: _path + ".scopes",
|
|
709
|
-
expected: "(Record<string, string> | undefined)",
|
|
710
|
-
value: input.scopes
|
|
711
|
-
})) && $ao12(input.scopes, _path + ".scopes", true && _exceptionable));
|
|
712
|
-
const $ao14 = (input, _path, _exceptionable = true) => ("string" === typeof input.tokenUrl || $guard(_exceptionable, {
|
|
713
|
-
path: _path + ".tokenUrl",
|
|
714
|
-
expected: "string",
|
|
715
|
-
value: input.tokenUrl
|
|
716
|
-
})) && ("string" === typeof input.refreshUrl || $guard(_exceptionable, {
|
|
717
|
-
path: _path + ".refreshUrl",
|
|
718
|
-
expected: "string",
|
|
719
|
-
value: input.refreshUrl
|
|
720
|
-
})) && (undefined === input.scopes || ("object" === typeof input.scopes && null !== input.scopes && false === Array.isArray(input.scopes) || $guard(_exceptionable, {
|
|
721
|
-
path: _path + ".scopes",
|
|
722
|
-
expected: "(Record<string, string> | undefined)",
|
|
723
|
-
value: input.scopes
|
|
724
|
-
})) && $ao12(input.scopes, _path + ".scopes", true && _exceptionable));
|
|
725
|
-
const $ao15 = (input, _path, _exceptionable = true) => ("apiKey" === input.type || $guard(_exceptionable, {
|
|
726
|
-
path: _path + ".type",
|
|
727
|
-
expected: "\"apiKey\"",
|
|
728
|
-
value: input.type
|
|
729
|
-
})) && (undefined === input["in"] || "header" === input["in"] || "query" === input["in"] || "cookie" === input["in"] || $guard(_exceptionable, {
|
|
730
|
-
path: _path + "[\"in\"]",
|
|
731
|
-
expected: "(\"cookie\" | \"header\" | \"query\" | undefined)",
|
|
732
|
-
value: input["in"]
|
|
733
|
-
})) && (undefined === input.name || "string" === typeof input.name && ($is_custom("default", "string", "Authorization", input.name) || $guard(_exceptionable, {
|
|
734
|
-
path: _path + ".name",
|
|
735
|
-
expected: "string (@default Authorization)",
|
|
736
|
-
value: input.name
|
|
737
|
-
})) || $guard(_exceptionable, {
|
|
738
|
-
path: _path + ".name",
|
|
739
|
-
expected: "(string | undefined)",
|
|
740
|
-
value: input.name
|
|
741
|
-
}));
|
|
742
742
|
const $au0 = (input, _path, _exceptionable = true) => (() => {
|
|
743
743
|
if (undefined !== input.schema)
|
|
744
|
-
return $
|
|
744
|
+
return $ao3(input, _path, true && _exceptionable);
|
|
745
745
|
if (undefined !== input.scheme)
|
|
746
|
-
return $
|
|
746
|
+
return $ao4(input, _path, true && _exceptionable);
|
|
747
747
|
if ("openIdConnect" === input.type)
|
|
748
|
-
return $
|
|
748
|
+
return $ao5(input, _path, true && _exceptionable);
|
|
749
749
|
if ("oauth2" === input.type)
|
|
750
|
-
return $
|
|
750
|
+
return $ao6(input, _path, true && _exceptionable);
|
|
751
751
|
if ("apiKey" === input.type)
|
|
752
|
-
return $
|
|
752
|
+
return $ao12(input, _path, true && _exceptionable);
|
|
753
753
|
return $guard(_exceptionable, {
|
|
754
754
|
path: _path,
|
|
755
755
|
expected: "(ISwaggerDocument.ISecurityScheme.IHttpBasic | ISwaggerDocument.ISecurityScheme.IHttpBearer | ISwaggerDocument.ISecurityScheme.IOpenId | ISwaggerDocument.ISecurityScheme.IOAuth2 | INestiaConfig.ISwaggerConfig.IApiKey)",
|
package/package.json
CHANGED
package/src/INestiaConfig.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import ts from "typescript";
|
|
1
|
+
import type ts from "typescript";
|
|
2
2
|
|
|
3
|
-
import { ISwaggerDocument } from "./structures/ISwaggerDocument";
|
|
3
|
+
import type { ISwaggerDocument } from "./structures/ISwaggerDocument";
|
|
4
4
|
import type { StripEnums } from "./utils/StripEnums";
|
|
5
5
|
|
|
6
6
|
/**
|
|
@@ -9,6 +9,13 @@ import type { StripEnums } from "./utils/StripEnums";
|
|
|
9
9
|
* @author Jeongho Nam - https://github.com/samchon
|
|
10
10
|
*/
|
|
11
11
|
export interface INestiaConfig {
|
|
12
|
+
/**
|
|
13
|
+
* Building `swagger.json` is also possible.
|
|
14
|
+
*
|
|
15
|
+
* If not specified, you can't build the `swagger.json`.
|
|
16
|
+
*/
|
|
17
|
+
swagger?: INestiaConfig.ISwaggerConfig;
|
|
18
|
+
|
|
12
19
|
/**
|
|
13
20
|
* List of files or directories containing the NestJS controller classes.
|
|
14
21
|
*/
|
|
@@ -21,17 +28,6 @@ export interface INestiaConfig {
|
|
|
21
28
|
*/
|
|
22
29
|
output?: string;
|
|
23
30
|
|
|
24
|
-
/**
|
|
25
|
-
* Target directory that e2e test functions would be placed in.
|
|
26
|
-
*
|
|
27
|
-
* If you configure this property and runs `npx nestia e2e` command,
|
|
28
|
-
* `@nestia/sdk` will analyze your NestJS backend server code, and
|
|
29
|
-
* generates e2e test functions for every API endpoints.
|
|
30
|
-
*
|
|
31
|
-
* If not configured, you can't run `npx nestia e2e` command.
|
|
32
|
-
*/
|
|
33
|
-
e2e?: string;
|
|
34
|
-
|
|
35
31
|
/**
|
|
36
32
|
* Target directory that SDK distribution files would be placed in.
|
|
37
33
|
*
|
|
@@ -46,6 +42,17 @@ export interface INestiaConfig {
|
|
|
46
42
|
*/
|
|
47
43
|
distribute?: string;
|
|
48
44
|
|
|
45
|
+
/**
|
|
46
|
+
* Target directory that e2e test functions would be placed in.
|
|
47
|
+
*
|
|
48
|
+
* If you configure this property and runs `npx nestia e2e` command,
|
|
49
|
+
* `@nestia/sdk` will analyze your NestJS backend server code, and
|
|
50
|
+
* generates e2e test functions for every API endpoints.
|
|
51
|
+
*
|
|
52
|
+
* If not configured, you can't run `npx nestia e2e` command.
|
|
53
|
+
*/
|
|
54
|
+
e2e?: string;
|
|
55
|
+
|
|
49
56
|
/**
|
|
50
57
|
* Compiler options for the TypeScript.
|
|
51
58
|
*
|
|
@@ -111,13 +118,6 @@ export interface INestiaConfig {
|
|
|
111
118
|
* @default true
|
|
112
119
|
*/
|
|
113
120
|
primitive?: boolean;
|
|
114
|
-
|
|
115
|
-
/**
|
|
116
|
-
* Building `swagger.json` is also possible.
|
|
117
|
-
*
|
|
118
|
-
* If not specified, you can't build the `swagger.json`.
|
|
119
|
-
*/
|
|
120
|
-
swagger?: INestiaConfig.ISwaggerConfig;
|
|
121
121
|
}
|
|
122
122
|
export namespace INestiaConfig {
|
|
123
123
|
/**
|