@satorijs/adapter-lark 3.10.6 → 3.11.1

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.
Files changed (119) hide show
  1. package/lib/content.d.ts +211 -93
  2. package/lib/index.cjs +2954 -2474
  3. package/lib/internal.d.ts +4 -4
  4. package/lib/message.d.ts +2 -3
  5. package/lib/types/acs.d.ts +212 -172
  6. package/lib/types/admin.d.ts +331 -291
  7. package/lib/types/aily.d.ts +331 -216
  8. package/lib/types/apaas.d.ts +646 -494
  9. package/lib/types/application.d.ts +559 -458
  10. package/lib/types/approval.d.ts +826 -791
  11. package/lib/types/attendance.d.ts +1094 -994
  12. package/lib/types/auth.d.ts +66 -61
  13. package/lib/types/authen.d.ts +221 -186
  14. package/lib/types/baike.d.ts +258 -233
  15. package/lib/types/base.d.ts +74 -0
  16. package/lib/types/bitable.d.ts +830 -770
  17. package/lib/types/board.d.ts +29 -14
  18. package/lib/types/calendar.d.ts +660 -605
  19. package/lib/types/cardkit.d.ts +149 -134
  20. package/lib/types/compensation.d.ts +84 -49
  21. package/lib/types/contact.d.ts +1279 -1204
  22. package/lib/types/corehr.d.ts +4982 -4526
  23. package/lib/types/directory.d.ts +447 -0
  24. package/lib/types/docs.d.ts +28 -18
  25. package/lib/types/document_ai.d.ts +347 -252
  26. package/lib/types/docx.d.ts +428 -383
  27. package/lib/types/drive.d.ts +1093 -1048
  28. package/lib/types/ehr.d.ts +66 -51
  29. package/lib/types/event.d.ts +16 -6
  30. package/lib/types/helpdesk.d.ts +816 -741
  31. package/lib/types/hire.d.ts +3955 -3589
  32. package/lib/types/human_authentication.d.ts +32 -22
  33. package/lib/types/im.d.ts +1420 -1295
  34. package/lib/types/index.d.ts +1422 -330
  35. package/lib/types/lingo.d.ts +279 -249
  36. package/lib/types/mail.d.ts +1032 -675
  37. package/lib/types/mdm.d.ts +105 -37
  38. package/lib/types/minutes.d.ts +73 -26
  39. package/lib/types/moments.d.ts +23 -13
  40. package/lib/types/okr.d.ts +266 -225
  41. package/lib/types/optical_char_recognition.d.ts +22 -12
  42. package/lib/types/passport.d.ts +58 -48
  43. package/lib/types/payroll.d.ts +210 -53
  44. package/lib/types/performance.d.ts +463 -414
  45. package/lib/types/personal_settings.d.ts +93 -82
  46. package/lib/types/report.d.ts +79 -58
  47. package/lib/types/search.d.ts +265 -235
  48. package/lib/types/security_and_compliance.d.ts +30 -19
  49. package/lib/types/sheets.d.ts +356 -321
  50. package/lib/types/speech_to_text.d.ts +44 -34
  51. package/lib/types/task.d.ts +998 -1087
  52. package/lib/types/tenant.d.ts +25 -15
  53. package/lib/types/translation.d.ts +42 -32
  54. package/lib/types/trust_party.d.ts +81 -0
  55. package/lib/types/vc.d.ts +1218 -1123
  56. package/lib/types/verification.d.ts +11 -6
  57. package/lib/types/wiki.d.ts +270 -235
  58. package/lib/types/workplace.d.ts +58 -38
  59. package/lib/utils.d.ts +2 -2
  60. package/package.json +4 -4
  61. package/src/bot.ts +15 -15
  62. package/src/content.ts +230 -107
  63. package/src/internal.ts +29 -12
  64. package/src/message.ts +82 -111
  65. package/src/types/acs.ts +234 -186
  66. package/src/types/admin.ts +353 -305
  67. package/src/types/aily.ts +375 -233
  68. package/src/types/apaas.ts +754 -568
  69. package/src/types/application.ts +633 -507
  70. package/src/types/approval.ts +914 -872
  71. package/src/types/attendance.ts +1226 -1104
  72. package/src/types/auth.ts +72 -66
  73. package/src/types/authen.ts +233 -191
  74. package/src/types/baike.ts +276 -246
  75. package/src/types/base.ts +93 -0
  76. package/src/types/bitable.ts +966 -894
  77. package/src/types/board.ts +34 -16
  78. package/src/types/calendar.ts +751 -685
  79. package/src/types/cardkit.ts +164 -146
  80. package/src/types/compensation.ts +97 -55
  81. package/src/types/contact.ts +1465 -1375
  82. package/src/types/corehr.ts +5664 -5077
  83. package/src/types/directory.ts +569 -0
  84. package/src/types/docs.ts +31 -19
  85. package/src/types/document_ai.ts +401 -287
  86. package/src/types/docx.ts +492 -438
  87. package/src/types/drive.ts +1266 -1213
  88. package/src/types/ehr.ts +71 -53
  89. package/src/types/event.ts +19 -7
  90. package/src/types/helpdesk.ts +930 -840
  91. package/src/types/hire.ts +4453 -4019
  92. package/src/types/human_authentication.ts +35 -23
  93. package/src/types/im.ts +1626 -1476
  94. package/src/types/index.ts +1532 -346
  95. package/src/types/lingo.ts +299 -263
  96. package/src/types/mail.ts +1231 -779
  97. package/src/types/mdm.ts +122 -39
  98. package/src/types/minutes.ts +88 -28
  99. package/src/types/moments.ts +26 -14
  100. package/src/types/okr.ts +286 -238
  101. package/src/types/optical_char_recognition.ts +25 -13
  102. package/src/types/passport.ts +62 -50
  103. package/src/types/payroll.ts +254 -57
  104. package/src/types/performance.ts +528 -467
  105. package/src/types/personal_settings.ts +101 -89
  106. package/src/types/report.ts +86 -62
  107. package/src/types/search.ts +285 -249
  108. package/src/types/security_and_compliance.ts +33 -21
  109. package/src/types/sheets.ts +421 -379
  110. package/src/types/speech_to_text.ts +48 -36
  111. package/src/types/task.ts +1152 -1260
  112. package/src/types/tenant.ts +29 -17
  113. package/src/types/translation.ts +46 -34
  114. package/src/types/trust_party.ts +110 -0
  115. package/src/types/vc.ts +1397 -1283
  116. package/src/types/verification.ts +13 -7
  117. package/src/types/wiki.ts +293 -251
  118. package/src/types/workplace.ts +65 -41
  119. package/src/utils.ts +3 -3
