@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/src/types/auth.ts
CHANGED
|
@@ -2,113 +2,119 @@ import { BaseResponse, Internal } from '../internal'
|
|
|
2
2
|
|
|
3
3
|
declare module '../internal' {
|
|
4
4
|
interface Internal {
|
|
5
|
+
auth: Auth.Methods
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export namespace Auth {
|
|
10
|
+
export interface Methods {
|
|
5
11
|
/**
|
|
6
12
|
* 自建应用获取 tenant_access_token
|
|
7
13
|
* @see https://open.feishu.cn/document/ukTMukTMukTM/ukDNz4SO0MjL5QzM/auth-v3/auth/tenant_access_token_internal
|
|
8
14
|
*/
|
|
9
|
-
|
|
15
|
+
tenantAccessTokenInternal(body: TenantAccessTokenInternalRequest): Promise<Auth.TenantAccessTokenInternalResponse>
|
|
10
16
|
/**
|
|
11
17
|
* 自建应用获取 app_access_token
|
|
12
18
|
* @see https://open.feishu.cn/document/ukTMukTMukTM/ukDNz4SO0MjL5QzM/auth-v3/auth/app_access_token_internal
|
|
13
19
|
*/
|
|
14
|
-
|
|
20
|
+
appAccessTokenInternal(body: AppAccessTokenInternalRequest): Promise<Auth.AppAccessTokenInternalResponse>
|
|
15
21
|
/**
|
|
16
22
|
* 重新获取 app_ticket
|
|
17
23
|
* @see https://open.feishu.cn/document/ukTMukTMukTM/ukDNz4SO0MjL5QzM/auth-v3/auth/app_ticket_resend
|
|
18
24
|
*/
|
|
19
|
-
|
|
25
|
+
appTicketResend(body: AppTicketResendRequest): Promise<void>
|
|
20
26
|
/**
|
|
21
27
|
* 商店应用获取 app_access_token
|
|
22
28
|
* @see https://open.feishu.cn/document/ukTMukTMukTM/ukDNz4SO0MjL5QzM/auth-v3/auth/app_access_token
|
|
23
29
|
*/
|
|
24
|
-
|
|
30
|
+
appAccessToken(body: AppAccessTokenRequest): Promise<Auth.AppAccessTokenResponse>
|
|
25
31
|
/**
|
|
26
32
|
* 商店应用获取 tenant_access_token
|
|
27
33
|
* @see https://open.feishu.cn/document/ukTMukTMukTM/ukDNz4SO0MjL5QzM/auth-v3/auth/tenant_access_token
|
|
28
34
|
*/
|
|
29
|
-
|
|
35
|
+
tenantAccessToken(body: TenantAccessTokenRequest): Promise<Auth.TenantAccessTokenResponse>
|
|
30
36
|
}
|
|
31
|
-
}
|
|
32
37
|
|
|
33
|
-
export interface
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
}
|
|
38
|
+
export interface TenantAccessTokenInternalRequest {
|
|
39
|
+
/** 应用唯一标识,创建应用后获得 */
|
|
40
|
+
app_id: string
|
|
41
|
+
/** 应用秘钥,创建应用后获得 */
|
|
42
|
+
app_secret: string
|
|
43
|
+
}
|
|
39
44
|
|
|
40
|
-
export interface
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
}
|
|
45
|
+
export interface TenantAccessTokenInternalResponse extends BaseResponse {
|
|
46
|
+
/** 访问 token */
|
|
47
|
+
tenant_access_token?: string
|
|
48
|
+
/** app_access_token 过期时间 */
|
|
49
|
+
expire?: number
|
|
50
|
+
}
|
|
46
51
|
|
|
47
|
-
export interface
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
}
|
|
52
|
+
export interface AppAccessTokenInternalRequest {
|
|
53
|
+
/** 应用唯一标识,创建应用后获得 */
|
|
54
|
+
app_id: string
|
|
55
|
+
/** 应用秘钥,创建应用后获得 */
|
|
56
|
+
app_secret: string
|
|
57
|
+
}
|
|
53
58
|
|
|
54
|
-
export interface
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
}
|
|
59
|
+
export interface AppAccessTokenInternalResponse extends BaseResponse {
|
|
60
|
+
/** 访问 token */
|
|
61
|
+
app_access_token?: string
|
|
62
|
+
/** app_access_token 过期时间 */
|
|
63
|
+
expire?: number
|
|
64
|
+
}
|
|
60
65
|
|
|
61
|
-
export interface
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
}
|
|
66
|
+
export interface AppTicketResendRequest {
|
|
67
|
+
/** 应用唯一标识,创建应用后获得 */
|
|
68
|
+
app_id: string
|
|
69
|
+
/** 应用秘钥,创建应用后获得 */
|
|
70
|
+
app_secret: string
|
|
71
|
+
}
|
|
67
72
|
|
|
68
|
-
export interface
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
}
|
|
73
|
+
export interface AppAccessTokenRequest {
|
|
74
|
+
/** 应用唯一标识,创建应用后获得 */
|
|
75
|
+
app_id: string
|
|
76
|
+
/** 应用秘钥,创建应用后获得 */
|
|
77
|
+
app_secret: string
|
|
78
|
+
/** 平台定时推送给应用的临时凭证,通过事件监听机制获得 */
|
|
79
|
+
app_ticket: string
|
|
80
|
+
}
|
|
76
81
|
|
|
77
|
-
export interface
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
}
|
|
82
|
+
export interface AppAccessTokenResponse extends BaseResponse {
|
|
83
|
+
/** 访问 token */
|
|
84
|
+
app_access_token?: string
|
|
85
|
+
/** app_access_token 过期时间 */
|
|
86
|
+
expire?: number
|
|
87
|
+
}
|
|
83
88
|
|
|
84
|
-
export interface
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
}
|
|
89
|
+
export interface TenantAccessTokenRequest {
|
|
90
|
+
/** 应用唯一标识,创建应用 */
|
|
91
|
+
app_access_token: string
|
|
92
|
+
/** 应用秘钥,创建应用后获得 */
|
|
93
|
+
tenant_key: string
|
|
94
|
+
}
|
|
90
95
|
|
|
91
|
-
export interface
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
+
export interface TenantAccessTokenResponse extends BaseResponse {
|
|
97
|
+
/** 访问 token */
|
|
98
|
+
tenant_access_token?: string
|
|
99
|
+
/** app_access_token 过期时间 */
|
|
100
|
+
expire?: number
|
|
101
|
+
}
|
|
96
102
|
}
|
|
97
103
|
|
|
98
104
|
Internal.define({
|
|
99
105
|
'/auth/v3/tenant_access_token/internal': {
|
|
100
|
-
POST: { name: '
|
|
106
|
+
POST: { name: 'auth.tenantAccessTokenInternal', type: 'raw-json' },
|
|
101
107
|
},
|
|
102
108
|
'/auth/v3/app_access_token/internal': {
|
|
103
|
-
POST: { name: '
|
|
109
|
+
POST: { name: 'auth.appAccessTokenInternal', type: 'raw-json' },
|
|
104
110
|
},
|
|
105
111
|
'/auth/v3/app_ticket/resend': {
|
|
106
|
-
POST: '
|
|
112
|
+
POST: 'auth.appTicketResend',
|
|
107
113
|
},
|
|
108
114
|
'/auth/v3/app_access_token': {
|
|
109
|
-
POST: { name: '
|
|
115
|
+
POST: { name: 'auth.appAccessToken', type: 'raw-json' },
|
|
110
116
|
},
|
|
111
117
|
'/auth/v3/tenant_access_token': {
|
|
112
|
-
POST: { name: '
|
|
118
|
+
POST: { name: 'auth.tenantAccessToken', type: 'raw-json' },
|
|
113
119
|
},
|
|
114
120
|
})
|
package/src/types/authen.ts
CHANGED
|
@@ -2,219 +2,261 @@ import { Internal } from '../internal'
|
|
|
2
2
|
|
|
3
3
|
declare module '../internal' {
|
|
4
4
|
interface Internal {
|
|
5
|
-
|
|
6
|
-
* 获取用户信息
|
|
7
|
-
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/authen-v1/user_info/get
|
|
8
|
-
*/
|
|
9
|
-
getAuthenUserInfo(): Promise<GetAuthenUserInfoResponse>
|
|
10
|
-
/**
|
|
11
|
-
* 获取 user_access_token
|
|
12
|
-
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/authen-v1/oidc-access_token/create
|
|
13
|
-
*/
|
|
14
|
-
createAuthenOidcAccessToken(body: CreateAuthenOidcAccessTokenRequest): Promise<CreateAuthenOidcAccessTokenResponse>
|
|
15
|
-
/**
|
|
16
|
-
* 刷新 user_access_token
|
|
17
|
-
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/authen-v1/oidc-refresh_access_token/create
|
|
18
|
-
*/
|
|
19
|
-
createAuthenOidcRefreshAccessToken(body: CreateAuthenOidcRefreshAccessTokenRequest): Promise<CreateAuthenOidcRefreshAccessTokenResponse>
|
|
20
|
-
/**
|
|
21
|
-
* 获取 user_access_token(v1 版本)
|
|
22
|
-
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/authen-v1/access_token/create
|
|
23
|
-
*/
|
|
24
|
-
createAuthenAccessToken(body: CreateAuthenAccessTokenRequest): Promise<CreateAuthenAccessTokenResponse>
|
|
25
|
-
/**
|
|
26
|
-
* 刷新 user_access_token(v1 版本)
|
|
27
|
-
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/authen-v1/refresh_access_token/create
|
|
28
|
-
*/
|
|
29
|
-
createAuthenRefreshAccessToken(body: CreateAuthenRefreshAccessTokenRequest): Promise<CreateAuthenRefreshAccessTokenResponse>
|
|
5
|
+
authen: Authen.Methods
|
|
30
6
|
}
|
|
31
7
|
}
|
|
32
8
|
|
|
33
|
-
export
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
/** 用户头像 72x72 */
|
|
41
|
-
avatar_thumb?: string
|
|
42
|
-
/** 用户头像 240x240 */
|
|
43
|
-
avatar_middle?: string
|
|
44
|
-
/** 用户头像 640x640 */
|
|
45
|
-
avatar_big?: string
|
|
46
|
-
/** 用户在应用内的唯一标识 */
|
|
47
|
-
open_id?: string
|
|
48
|
-
/** 用户统一ID */
|
|
49
|
-
union_id?: string
|
|
50
|
-
/** 用户邮箱 */
|
|
51
|
-
email?: string
|
|
52
|
-
/** 企业邮箱,请先确保已在管理后台启用飞书邮箱服务 */
|
|
53
|
-
enterprise_email?: string
|
|
54
|
-
/** 用户 user_id */
|
|
55
|
-
user_id?: string
|
|
56
|
-
/** 用户手机号 */
|
|
57
|
-
mobile?: string
|
|
58
|
-
/** 当前企业标识 */
|
|
59
|
-
tenant_key?: string
|
|
60
|
-
/** 用户工号 */
|
|
61
|
-
employee_no?: string
|
|
62
|
-
}
|
|
9
|
+
export namespace Authen {
|
|
10
|
+
export interface Methods {
|
|
11
|
+
userInfo: UserInfo.Methods
|
|
12
|
+
oidc: Oidc.Methods
|
|
13
|
+
accessToken: AccessToken.Methods
|
|
14
|
+
refreshAccessToken: RefreshAccessToken.Methods
|
|
15
|
+
}
|
|
63
16
|
|
|
64
|
-
export
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
17
|
+
export namespace UserInfo {
|
|
18
|
+
export interface Methods {
|
|
19
|
+
/**
|
|
20
|
+
* 获取用户信息
|
|
21
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/authen-v1/user_info/get
|
|
22
|
+
*/
|
|
23
|
+
get(): Promise<GetResponse>
|
|
24
|
+
}
|
|
70
25
|
|
|
71
|
-
export interface
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
26
|
+
export interface GetResponse {
|
|
27
|
+
/** 用户姓名 */
|
|
28
|
+
name?: string
|
|
29
|
+
/** 用户英文名称 */
|
|
30
|
+
en_name?: string
|
|
31
|
+
/** 用户头像 */
|
|
32
|
+
avatar_url?: string
|
|
33
|
+
/** 用户头像 72x72 */
|
|
34
|
+
avatar_thumb?: string
|
|
35
|
+
/** 用户头像 240x240 */
|
|
36
|
+
avatar_middle?: string
|
|
37
|
+
/** 用户头像 640x640 */
|
|
38
|
+
avatar_big?: string
|
|
39
|
+
/** 用户在应用内的唯一标识 */
|
|
40
|
+
open_id?: string
|
|
41
|
+
/** 用户统一ID */
|
|
42
|
+
union_id?: string
|
|
43
|
+
/** 用户邮箱 */
|
|
44
|
+
email?: string
|
|
45
|
+
/** 企业邮箱,请先确保已在管理后台启用飞书邮箱服务 */
|
|
46
|
+
enterprise_email?: string
|
|
47
|
+
/** 用户 user_id */
|
|
48
|
+
user_id?: string
|
|
49
|
+
/** 用户手机号 */
|
|
50
|
+
mobile?: string
|
|
51
|
+
/** 当前企业标识 */
|
|
52
|
+
tenant_key?: string
|
|
53
|
+
/** 用户工号 */
|
|
54
|
+
employee_no?: string
|
|
55
|
+
}
|
|
56
|
+
}
|
|
85
57
|
|
|
86
|
-
export
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
}
|
|
58
|
+
export namespace Oidc {
|
|
59
|
+
export interface Methods {
|
|
60
|
+
accessToken: AccessToken.Methods
|
|
61
|
+
refreshAccessToken: RefreshAccessToken.Methods
|
|
62
|
+
}
|
|
92
63
|
|
|
93
|
-
export
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
expires_in?: number
|
|
102
|
-
/** `refresh_token` 的有效期,单位: 秒,一般是30天左右,需要以返回结果为准 */
|
|
103
|
-
refresh_expires_in?: number
|
|
104
|
-
/** 用户授予app的权限全集 */
|
|
105
|
-
scope?: string
|
|
106
|
-
}
|
|
64
|
+
export namespace AccessToken {
|
|
65
|
+
export interface Methods {
|
|
66
|
+
/**
|
|
67
|
+
* 获取 user_access_token
|
|
68
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/authen-v1/oidc-access_token/create
|
|
69
|
+
*/
|
|
70
|
+
create(body: CreateRequest): Promise<CreateResponse>
|
|
71
|
+
}
|
|
107
72
|
|
|
108
|
-
export interface
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
}
|
|
73
|
+
export interface CreateRequest {
|
|
74
|
+
/** 授权类型,**固定值** */
|
|
75
|
+
grant_type: string
|
|
76
|
+
/** 登录预授权码 */
|
|
77
|
+
code: string
|
|
78
|
+
}
|
|
114
79
|
|
|
115
|
-
export interface
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
/** 用户头像 240x240 */
|
|
131
|
-
avatar_middle?: string
|
|
132
|
-
/** 用户头像 640x640 */
|
|
133
|
-
avatar_big?: string
|
|
134
|
-
/** 用户在应用内的唯一标识 */
|
|
135
|
-
open_id?: string
|
|
136
|
-
/** 用户统一ID */
|
|
137
|
-
union_id?: string
|
|
138
|
-
/** 用户邮箱 */
|
|
139
|
-
email?: string
|
|
140
|
-
/** 企业邮箱,请先确保已在管理后台启用飞书邮箱服务 */
|
|
141
|
-
enterprise_email?: string
|
|
142
|
-
/** 用户 user_id */
|
|
143
|
-
user_id?: string
|
|
144
|
-
/** 用户手机号 */
|
|
145
|
-
mobile?: string
|
|
146
|
-
/** 当前企业标识 */
|
|
147
|
-
tenant_key?: string
|
|
148
|
-
/** `refresh_token` 的有效期,单位: 秒 */
|
|
149
|
-
refresh_expires_in?: number
|
|
150
|
-
/** 刷新用户 `access_token` 时使用的 token */
|
|
151
|
-
refresh_token?: string
|
|
152
|
-
/** 用户当前登录态session的唯一标识,为空则不返回 */
|
|
153
|
-
sid?: string
|
|
154
|
-
}
|
|
80
|
+
export interface CreateResponse {
|
|
81
|
+
/** user_access_token,用于获取用户资源和访问某些open api */
|
|
82
|
+
access_token: string
|
|
83
|
+
/** 刷新用户 `access_token` 时使用的 token */
|
|
84
|
+
refresh_token?: string
|
|
85
|
+
/** token 类型,固定值 */
|
|
86
|
+
token_type: string
|
|
87
|
+
/** `access_token`的有效期,单位: 秒,一般是两个小时左右,需要以返回结果为准 */
|
|
88
|
+
expires_in?: number
|
|
89
|
+
/** `refresh_token` 的有效期,单位: 秒,一般是30天左右,需要以返回结果为准 */
|
|
90
|
+
refresh_expires_in?: number
|
|
91
|
+
/** 用户授予app的权限全集 */
|
|
92
|
+
scope?: string
|
|
93
|
+
}
|
|
94
|
+
}
|
|
155
95
|
|
|
156
|
-
export
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
96
|
+
export namespace RefreshAccessToken {
|
|
97
|
+
export interface Methods {
|
|
98
|
+
/**
|
|
99
|
+
* 刷新 user_access_token
|
|
100
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/authen-v1/oidc-refresh_access_token/create
|
|
101
|
+
*/
|
|
102
|
+
create(body: CreateRequest): Promise<CreateResponse>
|
|
103
|
+
}
|
|
162
104
|
|
|
163
|
-
export interface
|
|
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
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
105
|
+
export interface CreateRequest {
|
|
106
|
+
/** 授权类型,**固定值**: */
|
|
107
|
+
grant_type: string
|
|
108
|
+
/** 刷新 `user_access_token` 需要的凭证<br>获取user_access_token`接口和本接口均返回 `refresh_token`,**每次请求,请注意使用最新获取到的`refresh_token`** */
|
|
109
|
+
refresh_token: string
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
export interface CreateResponse {
|
|
113
|
+
/** user_access_token,用于获取用户资源和访问某些open api */
|
|
114
|
+
access_token: string
|
|
115
|
+
/** 刷新用户 `access_token` 时使用的 token */
|
|
116
|
+
refresh_token?: string
|
|
117
|
+
/** token 类型,固定值 */
|
|
118
|
+
token_type: string
|
|
119
|
+
/** `access_token`的有效期,单位: 秒,一般是两个小时左右,需要以返回结果为准 */
|
|
120
|
+
expires_in?: number
|
|
121
|
+
/** `refresh_token` 的有效期,单位: 秒,一般是30天左右,需要以返回结果为准 */
|
|
122
|
+
refresh_expires_in?: number
|
|
123
|
+
/** 用户授予app的权限全集 */
|
|
124
|
+
scope?: string
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
export namespace AccessToken {
|
|
130
|
+
export interface Methods {
|
|
131
|
+
/**
|
|
132
|
+
* 获取 user_access_token(v1 版本)
|
|
133
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/authen-v1/access_token/create
|
|
134
|
+
*/
|
|
135
|
+
create(body: CreateRequest): Promise<CreateResponse>
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
export interface CreateRequest {
|
|
139
|
+
/** 授权类型,**固定值** */
|
|
140
|
+
grant_type: string
|
|
141
|
+
/** 登录预授权码,调用[获取登录预授权码](https://open.feishu.cn/document/ukTMukTMukTM/ukzN4UjL5cDO14SO3gTN)接口获取 */
|
|
142
|
+
code: string
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
export interface CreateResponse {
|
|
146
|
+
/** user_access_token,用于获取用户资源 */
|
|
147
|
+
access_token?: string
|
|
148
|
+
/** token 类型 */
|
|
149
|
+
token_type?: string
|
|
150
|
+
/** `access_token`的有效期,单位: 秒 */
|
|
151
|
+
expires_in?: number
|
|
152
|
+
/** 用户姓名 */
|
|
153
|
+
name?: string
|
|
154
|
+
/** 用户英文名称 */
|
|
155
|
+
en_name?: string
|
|
156
|
+
/** 用户头像 */
|
|
157
|
+
avatar_url?: string
|
|
158
|
+
/** 用户头像 72x72 */
|
|
159
|
+
avatar_thumb?: string
|
|
160
|
+
/** 用户头像 240x240 */
|
|
161
|
+
avatar_middle?: string
|
|
162
|
+
/** 用户头像 640x640 */
|
|
163
|
+
avatar_big?: string
|
|
164
|
+
/** 用户在应用内的唯一标识 */
|
|
165
|
+
open_id?: string
|
|
166
|
+
/** 用户统一ID */
|
|
167
|
+
union_id?: string
|
|
168
|
+
/** 用户邮箱 */
|
|
169
|
+
email?: string
|
|
170
|
+
/** 企业邮箱,请先确保已在管理后台启用飞书邮箱服务 */
|
|
171
|
+
enterprise_email?: string
|
|
172
|
+
/** 用户 user_id */
|
|
173
|
+
user_id?: string
|
|
174
|
+
/** 用户手机号 */
|
|
175
|
+
mobile?: string
|
|
176
|
+
/** 当前企业标识 */
|
|
177
|
+
tenant_key?: string
|
|
178
|
+
/** `refresh_token` 的有效期,单位: 秒 */
|
|
179
|
+
refresh_expires_in?: number
|
|
180
|
+
/** 刷新用户 `access_token` 时使用的 token */
|
|
181
|
+
refresh_token?: string
|
|
182
|
+
/** 用户当前登录态session的唯一标识,为空则不返回 */
|
|
183
|
+
sid?: string
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
export namespace RefreshAccessToken {
|
|
188
|
+
export interface Methods {
|
|
189
|
+
/**
|
|
190
|
+
* 刷新 user_access_token(v1 版本)
|
|
191
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/authen-v1/refresh_access_token/create
|
|
192
|
+
*/
|
|
193
|
+
create(body: CreateRequest): Promise<CreateResponse>
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
export interface CreateRequest {
|
|
197
|
+
/** 授权类型,**固定值**: */
|
|
198
|
+
grant_type: string
|
|
199
|
+
/** 刷新 `user_access_token` 需要的凭证<br>获取user_access_token`接口和本接口均返回 `refresh_token`,**每次请求,请注意使用最新获取到的`refresh_token`** */
|
|
200
|
+
refresh_token: string
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
export interface CreateResponse {
|
|
204
|
+
/** user_access_token,用于获取用户资源 */
|
|
205
|
+
access_token?: string
|
|
206
|
+
/** token 类型 */
|
|
207
|
+
token_type?: string
|
|
208
|
+
/** `access_token`的有效期,单位: 秒 */
|
|
209
|
+
expires_in?: number
|
|
210
|
+
/** 用户姓名 */
|
|
211
|
+
name?: string
|
|
212
|
+
/** 用户英文名称 */
|
|
213
|
+
en_name?: string
|
|
214
|
+
/** 用户头像 */
|
|
215
|
+
avatar_url?: string
|
|
216
|
+
/** 用户头像 72x72 */
|
|
217
|
+
avatar_thumb?: string
|
|
218
|
+
/** 用户头像 240x240 */
|
|
219
|
+
avatar_middle?: string
|
|
220
|
+
/** 用户头像 640x640 */
|
|
221
|
+
avatar_big?: string
|
|
222
|
+
/** 用户在应用内的唯一标识 */
|
|
223
|
+
open_id?: string
|
|
224
|
+
/** 用户统一ID */
|
|
225
|
+
union_id?: string
|
|
226
|
+
/** 用户邮箱 */
|
|
227
|
+
email?: string
|
|
228
|
+
/** 企业邮箱,请先确保已在管理后台启用飞书邮箱服务 */
|
|
229
|
+
enterprise_email?: string
|
|
230
|
+
/** 用户 user_id */
|
|
231
|
+
user_id?: string
|
|
232
|
+
/** 用户手机号 */
|
|
233
|
+
mobile?: string
|
|
234
|
+
/** 当前企业标识 */
|
|
235
|
+
tenant_key?: string
|
|
236
|
+
/** `refresh_token` 的有效期,单位: 秒 */
|
|
237
|
+
refresh_expires_in?: number
|
|
238
|
+
/** 刷新用户 `access_token` 时使用的 token */
|
|
239
|
+
refresh_token?: string
|
|
240
|
+
/** 用户当前登录态session的唯一标识,为空则不返回 */
|
|
241
|
+
sid?: string
|
|
242
|
+
}
|
|
243
|
+
}
|
|
202
244
|
}
|
|
203
245
|
|
|
204
246
|
Internal.define({
|
|
205
247
|
'/authen/v1/user_info': {
|
|
206
|
-
GET: '
|
|
248
|
+
GET: 'authen.userInfo.get',
|
|
207
249
|
},
|
|
208
250
|
'/authen/v1/oidc/access_token': {
|
|
209
|
-
POST: '
|
|
251
|
+
POST: 'authen.oidc.accessToken.create',
|
|
210
252
|
},
|
|
211
253
|
'/authen/v1/oidc/refresh_access_token': {
|
|
212
|
-
POST: '
|
|
254
|
+
POST: 'authen.oidc.refreshAccessToken.create',
|
|
213
255
|
},
|
|
214
256
|
'/authen/v1/access_token': {
|
|
215
|
-
POST: '
|
|
257
|
+
POST: 'authen.accessToken.create',
|
|
216
258
|
},
|
|
217
259
|
'/authen/v1/refresh_access_token': {
|
|
218
|
-
POST: '
|
|
260
|
+
POST: 'authen.refreshAccessToken.create',
|
|
219
261
|
},
|
|
220
262
|
})
|