@nestia/sdk 2.5.12 → 2.5.13-dev.20240306

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.
@@ -99,16 +99,16 @@ var NestiaConfigLoader;
99
99
  const $io10 = input => "apiKey" === input.type && (undefined === input["in"] || "header" === input["in"] || "query" === input["in"] || "cookie" === input["in"]) && (undefined === input.name || "string" === typeof input.name);
100
100
  const $io11 = input => "openIdConnect" === input.type && "string" === typeof input.openIdConnectUrl;
101
101
  const $io12 = input => "oauth2" === input.type && ("object" === typeof input.flows && null !== input.flows && false === Array.isArray(input.flows) && $io13(input.flows)) && (undefined === input.description || "string" === typeof input.description);
102
- const $io13 = input => (undefined === input.authorizationCode || "object" === typeof input.authorizationCode && null !== input.authorizationCode && $io14(input.authorizationCode)) && (undefined === input.implicit || "object" === typeof input.implicit && null !== input.implicit && $io16(input.implicit)) && (undefined === input.password || "object" === typeof input.password && null !== input.password && $io17(input.password)) && (undefined === input.clientCredentials || "object" === typeof input.clientCredentials && null !== input.clientCredentials && $io17(input.clientCredentials));
103
- const $io14 = 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) && $io15(input.scopes));
102
+ const $io13 = input => (undefined === input.authorizationCode || "object" === typeof input.authorizationCode && null !== input.authorizationCode && $io14(input.authorizationCode)) && (undefined === input.implicit || "object" === typeof input.implicit && null !== input.implicit && $io16(input.implicit)) && (undefined === input.password || "object" === typeof input.password && null !== input.password && false === Array.isArray(input.password) && $io17(input.password)) && (undefined === input.clientCredentials || "object" === typeof input.clientCredentials && null !== input.clientCredentials && false === Array.isArray(input.clientCredentials) && $io17(input.clientCredentials));
103
+ const $io14 = input => "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) && $io15(input.scopes));
104
104
  const $io15 = input => Object.keys(input).every(key => {
105
105
  const value = input[key];
106
106
  if (undefined === value)
107
107
  return true;
108
108
  return "string" === typeof value;
109
109
  });