package/src/types/okr.ts CHANGED
@@ -1,293 +1,341 @@
1
- import { ContentBlock, OkrBatch, OkrReview, Period, PeriodRule } from '.'
2
- import { Internal } from '../internal'
1
+ import * as Lark from '.'
2
+ import { Internal, Paginated, Pagination } from '../internal'
3
3
 
4
4
  declare module '../internal' {
5
5
  interface Internal {
6
- /**
7
- * 创建 OKR 周期
8
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/okr-v1/period/create
9
- */
10
- createOkrPeriod(body: CreateOkrPeriodRequest): Promise<CreateOkrPeriodResponse>
11
- /**
12
- * 修改 OKR 周期状态
13
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/okr-v1/period/patch
14
- */
15
- patchOkrPeriod(period_id: string, body: PatchOkrPeriodRequest): Promise<PatchOkrPeriodResponse>
16
- /**
17
- * 获取 OKR 周期列表
18
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/okr-v1/period/list
19
- */
20
- listOkrPeriod(query?: Pagination): Paginated<Period>
21
- /**
22
- * 获取 OKR 周期规则
23
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/okr-v1/period_rule/list
24
- */
25
- listOkrPeriodRule(): Promise<ListOkrPeriodRuleResponse>
26
- /**
27
- * 获取用户的 OKR 列表
28
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/okr-v1/user-okr/list
29
- */
30
- listOkrUserOkr(user_id: string, query?: ListOkrUserOkrQuery): Promise<ListOkrUserOkrResponse>
6
+ okr: Okr.Methods
7
+ }
8
+ }
9
+
10
+ export namespace Okr {
11
+ export interface Methods {
12
+ period: Period.Methods
13
+ periodRule: PeriodRule.Methods
14
+ user: User.Methods
15
+ progressRecord: ProgressRecord.Methods
16
+ image: Image.Methods
17
+ review: Review.Methods
31
18
  /**
32
19
  * 批量获取 OKR
33
20
  * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/okr-v1/okr/batch_get
34
21
  */
35
- batchGetOkr(query?: BatchGetOkrQuery): Promise<BatchGetOkrResponse>
36
- /**
37
- * 创建 OKR 进展记录
38
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/okr-v1/progress_record/create
39
- */
40
- createOkrProgressRecord(body: CreateOkrProgressRecordRequest, query?: CreateOkrProgressRecordQuery): Promise<CreateOkrProgressRecordResponse>
41
- /**
42
- * 删除 OKR 进展记录
43
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/okr-v1/progress_record/delete
44
- */
45
- deleteOkrProgressRecord(progress_id: string): Promise<void>
46
- /**
47
- * 更新 OKR 进展记录
48
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/okr-v1/progress_record/update
49
- */
50
- updateOkrProgressRecord(progress_id: string, body: UpdateOkrProgressRecordRequest, query?: UpdateOkrProgressRecordQuery): Promise<UpdateOkrProgressRecordResponse>
51
- /**
52
- * 获取 OKR 进展记录
53
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/okr-v1/progress_record/get
54
- */
55
- getOkrProgressRecord(progress_id: string, query?: GetOkrProgressRecordQuery): Promise<GetOkrProgressRecordResponse>
56
- /**
57
- * 上传进展记录图片
58
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/okr-v1/image/upload
59
- */
60
- uploadOkrImage(form: UploadOkrImageForm): Promise<UploadOkrImageResponse>
61
- /**
62
- * 查询复盘信息
63
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/okr-v1/review/query
64
- */
65
- queryOkrReview(query?: QueryOkrReviewQuery): Promise<QueryOkrReviewResponse>
22
+ batchGet(query?: BatchGetQuery): Promise<BatchGetResponse>
66
23
  }
67
- }
68
24
 
