@nestia/core 2.6.4 → 3.0.0-dev.20240412

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.
Files changed (30) hide show
  1. package/lib/decorators/SwaggerCustomizer.d.ts +5 -6
  2. package/lib/decorators/SwaggerCustomizer.js.map +1 -1
  3. package/lib/programmers/TypedFormDataBodyProgrammer.js +1 -1
  4. package/lib/programmers/TypedFormDataBodyProgrammer.js.map +1 -1
  5. package/lib/programmers/http/HttpQuerifyProgrammer.js +1 -1
  6. package/lib/programmers/http/HttpQuerifyProgrammer.js.map +1 -1
  7. package/package.json +6 -5
  8. package/src/decorators/SwaggerCustomizer.ts +5 -6
  9. package/src/programmers/TypedFormDataBodyProgrammer.ts +1 -1
  10. package/src/programmers/http/HttpQuerifyProgrammer.ts +1 -1
  11. package/lib/structures/ISwagger.d.ts +0 -72
  12. package/lib/structures/ISwagger.js +0 -3
  13. package/lib/structures/ISwagger.js.map +0 -1
  14. package/lib/structures/ISwaggerComponents.d.ts +0 -26
  15. package/lib/structures/ISwaggerComponents.js +0 -3
  16. package/lib/structures/ISwaggerComponents.js.map +0 -1
  17. package/lib/structures/ISwaggerInfo.d.ts +0 -71
  18. package/lib/structures/ISwaggerInfo.js +0 -3
  19. package/lib/structures/ISwaggerInfo.js.map +0 -1
  20. package/lib/structures/ISwaggerRoute.d.ts +0 -46
  21. package/lib/structures/ISwaggerRoute.js +0 -3
  22. package/lib/structures/ISwaggerRoute.js.map +0 -1
  23. package/lib/structures/ISwaggerSecurityScheme.d.ts +0 -56
  24. package/lib/structures/ISwaggerSecurityScheme.js +0 -3
  25. package/lib/structures/ISwaggerSecurityScheme.js.map +0 -1
  26. package/src/structures/ISwagger.ts +0 -91
  27. package/src/structures/ISwaggerComponents.ts +0 -29
  28. package/src/structures/ISwaggerInfo.ts +0 -80
  29. package/src/structures/ISwaggerRoute.ts +0 -50
  30. package/src/structures/ISwaggerSecurityScheme.ts +0 -65
@@ -1,5 +1,4 @@
1
- import { ISwagger } from "../structures/ISwagger";
2
- import { ISwaggerRoute } from "../structures/ISwaggerRoute";
1
+ import { OpenApi } from "@samchon/openapi";
3
2
  /**
4
3
  * Swagger customization decorator.
5
4
  *
@@ -27,7 +26,7 @@ export declare namespace SwaggerCustomizer {
27
26
  /**
28
27
  * Swagger data.
29
28
  */
30
- swagger: ISwagger;
29
+ swagger: OpenApi.IDocument;
31
30
  /**
32
31
  * Method of the route.
33
32
  */
@@ -39,7 +38,7 @@ export declare namespace SwaggerCustomizer {
39
38
  /**
40
39
  * Route data.
41
40
  */
42
- route: ISwaggerRoute;
41
+ route: OpenApi.IOperation;
43
42
  /**
44
43
  * Get neighbor endpoint data through the controller method.
45
44
  *
@@ -53,7 +52,7 @@ export declare namespace SwaggerCustomizer {
53
52
  * @param accessor Accessor for getting neighbor route data
54
53
  * @returns Neighbor route data
55
54
  */
56
- get(accessor: IAccessor): ISwaggerRoute | undefined;
55
+ get(accessor: IAccessor): OpenApi.IOperation | undefined;
57
56
  }
58
57
  /**
59
58
  * Accessor for getting neighbor route data.
@@ -75,6 +74,6 @@ export declare namespace SwaggerCustomizer {
75
74
  /**
76
75
  * Route data.
77
76
  */
