@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.
Files changed (56) hide show
  1. package/lib/bot.d.ts +1 -1
  2. package/lib/http.d.ts +3 -2
  3. package/lib/index.js +35 -14
  4. package/lib/index.js.map +2 -3
  5. package/package.json +8 -4
  6. package/src/api/.eslintrc.yml +2 -0
  7. package/src/api/alitrip.ts +467 -0
  8. package/src/api/attendance.ts +81 -0
  9. package/src/api/badge.ts +285 -0
  10. package/src/api/blackboard.ts +28 -0
  11. package/src/api/calendar.ts +817 -0
  12. package/src/api/card.ts +215 -0
  13. package/src/api/conference.ts +561 -0
  14. package/src/api/connector.ts +97 -0
  15. package/src/api/contact.ts +56 -0
  16. package/src/api/convFile.ts +166 -0
  17. package/src/api/crm.ts +830 -0
  18. package/src/api/customerService.ts +156 -0
  19. package/src/api/datacenter.ts +672 -0
  20. package/src/api/devicemng.ts +202 -0
  21. package/src/api/diot.ts +19 -0
  22. package/src/api/doc.ts +232 -0
  23. package/src/api/drive.ts +109 -0
  24. package/src/api/edu.ts +30 -0
  25. package/src/api/esign.ts +44 -0
  26. package/src/api/exclusive.ts +372 -0
  27. package/src/api/h3yun.ts +537 -0
  28. package/src/api/hrm.ts +272 -0
  29. package/src/api/im.ts +978 -0
  30. package/src/api/industry.ts +153 -0
  31. package/src/api/jzcrm.ts +304 -0
  32. package/src/api/link.ts +94 -0
  33. package/src/api/live.ts +162 -0
  34. package/src/api/microApp.ts +309 -0
  35. package/src/api/oapi.ts +4083 -0
  36. package/src/api/oauth2.ts +146 -0
  37. package/src/api/pedia.ts +222 -0
  38. package/src/api/project.ts +1519 -0
  39. package/src/api/resident.ts +133 -0
  40. package/src/api/robot.ts +326 -0
  41. package/src/api/rooms.ts +334 -0
  42. package/src/api/serviceGroup.ts +216 -0
  43. package/src/api/storage.ts +1701 -0
  44. package/src/api/swform.ts +94 -0
  45. package/src/api/todo.ts +220 -0
  46. package/src/api/wiki.ts +231 -0
  47. package/src/api/workbench.ts +73 -0
  48. package/src/api/yida.ts +2165 -0
  49. package/src/bot.ts +129 -0
  50. package/src/http.ts +44 -0
  51. package/src/index.ts +9 -0
  52. package/src/internal.ts +47 -0
  53. package/src/message.ts +141 -0
  54. package/src/types/index.ts +140 -0
  55. package/src/utils.ts +53 -0
  56. package/src/ws.ts +55 -0