69
- export interface CreateOkrPeriodRequest {
70
- /** 周期规则 id */
71
- period_rule_id: string
72
- /** 周期起始年月 */
73
- start_month: string
74
- }
25
+ export interface BatchGetQuery {
26
+ /** 此次调用中使用的用户ID的类型 */
27
+ user_id_type?: 'user_id' | 'union_id' | 'open_id' | 'people_admin_id'
28
+ /** OKR ID 列表,最多10个 */
29
+ okr_ids: string[]
30
+ /** 请求OKR的语言版本(比如@的人名),lang=en_us/zh_cn,请求 Query中 */
31
+ lang?: string
32
+ }
75
33
 
76
- export interface CreateOkrPeriodResponse {
77
- /** 周期id */
78
- period_id?: string
79
- /** 周期起始年月 */
80
- start_month?: string
81
- /** 周期结束年月 */
82
- end_month?: string
83
- }
34
+ export interface BatchGetResponse {
35
+ /** OKR 列表 */
36
+ okr_list?: Lark.OkrBatch[]
37
+ }
84
38
 
85
- export const enum PatchOkrPeriodRequestStatus {
86
- /** 正常状态 */
87
- NormalStatus = 1,
88
- /** 标记失效 */
89
- MarkInvalid = 2,
90
- /** 隐藏周期 */
91
- HiddenPeriod = 3,
92
- }
39
+ export namespace Period {
40
+ export interface Methods {
41
+ /**
42
+ * 创建 OKR 周期
43
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/okr-v1/period/create
44
+ */
45
+ create(body: CreateRequest): Promise<CreateResponse>
46
+ /**
47
+ * 修改 OKR 周期状态
48
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/okr-v1/period/patch
49
+ */
50
+ patch(period_id: string, body: PatchRequest): Promise<PatchResponse>
51
+ /**
52
+ * 获取 OKR 周期列表
53
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/okr-v1/period/list
54
+ */
55
+ list(query?: Pagination): Paginated<Lark.Period>
56
+ }
93
57
 
94
- export interface PatchOkrPeriodRequest {
95
- /** 周期显示状态 */
96
- status: PatchOkrPeriodRequestStatus
97
- }
58
+ export interface CreateRequest {
59
+ /** 周期规则 id */
60
+ period_rule_id: string
61
+ /** 周期起始年月 */
62
+ start_month: string
63
+ }
98
64
 
99
- export const enum PatchOkrPeriodResponseStatus {
100
- /** 正常状态 */
101
- NormalStatus = 1,
102
- /** 标记失效 */
103
- MarkInvalid = 2,
104
- /** 隐藏周期 */
105
- HiddenPeriod = 3,
106
- }
65
+ export interface CreateResponse {
66
+ /** 周期id */
67
+ period_id?: string
68
+ /** 周期起始年月 */
69
+ start_month?: string
70
+ /** 周期结束年月 */
71
+ end_month?: string
72
+ }
107
73
 
108
- export interface PatchOkrPeriodResponse {
109
- /** 周期规则id */
110
- period_id?: string
111
- /** 周期显示状态 */
112
- status?: PatchOkrPeriodResponseStatus
113
- }
74
+ export const enum PatchRequestStatus {
75
+ /** 正常状态 */
76
+ NormalStatus = 1,
77
+ /** 标记失效 */
78
+ MarkInvalid = 2,
79
+ /** 隐藏周期 */
80
+ HiddenPeriod = 3,
81
+ }
114
82
 
115
- export interface ListOkrPeriodRuleResponse {
116
- /** 指标库列表 */
117
- period_rules?: PeriodRule[]
118
- }
83
+ export interface PatchRequest {
84
+ /** 周期显示状态 */
85
+ status: PatchRequestStatus
86
+ }
119
87
 
120
- export interface ListOkrUserOkrQuery {
121
- /** 此次调用中使用的用户ID的类型 */
122
- user_id_type?: 'user_id' | 'union_id' | 'open_id' | 'people_admin_id'
123
- /** 请求列表的偏移,offset>=0 */
124
- offset: string
125
- /** 列表长度,0-10 */
126
- limit: string
127
- /** 请求OKR的语言版本(比如@的人名),lang=en_us/zh_cn */
128
- lang?: string
129
- /** period_id列表,最多10个 */
130
- period_ids?: string[]
131
- }
88
+ export const enum PatchResponseStatus {
89
+ /** 正常状态 */
90
+ NormalStatus = 1,
91
+ /** 标记失效 */
92
+ MarkInvalid = 2,
93
+ /** 隐藏周期 */
94
+ HiddenPeriod = 3,
95
+ }
132
96
 
133
- export interface ListOkrUserOkrResponse {
134
- /** OKR周期总数 */
135
- total?: number
136
- /** OKR 列表 */
137
- okr_list?: OkrBatch[]
138
- }
97
+ export interface PatchResponse {
98
+ /** 周期规则id */
99
+ period_id?: string
100
+ /** 周期显示状态 */
101
+ status?: PatchResponseStatus
102
+ }
103
+ }
139
104
 
