@satorijs/adapter-lark 3.8.6 → 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.
Files changed (127) hide show
  1. package/lib/bot.d.ts +1 -1
  2. package/lib/content.d.ts +433 -0
  3. package/lib/http.d.ts +1 -1
  4. package/lib/index.cjs +2787 -1714
  5. package/lib/index.cjs.map +6 -0
  6. package/lib/index.d.ts +4 -2
  7. package/lib/internal.d.ts +38 -0
  8. package/lib/message.d.ts +2 -0
  9. package/lib/types/acs.d.ts +177 -0
  10. package/lib/types/admin.d.ts +270 -0
  11. package/lib/types/aily.d.ts +221 -0
  12. package/lib/types/apaas.d.ts +499 -0
  13. package/lib/types/api.d.ts +1 -14
  14. package/lib/types/application.d.ts +406 -0
  15. package/lib/types/approval.d.ts +779 -0
  16. package/lib/types/attendance.d.ts +957 -0
  17. package/lib/types/auth.d.ts +86 -0
  18. package/lib/types/authen.d.ts +191 -0
  19. package/lib/types/baike.d.ts +239 -0
  20. package/lib/types/bitable.d.ts +691 -0
  21. package/lib/types/board.d.ts +19 -0
  22. package/lib/types/calendar.d.ts +653 -0
  23. package/lib/types/cardkit.d.ts +139 -0
  24. package/lib/types/compensation.d.ts +54 -0
  25. package/lib/types/contact.d.ts +1137 -0
  26. package/lib/types/corehr.d.ts +4383 -0
  27. package/lib/types/docs.d.ts +23 -0
  28. package/lib/types/document_ai.d.ts +257 -0
  29. package/lib/types/docx.d.ts +380 -0
  30. package/lib/types/drive.d.ts +1045 -0
  31. package/lib/types/ehr.d.ts +32 -0
  32. package/lib/types/event.d.ts +9 -18
  33. package/lib/types/guild.d.ts +59 -0
  34. package/lib/types/helpdesk.d.ts +738 -0
  35. package/lib/types/hire.d.ts +3150 -0
  36. package/lib/types/human_authentication.d.ts +27 -0
  37. package/lib/types/im.d.ts +1300 -0
  38. package/lib/types/index.d.ts +16432 -34
  39. package/lib/types/lingo.d.ts +254 -0
  40. package/lib/types/mail.d.ts +680 -0
  41. package/lib/types/mdm.d.ts +42 -0
  42. package/lib/types/message/asset.d.ts +40 -0
  43. package/lib/types/minutes.d.ts +31 -0
  44. package/lib/types/moments.d.ts +18 -0
  45. package/lib/types/okr.d.ts +205 -0
  46. package/lib/types/optical_char_recognition.d.ts +17 -0
  47. package/lib/types/passport.d.ts +45 -0
  48. package/lib/types/payroll.d.ts +50 -0
  49. package/lib/types/performance.d.ts +413 -0
  50. package/lib/types/personal_settings.d.ts +87 -0
  51. package/lib/types/report.d.ts +57 -0
  52. package/lib/types/search.d.ts +216 -0
  53. package/lib/types/security_and_compliance.d.ts +24 -0
  54. package/lib/types/sheets.d.ts +326 -0
  55. package/lib/types/speech_to_text.d.ts +39 -0
  56. package/lib/types/task.d.ts +1153 -0
  57. package/lib/types/tenant.d.ts +23 -0
  58. package/lib/types/translation.d.ts +37 -0
  59. package/lib/types/user.d.ts +78 -0
  60. package/lib/types/utils.d.ts +9 -0
  61. package/lib/types/vc.d.ts +948 -0
  62. package/lib/types/verification.d.ts +14 -0
  63. package/lib/types/wiki.d.ts +240 -0
  64. package/lib/types/workplace.d.ts +43 -0
  65. package/lib/utils.d.ts +143 -7
  66. package/package.json +6 -4
  67. package/src/bot.ts +19 -3
  68. package/src/{types/message/content.ts → content.ts} +1 -0
  69. package/src/http.ts +1 -3
  70. package/src/index.ts +4 -2
  71. package/src/internal.ts +144 -0
  72. package/src/message.ts +13 -11
  73. package/src/types/acs.ts +236 -0
  74. package/src/types/admin.ts +328 -0
  75. package/src/types/aily.ts +288 -0
  76. package/src/types/apaas.ts +646 -0
  77. package/src/types/application.ts +520 -0
  78. package/src/types/approval.ts +924 -0
  79. package/src/types/attendance.ts +1153 -0
  80. package/src/types/auth.ts +114 -0
  81. package/src/types/authen.ts +220 -0
  82. package/src/types/baike.ts +306 -0
  83. package/src/types/bitable.ts +879 -0
  84. package/src/types/board.ts +31 -0
  85. package/src/types/calendar.ts +817 -0
  86. package/src/types/cardkit.ts +182 -0
  87. package/src/types/compensation.ts +79 -0
  88. package/src/types/contact.ts +1411 -0
  89. package/src/types/corehr.ts +5288 -0
  90. package/src/types/docs.ts +33 -0
  91. package/src/types/document_ai.ts +352 -0
  92. package/src/types/docx.ts +471 -0
  93. package/src/types/drive.ts +1312 -0
  94. package/src/types/ehr.ts +43 -0
  95. package/src/types/event.ts +15 -21
  96. package/src/types/helpdesk.ts +916 -0
  97. package/src/types/hire.ts +3918 -0
  98. package/src/types/human_authentication.ts +38 -0
  99. package/src/types/im.ts +1605 -0
  100. package/src/types/index.ts +17754 -39
  101. package/src/types/lingo.ts +321 -0
  102. package/src/types/mail.ts +851 -0
  103. package/src/types/mdm.ts +57 -0
  104. package/src/types/minutes.ts +46 -0
  105. package/src/types/moments.ts +28 -0
  106. package/src/types/okr.ts +261 -0
  107. package/src/types/optical_char_recognition.ts +27 -0
  108. package/src/types/passport.ts +61 -0
  109. package/src/types/payroll.ts +69 -0
  110. package/src/types/performance.ts +524 -0
  111. package/src/types/personal_settings.ts +116 -0
  112. package/src/types/report.ts +77 -0
  113. package/src/types/search.ts +268 -0
  114. package/src/types/security_and_compliance.ts +33 -0
  115. package/src/types/sheets.ts +425 -0
  116. package/src/types/speech_to_text.ts +54 -0
  117. package/src/types/task.ts +1464 -0
  118. package/src/types/tenant.ts +36 -0
  119. package/src/types/translation.ts +52 -0
  120. package/src/types/vc.ts +1197 -0
  121. package/src/types/verification.ts +23 -0
  122. package/src/types/wiki.ts +313 -0
  123. package/src/types/workplace.ts +59 -0
  124. package/src/utils.ts +160 -8
  125. package/src/types/api.ts +0 -30848
  126. package/src/types/internal.ts +0 -84
  127. package/src/types/message/index.ts +0 -97