110
- const $io16 = input => "string" === typeof input.authorizationUrl && "string" === typeof input.refreshUrl && (undefined === input.scopes || "object" === typeof input.scopes && null !== input.scopes && false === Array.isArray(input.scopes) && $io15(input.scopes));
111
- const $io17 = input => "string" === typeof input.tokenUrl && "string" === typeof input.refreshUrl && (undefined === input.scopes || "object" === typeof input.scopes && null !== input.scopes && false === Array.isArray(input.scopes) && $io15(input.scopes));
110
+ const $io16 = input => "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) && $io15(input.scopes));
111
+ const $io17 = 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) && $io15(input.scopes));
112
112
  const $iu0 = input => (() => {
113
113
  if ("basic" === input.scheme)
114
114
  return $io8(input);
@@ -443,7 +443,7 @@ var NestiaConfigLoader;
443
443
  path: _path + ".implicit",
444
444
  expected: "(Omit<ISwaggerSecurityScheme.IOAuth2.IFlow, \"tokenUrl\"> | undefined)",
445
445
  value: input.implicit
446
- })) && (undefined === input.password || ("object" === typeof input.password && null !== input.password || $guard(_exceptionable, {
446
+ })) && (undefined === input.password || ("object" === typeof input.password && null !== input.password && false === Array.isArray(input.password) || $guard(_exceptionable, {
447
447
  path: _path + ".password",
448
448
  expected: "(Omit<ISwaggerSecurityScheme.IOAuth2.IFlow, \"authorizationUrl\"> | undefined)",
449
449
  value: input.password
@@ -451,7 +451,7 @@ var NestiaConfigLoader;
451
451
  path: _path + ".password",
452
452
  expected: "(Omit<ISwaggerSecurityScheme.IOAuth2.IFlow, \"authorizationUrl\"> | undefined)",
453
453
  value: input.password
454
- })) && (undefined === input.clientCredentials || ("object" === typeof input.clientCredentials && null !== input.clientCredentials || $guard(_exceptionable, {
454
+ })) && (undefined === input.clientCredentials || ("object" === typeof input.clientCredentials && null !== input.clientCredentials && false === Array.isArray(input.clientCredentials) || $guard(_exceptionable, {
455
455
  path: _path + ".clientCredentials",
456
456
  expected: "(Omit<ISwaggerSecurityScheme.IOAuth2.IFlow, \"authorizationUrl\"> | undefined)",
457
457
  value: input.clientCredentials
@@ -464,13 +464,13 @@ var NestiaConfigLoader;
464
464
  path: _path + ".authorizationUrl",
465
465
  expected: "string",
466
466
  value: input.authorizationUrl
467
- })) && ("string" === typeof input.tokenUrl || $guard(_exceptionable, {
467
+ })) && (undefined === input.tokenUrl || "string" === typeof input.tokenUrl || $guard(_exceptionable, {
468
468
  path: _path + ".tokenUrl",
469
- expected: "string",
469
+ expected: "(string | undefined)",
470
470
  value: input.tokenUrl
471
- })) && ("string" === typeof input.refreshUrl || $guard(_exceptionable, {
471
+ })) && (undefined === input.refreshUrl || "string" === typeof input.refreshUrl || $guard(_exceptionable, {
472
472
  path: _path + ".refreshUrl",
473
- expected: "string",
473
+ expected: "(string | undefined)",
474
474
  value: input.refreshUrl
475
475
  })) && (undefined === input.scopes || ("object" === typeof input.scopes && null !== input.scopes && false === Array.isArray(input.scopes) || $guard(_exceptionable, {
476
476
  path: _path + ".scopes",
@@ -495,9 +495,9 @@ var NestiaConfigLoader;
495
495
  path: _path + ".authorizationUrl",
496
496
  expected: "string",
497
497
  value: input.authorizationUrl
498
- })) && ("string" === typeof input.refreshUrl || $guard(_exceptionable, {
498
+ })) && (undefined === input.refreshUrl || "string" === typeof input.refreshUrl || $guard(_exceptionable, {
499
499
  path: _path + ".refreshUrl",
500
- expected: "string",
500
+ expected: "(string | undefined)",
501
501
  value: input.refreshUrl
502
502
  })) && (undefined === input.scopes || ("object" === typeof input.scopes && null !== input.scopes && false === Array.isArray(input.scopes) || $guard(_exceptionable, {
503
503
  path: _path + ".scopes",
@@ -508,13 +508,13 @@ var NestiaConfigLoader;
508
508
  expected: "(Record<string, string> | undefined)",
509
509
  value: input.scopes
510
510
  }));
511
- const $ao17 = (input, _path, _exceptionable = true) => ("string" === typeof input.tokenUrl || $guard(_exceptionable, {
511
+ const $ao17 = (input, _path, _exceptionable = true) => (undefined === input.tokenUrl || "string" === typeof input.tokenUrl || $guard(_exceptionable, {
512
512
  path: _path + ".tokenUrl",
513
- expected: "string",
513
+ expected: "(string | undefined)",
514
514
  value: input.tokenUrl
515
- })) && ("string" === typeof input.refreshUrl || $guard(_exceptionable, {
515
+ })) && (undefined === input.refreshUrl || "string" === typeof input.refreshUrl || $guard(_exceptionable, {
516
516
  path: _path + ".refreshUrl",
517
- expected: "string",
517
+ expected: "(string | undefined)",
518
518
  value: input.refreshUrl
519
519
  })) && (undefined === input.scopes || ("object" === typeof input.scopes && null !== input.scopes && false === Array.isArray(input.scopes) || $guard(_exceptionable, {
520
520
  path: _path + ".scopes",
@@ -48,8 +48,8 @@ export declare namespace ISwaggerSecurityScheme {
48
48
  }
49
49
  interface IFlow {
50
50
  authorizationUrl: string;
51
- tokenUrl: string;
52
- refreshUrl: string;
51
+ tokenUrl?: string;
52
+ refreshUrl?: string;
53
53
  scopes?: Record<string, string>;
54
54
  }
55
55
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nestia/sdk",
3
- "version": "2.5.12",
3
+ "version": "2.5.13-dev.20240306",
4
4
  "description": "Nestia SDK and Swagger generator",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
@@ -32,7 +32,7 @@
32
32
  },
33
33
  "homepage": "https://nestia.io",
34
34
  "dependencies": {
35
- "@nestia/fetcher": "^2.5.12",
35
+ "@nestia/fetcher": "^2.5.13-dev.20240306",
36
36
  "cli": "^1.0.1",
37
37
  "get-function-location": "^2.0.0",
38
38
  "glob": "^7.2.0",
@@ -45,7 +45,7 @@
45
45
  "typia": "^5.4.12"
46
46
  },
47
47
  "peerDependencies": {
48
- "@nestia/fetcher": ">=2.5.12",
48
+ "@nestia/fetcher": ">=2.5.13-dev.20240306",
49
49
  "@nestjs/common": ">=7.0.1",
50
50
  "@nestjs/core": ">=7.0.1",
51
51
  "reflect-metadata": ">=0.1.12",
@@ -1,65 +1,65 @@
1
- /**
2
- * Security scheme of Swagger Documents.
3
- *
4
- * `ISwaggerSecurityScheme` is a data structure representing content of
5
- * `securitySchemes` in `swagger.json` file. It is composed with 5 types of security
6
- * schemes as an union type like below.
7
- *
8
- * @reference https://swagger.io/specification/#security-scheme-object
9
- * @author Jeongho Nam - https://github.com/samchon
10
- */
11
- export type ISwaggerSecurityScheme =
12
- | ISwaggerSecurityScheme.IHttpBasic
13
- | ISwaggerSecurityScheme.IHttpBearer
14
- | ISwaggerSecurityScheme.IApiKey
15
- | ISwaggerSecurityScheme.IOpenId
16
- | ISwaggerSecurityScheme.IOAuth2;
17
- export namespace ISwaggerSecurityScheme {
18
- export interface IHttpBasic {
19
- type: "http";
20
- scheme: "basic";
21
- }
22
- export interface IHttpBearer {
23
- type: "http";
24
- scheme: "bearer";
25
- bearerFormat?: string;
26
- }
27
- export interface IApiKey {
28
- type: "apiKey";
29
-
30
- /**
31
- * @default header
32
- */
33
- in?: "header" | "query" | "cookie";
34
-
35
- /**
36
- * @default Authorization
37
- */
38
- name?: string;
39
- }
40
-
41
- export interface IOpenId {
42
- type: "openIdConnect";
43
- openIdConnectUrl: string;
44
- }
45
-
46
- export interface IOAuth2 {
47
- type: "oauth2";
48
- flows: IOAuth2.IFlowSet;
49
- description?: string;
50
- }
51
- export namespace IOAuth2 {
52
- export interface IFlowSet {
53
- authorizationCode?: IFlow;
54
- implicit?: Omit<IFlow, "tokenUrl">;
55
- password?: Omit<IFlow, "authorizationUrl">;
56
- clientCredentials?: Omit<IFlow, "authorizationUrl">;
57
- }
58
- export interface IFlow {
59
- authorizationUrl: string;
60
- tokenUrl: string;
61
- refreshUrl: string;
62
- scopes?: Record<string, string>;
63
- }
64
- }
65
- }
1
+ /**
2
+ * Security scheme of Swagger Documents.
3
+ *
4
+ * `ISwaggerSecurityScheme` is a data structure representing content of
5
+ * `securitySchemes` in `swagger.json` file. It is composed with 5 types of security
6
+ * schemes as an union type like below.
7
+ *
8
+ * @reference https://swagger.io/specification/#security-scheme-object
9
+ * @author Jeongho Nam - https://github.com/samchon
10
+ */
11
+ export type ISwaggerSecurityScheme =
12
+ | ISwaggerSecurityScheme.IHttpBasic
13
+ | ISwaggerSecurityScheme.IHttpBearer
14
+ | ISwaggerSecurityScheme.IApiKey
15
+ | ISwaggerSecurityScheme.IOpenId
16
+ | ISwaggerSecurityScheme.IOAuth2;
17
+ export namespace ISwaggerSecurityScheme {
18
+ export interface IHttpBasic {
19
+ type: "http";
20
+ scheme: "basic";
21
+ }
22
+ export interface IHttpBearer {
23
+ type: "http";
24
+ scheme: "bearer";
25
+ bearerFormat?: string;
26
+ }
27
+ export interface IApiKey {
28
+ type: "apiKey";
29
+
30
+ /**
31
+ * @default header
32
+ */
33
+ in?: "header" | "query" | "cookie";
34
+
35
+ /**
36
+ * @default Authorization
37
+ */
38
+ name?: string;
39
+ }
40
+
41
+ export interface IOpenId {
42
+ type: "openIdConnect";
43
+ openIdConnectUrl: string;
44
+ }
45
+
46
+ export interface IOAuth2 {
47
+ type: "oauth2";
48
+ flows: IOAuth2.IFlowSet;
49
+ description?: string;
50
+ }
51
+ export namespace IOAuth2 {
52
+ export interface IFlowSet {
53
+ authorizationCode?: IFlow;
54
+ implicit?: Omit<IFlow, "tokenUrl">;
55
+ password?: Omit<IFlow, "authorizationUrl">;
56
+ clientCredentials?: Omit<IFlow, "authorizationUrl">;
57
+ }
58
+ export interface IFlow {
59
+ authorizationUrl: string;
60
+ tokenUrl?: string;
61
+ refreshUrl?: string;
62
+ scopes?: Record<string, string>;
63
+ }
64
+ }
65
+ }