140
- export interface BatchGetOkrQuery {
141
- /** 此次调用中使用的用户ID的类型 */
142
- user_id_type?: 'user_id' | 'union_id' | 'open_id' | 'people_admin_id'
143
- /** OKR ID 列表,最多10个 */
144
- okr_ids: string[]
145
- /** 请求OKR的语言版本(比如@的人名),lang=en_us/zh_cn,请求 Query中 */
146
- lang?: string
147
- }
105
+ export namespace PeriodRule {
106
+ export interface Methods {
107
+ /**
108
+ * 获取 OKR 周期规则
109
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/okr-v1/period_rule/list
110
+ */
111
+ list(): Promise<ListResponse>
112
+ }
148
113
 
149
- export interface BatchGetOkrResponse {
150
- /** OKR 列表 */
151
- okr_list?: OkrBatch[]
152
- }
114
+ export interface ListResponse {
115
+ /** 指标库列表 */
116
+ period_rules?: Lark.PeriodRule[]
117
+ }
118
+ }
153
119
 
154
- export const enum CreateOkrProgressRecordRequestTargetType {
155
- /** okr的O */
156
- Objective = 2,
157
- /** okr的KR */
158
- KeyResult = 3,
159
- }
120
+ export namespace User {
121
+ export interface Methods {
122
+ okr: Okr.Methods
123
+ }
160
124
 
161
- export interface CreateOkrProgressRecordRequest {
162
- /** 进展来源 */
163
- source_title: string
164
- /** 进展来源链接 */
165
- source_url: string
166
- /** 目标id,与target_type对应 */
167
- target_id: string
168
- /** 目标类型 */
169
- target_type: CreateOkrProgressRecordRequestTargetType
170
- /** 进展详情 富文本格式 */
171
- content: ContentBlock
172
- /** pc进展来源链接 */
173
- source_url_pc?: string
174
- /** mobile进展来源链接 */
175
- source_url_mobile?: string
176
- }
125
+ export namespace Okr {
126
+ export interface Methods {
127
+ /**
128
+ * 获取用户的 OKR 列表
129
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/okr-v1/user-okr/list
130
+ */
131
+ list(user_id: string, query?: ListQuery): Promise<ListResponse>
132
+ }
177
133
 
178
- export interface CreateOkrProgressRecordQuery {
179
- /** 此次调用中使用的用户ID的类型 */
180
- user_id_type?: 'user_id' | 'union_id' | 'open_id'
181
- }
134
+ export interface ListQuery {
135
+ /** 此次调用中使用的用户ID的类型 */
136
+ user_id_type?: 'user_id' | 'union_id' | 'open_id' | 'people_admin_id'
137
+ /** 请求列表的偏移,offset>=0 */
138
+ offset: string
139
+ /** 列表长度,0-10 */
140
+ limit: string
141
+ /** 请求OKR的语言版本(比如@的人名),lang=en_us/zh_cn */
142
+ lang?: string
143
+ /** period_id列表,最多10个 */
144
+ period_ids?: string[]
145
+ }
182
146
 
183
- export interface CreateOkrProgressRecordResponse {
184
- /** OKR 进展ID */
185
- progress_id?: string
186
- /** 进展更新时间 毫秒 */
187
- modify_time?: string
188
- /** 进展 对应的 Content 详细内容 */
189
- content?: ContentBlock
190
- }
147
+ export interface ListResponse {
148
+ /** OKR周期总数 */
149
+ total?: number
150
+ /** OKR 列表 */
151
+ okr_list?: Lark.OkrBatch[]
152
+ }
153
+ }
154
+ }
191
155
 