78
- route: ISwaggerRoute;
77
+ route: OpenApi.IOperation;
79
78
  }
80
79
  }
@@ -1 +1 @@
1
- {"version":3,"file":"SwaggerCustomizer.js","sourceRoot":"","sources":["../../src/decorators/SwaggerCustomizer.ts"],"names":[],"mappings":";;;AAGA;;;;;;;;;;;;;GAaG;AACH,SAAgB,iBAAiB,CAC/B,OAAqD;IAErD,OAAO,SAAS,iBAAiB,CAC/B,MAAc,EACd,WAA4B,EAC5B,UAAwC;QAExC,IAAM,KAAK,GAAwD,CAAC;YAClE,IAAI,OAAO,CAAC,WAAW,CAAC,0BAA0B,EAAE,MAAM,EAAE,WAAW,CAAC;gBACtE,OAAO,OAAO,CAAC,WAAW,CACxB,0BAA0B,EAC1B,MAAM,EACN,WAAW,CACZ,CAAC;YACJ,IAAM,KAAK,GAAwD,EAAE,CAAC;YACtE,OAAO,CAAC,cAAc,CACpB,0BAA0B,EAC1B,KAAK,EACL,MAAM,EACN,WAAW,CACZ,CAAC;YACF,OAAO,KAAK,CAAC;QACf,CAAC,CAAC,EAAE,CAAC;QACL,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACpB,OAAO,UAAU,CAAC;IACpB,CAAC,CAAC;AACJ,CAAC;AA3BD,8CA2BC"}
1
+ {"version":3,"file":"SwaggerCustomizer.js","sourceRoot":"","sources":["../../src/decorators/SwaggerCustomizer.ts"],"names":[],"mappings":";;;AAEA;;;;;;;;;;;;;GAaG;AACH,SAAgB,iBAAiB,CAC/B,OAAqD;IAErD,OAAO,SAAS,iBAAiB,CAC/B,MAAc,EACd,WAA4B,EAC5B,UAAwC;QAExC,IAAM,KAAK,GAAwD,CAAC;YAClE,IAAI,OAAO,CAAC,WAAW,CAAC,0BAA0B,EAAE,MAAM,EAAE,WAAW,CAAC;gBACtE,OAAO,OAAO,CAAC,WAAW,CACxB,0BAA0B,EAC1B,MAAM,EACN,WAAW,CACZ,CAAC;YACJ,IAAM,KAAK,GAAwD,EAAE,CAAC;YACtE,OAAO,CAAC,cAAc,CACpB,0BAA0B,EAC1B,KAAK,EACL,MAAM,EACN,WAAW,CACZ,CAAC;YACF,OAAO,KAAK,CAAC;QACf,CAAC,CAAC,EAAE,CAAC;QACL,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACpB,OAAO,UAAU,CAAC;IACpB,CAAC,CAAC;AACJ,CAAC;AA3BD,8CA2BC"}
@@ -45,7 +45,7 @@ var TypedFormDataBodyProgrammer;
45
45
  p.value.arrays.some(function (a) { return isFile(a.type.value); });
46
46
  })
47
47
  .map(function (p) { return ({
48
- name: p.key.constants[0].values[0],
48
+ name: p.key.constants[0].values[0].value,
49
49
  limit: !!p.value.natives.length ? 1 : null,
50
50
  }); });
51
51
  // GENERATE VALIDATION PLAN
