@im-more/dsh-dingtalk 0.0.0-stage → 0.1.0
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/LICENSE +21 -0
- package/cordis.patch.yml +11 -0
- package/lib/index.js +2765 -0
- package/lib/index.js.map +1 -0
- package/lib/types/api/alitrip.d.ts +397 -0
- package/lib/types/api/alitrip.d.ts.map +1 -0
- package/lib/types/api/alitrip.js +21 -0
- package/lib/types/api/alitrip.js.map +1 -0
- package/lib/types/api/attendance.d.ts +63 -0
- package/lib/types/api/attendance.d.ts.map +1 -0
- package/lib/types/api/attendance.js +8 -0
- package/lib/types/api/attendance.js.map +1 -0
- package/lib/types/api/badge.d.ts +233 -0
- package/lib/types/api/badge.d.ts.map +1 -0
- package/lib/types/api/badge.js +19 -0
- package/lib/types/api/badge.js.map +1 -0
- package/lib/types/api/blackboard.d.ts +17 -0
- package/lib/types/api/blackboard.d.ts.map +1 -0
- package/lib/types/api/blackboard.js +6 -0
- package/lib/types/api/blackboard.js.map +1 -0
- package/lib/types/api/calendar.d.ts +621 -0
- package/lib/types/api/calendar.d.ts.map +1 -0
- package/lib/types/api/calendar.js +57 -0
- package/lib/types/api/calendar.js.map +1 -0
- package/lib/types/api/card.d.ts +185 -0
- package/lib/types/api/card.d.ts.map +1 -0
- package/lib/types/api/card.js +13 -0
- package/lib/types/api/card.js.map +1 -0
- package/lib/types/api/conference.d.ts +404 -0
- package/lib/types/api/conference.d.ts.map +1 -0
- package/lib/types/api/conference.js +60 -0
- package/lib/types/api/conference.js.map +1 -0
- package/lib/types/api/connector.d.ts +79 -0
- package/lib/types/api/connector.d.ts.map +1 -0
- package/lib/types/api/connector.js +8 -0
- package/lib/types/api/connector.js.map +1 -0
- package/lib/types/api/contact.d.ts +40 -0
- package/lib/types/api/contact.d.ts.map +1 -0
- package/lib/types/api/contact.js +9 -0
- package/lib/types/api/contact.js.map +1 -0
- package/lib/types/api/convFile.d.ts +135 -0
- package/lib/types/api/convFile.d.ts.map +1 -0
- package/lib/types/api/convFile.js +9 -0
- package/lib/types/api/convFile.js.map +1 -0
- package/lib/types/api/crm.d.ts +662 -0
- package/lib/types/api/crm.d.ts.map +1 -0
- package/lib/types/api/crm.js +59 -0
- package/lib/types/api/crm.js.map +1 -0
- package/lib/types/api/customerService.d.ts +128 -0
- package/lib/types/api/customerService.d.ts.map +1 -0
- package/lib/types/api/customerService.js +13 -0
- package/lib/types/api/customerService.js.map +1 -0
- package/lib/types/api/datacenter.d.ts +506 -0
- package/lib/types/api/datacenter.d.ts.map +1 -0
- package/lib/types/api/datacenter.js +61 -0
- package/lib/types/api/datacenter.js.map +1 -0
- package/lib/types/api/devicemng.d.ts +161 -0
- package/lib/types/api/devicemng.d.ts.map +1 -0
- package/lib/types/api/devicemng.js +20 -0
- package/lib/types/api/devicemng.js.map +1 -0
- package/lib/types/api/diot.d.ts +13 -0
- package/lib/types/api/diot.d.ts.map +1 -0
- package/lib/types/api/diot.js +4 -0
- package/lib/types/api/diot.js.map +1 -0
- package/lib/types/api/doc.d.ts +141 -0
- package/lib/types/api/doc.d.ts.map +1 -0
- package/lib/types/api/doc.js +27 -0
- package/lib/types/api/doc.js.map +1 -0
- package/lib/types/api/drive.d.ts +88 -0
- package/lib/types/api/drive.d.ts.map +1 -0
- package/lib/types/api/drive.js +11 -0
- package/lib/types/api/drive.js.map +1 -0
- package/lib/types/api/edu.d.ts +23 -0
- package/lib/types/api/edu.d.ts.map +1 -0
- package/lib/types/api/edu.js +4 -0
- package/lib/types/api/edu.js.map +1 -0
- package/lib/types/api/esign.d.ts +34 -0
- package/lib/types/api/esign.d.ts.map +1 -0
- package/lib/types/api/esign.js +7 -0
- package/lib/types/api/esign.js.map +1 -0
- package/lib/types/api/exclusive.d.ts +304 -0
- package/lib/types/api/exclusive.d.ts.map +1 -0
- package/lib/types/api/exclusive.js +27 -0
- package/lib/types/api/exclusive.js.map +1 -0
- package/lib/types/api/h3yun.d.ts +438 -0
- package/lib/types/api/h3yun.d.ts.map +1 -0
- package/lib/types/api/h3yun.js +33 -0
- package/lib/types/api/h3yun.js.map +1 -0
- package/lib/types/api/hrm.d.ts +215 -0
- package/lib/types/api/hrm.d.ts.map +1 -0
- package/lib/types/api/hrm.js +20 -0
- package/lib/types/api/hrm.js.map +1 -0
- package/lib/types/api/im.d.ts +773 -0
- package/lib/types/api/im.d.ts.map +1 -0
- package/lib/types/api/im.js +72 -0
- package/lib/types/api/im.js.map +1 -0
- package/lib/types/api/industry.d.ts +118 -0
- package/lib/types/api/industry.d.ts.map +1 -0
- package/lib/types/api/industry.js +14 -0
- package/lib/types/api/industry.js.map +1 -0
- package/lib/types/api/jzcrm.d.ts +255 -0
- package/lib/types/api/jzcrm.d.ts.map +1 -0
- package/lib/types/api/jzcrm.js +18 -0
- package/lib/types/api/jzcrm.js.map +1 -0
- package/lib/types/api/link.d.ts +73 -0
- package/lib/types/api/link.d.ts.map +1 -0
- package/lib/types/api/link.js +9 -0
- package/lib/types/api/link.js.map +1 -0
- package/lib/types/api/live.d.ts +132 -0
- package/lib/types/api/live.d.ts.map +1 -0
- package/lib/types/api/live.js +13 -0
- package/lib/types/api/live.js.map +1 -0
- package/lib/types/api/microApp.d.ts +240 -0
- package/lib/types/api/microApp.d.ts.map +1 -0
- package/lib/types/api/microApp.js +29 -0
- package/lib/types/api/microApp.js.map +1 -0
- package/lib/types/api/oapi.d.ts +3362 -0
- package/lib/types/api/oapi.d.ts.map +1 -0
- package/lib/types/api/oapi.js +247 -0
- package/lib/types/api/oapi.js.map +1 -0
- package/lib/types/api/oauth2.d.ts +115 -0
- package/lib/types/api/oauth2.d.ts.map +1 -0
- package/lib/types/api/oauth2.js +12 -0
- package/lib/types/api/oauth2.js.map +1 -0
- package/lib/types/api/pedia.d.ts +186 -0
- package/lib/types/api/pedia.d.ts.map +1 -0
- package/lib/types/api/pedia.js +13 -0
- package/lib/types/api/pedia.js.map +1 -0
- package/lib/types/api/project.d.ts +1119 -0
- package/lib/types/api/project.d.ts.map +1 -0
- package/lib/types/api/project.js +135 -0
- package/lib/types/api/project.js.map +1 -0
- package/lib/types/api/resident.d.ts +107 -0
- package/lib/types/api/resident.d.ts.map +1 -0
- package/lib/types/api/resident.js +10 -0
- package/lib/types/api/resident.js.map +1 -0
- package/lib/types/api/robot.d.ts +256 -0
- package/lib/types/api/robot.d.ts.map +1 -0
- package/lib/types/api/robot.js +21 -0
- package/lib/types/api/robot.js.map +1 -0
- package/lib/types/api/rooms.d.ts +256 -0
- package/lib/types/api/rooms.d.ts.map +1 -0
- package/lib/types/api/rooms.js +23 -0
- package/lib/types/api/rooms.js.map +1 -0
- package/lib/types/api/serviceGroup.d.ts +176 -0
- package/lib/types/api/serviceGroup.d.ts.map +1 -0
- package/lib/types/api/serviceGroup.js +15 -0
- package/lib/types/api/serviceGroup.js.map +1 -0
- package/lib/types/api/storage.d.ts +1241 -0
- package/lib/types/api/storage.d.ts.map +1 -0
- package/lib/types/api/storage.js +128 -0
- package/lib/types/api/storage.js.map +1 -0
- package/lib/types/api/swform.d.ts +71 -0
- package/lib/types/api/swform.d.ts.map +1 -0
- package/lib/types/api/swform.js +8 -0
- package/lib/types/api/swform.js.map +1 -0
- package/lib/types/api/todo.d.ts +169 -0
- package/lib/types/api/todo.d.ts.map +1 -0
- package/lib/types/api/todo.js +16 -0
- package/lib/types/api/todo.js.map +1 -0
- package/lib/types/api/wiki.d.ts +195 -0
- package/lib/types/api/wiki.d.ts.map +1 -0
- package/lib/types/api/wiki.js +11 -0
- package/lib/types/api/wiki.js.map +1 -0
- package/lib/types/api/workbench.d.ts +46 -0
- package/lib/types/api/workbench.d.ts.map +1 -0
- package/lib/types/api/workbench.js +14 -0
- package/lib/types/api/workbench.js.map +1 -0
- package/lib/types/api/yida.d.ts +1838 -0
- package/lib/types/api/yida.d.ts.map +1 -0
- package/lib/types/api/yida.js +103 -0
- package/lib/types/api/yida.js.map +1 -0
- package/lib/types/bot.d.ts +62 -0
- package/lib/types/bot.d.ts.map +1 -0
- package/lib/types/bot.js +134 -0
- package/lib/types/bot.js.map +1 -0
- package/lib/types/config.d.ts +47 -0
- package/lib/types/config.d.ts.map +1 -0
- package/lib/types/config.js +53 -0
- package/lib/types/config.js.map +1 -0
- package/lib/types/decode.d.ts +36 -0
- package/lib/types/decode.d.ts.map +1 -0
- package/lib/types/decode.js +200 -0
- package/lib/types/decode.js.map +1 -0
- package/lib/types/errors.d.ts +77 -0
- package/lib/types/errors.d.ts.map +1 -0
- package/lib/types/errors.js +249 -0
- package/lib/types/errors.js.map +1 -0
- package/lib/types/index.d.ts +22 -0
- package/lib/types/index.d.ts.map +1 -0
- package/lib/types/index.js +22 -0
- package/lib/types/index.js.map +1 -0
- package/lib/types/internal.d.ts +15 -0
- package/lib/types/internal.d.ts.map +1 -0
- package/lib/types/internal.js +57 -0
- package/lib/types/internal.js.map +1 -0
- package/lib/types/media.d.ts +57 -0
- package/lib/types/media.d.ts.map +1 -0
- package/lib/types/media.js +99 -0
- package/lib/types/media.js.map +1 -0
- package/lib/types/modes/markdown.d.ts +12 -0
- package/lib/types/modes/markdown.d.ts.map +1 -0
- package/lib/types/modes/markdown.js +148 -0
- package/lib/types/modes/markdown.js.map +1 -0
- package/lib/types/modes/shared.d.ts +183 -0
- package/lib/types/modes/shared.d.ts.map +1 -0
- package/lib/types/modes/shared.js +358 -0
- package/lib/types/modes/shared.js.map +1 -0
- package/lib/types/request.d.ts +63 -0
- package/lib/types/request.d.ts.map +1 -0
- package/lib/types/request.js +182 -0
- package/lib/types/request.js.map +1 -0
- package/lib/types/send.d.ts +38 -0
- package/lib/types/send.d.ts.map +1 -0
- package/lib/types/send.js +128 -0
- package/lib/types/send.js.map +1 -0
- package/lib/types/token.d.ts +32 -0
- package/lib/types/token.d.ts.map +1 -0
- package/lib/types/token.js +62 -0
- package/lib/types/token.js.map +1 -0
- package/lib/types/transport/stream.d.ts +89 -0
- package/lib/types/transport/stream.d.ts.map +1 -0
- package/lib/types/transport/stream.js +345 -0
- package/lib/types/transport/stream.js.map +1 -0
- package/lib/types/transport/webhook.d.ts +54 -0
- package/lib/types/transport/webhook.d.ts.map +1 -0
- package/lib/types/transport/webhook.js +159 -0
- package/lib/types/transport/webhook.js.map +1 -0
- package/lib/types/types/index.d.ts +150 -0
- package/lib/types/types/index.d.ts.map +1 -0
- package/lib/types/types/index.js +43 -0
- package/lib/types/types/index.js.map +1 -0
- package/package.json +61 -3
- 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 +211 -0
- package/src/config.ts +88 -0
- package/src/decode.ts +250 -0
- package/src/errors.ts +282 -0
- package/src/index.ts +82 -0
- package/src/internal.ts +60 -0
- package/src/media.ts +149 -0
- package/src/modes/markdown.ts +173 -0
- package/src/modes/shared.ts +473 -0
- package/src/request.ts +262 -0
- package/src/send.ts +195 -0
- package/src/token.ts +72 -0
- package/src/transport/stream.ts +436 -0
- package/src/transport/webhook.ts +198 -0
- package/src/types/index.ts +165 -0
- package/README.md +0 -3
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
export type AtUser = {
|
|
2
|
+
dingtalkId: string
|
|
3
|
+
staffId?: string // 企业内部群有的发送者在企业内的userid
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
export type DingtalkRequestBase = {
|
|
7
|
+
msgtype: string // 消息类型
|
|
8
|
+
msgId: string // 加密的消息ID
|
|
9
|
+
createAt: string // 消息的时间戳,单位毫秒
|
|
10
|
+
conversationType: string // 1:单聊 2:群聊
|
|
11
|
+
conversationId: string // 会话ID
|
|
12
|
+
conversationTitle?: string // 群聊时才有的会话标题
|
|
13
|
+
senderId: string // 加密的发送者ID
|
|
14
|
+
senderNick: string // 发送者昵称
|
|
15
|
+
senderCorpId?: string // 企业内部群有的发送者当前群的企业corpId
|
|
16
|
+
sessionWebhook: string // 当前会话的Webhook地址
|
|
17
|
+
sessionWebhookExpiredTime: number // 当前会话的Webhook地址过期时间
|
|
18
|
+
isAdmin?: boolean // 是否为管理员
|
|
19
|
+
chatbotCorpId?: string // 加密的机器人所在的企业corpId
|
|
20
|
+
isInAtList?: boolean // 是否在@列表中
|
|
21
|
+
senderStaffId?: string // 企业内部群中@该机器人的成员userid
|
|
22
|
+
chatbotUserId: string // 加密的机器人ID
|
|
23
|
+
atUsers?: AtUser[] // 被@人的信息
|
|
24
|
+
robotCode: string
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export type Message =
|
|
28
|
+
| TextMessage
|
|
29
|
+
| RichTextMessage
|
|
30
|
+
| PictureMessage
|
|
31
|
+
| FileMessage
|
|
32
|
+
| AudioMessage
|
|
33
|
+
| VideoMessage
|
|
34
|
+
|
|
35
|
+
export interface TextMessage extends DingtalkRequestBase {
|
|
36
|
+
msgtype: 'text'
|
|
37
|
+
text: {
|
|
38
|
+
content: string
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export interface FileMessage extends DingtalkRequestBase {
|
|
43
|
+
msgtype: 'file'
|
|
44
|
+
content: {
|
|
45
|
+
spaceId: string
|
|
46
|
+
fileName: string
|
|
47
|
+
downloadCode: string
|
|
48
|
+
fileId: string
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export interface PictureMessage extends DingtalkRequestBase {
|
|
53
|
+
msgtype: 'picture'
|
|
54
|
+
content: {
|
|
55
|
+
downloadCode: string
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
// 单聊才能收到语音与视频(群聊不推送这两种 msgtype)。
|
|
60
|
+
export interface AudioMessage extends DingtalkRequestBase {
|
|
61
|
+
msgtype: 'audio'
|
|
62
|
+
content: {
|
|
63
|
+
downloadCode: string
|
|
64
|
+
duration?: number
|
|
65
|
+
recognition?: string
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export interface VideoMessage extends DingtalkRequestBase {
|
|
70
|
+
msgtype: 'video'
|
|
71
|
+
content: {
|
|
72
|
+
downloadCode: string
|
|
73
|
+
duration?: number
|
|
74
|
+
videoType?: string
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export interface RichTextMessage extends DingtalkRequestBase {
|
|
79
|
+
msgtype: 'richText'
|
|
80
|
+
content: {
|
|
81
|
+
richText: ({
|
|
82
|
+
text: string
|
|
83
|
+
} & {
|
|
84
|
+
pictureDownloadCode: string
|
|
85
|
+
downloadCode: string
|
|
86
|
+
type: 'picture'
|
|
87
|
+
})[]
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
// https://open.dingtalk.com/document/orgapp/types-of-messages-sent-by-robots
|
|
92
|
+
export interface SendMessageData {
|
|
93
|
+
sampleText: { content: string }
|
|
94
|
+
sampleMarkdown: {
|
|
95
|
+
title?: string
|
|
96
|
+
text: string
|
|
97
|
+
}
|
|
98
|
+
sampleImageMsg: {
|
|
99
|
+
photoURL: string
|
|
100
|
+
}
|
|
101
|
+
sampleLink: {
|
|
102
|
+
text: string
|
|
103
|
+
title: string
|
|
104
|
+
picUrl: string
|
|
105
|
+
messageUrl: string
|
|
106
|
+
}
|
|
107
|
+
sampleAudio: {
|
|
108
|
+
mediaId: string
|
|
109
|
+
duration: string
|
|
110
|
+
}
|
|
111
|
+
sampleFile: {
|
|
112
|
+
mediaId: string
|
|
113
|
+
fileName: string
|
|
114
|
+
fileType: string
|
|
115
|
+
}
|
|
116
|
+
sampleVideo: {
|
|
117
|
+
duration: string
|
|
118
|
+
videoMediaId: string
|
|
119
|
+
videoType: string
|
|
120
|
+
picMediaId: string
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
export * from '../api/oauth2'
|
|
125
|
+
export * from '../api/oapi'
|
|
126
|
+
export * from '../api/contact'
|
|
127
|
+
export * from '../api/swform'
|
|
128
|
+
export * from '../api/hrm'
|
|
129
|
+
export * from '../api/todo'
|
|
130
|
+
export * from '../api/attendance'
|
|
131
|
+
export * from '../api/calendar'
|
|
132
|
+
export * from '../api/blackboard'
|
|
133
|
+
export * from '../api/microApp'
|
|
134
|
+
export * from '../api/im'
|
|
135
|
+
export * from '../api/connector'
|
|
136
|
+
export * from '../api/exclusive'
|
|
137
|
+
export * from '../api/alitrip'
|
|
138
|
+
export * from '../api/project'
|
|
139
|
+
export * from '../api/edu'
|
|
140
|
+
export * from '../api/crm'
|
|
141
|
+
export * from '../api/yida'
|
|
142
|
+
export * from '../api/drive'
|
|
143
|
+
export * from '../api/workbench'
|
|
144
|
+
export * from '../api/robot'
|
|
145
|
+
export * from '../api/conference'
|
|
146
|
+
export * from '../api/serviceGroup'
|
|
147
|
+
export * from '../api/customerService'
|
|
148
|
+
export * from '../api/esign'
|
|
149
|
+
export * from '../api/jzcrm'
|
|
150
|
+
export * from '../api/badge'
|
|
151
|
+
export * from '../api/datacenter'
|
|
152
|
+
export * from '../api/resident'
|
|
153
|
+
export * from '../api/wiki'
|
|
154
|
+
export * from '../api/storage'
|
|
155
|
+
export * from '../api/doc'
|
|
156
|
+
export * from '../api/diot'
|
|
157
|
+
export * from '../api/h3yun'
|
|
158
|
+
export * from '../api/link'
|
|
159
|
+
export * from '../api/pedia'
|
|
160
|
+
export * from '../api/devicemng'
|
|
161
|
+
export * from '../api/convFile'
|
|
162
|
+
export * from '../api/industry'
|
|
163
|
+
export * from '../api/live'
|
|
164
|
+
export * from '../api/card'
|
|
165
|
+
export * from '../api/rooms'
|
package/README.md
DELETED