192
- export interface UpdateOkrProgressRecordRequest {
193
- /** 进展详情 富文本格式 */
194
- content: ContentBlock
195
- }
156
+ export namespace ProgressRecord {
157
+ export interface Methods {
158
+ /**
159
+ * 创建 OKR 进展记录
160
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/okr-v1/progress_record/create
161
+ */
162
+ create(body: CreateRequest, query?: CreateQuery): Promise<CreateResponse>
163
+ /**
164
+ * 删除 OKR 进展记录
165
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/okr-v1/progress_record/delete
166
+ */
167
+ delete(progress_id: string): Promise<void>
168
+ /**
169
+ * 更新 OKR 进展记录
170
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/okr-v1/progress_record/update
171
+ */
172
+ update(progress_id: string, body: UpdateRequest, query?: UpdateQuery): Promise<UpdateResponse>
173
+ /**
174
+ * 获取 OKR 进展记录
175
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/okr-v1/progress_record/get
176
+ */
177
+ get(progress_id: string, query?: GetQuery): Promise<GetResponse>
178
+ }
196
179
 
197
- export interface UpdateOkrProgressRecordQuery {
198
- /** 此次调用中使用的用户ID的类型 */
199
- user_id_type?: 'user_id' | 'union_id' | 'open_id'
200
- }
180
+ export const enum CreateRequestTargetType {
181
+ /** okr的O */
182
+ Objective = 2,
183
+ /** okr的KR */
184
+ KeyResult = 3,
185
+ }
201
186
 
202
- export interface UpdateOkrProgressRecordResponse {
203
- /** OKR 进展ID */
204
- progress_id?: string
205
- /** 进展更新时间 毫秒 */
206
- modify_time?: string
207
- /** 进展 对应的 Content 详细内容 */
208
- content?: ContentBlock
209
- }
187
+ export interface CreateRequest {
188
+ /** 进展来源 */
189
+ source_title: string
190
+ /** 进展来源链接 */
191
+ source_url: string
192
+ /** 目标id,与target_type对应 */
193
+ target_id: string
194
+ /** 目标类型 */
195
+ target_type: CreateRequestTargetType
196
+ /** 进展详情 富文本格式 */
197
+ content: Lark.ContentBlock
198
+ /** pc进展来源链接 */
199
+ source_url_pc?: string
200
+ /** mobile进展来源链接 */
201
+ source_url_mobile?: string
202
+ }
210
203
 
211
- export interface GetOkrProgressRecordQuery {
212
- /** 此次调用中使用的用户ID的类型 */
213
- user_id_type?: 'user_id' | 'union_id' | 'open_id'
214
- }
204
+ export interface CreateQuery {
205
+ /** 此次调用中使用的用户ID的类型 */
206
+ user_id_type?: 'user_id' | 'union_id' | 'open_id'
207
+ }
215
208
 
216
- export interface GetOkrProgressRecordResponse {
217
- /** OKR 进展ID */
218
- progress_id?: string
219
- /** 进展更新时间 毫秒 */
220
- modify_time?: string
221
- /** 进展 对应的 Content 详细内容 */
222
- content?: ContentBlock
223
- }
209
+ export interface CreateResponse {
210
+ /** OKR 进展ID */
211
+ progress_id?: string
212
+ /** 进展更新时间 毫秒 */
213
+ modify_time?: string
214
+ /** 进展 对应的 Content 详细内容 */
215
+ content?: Lark.ContentBlock
216
+ }
224
217
 
225
- export const enum UploadOkrImageFormTargetType {
226
- /** okr的O */
227
- Objective = 2,
228
- /** okr的KR */
229
- KeyResult = 3,
230
- }
218
+ export interface UpdateRequest {
219
+ /** 进展详情 富文本格式 */
220
+ content: Lark.ContentBlock
221
+ }
231
222
 
232
- export interface UploadOkrImageForm {
233
- /** 图片 */
234
- data: Blob
235
- /** 图片的目标ID */
236
- target_id: string
237
- /** 图片使用的目标类型 */
238
- target_type: UploadOkrImageFormTargetType
239
- }
223
+ export interface UpdateQuery {
224
+ /** 此次调用中使用的用户ID的类型 */
225
+ user_id_type?: 'user_id' | 'union_id' | 'open_id'
226
+ }
240
227
 
241
- export interface UploadOkrImageResponse {
242
- /** 图片token */
243
- file_token?: string
244
- /** 图片下载链接 */
245
- url?: string
246
- }
228
+ export interface UpdateResponse {
229
+ /** OKR 进展ID */
230
+ progress_id?: string
231
+ /** 进展更新时间 毫秒 */
232
+ modify_time?: string
233
+ /** 进展 对应的 Content 详细内容 */
234
+ content?: Lark.ContentBlock
235
+ }
247
236
 
248
- export interface QueryOkrReviewQuery {
249
- /** 此次调用中使用的用户ID的类型 */
250
- user_id_type?: 'user_id' | 'union_id' | 'open_id' | 'people_admin_id'
251
- /** 目标用户id列表,最多5个 */
252
- user_ids: string[]
253
- /** period_id列表,最多5个 */
254
- period_ids: string[]
255
- }
237
+ export interface GetQuery {
238
+ /** 此次调用中使用的用户ID的类型 */
239
+ user_id_type?: 'user_id' | 'union_id' | 'open_id'
240
+ }
241
+
242
+ export interface GetResponse {
243
+ /** OKR 进展ID */
244
+ progress_id?: string
245
+ /** 进展更新时间 毫秒 */
246
+ modify_time?: string
247
+ /** 进展 对应的 Content 详细内容 */
248
+ content?: Lark.ContentBlock
249
+ }
250
+ }
256
251
 