@@ -0,0 +1,182 @@
1
+ import { Card } from '.'
2
+ import { Internal } from '../internal'
3
+
4
+ declare module '../internal' {
5
+ interface Internal {
6
+ /**
7
+ * 创建卡片实体
8
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/cardkit-v1/card/create
9
+ */
10
+ createCardkitCard(body: CreateCardkitCardRequest): Promise<CreateCardkitCardResponse>
11
+ /**
12
+ * 更新卡片配置
13
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/cardkit-v1/card/settings
14
+ */
15
+ settingsCardkitCard(card_id: string, body: SettingsCardkitCardRequest): Promise<void>
16
+ /**
17
+ * 批量更新卡片实体
18
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/cardkit-v1/card/batch_update
19
+ */
20
+ batchUpdateCardkitCard(card_id: string, body: BatchUpdateCardkitCardRequest): Promise<void>
21
+ /**
22
+ * 全量更新卡片实体
23
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/cardkit-v1/card/update
24
+ */
25
+ updateCardkitCard(card_id: string, body: UpdateCardkitCardRequest): Promise<void>
26
+ /**
27
+ * 转换 ID
28
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/cardkit-v1/card/id_convert
29
+ */
30
+ idConvertCardkitCard(body: IdConvertCardkitCardRequest): Promise<IdConvertCardkitCardResponse>
31
+ /**
32
+ * 新增组件
33
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/cardkit-v1/card-element/create
34
+ */
35
+ createCardkitCardElement(card_id: string, body: CreateCardkitCardElementRequest): Promise<void>
36
+ /**
37
+ * 更新组件
38
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/cardkit-v1/card-element/update
39
+ */
40
+ updateCardkitCardElement(card_id: string, element_id: string, body: UpdateCardkitCardElementRequest): Promise<void>
41
+ /**
42
+ * 更新组件属性
43
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/cardkit-v1/card-element/patch
44
+ */
45
+ patchCardkitCardElement(card_id: string, element_id: string, body: PatchCardkitCardElementRequest): Promise<void>
46
+ /**
47
+ * 流式更新文本
48
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/cardkit-v1/card-element/content
49
+ */
50
+ contentCardkitCardElement(card_id: string, element_id: string, body: ContentCardkitCardElementRequest): Promise<void>
51
+ /**
52
+ * 删除组件
53
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/cardkit-v1/card-element/delete
54
+ */
55
+ deleteCardkitCardElement(card_id: string, element_id: string, body: DeleteCardkitCardElementRequest): Promise<void>
56
+ }
57
+ }
58
+
59
+ export interface CreateCardkitCardRequest {
60
+ /** 卡片数据的类型 */
61
+ type: string
62
+ /** 卡片数据内容,与卡片数据的类型相对应 */
63
+ data: string
64
+ }
65
+
66
+ export interface SettingsCardkitCardRequest {
67
+ /** 卡片设置 */
68
+ settings: string
69
+ /** UUID */
70
+ uuid?: string
71
+ /** 卡片处于流式更新模式时,进行卡片操作的顺序序号,用于保证多次更新的时序性。值为正整数,一次流式状态的多次更新操作(streaming_mode 一次从 true 到 false 期间)需要保证 sequence 递增,否则将报错。推荐使用时间戳。 */
72
+ sequence: number
73
+ }
74
+
75
+ export interface BatchUpdateCardkitCardRequest {
76
+ /** 幂等 id,最大长度为 64。可通过传入唯一的 uuid 以保证相同批次的操作只进行一次。 */
77
+ uuid?: string
78
+ /** 卡片处于流式更新模式时,进行卡片操作的顺序序号,用于保证多次更新的时序性。值为正整数,一次流式状态的多次更新操作(streaming_mode 一次从 true 到 false 期间)需要保证 sequence 递增,否则将报错。推荐使用时间戳。 */
79
+ sequence: number
80
+ /** 操作列表,可选值有: partial_update_setting:更新卡片设置,此时 parmas 结构参考更新卡片设置接口请求体的 settings 字段 ;add_elements,此时 parmas 结构参考添加组件接口请求体的 type、target_element_id、elements 字段 ; delete_elements,此时 parmas 结构内仅支持 element_ids 参数,参数值为组件 ID 数组 ; partial_update_element,此时 parmas 结构包括参考局部更新组件接口的路径参数 element_id 和请求体 partial_element 字段 ; update_element,此时 parmas 结构参考全量更新组件接口的路径参数 element_id 和请求体 element 字段 */
81
+ actions: string
82
+ }
83
+
84
+ export interface UpdateCardkitCardRequest {
85
+ /** 卡片内容 */
86
+ card: Card
87
+ /** 幂等 id,可通过传入唯一的 uuid 以保证相同批次的操作只进行一次。 */
88
+ uuid?: string
89
+ /** 卡片处于流式更新模式时,进行卡片操作的顺序序号,用于保证多次更新的时序性。值为正整数,一次流式状态的多次更新操作(streaming_mode 一次从 true 到 false 期间)需要保证 sequence 递增,否则将报错。推荐使用时间戳。 */
90
+ sequence: number
91
+ }
92
+
93
+ export interface IdConvertCardkitCardRequest {
94
+ /** 消息ID */
95
+ message_id: string
96
+ }
97
+
98
+ export interface CreateCardkitCardElementRequest {
99
+ /** 添加组件的方式 */
100
+ type: 'insert_before' | 'insert_after' | 'append'
101
+ /** 目标组件的 ID。 当 type 为 insert_before、insert_after 时,为用于定位的目标组件。 当 type 为 append 时,该字段仅支持容器类组件,为用于指定末尾添加的目标组件,未填写默认为在卡片 body 末尾添加。 */
102
+ target_element_id?: string
103
+ /** 幂等 id,可通过传入唯一的 uuid 以保证相同批次的操作只进行一次。 */
104
+ uuid?: string
105
+ /** 卡片处于流式更新模式时,进行卡片操作的顺序序号,用于保证多次更新的时序性。值为正整数,一次流式状态的多次更新操作(streaming_mode 一次从 true 到 false 期间)需要保证 sequence 递增,否则将报错。推荐使用时间戳。 */
106
+ sequence: number
107
+ /** 组件列表 */
108
+ elements: string
109
+ }
110
+
111
+ export interface UpdateCardkitCardElementRequest {
112
+ /** 幂等 id,可通过传入唯一的 uuid 以保证相同批次的操作只进行一次。 */
113
+ uuid?: string
114
+ /** 新的组件 */
115
+ element: string
116
+ /** 卡片处于流式更新模式时,进行卡片操作的顺序序号,用于保证多次更新的时序性。值为正整数,一次流式状态的多次更新操作(streaming_mode 一次从 true 到 false 期间)需要保证 sequence 递增,否则将报错。推荐使用时间戳。 */
117
+ sequence: number
118
+ }
119
+
120
+ export interface PatchCardkitCardElementRequest {
121
+ /** 要更改的组件部分配置内容,传入 id 参数后将对原有组件的 id 进行更新,不支持修改 tag 参数。 */
122
+ partial_element: string
123
+ /** 幂等 id,可通过传入唯一的 uuid 以保证相同批次的操作只进行一次。 */
124
+ uuid?: string
125
+ /** 卡片处于流式更新模式时,进行卡片操作的顺序序号,用于保证多次更新的时序性。值为正整数,一次流式状态的多次更新操作(streaming_mode 一次从 true 到 false 期间)需要保证 sequence 递增,否则将报错。推荐使用时间戳。 */
126
+ sequence: number
127
+ }
128
+
129
+ export interface ContentCardkitCardElementRequest {
130
+ /** 幂等 id,可通过传入唯一的 uuid 以保证相同批次的操作只进行一次。 */
131
+ uuid?: string
132
+ /** 更新后的文本内容 */
133
+ content: string
134
+ /** 顺序序号,用于保证更新文本内容的时序性。在卡片的单次 streaming 模式周期中(steaming 状态从开始到停止),该值需为递增的正整数,否则将报错。 */
135
+ sequence: number
136
+ }
137
+
138
+ export interface DeleteCardkitCardElementRequest {
139
+ /** 幂等 id,可通过传入唯一的 uuid 以保证相同批次的操作只进行一次。 */
140
+ uuid?: string
141
+ /** 卡片处于流式更新模式时,进行卡片操作的顺序序号,用于保证多次更新的时序性。值为正整数,一次流式状态的多次更新操作(streaming_mode 一次从 true 到 false 期间)需要保证 sequence 递增,否则将报错。推荐使用时间戳。 */
142
+ sequence: number
143
+ }
144
+
145
+ export interface CreateCardkitCardResponse {
146
+ /** 卡片ID */
147
+ card_id: string
148
+ }
149
+
150
+ export interface IdConvertCardkitCardResponse {
151
+ /** 消息 ID 对应的卡片 ID */
152
+ card_id?: string
153
+ }
154
+
155
+ Internal.define({
156
+ '/cardkit/v1/cards': {
157
+ POST: 'createCardkitCard',
158
+ },
159
+ '/cardkit/v1/cards/{card_id}/settings': {
160
+ PATCH: 'settingsCardkitCard',
161
+ },
162
+ '/cardkit/v1/cards/{card_id}/batch_update': {
163
+ POST: 'batchUpdateCardkitCard',
164
+ },
165
+ '/cardkit/v1/cards/{card_id}': {
166
+ PUT: 'updateCardkitCard',
167
+ },
168
+ '/cardkit/v1/cards/id_convert': {
169
+ POST: 'idConvertCardkitCard',
170
+ },
171
+ '/cardkit/v1/cards/{card_id}/elements': {
172
+ POST: 'createCardkitCardElement',
173
+ },
174
+ '/cardkit/v1/cards/{card_id}/elements/{element_id}': {
175
+ PUT: 'updateCardkitCardElement',
176
+ PATCH: 'patchCardkitCardElement',
177
+ DELETE: 'deleteCardkitCardElement',
178
+ },
179
+ '/cardkit/v1/cards/{card_id}/elements/{element_id}/content': {
180
+ PUT: 'contentCardkitCardElement',
181
+ },
182
+ })
@@ -0,0 +1,79 @@
1
+ import { ArchiveDetail, ChangeReason, Indicator, Item, ItemCategory, PlanDetail } from '.'
2
+ import { Internal, Pagination } from '../internal'
3
+
4
+ declare module '../internal' {
5
+ interface Internal {
6
+ /**
7
+ * 批量查询员工薪资档案
8
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/compensation-v1/archive/query
9
+ */
10
+ queryCompensationArchive(body: QueryCompensationArchiveRequest, query?: QueryCompensationArchiveQuery): Paginated<ArchiveDetail>
11
+ /**
12
+ * 批量查询薪资项
13
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/compensation-v1/item/list
14
+ */
15
+ listCompensationItem(query?: ListCompensationItemQuery): Paginated<Item>
16
+ /**
17
+ * 批量查询薪资统计指标
18
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/compensation-v1/indicator/list
19
+ */
20
+ listCompensationIndicator(query?: Pagination): Paginated<Indicator>
21
+ /**
22
+ * 批量获取薪资项分类信息
23
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/compensation-v1/item_category/list
24
+ */
25
+ listCompensationItemCategory(query?: Pagination): Paginated<ItemCategory>
26
+ /**
27
+ * 批量查询薪资方案
28
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/compensation-v1/plan/list
29
+ */
30
+ listCompensationPlan(query?: Pagination): Paginated<PlanDetail>
31
+ /**
32
+ * 批量查询定调薪原因
33
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/compensation-v1/change_reason/list
34
+ */
35
+ listCompensationChangeReason(query?: Pagination): Paginated<ChangeReason>
36
+ }
37
+ }
38
+
39
+ export interface QueryCompensationArchiveRequest {
40
+ /** 用户ID列表 */
41
+ user_id_list: string[]
42
+ /** 档案Tid列表 */
43
+ tid_list?: string[]
44
+ /** 生效开始时间 */
45
+ effective_start_date?: string
46
+ /** 生效结束时间 */
47
+ effective_end_date?: string
48
+ }
49
+
50
+ export interface QueryCompensationArchiveQuery extends Pagination {
51
+ /** 用户ID类型 */
52
+ user_id_type: 'user_id' | 'union_id' | 'open_id' | 'people_corehr_id'
53
+ }
54
+
55
+ export interface ListCompensationItemQuery extends Pagination {
56
+ /** 薪酬项类型(不传则认为查询所有类型薪酬项) */
57
+ item_type?: 'salary' | 'bonus' | 'recurring_payment'
58
+ }
59
+
60
+ Internal.define({
61
+ '/compensation/v1/archives/query': {
62
+ POST: { name: 'queryCompensationArchive', pagination: { argIndex: 1 } },
63
+ },
64
+ '/compensation/v1/items': {
65
+ GET: { name: 'listCompensationItem', pagination: { argIndex: 0 } },
66
+ },
67
+ '/compensation/v1/indicators': {
68
+ GET: { name: 'listCompensationIndicator', pagination: { argIndex: 0 } },
69
+ },
70
+ '/compensation/v1/item_categories': {
71
+ GET: { name: 'listCompensationItemCategory', pagination: { argIndex: 0 } },
72
+ },
73
+ '/compensation/v1/plans': {
74
+ GET: { name: 'listCompensationPlan', pagination: { argIndex: 0 } },
75
+ },
76
+ '/compensation/v1/change_reasons': {
77
+ GET: { name: 'listCompensationChangeReason', pagination: { argIndex: 0 } },
78
+ },
79
+ })