@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
@@ -1,182 +1,200 @@
1
- import { Card } from '.'
1
+ import * as Lark from '.'
2
2
  import { Internal } from '../internal'
3
3
 
4
4
  declare module '../internal' {
5
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>
6
+ cardkit: Cardkit.Methods
56
7
  }
57
8
  }
58
9
 
59
- export interface CreateCardkitCardRequest {
60
- /** 卡片数据的类型 */
61
- type: string
62
- /** 卡片数据内容,与卡片数据的类型相对应 */
63
- data: string
64
- }
10
+ export namespace Cardkit {
11
+ export interface Methods {
12
+ card: Card.Methods
13
+ }
65
14
 
66
- export interface CreateCardkitCardResponse {
67
- /** 卡片ID */
68
- card_id: string
69
- }
15
+ export namespace Card {
16
+ export interface Methods {
17
+ element: Element.Methods
18
+ /**
19
+ * 创建卡片实体
20
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/cardkit-v1/card/create
21
+ */
22
+ create(body: CreateRequest): Promise<CreateResponse>
23
+ /**
24
+ * 更新卡片配置
25
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/cardkit-v1/card/settings
26
+ */
27
+ settings(card_id: string, body: SettingsRequest): Promise<void>
28
+ /**
29
+ * 批量更新卡片实体
30
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/cardkit-v1/card/batch_update
31
+ */
32
+ batchUpdate(card_id: string, body: BatchUpdateRequest): Promise<void>
33
+ /**
34
+ * 全量更新卡片实体
35
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/cardkit-v1/card/update
36
+ */
37
+ update(card_id: string, body: UpdateRequest): Promise<void>
38
+ /**
39
+ * 转换 ID
40
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/cardkit-v1/card/id_convert
41
+ */
42
+ idConvert(body: IdConvertRequest): Promise<IdConvertResponse>
43
+ }
70
44
 
71
- export interface SettingsCardkitCardRequest {
72
- /** 卡片设置 */
73
- settings: string
74
- /** UUID */
75
- uuid?: string
76
- /** 卡片处于流式更新模式时,进行卡片操作的顺序序号,用于保证多次更新的时序性。值为正整数,一次流式状态的多次更新操作(streaming_mode 一次从 true 到 false 期间)需要保证 sequence 递增,否则将报错。推荐使用时间戳。 */
77
- sequence: number
78
- }
45
+ export interface CreateRequest {
46
+ /** 卡片数据的类型 */
47
+ type: string
48
+ /** 卡片数据内容,与卡片数据的类型相对应 */
49
+ data: string
50
+ }
79
51
 
80
- export interface BatchUpdateCardkitCardRequest {
81
- /** 幂等 id,最大长度为 64。可通过传入唯一的 uuid 以保证相同批次的操作只进行一次。 */
82
- uuid?: string
83
- /** 卡片处于流式更新模式时,进行卡片操作的顺序序号,用于保证多次更新的时序性。值为正整数,一次流式状态的多次更新操作(streaming_mode 一次从 true 到 false 期间)需要保证 sequence 递增,否则将报错。推荐使用时间戳。 */
84
- sequence: number
85
- /** 操作列表,可选值有: 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 字段 */
86
- actions: string
87
- }
52
+ export interface CreateResponse {
53
+ /** 卡片ID */
54
+ card_id: string
55
+ }
88
56
 
89
- export interface UpdateCardkitCardRequest {
90
- /** 卡片内容 */
91
- card: Card
92
- /** 幂等 id,可通过传入唯一的 uuid 以保证相同批次的操作只进行一次。 */
93
- uuid?: string
94
- /** 卡片处于流式更新模式时,进行卡片操作的顺序序号,用于保证多次更新的时序性。值为正整数,一次流式状态的多次更新操作(streaming_mode 一次从 true 到 false 期间)需要保证 sequence 递增,否则将报错。推荐使用时间戳。 */
95
- sequence: number
96
- }
57
+ export interface SettingsRequest {
58
+ /** 卡片设置 */
59
+ settings: string
60
+ /** UUID */
61
+ uuid?: string
62
+ /** 卡片处于流式更新模式时,进行卡片操作的顺序序号,用于保证多次更新的时序性。值为正整数,一次流式状态的多次更新操作(streaming_mode 一次从 true 到 false 期间)需要保证 sequence 递增,否则将报错。推荐使用时间戳。 */
63
+ sequence: number
64
+ }
97
65
 
98
- export interface IdConvertCardkitCardRequest {
99
- /** 消息ID */
100
- message_id: string
101
- }
66
+ export interface BatchUpdateRequest {
67
+ /** 幂等 id,最大长度为 64。可通过传入唯一的 uuid 以保证相同批次的操作只进行一次。 */
68
+ uuid?: string
69
+ /** 卡片处于流式更新模式时,进行卡片操作的顺序序号,用于保证多次更新的时序性。值为正整数,一次流式状态的多次更新操作(streaming_mode 一次从 true 到 false 期间)需要保证 sequence 递增,否则将报错。推荐使用时间戳。 */
70
+ sequence: number
71
+ /** 操作列表,可选值有: 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 字段 */
72
+ actions: string
73
+ }
102
74
 
103
- export interface IdConvertCardkitCardResponse {
104
- /** 消息 ID 对应的卡片 ID */
105
- card_id?: string
106
- }
75
+ export interface UpdateRequest {
76
+ /** 卡片内容 */
77
+ card: Lark.Card
78
+ /** 幂等 id,可通过传入唯一的 uuid 以保证相同批次的操作只进行一次。 */
79
+ uuid?: string
80
+ /** 卡片处于流式更新模式时,进行卡片操作的顺序序号,用于保证多次更新的时序性。值为正整数,一次流式状态的多次更新操作(streaming_mode 一次从 true 到 false 期间)需要保证 sequence 递增,否则将报错。推荐使用时间戳。 */
81
+ sequence: number
82
+ }
107
83
 
108
- export interface CreateCardkitCardElementRequest {
109
- /** 添加组件的方式 */
110
- type: 'insert_before' | 'insert_after' | 'append'
111
- /** 目标组件的 ID。 当 type 为 insert_before、insert_after 时,为用于定位的目标组件。 当 type 为 append 时,该字段仅支持容器类组件,为用于指定末尾添加的目标组件,未填写默认为在卡片 body 末尾添加。 */
112
- target_element_id?: string
113
- /** 幂等 id,可通过传入唯一的 uuid 以保证相同批次的操作只进行一次。 */
114
- uuid?: string
115
- /** 卡片处于流式更新模式时,进行卡片操作的顺序序号,用于保证多次更新的时序性。值为正整数,一次流式状态的多次更新操作(streaming_mode 一次从 true 到 false 期间)需要保证 sequence 递增,否则将报错。推荐使用时间戳。 */
116
- sequence: number
117
- /** 组件列表 */
118
- elements: string
119
- }
84
+ export interface IdConvertRequest {
85
+ /** 消息ID */
86
+ message_id: string
87
+ }
120
88
 
121
- export interface UpdateCardkitCardElementRequest {
122
- /** 幂等 id,可通过传入唯一的 uuid 以保证相同批次的操作只进行一次。 */
123
- uuid?: string
124
- /** 新的组件 */
125
- element: string
126
- /** 卡片处于流式更新模式时,进行卡片操作的顺序序号,用于保证多次更新的时序性。值为正整数,一次流式状态的多次更新操作(streaming_mode 一次从 true 到 false 期间)需要保证 sequence 递增,否则将报错。推荐使用时间戳。 */
127
- sequence: number
128
- }
89
+ export interface IdConvertResponse {
90
+ /** 消息 ID 对应的卡片 ID */
91
+ card_id?: string
92
+ }
129
93
 
130
- export interface PatchCardkitCardElementRequest {
131
- /** 要更改的组件部分配置内容,传入 id 参数后将对原有组件的 id 进行更新,不支持修改 tag 参数。 */
132
- partial_element: string
133
- /** 幂等 id,可通过传入唯一的 uuid 以保证相同批次的操作只进行一次。 */
134
- uuid?: string
135
- /** 卡片处于流式更新模式时,进行卡片操作的顺序序号,用于保证多次更新的时序性。值为正整数,一次流式状态的多次更新操作(streaming_mode 一次从 true 到 false 期间)需要保证 sequence 递增,否则将报错。推荐使用时间戳。 */
136
- sequence: number
137
- }
94
+ export namespace Element {
95
+ export interface Methods {
96
+ /**
97
+ * 新增组件
98
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/cardkit-v1/card-element/create
99
+ */
100
+ create(card_id: string, body: CreateRequest): Promise<void>
101
+ /**
102
+ * 更新组件
103
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/cardkit-v1/card-element/update
104
+ */
105
+ update(card_id: string, element_id: string, body: UpdateRequest): Promise<void>
106
+ /**
107
+ * 更新组件属性
108
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/cardkit-v1/card-element/patch
109
+ */
110
+ patch(card_id: string, element_id: string, body: PatchRequest): Promise<void>
111
+ /**
112
+ * 流式更新文本
113
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/cardkit-v1/card-element/content
114
+ */
115
+ content(card_id: string, element_id: string, body: ContentRequest): Promise<void>
116
+ /**
117
+ * 删除组件
118
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/cardkit-v1/card-element/delete
119
+ */
120
+ delete(card_id: string, element_id: string, body: DeleteRequest): Promise<void>
121
+ }
138
122
 
139
- export interface ContentCardkitCardElementRequest {
140
- /** 幂等 id,可通过传入唯一的 uuid 以保证相同批次的操作只进行一次。 */
141
- uuid?: string
142
- /** 更新后的文本内容 */
143
- content: string
144
- /** 顺序序号,用于保证更新文本内容的时序性。在卡片的单次 streaming 模式周期中(steaming 状态从开始到停止),该值需为递增的正整数,否则将报错。 */
145
- sequence: number
146
- }
123
+ export interface CreateRequest {
124
+ /** 添加组件的方式 */
125
+ type: 'insert_before' | 'insert_after' | 'append'
126
+ /** 目标组件的 ID。 当 type 为 insert_before、insert_after 时,为用于定位的目标组件。 当 type 为 append 时,该字段仅支持容器类组件,为用于指定末尾添加的目标组件,未填写默认为在卡片 body 末尾添加。 */
127
+ target_element_id?: string
128
+ /** 幂等 id,可通过传入唯一的 uuid 以保证相同批次的操作只进行一次。 */
129
+ uuid?: string
130
+ /** 卡片处于流式更新模式时,进行卡片操作的顺序序号,用于保证多次更新的时序性。值为正整数,一次流式状态的多次更新操作(streaming_mode 一次从 true 到 false 期间)需要保证 sequence 递增,否则将报错。推荐使用时间戳。 */
131
+ sequence: number
132
+ /** 组件列表 */
133
+ elements: string
134
+ }
135
+
136
+ export interface UpdateRequest {
137
+ /** 幂等 id,可通过传入唯一的 uuid 以保证相同批次的操作只进行一次。 */
138
+ uuid?: string
139
+ /** 新的组件 */
140
+ element: string
141
+ /** 卡片处于流式更新模式时,进行卡片操作的顺序序号,用于保证多次更新的时序性。值为正整数,一次流式状态的多次更新操作(streaming_mode 一次从 true 到 false 期间)需要保证 sequence 递增,否则将报错。推荐使用时间戳。 */
142
+ sequence: number
143
+ }
144
+
145
+ export interface PatchRequest {
146
+ /** 要更改的组件部分配置内容,传入 id 参数后将对原有组件的 id 进行更新,不支持修改 tag 参数。 */
147
+ partial_element: string
148
+ /** 幂等 id,可通过传入唯一的 uuid 以保证相同批次的操作只进行一次。 */
149
+ uuid?: string
150
+ /** 卡片处于流式更新模式时,进行卡片操作的顺序序号,用于保证多次更新的时序性。值为正整数,一次流式状态的多次更新操作(streaming_mode 一次从 true 到 false 期间)需要保证 sequence 递增,否则将报错。推荐使用时间戳。 */
151
+ sequence: number
152
+ }
153
+
154
+ export interface ContentRequest {
155
+ /** 幂等 id,可通过传入唯一的 uuid 以保证相同批次的操作只进行一次。 */
156
+ uuid?: string
157
+ /** 更新后的文本内容 */
158
+ content: string
159
+ /** 顺序序号,用于保证更新文本内容的时序性。在卡片的单次 streaming 模式周期中(steaming 状态从开始到停止),该值需为递增的正整数,否则将报错。 */
160
+ sequence: number
161
+ }
147
162
 
148
- export interface DeleteCardkitCardElementRequest {
149
- /** 幂等 id,可通过传入唯一的 uuid 以保证相同批次的操作只进行一次。 */
150
- uuid?: string
151
- /** 卡片处于流式更新模式时,进行卡片操作的顺序序号,用于保证多次更新的时序性。值为正整数,一次流式状态的多次更新操作(streaming_mode 一次从 true 到 false 期间)需要保证 sequence 递增,否则将报错。推荐使用时间戳。 */
152
- sequence: number
163
+ export interface DeleteRequest {
164
+ /** 幂等 id,可通过传入唯一的 uuid 以保证相同批次的操作只进行一次。 */
165
+ uuid?: string
166
+ /** 卡片处于流式更新模式时,进行卡片操作的顺序序号,用于保证多次更新的时序性。值为正整数,一次流式状态的多次更新操作(streaming_mode 一次从 true 到 false 期间)需要保证 sequence 递增,否则将报错。推荐使用时间戳。 */
167
+ sequence: number
168
+ }
169
+ }
170
+ }
153
171
  }
154
172
 
155
173
  Internal.define({
156
174
  '/cardkit/v1/cards': {
157
- POST: 'createCardkitCard',
175
+ POST: 'cardkit.card.create',
158
176
  },
159
177
  '/cardkit/v1/cards/{card_id}/settings': {
160
- PATCH: 'settingsCardkitCard',
178
+ PATCH: 'cardkit.card.settings',
161
179
  },
162
180
  '/cardkit/v1/cards/{card_id}/batch_update': {
163
- POST: 'batchUpdateCardkitCard',
181
+ POST: 'cardkit.card.batchUpdate',
164
182
  },
165
183
  '/cardkit/v1/cards/{card_id}': {
166
- PUT: 'updateCardkitCard',
167
- },
168
- '/cardkit/v1/cards/id_convert': {
169
- POST: 'idConvertCardkitCard',
184
+ PUT: 'cardkit.card.update',
170
185
  },
171
186
  '/cardkit/v1/cards/{card_id}/elements': {
172
- POST: 'createCardkitCardElement',
187
+ POST: 'cardkit.card.element.create',
173
188
  },
174
189
  '/cardkit/v1/cards/{card_id}/elements/{element_id}': {
175
- PUT: 'updateCardkitCardElement',
176
- PATCH: 'patchCardkitCardElement',
177
- DELETE: 'deleteCardkitCardElement',
190
+ PUT: 'cardkit.card.element.update',
191
+ PATCH: 'cardkit.card.element.patch',
192
+ DELETE: 'cardkit.card.element.delete',
178
193
  },
179
194
  '/cardkit/v1/cards/{card_id}/elements/{element_id}/content': {
180
- PUT: 'contentCardkitCardElement',
195
+ PUT: 'cardkit.card.element.content',
196
+ },
197
+ '/cardkit/v1/cards/id_convert': {
198
+ POST: 'cardkit.card.idConvert',
181
199
  },
182
200
  })
@@ -1,79 +1,121 @@
1
- import { ArchiveDetail, ChangeReason, Indicator, Item, ItemCategory, PlanDetail } from '.'
2
- import { Internal, Pagination } 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
- * 批量查询员工薪资档案
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>
6
+ compensation: Compensation.Methods
36
7
  }