257
- export interface QueryOkrReviewResponse {
258
- /** OKR复盘 列表 */
259
- review_list?: OkrReview[]
252
+ export namespace Image {
253
+ export interface Methods {
254
+ /**
255
+ * 上传进展记录图片
256
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/okr-v1/image/upload
257
+ */
258
+ upload(form: UploadForm): Promise<UploadResponse>
259
+ }
260
+
261
+ export const enum UploadFormTargetType {
262
+ /** okr的O */
263
+ Objective = 2,
264
+ /** okr的KR */
265
+ KeyResult = 3,
266
+ }
267
+
268
+ export interface UploadForm {
269
+ /** 图片 */
270
+ data: Blob
271
+ /** 图片的目标ID */
272
+ target_id: string
273
+ /** 图片使用的目标类型 */
274
+ target_type: UploadFormTargetType
275
+ }
276
+
277
+ export interface UploadResponse {
278
+ /** 图片token */
279
+ file_token?: string
280
+ /** 图片下载链接 */
281
+ url?: string
282
+ }
283
+ }
284
+
285
+ export namespace Review {
286
+ export interface Methods {
287
+ /**
288
+ * 查询复盘信息
289
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/okr-v1/review/query
290
+ */
291
+ query(query?: QueryQuery): Promise<QueryResponse>
292
+ }
293
+
294
+ export interface QueryQuery {
295
+ /** 此次调用中使用的用户ID的类型 */
296
+ user_id_type?: 'user_id' | 'union_id' | 'open_id' | 'people_admin_id'
297
+ /** 目标用户id列表,最多5个 */
298
+ user_ids: string[]
299
+ /** period_id列表,最多5个 */
300
+ period_ids: string[]
301
+ }
302
+
303
+ export interface QueryResponse {
304
+ /** OKR复盘 列表 */
305
+ review_list?: Lark.OkrReview[]
306
+ }
307
+ }
260
308
  }