@@ -0,0 +1,215 @@
1
+ import { Internal } from '../internal'
2
+ // GENERATED CONTENT
3
+
4
+ export interface UpdateCardParams {
5
+ /** 外部卡片实例Id。 */
6
+ outTrackId: string
7
+ /** 卡片数据 */
8
+ cardData?: unknown
9
+ /** 用户的私有数据。 */
10
+ privateData?: unknown
11
+ /** 卡片更新选项 */
12
+ cardUpdateOptions?: unknown
13
+ }
14
+
15
+ export interface UpdateCardResponse {
16
+ success?: unknown
17
+ result?: unknown
18
+ }
19
+
20
+ export interface CreateCardParams {
21
+ /** 卡片创建者的userId。 */
22
+ userId?: string
23
+ /** 卡片内容模板ID,可通过登录[开发者后台 > 卡片平台](https://open-dev.dingtalk.com/fe/card)获取。 */
24
+ cardTemplateId: string
25
+ /** 外部卡片实例Id。 */
26
+ outTrackId: string
27
+ /** 卡片回调的类型: */
28
+ callbackType?: string
29
+ /** 卡片回调HTTP模式时的路由 Key,用于查询注册的 callbackUrl。 */
30
+ callbackRouteKey?: string
31
+ /** 卡片数据,示例: */
32
+ cardData: unknown
33
+ /** 用户的私有数据: */
34
+ privateData?: unknown
35
+ /** 动态数据源配置。 */
36
+ openDynamicDataConfig?: unknown
37
+ /** IM 群聊场域信息。 */
38
+ imGroupOpenSpaceModel?: unknown
39
+ /** IM 单聊场域信息。 */
40
+ imRobotOpenSpaceModel?: unknown
41
+ /** 协作场域信息。 */
42
+ coFeedOpenSpaceModel?: unknown
43
+ /** 吊顶场域信息。 */
44
+ topOpenSpaceModel?: unknown
45
+ /** 用户id类型: */
46
+ userIdType?: number
47
+ }
48
+
49
+ export interface CreateCardResponse {
50
+ success?: unknown
51
+ result?: string
52
+ }
53
+
54
+ export interface CreateAndDeliverParams {
55
+ /** 卡片创建者的userId。 */
56
+ userId?: string
57
+ /** 卡片内容模板ID,可通过登录[开发者后台 > 卡片平台](https://open-dev.dingtalk.com/fe/card)获取。 */
58
+ cardTemplateId: string
59
+ /** 外部卡片实例Id。 */
60
+ outTrackId: string
61
+ /** 卡片回调的类型: */
62
+ callbackType?: string
63
+ /** 卡片回调HTTP模式时的路由 Key,用于查询注册的 callbackUrl。 */
64
+ callbackRouteKey?: string
65
+ /** 卡片数据,示例: */
66
+ cardData: unknown
67
+ /** 用户的私有数据: */
68
+ privateData?: unknown
69
+ /** 动态数据源配置。 */
70
+ openDynamicDataConfig?: unknown
71
+ /** IM群聊场域信息。 */
72
+ imGroupOpenSpaceModel?: unknown
73
+ /** IM机器人单聊场域信息。 */
74
+ imRobotOpenSpaceModel?: unknown
75
+ /** 协作场域信息。 */
76
+ coFeedOpenSpaceModel?: unknown
77
+ /** 吊顶场域信息。 */
78
+ topOpenSpaceModel?: unknown
79
+ /** 表示场域及其场域id,其格式为`dtv1.card//spaceType1.spaceId1;spaceType2.spaceId2_1;spaceType2.spaceId2_2;spaceType3.spaceId3`。 */
80
+ openSpaceId: string
81
+ /** 群聊投放参数。 */
82
+ imGroupOpenDeliverModel?: unknown
83
+ /** IM机器人单聊投放参数。 */
84
+ imRobotOpenDeliverModel?: unknown
85
+ /** 吊顶投放参数。 */
86
+ topOpenDeliverModel?: unknown
87
+ /** 协作投放参数。 */
88
+ coFeedOpenDeliverModel?: unknown
89
+ /** 文档投放参数 */
90
+ docOpenDeliverModel?: unknown
91
+ /** 用户userId类型: */
92
+ userIdType?: number
93
+ }
94
+
95
+ export interface CreateAndDeliverResponse {
96
+ success?: unknown
97
+ result?: {
98
+ outTrackId?: string
99
+ deliverResults?: number
100
+ }
101
+ }
102
+
103
+ export interface RegisterCallbackParams {
104
+ /** 回调地址的路由 Key,一个 callbackRouteKey 仅可映射一个 callbackUrl */
105
+ callbackRouteKey: string
106
+ /** 接受动态卡片回调的 URL 地址 */
107
+ callbackUrl: string
108
+ /** 加密密钥用于校验来源 */
109
+ apiSecret?: string
110
+ /** 是否强制覆盖更新,默认 false。 */
111
+ forceUpdate?: unknown
112
+ }
113
+
114
+ export interface RegisterCallbackResponse {
115
+ success?: unknown
116
+ result?: {
117
+ callbackUrl?: string
118
+ apiSecret?: string
119
+ }
120
+ }
121
+
122
+ export interface AppendSpaceParams {
123
+ /** 外部卡片实例Id。 */
124
+ outTrackId: string
125
+ /** IM群聊场域信息 */
126
+ imGroupOpenSpaceModel?: unknown
127
+ /** 机器人单聊场域参数 */
128
+ imRobotOpenSpaceModel?: unknown
129
+ /** 吊顶场域信息 */
130
+ topOpenSpaceModel?: unknown
131
+ /** 协作场域信息 */
132
+ coFeedOpenSpaceModel?: unknown
133
+ }
134
+
135
+ export interface AppendSpaceResponse {
136
+ success?: unknown
137
+ result?: unknown
138
+ }
139
+
140
+ export interface DeliverCardParams {
141
+ /** 外部卡片实例Id。 */
142
+ outTrackId: string
143
+ /** 表示场域及其场域id,其格式为dtv1.card//spaceType1.spaceId1;spaceType2,spaceId2;spaceType3,spaceId3 */
144
+ openSpaceId: string
145
+ /** 单聊场域投放参数 */
146
+ imSingleOpenDeliverModel?: unknown
147
+ /** 群聊投放参数 */
148
+ imGroupOpenDeliverModel?: unknown
149
+ /** 吊顶投放参数 */
150
+ topOpenDeliverModel?: unknown
151
+ /** 协作投放参数 */
152
+ coFeedOpenDeliverModel?: unknown
153
+ /** 工作台投放参数 */
154
+ workBenchOpenDeliverModel?: unknown
155
+ }
156
+
157
+ export interface DeliverCardResponse {
158
+ success?: unknown
159
+ result?: {
160
+ spaceType?: string
161
+ spaceId?: string
162
+ success?: number
163
+ }[]
164
+ }
165
+
166
+ // funcName: isOldApi
167
+ Internal.define({
168
+ '/card/instances': {
169
+ PUT: { updateCard: false },
170
+ POST: { createCard: false },
171
+ },
172
+ '/card/instances/createAndDeliver': { POST: { createAndDeliver: false } },
173
+ '/card/callbacks/register': { POST: { registerCallback: false } },
174
+ '/card/instances/spaces': { PUT: { appendSpace: false } },
175
+ '/card/instances/deliver': { POST: { deliverCard: false } },
176
+ })
177
+
178
+ declare module '../internal' {
179
+ interface Internal {
180
+ /**
181
+ * 更新卡片
182
+ * @see https://open.dingtalk.com/document/orgapp/interactive-card-update-interface
183
+ */
184
+ updateCard(params: UpdateCardParams): Promise<UpdateCardResponse>
185
+ /**
186
+ * 创建卡片
187
+ * @see https://open.dingtalk.com/document/orgapp/interface-for-creating-a-card-instance
188
+ */
189
+ createCard(params: CreateCardParams): Promise<CreateCardResponse>
190
+ /**
191
+ * 创建并投放卡片
192
+ * @see https://open.dingtalk.com/document/orgapp/create-and-deliver-cards
193
+ */
194
+ createAndDeliver(
195
+ params: CreateAndDeliverParams,
196
+ ): Promise<CreateAndDeliverResponse>
197
+ /**
198
+ * 注册卡片回调地址
199
+ * @see https://open.dingtalk.com/document/orgapp/register-card-callback-address
200
+ */
201
+ registerCallback(
202
+ params: RegisterCallbackParams,
203
+ ): Promise<RegisterCallbackResponse>
204
+ /**
205
+ * 新增或更新卡片的场域信息
206
+ * @see https://open.dingtalk.com/document/orgapp/add-field-interface
207
+ */
208
+ appendSpace(params: AppendSpaceParams): Promise<AppendSpaceResponse>
209
+ /**
210
+ * 投放卡片
211
+ * @see https://open.dingtalk.com/document/isvapp/delivery-card-interface
212
+ */
213
+ deliverCard(params: DeliverCardParams): Promise<DeliverCardResponse>
214
+ }
215
+ }