@satorijs/adapter-dingtalk 2.0.3 → 2.0.5
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/bot.d.ts +1 -1
- package/lib/http.d.ts +3 -2
- package/lib/index.js +35 -14
- package/lib/index.js.map +2 -3
- 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 +129 -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 +53 -0
- package/src/ws.ts +55 -0
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
import { Internal } from '../internal'
|
|
2
|
+
// GENERATED CONTENT
|
|
3
|
+
|
|
4
|
+
export interface SendLinkParams {
|
|
5
|
+
/** 文件所在空间ID,调用[添加空间](https://open.dingtalk.com/document/orgapp-server/add-space)接口获取id参数值。 */
|
|
6
|
+
spaceId: string
|
|
7
|
+
/** 文件ID,调用[获取文件或文件夹列表](https://open.dingtalk.com/document/orgapp-server/obtain-the-file-list-storage)接口获取id参数值。 */
|
|
8
|
+
dentryId: string
|
|
9
|
+
/** 目标会话的openConversationId,调用[创建群会话](https://open.dingtalk.com/document/orgapp-server/create-group-session)接口获取openConversationId参数值。 */
|
|
10
|
+
openConversationId: string
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export interface SendLinkQuery {
|
|
14
|
+
/** 操作人的unionId,调用[查询用户详情](https://open.dingtalk.com/document/orgapp-server/query-user-details)接口获取unionid参数值。 */
|
|
15
|
+
unionId: string
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export interface SendLinkResponse {
|
|
19
|
+
file?: {
|
|
20
|
+
id?: string
|
|
21
|
+
conversationId?: string
|
|
22
|
+
spaceId?: string
|
|
23
|
+
parentId?: string
|
|
24
|
+
type?: string
|
|
25
|
+
name?: string
|
|
26
|
+
size?: number
|
|
27
|
+
path?: string
|
|
28
|
+
version?: number
|
|
29
|
+
status?: string
|
|
30
|
+
extension?: string
|
|
31
|
+
creatorId?: string
|
|
32
|
+
modifierId?: string
|
|
33
|
+
createTime?: string
|
|
34
|
+
modifiedTime?: string
|
|
35
|
+
uuid?: string
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export interface SendParams {
|
|
40
|
+
/** 空间ID,调用[添加空间](https://open.dingtalk.com/document/orgapp-server/add-space)接口获取id参数值。 */
|
|
41
|
+
spaceId: string
|
|
42
|
+
/** 文件ID,调用[获取文件或文件夹列表](https://open.dingtalk.com/document/orgapp-server/obtain-the-file-list-storage)接口获取id参数值。 */
|
|
43
|
+
dentryId: string
|
|
44
|
+
/** 目标会话的openConversationId,调用[创建群会话](https://open.dingtalk.com/document/orgapp-server/create-group-session)接口获取openConversationId参数值。 */
|
|
45
|
+
openConversationId: string
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export interface SendQuery {
|
|
49
|
+
/** 操作人的unionId,调用[查询用户详情](https://open.dingtalk.com/document/orgapp-server/query-user-details)接口获取unionid参数值。 */
|
|
50
|
+
unionId: string
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export interface SendResponse {
|
|
54
|
+
file?: {
|
|
55
|
+
id?: string
|
|
56
|
+
conversationId?: string
|
|
57
|
+
spaceId?: string
|
|
58
|
+
parentId?: string
|
|
59
|
+
type?: string
|
|
60
|
+
name?: string
|
|
61
|
+
size?: number
|
|
62
|
+
path?: string
|
|
63
|
+
version?: number
|
|
64
|
+
status?: string
|
|
65
|
+
extension?: string
|
|
66
|
+
creatorId?: string
|
|
67
|
+
modifierId?: string
|
|
68
|
+
createTime?: string
|
|
69
|
+
modifiedTime?: string
|
|
70
|
+
uuid?: string
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export interface ConvFileGetSpaceParams {
|
|
75
|
+
/** 会话openConversationId。 */
|
|
76
|
+
openConversationId: string
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export interface ConvFileGetSpaceQuery {
|
|
80
|
+
/** 操作人的unionId。 */
|
|
81
|
+
unionId: string
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export interface ConvFileGetSpaceResponse {
|
|
85
|
+
space?: {
|
|
86
|
+
spaceId?: string
|
|
87
|
+
corpId?: string
|
|
88
|
+
createTime?: string
|
|
89
|
+
modifiedTime?: string
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
export interface SendByAppParams {
|
|
94
|
+
/** 文件所在空间ID。 */
|
|
95
|
+
spaceId: string
|
|
96
|
+
/** 文件ID。 */
|
|
97
|
+
dentryId: string
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
export interface SendByAppQuery {
|
|
101
|
+
/** 接收文件的用户unionId。 */
|
|
102
|
+
unionId: string
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
export interface SendByAppResponse {
|
|
106
|
+
file?: {
|
|
107
|
+
id?: string
|
|
108
|
+
conversationId?: string
|
|
109
|
+
spaceId?: string
|
|
110
|
+
parentId?: string
|
|
111
|
+
type?: string
|
|
112
|
+
name?: string
|
|
113
|
+
size?: number
|
|
114
|
+
path?: string
|
|
115
|
+
version?: number
|
|
116
|
+
status?: string
|
|
117
|
+
extension?: string
|
|
118
|
+
creatorId?: string
|
|
119
|
+
modifierId?: string
|
|
120
|
+
createTime?: string
|
|
121
|
+
modifiedTime?: string
|
|
122
|
+
uuid?: string
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
// funcName: isOldApi
|
|
127
|
+
Internal.define({
|
|
128
|
+
'/convFile/conversations/files/links/send': { POST: { sendLink: false } },
|
|
129
|
+
'/convFile/conversations/files/send': { POST: { send: false } },
|
|
130
|
+
'/convFile/conversations/spaces/query': { POST: { convFileGetSpace: false } },
|
|
131
|
+
'/convFile/apps/conversations/files/send': { POST: { sendByApp: false } },
|
|
132
|
+
})
|
|
133
|
+
|
|
134
|
+
declare module '../internal' {
|
|
135
|
+
interface Internal {
|
|
136
|
+
/**
|
|
137
|
+
* 发送文件链接到指定会话
|
|
138
|
+
* @see https://open.dingtalk.com/document/orgapp/send-a-file-link-to-the-specified-session
|
|
139
|
+
*/
|
|
140
|
+
sendLink(
|
|
141
|
+
query: SendLinkQuery,
|
|
142
|
+
params: SendLinkParams,
|
|
143
|
+
): Promise<SendLinkResponse>
|
|
144
|
+
/**
|
|
145
|
+
* 发送文件到指定会话
|
|
146
|
+
* @see https://open.dingtalk.com/document/orgapp/send-file-to-specified-session
|
|
147
|
+
*/
|
|
148
|
+
send(query: SendQuery, params: SendParams): Promise<SendResponse>
|
|
149
|
+
/**
|
|
150
|
+
* 获取IM会话存储空间信息
|
|
151
|
+
* @see https://open.dingtalk.com/document/orgapp/obtain-group-storage-space-information
|
|
152
|
+
*/
|
|
153
|
+
convFileGetSpace(
|
|
154
|
+
query: ConvFileGetSpaceQuery,
|
|
155
|
+
params: ConvFileGetSpaceParams,
|
|
156
|
+
): Promise<ConvFileGetSpaceResponse>
|
|
157
|
+
/**
|
|
158
|
+
* 以应用身份发送文件给自己
|
|
159
|
+
* @see https://open.dingtalk.com/document/isvapp/sends-a-storage-file-to-a-specified-user
|
|
160
|
+
*/
|
|
161
|
+
sendByApp(
|
|
162
|
+
query: SendByAppQuery,
|
|
163
|
+
params: SendByAppParams,
|
|
164
|
+
): Promise<SendByAppResponse>
|
|
165
|
+
}
|
|
166
|
+
}
|