@openclaw-plugins/feishu-plus 0.1.7

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/src/monitor.ts ADDED
@@ -0,0 +1,190 @@
1
+ import * as Lark from "@larksuiteoapi/node-sdk";
2
+ import type { ClawdbotConfig, RuntimeEnv, HistoryEntry } from "openclaw/plugin-sdk";
3
+ import type { ResolvedFeishuAccount } from "./types.js";
4
+ import { createFeishuWSClient, createEventDispatcher } from "./client.js";
5
+ import { resolveFeishuAccount, listEnabledFeishuAccounts } from "./accounts.js";
6
+ import { handleFeishuMessage, type FeishuMessageEvent, type FeishuBotAddedEvent } from "./bot.js";
7
+ import { probeFeishu } from "./probe.js";
8
+
9
+ export type MonitorFeishuOpts = {
10
+ config?: ClawdbotConfig;
11
+ runtime?: RuntimeEnv;
12
+ abortSignal?: AbortSignal;
13
+ accountId?: string;
14
+ };
15
+
16
+ // Per-account WebSocket clients and bot info
17
+ const wsClients = new Map<string, Lark.WSClient>();
18
+ const botOpenIds = new Map<string, string>();
19
+
20
+ async function fetchBotOpenId(
21
+ account: ResolvedFeishuAccount,
22
+ ): Promise<string | undefined> {
23
+ try {
24
+ const result = await probeFeishu(account);
25
+ return result.ok ? result.botOpenId : undefined;
26
+ } catch {
27
+ return undefined;
28
+ }
29
+ }
30
+
31
+ /**
32
+ * Monitor a single Feishu account.
33
+ */
34
+ async function monitorSingleAccount(params: {
35
+ cfg: ClawdbotConfig;
36
+ account: ResolvedFeishuAccount;
37
+ runtime?: RuntimeEnv;
38
+ abortSignal?: AbortSignal;
39
+ }): Promise<void> {
40
+ const { cfg, account, runtime, abortSignal } = params;
41
+ const { accountId } = account;
42
+ const log = runtime?.log ?? console.log;
43
+ const error = runtime?.error ?? console.error;
44
+
45
+ // Fetch bot open_id
46
+ const botOpenId = await fetchBotOpenId(account);
47
+ botOpenIds.set(accountId, botOpenId ?? "");
48
+ log(`feishu[${accountId}]: bot open_id resolved: ${botOpenId ?? "unknown"}`);
49
+
50
+ const connectionMode = account.config.connectionMode ?? "websocket";
51
+
52
+ if (connectionMode !== "websocket") {
53
+ log(`feishu[${accountId}]: webhook mode not implemented in monitor`);
54
+ return;
55
+ }
56
+
57
+ log(`feishu[${accountId}]: starting WebSocket connection...`);
58
+
59
+ const wsClient = createFeishuWSClient(account);
60
+ wsClients.set(accountId, wsClient);
61
+
62
+ const chatHistories = new Map<string, HistoryEntry[]>();
63
+ const eventDispatcher = createEventDispatcher(account);
64
+
65
+ eventDispatcher.register({
66
+ "im.message.receive_v1": async (data) => {
67
+ try {
68
+ const event = data as unknown as FeishuMessageEvent;
69
+ await handleFeishuMessage({
70
+ cfg,
71
+ event,
72
+ botOpenId: botOpenIds.get(accountId),
73
+ runtime,
74
+ chatHistories,
75
+ accountId,
76
+ });
77
+ } catch (err) {
78
+ error(`feishu[${accountId}]: error handling message: ${String(err)}`);
79
+ }
80
+ },
81
+ "im.message.message_read_v1": async () => {
82
+ // Ignore read receipts
83
+ },
84
+ "im.chat.member.bot.added_v1": async (data) => {
85
+ try {
86
+ const event = data as unknown as FeishuBotAddedEvent;
87
+ log(`feishu[${accountId}]: bot added to chat ${event.chat_id}`);
88
+ } catch (err) {
89
+ error(`feishu[${accountId}]: error handling bot added event: ${String(err)}`);
90
+ }
91
+ },
92
+ "im.chat.member.bot.deleted_v1": async (data) => {
93
+ try {
94
+ const event = data as unknown as { chat_id: string };
95
+ log(`feishu[${accountId}]: bot removed from chat ${event.chat_id}`);
96
+ } catch (err) {
97
+ error(`feishu[${accountId}]: error handling bot removed event: ${String(err)}`);
98
+ }
99
+ },
100
+ });
101
+
102
+ return new Promise((resolve, reject) => {
103
+ const cleanup = () => {
104
+ wsClients.delete(accountId);
105
+ botOpenIds.delete(accountId);
106
+ };
107
+
108
+ const handleAbort = () => {
109
+ log(`feishu[${accountId}]: abort signal received, stopping`);
110
+ cleanup();
111
+ resolve();
112
+ };
113
+
114
+ if (abortSignal?.aborted) {
115
+ cleanup();
116
+ resolve();
117
+ return;
118
+ }
119
+
120
+ abortSignal?.addEventListener("abort", handleAbort, { once: true });
121
+
122
+ try {
123
+ wsClient.start({ eventDispatcher });
124
+ log(`feishu[${accountId}]: WebSocket client started`);
125
+ } catch (err) {
126
+ cleanup();
127
+ abortSignal?.removeEventListener("abort", handleAbort);
128
+ reject(err);
129
+ }
130
+ });
131
+ }
132
+
133
+ /**
134
+ * Main entry: start monitoring for all enabled accounts.
135
+ */
136
+ export async function monitorFeishuProvider(opts: MonitorFeishuOpts = {}): Promise<void> {
137
+ const cfg = opts.config;
138
+ if (!cfg) {
139
+ throw new Error("Config is required for Feishu monitor");
140
+ }
141
+
142
+ const log = opts.runtime?.log ?? console.log;
143
+
144
+ // If accountId is specified, only monitor that account
145
+ if (opts.accountId) {
146
+ const account = resolveFeishuAccount({ cfg, accountId: opts.accountId });
147
+ if (!account.enabled || !account.configured) {
148
+ throw new Error(`Feishu account "${opts.accountId}" not configured or disabled`);
149
+ }
150
+ return monitorSingleAccount({
151
+ cfg,
152
+ account,
153
+ runtime: opts.runtime,
154
+ abortSignal: opts.abortSignal,
155
+ });
156
+ }
157
+
158
+ // Otherwise, start all enabled accounts
159
+ const accounts = listEnabledFeishuAccounts(cfg);
160
+ if (accounts.length === 0) {
161
+ throw new Error("No enabled Feishu accounts configured");
162
+ }
163
+
164
+ log(`feishu: starting ${accounts.length} account(s): ${accounts.map((a) => a.accountId).join(", ")}`);
165
+
166
+ // Start all accounts in parallel
167
+ await Promise.all(
168
+ accounts.map((account) =>
169
+ monitorSingleAccount({
170
+ cfg,
171
+ account,
172
+ runtime: opts.runtime,
173
+ abortSignal: opts.abortSignal,
174
+ }),
175
+ ),
176
+ );
177
+ }
178
+
179
+ /**
180
+ * Stop monitoring for a specific account or all accounts.
181
+ */
182
+ export function stopFeishuMonitor(accountId?: string): void {
183
+ if (accountId) {
184
+ wsClients.delete(accountId);
185
+ botOpenIds.delete(accountId);
186
+ } else {
187
+ wsClients.clear();
188
+ botOpenIds.clear();
189
+ }
190
+ }
@@ -0,0 +1,358 @@
1
+ import type {
2
+ ChannelOnboardingAdapter,
3
+ ChannelOnboardingDmPolicy,
4
+ ClawdbotConfig,
5
+ DmPolicy,
6
+ WizardPrompter,
7
+ } from "openclaw/plugin-sdk";
8
+ import { addWildcardAllowFrom, DEFAULT_ACCOUNT_ID, formatDocsLink } from "openclaw/plugin-sdk";
9
+
10
+ import { resolveFeishuCredentials } from "./accounts.js";
11
+ import { probeFeishu } from "./probe.js";
12
+ import type { FeishuConfig } from "./types.js";
13
+
14
+ const channel = "feishu" as const;
15
+
16
+ function setFeishuDmPolicy(cfg: ClawdbotConfig, dmPolicy: DmPolicy): ClawdbotConfig {
17
+ const allowFrom =
18
+ dmPolicy === "open"
19
+ ? addWildcardAllowFrom(cfg.channels?.feishu?.allowFrom)?.map((entry) => String(entry))
20
+ : undefined;
21
+ return {
22
+ ...cfg,
23
+ channels: {
24
+ ...cfg.channels,
25
+ feishu: {
26
+ ...cfg.channels?.feishu,
27
+ dmPolicy,
28
+ ...(allowFrom ? { allowFrom } : {}),
29
+ },
30
+ },
31
+ };
32
+ }
33
+
34
+ function setFeishuAllowFrom(cfg: ClawdbotConfig, allowFrom: string[]): ClawdbotConfig {
35
+ return {
36
+ ...cfg,
37
+ channels: {
38
+ ...cfg.channels,
39
+ feishu: {
40
+ ...cfg.channels?.feishu,
41
+ allowFrom,
42
+ },
43
+ },
44
+ };
45
+ }
46
+
47
+ function parseAllowFromInput(raw: string): string[] {
48
+ return raw
49
+ .split(/[\n,;]+/g)
50
+ .map((entry) => entry.trim())
51
+ .filter(Boolean);
52
+ }
53
+
54
+ async function promptFeishuAllowFrom(params: {
55
+ cfg: ClawdbotConfig;
56
+ prompter: WizardPrompter;
57
+ }): Promise<ClawdbotConfig> {
58
+ const existing = params.cfg.channels?.feishu?.allowFrom ?? [];
59
+ await params.prompter.note(
60
+ [
61
+ "Allowlist Feishu DMs by open_id or user_id.",
62
+ "You can find user open_id in Feishu admin console or via API.",
63
+ "Examples:",
64
+ "- ou_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
65
+ "- on_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
66
+ ].join("\n"),
67
+ "Feishu allowlist",
68
+ );
69
+
70
+ while (true) {
71
+ const entry = await params.prompter.text({
72
+ message: "Feishu allowFrom (user open_ids)",
73
+ placeholder: "ou_xxxxx, ou_yyyyy",
74
+ initialValue: existing[0] ? String(existing[0]) : undefined,
75
+ validate: (value) => (String(value ?? "").trim() ? undefined : "Required"),
76
+ });
77
+ const parts = parseAllowFromInput(String(entry));
78
+ if (parts.length === 0) {
79
+ await params.prompter.note("Enter at least one user.", "Feishu allowlist");
80
+ continue;
81
+ }
82
+
83
+ const unique = [
84
+ ...new Set([...existing.map((v) => String(v).trim()).filter(Boolean), ...parts]),
85
+ ];
86
+ return setFeishuAllowFrom(params.cfg, unique);
87
+ }
88
+ }
89
+
90
+ async function noteFeishuCredentialHelp(prompter: WizardPrompter): Promise<void> {
91
+ await prompter.note(
92
+ [
93
+ "1) Go to Feishu Open Platform (open.feishu.cn)",
94
+ "2) Create a self-built app",
95
+ "3) Get App ID and App Secret from Credentials page",
96
+ "4) Enable required permissions: im:message, im:chat, contact:user.base:readonly",
97
+ "5) Publish the app or add it to a test group",
98
+ "Tip: you can also set FEISHU_APP_ID / FEISHU_APP_SECRET env vars.",
99
+ `Docs: ${formatDocsLink("/channels/feishu", "feishu")}`,
100
+ ].join("\n"),
101
+ "Feishu credentials",
102
+ );
103
+ }
104
+
105
+ function setFeishuGroupPolicy(
106
+ cfg: ClawdbotConfig,
107
+ groupPolicy: "open" | "allowlist" | "disabled",
108
+ ): ClawdbotConfig {
109
+ return {
110
+ ...cfg,
111
+ channels: {
112
+ ...cfg.channels,
113
+ feishu: {
114
+ ...cfg.channels?.feishu,
115
+ enabled: true,
116
+ groupPolicy,
117
+ },
118
+ },
119
+ };
120
+ }
121
+
122
+ function setFeishuGroupAllowFrom(cfg: ClawdbotConfig, groupAllowFrom: string[]): ClawdbotConfig {
123
+ return {
124
+ ...cfg,
125
+ channels: {
126
+ ...cfg.channels,
127
+ feishu: {
128
+ ...cfg.channels?.feishu,
129
+ groupAllowFrom,
130
+ },
131
+ },
132
+ };
133
+ }
134
+
135
+ const dmPolicy: ChannelOnboardingDmPolicy = {
136
+ label: "Feishu",
137
+ channel,
138
+ policyKey: "channels.feishu.dmPolicy",
139
+ allowFromKey: "channels.feishu.allowFrom",
140
+ getCurrent: (cfg) => (cfg.channels?.feishu as FeishuConfig | undefined)?.dmPolicy ?? "pairing",
141
+ setPolicy: (cfg, policy) => setFeishuDmPolicy(cfg, policy),
142
+ promptAllowFrom: promptFeishuAllowFrom,
143
+ };
144
+
145
+ export const feishuOnboardingAdapter: ChannelOnboardingAdapter = {
146
+ channel,
147
+ getStatus: async ({ cfg }) => {
148
+ const feishuCfg = cfg.channels?.feishu as FeishuConfig | undefined;
149
+ const configured = Boolean(resolveFeishuCredentials(feishuCfg));
150
+
151
+ // Try to probe if configured
152
+ let probeResult = null;
153
+ if (configured && feishuCfg) {
154
+ try {
155
+ probeResult = await probeFeishu(feishuCfg);
156
+ } catch {
157
+ // Ignore probe errors
158
+ }
159
+ }
160
+
161
+ const statusLines: string[] = [];
162
+ if (!configured) {
163
+ statusLines.push("Feishu: needs app credentials");
164
+ } else if (probeResult?.ok) {
165
+ statusLines.push(`Feishu: connected as ${probeResult.botName ?? probeResult.botOpenId ?? "bot"}`);
166
+ } else {
167
+ statusLines.push("Feishu: configured (connection not verified)");
168
+ }
169
+
170
+ return {
171
+ channel,
172
+ configured,
173
+ statusLines,
174
+ selectionHint: configured ? "configured" : "needs app creds",
175
+ quickstartScore: configured ? 2 : 0,
176
+ };
177
+ },
178
+
179
+ configure: async ({ cfg, prompter }) => {
180
+ const feishuCfg = cfg.channels?.feishu as FeishuConfig | undefined;
181
+ const resolved = resolveFeishuCredentials(feishuCfg);
182
+ const hasConfigCreds = Boolean(feishuCfg?.appId?.trim() && feishuCfg?.appSecret?.trim());
183
+ const canUseEnv = Boolean(
184
+ !hasConfigCreds &&
185
+ process.env.FEISHU_APP_ID?.trim() &&
186
+ process.env.FEISHU_APP_SECRET?.trim(),
187
+ );
188
+
189
+ let next = cfg;
190
+ let appId: string | null = null;
191
+ let appSecret: string | null = null;
192
+
193
+ if (!resolved) {
194
+ await noteFeishuCredentialHelp(prompter);
195
+ }
196
+
197
+ if (canUseEnv) {
198
+ const keepEnv = await prompter.confirm({
199
+ message: "FEISHU_APP_ID + FEISHU_APP_SECRET detected. Use env vars?",
200
+ initialValue: true,
201
+ });
202
+ if (keepEnv) {
203
+ next = {
204
+ ...next,
205
+ channels: {
206
+ ...next.channels,
207
+ feishu: { ...next.channels?.feishu, enabled: true },
208
+ },
209
+ };
210
+ } else {
211
+ appId = String(
212
+ await prompter.text({
213
+ message: "Enter Feishu App ID",
214
+ validate: (value) => (value?.trim() ? undefined : "Required"),
215
+ }),
216
+ ).trim();
217
+ appSecret = String(
218
+ await prompter.text({
219
+ message: "Enter Feishu App Secret",
220
+ validate: (value) => (value?.trim() ? undefined : "Required"),
221
+ }),
222
+ ).trim();
223
+ }
224
+ } else if (hasConfigCreds) {
225
+ const keep = await prompter.confirm({
226
+ message: "Feishu credentials already configured. Keep them?",
227
+ initialValue: true,
228
+ });
229
+ if (!keep) {
230
+ appId = String(
231
+ await prompter.text({
232
+ message: "Enter Feishu App ID",
233
+ validate: (value) => (value?.trim() ? undefined : "Required"),
234
+ }),
235
+ ).trim();
236
+ appSecret = String(
237
+ await prompter.text({
238
+ message: "Enter Feishu App Secret",
239
+ validate: (value) => (value?.trim() ? undefined : "Required"),
240
+ }),
241
+ ).trim();
242
+ }
243
+ } else {
244
+ appId = String(
245
+ await prompter.text({
246
+ message: "Enter Feishu App ID",
247
+ validate: (value) => (value?.trim() ? undefined : "Required"),
248
+ }),
249
+ ).trim();
250
+ appSecret = String(
251
+ await prompter.text({
252
+ message: "Enter Feishu App Secret",
253
+ validate: (value) => (value?.trim() ? undefined : "Required"),
254
+ }),
255
+ ).trim();
256
+ }
257
+
258
+ if (appId && appSecret) {
259
+ next = {
260
+ ...next,
261
+ channels: {
262
+ ...next.channels,
263
+ feishu: {
264
+ ...next.channels?.feishu,
265
+ enabled: true,
266
+ appId,
267
+ appSecret,
268
+ },
269
+ },
270
+ };
271
+
272
+ // Test connection
273
+ const testCfg = next.channels?.feishu as FeishuConfig;
274
+ try {
275
+ const probe = await probeFeishu(testCfg);
276
+ if (probe.ok) {
277
+ await prompter.note(
278
+ `Connected as ${probe.botName ?? probe.botOpenId ?? "bot"}`,
279
+ "Feishu connection test",
280
+ );
281
+ } else {
282
+ await prompter.note(
283
+ `Connection failed: ${probe.error ?? "unknown error"}`,
284
+ "Feishu connection test",
285
+ );
286
+ }
287
+ } catch (err) {
288
+ await prompter.note(`Connection test failed: ${String(err)}`, "Feishu connection test");
289
+ }
290
+ }
291
+
292
+ // Domain selection
293
+ const currentDomain = (next.channels?.feishu as FeishuConfig | undefined)?.domain ?? "feishu";
294
+ const domain = await prompter.select({
295
+ message: "Which Feishu domain?",
296
+ options: [
297
+ { value: "feishu", label: "Feishu (feishu.cn) - China" },
298
+ { value: "lark", label: "Lark (larksuite.com) - International" },
299
+ ],
300
+ initialValue: currentDomain,
301
+ });
302
+ if (domain) {
303
+ next = {
304
+ ...next,
305
+ channels: {
306
+ ...next.channels,
307
+ feishu: {
308
+ ...next.channels?.feishu,
309
+ domain: domain as "feishu" | "lark",
310
+ },
311
+ },
312
+ };
313
+ }
314
+
315
+ // Group policy
316
+ const groupPolicy = await prompter.select({
317
+ message: "Group chat policy",
318
+ options: [
319
+ { value: "allowlist", label: "Allowlist - only respond in specific groups" },
320
+ { value: "open", label: "Open - respond in all groups (requires mention)" },
321
+ { value: "disabled", label: "Disabled - don't respond in groups" },
322
+ ],
323
+ initialValue:
324
+ (next.channels?.feishu as FeishuConfig | undefined)?.groupPolicy ?? "allowlist",
325
+ });
326
+ if (groupPolicy) {
327
+ next = setFeishuGroupPolicy(next, groupPolicy as "open" | "allowlist" | "disabled");
328
+ }
329
+
330
+ // Group allowlist if needed
331
+ if (groupPolicy === "allowlist") {
332
+ const existing = (next.channels?.feishu as FeishuConfig | undefined)?.groupAllowFrom ?? [];
333
+ const entry = await prompter.text({
334
+ message: "Group chat allowlist (chat_ids)",
335
+ placeholder: "oc_xxxxx, oc_yyyyy",
336
+ initialValue: existing.length > 0 ? existing.map(String).join(", ") : undefined,
337
+ });
338
+ if (entry) {
339
+ const parts = parseAllowFromInput(String(entry));
340
+ if (parts.length > 0) {
341
+ next = setFeishuGroupAllowFrom(next, parts);
342
+ }
343
+ }
344
+ }
345
+
346
+ return { cfg: next, accountId: DEFAULT_ACCOUNT_ID };
347
+ },
348
+
349
+ dmPolicy,
350
+
351
+ disable: (cfg) => ({
352
+ ...cfg,
353
+ channels: {
354
+ ...cfg.channels,
355
+ feishu: { ...cfg.channels?.feishu, enabled: false },
356
+ },
357
+ }),
358
+ };
@@ -0,0 +1,40 @@
1
+ import type { ChannelOutboundAdapter } from "openclaw/plugin-sdk";
2
+ import { getFeishuRuntime } from "./runtime.js";
3
+ import { sendMessageFeishu } from "./send.js";
4
+ import { sendMediaFeishu } from "./media.js";
5
+
6
+ export const feishuOutbound: ChannelOutboundAdapter = {
7
+ deliveryMode: "direct",
8
+ chunker: (text, limit) => getFeishuRuntime().channel.text.chunkMarkdownText(text, limit),
9
+ chunkerMode: "markdown",
10
+ textChunkLimit: 4000,
11
+ sendText: async ({ cfg, to, text, accountId }) => {
12
+ const result = await sendMessageFeishu({ cfg, to, text, accountId });
13
+ return { channel: "feishu", ...result };
14
+ },
15
+ sendMedia: async ({ cfg, to, text, mediaUrl, accountId }) => {
16
+ // Send text first if provided
17
+ if (text?.trim()) {
18
+ await sendMessageFeishu({ cfg, to, text, accountId });
19
+ }
20
+
21
+ // Upload and send media if URL provided
22
+ if (mediaUrl) {
23
+ try {
24
+ const result = await sendMediaFeishu({ cfg, to, mediaUrl, accountId });
25
+ return { channel: "feishu", ...result };
26
+ } catch (err) {
27
+ // Log the error for debugging
28
+ console.error(`[feishu] sendMediaFeishu failed:`, err);
29
+ // Fallback to URL link if upload fails
30
+ const fallbackText = `📎 ${mediaUrl}`;
31
+ const result = await sendMessageFeishu({ cfg, to, text: fallbackText, accountId });
32
+ return { channel: "feishu", ...result };
33
+ }
34
+ }
35
+
36
+ // No media URL, just return text result
37
+ const result = await sendMessageFeishu({ cfg, to, text: text ?? "", accountId });
38
+ return { channel: "feishu", ...result };
39
+ },
40
+ };
@@ -0,0 +1,52 @@
1
+ import { Type, type Static } from "@sinclair/typebox";
2
+
3
+ const TokenType = Type.Union([
4
+ Type.Literal("doc"),
5
+ Type.Literal("docx"),
6
+ Type.Literal("sheet"),
7
+ Type.Literal("bitable"),
8
+ Type.Literal("folder"),
9
+ Type.Literal("file"),
10
+ Type.Literal("wiki"),
11
+ Type.Literal("mindnote"),
12
+ ]);
13
+
14
+ const MemberType = Type.Union([
15
+ Type.Literal("email"),
16
+ Type.Literal("openid"),
17
+ Type.Literal("userid"),
18
+ Type.Literal("unionid"),
19
+ Type.Literal("openchat"),
20
+ Type.Literal("opendepartmentid"),
21
+ ]);
22
+
23
+ const Permission = Type.Union([
24
+ Type.Literal("view"),
25
+ Type.Literal("edit"),
26
+ Type.Literal("full_access"),
27
+ ]);
28
+
29
+ export const FeishuPermSchema = Type.Union([
30
+ Type.Object({
31
+ action: Type.Literal("list"),
32
+ token: Type.String({ description: "File token" }),
33
+ type: TokenType,
34
+ }),
35
+ Type.Object({
36
+ action: Type.Literal("add"),
37
+ token: Type.String({ description: "File token" }),
38
+ type: TokenType,
39
+ member_type: MemberType,
40
+ member_id: Type.String({ description: "Member ID (email, open_id, user_id, etc.)" }),
41
+ perm: Permission,
42
+ }),
43
+ Type.Object({
44
+ action: Type.Literal("remove"),
45
+ token: Type.String({ description: "File token" }),
46
+ type: TokenType,
47
+ member_type: MemberType,
48
+ member_id: Type.String({ description: "Member ID to remove" }),
49
+ }),
50
+ ]);
51
+
52
+ export type FeishuPermParams = Static<typeof FeishuPermSchema>;