@@ -1 +1 @@
1
- {"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ApFD,CAoFC;IArFD,CAqFC,CAAC;AACN,CAAC,EAzFgB,2BAA2B,2CAA3B,2BAA2B,QAyF3C;AAED,IAAM,MAAM,GAAG,UAAC,IAAc;IAC5B,OAAA,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,UAAC,CAAC,IAAK,OAAA,CAAC,KAAK,MAAM,IAAI,CAAC,KAAK,MAAM,EAA5B,CAA4B,CAAC;AAAtD,CAAsD,CAAC"}
@@ -57,7 +57,7 @@ var HttpQuerifyProgrammer;
57
57
  return typescript_1.default.factory.createArrowFunction(undefined, undefined, [IdentifierFactory_1.IdentifierFactory.parameter("input")], undefined, undefined, typescript_1.default.factory.createBlock(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], __read(importer.declare(modulo)), false), [
58
58
  StatementFactory_1.StatementFactory.constant("output", typescript_1.default.factory.createNewExpression(typescript_1.default.factory.createIdentifier("URLSearchParams"), undefined, []))
59
59
  ], false), __read(object.properties.map(function (p) {
60
- return typescript_1.default.factory.createExpressionStatement(decode(p.key.constants[0].values[0])(p.value));
60
+ return typescript_1.default.factory.createExpressionStatement(decode(p.key.constants[0].values[0].value)(p.value));
61
61
  })), false), [
62
62
  typescript_1.default.factory.createReturnStatement(typescript_1.default.factory.createIdentifier("output")),
63
63
  ], false), true));
@@ -1 +1 @@
1
- {"version":3,"file":"HttpQuerifyProgrammer.js","sourceRoot":"","sources":["../../../src/programmers/http/HttpQuerifyProgrammer.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,0DAA4B;AAC5B,2EAA0E;AAC1E,6EAA4E;AAC5E,uEAAsE;AACtE,yEAAwE;AACxE,qFAAmF;AACnF,sFAAqF;AAIrF,4EAA2E;AAE3E,IAAiB,qBAAqB,CAmFrC;AAnFD,WAAiB,qBAAqB;IACvB,2BAAK,GAChB,UAAC,OAAiB;QAClB,OAAA,UAAC,MAAiC;YAClC,OAAA,UAAC,IAAa;gBACZ,kBAAkB;gBAClB,IAAM,Q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BAAmB,CAC5B,SAAS,EACT,SAAS,EACT,CAAC,qCAAiB,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,EACrC,SAAS,EACT,SAAS,EACT,MAAM,CAAC,GAAG,CAAC,CAAC,oBAAE,CAAC,OAAO,CAAC,gBAAgB,CAAC,MAAM,CAAC,CAAC,CACjD;iBACF,CACF;gBACH,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CACT,qCAAiB,CAAC,MAAM,CAAC,oBAAE,CAAC,OAAO,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,CACpE;QArBL,CAqBK;IAtBP,CAsBO,CAAC;IAEV,IAAM,MAAM,GAAG,UAAC,GAAW,IAAK,OAAA,UAAC,IAAmB;QAClD,OAAA,oBAAE,CAAC,OAAO,CAAC,oBAAoB,CAC7B,qCAAiB,CAAC,MAAM,CAAC,oBAAE,CAAC,OAAO,CAAC,gBAAgB,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,EACzE,SAAS,EACT,CAAC,oBAAE,CAAC,OAAO,CAAC,mBAAmB,CAAC,GAAG,CAAC,EAAE,IAAI,CAAC,CAC5C;IAJD,CAIC,EAL6B,CAK7B,CAAC;AACN,CAAC,EAnFgB,qBAAqB,qCAArB,qBAAqB,QAmFrC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nestia/core",
3
- "version": "2.6.4",
3
+ "version": "3.0.0-dev.20240412",
4
4
  "description": "Super-fast validation decorators of NestJS",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
@@ -36,24 +36,25 @@
36
36
  },
37
37
  "homepage": "https://nestia.io",
38
38
  "dependencies": {
39
- "@nestia/fetcher": "^2.6.4",
39
+ "@nestia/fetcher": "^3.0.0-dev.20240412",
40
40
  "@nestjs/common": ">=7.0.1",
41
41
  "@nestjs/core": ">=7.0.1",
42
+ "@samchon/openapi": "^0.1.2",
42
43
  "detect-ts-node": "^1.0.5",
43
44
  "glob": "^7.2.0",
44
45
  "multer": "1.4.5-lts.1",
45
46
  "raw-body": "^2.0.0",
46
47
  "reflect-metadata": ">=0.1.12",
47
48
  "rxjs": ">=6.0.0",
48
- "typia": "^5.5.7"
49
+ "typia": "^6.0.0"
49
50
  },
50
51
  "peerDependencies": {
51
- "@nestia/fetcher": ">=2.6.4",
52
+ "@nestia/fetcher": ">=3.0.0-dev.20240412",
52
53
  "@nestjs/common": ">=7.0.1",
53
54
  "@nestjs/core": ">=7.0.1",
54
55
  "reflect-metadata": ">=0.1.12",
55
56
  "rxjs": ">=6.0.0",
56
- "typia": ">=5.5.7 <6.0.0"
57
+ "typia": ">=6.0.0 <7.0.0"
57
58
  },
58
59
  "devDependencies": {
59
60
  "@fastify/multipart": "^8.1.0",
@@ -1,5 +1,4 @@
1
- import { ISwagger } from "../structures/ISwagger";
2
- import { ISwaggerRoute } from "../structures/ISwaggerRoute";
1
+ import { OpenApi } from "@samchon/openapi";
3
2
 
4
3
  /**
5
4
  * Swagger customization decorator.
@@ -55,7 +54,7 @@ export namespace SwaggerCustomizer {
55
54
  /**
56
55
  * Swagger data.
57
56
  */
58
- swagger: ISwagger;
57
+ swagger: OpenApi.IDocument;
59
58
 
60
59
  /**
61
60
  * Method of the route.
@@ -70,7 +69,7 @@ export namespace SwaggerCustomizer {
70
69
  /**
71
70
  * Route data.
72
71
  */
73
- route: ISwaggerRoute;
72
+ route: OpenApi.IOperation;
74
73
 
75
74
  /**
76
75
  * Get neighbor endpoint data through the controller method.
@@ -86,7 +85,7 @@ export namespace SwaggerCustomizer {
86
85
  * @param accessor Accessor for getting neighbor route data
87
86
  * @returns Neighbor route data
88
87
  */
89
- get(accessor: IAccessor): ISwaggerRoute | undefined;
88
+ get(accessor: IAccessor): OpenApi.IOperation | undefined;
90
89
  }
91
90
 
92
91
  /**
@@ -111,6 +110,6 @@ export namespace SwaggerCustomizer {
111
110
  /**
112
111
  * Route data.
113
112
  */
114
- route: ISwaggerRoute;
113
+ route: OpenApi.IOperation;
115
114
  }
