feat(lark-msg-tool): 更新对飞书消息相关类型的引用位置
All checks were successful
Egg Server MIflow / build-image (push) Successful in 58s
All checks were successful
Egg Server MIflow / build-image (push) Successful in 58s
This commit is contained in:
parent
a957de0192
commit
c10e79db84
@ -1,7 +1,8 @@
|
||||
import type { LarkAction } from "@egg/lark-msg-tool"
|
||||
import { getActionType, getIsActionMsg } from "@egg/lark-msg-tool"
|
||||
import { sleep } from "bun"
|
||||
|
||||
import { Context, LarkAction } from "../../types"
|
||||
import { Context } from "../../types"
|
||||
|
||||
/**
|
||||
* 返回ChatId卡片
|
||||
|
@ -1,3 +1,4 @@
|
||||
import type { LarkEvent } from "@egg/lark-msg-tool"
|
||||
import {
|
||||
getChatId,
|
||||
getChatType,
|
||||
@ -8,7 +9,7 @@ import {
|
||||
} from "@egg/lark-msg-tool"
|
||||
|
||||
import { LarkService } from "../../services"
|
||||
import { Context, LarkEvent } from "../../types"
|
||||
import { Context } from "../../types"
|
||||
|
||||
/**
|
||||
* 是否为P2P或者群聊并且艾特了小煎蛋
|
||||
|
@ -1,7 +1,6 @@
|
||||
import type { LarkEvent } from "@egg/lark-msg-tool"
|
||||
import { NetToolBase } from "@egg/net-tool"
|
||||
|
||||
import { LarkEvent } from "../../types"
|
||||
|
||||
class AttachService extends NetToolBase {
|
||||
/**
|
||||
* 监控CI状态
|
||||
|
@ -1,8 +1,6 @@
|
||||
import type { Context } from "./context"
|
||||
import type { DB } from "./db"
|
||||
import type { LarkAction } from "./larkAction"
|
||||
import type { LarkEvent } from "./larkEvent"
|
||||
import type { LarkServer } from "./larkServer"
|
||||
import type { MsgProxy } from "./msgProxy"
|
||||
|
||||
export { Context, DB, LarkAction, LarkEvent, LarkServer, MsgProxy }
|
||||
export { Context, DB, LarkServer, MsgProxy }
|
||||
|
@ -1,56 +0,0 @@
|
||||
export namespace LarkAction {
|
||||
export interface Data {
|
||||
/**
|
||||
* open_id
|
||||
*/
|
||||
open_id: string
|
||||
/**
|
||||
* 用户名
|
||||
* @example zhaoyingbo
|
||||
*/
|
||||
user_id: string
|
||||
/**
|
||||
* 当前消息的ID
|
||||
* @example om_038fc0eceed6224a1abc1cdaa4266405
|
||||
*/
|
||||
open_message_id: string
|
||||
/**
|
||||
* 对话流ID
|
||||
* @example oc_433b1cb7a9dbb7ebe70a4e1a59cb8bb1
|
||||
*/
|
||||
open_chat_id: string
|
||||
/**
|
||||
* 应用ID
|
||||
* @example 2ee61fe50f4f1657
|
||||
*/
|
||||
tenant_key: string
|
||||
/**
|
||||
* token
|
||||
* @example tV9djUKSjzVnekV7xTg2Od06NFTcsBnj
|
||||
*/
|
||||
token: string
|
||||
/**
|
||||
* 事件结果
|
||||
*/
|
||||
action: {
|
||||
/**
|
||||
* 传的参数
|
||||
*/
|
||||
value: any
|
||||
/**
|
||||
* 标签名
|
||||
* @example picker_datetime
|
||||
*/
|
||||
tag: string
|
||||
/**
|
||||
* 选择的事件
|
||||
* @example 2023-09-03 10:35 +0800
|
||||
*/
|
||||
option: string
|
||||
/**
|
||||
* 时区
|
||||
*/
|
||||
timezone: string
|
||||
}
|
||||
}
|
||||
}
|
@ -1,163 +0,0 @@
|
||||
export namespace LarkEvent {
|
||||
/**
|
||||
* 消息事件头
|
||||
*/
|
||||
export interface Header {
|
||||
/**
|
||||
* 事件ID
|
||||
* @example 0f8ab23b60993cf8dd15c8cde4d7b0f5
|
||||
*/
|
||||
event_id: string
|
||||
/**
|
||||
* token
|
||||
* @example tV9djUKSjzVnekV7xTg2Od06NFTcsBnj
|
||||
*/
|
||||
token: string
|
||||
/**
|
||||
* 创建时间戳
|
||||
* @example 1693565712117
|
||||
*/
|
||||
create_time: string
|
||||
/**
|
||||
* 事件类型
|
||||
* @example im.message.receive_v1
|
||||
*/
|
||||
event_type: string
|
||||
/**
|
||||
* tenant_key
|
||||
* @example 2ee61fe50f4f1657
|
||||
*/
|
||||
tenant_key: string
|
||||
/**
|
||||
* app_id
|
||||
* @example cli_a1eff35b43b89063
|
||||
*/
|
||||
app_id: string
|
||||
}
|
||||
/**
|
||||
* 被AT的人的信息
|
||||
*/
|
||||
export interface Mention {
|
||||
/**
|
||||
* 被艾特的人的ID信息
|
||||
*/
|
||||
id: UserIdInfo
|
||||
/**
|
||||
* 对应到文本内的内容
|
||||
* @example "@_user_1"
|
||||
*/
|
||||
key: string
|
||||
/**
|
||||
* 用户名
|
||||
* @example 小煎蛋
|
||||
*/
|
||||
name: string
|
||||
/**
|
||||
* 应用ID
|
||||
* @example 2ee61fe50f4f1657
|
||||
*/
|
||||
tenant_key: string
|
||||
}
|
||||
/**
|
||||
* 消息内容信息
|
||||
*/
|
||||
export interface Message {
|
||||
/**
|
||||
* 对话流ID
|
||||
* @example oc_433b1cb7a9dbb7ebe70a4e1a59cb8bb1
|
||||
*/
|
||||
chat_id: string
|
||||
/**
|
||||
* 消息类型
|
||||
* @example group | p2p
|
||||
*/
|
||||
chat_type: "group" | "p2p"
|
||||
/**
|
||||
* JSON字符串文本内容
|
||||
* @example "{\"text\":\"@_user_1 测试\"}"
|
||||
*/
|
||||
content: string
|
||||
/**
|
||||
* 消息发送时间戳
|
||||
* @example 1693565711996
|
||||
*/
|
||||
create_time: string
|
||||
/**
|
||||
* 被艾特的人信息
|
||||
*/
|
||||
mentions?: Mention[]
|
||||
/**
|
||||
* 当前消息的ID
|
||||
* @example om_038fc0eceed6224a1abc1cdaa4266405
|
||||
*/
|
||||
message_id: string
|
||||
/**
|
||||
* 消息类型
|
||||
* @example text、post、image、file、audio、media、sticker、interactive、share_chat、share_user
|
||||
*/
|
||||
message_type: string
|
||||
}
|
||||
|
||||
/**
|
||||
* 用户ID信息
|
||||
*/
|
||||
export interface UserIdInfo {
|
||||
/**
|
||||
* 用户标记
|
||||
* @example ou_032f507d08f9a7f28b042fcd086daef5
|
||||
*/
|
||||
open_id: string
|
||||
/**
|
||||
* 用户标记
|
||||
* @example on_7111660fddd8302ce47bf1999147c011
|
||||
*/
|
||||
union_id: string
|
||||
/**
|
||||
* 用户名
|
||||
* @example zhaoyingbo
|
||||
*/
|
||||
user_id: string
|
||||
}
|
||||
/**
|
||||
* 消息发送者信息
|
||||
*/
|
||||
export interface Sender {
|
||||
/**
|
||||
* id 相关信息
|
||||
*/
|
||||
sender_id: UserIdInfo
|
||||
/**
|
||||
* 发送者类型
|
||||
* @example user
|
||||
*/
|
||||
sender_type: string
|
||||
/**
|
||||
* 应用ID
|
||||
* @example 2ee61fe50f4f1657
|
||||
*/
|
||||
tenant_key: string
|
||||
}
|
||||
/**
|
||||
* 事件详情
|
||||
*/
|
||||
export interface Event {
|
||||
message: Message
|
||||
sender: Sender
|
||||
}
|
||||
|
||||
export interface Data {
|
||||
/**
|
||||
* 协议版本
|
||||
* @example 2.0
|
||||
*/
|
||||
schema: string
|
||||
/**
|
||||
* 事件头
|
||||
*/
|
||||
header: Header
|
||||
/**
|
||||
* 事件详情
|
||||
*/
|
||||
event: Event
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user