feat(lark-msg-tool): 更新对飞书消息相关类型的引用位置
All checks were successful
Egg Server MIflow / build-image (push) Successful in 58s

This commit is contained in:
zhaoyingbo 2024-08-21 01:27:15 +00:00
parent a957de0192
commit c10e79db84
6 changed files with 6 additions and 226 deletions

View File

@ -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卡片

View File

@ -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或者群聊并且艾特了小煎蛋

View File

@ -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状态

View File

@ -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 }

View File

@ -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
}
}
}

View File

@ -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 textpostimagefileaudiomediastickerinteractiveshare_chatshare_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
}
}