@satorijs/adapter-dingtalk 2.0.2 → 2.0.4
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/http.d.ts +4 -2
- package/lib/index.js +11 -8
- package/lib/index.js.map +1 -2
- package/package.json +8 -4
- package/src/api/.eslintrc.yml +2 -0
- package/src/api/alitrip.ts +467 -0
- package/src/api/attendance.ts +81 -0
- package/src/api/badge.ts +285 -0
- package/src/api/blackboard.ts +28 -0
- package/src/api/calendar.ts +817 -0
- package/src/api/card.ts +215 -0
- package/src/api/conference.ts +561 -0
- package/src/api/connector.ts +97 -0
- package/src/api/contact.ts +56 -0
- package/src/api/convFile.ts +166 -0
- package/src/api/crm.ts +830 -0
- package/src/api/customerService.ts +156 -0
- package/src/api/datacenter.ts +672 -0
- package/src/api/devicemng.ts +202 -0
- package/src/api/diot.ts +19 -0
- package/src/api/doc.ts +232 -0
- package/src/api/drive.ts +109 -0
- package/src/api/edu.ts +30 -0
- package/src/api/esign.ts +44 -0
- package/src/api/exclusive.ts +372 -0
- package/src/api/h3yun.ts +537 -0
- package/src/api/hrm.ts +272 -0
- package/src/api/im.ts +978 -0
- package/src/api/industry.ts +153 -0
- package/src/api/jzcrm.ts +304 -0
- package/src/api/link.ts +94 -0
- package/src/api/live.ts +162 -0
- package/src/api/microApp.ts +309 -0
- package/src/api/oapi.ts +4083 -0
- package/src/api/oauth2.ts +146 -0
- package/src/api/pedia.ts +222 -0
- package/src/api/project.ts +1519 -0
- package/src/api/resident.ts +133 -0
- package/src/api/robot.ts +326 -0
- package/src/api/rooms.ts +334 -0
- package/src/api/serviceGroup.ts +216 -0
- package/src/api/storage.ts +1701 -0
- package/src/api/swform.ts +94 -0
- package/src/api/todo.ts +220 -0
- package/src/api/wiki.ts +231 -0
- package/src/api/workbench.ts +73 -0
- package/src/api/yida.ts +2165 -0
- package/src/bot.ts +111 -0
- package/src/http.ts +44 -0
- package/src/index.ts +9 -0
- package/src/internal.ts +47 -0
- package/src/message.ts +141 -0
- package/src/types/index.ts +140 -0
- package/src/utils.ts +51 -0
- package/src/ws.ts +55 -0
package/src/api/hrm.ts
ADDED
|
@@ -0,0 +1,272 @@
|
|
|
1
|
+
import { Internal } from '../internal'
|
|
2
|
+
// GENERATED CONTENT
|
|
3
|
+
|
|
4
|
+
export interface HrmProcessUpdateTerminationInfoParams {
|
|
5
|
+
/** 已离职员工的userId,可调用[获取离职员工列表](https://open.dingtalk.com/document/orgapp/obtain-the-list-of-employees-who-have-left)接口获取离职员工userId。 */
|
|
6
|
+
userId: string
|
|
7
|
+
/** 最后工作日,即离职日期,格式为毫秒值时间戳。 */
|
|
8
|
+
lastWorkDate: number
|
|
9
|
+
/** 离职备注信息。 */
|
|
10
|
+
dismissionMemo: string
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export interface HrmProcessUpdateTerminationInfoResponse {
|
|
14
|
+
result: unknown
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export interface HrmProcessRegularParams {
|
|
18
|
+
/** 待转正用户userId。 */
|
|
19
|
+
userId: string
|
|
20
|
+
/** 转正时间,unix时间戳,单位毫秒。 */
|
|
21
|
+
regularDate: number
|
|
22
|
+
/** 备注信息。 */
|
|
23
|
+
remark?: string
|
|
24
|
+
/** 操作用户userId。 */
|
|
25
|
+
operationId: string
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export interface HrmProcessRegularResponse {
|
|
29
|
+
result: unknown
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export interface QueryDismissionStaffIdListQuery {
|
|
33
|
+
/** 分页查询的游标。 */
|
|
34
|
+
nextToken?: number
|
|
35
|
+
/** 每页条目数,默认值30,最大值50。 */
|
|
36
|
+
maxResults?: number
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export interface QueryDismissionStaffIdListResponse {
|
|
40
|
+
nextToken?: number
|
|
41
|
+
hasMore?: unknown
|
|
42
|
+
userIdList?: string[]
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export interface RosterMetaFieldOptionsUpdateParams {
|
|
46
|
+
/** 花名册分组ID。 */
|
|
47
|
+
groupId: string
|
|
48
|
+
/** 花名册字段标识。 */
|
|
49
|
+
fieldCode: string
|
|
50
|
+
/** 需要修改的选项值列表,最大值20。 */
|
|
51
|
+
labels: string[]
|
|
52
|
+
/** 修改类型。 */
|
|
53
|
+
modifyType: string
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export interface RosterMetaFieldOptionsUpdateQuery {
|
|
57
|
+
/** 对应应用的agentId值。 */
|
|
58
|
+
appAgentId?: number
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export interface RosterMetaFieldOptionsUpdateResponse {
|
|
62
|
+
result?: unknown
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export interface HrmProcessTransferParams {
|
|
66
|
+
/** 被调岗员工userId。 */
|
|
67
|
+
userId: string
|
|
68
|
+
/** 部门ID。 */
|
|
69
|
+
deptIdsAfterTransfer?: number[]
|
|
70
|
+
/** 员工调岗后的人事主部门ID。 */
|
|
71
|
+
mainDeptIdAfterTransfer?: number
|
|
72
|
+
/** 员工调岗后的职位名称,长度最大124字符。 */
|
|
73
|
+
positionNameAfterTransfer?: string
|
|
74
|
+
/** 员工调岗后的职级名称,长度不超过64字符。 */
|
|
75
|
+
positionLevelAfterTransfer?: string
|
|
76
|
+
/** 员工调岗后的职务ID,调用[获取企业职务信息](https://open.dingtalk.com/document/orgapp-server/obtain-enterprise-title-information)接口获取jobId参数值。 */
|
|
77
|
+
jobIdAfterTransfer?: string
|
|
78
|
+
/** 员工调岗后的职位ID。 */
|
|
79
|
+
positionIdAfterTransfer?: string
|
|
80
|
+
/** 员工调岗后的职级ID。 */
|
|
81
|
+
rankIdAfterTransfer?: string
|
|
82
|
+
/** 操作人userId。 */
|
|
83
|
+
operateUserId?: string
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export interface HrmProcessTransferResponse {
|
|
87
|
+
result?: unknown
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export interface QueryHrmEmployeeDismissionInfoQuery {
|
|
91
|
+
/** 员工userId列表, 最大长度50。 */
|
|
92
|
+
userIdList: string
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export interface QueryHrmEmployeeDismissionInfoResponse {
|
|
96
|
+
result?: {
|
|
97
|
+
userId?: string
|
|
98
|
+
lastWorkDay?: number
|
|
99
|
+
deptList?: number
|
|
100
|
+
reasonMemo?: string
|
|
101
|
+
preStatus?: number
|
|
102
|
+
handoverUserId?: string
|
|
103
|
+
status?: number
|
|
104
|
+
mainDeptName?: string
|
|
105
|
+
mainDeptId?: number
|
|
106
|
+
voluntaryReason?: number
|
|
107
|
+
passiveReason?: number
|
|
108
|
+
}[]
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
export interface QueryJobsQuery {
|
|
112
|
+
/** 职务名称。 */
|
|
113
|
+
jobName?: string
|
|
114
|
+
/** 分页游标。 */
|
|
115
|
+
nextToken: number
|
|
116
|
+
/** 每页最大条目数,最大值100。 */
|
|
117
|
+
maxResults: number
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
export interface QueryJobsResponse {
|
|
121
|
+
nextToken?: number
|
|
122
|
+
hasMore?: unknown
|
|
123
|
+
list?: {
|
|
124
|
+
jobId?: string
|
|
125
|
+
jobName?: string
|
|
126
|
+
jobDescription?: string
|
|
127
|
+
}[]
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
export interface QueryJobRanksQuery {
|
|
131
|
+
/** 职级序列ID。 */
|
|
132
|
+
rankCategoryId?: string
|
|
133
|
+
/** 职级编码。 */
|
|
134
|
+
rankCode?: string
|
|
135
|
+
/** 职级名称。 */
|
|
136
|
+
rankName?: string
|
|
137
|
+
/** 分页游标。 */
|
|
138
|
+
nextToken: number
|
|
139
|
+
/** 每页最大条目数,最大值200。 */
|
|
140
|
+
maxResults: number
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
export interface QueryJobRanksResponse {
|
|
144
|
+
nextToken?: number
|
|
145
|
+
hasMore?: unknown
|
|
146
|
+
list?: {
|
|
147
|
+
rankId?: string
|
|
148
|
+
rankCategoryId?: string
|
|
149
|
+
rankCode?: string
|
|
150
|
+
rankName?: string
|
|
151
|
+
minJobGrade?: number
|
|
152
|
+
maxJobGrade?: number
|
|
153
|
+
rankDescription?: string
|
|
154
|
+
}[]
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
export interface QueryPositionsParams {
|
|
158
|
+
/** 职位名称。 */
|
|
159
|
+
positionName?: string
|
|
160
|
+
/** 职位类别ID列表。 */
|
|
161
|
+
inCategoryIds?: string[]
|
|
162
|
+
/** 职位ID列表。 */
|
|
163
|
+
inPositionIds?: string[]
|
|
164
|
+
/** 部门ID。 */
|
|
165
|
+
deptId?: number
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
export interface QueryPositionsQuery {
|
|
169
|
+
/** 分页游标。 */
|
|
170
|
+
nextToken: number
|
|
171
|
+
/** 每页最大条目数,最大值200。 */
|
|
172
|
+
maxResults: number
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
export interface QueryPositionsResponse {
|
|
176
|
+
nextToken?: number
|
|
177
|
+
hasMore?: unknown
|
|
178
|
+
list?: {
|
|
179
|
+
positionId?: string
|
|
180
|
+
positionName?: string
|
|
181
|
+
positionCategoryId?: string
|
|
182
|
+
jobId?: string
|
|
183
|
+
positionDes?: string
|
|
184
|
+
rankIdList?: number
|
|
185
|
+
status?: number
|
|
186
|
+
}[]
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
// funcName: isOldApi
|
|
190
|
+
Internal.define({
|
|
191
|
+
'/hrm/processes/employees/terminations': {
|
|
192
|
+
PUT: { hrmProcessUpdateTerminationInfo: false },
|
|
193
|
+
},
|
|
194
|
+
'/hrm/processes/regulars/become': { POST: { hrmProcessRegular: false } },
|
|
195
|
+
'/hrm/employees/dismissions': { GET: { queryDismissionStaffIdList: false } },
|
|
196
|
+
'/hrm/rosters/meta/fields/options': {
|
|
197
|
+
PUT: { rosterMetaFieldOptionsUpdate: false },
|
|
198
|
+
},
|
|
199
|
+
'/hrm/processes/transfer': { POST: { hrmProcessTransfer: false } },
|
|
200
|
+
'/hrm/employees/dimissionInfos': {
|
|
201
|
+
GET: { queryHrmEmployeeDismissionInfo: false },
|
|
202
|
+
},
|
|
203
|
+
'/hrm/jobs': { GET: { queryJobs: false } },
|
|
204
|
+
'/hrm/jobRanks': { GET: { queryJobRanks: false } },
|
|
205
|
+
'/hrm/positions/query': { POST: { queryPositions: false } },
|
|
206
|
+
})
|
|
207
|
+
|
|
208
|
+
declare module '../internal' {
|
|
209
|
+
interface Internal {
|
|
210
|
+
/**
|
|
211
|
+
* 修改员工最后一次离职信息
|
|
212
|
+
* @see https://open.dingtalk.com/document/app/modify-resigned-employee-information
|
|
213
|
+
*/
|
|
214
|
+
hrmProcessUpdateTerminationInfo(
|
|
215
|
+
params: HrmProcessUpdateTerminationInfoParams,
|
|
216
|
+
): Promise<HrmProcessUpdateTerminationInfoResponse>
|
|
217
|
+
/**
|
|
218
|
+
* 智能人事转正接口
|
|
219
|
+
* @see https://open.dingtalk.com/document/orgapp/intelligent-personnel-staff-to-become-regular
|
|
220
|
+
*/
|
|
221
|
+
hrmProcessRegular(
|
|
222
|
+
params: HrmProcessRegularParams,
|
|
223
|
+
): Promise<HrmProcessRegularResponse>
|
|
224
|
+
/**
|
|
225
|
+
* 获取离职员工列表
|
|
226
|
+
* @see https://open.dingtalk.com/document/isvapp/obtain-the-list-of-employees-who-have-left
|
|
227
|
+
*/
|
|
228
|
+
queryDismissionStaffIdList(
|
|
229
|
+
query: QueryDismissionStaffIdListQuery,
|
|
230
|
+
): Promise<QueryDismissionStaffIdListResponse>
|
|
231
|
+
/**
|
|
232
|
+
* 新增或删除花名册选项类型字段的选项
|
|
233
|
+
* @see https://open.dingtalk.com/document/orgapp/intelligent-personnel-roster-field-option-modification
|
|
234
|
+
*/
|
|
235
|
+
rosterMetaFieldOptionsUpdate(
|
|
236
|
+
query: RosterMetaFieldOptionsUpdateQuery,
|
|
237
|
+
params: RosterMetaFieldOptionsUpdateParams,
|
|
238
|
+
): Promise<RosterMetaFieldOptionsUpdateResponse>
|
|
239
|
+
/**
|
|
240
|
+
* 智能人事员工调岗
|
|
241
|
+
* @see https://open.dingtalk.com/document/orgapp/intelligent-personnel-staff-transfer
|
|
242
|
+
*/
|
|
243
|
+
hrmProcessTransfer(
|
|
244
|
+
params: HrmProcessTransferParams,
|
|
245
|
+
): Promise<HrmProcessTransferResponse>
|
|
246
|
+
/**
|
|
247
|
+
* 批量获取员工离职信息
|
|
248
|
+
* @see https://open.dingtalk.com/document/isvapp/obtain-multiple-employee-demission-information-1
|
|
249
|
+
*/
|
|
250
|
+
queryHrmEmployeeDismissionInfo(
|
|
251
|
+
query: QueryHrmEmployeeDismissionInfoQuery,
|
|
252
|
+
): Promise<QueryHrmEmployeeDismissionInfoResponse>
|
|
253
|
+
/**
|
|
254
|
+
* 获取企业职务列表
|
|
255
|
+
* @see https://open.dingtalk.com/document/isvapp/obtains-a-list-of-enterprise-jobs
|
|
256
|
+
*/
|
|
257
|
+
queryJobs(query: QueryJobsQuery): Promise<QueryJobsResponse>
|
|
258
|
+
/**
|
|
259
|
+
* 获取企业职级列表
|
|
260
|
+
* @see https://open.dingtalk.com/document/isvapp/obtain-a-list-of-enterprise-ranks
|
|
261
|
+
*/
|
|
262
|
+
queryJobRanks(query: QueryJobRanksQuery): Promise<QueryJobRanksResponse>
|
|
263
|
+
/**
|
|
264
|
+
* 获取企业职位列表
|
|
265
|
+
* @see https://open.dingtalk.com/document/isvapp/obtain-a-list-of-enterprise-positions
|
|
266
|
+
*/
|
|
267
|
+
queryPositions(
|
|
268
|
+
query: QueryPositionsQuery,
|
|
269
|
+
params: QueryPositionsParams,
|
|
270
|
+
): Promise<QueryPositionsResponse>
|
|
271
|
+
}
|
|
272
|
+
}
|