37
8
  }
38
9
 
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
- }
10
+ export namespace Compensation {
11
+ export interface Methods {
12
+ archive: Archive.Methods
13
+ item: Item.Methods
14
+ indicator: Indicator.Methods
15
+ itemCategory: ItemCategory.Methods
16
+ plan: Plan.Methods
17
+ changeReason: ChangeReason.Methods
18
+ }
49
19
 
50
- export interface QueryCompensationArchiveQuery extends Pagination {
51
- /** 用户ID类型 */
52
- user_id_type: 'user_id' | 'union_id' | 'open_id' | 'people_corehr_id'
53
- }
20
+ export namespace Archive {
21
+ export interface Methods {
22
+ /**
23
+ * 批量查询员工薪资档案
24
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/compensation-v1/archive/query
25
+ */
26
+ query(body: QueryRequest, query?: QueryQuery): Paginated<Lark.ArchiveDetail>
27
+ }
28
+
29
+ export interface QueryRequest {
30
+ /** 用户ID列表 */
31
+ user_id_list: string[]
32
+ /** 档案Tid列表 */
33
+ tid_list?: string[]
34
+ /** 生效开始时间 */
35
+ effective_start_date?: string
36
+ /** 生效结束时间 */
37
+ effective_end_date?: string
38
+ }
39
+
40
+ export interface QueryQuery extends Pagination {
41
+ /** 用户ID类型 */
42
+ user_id_type: 'user_id' | 'union_id' | 'open_id' | 'people_corehr_id'
43
+ }
44
+ }
45
+
46
+ export namespace Item {
47
+ export interface Methods {
48
+ /**
49
+ * 批量查询薪资项
50
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/compensation-v1/item/list
51
+ */
52
+ list(query?: ListQuery): Paginated<Lark.Item>
53
+ }
54
+
55
+ export interface ListQuery extends Pagination {
56
+ /** 薪酬项类型(不传则认为查询所有类型薪酬项) */
57
+ item_type?: 'salary' | 'bonus' | 'recurring_payment'
58
+ }
59
+ }
60
+
61
+ export namespace Indicator {
62
+ export interface Methods {
63
+ /**
64
+ * 批量查询薪资统计指标
65
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/compensation-v1/indicator/list
66
+ */
67
+ list(query?: Pagination): Paginated<Lark.Indicator>
68
+ }
69
+ }
70
+
71
+ export namespace ItemCategory {
72
+ export interface Methods {
73
+ /**
74
+ * 批量获取薪资项分类信息
75
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/compensation-v1/item_category/list
76
+ */
77
+ list(query?: Pagination): Paginated<Lark.ItemCategory>
78
+ }
79
+ }
80
+
81
+ export namespace Plan {
82
+ export interface Methods {
83
+ /**
84
+ * 批量查询薪资方案
85
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/compensation-v1/plan/list
86
+ */
87
+ list(query?: Pagination): Paginated<Lark.PlanDetail>
88
+ }
89
+ }
54
90
 
55
- export interface ListCompensationItemQuery extends Pagination {
56
- /** 薪酬项类型(不传则认为查询所有类型薪酬项) */
57
- item_type?: 'salary' | 'bonus' | 'recurring_payment'
91
+ export namespace ChangeReason {
92
+ export interface Methods {
93
+ /**
94
+ * 批量查询定调薪原因
95
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/compensation-v1/change_reason/list
96
+ */
97
+ list(query?: Pagination): Paginated<Lark.ChangeReason>
98
+ }
99
+ }
58
100
  }
59
101
 
60
102
  Internal.define({
61
103
  '/compensation/v1/archives/query': {
62
- POST: { name: 'queryCompensationArchive', pagination: { argIndex: 1 } },
104
+ POST: { name: 'compensation.archive.query', pagination: { argIndex: 1 } },
63
105
  },
64
106
  '/compensation/v1/items': {
65
- GET: { name: 'listCompensationItem', pagination: { argIndex: 0 } },
107
+ GET: { name: 'compensation.item.list', pagination: { argIndex: 0 } },
66
108
  },
67
109
  '/compensation/v1/indicators': {
68
- GET: { name: 'listCompensationIndicator', pagination: { argIndex: 0 } },
110
+ GET: { name: 'compensation.indicator.list', pagination: { argIndex: 0 } },
69
111
  },
70
112
  '/compensation/v1/item_categories': {
71
- GET: { name: 'listCompensationItemCategory', pagination: { argIndex: 0 } },
113
+ GET: { name: 'compensation.itemCategory.list', pagination: { argIndex: 0 } },
72
114
  },
73
115
  '/compensation/v1/plans': {
74
- GET: { name: 'listCompensationPlan', pagination: { argIndex: 0 } },
116
+ GET: { name: 'compensation.plan.list', pagination: { argIndex: 0 } },
75
117
  },
76
118
  '/compensation/v1/change_reasons': {
77
- GET: { name: 'listCompensationChangeReason', pagination: { argIndex: 0 } },
119
+ GET: { name: 'compensation.changeReason.list', pagination: { argIndex: 0 } },
78
120
  },
79
121
  })