@satorijs/adapter-lark 3.10.6 → 3.11.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/index.cjs +2880 -2370
- package/lib/internal.d.ts +4 -4
- package/lib/types/acs.d.ts +212 -172
- package/lib/types/admin.d.ts +331 -291
- package/lib/types/aily.d.ts +331 -216
- package/lib/types/apaas.d.ts +646 -494
- package/lib/types/application.d.ts +559 -458
- package/lib/types/approval.d.ts +826 -791
- package/lib/types/attendance.d.ts +1094 -994
- package/lib/types/auth.d.ts +66 -61
- package/lib/types/authen.d.ts +221 -186
- package/lib/types/baike.d.ts +258 -233
- package/lib/types/base.d.ts +74 -0
- package/lib/types/bitable.d.ts +830 -770
- package/lib/types/board.d.ts +29 -14
- package/lib/types/calendar.d.ts +660 -605
- package/lib/types/cardkit.d.ts +149 -134
- package/lib/types/compensation.d.ts +84 -49
- package/lib/types/contact.d.ts +1279 -1204
- package/lib/types/corehr.d.ts +4982 -4526
- package/lib/types/directory.d.ts +447 -0
- package/lib/types/docs.d.ts +28 -18
- package/lib/types/document_ai.d.ts +347 -252
- package/lib/types/docx.d.ts +428 -383
- package/lib/types/drive.d.ts +1093 -1048
- package/lib/types/ehr.d.ts +66 -51
- package/lib/types/event.d.ts +16 -6
- package/lib/types/helpdesk.d.ts +816 -741
- package/lib/types/hire.d.ts +3955 -3589
- package/lib/types/human_authentication.d.ts +32 -22
- package/lib/types/im.d.ts +1420 -1295
- package/lib/types/index.d.ts +1422 -330
- package/lib/types/lingo.d.ts +279 -249
- package/lib/types/mail.d.ts +1032 -675
- package/lib/types/mdm.d.ts +105 -37
- package/lib/types/minutes.d.ts +73 -26
- package/lib/types/moments.d.ts +23 -13
- package/lib/types/okr.d.ts +266 -225
- package/lib/types/optical_char_recognition.d.ts +22 -12
- package/lib/types/passport.d.ts +58 -48
- package/lib/types/payroll.d.ts +210 -53
- package/lib/types/performance.d.ts +463 -414
- package/lib/types/personal_settings.d.ts +93 -82
- package/lib/types/report.d.ts +79 -58
- package/lib/types/search.d.ts +265 -235
- package/lib/types/security_and_compliance.d.ts +30 -19
- package/lib/types/sheets.d.ts +356 -321
- package/lib/types/speech_to_text.d.ts +44 -34
- package/lib/types/task.d.ts +998 -1087
- package/lib/types/tenant.d.ts +25 -15
- package/lib/types/translation.d.ts +42 -32
- package/lib/types/trust_party.d.ts +81 -0
- package/lib/types/vc.d.ts +1218 -1123
- package/lib/types/verification.d.ts +11 -6
- package/lib/types/wiki.d.ts +270 -235
- package/lib/types/workplace.d.ts +58 -38
- package/lib/utils.d.ts +2 -2
- package/package.json +4 -4
- package/src/bot.ts +15 -15
- package/src/internal.ts +29 -12
- package/src/message.ts +10 -10
- package/src/types/acs.ts +234 -186
- package/src/types/admin.ts +353 -305
- package/src/types/aily.ts +375 -233
- package/src/types/apaas.ts +754 -568
- package/src/types/application.ts +633 -507
- package/src/types/approval.ts +914 -872
- package/src/types/attendance.ts +1226 -1104
- package/src/types/auth.ts +72 -66
- package/src/types/authen.ts +233 -191
- package/src/types/baike.ts +276 -246
- package/src/types/base.ts +93 -0
- package/src/types/bitable.ts +966 -894
- package/src/types/board.ts +34 -16
- package/src/types/calendar.ts +751 -685
- package/src/types/cardkit.ts +164 -146
- package/src/types/compensation.ts +97 -55
- package/src/types/contact.ts +1465 -1375
- package/src/types/corehr.ts +5664 -5077
- package/src/types/directory.ts +569 -0
- package/src/types/docs.ts +31 -19
- package/src/types/document_ai.ts +401 -287
- package/src/types/docx.ts +492 -438
- package/src/types/drive.ts +1266 -1213
- package/src/types/ehr.ts +71 -53
- package/src/types/event.ts +19 -7
- package/src/types/helpdesk.ts +930 -840
- package/src/types/hire.ts +4453 -4019
- package/src/types/human_authentication.ts +35 -23
- package/src/types/im.ts +1626 -1476
- package/src/types/index.ts +1532 -346
- package/src/types/lingo.ts +299 -263
- package/src/types/mail.ts +1231 -779
- package/src/types/mdm.ts +122 -39
- package/src/types/minutes.ts +88 -28
- package/src/types/moments.ts +26 -14
- package/src/types/okr.ts +286 -238
- package/src/types/optical_char_recognition.ts +25 -13
- package/src/types/passport.ts +62 -50
- package/src/types/payroll.ts +254 -57
- package/src/types/performance.ts +528 -467
- package/src/types/personal_settings.ts +101 -89
- package/src/types/report.ts +86 -62
- package/src/types/search.ts +285 -249
- package/src/types/security_and_compliance.ts +33 -21
- package/src/types/sheets.ts +421 -379
- package/src/types/speech_to_text.ts +48 -36
- package/src/types/task.ts +1152 -1260
- package/src/types/tenant.ts +29 -17
- package/src/types/translation.ts +46 -34
- package/src/types/trust_party.ts +110 -0
- package/src/types/vc.ts +1397 -1283
- package/src/types/verification.ts +13 -7
- package/src/types/wiki.ts +293 -251
- package/src/types/workplace.ts +65 -41
- package/src/utils.ts +3 -3
package/lib/types/auth.d.ts
CHANGED
|
@@ -1,86 +1,91 @@
|
|
|
1
1
|
import { BaseResponse } from '../internal';
|
|
2
2
|
declare module '../internal' {
|
|
3
3
|
interface Internal {
|
|
4
|
+
auth: Auth.Methods;
|
|
5
|
+
}
|
|
6
|
+
}
|
|
7
|
+
export declare namespace Auth {
|
|
8
|
+
interface Methods {
|
|
4
9
|
/**
|
|
5
10
|
* 自建应用获取 tenant_access_token
|
|
6
11
|
* @see https://open.feishu.cn/document/ukTMukTMukTM/ukDNz4SO0MjL5QzM/auth-v3/auth/tenant_access_token_internal
|
|
7
12
|
*/
|
|
8
|
-
|
|
13
|
+
tenantAccessTokenInternal(body: TenantAccessTokenInternalRequest): Promise<Auth.TenantAccessTokenInternalResponse>;
|
|
9
14
|
/**
|
|
10
15
|
* 自建应用获取 app_access_token
|
|
11
16
|
* @see https://open.feishu.cn/document/ukTMukTMukTM/ukDNz4SO0MjL5QzM/auth-v3/auth/app_access_token_internal
|
|
12
17
|
*/
|
|
13
|
-
|
|
18
|
+
appAccessTokenInternal(body: AppAccessTokenInternalRequest): Promise<Auth.AppAccessTokenInternalResponse>;
|
|
14
19
|
/**
|
|
15
20
|
* 重新获取 app_ticket
|
|
16
21
|
* @see https://open.feishu.cn/document/ukTMukTMukTM/ukDNz4SO0MjL5QzM/auth-v3/auth/app_ticket_resend
|
|
17
22
|
*/
|
|
18
|
-
|
|
23
|
+
appTicketResend(body: AppTicketResendRequest): Promise<void>;
|
|
19
24
|
/**
|
|
20
25
|
* 商店应用获取 app_access_token
|
|
21
26
|
* @see https://open.feishu.cn/document/ukTMukTMukTM/ukDNz4SO0MjL5QzM/auth-v3/auth/app_access_token
|
|
22
27
|
*/
|
|
23
|
-
|
|
28
|
+
appAccessToken(body: AppAccessTokenRequest): Promise<Auth.AppAccessTokenResponse>;
|
|
24
29
|
/**
|
|
25
30
|
* 商店应用获取 tenant_access_token
|
|
26
31
|
* @see https://open.feishu.cn/document/ukTMukTMukTM/ukDNz4SO0MjL5QzM/auth-v3/auth/tenant_access_token
|
|
27
32
|
*/
|
|
28
|
-
|
|
33
|
+
tenantAccessToken(body: TenantAccessTokenRequest): Promise<Auth.TenantAccessTokenResponse>;
|
|
34
|
+
}
|
|
35
|
+
interface TenantAccessTokenInternalRequest {
|
|
36
|
+
/** 应用唯一标识,创建应用后获得 */
|
|
37
|
+
app_id: string;
|
|
38
|
+
/** 应用秘钥,创建应用后获得 */
|
|
39
|
+
app_secret: string;
|
|
40
|
+
}
|
|
41
|
+
interface TenantAccessTokenInternalResponse extends BaseResponse {
|
|
42
|
+
/** 访问 token */
|
|
43
|
+
tenant_access_token?: string;
|
|
44
|
+
/** app_access_token 过期时间 */
|
|
45
|
+
expire?: number;
|
|
46
|
+
}
|
|
47
|
+
interface AppAccessTokenInternalRequest {
|
|
48
|
+
/** 应用唯一标识,创建应用后获得 */
|
|
49
|
+
app_id: string;
|
|
50
|
+
/** 应用秘钥,创建应用后获得 */
|
|
51
|
+
app_secret: string;
|
|
52
|
+
}
|
|
53
|
+
interface AppAccessTokenInternalResponse extends BaseResponse {
|
|
54
|
+
/** 访问 token */
|
|
55
|
+
app_access_token?: string;
|
|
56
|
+
/** app_access_token 过期时间 */
|
|
57
|
+
expire?: number;
|
|
58
|
+
}
|
|
59
|
+
interface AppTicketResendRequest {
|
|
60
|
+
/** 应用唯一标识,创建应用后获得 */
|
|
61
|
+
app_id: string;
|
|
62
|
+
/** 应用秘钥,创建应用后获得 */
|
|
63
|
+
app_secret: string;
|
|
64
|
+
}
|
|
65
|
+
interface AppAccessTokenRequest {
|
|
66
|
+
/** 应用唯一标识,创建应用后获得 */
|
|
67
|
+
app_id: string;
|
|
68
|
+
/** 应用秘钥,创建应用后获得 */
|
|
69
|
+
app_secret: string;
|
|
70
|
+
/** 平台定时推送给应用的临时凭证,通过事件监听机制获得 */
|
|
71
|
+
app_ticket: string;
|
|
72
|
+
}
|
|
73
|
+
interface AppAccessTokenResponse extends BaseResponse {
|
|
74
|
+
/** 访问 token */
|
|
75
|
+
app_access_token?: string;
|
|
76
|
+
/** app_access_token 过期时间 */
|
|
77
|
+
expire?: number;
|
|
78
|
+
}
|
|
79
|
+
interface TenantAccessTokenRequest {
|
|
80
|
+
/** 应用唯一标识,创建应用 */
|
|
81
|
+
app_access_token: string;
|
|
82
|
+
/** 应用秘钥,创建应用后获得 */
|
|
83
|
+
tenant_key: string;
|
|
84
|
+
}
|
|
85
|
+
interface TenantAccessTokenResponse extends BaseResponse {
|
|
86
|
+
/** 访问 token */
|
|
87
|
+
tenant_access_token?: string;
|
|
88
|
+
/** app_access_token 过期时间 */
|
|
89
|
+
expire?: number;
|
|
29
90
|
}
|
|
30
|
-
}
|
|
31
|
-
export interface TenantAccessTokenInternalAuthRequest {
|
|
32
|
-
/** 应用唯一标识,创建应用后获得 */
|
|
33
|
-
app_id: string;
|
|
34
|
-
/** 应用秘钥,创建应用后获得 */
|
|
35
|
-
app_secret: string;
|
|
36
|
-
}
|
|
37
|
-
export interface TenantAccessTokenInternalAuthResponse extends BaseResponse {
|
|
38
|
-
/** 访问 token */
|
|
39
|
-
tenant_access_token?: string;
|
|
40
|
-
/** app_access_token 过期时间 */
|
|
41
|
-
expire?: number;
|
|
42
|
-
}
|
|
43
|
-
export interface AppAccessTokenInternalAuthRequest {
|
|
44
|
-
/** 应用唯一标识,创建应用后获得 */
|
|
45
|
-
app_id: string;
|
|
46
|
-
/** 应用秘钥,创建应用后获得 */
|
|
47
|
-
app_secret: string;
|
|
48
|
-
}
|
|
49
|
-
export interface AppAccessTokenInternalAuthResponse extends BaseResponse {
|
|
50
|
-
/** 访问 token */
|
|
51
|
-
app_access_token?: string;
|
|
52
|
-
/** app_access_token 过期时间 */
|
|
53
|
-
expire?: number;
|
|
54
|
-
}
|
|
55
|
-
export interface AppTicketResendAuthRequest {
|
|
56
|
-
/** 应用唯一标识,创建应用后获得 */
|
|
57
|
-
app_id: string;
|
|
58
|
-
/** 应用秘钥,创建应用后获得 */
|
|
59
|
-
app_secret: string;
|
|
60
|
-
}
|
|
61
|
-
export interface AppAccessTokenAuthRequest {
|
|
62
|
-
/** 应用唯一标识,创建应用后获得 */
|
|
63
|
-
app_id: string;
|
|
64
|
-
/** 应用秘钥,创建应用后获得 */
|
|
65
|
-
app_secret: string;
|
|
66
|
-
/** 平台定时推送给应用的临时凭证,通过事件监听机制获得 */
|
|
67
|
-
app_ticket: string;
|
|
68
|
-
}
|
|
69
|
-
export interface AppAccessTokenAuthResponse extends BaseResponse {
|
|
70
|
-
/** 访问 token */
|
|
71
|
-
app_access_token?: string;
|
|
72
|
-
/** app_access_token 过期时间 */
|
|
73
|
-
expire?: number;
|
|
74
|
-
}
|
|
75
|
-
export interface TenantAccessTokenAuthRequest {
|
|
76
|
-
/** 应用唯一标识,创建应用 */
|
|
77
|
-
app_access_token: string;
|
|
78
|
-
/** 应用秘钥,创建应用后获得 */
|
|
79
|
-
tenant_key: string;
|
|
80
|
-
}
|
|
81
|
-
export interface TenantAccessTokenAuthResponse extends BaseResponse {
|
|
82
|
-
/** 访问 token */
|
|
83
|
-
tenant_access_token?: string;
|
|
84
|
-
/** app_access_token 过期时间 */
|
|
85
|
-
expire?: number;
|
|
86
91
|
}
|
package/lib/types/authen.d.ts
CHANGED
|
@@ -1,191 +1,226 @@
|
|
|
1
1
|
declare module '../internal' {
|
|
2
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>;
|
|
3
|
+
authen: Authen.Methods;
|
|
28
4
|
}
|
|
29
5
|
}
|
|
30
|
-
export
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
6
|
+
export declare namespace Authen {
|
|
7
|
+
interface Methods {
|
|
8
|
+
userInfo: UserInfo.Methods;
|
|
9
|
+
oidc: Oidc.Methods;
|
|
10
|
+
accessToken: AccessToken.Methods;
|
|
11
|
+
refreshAccessToken: RefreshAccessToken.Methods;
|
|
12
|
+
}
|
|
13
|
+
namespace UserInfo {
|
|
14
|
+
interface Methods {
|
|
15
|
+
/**
|
|
16
|
+
* 获取用户信息
|
|
17
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/authen-v1/user_info/get
|
|
18
|
+
*/
|
|
19
|
+
get(): Promise<GetResponse>;
|
|
20
|
+
}
|
|
21
|
+
interface GetResponse {
|
|
22
|
+
/** 用户姓名 */
|
|
23
|
+
name?: string;
|
|
24
|
+
/** 用户英文名称 */
|
|
25
|
+
en_name?: string;
|
|
26
|
+
/** 用户头像 */
|
|
27
|
+
avatar_url?: string;
|
|
28
|
+
/** 用户头像 72x72 */
|
|
29
|
+
avatar_thumb?: string;
|
|
30
|
+
/** 用户头像 240x240 */
|
|
31
|
+
avatar_middle?: string;
|
|
32
|
+
/** 用户头像 640x640 */
|
|
33
|
+
avatar_big?: string;
|
|
34
|
+
/** 用户在应用内的唯一标识 */
|
|
35
|
+
open_id?: string;
|
|
36
|
+
/** 用户统一ID */
|
|
37
|
+
union_id?: string;
|
|
38
|
+
/** 用户邮箱 */
|
|
39
|
+
email?: string;
|
|
40
|
+
/** 企业邮箱,请先确保已在管理后台启用飞书邮箱服务 */
|
|
41
|
+
enterprise_email?: string;
|
|
42
|
+
/** 用户 user_id */
|
|
43
|
+
user_id?: string;
|
|
44
|
+
/** 用户手机号 */
|
|
45
|
+
mobile?: string;
|
|
46
|
+
/** 当前企业标识 */
|
|
47
|
+
tenant_key?: string;
|
|
48
|
+
/** 用户工号 */
|
|
49
|
+
employee_no?: string;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
namespace Oidc {
|
|
53
|
+
interface Methods {
|
|
54
|
+
accessToken: AccessToken.Methods;
|
|
55
|
+
refreshAccessToken: RefreshAccessToken.Methods;
|
|
56
|
+
}
|
|
57
|
+
namespace AccessToken {
|
|
58
|
+
interface Methods {
|
|
59
|
+
/**
|
|
60
|
+
* 获取 user_access_token
|
|
61
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/authen-v1/oidc-access_token/create
|
|
62
|
+
*/
|
|
63
|
+
create(body: CreateRequest): Promise<CreateResponse>;
|
|
64
|
+
}
|
|
65
|
+
interface CreateRequest {
|
|
66
|
+
/** 授权类型,**固定值** */
|
|
67
|
+
grant_type: string;
|
|
68
|
+
/** 登录预授权码 */
|
|
69
|
+
code: string;
|
|
70
|
+
}
|
|
71
|
+
interface CreateResponse {
|
|
72
|
+
/** user_access_token,用于获取用户资源和访问某些open api */
|
|
73
|
+
access_token: string;
|
|
74
|
+
/** 刷新用户 `access_token` 时使用的 token */
|
|
75
|
+
refresh_token?: string;
|
|
76
|
+
/** token 类型,固定值 */
|
|
77
|
+
token_type: string;
|
|
78
|
+
/** `access_token`的有效期,单位: 秒,一般是两个小时左右,需要以返回结果为准 */
|
|
79
|
+
expires_in?: number;
|
|
80
|
+
/** `refresh_token` 的有效期,单位: 秒,一般是30天左右,需要以返回结果为准 */
|
|
81
|
+
refresh_expires_in?: number;
|
|
82
|
+
/** 用户授予app的权限全集 */
|
|
83
|
+
scope?: string;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
namespace RefreshAccessToken {
|
|
87
|
+
interface Methods {
|
|
88
|
+
/**
|
|
89
|
+
* 刷新 user_access_token
|
|
90
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/authen-v1/oidc-refresh_access_token/create
|
|
91
|
+
*/
|
|
92
|
+
create(body: CreateRequest): Promise<CreateResponse>;
|
|
93
|
+
}
|
|
94
|
+
interface CreateRequest {
|
|
95
|
+
/** 授权类型,**固定值**: */
|
|
96
|
+
grant_type: string;
|
|
97
|
+
/** 刷新 `user_access_token` 需要的凭证<br>获取user_access_token`接口和本接口均返回 `refresh_token`,**每次请求,请注意使用最新获取到的`refresh_token`** */
|
|
98
|
+
refresh_token: string;
|
|
99
|
+
}
|
|
100
|
+
interface CreateResponse {
|
|
101
|
+
/** user_access_token,用于获取用户资源和访问某些open api */
|
|
102
|
+
access_token: string;
|
|
103
|
+
/** 刷新用户 `access_token` 时使用的 token */
|
|
104
|
+
refresh_token?: string;
|
|
105
|
+
/** token 类型,固定值 */
|
|
106
|
+
token_type: string;
|
|
107
|
+
/** `access_token`的有效期,单位: 秒,一般是两个小时左右,需要以返回结果为准 */
|
|
108
|
+
expires_in?: number;
|
|
109
|
+
/** `refresh_token` 的有效期,单位: 秒,一般是30天左右,需要以返回结果为准 */
|
|
110
|
+
refresh_expires_in?: number;
|
|
111
|
+
/** 用户授予app的权限全集 */
|
|
112
|
+
scope?: string;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
namespace AccessToken {
|
|
117
|
+
interface Methods {
|
|
118
|
+
/**
|
|
119
|
+
* 获取 user_access_token(v1 版本)
|
|
120
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/authen-v1/access_token/create
|
|
121
|
+
*/
|
|
122
|
+
create(body: CreateRequest): Promise<CreateResponse>;
|
|
123
|
+
}
|
|
124
|
+
interface CreateRequest {
|
|
125
|
+
/** 授权类型,**固定值** */
|
|
126
|
+
grant_type: string;
|
|
127
|
+
/** 登录预授权码,调用[获取登录预授权码](https://open.feishu.cn/document/ukTMukTMukTM/ukzN4UjL5cDO14SO3gTN)接口获取 */
|
|
128
|
+
code: string;
|
|
129
|
+
}
|
|
130
|
+
interface CreateResponse {
|
|
131
|
+
/** user_access_token,用于获取用户资源 */
|
|
132
|
+
access_token?: string;
|
|
133
|
+
/** token 类型 */
|
|
134
|
+
token_type?: string;
|
|
135
|
+
/** `access_token`的有效期,单位: 秒 */
|
|
136
|
+
expires_in?: number;
|
|
137
|
+
/** 用户姓名 */
|
|
138
|
+
name?: string;
|
|
139
|
+
/** 用户英文名称 */
|
|
140
|
+
en_name?: string;
|
|
141
|
+
/** 用户头像 */
|
|
142
|
+
avatar_url?: string;
|
|
143
|
+
/** 用户头像 72x72 */
|
|
144
|
+
avatar_thumb?: string;
|
|
145
|
+
/** 用户头像 240x240 */
|
|
146
|
+
avatar_middle?: string;
|
|
147
|
+
/** 用户头像 640x640 */
|
|
148
|
+
avatar_big?: string;
|
|
149
|
+
/** 用户在应用内的唯一标识 */
|
|
150
|
+
open_id?: string;
|
|
151
|
+
/** 用户统一ID */
|
|
152
|
+
union_id?: string;
|
|
153
|
+
/** 用户邮箱 */
|
|
154
|
+
email?: string;
|
|
155
|
+
/** 企业邮箱,请先确保已在管理后台启用飞书邮箱服务 */
|
|
156
|
+
enterprise_email?: string;
|
|
157
|
+
/** 用户 user_id */
|
|
158
|
+
user_id?: string;
|
|
159
|
+
/** 用户手机号 */
|
|
160
|
+
mobile?: string;
|
|
161
|
+
/** 当前企业标识 */
|
|
162
|
+
tenant_key?: string;
|
|
163
|
+
/** `refresh_token` 的有效期,单位: 秒 */
|
|
164
|
+
refresh_expires_in?: number;
|
|
165
|
+
/** 刷新用户 `access_token` 时使用的 token */
|
|
166
|
+
refresh_token?: string;
|
|
167
|
+
/** 用户当前登录态session的唯一标识,为空则不返回 */
|
|
168
|
+
sid?: string;
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
namespace RefreshAccessToken {
|
|
172
|
+
interface Methods {
|
|
173
|
+
/**
|
|
174
|
+
* 刷新 user_access_token(v1 版本)
|
|
175
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/authen-v1/refresh_access_token/create
|
|
176
|
+
*/
|
|
177
|
+
create(body: CreateRequest): Promise<CreateResponse>;
|
|
178
|
+
}
|
|
179
|
+
interface CreateRequest {
|
|
180
|
+
/** 授权类型,**固定值**: */
|
|
181
|
+
grant_type: string;
|
|
182
|
+
/** 刷新 `user_access_token` 需要的凭证<br>获取user_access_token`接口和本接口均返回 `refresh_token`,**每次请求,请注意使用最新获取到的`refresh_token`** */
|
|
183
|
+
refresh_token: string;
|
|
184
|
+
}
|
|
185
|
+
interface CreateResponse {
|
|
186
|
+
/** user_access_token,用于获取用户资源 */
|
|
187
|
+
access_token?: string;
|
|
188
|
+
/** token 类型 */
|
|
189
|
+
token_type?: string;
|
|
190
|
+
/** `access_token`的有效期,单位: 秒 */
|
|
191
|
+
expires_in?: number;
|
|
192
|
+
/** 用户姓名 */
|
|
193
|
+
name?: string;
|
|
194
|
+
/** 用户英文名称 */
|
|
195
|
+
en_name?: string;
|
|
196
|
+
/** 用户头像 */
|
|
197
|
+
avatar_url?: string;
|
|
198
|
+
/** 用户头像 72x72 */
|
|
199
|
+
avatar_thumb?: string;
|
|
200
|
+
/** 用户头像 240x240 */
|
|
201
|
+
avatar_middle?: string;
|
|
202
|
+
/** 用户头像 640x640 */
|
|
203
|
+
avatar_big?: string;
|
|
204
|
+
/** 用户在应用内的唯一标识 */
|
|
205
|
+
open_id?: string;
|
|
206
|
+
/** 用户统一ID */
|
|
207
|
+
union_id?: string;
|
|
208
|
+
/** 用户邮箱 */
|
|
209
|
+
email?: string;
|
|
210
|
+
/** 企业邮箱,请先确保已在管理后台启用飞书邮箱服务 */
|
|
211
|
+
enterprise_email?: string;
|
|
212
|
+
/** 用户 user_id */
|
|
213
|
+
user_id?: string;
|
|
214
|
+
/** 用户手机号 */
|
|
215
|
+
mobile?: string;
|
|
216
|
+
/** 当前企业标识 */
|
|
217
|
+
tenant_key?: string;
|
|
218
|
+
/** `refresh_token` 的有效期,单位: 秒 */
|
|
219
|
+
refresh_expires_in?: number;
|
|
220
|
+
/** 刷新用户 `access_token` 时使用的 token */
|
|
221
|
+
refresh_token?: string;
|
|
222
|
+
/** 用户当前登录态session的唯一标识,为空则不返回 */
|
|
223
|
+
sid?: string;
|
|
224
|
+
}
|
|
225
|
+
}
|
|
191
226
|
}
|