@drodil/backstage-plugin-qeta-node 3.5.1
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/README.md +5 -0
- package/dist/extensions.cjs.js +10 -0
- package/dist/extensions.cjs.js.map +1 -0
- package/dist/index.cjs.js +8 -0
- package/dist/index.cjs.js.map +1 -0
- package/dist/index.d.ts +24 -0
- package/package.json +59 -0
package/README.md
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var backendPluginApi = require('@backstage/backend-plugin-api');
|
|
4
|
+
|
|
5
|
+
const qetaAIExtensionPoint = backendPluginApi.createExtensionPoint({
|
|
6
|
+
id: "qeta.ai"
|
|
7
|
+
});
|
|
8
|
+
|
|
9
|
+
exports.qetaAIExtensionPoint = qetaAIExtensionPoint;
|
|
10
|
+
//# sourceMappingURL=extensions.cjs.js.map
|
|
@@ -0,0 +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 { AIResponse, Question } 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\nexport interface QetaAIExtensionPoint {\n setAIHandler(handler: AIHandler): void;\n}\n\nexport const qetaAIExtensionPoint = createExtensionPoint<QetaAIExtensionPoint>({\n id: 'qeta.ai',\n});\n"],"names":["createExtensionPoint"],"mappings":";;;;AA8BO,MAAM,uBAAuBA,qCAA2C,CAAA;AAAA,EAC7E,EAAI,EAAA,SAAA;AACN,CAAC;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import * as _backstage_backend_plugin_api from '@backstage/backend-plugin-api';
|
|
2
|
+
import { BackstageCredentials, BackstageUserPrincipal } from '@backstage/backend-plugin-api';
|
|
3
|
+
import { Question, AIResponse } from '@drodil/backstage-plugin-qeta-common';
|
|
4
|
+
|
|
5
|
+
interface AIHandler {
|
|
6
|
+
/**
|
|
7
|
+
* Answer question that has already been posted in the question page
|
|
8
|
+
*/
|
|
9
|
+
answerExistingQuestion?(question: Question, options?: {
|
|
10
|
+
credentials?: BackstageCredentials<BackstageUserPrincipal>;
|
|
11
|
+
}): Promise<AIResponse>;
|
|
12
|
+
/**
|
|
13
|
+
* Answer a draft question in the Ask a question page
|
|
14
|
+
*/
|
|
15
|
+
answerNewQuestion?(title: string, content: string, options?: {
|
|
16
|
+
credentials?: BackstageCredentials<BackstageUserPrincipal>;
|
|
17
|
+
}): Promise<AIResponse>;
|
|
18
|
+
}
|
|
19
|
+
interface QetaAIExtensionPoint {
|
|
20
|
+
setAIHandler(handler: AIHandler): void;
|
|
21
|
+
}
|
|
22
|
+
declare const qetaAIExtensionPoint: _backstage_backend_plugin_api.ExtensionPoint<QetaAIExtensionPoint>;
|
|
23
|
+
|
|
24
|
+
export { type AIHandler, type QetaAIExtensionPoint, qetaAIExtensionPoint };
|
package/package.json
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@drodil/backstage-plugin-qeta-node",
|
|
3
|
+
"description": "Backstage.io Q&A plugin node",
|
|
4
|
+
"keywords": [
|
|
5
|
+
"backstage",
|
|
6
|
+
"plugin",
|
|
7
|
+
"backstage.io",
|
|
8
|
+
"node"
|
|
9
|
+
],
|
|
10
|
+
"version": "3.5.1",
|
|
11
|
+
"main": "dist/index.cjs.js",
|
|
12
|
+
"types": "dist/index.d.ts",
|
|
13
|
+
"prepublishOnly": "yarn tsc && yarn build",
|
|
14
|
+
"license": "MIT",
|
|
15
|
+
"homepage": "https://github.com/drodil/backstage-plugin-qeta",
|
|
16
|
+
"bugs": {
|
|
17
|
+
"url": "https://github.com/drodil/backstage-plugin-qeta/issues"
|
|
18
|
+
},
|
|
19
|
+
"repository": {
|
|
20
|
+
"type": "git",
|
|
21
|
+
"url": "https://github.com/drodil/backstage-plugin-qeta.git"
|
|
22
|
+
},
|
|
23
|
+
"publishConfig": {
|
|
24
|
+
"access": "public",
|
|
25
|
+
"main": "dist/index.cjs.js",
|
|
26
|
+
"types": "dist/index.d.ts"
|
|
27
|
+
},
|
|
28
|
+
"backstage": {
|
|
29
|
+
"role": "node-library",
|
|
30
|
+
"pluginId": "qeta",
|
|
31
|
+
"pluginPackages": [
|
|
32
|
+
"@drodil/backstage-plugin-qeta",
|
|
33
|
+
"@drodil/backstage-plugin-qeta-backend",
|
|
34
|
+
"@drodil/backstage-plugin-qeta-common",
|
|
35
|
+
"@drodil/backstage-plugin-qeta-node",
|
|
36
|
+
"@drodil/backstage-plugin-qeta-react"
|
|
37
|
+
]
|
|
38
|
+
},
|
|
39
|
+
"sideEffects": false,
|
|
40
|
+
"scripts": {
|
|
41
|
+
"build": "backstage-cli package build",
|
|
42
|
+
"lint": "backstage-cli package lint",
|
|
43
|
+
"test": "backstage-cli package test",
|
|
44
|
+
"clean": "backstage-cli package clean",
|
|
45
|
+
"prepack": "backstage-cli package prepack",
|
|
46
|
+
"postpack": "backstage-cli package postpack",
|
|
47
|
+
"tsc": "tsc"
|
|
48
|
+
},
|
|
49
|
+
"devDependencies": {
|
|
50
|
+
"@backstage/cli": "^0.28.1"
|
|
51
|
+
},
|
|
52
|
+
"files": [
|
|
53
|
+
"dist"
|
|
54
|
+
],
|
|
55
|
+
"dependencies": {
|
|
56
|
+
"@backstage/backend-plugin-api": "^1.0.1",
|
|
57
|
+
"@drodil/backstage-plugin-qeta-common": "^3.5.1"
|
|
58
|
+
}
|
|
59
|
+
}
|