@zzedbot/yunzhijia 1.0.14 → 1.0.15
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.
Potentially problematic release.
This version of @zzedbot/yunzhijia might be problematic. Click here for more details.
- package/package.json +2 -3
- package/src/config.ts +35 -31
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zzedbot/yunzhijia",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.15",
|
|
4
4
|
"description": "YunzhiJia channel plugin for OpenClaw",
|
|
5
5
|
"main": "src/index.ts",
|
|
6
6
|
"types": "src/index.ts",
|
|
@@ -17,8 +17,7 @@
|
|
|
17
17
|
"author": "Zed",
|
|
18
18
|
"license": "MIT",
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"axios": "^1.13.5"
|
|
21
|
-
"zod": "^3.22.0"
|
|
20
|
+
"axios": "^1.13.5"
|
|
22
21
|
},
|
|
23
22
|
"devDependencies": {
|
|
24
23
|
"typescript": "^5.0.0",
|
package/src/config.ts
CHANGED
|
@@ -1,41 +1,45 @@
|
|
|
1
1
|
import { buildChannelConfigSchema } from "openclaw/plugin-sdk";
|
|
2
2
|
|
|
3
|
-
// Define the configuration schema
|
|
3
|
+
// Define the configuration schema with toJSONSchema method
|
|
4
4
|
const YunzhiJiaAccountConfigSchema = {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
5
|
+
toJSONSchema: () => ({
|
|
6
|
+
type: "object",
|
|
7
|
+
properties: {
|
|
8
|
+
webhookToken: { type: "string" },
|
|
9
|
+
appSecret: { type: "string" },
|
|
10
|
+
skipSignatureVerification: { type: "boolean" },
|
|
11
|
+
name: { type: "string" },
|
|
12
|
+
enabled: { type: "boolean" },
|
|
13
|
+
requireMention: { type: "boolean" },
|
|
14
|
+
allowFrom: {
|
|
15
|
+
type: "array",
|
|
16
|
+
items: { type: ["string", "number"] }
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
required: []
|
|
20
|
+
})
|
|
19
21
|
};
|
|
20
22
|
|
|
21
23
|
export const YunzhiJiaConfigSchema = {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
24
|
+
toJSONSchema: () => ({
|
|
25
|
+
type: "object",
|
|
26
|
+
properties: {
|
|
27
|
+
webhookToken: { type: "string" },
|
|
28
|
+
appSecret: { type: "string" },
|
|
29
|
+
enabled: { type: "boolean" },
|
|
30
|
+
name: { type: "string" },
|
|
31
|
+
requireMention: { type: "boolean" },
|
|
32
|
+
allowFrom: {
|
|
33
|
+
type: "array",
|
|
34
|
+
items: { type: ["string", "number"] }
|
|
35
|
+
},
|
|
36
|
+
accounts: {
|
|
37
|
+
type: "object",
|
|
38
|
+
additionalProperties: YunzhiJiaAccountConfigSchema.toJSONSchema()
|
|
39
|
+
}
|
|
32
40
|
},
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
additionalProperties: YunzhiJiaAccountConfigSchema
|
|
36
|
-
}
|
|
37
|
-
},
|
|
38
|
-
required: []
|
|
41
|
+
required: []
|
|
42
|
+
})
|
|
39
43
|
};
|
|
40
44
|
|
|
41
45
|
// Export the channel config schema in OpenClaw format
|