@satorijs/adapter-lark 3.11.8 → 3.12.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.
Files changed (68) hide show
  1. package/lib/bot.d.ts +5 -5
  2. package/lib/http.d.ts +6 -3
  3. package/lib/index.cjs +634 -261
  4. package/lib/types/acs.d.ts +4 -1
  5. package/lib/types/aily.d.ts +3 -3
  6. package/lib/types/apaas.d.ts +190 -28
  7. package/lib/types/application.d.ts +20 -4
  8. package/lib/types/approval.d.ts +0 -13
  9. package/lib/types/attendance.d.ts +11 -5
  10. package/lib/types/authen.d.ts +8 -2
  11. package/lib/types/bitable.d.ts +25 -4
  12. package/lib/types/board.d.ts +56 -0
  13. package/lib/types/calendar.d.ts +71 -5
  14. package/lib/types/cardkit.d.ts +2 -2
  15. package/lib/types/compensation.d.ts +400 -0
  16. package/lib/types/contact.d.ts +55 -12
  17. package/lib/types/corehr.d.ts +1287 -79
  18. package/lib/types/directory.d.ts +3 -41
  19. package/lib/types/docx.d.ts +23 -0
  20. package/lib/types/drive.d.ts +107 -90
  21. package/lib/types/ehr.d.ts +11 -2
  22. package/lib/types/helpdesk.d.ts +15 -6
  23. package/lib/types/hire.d.ts +52 -3
  24. package/lib/types/human_authentication.d.ts +1 -1
  25. package/lib/types/im.d.ts +77 -21
  26. package/lib/types/index.d.ts +1670 -105
  27. package/lib/types/mail.d.ts +106 -16
  28. package/lib/types/payroll.d.ts +117 -81
  29. package/lib/types/performance.d.ts +1 -1
  30. package/lib/types/search.d.ts +4 -1
  31. package/lib/types/security_and_compliance.d.ts +254 -1
  32. package/lib/ws.d.ts +30 -0
  33. package/package.json +6 -3
  34. package/src/bot.ts +28 -15
  35. package/src/http.ts +10 -4
  36. package/src/types/acs.ts +4 -1
  37. package/src/types/aily.ts +3 -3
  38. package/src/types/apaas.ts +237 -38
  39. package/src/types/application.ts +20 -4
  40. package/src/types/approval.ts +0 -15
  41. package/src/types/attendance.ts +11 -5
  42. package/src/types/authen.ts +8 -2
  43. package/src/types/bitable.ts +25 -4
  44. package/src/types/board.ts +75 -2
  45. package/src/types/calendar.ts +88 -5
  46. package/src/types/cardkit.ts +2 -2
  47. package/src/types/compensation.ts +485 -0
  48. package/src/types/contact.ts +55 -12
  49. package/src/types/corehr.ts +1480 -123
  50. package/src/types/directory.ts +3 -53
  51. package/src/types/docx.ts +29 -0
  52. package/src/types/drive.ts +129 -112
  53. package/src/types/ehr.ts +11 -2
  54. package/src/types/helpdesk.ts +15 -6
  55. package/src/types/hire.ts +66 -3
  56. package/src/types/human_authentication.ts +1 -1
  57. package/src/types/im.ts +77 -21
  58. package/src/types/index.ts +1751 -107
  59. package/src/types/mail.ts +106 -16
  60. package/src/types/payroll.ts +146 -103
  61. package/src/types/performance.ts +1 -1
  62. package/src/types/search.ts +4 -1
  63. package/src/types/security_and_compliance.ts +292 -1
  64. package/src/ws.ts +183 -0
  65. package/lib/types/api.d.ts +0 -28510
  66. package/lib/types/internal.d.ts +0 -21
  67. package/lib/types/message/content.d.ts +0 -433
  68. package/lib/types/message/index.d.ts +0 -95
