@drodil/backstage-plugin-qeta-node 3.5.1 → 3.6.0
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/dist/extensions.cjs.js.map +1 -1
- package/dist/index.d.ts +7 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extensions.cjs.js","sources":["../src/extensions.ts"],"sourcesContent":["import {\n BackstageCredentials,\n BackstageUserPrincipal,\n createExtensionPoint,\n} from '@backstage/backend-plugin-api';\nimport {
|
|
1
|
+
{"version":3,"file":"extensions.cjs.js","sources":["../src/extensions.ts"],"sourcesContent":["import {\n BackstageCredentials,\n BackstageUserPrincipal,\n createExtensionPoint,\n} from '@backstage/backend-plugin-api';\nimport {\n AIResponse,\n Article,\n Question,\n} from '@drodil/backstage-plugin-qeta-common';\n\nexport interface AIHandler {\n /**\n * Answer question that has already been posted in the question page\n */\n answerExistingQuestion?(\n question: Question,\n options?: { credentials?: BackstageCredentials<BackstageUserPrincipal> },\n ): Promise<AIResponse>;\n\n /**\n * Answer a draft question in the Ask a question page\n */\n answerNewQuestion?(\n title: string,\n content: string,\n options?: { credentials?: BackstageCredentials<BackstageUserPrincipal> },\n ): Promise<AIResponse>;\n\n /**\n * Summarize article\n */\n summarizeArticle?(\n article: Article,\n options?: { credentials?: BackstageCredentials<BackstageUserPrincipal> },\n ): Promise<AIResponse>;\n}\n\nexport interface QetaAIExtensionPoint {\n setAIHandler(handler: AIHandler): void;\n}\n\nexport const qetaAIExtensionPoint = createExtensionPoint<QetaAIExtensionPoint>({\n id: 'qeta.ai',\n});\n"],"names":["createExtensionPoint"],"mappings":";;;;AA0CO,MAAM,uBAAuBA,qCAA2C,CAAA;AAAA,EAC7E,EAAI,EAAA,SAAA;AACN,CAAC;;;;"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as _backstage_backend_plugin_api from '@backstage/backend-plugin-api';
|
|
2
2
|
import { BackstageCredentials, BackstageUserPrincipal } from '@backstage/backend-plugin-api';
|
|
3
|
-
import { Question, AIResponse } from '@drodil/backstage-plugin-qeta-common';
|
|
3
|
+
import { Question, AIResponse, Article } from '@drodil/backstage-plugin-qeta-common';
|
|
4
4
|
|
|
5
5
|
interface AIHandler {
|
|
6
6
|
/**
|
|
@@ -15,6 +15,12 @@ interface AIHandler {
|
|
|
15
15
|
answerNewQuestion?(title: string, content: string, options?: {
|
|
16
16
|
credentials?: BackstageCredentials<BackstageUserPrincipal>;
|
|
17
17
|
}): Promise<AIResponse>;
|
|
18
|
+
/**
|
|
19
|
+
* Summarize article
|
|
20
|
+
*/
|
|
21
|
+
summarizeArticle?(article: Article, options?: {
|
|
22
|
+
credentials?: BackstageCredentials<BackstageUserPrincipal>;
|
|
23
|
+
}): Promise<AIResponse>;
|
|
18
24
|
}
|
|
19
25
|
interface QetaAIExtensionPoint {
|
|
20
26
|
setAIHandler(handler: AIHandler): void;
|
package/package.json
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"backstage.io",
|
|
8
8
|
"node"
|
|
9
9
|
],
|
|
10
|
-
"version": "3.
|
|
10
|
+
"version": "3.6.0",
|
|
11
11
|
"main": "dist/index.cjs.js",
|
|
12
12
|
"types": "dist/index.d.ts",
|
|
13
13
|
"prepublishOnly": "yarn tsc && yarn build",
|
|
@@ -54,6 +54,6 @@
|
|
|
54
54
|
],
|
|
55
55
|
"dependencies": {
|
|
56
56
|
"@backstage/backend-plugin-api": "^1.0.1",
|
|
57
|
-
"@drodil/backstage-plugin-qeta-common": "^3.
|
|
57
|
+
"@drodil/backstage-plugin-qeta-common": "^3.6.0"
|
|
58
58
|
}
|
|
59
59
|
}
|