@kaapi/kaapi 0.0.38 → 0.0.40
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/abstract-app.d.ts +14 -0
- package/lib/abstract-app.js.map +1 -1
- package/lib/declarations.d.ts +2 -14
- package/lib/kaapi-plugin-config.d.ts +14 -0
- package/lib/kaapi-plugin-config.js +3 -0
- package/lib/kaapi-plugin-config.js.map +1 -0
- package/lib/services/plugins/auth-designs/api-key-auth-design.d.ts +1 -1
- package/lib/services/plugins/auth-designs/basic-auth-design.d.ts +1 -1
- package/lib/services/plugins/auth-designs/bearer-auth-design.d.ts +1 -1
- package/package.json +3 -3
package/lib/abstract-app.d.ts
CHANGED
|
@@ -1,7 +1,21 @@
|
|
|
1
1
|
import { HandlerDecorations, Lifecycle, ReqRef, ReqRefDefaults } from '@hapi/hapi';
|
|
2
2
|
import { KaapiServerRoute, KaapiServer, KaapiServerOptions } from '@kaapi/server';
|
|
3
|
+
import type { BaseResponseUtil } from '@novice1/api-doc-generator/lib/utils/responses/baseResponseUtils';
|
|
3
4
|
import { ILogger } from './services/log';
|
|
4
5
|
import { IMessaging, IMessagingContext, IMessagingSubscribeConfig, IPublishMethod, ISubscribeMethod } from './services/messaging';
|
|
6
|
+
import type { RequestBodyDocsModifier } from './services/docs/modifiers';
|
|
7
|
+
import type { KaapiOpenAPIHelperClass } from './services/docs/generators';
|
|
8
|
+
export interface KaapiPluginConfiguration {
|
|
9
|
+
docs?: {
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
openAPIHelperClass?: KaapiOpenAPIHelperClass;
|
|
12
|
+
helperSchemaProperty?: string;
|
|
13
|
+
modifiers?: (() => {
|
|
14
|
+
requestBody?: RequestBodyDocsModifier;
|
|
15
|
+
responses?: BaseResponseUtil;
|
|
16
|
+
});
|
|
17
|
+
} | false;
|
|
18
|
+
}
|
|
5
19
|
export interface IKaapiApp extends IMessaging {
|
|
6
20
|
log: ILogger;
|
|
7
21
|
emit: IPublishMethod;
|
package/lib/abstract-app.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"abstract-app.js","sourceRoot":"","sources":["../src/abstract-app.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"abstract-app.js","sourceRoot":"","sources":["../src/abstract-app.ts"],"names":[],"mappings":";;;AAmCA,MAAsB,gBAAgB;IAYlC,KAAK,CACD,WAAmC,EACnC,OAAkF;QAClF,IAAI,CAAC,MAAM,EAAE,CAAC,KAAK,CAAO,WAAW,EAAE,OAAO,CAAC,CAAA;QAC/C,OAAO,IAAI,CAAA;IACf,CAAC;IAED,QAAQ;;QACJ,IAAI,MAAM,GAAG,GAAG,IAAI,CAAC,OAAO,IAAI,OAAO,EAAE,CAAA;QACzC,IAAI,IAAI,CAAC,WAAW,EAAE,CAAC;YACnB,MAAM,IAAI,aAAa,MAAA,IAAI,CAAC,WAAW,0CAAE,IAAI,CAAC,IAAI,CAAC,GAAG,IAAI,CAAA;YAC1D,MAAM,IAAI,UAAU,CAAA,MAAA,IAAI,CAAC,WAAW,0CAAE,IAAI,CAAC,IAAI,CAAC,OAAO,EAAC,CAAC,CAAC,IAAI,IAAI,CAAC,MAAA,IAAI,CAAC,WAAW,0CAAE,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS,EAAE,CAAA;QACzH,CAAC;QACD,OAAO,MAAM,CAAA;IACjB,CAAC;IAED,CAAC,MAAM,CAAC,GAAG,CAAC,4BAA4B,CAAC,CAAC;QACtC,OAAO,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,KAAK,IAAI,CAAC,QAAQ,EAAE,GAAG,CAAC;IAC3D,CAAC;CACJ;AA/BD,4CA+BC"}
|
package/lib/declarations.d.ts
CHANGED
|
@@ -1,21 +1,9 @@
|
|
|
1
1
|
import '@hapi/hapi'
|
|
2
|
-
import type {
|
|
3
|
-
import type { KaapiOpenAPIHelperClass } from './services/docs/generators'
|
|
4
|
-
import { BaseResponseUtil } from '@novice1/api-doc-generator/lib/utils/responses/baseResponseUtils';
|
|
2
|
+
import type { KaapiPluginConfiguration } from './abstract-app';
|
|
5
3
|
|
|
6
4
|
declare module '@hapi/hapi' {
|
|
7
5
|
interface PluginSpecificConfiguration {
|
|
8
|
-
kaapi?:
|
|
9
|
-
docs?: {
|
|
10
|
-
disabled?: boolean;
|
|
11
|
-
openAPIHelperClass?: KaapiOpenAPIHelperClass;
|
|
12
|
-
helperSchemaProperty?: string;
|
|
13
|
-
modifiers?: (() => {
|
|
14
|
-
requestBody?: RequestBodyDocsModifier;
|
|
15
|
-
responses?: BaseResponseUtil
|
|
16
|
-
})
|
|
17
|
-
} | false
|
|
18
|
-
};
|
|
6
|
+
kaapi?: KaapiPluginConfiguration;
|
|
19
7
|
[x: string]: unknown;
|
|
20
8
|
}
|
|
21
9
|
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { RequestBodyDocsModifier } from './services/docs/modifiers';
|
|
2
|
+
import type { KaapiOpenAPIHelperClass } from './services/docs/generators';
|
|
3
|
+
import type { BaseResponseUtil } from '@novice1/api-doc-generator/lib/utils/responses/baseResponseUtils';
|
|
4
|
+
export interface KaapiPluginConfiguration {
|
|
5
|
+
docs?: {
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
openAPIHelperClass?: KaapiOpenAPIHelperClass;
|
|
8
|
+
helperSchemaProperty?: string;
|
|
9
|
+
modifiers?: (() => {
|
|
10
|
+
requestBody?: RequestBodyDocsModifier;
|
|
11
|
+
responses?: BaseResponseUtil;
|
|
12
|
+
});
|
|
13
|
+
} | false;
|
|
14
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kaapi-plugin-config.js","sourceRoot":"","sources":["../src/kaapi-plugin-config.ts"],"names":[],"mappings":""}
|
|
@@ -36,7 +36,7 @@ export declare class APIKeyAuthDesign extends AuthDesign {
|
|
|
36
36
|
inCookie(): this;
|
|
37
37
|
inHeader(): this;
|
|
38
38
|
inQuery(): this;
|
|
39
|
-
docs(): ApiKeyUtil;
|
|
39
|
+
docs(): ApiKeyUtil | undefined;
|
|
40
40
|
integrateStrategy(t: KaapiTools): void | Promise<void>;
|
|
41
41
|
toString(): string;
|
|
42
42
|
}
|
|
@@ -23,7 +23,7 @@ export declare class BasicAuthDesign extends AuthDesign {
|
|
|
23
23
|
setDescription(description: string): this;
|
|
24
24
|
getStrategyName(): string;
|
|
25
25
|
getDescription(): string | undefined;
|
|
26
|
-
docs(): BasicAuthUtil;
|
|
26
|
+
docs(): BasicAuthUtil | undefined;
|
|
27
27
|
integrateStrategy(t: KaapiTools): void | Promise<void>;
|
|
28
28
|
toString(): string;
|
|
29
29
|
}
|
|
@@ -23,7 +23,7 @@ export declare class BearerAuthDesign extends AuthDesign {
|
|
|
23
23
|
setDescription(description: string): this;
|
|
24
24
|
getStrategyName(): string;
|
|
25
25
|
getDescription(): string | undefined;
|
|
26
|
-
docs(): BearerUtil;
|
|
26
|
+
docs(): BearerUtil | undefined;
|
|
27
27
|
integrateStrategy(t: KaapiTools): void | Promise<void>;
|
|
28
28
|
toString(): string;
|
|
29
29
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kaapi/kaapi",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.40",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "TypeScript-based framework",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -30,11 +30,11 @@
|
|
|
30
30
|
"@novice1/api-doc-generator": "^1.2.5",
|
|
31
31
|
"@novice1/routing": "^2.0.2",
|
|
32
32
|
"jsontoxml": "^1.0.1",
|
|
33
|
-
"qs": "^6.14.
|
|
33
|
+
"qs": "^6.14.1",
|
|
34
34
|
"swagger-ui-dist": "^5.31.0",
|
|
35
35
|
"tslib": "^2.8.1",
|
|
36
36
|
"winston": "^3.19.0",
|
|
37
|
-
"@kaapi/server": "^0.0.
|
|
37
|
+
"@kaapi/server": "^0.0.40"
|
|
38
38
|
},
|
|
39
39
|
"scripts": {
|
|
40
40
|
"lint": "eslint .",
|