@@ -30,11 +30,21 @@ export namespace Calendar {
30
30
  * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/primary
31
31
  */
32
32
  primary(query?: PrimaryQuery): Promise<PrimaryResponse>
33
+ /**
34
+ * 批量获取主日历信息
35
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/primarys
36
+ */
37
+ primarys(body: PrimarysRequest, query?: PrimarysQuery): Promise<PrimarysResponse>
33
38
  /**
34
39
  * 查询日历信息
35
40
  * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/get
36
41
  */
37
42
  get(calendar_id: string): Promise<GetResponse>
43
+ /**
44
+ * 批量查询日历信息
45
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/mget
46
+ */
47
+ mget(body: MgetRequest): Promise<MgetResponse>
38
48
  /**
39
49
  * 查询日历列表
40
50
  * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/list
@@ -100,6 +110,21 @@ export namespace Calendar {
100
110
  calendars?: Lark.UserCalendar[]
101
111
  }
102
112
 
113
+ export interface PrimarysRequest {
114
+ /** 用户ID列表 */
115
+ user_ids: string[]
116
+ }
117
+
118
+ export interface PrimarysQuery {
119
+ /** 此次调用中使用的用户ID的类型 */
120
+ user_id_type?: 'user_id' | 'union_id' | 'open_id'
121
+ }
122
+
123
+ export interface PrimarysResponse {
124
+ /** 主日历列表 */
125
+ calendars?: Lark.UserCalendar[]
126
+ }
127
+
103
128
  export interface GetResponse {
104
129
  /** 日历OpenId */
105
130
  calendar_id: string
@@ -123,6 +148,16 @@ export namespace Calendar {
123
148
  role?: 'unknown' | 'free_busy_reader' | 'reader' | 'writer' | 'owner'
124
149
  }
125
150
 
151
+ export interface MgetRequest {
152
+ /** 日历ID列表 */
153
+ calendar_ids: string[]
154
+ }
155
+
156
+ export interface MgetResponse {
157
+ /** 日历列表 */
158
+ calendars?: Lark.Calendar[]
159
+ }
160
+
126
161
  export interface ListQuery extends Pagination {
127
162
  /** 上次请求Response返回的增量同步标记,分页请求未结束时为空 */
128
163
  sync_token?: string
@@ -181,6 +216,11 @@ export namespace Calendar {
181
216
  * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/freebusy/list
182
217
  */
183
218
  list(body: ListRequest, query?: ListQuery): Promise<ListResponse>
219
+ /**
220
+ * 批量查询主日历日程忙闲信息
221
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/freebusy/batch
222
+ */
223
+ batch(body: BatchRequest, query?: BatchQuery): Promise<BatchResponse>
184
224
  }
185
225
 
186
226
  export interface ListRequest {
@@ -188,7 +228,7 @@ export namespace Calendar {
188
228
  time_min: string
189
229
  /** 查询时段结束时间,需要url编码 */
190
230
  time_max: string
191
- /** 用户user_id,输入时与 room_id 二选一。参见[用户相关的 ID 概念](/ssl:ttdoc/home/user-identity-introduction/introduction) */
231
+ /** 用户user_id,输入时与 room_id 二选一。参见[用户相关的 ID 概念](https://open.feishu.cn/document/home/user-identity-introduction/introduction) */
192
232
  user_id?: string
193
233
  /** 会议室room_id,输入时与 user_id 二选一 */
194
234
  room_id?: string
@@ -207,6 +247,29 @@ export namespace Calendar {
207
247
  /** 日历上请求时间区间内的忙闲信息 */
208
248
  freebusy_list?: Lark.Freebusy[]
209
249
  }
250
+
251
+ export interface BatchRequest {
252
+ /** 获取忙闲信息的开始时间,RFC3339 date_time格式;time_min与time_max的时间区间不能超过3个月。 */
253
+ time_min: string
254
+ /** 获取忙闲信息的开始时间,RFC3339 date_time格式;time_min与time_max的时间区间不能超过3个月。 */
255
+ time_max: string
256
+ /** 用户ID列表 */
257
+ user_ids: string[]
258
+ /** 是否包含绑定的三方日历中的日程,不传默认为true,即包含。 */
259
+ include_external_calendar?: boolean
260
+ /** 是否包含标记为空闲的日程,不传默认为true,即包含空闲日程。 */
261
+ only_busy?: boolean
262
+ }
263
+
264
+ export interface BatchQuery {
265
+ /** 此次调用中使用的用户ID的类型 */
266
+ user_id_type?: 'user_id' | 'union_id' | 'open_id'
267
+ }
268
+
269
+ export interface BatchResponse {
270
+ /** 用户忙闲信息列表 */
271
+ freebusy_lists?: Lark.UserFreebusy[]
272
+ }
210
273
  }
211
274
 
212
275
  export namespace Acl {
@@ -568,7 +631,10 @@ export namespace Calendar {
568
631
  }
569
632
 
570
633
  export interface CreateRequest {
571
- /** 新增参与人列表;<br>- 单次请求会议室的数量限制为100。 */
634
+ /**
635
+ * 新增参与人列表;
636
+ * - 单次请求会议室的数量限制为100。
637
+ */
572
638
  attendees?: Lark.CalendarEventAttendee[]
573
639
  /** 是否给参与人发送bot通知 默认为true */
574
640
  need_notification?: boolean
@@ -591,7 +657,7 @@ export namespace Calendar {
591
657
  }
592
658
 
593
659
  export interface BatchDeleteRequest {
594
- /** 要移除的参与人 ID 列表。参见[参与人ID说明](/ssl:ttdoc/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar-event-attendee/introduction#4998889c) */
660
+ /** 要移除的参与人 ID 列表。参见[参与人ID说明](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar-event-attendee/introduction#4998889c) */
595
661
  attendee_ids?: string[]
596
662
  /** 需要删除的参与人类型实体ID,作为attendee_ids字段的补充。 */
597
663
  delete_ids?: Lark.CalendarEventAttendeeId[]
@@ -657,7 +723,11 @@ export namespace Calendar {
657
723
  end_time: string
658
724
  /** 休假日程标题,可自定义例如:"请假中(全天) / 1-Day Time Off","请假中(半天) / 0.5-Day Time Off","长期休假中 / Leave of Absence","请假中" */
659
725
  title?: string
660
- /** 休假日程描述,可自定义,例如:"若拒绝或删除此日程,飞书中相应的“请假”标签将自动消失,而请假系统中的休假申请不会被撤销。If the event is rejected or deleted, corresponding "On Leave" tag in Feishu will disappear, while the leave request in the time off system will not be revoked." */
726
+ /**
727
+ * 休假日程描述,可自定义,例如:
728
+ * "若拒绝或删除此日程,飞书中相应的“请假”标签将自动消失,而请假系统中的休假申请不会被撤销。
729
+ * If the event is rejected or deleted, corresponding "On Leave" tag in Feishu will disappear, while the leave request in the time off system will not be revoked."
730
+ */
661
731
  description?: string
662
732
  }
663
733
 
@@ -679,7 +749,11 @@ export namespace Calendar {
679
749
  end_time: string
680
750
  /** 休假日程标题,可自定义例如:"请假中(全天) / 1-Day Time Off","请假中(半天) / 0.5-Day Time Off","长期休假中 / Leave of Absence","请假中" */
681
751
  title?: string
682
- /** 休假日程描述,可自定义,例如:"若拒绝或删除此日程,飞书中相应的“请假”标签将自动消失,而请假系统中的休假申请不会被撤销。If the event is rejected or deleted, corresponding "On Leave" tag in Feishu will disappear, while the leave request in the time off system will not be revoked." */
752
+ /**
753
+ * 休假日程描述,可自定义,例如:
754
+ * "若拒绝或删除此日程,飞书中相应的“请假”标签将自动消失,而请假系统中的休假申请不会被撤销。
755
+ * If the event is rejected or deleted, corresponding "On Leave" tag in Feishu will disappear, while the leave request in the time off system will not be revoked."
756
+ */
683
757
  description?: string
684
758
  }
685
759
  }
@@ -789,9 +863,18 @@ Internal.define({
789
863
  '/calendar/v4/calendars/primary': {
790
864
  POST: 'calendar.primary',
791
865
  },
866
+ '/calendar/v4/calendars/primarys': {
867
+ POST: 'calendar.primarys',
868
+ },
869
+ '/calendar/v4/calendars/mget': {
870
+ POST: 'calendar.mget',
871
+ },
792
872
  '/calendar/v4/freebusy/list': {
793
873
  POST: 'calendar.freebusy.list',
794
874
  },
875
+ '/calendar/v4/freebusy/batch': {
876
+ POST: 'calendar.freebusy.batch',
877
+ },
795
878
  '/calendar/v4/calendars/search': {
796
879
  POST: { name: 'calendar.search', pagination: { argIndex: 1 } },
797
880
  },
@@ -21,12 +21,12 @@ export namespace Cardkit {
21
21
  */
22
22
  create(body: CreateRequest): Promise<CreateResponse>
23
23
  /**
24
- * 更新卡片配置
24
+ * 更新卡片实体配置
25
25
  * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/cardkit-v1/card/settings
26
26
  */
27
27
  settings(card_id: string, body: SettingsRequest): Promise<void>
28
28
  /**
29
- * 批量更新卡片实体
29
+ * 局部更新卡片实体
30
30
  * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/cardkit-v1/card/batch_update
31
31
  */
32
32
  batchUpdate(card_id: string, body: BatchUpdateRequest): Promise<void>