@satorijs/adapter-lark 3.11.7 → 3.11.9
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 +360 -47
- package/lib/types/aily.d.ts +3 -3
- package/lib/types/apaas.d.ts +38 -28
- package/lib/types/board.d.ts +39 -0
- package/lib/types/calendar.d.ts +55 -0
- package/lib/types/cardkit.d.ts +2 -2
- package/lib/types/compensation.d.ts +400 -0
- package/lib/types/corehr.d.ts +598 -2
- package/lib/types/directory.d.ts +3 -41
- package/lib/types/docx.d.ts +23 -0
- package/lib/types/drive.d.ts +88 -88
- package/lib/types/hire.d.ts +49 -0
- package/lib/types/im.d.ts +1 -1
- package/lib/types/index.d.ts +1008 -40
- package/lib/types/payroll.d.ts +117 -81
- package/lib/types/performance.d.ts +1 -1
- package/lib/types/security_and_compliance.d.ts +254 -1
- package/package.json +1 -1
- package/src/message.ts +11 -1
- package/src/types/aily.ts +3 -3
- package/src/types/apaas.ts +52 -38
- package/src/types/board.ts +53 -2
- package/src/types/calendar.ts +72 -0
- package/src/types/cardkit.ts +2 -2
- package/src/types/compensation.ts +485 -0
- package/src/types/corehr.ts +705 -2
- package/src/types/directory.ts +3 -53
- package/src/types/docx.ts +29 -0
- package/src/types/drive.ts +110 -110
- package/src/types/hire.ts +63 -0
- package/src/types/im.ts +1 -1
- package/src/types/index.ts +1063 -42
- package/src/types/payroll.ts +146 -103
- package/src/types/performance.ts +1 -1
- package/src/types/security_and_compliance.ts +292 -1
package/lib/types/payroll.d.ts
CHANGED
|
@@ -7,15 +7,101 @@ declare module '../internal' {
|
|
|
7
7
|
}
|
|
8
8
|
export declare namespace Payroll {
|
|
9
9
|
interface Methods {
|
|
10
|
+
acctItem: AcctItem.Methods;
|
|
11
|
+
paygroup: Paygroup.Methods;
|
|
12
|
+
datasource: Datasource.Methods;
|
|
13
|
+
datasourceRecord: DatasourceRecord.Methods;
|
|
14
|
+
paymentActivity: PaymentActivity.Methods;
|
|
10
15
|
paymentActivityDetail: PaymentActivityDetail.Methods;
|
|
11
16
|
paymentDetail: PaymentDetail.Methods;
|
|
12
|
-
|
|
13
|
-
datasourceRecord: DatasourceRecord.Methods;
|
|
14
|
-
datasource: Datasource.Methods;
|
|
15
|
-
acctItem: AcctItem.Methods;
|
|
17
|
+
costAllocationDetail: CostAllocationDetail.Methods;
|
|
16
18
|
costAllocationReport: CostAllocationReport.Methods;
|
|
17
19
|
costAllocationPlan: CostAllocationPlan.Methods;
|
|
18
|
-
|
|
20
|
+
}
|
|
21
|
+
namespace AcctItem {
|
|
22
|
+
interface Methods {
|
|
23
|
+
/**
|
|
24
|
+
* 批量查询算薪项
|
|
25
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/payroll-v1/acct_item/list
|
|
26
|
+
*/
|
|
27
|
+
list(query?: Pagination): Paginated<Lark.AcctItem>;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
namespace Paygroup {
|
|
31
|
+
interface Methods {
|
|
32
|
+
/**
|
|
33
|
+
* 获取薪资组基本信息
|
|
34
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/payroll-v1/paygroup/list
|
|
35
|
+
*/
|
|
36
|
+
list(query?: Pagination): Paginated<Lark.Paygroup>;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
namespace Datasource {
|
|
40
|
+
interface Methods {
|
|
41
|
+
/**
|
|
42
|
+
* 获取外部数据源配置信息
|
|
43
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/payroll-v1/datasource/list
|
|
44
|
+
*/
|
|
45
|
+
list(query?: Pagination): Paginated<Lark.Datasource, 'datasources'>;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
namespace DatasourceRecord {
|
|
49
|
+
interface Methods {
|
|
50
|
+
/**
|
|
51
|
+
* 创建 / 更新外部算薪数据
|
|
52
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/payroll-v1/datasource_record/save
|
|
53
|
+
*/
|
|
54
|
+
save(body: SaveRequest): Promise<SaveResponse>;
|
|
55
|
+
/**
|
|
56
|
+
* 批量查询外部算薪数据记录
|
|
57
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/payroll-v1/datasource_record/query
|
|
58
|
+
*/
|
|
59
|
+
query(body: QueryRequest, query?: Pagination): Paginated<Lark.DatasourceRecord, 'records'>;
|
|
60
|
+
}
|
|
61
|
+
interface SaveRequest {
|
|
62
|
+
/** 数据源code */
|
|
63
|
+
source_code: string;
|
|
64
|
+
/** 需保存的记录列表 */
|
|
65
|
+
records: Lark.DatasourceRecord[];
|
|
66
|
+
}
|
|
67
|
+
interface SaveResponse {
|
|
68
|
+
/** 更新的记录条数 */
|
|
69
|
+
affect_counts: string;
|
|
70
|
+
}
|
|
71
|
+
interface QueryRequest {
|
|
72
|
+
/** 数据源编码 */
|
|
73
|
+
source_code: string;
|
|
74
|
+
/** 指定查询的数据源字段。如不传,默认返回所有数据源字段 */
|
|
75
|
+
selected_fields?: string[];
|
|
76
|
+
/** 查询过滤器列表,多个过滤器之间为And关系。本期员工月维度汇总类型数据源,只支持employment_id、payroll_period fieldKey的查询,其中payroll_period必传 */
|
|
77
|
+
field_filters?: Lark.DatasourceRecordFieldFilter[];
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
namespace PaymentActivity {
|
|
81
|
+
interface Methods {
|
|
82
|
+
/**
|
|
83
|
+
* 封存发薪活动
|
|
84
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/payroll-v1/payment_activity/archive
|
|
85
|
+
*/
|
|
86
|
+
archive(body: ArchiveRequest): Promise<void>;
|
|
87
|
+
/**
|
|
88
|
+
* 查询发薪活动列表
|
|
89
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/payroll-v1/payment_activity/list
|
|
90
|
+
*/
|
|
91
|
+
list(query?: ListQuery): Paginated<Lark.PaymentActivity, 'payment_activitys'>;
|
|
92
|
+
}
|
|
93
|
+
interface ArchiveRequest {
|
|
94
|
+
/** 发薪活动ID */
|
|
95
|
+
activity_id: string;
|
|
96
|
+
}
|
|
97
|
+
interface ListQuery extends Pagination {
|
|
98
|
+
/** 发薪日开始时间,格式:YYYY-MM-dd,[pay_period_start_date, pay_period_end_date] 是一个左闭右闭区间。 */
|
|
99
|
+
pay_period_start_date: string;
|
|
100
|
+
/** 发薪日结束时间,格式:YYYY-MM-dd,[pay_period_start_date, pay_period_end_date] 是一个左闭右闭区间。 */
|
|
101
|
+
pay_period_end_date: string;
|
|
102
|
+
/** 发薪活动审批状态列表,其中:100-待确认发薪名单;150-待提交审批;200-审批中;300-审批被拒绝;350-审批被撤回;360-审批被撤销;375-审批通过;400-已封存。 */
|
|
103
|
+
statuses?: number[];
|
|
104
|
+
}
|
|
19
105
|
}
|
|
20
106
|
namespace PaymentActivityDetail {
|
|
21
107
|
interface Methods {
|
|
@@ -77,80 +163,39 @@ export declare namespace Payroll {
|
|
|
77
163
|
total?: number;
|
|
78
164
|
}
|
|
79
165
|
}
|
|
80
|
-
namespace
|
|
166
|
+
namespace CostAllocationDetail {
|
|
81
167
|
interface Methods {
|
|
82
168
|
/**
|
|
83
|
-
*
|
|
84
|
-
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/payroll-v1/
|
|
85
|
-
*/
|
|
86
|
-
archive(body: ArchiveRequest): Promise<void>;
|
|
87
|
-
/**
|
|
88
|
-
* 查询发薪活动列表
|
|
89
|
-
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/payroll-v1/payment_activity/list
|
|
169
|
+
* 查询成本分摊报表明细
|
|
170
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/payroll-v1/cost_allocation_detail/list
|
|
90
171
|
*/
|
|
91
|
-
list(query?: ListQuery):
|
|
172
|
+
list(query?: ListQuery): Promise<ListResponse>;
|
|
92
173
|
}
|
|
93
|
-
|
|
94
|
-
/**
|
|
95
|
-
|
|
174
|
+
const enum ListQueryReportType {
|
|
175
|
+
/** 默认 */
|
|
176
|
+
Default = 0,
|
|
177
|
+
/** 计提 */
|
|
178
|
+
Accrued = 1,
|
|
179
|
+
/** 实发 */
|
|
180
|
+
Paid = 2
|
|
96
181
|
}
|
|
97
182
|
interface ListQuery extends Pagination {
|
|
98
|
-
/**
|
|
99
|
-
|
|
100
|
-
/**
|
|
101
|
-
|
|
102
|
-
/**
|
|
103
|
-
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
namespace DatasourceRecord {
|
|
107
|
-
interface Methods {
|
|
108
|
-
/**
|
|
109
|
-
* 创建 / 更新外部算薪数据
|
|
110
|
-
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/payroll-v1/datasource_record/save
|
|
111
|
-
*/
|
|
112
|
-
save(body: SaveRequest): Promise<SaveResponse>;
|
|
113
|
-
/**
|
|
114
|
-
* 批量查询外部算薪数据记录
|
|
115
|
-
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/payroll-v1/datasource_record/query
|
|
116
|
-
*/
|
|
117
|
-
query(body: QueryRequest, query?: Pagination): Paginated<Lark.DatasourceRecord, 'records'>;
|
|
118
|
-
}
|
|
119
|
-
interface SaveRequest {
|
|
120
|
-
/** 数据源code */
|
|
121
|
-
source_code: string;
|
|
122
|
-
/** 需保存的记录列表 */
|
|
123
|
-
records: Lark.DatasourceRecord[];
|
|
124
|
-
}
|
|
125
|
-
interface SaveResponse {
|
|
126
|
-
/** 更新的记录条数 */
|
|
127
|
-
affect_counts: string;
|
|
128
|
-
}
|
|
129
|
-
interface QueryRequest {
|
|
130
|
-
/** 数据源编码 */
|
|
131
|
-
source_code: string;
|
|
132
|
-
/** 指定查询的数据源字段。如不传,默认返回所有数据源字段 */
|
|
133
|
-
selected_fields?: string[];
|
|
134
|
-
/** 查询过滤器列表,多个过滤器之间为And关系。本期员工月维度汇总类型数据源,只支持employment_id、payroll_period fieldKey的查询,其中payroll_period必传 */
|
|
135
|
-
field_filters?: Lark.DatasourceRecordFieldFilter[];
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
namespace Datasource {
|
|
139
|
-
interface Methods {
|
|
140
|
-
/**
|
|
141
|
-
* 获取外部数据源配置信息
|
|
142
|
-
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/payroll-v1/datasource/list
|
|
143
|
-
*/
|
|
144
|
-
list(query?: Pagination): Paginated<Lark.Datasource, 'datasources'>;
|
|
183
|
+
/** 成本分摊方案ID */
|
|
184
|
+
cost_allocation_plan_id: string;
|
|
185
|
+
/** 期间 */
|
|
186
|
+
pay_period: string;
|
|
187
|
+
/** 报表类型 */
|
|
188
|
+
report_type: ListQueryReportType;
|
|
145
189
|
}
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
/**
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
190
|
+
interface ListResponse {
|
|
191
|
+
/** 报表明细数据 */
|
|
192
|
+
cost_allocation_report_datas?: Lark.CostAllocationReportData[];
|
|
193
|
+
/** 报表名称 */
|
|
194
|
+
cost_allocation_report_names?: Lark.I18nContent[];
|
|
195
|
+
/** 期间 */
|
|
196
|
+
pay_period?: string;
|
|
197
|
+
page_token?: string;
|
|
198
|
+
has_more?: boolean;
|
|
154
199
|
}
|
|
155
200
|
}
|
|
156
201
|
namespace CostAllocationReport {
|
|
@@ -203,13 +248,4 @@ export declare namespace Payroll {
|
|
|
203
248
|
pay_period: string;
|
|
204
249
|
}
|
|
205
250
|
}
|
|
206
|
-
namespace Paygroup {
|
|
207
|
-
interface Methods {
|
|
208
|
-
/**
|
|
209
|
-
* 获取薪资组基本信息
|
|
210
|
-
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/payroll-v1/paygroup/list
|
|
211
|
-
*/
|
|
212
|
-
list(query?: Pagination): Paginated<Lark.Paygroup>;
|
|
213
|
-
}
|
|
214
|
-
}
|
|
215
251
|
}
|
|
@@ -212,7 +212,7 @@ export declare namespace Performance {
|
|
|
212
212
|
namespace ReviewTemplate {
|
|
213
213
|
interface Methods {
|
|
214
214
|
/**
|
|
215
|
-
*
|
|
215
|
+
* 获取绩效模板配置
|
|
216
216
|
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/performance-v2/review_template/query
|
|
217
217
|
*/
|
|
218
218
|
query(body: QueryRequest, query?: Pagination): Paginated<Lark.ReviewTemplate, 'review_templates'>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as Lark from '.';
|
|
2
|
-
import { Paginated } from '../internal';
|
|
2
|
+
import { Paginated, Pagination } from '../internal';
|
|
3
3
|
declare module '../internal' {
|
|
4
4
|
interface Internal {
|
|
5
5
|
securityAndCompliance: SecurityAndCompliance.Methods;
|
|
@@ -7,8 +7,261 @@ declare module '../internal' {
|
|
|
7
7
|
}
|
|
8
8
|
export declare namespace SecurityAndCompliance {
|
|
9
9
|
interface Methods {
|
|
10
|
+
deviceRecord: DeviceRecord.Methods;
|
|
11
|
+
deviceApplyRecord: DeviceApplyRecord.Methods;
|
|
10
12
|
openapiLog: OpenapiLog.Methods;
|
|
11
13
|
}
|
|
14
|
+
namespace DeviceRecord {
|
|
15
|
+
interface Methods {
|
|
16
|
+
/**
|
|
17
|
+
* 获取客户端设备认证信息
|
|
18
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/security_and_compliance-v2/device_record/mine
|
|
19
|
+
*/
|
|
20
|
+
mine(): Promise<MineResponse>;
|
|
21
|
+
/**
|
|
22
|
+
* 新增设备
|
|
23
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/security_and_compliance-v2/device_record/create
|
|
24
|
+
*/
|
|
25
|
+
create(body: CreateRequest, query?: CreateQuery): Promise<CreateResponse>;
|
|
26
|
+
/**
|
|
27
|
+
* 查询设备信息
|
|
28
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/security_and_compliance-v2/device_record/list
|
|
29
|
+
*/
|
|
30
|
+
list(query?: ListQuery): Paginated<Lark.DeviceRecord>;
|
|
31
|
+
/**
|
|
32
|
+
* 获取设备信息
|
|
33
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/security_and_compliance-v2/device_record/get
|
|
34
|
+
*/
|
|
35
|
+
get(device_record_id: string, query?: GetQuery): Promise<GetResponse>;
|
|
36
|
+
/**
|
|
37
|
+
* 更新设备
|
|
38
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/security_and_compliance-v2/device_record/update
|
|
39
|
+
*/
|
|
40
|
+
update(device_record_id: string, body: UpdateRequest, query?: UpdateQuery): Promise<void>;
|
|
41
|
+
/**
|
|
42
|
+
* 删除设备
|
|
43
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/security_and_compliance-v2/device_record/delete
|
|
44
|
+
*/
|
|
45
|
+
delete(device_record_id: string): Promise<void>;
|
|
46
|
+
}
|
|
47
|
+
const enum MineResponseDeviceOwnership {
|
|
48
|
+
/** 未知设备 */
|
|
49
|
+
Unknown = 0,
|
|
50
|
+
/** 个人设备 */
|
|
51
|
+
Personal = 1,
|
|
52
|
+
/** 企业设备 */
|
|
53
|
+
Company = 2
|
|
54
|
+
}
|
|
55
|
+
const enum MineResponseDeviceStatus {
|
|
56
|
+
/** 未知状态 */
|
|
57
|
+
Unknown = 0,
|
|
58
|
+
/** 信任设备 */
|
|
59
|
+
Trusted = 1,
|
|
60
|
+
/** 非信任设备 */
|
|
61
|
+
Untrusted = 2
|
|
62
|
+
}
|
|
63
|
+
interface MineResponse {
|
|
64
|
+
/** 设备认证编码 */
|
|
65
|
+
device_record_id?: string;
|
|
66
|
+
/** 设备归属 */
|
|
67
|
+
device_ownership?: MineResponseDeviceOwnership;
|
|
68
|
+
/** 可信状态 */
|
|
69
|
+
device_status?: MineResponseDeviceStatus;
|
|
70
|
+
}
|
|
71
|
+
const enum CreateRequestDeviceSystem {
|
|
72
|
+
/** Windows */
|
|
73
|
+
Windows = 1,
|
|
74
|
+
/** macOS */
|
|
75
|
+
MacOS = 2,
|
|
76
|
+
/** Linux */
|
|
77
|
+
Linux = 3,
|
|
78
|
+
/** Android */
|
|
79
|
+
Android = 4,
|
|
80
|
+
/** iOS */
|
|
81
|
+
IOS = 5,
|
|
82
|
+
/** OpenHarmony */
|
|
83
|
+
OpenHarmony = 6
|
|
84
|
+
}
|
|
85
|
+
const enum CreateRequestDeviceOwnership {
|
|
86
|
+
/** 未知设备 */
|
|
87
|
+
Unknown = 0,
|
|
88
|
+
/** 个人设备 */
|
|
89
|
+
Personal = 1,
|
|
90
|
+
/** 企业设备 */
|
|
91
|
+
Company = 2
|
|
92
|
+
}
|
|
93
|
+
const enum CreateRequestDeviceStatus {
|
|
94
|
+
/** 未知状态 */
|
|
95
|
+
Unknown = 0,
|
|
96
|
+
/** 信任设备 */
|
|
97
|
+
Trusted = 1,
|
|
98
|
+
/** 非信任设备 */
|
|
99
|
+
Untrusted = 2
|
|
100
|
+
}
|
|
101
|
+
interface CreateRequest {
|
|
102
|
+
/** 操作系统 */
|
|
103
|
+
device_system: CreateRequestDeviceSystem;
|
|
104
|
+
/** 生产序列号 */
|
|
105
|
+
serial_number?: string;
|
|
106
|
+
/** 硬盘序列号 */
|
|
107
|
+
disk_serial_number?: string;
|
|
108
|
+
/** 主板UUID */
|
|
109
|
+
uuid?: string;
|
|
110
|
+
/** MAC地址 */
|
|
111
|
+
mac_address?: string;
|
|
112
|
+
/** Android标识符 */
|
|
113
|
+
android_id?: string;
|
|
114
|
+
/** iOS供应商标识符 */
|
|
115
|
+
idfv?: string;
|
|
116
|
+
/** Harmony供应商标识符 */
|
|
117
|
+
aaid?: string;
|
|
118
|
+
/** 设备归属 */
|
|
119
|
+
device_ownership: CreateRequestDeviceOwnership;
|
|
120
|
+
/** 可信状态 */
|
|
121
|
+
device_status: CreateRequestDeviceStatus;
|
|
122
|
+
/** 最近登录用户ID */
|
|
123
|
+
latest_user_id?: string;
|
|
124
|
+
/** 设备指纹列表 */
|
|
125
|
+
dids?: string[];
|
|
126
|
+
}
|
|
127
|
+
interface CreateQuery {
|
|
128
|
+
/** 此次调用中使用的用户ID的类型 */
|
|
129
|
+
user_id_type?: 'user_id' | 'union_id' | 'open_id';
|
|
130
|
+
}
|
|
131
|
+
interface CreateResponse {
|
|
132
|
+
/** 设备认证编码 */
|
|
133
|
+
device_record_id?: string;
|
|
134
|
+
}
|
|
135
|
+
const enum ListQueryDeviceOwnership {
|
|
136
|
+
/** 未知设备 */
|
|
137
|
+
Unknown = 0,
|
|
138
|
+
/** 个人设备 */
|
|
139
|
+
Personal = 1,
|
|
140
|
+
/** 企业设备 */
|
|
141
|
+
Company = 2
|
|
142
|
+
}
|
|
143
|
+
const enum ListQueryDeviceStatus {
|
|
144
|
+
/** 未知状态 */
|
|
145
|
+
Unknown = 0,
|
|
146
|
+
/** 信任设备 */
|
|
147
|
+
Trusted = 1,
|
|
148
|
+
/** 非信任设备 */
|
|
149
|
+
Untrusted = 2
|
|
150
|
+
}
|
|
151
|
+
const enum ListQueryDeviceTerminalType {
|
|
152
|
+
/** 未知 */
|
|
153
|
+
Unknown = 0,
|
|
154
|
+
/** 移动端 */
|
|
155
|
+
Mobile = 1,
|
|
156
|
+
/** 桌面端 */
|
|
157
|
+
PC = 2
|
|
158
|
+
}
|
|
159
|
+
const enum ListQueryOs {
|
|
160
|
+
/** 未知 */
|
|
161
|
+
Unknown = 0,
|
|
162
|
+
/** Windows */
|
|
163
|
+
Windows = 1,
|
|
164
|
+
/** macOS */
|
|
165
|
+
MacOS = 2,
|
|
166
|
+
/** Linux */
|
|
167
|
+
Linux = 3,
|
|
168
|
+
/** Android */
|
|
169
|
+
Android = 4,
|
|
170
|
+
/** iOS */
|
|
171
|
+
IOS = 5,
|
|
172
|
+
/** 鸿蒙 */
|
|
173
|
+
OpenHarmony = 6
|
|
174
|
+
}
|
|
175
|
+
interface ListQuery extends Pagination {
|
|
176
|
+
/** 设备认证编码 */
|
|
177
|
+
device_record_id?: string;
|
|
178
|
+
/** 当前登录用户ID */
|
|
179
|
+
current_user_id?: string;
|
|
180
|
+
/** 此次调用中使用的用户ID的类型 */
|
|
181
|
+
user_id_type?: 'open_id' | 'union_id' | 'user_id';
|
|
182
|
+
/** 设备名称 */
|
|
183
|
+
device_name?: string;
|
|
184
|
+
/** 生产序列号 */
|
|
185
|
+
serial_number?: string;
|
|
186
|
+
/** 硬盘序列号 */
|
|
187
|
+
disk_serial_number?: string;
|
|
188
|
+
/** MAC地址 */
|
|
189
|
+
mac_address?: string;
|
|
190
|
+
/** Android标识符 */
|
|
191
|
+
android_id?: string;
|
|
192
|
+
/** 主板UUID */
|
|
193
|
+
uuid?: string;
|
|
194
|
+
/** iOS供应商标识符 */
|
|
195
|
+
idfv?: string;
|
|
196
|
+
/** Harmony供应商标识符 */
|
|
197
|
+
aaid?: string;
|
|
198
|
+
/** 设备归属 */
|
|
199
|
+
device_ownership?: ListQueryDeviceOwnership;
|
|
200
|
+
/** 可信状态 */
|
|
201
|
+
device_status?: ListQueryDeviceStatus;
|
|
202
|
+
/** 设备类型 */
|
|
203
|
+
device_terminal_type?: ListQueryDeviceTerminalType;
|
|
204
|
+
/** 设备操作系统 */
|
|
205
|
+
os?: ListQueryOs;
|
|
206
|
+
/** 最近登录用户ID */
|
|
207
|
+
latest_user_id?: string;
|
|
208
|
+
/** 设备指纹 */
|
|
209
|
+
did?: string;
|
|
210
|
+
}
|
|
211
|
+
interface GetQuery {
|
|
212
|
+
/** 此次调用中使用的用户ID的类型 */
|
|
213
|
+
user_id_type?: 'user_id' | 'union_id' | 'open_id';
|
|
214
|
+
}
|
|
215
|
+
interface GetResponse {
|
|
216
|
+
/** 设备记录 */
|
|
217
|
+
device_record?: Lark.DeviceRecord;
|
|
218
|
+
}
|
|
219
|
+
const enum UpdateRequestDeviceOwnership {
|
|
220
|
+
/** 未知设备 */
|
|
221
|
+
Unknown = 0,
|
|
222
|
+
/** 个人设备 */
|
|
223
|
+
Personal = 1,
|
|
224
|
+
/** 企业设备 */
|
|
225
|
+
Company = 2
|
|
226
|
+
}
|
|
227
|
+
const enum UpdateRequestDeviceStatus {
|
|
228
|
+
/** 未知状态 */
|
|
229
|
+
Unknown = 0,
|
|
230
|
+
/** 信任设备 */
|
|
231
|
+
Trusted = 1,
|
|
232
|
+
/** 非信任设备 */
|
|
233
|
+
Untrusted = 2
|
|
234
|
+
}
|
|
235
|
+
interface UpdateRequest {
|
|
236
|
+
/** 设备归属 */
|
|
237
|
+
device_ownership: UpdateRequestDeviceOwnership;
|
|
238
|
+
/** 可信状态 */
|
|
239
|
+
device_status: UpdateRequestDeviceStatus;
|
|
240
|
+
/** 最近登录用户ID */
|
|
241
|
+
latest_user_id?: string;
|
|
242
|
+
/** 设备指纹列表 */
|
|
243
|
+
dids?: string[];
|
|
244
|
+
}
|
|
245
|
+
interface UpdateQuery {
|
|
246
|
+
/** 版本号 */
|
|
247
|
+
version: string;
|
|
248
|
+
/** 此次调用中使用的用户ID的类型 */
|
|
249
|
+
user_id_type?: 'user_id' | 'union_id' | 'open_id';
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
namespace DeviceApplyRecord {
|
|
253
|
+
interface Methods {
|
|
254
|
+
/**
|
|
255
|
+
* 审批设备申报
|
|
256
|
+
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/security_and_compliance-v2/device_apply_record/update
|
|
257
|
+
*/
|
|
258
|
+
update(device_apply_record_id: string, body: UpdateRequest): Promise<void>;
|
|
259
|
+
}
|
|
260
|
+
interface UpdateRequest {
|
|
261
|
+
/** 是否审批通过 */
|
|
262
|
+
is_approved: boolean;
|
|
263
|
+
}
|
|
264
|
+
}
|
|
12
265
|
namespace OpenapiLog {
|
|
13
266
|
interface Methods {
|
|
14
267
|
/**
|
package/package.json
CHANGED
package/src/message.ts
CHANGED
|
@@ -250,7 +250,10 @@ export class LarkMessageEncoder<C extends Context = Context> extends MessageEnco
|
|
|
250
250
|
} else if (type === 'hr') {
|
|
251
251
|
this.flushText()
|
|
252
252
|
this.richContent.push([{ tag: 'hr' }])
|
|
253
|
-
this.elements.push({
|
|
253
|
+
this.elements.push({
|
|
254
|
+
tag: 'hr',
|
|
255
|
+
margin: attrs.margin,
|
|
256
|
+
})
|
|
254
257
|
} else if (type === 'form') {
|
|
255
258
|
this.flushText()
|
|
256
259
|
const parent = this.elements
|
|
@@ -282,6 +285,8 @@ export class LarkMessageEncoder<C extends Context = Context> extends MessageEnco
|
|
|
282
285
|
tag: 'plain_text',
|
|
283
286
|
content: attrs.disabledTips,
|
|
284
287
|
},
|
|
288
|
+
behaviors: this.createBehaviors(attrs),
|
|
289
|
+
margin: attrs.margin,
|
|
285
290
|
})
|
|
286
291
|
this.textContent = ''
|
|
287
292
|
} else if (attrs.type === 'submit') {
|
|
@@ -297,6 +302,7 @@ export class LarkMessageEncoder<C extends Context = Context> extends MessageEnco
|
|
|
297
302
|
},
|
|
298
303
|
form_action_type: 'submit',
|
|
299
304
|
behaviors: this.createBehaviors(attrs),
|
|
305
|
+
margin: attrs.margin,
|
|
300
306
|
})
|
|
301
307
|
this.textContent = ''
|
|
302
308
|
} else {
|
|
@@ -321,6 +327,7 @@ export class LarkMessageEncoder<C extends Context = Context> extends MessageEnco
|
|
|
321
327
|
disabled: attrs.disabled,
|
|
322
328
|
required: attrs.required,
|
|
323
329
|
behaviors: this.createBehaviors(attrs),
|
|
330
|
+
margin: attrs.margin,
|
|
324
331
|
}
|
|
325
332
|
this.elements.push(input)
|
|
326
333
|
}
|
|
@@ -339,6 +346,7 @@ export class LarkMessageEncoder<C extends Context = Context> extends MessageEnco
|
|
|
339
346
|
},
|
|
340
347
|
options: [],
|
|
341
348
|
behaviors: this.createBehaviors(attrs),
|
|
349
|
+
margin: attrs.margin,
|
|
342
350
|
}
|
|
343
351
|
for (const child of children) {
|
|
344
352
|
if (child.type !== 'option') continue
|
|
@@ -380,6 +388,7 @@ export class LarkMessageEncoder<C extends Context = Context> extends MessageEnco
|
|
|
380
388
|
content: attrs.disabledTips,
|
|
381
389
|
},
|
|
382
390
|
behaviors: this.createBehaviors(attrs),
|
|
391
|
+
margin: attrs.margin,
|
|
383
392
|
})
|
|
384
393
|
this.textContent = ''
|
|
385
394
|
} else if (type === 'div') {
|
|
@@ -524,6 +533,7 @@ export class LarkMessageEncoder<C extends Context = Context> extends MessageEnco
|
|
|
524
533
|
tag: 'column',
|
|
525
534
|
width: child.attrs.width,
|
|
526
535
|
weight: child.attrs.weight,
|
|
536
|
+
margin: child.attrs.margin,
|
|
527
537
|
padding: child.attrs.padding,
|
|
528
538
|
vertical_align: child.attrs.verticalAlign ?? 'center',
|
|
529
539
|
vertical_spacing: child.attrs.verticalSpacing ?? '0px',
|
package/src/types/aily.ts
CHANGED
|
@@ -71,17 +71,17 @@ export namespace Aily {
|
|
|
71
71
|
export namespace AilyMessage {
|
|
72
72
|
export interface Methods {
|
|
73
73
|
/**
|
|
74
|
-
*
|
|
74
|
+
* 发送 Aily 消息
|
|
75
75
|
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/aily-v1/aily_session-aily_message/create
|
|
76
76
|
*/
|
|
77
77
|
create(aily_session_id: string, body: CreateRequest): Promise<CreateResponse>
|
|
78
78
|
/**
|
|
79
|
-
*
|
|
79
|
+
* 获取 Aily 消息
|
|
80
80
|
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/aily-v1/aily_session-aily_message/get
|
|
81
81
|
*/
|
|
82
82
|
get(aily_session_id: string, aily_message_id: string): Promise<GetResponse>
|
|
83
83
|
/**
|
|
84
|
-
*
|
|
84
|
+
* 列出 Aily 消息
|
|
85
85
|
* @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/aily-v1/aily_session-aily_message/list
|
|
86
86
|
*/
|
|
87
87
|
list(aily_session_id: string, query?: ListQuery): Paginated<Lark.AilyMessage, 'messages'>
|