@satorijs/adapter-dingtalk 2.0.3 → 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.
Files changed (55) hide show
  1. package/lib/http.d.ts +3 -2
  2. package/lib/index.js +10 -8
  3. package/lib/index.js.map +1 -2
  4. package/package.json +8 -4
  5. package/src/api/.eslintrc.yml +2 -0
  6. package/src/api/alitrip.ts +467 -0
  7. package/src/api/attendance.ts +81 -0
  8. package/src/api/badge.ts +285 -0
  9. package/src/api/blackboard.ts +28 -0
  10. package/src/api/calendar.ts +817 -0
  11. package/src/api/card.ts +215 -0
  12. package/src/api/conference.ts +561 -0
  13. package/src/api/connector.ts +97 -0
  14. package/src/api/contact.ts +56 -0
  15. package/src/api/convFile.ts +166 -0
  16. package/src/api/crm.ts +830 -0
  17. package/src/api/customerService.ts +156 -0
  18. package/src/api/datacenter.ts +672 -0
  19. package/src/api/devicemng.ts +202 -0
  20. package/src/api/diot.ts +19 -0
  21. package/src/api/doc.ts +232 -0
  22. package/src/api/drive.ts +109 -0
  23. package/src/api/edu.ts +30 -0
  24. package/src/api/esign.ts +44 -0
  25. package/src/api/exclusive.ts +372 -0
  26. package/src/api/h3yun.ts +537 -0
  27. package/src/api/hrm.ts +272 -0
  28. package/src/api/im.ts +978 -0
  29. package/src/api/industry.ts +153 -0
  30. package/src/api/jzcrm.ts +304 -0
  31. package/src/api/link.ts +94 -0
  32. package/src/api/live.ts +162 -0
  33. package/src/api/microApp.ts +309 -0
  34. package/src/api/oapi.ts +4083 -0
  35. package/src/api/oauth2.ts +146 -0
  36. package/src/api/pedia.ts +222 -0
  37. package/src/api/project.ts +1519 -0
  38. package/src/api/resident.ts +133 -0
  39. package/src/api/robot.ts +326 -0
  40. package/src/api/rooms.ts +334 -0
  41. package/src/api/serviceGroup.ts +216 -0
  42. package/src/api/storage.ts +1701 -0
  43. package/src/api/swform.ts +94 -0
  44. package/src/api/todo.ts +220 -0
  45. package/src/api/wiki.ts +231 -0
  46. package/src/api/workbench.ts +73 -0
  47. package/src/api/yida.ts +2165 -0
  48. package/src/bot.ts +111 -0
  49. package/src/http.ts +44 -0
  50. package/src/index.ts +9 -0
  51. package/src/internal.ts +47 -0
  52. package/src/message.ts +141 -0
  53. package/src/types/index.ts +140 -0
  54. package/src/utils.ts +51 -0
  55. package/src/ws.ts +55 -0