116
115
  }
@@ -42,7 +42,7 @@ export namespace TypedFormDataBodyProgrammer {
42
42
  p.value.arrays.some((a) => isFile(a.type.value)),
43
43
  )
44
44
  .map((p) => ({
45
- name: p.key.constants[0].values[0] as string,
45
+ name: p.key.constants[0].values[0].value as string,
46
46
  limit: !!p.value.natives.length ? 1 : null,
47
47
  }));
48
48
 
@@ -49,7 +49,7 @@ export namespace HttpQuerifyProgrammer {
49
49
  ),
50
50
  ...object.properties.map((p) =>
51
51
  ts.factory.createExpressionStatement(
52
- decode(p.key.constants[0]!.values[0] as string)(p.value),
52
+ decode(p.key.constants[0]!.values[0].value as string)(p.value),
53
53
  ),
54
54
  ),
55
55
  ts.factory.createReturnStatement(
@@ -1,72 +0,0 @@
1
- import { ISwaggerComponents } from "./ISwaggerComponents";
2
- import { ISwaggerInfo } from "./ISwaggerInfo";
3
- import { ISwaggerRoute } from "./ISwaggerRoute";
4
- /**
5
- * Swagger Document.
6
- *
7
- * `ISwagger` is a data structure representing content of `swagger.json` file
8
- * generated by Nestia. Note that, this is not an universal structure, but a dedicated
9
- * structure only for Nestia.
10
- *
11
- * @author Jeongho Nam - https://github.com/samchon
12
- */
13
- export interface ISwagger {
14
- /**
15
- * The version of the OpenAPI document.
16
- *
17
- * Nestia always generate OpenAPI 3.0.x document.
18
- */
19
- openapi: `3.0.${number}`;
20
- /**
21
- * List of servers that provide the API.
22
- */
23
- servers: ISwagger.IServer[];
24
- /**
25
- * Information about the API.
26
- */
27
- info: ISwaggerInfo;
28
- /**
29
- * The available paths and operations for the API.
30
- *
31
- * The 1st key is the path, and the 2nd key is the HTTP method.
32
- */
33
- paths: Record<string, Record<string, ISwaggerRoute>>;
34
- /**
35
- * An object to hold reusable data structures.
36
- *
37
- * It stores both DTO schemas and security schemes.
38
- *
39
- * For reference, `nestia` defines every object and alias types as reusable DTO
40
- * schemas. The alias type means that defined by `type` keyword in TypeScript.
41
- */
42
- components: ISwaggerComponents;
43
- }
44
- export declare namespace ISwagger {
45
- /**
46
- * Remote server definition.
47
- */
48
- interface IServer {
49
- /**
50
- * A URL to the target host.
51
- *
52
- * @format uri
53
- */
54
- url: string;
55
- /**
56
- * An optional string describing the target server.
57
- */
58
- description?: string;
59
- }
60
- interface IExternalDocs {
61
- /**
62
- * The URL for target documentation.
63
- *
64
- * @format uri
65
- */
66
- url: string;
67
- /**
68
- * A short description of the target documentation.
69
- */
70
- description?: string;
71
- }
72
- }
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=ISwagger.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ISwagger.js","sourceRoot":"","sources":["../../src/structures/ISwagger.ts"],"names":[],"mappings":""}
@@ -1,26 +0,0 @@
1
- import { IJsonComponents } from "typia";
2
- import { ISwaggerSecurityScheme } from "./ISwaggerSecurityScheme";
3
- /**
4
- * Reusable components in Swagger.
5
- *
6
- * `ISwaggerComponents` is a data structure representing content of `components` object
7
- * in `swagger.json` file generated by Nestia. Note that, this is not an universal
8
- * structure, but a dedicated structure only for Nestia.
9
- *
10
- * @author Jeongho Nam - https://github.com/samchon
11
- */
12
- export interface ISwaggerComponents {
13
- /**
14
- * An object to hold reusable DTO schemas.
15
- *
16
- * For reference, `nestia` stores every object and alias types as reusable DTO
17
- * schemas. The alias type means that defined by `type` keyword in TypeScript.
18
- */
19
- schemas?: Record<string, IJsonComponents.IAlias>;
20
- /**
21
- * An object to hold reusable security schemes.
22
- *
23
- * This property be configured by user in `nestia.config.ts` file.
24
- */
25
- securitySchemes?: Record<string, ISwaggerSecurityScheme>;
26
- }
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=ISwaggerComponents.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ISwaggerComponents.js","sourceRoot":"","sources":["../../src/structures/ISwaggerComponents.ts"],"names":[],"mappings":""}
@@ -1,71 +0,0 @@
1
- /**
2
- * Information about the API.
3
- *
4
- * @author Samchon
5
- */
6
- export interface ISwaggerInfo {
7
- /**
8
- * The title of the API.
9
- */
10
- title: string;
11
- /**
12
- * A short description of the API.
13
- */
14
- description?: string;
15
- /**
16
- * A URL to the Terms of Service for the API.
17
- *
18
- * @format uri
19
- */
20
- termsOfService?: string;
21
- /**
22
- * The contact information for the exposed API.
23
- */
24
- contact?: ISwaggerInfo.IContact;
25
- /**
26
- * The license information for the exposed API.
27
- */
28
- license?: ISwaggerInfo.ILicense;
29
- /**
30
- * Version of the API.
31
- */
32
- version: string;
33
- }
34
- export declare namespace ISwaggerInfo {
35
- /**
36
- * Contact information for the exposed API.
37
- */
38
- interface IContact {
39
- /**
40
- * The identifying name of the contact person/organization.
41
- */
42
- name?: string;
43
- /**
44
- * The URL pointing to the contact information.
45
- *
46
- * @format uri
47
- */
48
- url?: string;
49
- /**
50
- * The email address of the contact person/organization.
51
- *
52
- * @format email
53
- */
54
- email?: string;
55
- }
56
- /**
57
- * License information for the exposed API.
58
- */
59
- interface ILicense {
60
- /**
61
- * The license name used for the API.
62
- */
63
- name: string;
64
- /**
65
- * A URL to the license used for the API.
66
- *
67
- * @format uri
68
- */
69
- url?: string;
70
- }
71
- }
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=ISwaggerInfo.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ISwaggerInfo.js","sourceRoot":"","sources":["../../src/structures/ISwaggerInfo.ts"],"names":[],"mappings":""}
@@ -1,46 +0,0 @@
1
- import { IJsonSchema } from "typia";
2
- export interface ISwaggerRoute {
3
- deprecated?: boolean;
4
- security?: Record<string, string[]>[];
5
- operationId?: string;
6
- tags: string[];
7
- parameters: ISwaggerRoute.IParameter[];
8
- requestBody?: ISwaggerRoute.IRequestBody;
9
- responses: ISwaggerRoute.IResponseBody;
10
- summary?: string;
11
- description?: string;
12
- }
13
- export declare namespace ISwaggerRoute {
14
- interface IParameter {
15
- name: string;
16
- in: string;
17
- schema: IJsonSchema;
18
- required: boolean;
19
- description?: string;
20
- }
21
- interface IRequestBody {
22
- description?: string;
23
- content: IContent;
24
- required: true;
25
- "x-nestia-encrypted"?: boolean;
26
- }
27
- type IResponseBody = Record<string, {
28
- description: string;
29
- content?: IContent;
30
- "x-nestia-encrypted"?: boolean;
31
- }>;
32
- interface IContent {
33
- "application/x-www-form-urlencoded"?: {
34
- schema: IJsonSchema;
35
- };
36
- "application/json"?: {
37
- schema: IJsonSchema;
38
- };
39
- "text/plain"?: {
40
- schema: IJsonSchema;
41
- };
42
- "multipart/form-data"?: {
43
- schema: IJsonSchema;
44
- };
45
- }
46
- }
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=ISwaggerRoute.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ISwaggerRoute.js","sourceRoot":"","sources":["../../src/structures/ISwaggerRoute.ts"],"names":[],"mappings":""}
@@ -1,56 +0,0 @@
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 = ISwaggerSecurityScheme.IHttpBasic | ISwaggerSecurityScheme.IHttpBearer | ISwaggerSecurityScheme.IApiKey | ISwaggerSecurityScheme.IOpenId | ISwaggerSecurityScheme.IOAuth2;
12
- export declare namespace ISwaggerSecurityScheme {
13
- interface IHttpBasic {
14
- type: "http";
15
- scheme: "basic";
16
- }
17
- interface IHttpBearer {
18
- type: "http";
19
- scheme: "bearer";
20
- bearerFormat?: string;
21
- }
22
- interface IApiKey {
23
- type: "apiKey";
24
- /**
25
- * @default header
26
- */
27
- in?: "header" | "query" | "cookie";
28
- /**
29
- * @default Authorization
30
- */
31
- name?: string;
32
- }
33
- interface IOpenId {
34
- type: "openIdConnect";
35
- openIdConnectUrl: string;
36
- }
37
- interface IOAuth2 {
38
- type: "oauth2";
39
- flows: IOAuth2.IFlowSet;
40
- description?: string;
41
- }
42
- namespace IOAuth2 {
43
- interface IFlowSet {
44
- authorizationCode?: IFlow;
45
- implicit?: Omit<IFlow, "tokenUrl">;
46
- password?: Omit<IFlow, "authorizationUrl">;
47
- clientCredentials?: Omit<IFlow, "authorizationUrl">;
48
- }
49
- interface IFlow {
50
- authorizationUrl: string;
51
- tokenUrl?: string;
52
- refreshUrl?: string;
53
- scopes?: Record<string, string>;
54
- }
55
- }
56
- }
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=ISwaggerSecurityScheme.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ISwaggerSecurityScheme.js","sourceRoot":"","sources":["../../src/structures/ISwaggerSecurityScheme.ts"],"names":[],"mappings":""}
@@ -1,91 +0,0 @@
1
- import { ISwaggerComponents } from "./ISwaggerComponents";
2
- import { ISwaggerInfo } from "./ISwaggerInfo";
3
- import { ISwaggerRoute } from "./ISwaggerRoute";
4
-
5
- /**
6
- * Swagger Document.
7
- *
8
- * `ISwagger` is a data structure representing content of `swagger.json` file
9
- * generated by Nestia. Note that, this is not an universal structure, but a dedicated
10
- * structure only for Nestia.
11
- *
12
- * @author Jeongho Nam - https://github.com/samchon
13
- */
14
- export interface ISwagger {
15
- /**
16
- * The version of the OpenAPI document.
17
- *
18
- * Nestia always generate OpenAPI 3.0.x document.
19
- */
20
- openapi: `3.0.${number}`;
21
-
22
- /**
23
- * List of servers that provide the API.
24
- */
25
- servers: ISwagger.IServer[];
26
-
27
- /**
28
- * Information about the API.
29
- */
30
- info: ISwaggerInfo;
31
-
32
- /**
33
- * The available paths and operations for the API.
34
- *
35
- * The 1st key is the path, and the 2nd key is the HTTP method.
36
- */
37
- paths: Record<string, Record<string, ISwaggerRoute>>;
38
-
39
- /**
40
- * An object to hold reusable data structures.
41
- *
42
- * It stores both DTO schemas and security schemes.
43
- *
44
- * For reference, `nestia` defines every object and alias types as reusable DTO
45
- * schemas. The alias type means that defined by `type` keyword in TypeScript.
46
- */
47
- components: ISwaggerComponents;
48
-
49
- // /**
50
- // * A declaration of which security mechanisms can be used across the API.
51
- // *
52
- // * When this property be configured, it would be overwritten in every API routes.
53
- // *
54
- // * For reference, key means the name of security scheme and value means the `scopes`.
55
- // * The `scopes` can be used only when target security scheme is `oauth2` type,
56
- // * especially for {@link ISwaggerSecurityScheme.IOAuth2.IFlow.scopes} property.
57
- // */
58
- // security?: Record<string, string[]>[];
59
- }
60
- export namespace ISwagger {
61
- /**
62
- * Remote server definition.
63
- */
64
- export interface IServer {
65
- /**
66
- * A URL to the target host.
67
- *
68
- * @format uri
69
- */
70
- url: string;
71
-
72
- /**
73
- * An optional string describing the target server.
74
- */
75
- description?: string;
76
- }
77
-
78
- export interface IExternalDocs {
79
- /**
80
- * The URL for target documentation.
81
- *
82
- * @format uri
83
- */
84
- url: string;
85
-
86
- /**
87
- * A short description of the target documentation.
88
- */
89
- description?: string;
90
- }
91
- }
@@ -1,29 +0,0 @@
1
- import { IJsonComponents } from "typia";
2
-
3
- import { ISwaggerSecurityScheme } from "./ISwaggerSecurityScheme";
4
-
5
- /**
6
- * Reusable components in Swagger.
7
- *
8
- * `ISwaggerComponents` is a data structure representing content of `components` object
9
- * in `swagger.json` file generated by Nestia. Note that, this is not an universal
10
- * structure, but a dedicated structure only for Nestia.
11
- *
12
- * @author Jeongho Nam - https://github.com/samchon
13
- */
14
- export interface ISwaggerComponents {
15
- /**
16
- * An object to hold reusable DTO schemas.
17
- *
18
- * For reference, `nestia` stores every object and alias types as reusable DTO
19
- * schemas. The alias type means that defined by `type` keyword in TypeScript.
20
- */
21
- schemas?: Record<string, IJsonComponents.IAlias>;
22
-
23
- /**
24
- * An object to hold reusable security schemes.
25
- *
26
- * This property be configured by user in `nestia.config.ts` file.
27
- */
28
- securitySchemes?: Record<string, ISwaggerSecurityScheme>;
29
- }
@@ -1,80 +0,0 @@
1
- /**
2
- * Information about the API.
3
- *
4
- * @author Samchon
5
- */
6
- export interface ISwaggerInfo {
7
- /**
8
- * The title of the API.
9
- */
10
- title: string;
11
-
12
- /**
13
- * A short description of the API.
14
- */
15
- description?: string;
16
-
17
- /**
18
- * A URL to the Terms of Service for the API.
19
- *
20
- * @format uri
21
- */
22
- termsOfService?: string;
23
-
24
- /**
25
- * The contact information for the exposed API.
26
- */
27
- contact?: ISwaggerInfo.IContact;
28
-
29
- /**
30
- * The license information for the exposed API.
31
- */
32
- license?: ISwaggerInfo.ILicense;
33
-
34
- /**
35
- * Version of the API.
36
- */
37
- version: string;
38
- }
39
- export namespace ISwaggerInfo {
40
- /**
41
- * Contact information for the exposed API.
42
- */
43
- export interface IContact {
44
- /**
45
- * The identifying name of the contact person/organization.
46
- */
47
- name?: string;
48
-
49
- /**
50
- * The URL pointing to the contact information.
51
- *
52
- * @format uri
53
- */
54
- url?: string;
55
-
56
- /**
57
- * The email address of the contact person/organization.
58
- *
59
- * @format email
60
- */
61
- email?: string;
62
- }
63
-
64
- /**
65
- * License information for the exposed API.
66
- */
67
- export interface ILicense {
68
- /**
69
- * The license name used for the API.
70
- */
71
- name: string;
72
-
73
- /**
74
- * A URL to the license used for the API.
75
- *
76
- * @format uri
77
- */
78
- url?: string;
79
- }
80
- }
@@ -1,50 +0,0 @@
1
- import { IJsonSchema } from "typia";
2
-
3
- export interface ISwaggerRoute {
4
- deprecated?: boolean;
5
- security?: Record<string, string[]>[];
6
- operationId?: string;
7
- tags: string[];
8
- parameters: ISwaggerRoute.IParameter[];
9
- requestBody?: ISwaggerRoute.IRequestBody;
10
- responses: ISwaggerRoute.IResponseBody;
11
- summary?: string;
12
- description?: string;
13
- }
14
- export namespace ISwaggerRoute {
15
- export interface IParameter {
16
- name: string;
17
- in: string;
18
- schema: IJsonSchema;
19
- required: boolean;
20
- description?: string;
21
- }
22
- export interface IRequestBody {
23
- description?: string;
24
- content: IContent;
25
- required: true;
26
- "x-nestia-encrypted"?: boolean;
27
- }
28
- export type IResponseBody = Record<
29
- string,
30
- {
31
- description: string;
32
- content?: IContent;
33
- "x-nestia-encrypted"?: boolean;
34
- }
35
- >;
36
- export interface IContent {
37
- "application/x-www-form-urlencoded"?: {
38
- schema: IJsonSchema;
39
- };
40
- "application/json"?: {
41
- schema: IJsonSchema;
42
- };
43
- "text/plain"?: {
44
- schema: IJsonSchema;
45
- };
46
- "multipart/form-data"?: {
47
- schema: IJsonSchema;
48
- };
49
- }
50
- }
@@ -1,65 +0,0 @@
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
- }