109 lines
1.6 KiB
TypeScript
109 lines
1.6 KiB
TypeScript
export namespace LarkServer {
|
|
export interface UserSession {
|
|
/**
|
|
* 访问令牌
|
|
*/
|
|
access_token: string
|
|
|
|
/**
|
|
* 员工ID
|
|
*/
|
|
employee_id: string
|
|
|
|
/**
|
|
* 令牌过期时间
|
|
*/
|
|
expires_in: number
|
|
|
|
/**
|
|
* 开放ID
|
|
*/
|
|
open_id: string
|
|
|
|
/**
|
|
* 刷新令牌
|
|
*/
|
|
refresh_token: string
|
|
|
|
/**
|
|
* 会话密钥
|
|
*/
|
|
session_key: string
|
|
|
|
/**
|
|
* 租户密钥
|
|
*/
|
|
tenant_key: string
|
|
|
|
/**
|
|
* 联盟ID
|
|
*/
|
|
union_id: string
|
|
}
|
|
|
|
export interface SuccessDocMeta {
|
|
doc_token: string
|
|
doc_type: string
|
|
title: string
|
|
owner_id: string
|
|
create_time: string
|
|
latest_modify_user: string
|
|
latest_modify_time: string
|
|
url: string
|
|
sec_label_name: string
|
|
}
|
|
|
|
export interface FailedDocMeta {
|
|
token: string
|
|
code: number
|
|
}
|
|
|
|
export interface BaseRes {
|
|
code: number
|
|
data: any
|
|
msg: string
|
|
}
|
|
|
|
export interface UserSessionRes extends BaseRes {
|
|
data: UserSession
|
|
}
|
|
|
|
export interface UserInfoRes extends BaseRes {
|
|
data: {
|
|
user: any
|
|
}
|
|
}
|
|
|
|
export interface BatchUserInfoRes extends BaseRes {
|
|
data: {
|
|
items: any[]
|
|
}
|
|
}
|
|
|
|
export interface BatchDocMetaRes extends BaseRes {
|
|
data: {
|
|
metas: SuccessDocMeta[]
|
|
failed_list: FailedDocMeta[]
|
|
}
|
|
}
|
|
|
|
export type ReceiveIDType =
|
|
| "open_id"
|
|
| "user_id"
|
|
| "union_id"
|
|
| "email"
|
|
| "chat_id"
|
|
|
|
export type MsgType =
|
|
| "text"
|
|
| "post"
|
|
| "image"
|
|
| "file"
|
|
| "audio"
|
|
| "media"
|
|
| "sticker"
|
|
| "interactive"
|
|
| "share_chat"
|
|
| "share_user"
|
|
}
|