261
309
 
262
310
  Internal.define({
263
311
  '/okr/v1/periods': {
264
- POST: 'createOkrPeriod',
265
- GET: { name: 'listOkrPeriod', pagination: { argIndex: 0 } },
312
+ POST: 'okr.period.create',
313
+ GET: { name: 'okr.period.list', pagination: { argIndex: 0 } },
266
314
  },
267
315
  '/okr/v1/periods/{period_id}': {
268
- PATCH: 'patchOkrPeriod',
316
+ PATCH: 'okr.period.patch',
269
317
  },
270
318
  '/okr/v1/period_rules': {
271
- GET: 'listOkrPeriodRule',
319
+ GET: 'okr.periodRule.list',
272
320
  },
273
321
  '/okr/v1/users/{user_id}/okrs': {
274
- GET: 'listOkrUserOkr',
322
+ GET: 'okr.user.okr.list',
275
323
  },
276
324
  '/okr/v1/okrs/batch_get': {
277
- GET: 'batchGetOkr',
325
+ GET: 'okr.batchGet',
278
326
  },
279
327
  '/okr/v1/progress_records': {
280
- POST: 'createOkrProgressRecord',
328
+ POST: 'okr.progressRecord.create',
281
329
  },
282
330
  '/okr/v1/progress_records/{progress_id}': {
283
- DELETE: 'deleteOkrProgressRecord',
284
- PUT: 'updateOkrProgressRecord',
285
- GET: 'getOkrProgressRecord',
331
+ DELETE: 'okr.progressRecord.delete',
332
+ PUT: 'okr.progressRecord.update',
333
+ GET: 'okr.progressRecord.get',
286
334
  },
287
335
  '/okr/v1/images/upload': {
288
- POST: { name: 'uploadOkrImage', multipart: true },
336
+ POST: { name: 'okr.image.upload', multipart: true },
289
337
  },
290
338
  '/okr/v1/reviews/query': {
291
- GET: 'queryOkrReview',
339
+ GET: 'okr.review.query',
292
340
  },
293
341
  })
@@ -2,26 +2,38 @@ 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/ai/optical_char_recognition-v1/image/basic_recognize
8
- */
9
- basicRecognizeOpticalCharRecognitionImage(body: BasicRecognizeOpticalCharRecognitionImageRequest): Promise<BasicRecognizeOpticalCharRecognitionImageResponse>
5
+ opticalCharRecognition: OpticalCharRecognition.Methods
10
6
  }
11
7
  }
12
8
 
13
- export interface BasicRecognizeOpticalCharRecognitionImageRequest {
14
- /** base64 后的图片数据 */
15
- image?: string
16
- }
9
+ export namespace OpticalCharRecognition {
10
+ export interface Methods {
11
+ image: Image.Methods
12
+ }
13
+
14
+ export namespace Image {
15
+ export interface Methods {
16
+ /**
17
+ * 识别图片中的文字
18
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/ai/optical_char_recognition-v1/image/basic_recognize
19
+ */
20
+ basicRecognize(body: BasicRecognizeRequest): Promise<BasicRecognizeResponse>
21
+ }
17
22
 
18
- export interface BasicRecognizeOpticalCharRecognitionImageResponse {
19
- /** 按区域识别,返回文本列表 */
20
- text_list: string[]
23
+ export interface BasicRecognizeRequest {
24
+ /** base64 后的图片数据 */
25
+ image?: string
26
+ }
27
+
28
+ export interface BasicRecognizeResponse {
29
+ /** 按区域识别,返回文本列表 */
30
+ text_list: string[]
31
+ }
32
+ }
21
33
  }
22
34
 
23
35
  Internal.define({
24
36
  '/optical_char_recognition/v1/image/basic_recognize': {
25
- POST: 'basicRecognizeOpticalCharRecognitionImage',
37
+ POST: 'opticalCharRecognition.image.basicRecognize',
26
38
  },
27
39
  })