@@ -0,0 +1,285 @@
1
+ import { Internal } from '../internal'
2
+ // GENERATED CONTENT
3
+
4
+ export interface CreateBadgeNotifyParams {
5
+ /** 用户userid。 */
6
+ userId: string
7
+ /** 消息传入,调用方传入,唯一标识消息。 */
8
+ msgId: string
9
+ /** 消息类型,取值: */
10
+ msgType: string
11
+ /** 通知内容 */
12
+ content: string
13
+ }
14
+
15
+ export interface CreateBadgeNotifyResponse {
16
+ result: unknown
17
+ }
18
+
19
+ export interface NotifyBadgeCodeVerifyResultParams {
20
+ /** 码值,接入方硬件设备扫描钉工牌二维码获取的码值。 */
21
+ payCode: string
22
+ /** 企业corpId。 */
23
+ corpId: string
24
+ /** 用户和企业的关系类型,用于区分内部员工,外部联系人,无关系普通用户。 */
25
+ userCorpRelationType: string
26
+ /** 用户身份标识。 */
27
+ userIdentity: string
28
+ /** 验证时间。 */
29
+ verifyTime: string
30
+ /** 验证结果。 */
31
+ verifyResult: unknown
32
+ /** 验证地点。 */
33
+ verifyLocation?: string
34
+ /** 验证流水号,可随机生成,确保用户下唯一 */
35
+ verifyNo?: string
36
+ /** 验证事件。8个汉字以内,如门禁验证、班车登记、餐盘绑定等。 */
37
+ verifyEvent?: string
38
+ /** 备注信息。 */
39
+ remark?: string
40
+ }
41
+
42
+ export interface NotifyBadgeCodeVerifyResultResponse {
43
+ result: string
44
+ }
45
+
46
+ export interface SaveBadgeCodeCorpInstanceParams {
47
+ /** 码标识,取值: */
48
+ codeIdentity: string
49
+ /** 开通的企业corpId。 */
50
+ corpId: string
51
+ /** 状态,传入关闭状态需要用户手动开启后才会渲染二维码。 */
52
+ status: string
53
+ /** 扩展参数,是否关联支付宝。 */
54
+ extInfo?: unknown
55
+ }
56
+
57
+ export interface SaveBadgeCodeCorpInstanceResponse {
58
+ codeIdentity?: string
59
+ corpId?: string
60
+ status?: string
61
+ extInfo?: unknown
62
+ }
63
+
64
+ export interface NotifyBadgeCodePayResultParams {
65
+ /** 码值,接入方硬件设备扫描钉工牌二维码获取的码值。 */
66
+ payCode: string
67
+ /** 企业corpId。 */
68
+ corpId: string
69
+ /** 用户userid,需要与生成码时传入的**userid**保持一致。 */
70
+ userId: string
71
+ /** 交易开始时间。 */
72
+ gmtTradeCreate: string
73
+ /** 交易结束时间。 */
74
+ gmtTradeFinish: string
75
+ /** 交易号,接入方自身系统针对交易生成的唯一订单号。 */
76
+ tradeNo: string
77
+ /** 交易状态,取值: */
78
+ tradeStatus: string
79
+ /** 订单标题。 */
80
+ title: string
81
+ /** 备注。 */
82
+ remark: string
83
+ /** 订单金额。 */
84
+ amount: string
85
+ /** 订单优惠金额。 */
86
+ promotionAmount: string
87
+ /** 收费金额。 */
88
+ chargeAmount: string
89
+ /** 支付渠道明细信息。 */
90
+ payChannelDetailList: object[]
91
+ /** 支付失败错误码,当**tradeStatus**为**FAIL**时必须传入。 */
92
+ tradeErrorCode?: string
93
+ /** 支付失败信息,当**tradeStatus**为**FAIL**时必须传入。 */
94
+ tradeErrorMsg?: string
95
+ /** 扩展信息。 */
96
+ extInfo?: string
97
+ /** 商户名称。 */
98
+ merchantName: string
99
+ }
100
+
101
+ export interface NotifyBadgeCodePayResultResponse {
102
+ result: string
103
+ }
104
+
105
+ export interface CreateBadgeCodeUserInstanceParams {
106
+ /** 业务幂等ID,由调用方随机生成。 */
107
+ requestId: string
108
+ /** 码标识,取值: */
109
+ codeIdentity: string
110
+ /** 码值,由调用方生成。 */
111
+ codeValue?: string
112
+ /** 码值类型,可不传,默认为DING_STATIC */
113
+ codeValueType?: string
114
+ /** 状态,传入关闭状态需要用户手动开启后才会渲染二维码。 */
115
+ status: string
116
+ /** 企业corpId。 */
117
+ corpId: string
118
+ /** 用户和企业的关系类型,用于区分内部员工,外部联系人,无关系普通用户。 */
119
+ userCorpRelationType: string
120
+ /** 用户身份标识。 */
121
+ userIdentity: string
122
+ /** 临时码过期时间,格式:yyyy-MM-dd HH:mm:ss。 */
123
+ gmtExpired: string
124
+ /** 有效时间列表,对于连续时间段,只需传入一个对象即可。 */
125
+ availableTimes: object[]
126
+ /** 扩展参数。 */
127
+ extInfo: unknown
128
+ }
129
+
130
+ export interface CreateBadgeCodeUserInstanceResponse {
131
+ codeId: string
132
+ codeDetailUrl?: string
133
+ }
134
+
135
+ export interface NotifyBadgeCodeRefundResultParams {
136
+ /** 企业的corpId。 */
137
+ corpId: string
138
+ /** 用户userid,需要与生成码时使用的**userid**保持一致。 */
139
+ userId: string
140
+ /** 交易订单号,自定义,接入方针对交易生成的唯一订单号。 */
141
+ tradeNo: string
142
+ /** 本次退款订单号,自定义,接入方针对交易生成的唯一退款订单号。 */
143
+ refundOrderNo: string
144
+ /** 备注。 */
145
+ remark: string
146
+ /** 退款金额。 */
147
+ refundAmount: string
148
+ /** 退款的优惠金额。 */
149
+ refundPromotionAmount: string
150
+ /** 退款时间。 */
151
+ gmtRefund: string
152
+ /** 支付渠道明细信息。 */
153
+ payChannelDetailList: object[]
154
+ /** 支付时使用的付款码。 */
155
+ payCode: string
156
+ }
157
+
158
+ export interface NotifyBadgeCodeRefundResultResponse {
159
+ result: string
160
+ }
161
+
162
+ export interface UpdateBadgeCodeUserInstanceParams {
163
+ /** 用户码ID。 */
164
+ codeId: string
165
+ /** 码标识,取值: */
166
+ codeIdentity: string
167
+ /** 码值,由调用方生成。 */
168
+ codeValue?: string
169
+ /** 状态,传入关闭状态需要用户手动开启后才会渲染二维码。 */
170
+ status?: string
171
+ /** 企业corpId。 */
172
+ corpId: string
173
+ /** 用户和企业的关系类型,用于区分内部员工,外部联系人,无关系普通用户。 */
174
+ userCorpRelationType: string
175
+ /** 用户身份标识。 */
176
+ userIdentity: string
177
+ /** 临时码过期时间,格式:yyyy-MM-dd HH:mm:ss。 */
178
+ gmtExpired: string
179
+ /** 有效时间列表,对于连续时间段,只需传入一个对象即可。 */
180
+ availableTimes: object[]
181
+ /** 扩展参数。 */
182
+ extInfo: unknown
183
+ }
184
+
185
+ export interface UpdateBadgeCodeUserInstanceResponse {
186
+ codeId?: string
187
+ }
188
+
189
+ export interface DecodeBadgeCodeParams {
190
+ /** 码值,解码接口仅支持钉钉侧生成的码值。 */
191
+ payCode: string
192
+ /** 请求ID,由调用方随机生成幂等字符串。 */
193
+ requestId: string
194
+ }
195
+
196
+ export interface DecodeBadgeCodeResponse {
197
+ corpId: string
198
+ userId?: string
199
+ codeType: string
200
+ alipayCode: string
201
+ userCorpRelationType: string
202
+ codeIdentity?: string
203
+ codeId?: string
204
+ outBizId?: string
205
+ extInfo?: string
206
+ }
207
+
208
+ // funcName: isOldApi
209
+ Internal.define({
210
+ '/badge/notices': { POST: { createBadgeNotify: false } },
211
+ '/badge/codes/verifyResults': {
212
+ POST: { notifyBadgeCodeVerifyResult: false },
213
+ },
214
+ '/badge/codes/corpInstances': { POST: { saveBadgeCodeCorpInstance: false } },
215
+ '/badge/codes/payResults': { POST: { notifyBadgeCodePayResult: false } },
216
+ '/badge/codes/userInstances': {
217
+ POST: { createBadgeCodeUserInstance: false },
218
+ PUT: { updateBadgeCodeUserInstance: false },
219
+ },
220
+ '/badge/codes/refundResults': {
221
+ POST: { notifyBadgeCodeRefundResult: false },
222
+ },
223
+ '/badge/codes/decode': { POST: { decodeBadgeCode: false } },
224
+ })
225
+
226
+ declare module '../internal' {
227
+ interface Internal {
228
+ /**
229
+ * 钉工牌通知消息
230
+ * @see https://open.dingtalk.com/document/isvapp/dingtalk-badge-notification-message
231
+ */
232
+ createBadgeNotify(
233
+ params: CreateBadgeNotifyParams,
234
+ ): Promise<CreateBadgeNotifyResponse>
235
+ /**
236
+ * 通知钉工牌码验证结果
237
+ * @see https://open.dingtalk.com/document/isvapp/notification-dingtalk-badge-verification-result
238
+ */
239
+ notifyBadgeCodeVerifyResult(
240
+ params: NotifyBadgeCodeVerifyResultParams,
241
+ ): Promise<NotifyBadgeCodeVerifyResultResponse>
242
+ /**
243
+ * 配置企业钉工牌
244
+ * @see https://open.dingtalk.com/document/isvapp/save-dingtalk-enterprise-instance
245
+ */
246
+ saveBadgeCodeCorpInstance(
247
+ params: SaveBadgeCodeCorpInstanceParams,
248
+ ): Promise<SaveBadgeCodeCorpInstanceResponse>
249
+ /**
250
+ * 通知支付结果
251
+ * @see https://open.dingtalk.com/document/isvapp/sync-dingtalk-badge-code-payment-result
252
+ */
253
+ notifyBadgeCodePayResult(
254
+ params: NotifyBadgeCodePayResultParams,
255
+ ): Promise<NotifyBadgeCodePayResultResponse>
256
+ /**
257
+ * 创建钉工牌电子码
258
+ * @see https://open.dingtalk.com/document/isvapp/create-a-badge-user-instance
259
+ */
260
+ createBadgeCodeUserInstance(
261
+ params: CreateBadgeCodeUserInstanceParams,
262
+ ): Promise<CreateBadgeCodeUserInstanceResponse>
263
+ /**
264
+ * 通知退款结果
265
+ * @see https://open.dingtalk.com/document/isvapp/notification-dingtalk-badge-code-refund-result
266
+ */
267
+ notifyBadgeCodeRefundResult(
268
+ params: NotifyBadgeCodeRefundResultParams,
269
+ ): Promise<NotifyBadgeCodeRefundResultResponse>
270
+ /**
271
+ * 更新钉工牌电子码
272
+ * @see https://open.dingtalk.com/document/isvapp/update-dingtalk-user-instance
273
+ */
274
+ updateBadgeCodeUserInstance(
275
+ params: UpdateBadgeCodeUserInstanceParams,
276
+ ): Promise<UpdateBadgeCodeUserInstanceResponse>
277
+ /**
278
+ * 解码钉工牌电子码
279
+ * @see https://open.dingtalk.com/document/isvapp/stack-dingtalk-badge
280
+ */
281
+ decodeBadgeCode(
282
+ params: DecodeBadgeCodeParams,
283
+ ): Promise<DecodeBadgeCodeResponse>
284
+ }
285
+ }
@@ -0,0 +1,28 @@
1
+ import { Internal } from '../internal'
2
+ // GENERATED CONTENT
3
+
4
+ export interface QueryBlackboardSpaceQuery {
5
+ /** 操作人userId。 */
6
+ operationUserId: string
7
+ }
8
+
9
+ export interface QueryBlackboardSpaceResponse {
10
+ spaceId?: string
11
+ }
12
+
13
+ // funcName: isOldApi
14
+ Internal.define({
15
+ '/blackboard/spaces': { GET: { queryBlackboardSpace: false } },
16
+ })
17
+
18
+ declare module '../internal' {
19
+ interface Internal {
20
+ /**
21
+ * 获取公告钉盘空间信息
22
+ * @see https://open.dingtalk.com/document/app/obtain-bulletin-nail-disk-space-information
23
+ */
24
+ queryBlackboardSpace(
25
+ query: QueryBlackboardSpaceQuery,
26
+ ): Promise<QueryBlackboardSpaceResponse>
27
+ }
28
+ }