@satorijs/adapter-lark 3.8.5 → 3.9.0
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/lib/bot.d.ts +1 -1
- package/lib/content.d.ts +433 -0
- package/lib/http.d.ts +1 -1
- package/lib/index.cjs +2796 -1713
- package/lib/index.cjs.map +6 -0
- package/lib/index.d.ts +4 -2
- package/lib/internal.d.ts +38 -0
- package/lib/message.d.ts +2 -0
- package/lib/types/acs.d.ts +177 -0
- package/lib/types/admin.d.ts +270 -0
- package/lib/types/aily.d.ts +221 -0
- package/lib/types/apaas.d.ts +499 -0
- package/lib/types/application.d.ts +406 -0
- package/lib/types/approval.d.ts +779 -0
- package/lib/types/attendance.d.ts +957 -0
- package/lib/types/auth.d.ts +86 -0
- package/lib/types/authen.d.ts +191 -0
- package/lib/types/baike.d.ts +239 -0
- package/lib/types/bitable.d.ts +691 -0
- package/lib/types/board.d.ts +19 -0
- package/lib/types/calendar.d.ts +653 -0
- package/lib/types/cardkit.d.ts +139 -0
- package/lib/types/compensation.d.ts +54 -0
- package/lib/types/contact.d.ts +1137 -0
- package/lib/types/corehr.d.ts +4383 -0
- package/lib/types/docs.d.ts +23 -0
- package/lib/types/document_ai.d.ts +257 -0
- package/lib/types/docx.d.ts +380 -0
- package/lib/types/drive.d.ts +1045 -0
- package/lib/types/ehr.d.ts +32 -0
- package/lib/types/event.d.ts +9 -18
- package/lib/types/guild.d.ts +59 -0
- package/lib/types/helpdesk.d.ts +738 -0
- package/lib/types/hire.d.ts +3150 -0
- package/lib/types/human_authentication.d.ts +27 -0
- package/lib/types/im.d.ts +1300 -0
- package/lib/types/index.d.ts +16432 -34
- package/lib/types/lingo.d.ts +254 -0
- package/lib/types/mail.d.ts +680 -0
- package/lib/types/mdm.d.ts +42 -0
- package/lib/types/message/asset.d.ts +40 -0
- package/lib/types/minutes.d.ts +31 -0
- package/lib/types/moments.d.ts +18 -0
- package/lib/types/okr.d.ts +205 -0
- package/lib/types/optical_char_recognition.d.ts +17 -0
- package/lib/types/passport.d.ts +45 -0
- package/lib/types/payroll.d.ts +50 -0
- package/lib/types/performance.d.ts +413 -0
- package/lib/types/personal_settings.d.ts +87 -0
- package/lib/types/report.d.ts +57 -0
- package/lib/types/search.d.ts +216 -0
- package/lib/types/security_and_compliance.d.ts +24 -0
- package/lib/types/sheets.d.ts +326 -0
- package/lib/types/speech_to_text.d.ts +39 -0
- package/lib/types/task.d.ts +1153 -0
- package/lib/types/tenant.d.ts +23 -0
- package/lib/types/translation.d.ts +37 -0
- package/lib/types/user.d.ts +78 -0
- package/lib/types/utils.d.ts +9 -0
- package/lib/types/vc.d.ts +948 -0
- package/lib/types/verification.d.ts +14 -0
- package/lib/types/wiki.d.ts +240 -0
- package/lib/types/workplace.d.ts +43 -0
- package/lib/utils.d.ts +143 -7
- package/package.json +6 -4
- package/src/bot.ts +19 -3
- package/src/{types/message/content.ts → content.ts} +1 -0
- package/src/http.ts +1 -3
- package/src/index.ts +4 -2
- package/src/internal.ts +144 -0
- package/src/message.ts +24 -11
- package/src/types/acs.ts +236 -0
- package/src/types/admin.ts +328 -0
- package/src/types/aily.ts +288 -0
- package/src/types/apaas.ts +646 -0
- package/src/types/application.ts +520 -0
- package/src/types/approval.ts +924 -0
- package/src/types/attendance.ts +1153 -0
- package/src/types/auth.ts +114 -0
- package/src/types/authen.ts +220 -0
- package/src/types/baike.ts +306 -0
- package/src/types/bitable.ts +879 -0
- package/src/types/board.ts +31 -0
- package/src/types/calendar.ts +817 -0
- package/src/types/cardkit.ts +182 -0
- package/src/types/compensation.ts +79 -0
- package/src/types/contact.ts +1411 -0
- package/src/types/corehr.ts +5288 -0
- package/src/types/docs.ts +33 -0
- package/src/types/document_ai.ts +352 -0
- package/src/types/docx.ts +471 -0
- package/src/types/drive.ts +1312 -0
- package/src/types/ehr.ts +43 -0
- package/src/types/event.ts +15 -21
- package/src/types/helpdesk.ts +916 -0
- package/src/types/hire.ts +3918 -0
- package/src/types/human_authentication.ts +38 -0
- package/src/types/im.ts +1605 -0
- package/src/types/index.ts +17754 -39
- package/src/types/lingo.ts +321 -0
- package/src/types/mail.ts +851 -0
- package/src/types/mdm.ts +57 -0
- package/src/types/minutes.ts +46 -0
- package/src/types/moments.ts +28 -0
- package/src/types/okr.ts +261 -0
- package/src/types/optical_char_recognition.ts +27 -0
- package/src/types/passport.ts +61 -0
- package/src/types/payroll.ts +69 -0
- package/src/types/performance.ts +524 -0
- package/src/types/personal_settings.ts +116 -0
- package/src/types/report.ts +77 -0
- package/src/types/search.ts +268 -0
- package/src/types/security_and_compliance.ts +33 -0
- package/src/types/sheets.ts +425 -0
- package/src/types/speech_to_text.ts +54 -0
- package/src/types/task.ts +1464 -0
- package/src/types/tenant.ts +36 -0
- package/src/types/translation.ts +52 -0
- package/src/types/vc.ts +1197 -0
- package/src/types/verification.ts +23 -0
- package/src/types/wiki.ts +313 -0
- package/src/types/workplace.ts +59 -0
- package/src/utils.ts +160 -8
- package/src/types/api.ts +0 -30835
- package/src/types/internal.ts +0 -84
- package/src/types/message/index.ts +0 -97
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { BaseResponse } from '../internal';
|
|
2
|
+
declare module '../internal' {
|
|
3
|
+
interface Internal {
|
|
4
|
+
/**
|
|
5
|
+
* 自建应用获取 tenant_access_token
|
|
6
|
+
* @see https://open.feishu.cn/document/ukTMukTMukTM/ukDNz4SO0MjL5QzM/auth-v3/auth/tenant_access_token_internal
|
|
7
|
+
*/
|
|
8
|
+
tenantAccessTokenInternalAuth(body: TenantAccessTokenInternalAuthRequest): Promise<TenantAccessTokenInternalAuthResponse>;
|
|
9
|
+
/**
|
|
10
|
+
* 自建应用获取 app_access_token
|
|
11
|
+
* @see https://open.feishu.cn/document/ukTMukTMukTM/ukDNz4SO0MjL5QzM/auth-v3/auth/app_access_token_internal
|
|
12
|
+
*/
|
|
13
|
+
appAccessTokenInternalAuth(body: AppAccessTokenInternalAuthRequest): Promise<AppAccessTokenInternalAuthResponse>;
|
|
14
|
+
/**
|
|
15
|
+
* 重新获取 app_ticket
|
|
16
|
+
* @see https://open.feishu.cn/document/ukTMukTMukTM/ukDNz4SO0MjL5QzM/auth-v3/auth/app_ticket_resend
|
|
17
|
+
*/
|
|
18
|
+
appTicketResendAuth(body: AppTicketResendAuthRequest): Promise<void>;
|
|
19
|
+
/**
|
|
20
|
+
* 商店应用获取 app_access_token
|
|
21
|
+
* @see https://open.feishu.cn/document/ukTMukTMukTM/ukDNz4SO0MjL5QzM/auth-v3/auth/app_access_token
|
|
22
|
+
*/
|
|
23
|
+
appAccessTokenAuth(body: AppAccessTokenAuthRequest): Promise<AppAccessTokenAuthResponse>;
|
|
24
|
+
/**
|
|
25
|
+
* 商店应用获取 tenant_access_token
|
|
26
|
+
* @see https://open.feishu.cn/document/ukTMukTMukTM/ukDNz4SO0MjL5QzM/auth-v3/auth/tenant_access_token
|
|
27
|
+
*/
|
|
28
|
+
tenantAccessTokenAuth(body: TenantAccessTokenAuthRequest): Promise<TenantAccessTokenAuthResponse>;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
export interface TenantAccessTokenInternalAuthRequest {
|
|
32
|
+
/** 应用唯一标识,创建应用后获得 */
|
|
33
|
+
app_id: string;
|
|
34
|
+
/** 应用秘钥,创建应用后获得 */
|
|
35
|
+
app_secret: string;
|
|
36
|
+
}
|
|
37
|
+
export interface AppAccessTokenInternalAuthRequest {
|
|
38
|
+
/** 应用唯一标识,创建应用后获得 */
|
|
39
|
+
app_id: string;
|
|
40
|
+
/** 应用秘钥,创建应用后获得 */
|
|
41
|
+
app_secret: string;
|
|
42
|
+
}
|
|
43
|
+
export interface AppTicketResendAuthRequest {
|
|
44
|
+
/** 应用唯一标识,创建应用后获得 */
|
|
45
|
+
app_id: string;
|
|
46
|
+
/** 应用秘钥,创建应用后获得 */
|
|
47
|
+
app_secret: string;
|
|
48
|
+
}
|
|
49
|
+
export interface AppAccessTokenAuthRequest {
|
|
50
|
+
/** 应用唯一标识,创建应用后获得 */
|
|
51
|
+
app_id: string;
|
|
52
|
+
/** 应用秘钥,创建应用后获得 */
|
|
53
|
+
app_secret: string;
|
|
54
|
+
/** 平台定时推送给应用的临时凭证,通过事件监听机制获得 */
|
|
55
|
+
app_ticket: string;
|
|
56
|
+
}
|
|
57
|
+
export interface TenantAccessTokenAuthRequest {
|
|
58
|
+
/** 应用唯一标识,创建应用 */
|
|
59
|
+
app_access_token: string;
|
|
60
|
+
/** 应用秘钥,创建应用后获得 */
|
|
61
|
+
tenant_key: string;
|
|
62
|
+
}
|
|
63
|
+
export interface TenantAccessTokenInternalAuthResponse extends BaseResponse {
|
|
64
|
+
/** 访问 token */
|
|
65
|
+
tenant_access_token?: string;
|
|
66
|
+
/** app_access_token 过期时间 */
|
|
67
|
+
expire?: number;
|
|
68
|
+
}
|
|
69
|
+
export interface AppAccessTokenInternalAuthResponse extends BaseResponse {
|
|
70
|
+
/** 访问 token */
|
|
71
|
+
app_access_token?: string;
|
|
72
|
+
/** app_access_token 过期时间 */
|
|
73
|
+
expire?: number;
|
|
74
|
+
}
|
|
75
|
+
export interface AppAccessTokenAuthResponse extends BaseResponse {
|
|
76
|
+
/** 访问 token */
|
|
77
|
+
app_access_token?: string;
|
|
78
|
+
/** app_access_token 过期时间 */
|
|
79
|
+
expire?: number;
|
|
80
|
+
}
|
|
81
|
+
export interface TenantAccessTokenAuthResponse extends BaseResponse {
|
|
82
|
+
/** 访问 token */
|
|
83
|
+
tenant_access_token?: string;
|
|
84
|
+
/** app_access_token 过期时间 */
|
|
85
|
+
expire?: number;
|
|
86
|
+
}
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
declare module '../internal' {
|
|
2
|
+
interface Internal {
|
|
3
|
+
/**
|
|
4
|
+
* 获取用户信息
|
|
5
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/authen-v1/user_info/get
|
|
6
|
+
*/
|
|
7
|
+
getAuthenUserInfo(): Promise<GetAuthenUserInfoResponse>;
|
|
8
|
+
/**
|
|
9
|
+
* 获取 user_access_token
|
|
10
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/authen-v1/oidc-access_token/create
|
|
11
|
+
*/
|
|
12
|
+
createAuthenOidcAccessToken(body: CreateAuthenOidcAccessTokenRequest): Promise<CreateAuthenOidcAccessTokenResponse>;
|
|
13
|
+
/**
|
|
14
|
+
* 刷新 user_access_token
|
|
15
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/authen-v1/oidc-refresh_access_token/create
|
|
16
|
+
*/
|
|
17
|
+
createAuthenOidcRefreshAccessToken(body: CreateAuthenOidcRefreshAccessTokenRequest): Promise<CreateAuthenOidcRefreshAccessTokenResponse>;
|
|
18
|
+
/**
|
|
19
|
+
* 获取 user_access_token(v1 版本)
|
|
20
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/authen-v1/access_token/create
|
|
21
|
+
*/
|
|
22
|
+
createAuthenAccessToken(body: CreateAuthenAccessTokenRequest): Promise<CreateAuthenAccessTokenResponse>;
|
|
23
|
+
/**
|
|
24
|
+
* 刷新 user_access_token(v1 版本)
|
|
25
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/authen-v1/refresh_access_token/create
|
|
26
|
+
*/
|
|
27
|
+
createAuthenRefreshAccessToken(body: CreateAuthenRefreshAccessTokenRequest): Promise<CreateAuthenRefreshAccessTokenResponse>;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
export interface CreateAuthenOidcAccessTokenRequest {
|
|
31
|
+
/** 授权类型,**固定值** */
|
|
32
|
+
grant_type: string;
|
|
33
|
+
/** 登录预授权码 */
|
|
34
|
+
code: string;
|
|
35
|
+
}
|
|
36
|
+
export interface CreateAuthenOidcRefreshAccessTokenRequest {
|
|
37
|
+
/** 授权类型,**固定值**: */
|
|
38
|
+
grant_type: string;
|
|
39
|
+
/** 刷新 `user_access_token` 需要的凭证<br>获取user_access_token`接口和本接口均返回 `refresh_token`,**每次请求,请注意使用最新获取到的`refresh_token`** */
|
|
40
|
+
refresh_token: string;
|
|
41
|
+
}
|
|
42
|
+
export interface CreateAuthenAccessTokenRequest {
|
|
43
|
+
/** 授权类型,**固定值** */
|
|
44
|
+
grant_type: string;
|
|
45
|
+
/** 登录预授权码,调用[获取登录预授权码](https://open.feishu.cn/document/ukTMukTMukTM/ukzN4UjL5cDO14SO3gTN)接口获取 */
|
|
46
|
+
code: string;
|
|
47
|
+
}
|
|
48
|
+
export interface CreateAuthenRefreshAccessTokenRequest {
|
|
49
|
+
/** 授权类型,**固定值**: */
|
|
50
|
+
grant_type: string;
|
|
51
|
+
/** 刷新 `user_access_token` 需要的凭证<br>获取user_access_token`接口和本接口均返回 `refresh_token`,**每次请求,请注意使用最新获取到的`refresh_token`** */
|
|
52
|
+
refresh_token: string;
|
|
53
|
+
}
|
|
54
|
+
export interface GetAuthenUserInfoResponse {
|
|
55
|
+
/** 用户姓名 */
|
|
56
|
+
name?: string;
|
|
57
|
+
/** 用户英文名称 */
|
|
58
|
+
en_name?: string;
|
|
59
|
+
/** 用户头像 */
|
|
60
|
+
avatar_url?: string;
|
|
61
|
+
/** 用户头像 72x72 */
|
|
62
|
+
avatar_thumb?: string;
|
|
63
|
+
/** 用户头像 240x240 */
|
|
64
|
+
avatar_middle?: string;
|
|
65
|
+
/** 用户头像 640x640 */
|
|
66
|
+
avatar_big?: string;
|
|
67
|
+
/** 用户在应用内的唯一标识 */
|
|
68
|
+
open_id?: string;
|
|
69
|
+
/** 用户统一ID */
|
|
70
|
+
union_id?: string;
|
|
71
|
+
/** 用户邮箱 */
|
|
72
|
+
email?: string;
|
|
73
|
+
/** 企业邮箱,请先确保已在管理后台启用飞书邮箱服务 */
|
|
74
|
+
enterprise_email?: string;
|
|
75
|
+
/** 用户 user_id */
|
|
76
|
+
user_id?: string;
|
|
77
|
+
/** 用户手机号 */
|
|
78
|
+
mobile?: string;
|
|
79
|
+
/** 当前企业标识 */
|
|
80
|
+
tenant_key?: string;
|
|
81
|
+
/** 用户工号 */
|
|
82
|
+
employee_no?: string;
|
|
83
|
+
}
|
|
84
|
+
export interface CreateAuthenOidcAccessTokenResponse {
|
|
85
|
+
/** user_access_token,用于获取用户资源和访问某些open api */
|
|
86
|
+
access_token: string;
|
|
87
|
+
/** 刷新用户 `access_token` 时使用的 token */
|
|
88
|
+
refresh_token?: string;
|
|
89
|
+
/** token 类型,固定值 */
|
|
90
|
+
token_type: string;
|
|
91
|
+
/** `access_token`的有效期,单位: 秒,一般是两个小时左右,需要以返回结果为准 */
|
|
92
|
+
expires_in?: number;
|
|
93
|
+
/** `refresh_token` 的有效期,单位: 秒,一般是30天左右,需要以返回结果为准 */
|
|
94
|
+
refresh_expires_in?: number;
|
|
95
|
+
/** 用户授予app的权限全集 */
|
|
96
|
+
scope?: string;
|
|
97
|
+
}
|
|
98
|
+
export interface CreateAuthenOidcRefreshAccessTokenResponse {
|
|
99
|
+
/** user_access_token,用于获取用户资源和访问某些open api */
|
|
100
|
+
access_token: string;
|
|
101
|
+
/** 刷新用户 `access_token` 时使用的 token */
|
|
102
|
+
refresh_token?: string;
|
|
103
|
+
/** token 类型,固定值 */
|
|
104
|
+
token_type: string;
|
|
105
|
+
/** `access_token`的有效期,单位: 秒,一般是两个小时左右,需要以返回结果为准 */
|
|
106
|
+
expires_in?: number;
|
|
107
|
+
/** `refresh_token` 的有效期,单位: 秒,一般是30天左右,需要以返回结果为准 */
|
|
108
|
+
refresh_expires_in?: number;
|
|
109
|
+
/** 用户授予app的权限全集 */
|
|
110
|
+
scope?: string;
|
|
111
|
+
}
|
|
112
|
+
export interface CreateAuthenAccessTokenResponse {
|
|
113
|
+
/** user_access_token,用于获取用户资源 */
|
|
114
|
+
access_token?: string;
|
|
115
|
+
/** token 类型 */
|
|
116
|
+
token_type?: string;
|
|
117
|
+
/** `access_token`的有效期,单位: 秒 */
|
|
118
|
+
expires_in?: number;
|
|
119
|
+
/** 用户姓名 */
|
|
120
|
+
name?: string;
|
|
121
|
+
/** 用户英文名称 */
|
|
122
|
+
en_name?: string;
|
|
123
|
+
/** 用户头像 */
|
|
124
|
+
avatar_url?: string;
|
|
125
|
+
/** 用户头像 72x72 */
|
|
126
|
+
avatar_thumb?: string;
|
|
127
|
+
/** 用户头像 240x240 */
|
|
128
|
+
avatar_middle?: string;
|
|
129
|
+
/** 用户头像 640x640 */
|
|
130
|
+
avatar_big?: string;
|
|
131
|
+
/** 用户在应用内的唯一标识 */
|
|
132
|
+
open_id?: string;
|
|
133
|
+
/** 用户统一ID */
|
|
134
|
+
union_id?: string;
|
|
135
|
+
/** 用户邮箱 */
|
|
136
|
+
email?: string;
|
|
137
|
+
/** 企业邮箱,请先确保已在管理后台启用飞书邮箱服务 */
|
|
138
|
+
enterprise_email?: string;
|
|
139
|
+
/** 用户 user_id */
|
|
140
|
+
user_id?: string;
|
|
141
|
+
/** 用户手机号 */
|
|
142
|
+
mobile?: string;
|
|
143
|
+
/** 当前企业标识 */
|
|
144
|
+
tenant_key?: string;
|
|
145
|
+
/** `refresh_token` 的有效期,单位: 秒 */
|
|
146
|
+
refresh_expires_in?: number;
|
|
147
|
+
/** 刷新用户 `access_token` 时使用的 token */
|
|
148
|
+
refresh_token?: string;
|
|
149
|
+
/** 用户当前登录态session的唯一标识,为空则不返回 */
|
|
150
|
+
sid?: string;
|
|
151
|
+
}
|
|
152
|
+
export interface CreateAuthenRefreshAccessTokenResponse {
|
|
153
|
+
/** user_access_token,用于获取用户资源 */
|
|
154
|
+
access_token?: string;
|
|
155
|
+
/** token 类型 */
|
|
156
|
+
token_type?: string;
|
|
157
|
+
/** `access_token`的有效期,单位: 秒 */
|
|
158
|
+
expires_in?: number;
|
|
159
|
+
/** 用户姓名 */
|
|
160
|
+
name?: string;
|
|
161
|
+
/** 用户英文名称 */
|
|
162
|
+
en_name?: string;
|
|
163
|
+
/** 用户头像 */
|
|
164
|
+
avatar_url?: string;
|
|
165
|
+
/** 用户头像 72x72 */
|
|
166
|
+
avatar_thumb?: string;
|
|
167
|
+
/** 用户头像 240x240 */
|
|
168
|
+
avatar_middle?: string;
|
|
169
|
+
/** 用户头像 640x640 */
|
|
170
|
+
avatar_big?: string;
|
|
171
|
+
/** 用户在应用内的唯一标识 */
|
|
172
|
+
open_id?: string;
|
|
173
|
+
/** 用户统一ID */
|
|
174
|
+
union_id?: string;
|
|
175
|
+
/** 用户邮箱 */
|
|
176
|
+
email?: string;
|
|
177
|
+
/** 企业邮箱,请先确保已在管理后台启用飞书邮箱服务 */
|
|
178
|
+
enterprise_email?: string;
|
|
179
|
+
/** 用户 user_id */
|
|
180
|
+
user_id?: string;
|
|
181
|
+
/** 用户手机号 */
|
|
182
|
+
mobile?: string;
|
|
183
|
+
/** 当前企业标识 */
|
|
184
|
+
tenant_key?: string;
|
|
185
|
+
/** `refresh_token` 的有效期,单位: 秒 */
|
|
186
|
+
refresh_expires_in?: number;
|
|
187
|
+
/** 刷新用户 `access_token` 时使用的 token */
|
|
188
|
+
refresh_token?: string;
|
|
189
|
+
/** 用户当前登录态session的唯一标识,为空则不返回 */
|
|
190
|
+
sid?: string;
|
|
191
|
+
}
|
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
import { Classification, ClassificationFilter, Draft, Entity, EntityWord, MatchInfo, OuterInfo, Phrase, RelatedMeta, Term } from '.';
|
|
2
|
+
import { Pagination } from '../internal';
|
|
3
|
+
declare module '../internal' {
|
|
4
|
+
interface Internal {
|
|
5
|
+
/**
|
|
6
|
+
* 创建草稿
|
|
7
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/baike-v1/draft/create
|
|
8
|
+
*/
|
|
9
|
+
createBaikeDraft(body: CreateBaikeDraftRequest, query?: CreateBaikeDraftQuery): Promise<CreateBaikeDraftResponse>;
|
|
10
|
+
/**
|
|
11
|
+
* 更新草稿
|
|
12
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/baike-v1/draft/update
|
|
13
|
+
*/
|
|
14
|
+
updateBaikeDraft(draft_id: string, body: UpdateBaikeDraftRequest, query?: UpdateBaikeDraftQuery): Promise<UpdateBaikeDraftResponse>;
|
|
15
|
+
/**
|
|
16
|
+
* 创建免审词条
|
|
17
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/baike-v1/entity/create
|
|
18
|
+
*/
|
|
19
|
+
createBaikeEntity(body: CreateBaikeEntityRequest, query?: CreateBaikeEntityQuery): Promise<CreateBaikeEntityResponse>;
|
|
20
|
+
/**
|
|
21
|
+
* 更新免审词条
|
|
22
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/baike-v1/entity/update
|
|
23
|
+
*/
|
|
24
|
+
updateBaikeEntity(entity_id: string, body: UpdateBaikeEntityRequest, query?: UpdateBaikeEntityQuery): Promise<UpdateBaikeEntityResponse>;
|
|
25
|
+
/**
|
|
26
|
+
* 获取词条详情
|
|
27
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/baike-v1/entity/get
|
|
28
|
+
*/
|
|
29
|
+
getBaikeEntity(entity_id: string, query?: GetBaikeEntityQuery): Promise<GetBaikeEntityResponse>;
|
|
30
|
+
/**
|
|
31
|
+
* 获取词条列表
|
|
32
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/baike-v1/entity/list
|
|
33
|
+
*/
|
|
34
|
+
listBaikeEntity(query?: ListBaikeEntityQuery): Promise<ListBaikeEntityResponse>;
|
|
35
|
+
/**
|
|
36
|
+
* 精准搜索词条
|
|
37
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/baike-v1/entity/match
|
|
38
|
+
*/
|
|
39
|
+
matchBaikeEntity(body: MatchBaikeEntityRequest): Promise<MatchBaikeEntityResponse>;
|
|
40
|
+
/**
|
|
41
|
+
* 模糊搜索词条
|
|
42
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/baike-v1/entity/search
|
|
43
|
+
*/
|
|
44
|
+
searchBaikeEntity(body: SearchBaikeEntityRequest, query?: SearchBaikeEntityQuery): Promise<SearchBaikeEntityResponse>;
|
|
45
|
+
/**
|
|
46
|
+
* 词条高亮
|
|
47
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/baike-v1/entity/highlight
|
|
48
|
+
*/
|
|
49
|
+
highlightBaikeEntity(body: HighlightBaikeEntityRequest): Promise<HighlightBaikeEntityResponse>;
|
|
50
|
+
/**
|
|
51
|
+
* 提取潜在的词条
|
|
52
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/baike-v1/entity/extract
|
|
53
|
+
*/
|
|
54
|
+
extractBaikeEntity(body: ExtractBaikeEntityRequest): Promise<ExtractBaikeEntityResponse>;
|
|
55
|
+
/**
|
|
56
|
+
* 获取词典分类
|
|
57
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/baike-v1/classification/list
|
|
58
|
+
*/
|
|
59
|
+
listBaikeClassification(query?: Pagination): Promise<ListBaikeClassificationResponse>;
|
|
60
|
+
/**
|
|
61
|
+
* 上传图片
|
|
62
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/baike-v1/file/upload
|
|
63
|
+
*/
|
|
64
|
+
uploadBaikeFile(form: UploadBaikeFileForm): Promise<UploadBaikeFileResponse>;
|
|
65
|
+
/**
|
|
66
|
+
* 下载图片
|
|
67
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/baike-v1/file/download
|
|
68
|
+
*/
|
|
69
|
+
downloadBaikeFile(file_token: string): Promise<ArrayBuffer>;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
export interface CreateBaikeDraftRequest {
|
|
73
|
+
/** 实体词 Id */
|
|
74
|
+
id?: string;
|
|
75
|
+
/** 词条名 */
|
|
76
|
+
main_keys: Term[];
|
|
77
|
+
/** 别名 */
|
|
78
|
+
aliases?: Term[];
|
|
79
|
+
/** 详情描述 */
|
|
80
|
+
description?: string;
|
|
81
|
+
/** 相关数据 */
|
|
82
|
+
related_meta?: RelatedMeta;
|
|
83
|
+
/** 外部 id 关联数据 */
|
|
84
|
+
outer_info?: OuterInfo;
|
|
85
|
+
/** 富文本格式(当填写富文本内容时,description字段将会失效可不填写),支持的格式参考[企业百科指南](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/baike-v1/overview)中的释义部分 */
|
|
86
|
+
rich_text?: string;
|
|
87
|
+
}
|
|
88
|
+
export interface CreateBaikeDraftQuery {
|
|
89
|
+
/** 此次调用中使用的用户ID的类型 */
|
|
90
|
+
user_id_type?: 'user_id' | 'union_id' | 'open_id';
|
|
91
|
+
}
|
|
92
|
+
export interface UpdateBaikeDraftRequest {
|
|
93
|
+
/** 实体词 Id */
|
|
94
|
+
id?: string;
|
|
95
|
+
/** 词条名 */
|
|
96
|
+
main_keys: Term[];
|
|
97
|
+
/** 别名 */
|
|
98
|
+
aliases?: Term[];
|
|
99
|
+
/** 详情描述 */
|
|
100
|
+
description?: string;
|
|
101
|
+
/** 相关数据 */
|
|
102
|
+
related_meta?: RelatedMeta;
|
|
103
|
+
/** 富文本格式(当填写富文本内容时,description字段将会失效可不填写),支持的格式参考[企业百科指南](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/baike-v1/overview)中的释义部分 */
|
|
104
|
+
rich_text?: string;
|
|
105
|
+
}
|
|
106
|
+
export interface UpdateBaikeDraftQuery {
|
|
107
|
+
/** 此次调用中使用的用户ID的类型 */
|
|
108
|
+
user_id_type?: 'user_id' | 'union_id' | 'open_id';
|
|
109
|
+
}
|
|
110
|
+
export interface CreateBaikeEntityRequest {
|
|
111
|
+
/** 词条名 */
|
|
112
|
+
main_keys: Term[];
|
|
113
|
+
/** 别名 */
|
|
114
|
+
aliases?: Term[];
|
|
115
|
+
/** 详情描述 */
|
|
116
|
+
description?: string;
|
|
117
|
+
/** 相关数据 */
|
|
118
|
+
related_meta?: RelatedMeta;
|
|
119
|
+
/** 外部 id 关联数据 */
|
|
120
|
+
outer_info?: OuterInfo;
|
|
121
|
+
/** 富文本格式(当填写富文本内容时,description字段将会失效可不填写),支持的格式参考[企业百科指南](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/baike-v1/overview)中的释义部分 */
|
|
122
|
+
rich_text?: string;
|
|
123
|
+
}
|
|
124
|
+
export interface CreateBaikeEntityQuery {
|
|
125
|
+
/** 此次调用中使用的用户ID的类型 */
|
|
126
|
+
user_id_type?: 'user_id' | 'union_id' | 'open_id';
|
|
127
|
+
}
|
|
128
|
+
export interface UpdateBaikeEntityRequest {
|
|
129
|
+
/** 词条名 */
|
|
130
|
+
main_keys: Term[];
|
|
131
|
+
/** 别名 */
|
|
132
|
+
aliases?: Term[];
|
|
133
|
+
/** 详情描述 */
|
|
134
|
+
description?: string;
|
|
135
|
+
/** 相关数据 */
|
|
136
|
+
related_meta?: RelatedMeta;
|
|
137
|
+
/** 外部 id 关联数据 */
|
|
138
|
+
outer_info?: OuterInfo;
|
|
139
|
+
/** 富文本格式(当填写富文本内容时,description字段将会失效可不填写),支持的格式参考[企业百科指南](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/baike-v1/overview)中的释义部分 */
|
|
140
|
+
rich_text?: string;
|
|
141
|
+
}
|
|
142
|
+
export interface UpdateBaikeEntityQuery {
|
|
143
|
+
/** 此次调用中使用的用户ID的类型 */
|
|
144
|
+
user_id_type?: 'user_id' | 'union_id' | 'open_id';
|
|
145
|
+
}
|
|
146
|
+
export interface GetBaikeEntityQuery {
|
|
147
|
+
/** 外部系统 */
|
|
148
|
+
provider?: string;
|
|
149
|
+
/** 词条在外部系统中对应的唯一 ID */
|
|
150
|
+
outer_id?: string;
|
|
151
|
+
/** 此次调用中使用的用户ID的类型 */
|
|
152
|
+
user_id_type?: 'user_id' | 'union_id' | 'open_id';
|
|
153
|
+
}
|
|
154
|
+
export interface ListBaikeEntityQuery extends Pagination {
|
|
155
|
+
/** 相关外部系统【可用来过滤词条数据】 */
|
|
156
|
+
provider?: string;
|
|
157
|
+
/** 此次调用中使用的用户ID的类型 */
|
|
158
|
+
user_id_type?: 'user_id' | 'union_id' | 'open_id';
|
|
159
|
+
}
|
|
160
|
+
export interface MatchBaikeEntityRequest {
|
|
161
|
+
/** 搜索关键词,将与词条名、别名进行精准匹配 */
|
|
162
|
+
word: string;
|
|
163
|
+
}
|
|
164
|
+
export interface SearchBaikeEntityRequest {
|
|
165
|
+
/** 搜索关键词 */
|
|
166
|
+
query?: string;
|
|
167
|
+
/** 分类筛选 */
|
|
168
|
+
classification_filter?: ClassificationFilter;
|
|
169
|
+
/** 词条的创建来源,1:用户主动创建,2:批量导入,3:官方词,4:OpenAPI 创建 */
|
|
170
|
+
sources?: number[];
|
|
171
|
+
/** 创建者 */
|
|
172
|
+
creators?: string[];
|
|
173
|
+
}
|
|
174
|
+
export interface SearchBaikeEntityQuery extends Pagination {
|
|
175
|
+
/** 此次调用中使用的用户ID的类型 */
|
|
176
|
+
user_id_type?: 'user_id' | 'union_id' | 'open_id';
|
|
177
|
+
}
|
|
178
|
+
export interface HighlightBaikeEntityRequest {
|
|
179
|
+
/** 需要识别百科词条的内容(不超过1000字) */
|
|
180
|
+
text: string;
|
|
181
|
+
}
|
|
182
|
+
export interface ExtractBaikeEntityRequest {
|
|
183
|
+
/** 需要被提取百科实体词的文本(不会过滤租户已成为百科词条的内容) */
|
|
184
|
+
text?: string;
|
|
185
|
+
}
|
|
186
|
+
export interface UploadBaikeFileForm {
|
|
187
|
+
/** 文件名称,当前仅支持上传图片且图片格式为以下六种:icon、bmp、gif、png、jpeg、webp */
|
|
188
|
+
name: string;
|
|
189
|
+
/** 二进制文件内容,高宽像素在 320-4096 像素之间,大小在 3KB-10MB 的图片 */
|
|
190
|
+
file: Blob;
|
|
191
|
+
}
|
|
192
|
+
export interface CreateBaikeDraftResponse {
|
|
193
|
+
draft?: Draft;
|
|
194
|
+
}
|
|
195
|
+
export interface UpdateBaikeDraftResponse {
|
|
196
|
+
draft?: Draft;
|
|
197
|
+
}
|
|
198
|
+
export interface CreateBaikeEntityResponse {
|
|
199
|
+
entity?: Entity;
|
|
200
|
+
}
|
|
201
|
+
export interface UpdateBaikeEntityResponse {
|
|
202
|
+
entity?: Entity;
|
|
203
|
+
}
|
|
204
|
+
export interface GetBaikeEntityResponse {
|
|
205
|
+
/** 实体词 */
|
|
206
|
+
entity?: Entity;
|
|
207
|
+
}
|
|
208
|
+
export interface ListBaikeEntityResponse {
|
|
209
|
+
entities?: Entity[];
|
|
210
|
+
/** 分页标记,当还有下一页时会返回新的 page_token,否则 page_token 为空 */
|
|
211
|
+
page_token?: string;
|
|
212
|
+
}
|
|
213
|
+
export interface MatchBaikeEntityResponse {
|
|
214
|
+
/** 匹配结果 */
|
|
215
|
+
results?: MatchInfo[];
|
|
216
|
+
}
|
|
217
|
+
export interface SearchBaikeEntityResponse {
|
|
218
|
+
/** 数据数组 */
|
|
219
|
+
entities?: Entity[];
|
|
220
|
+
/** 分页标记,当还有下一页时会返回新的 page_token,否则 page_token 为空 */
|
|
221
|
+
page_token?: string;
|
|
222
|
+
}
|
|
223
|
+
export interface HighlightBaikeEntityResponse {
|
|
224
|
+
/** 返回识别到的实体词信息 */
|
|
225
|
+
phrases?: Phrase[];
|
|
226
|
+
}
|
|
227
|
+
export interface ExtractBaikeEntityResponse {
|
|
228
|
+
/** 文本中可能的成为百科词条的实体词 */
|
|
229
|
+
entity_word: EntityWord[];
|
|
230
|
+
}
|
|
231
|
+
export interface ListBaikeClassificationResponse {
|
|
232
|
+
items?: Classification[];
|
|
233
|
+
/** 分页标记,当还有下一页时会返回新的 page_token,否则 page_token 为空 */
|
|
234
|
+
page_token?: string;
|
|
235
|
+
}
|
|
236
|
+
export interface UploadBaikeFileResponse {
|
|
237
|
+
/** 文件 token */
|
|
238
|
+
file_token?: string;
|
|
239
|
+
}
|