@satorijs/adapter-dingtalk 1.0.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.
Files changed (53) hide show
  1. package/lib/api/alitrip.d.ts +396 -0
  2. package/lib/api/attendance.d.ts +62 -0
  3. package/lib/api/badge.d.ts +232 -0
  4. package/lib/api/blackboard.d.ts +16 -0
  5. package/lib/api/calendar.d.ts +620 -0
  6. package/lib/api/card.d.ts +184 -0
  7. package/lib/api/conference.d.ts +403 -0
  8. package/lib/api/connector.d.ts +78 -0
  9. package/lib/api/contact.d.ts +39 -0
  10. package/lib/api/convFile.d.ts +134 -0
  11. package/lib/api/crm.d.ts +661 -0
  12. package/lib/api/customerService.d.ts +127 -0
  13. package/lib/api/datacenter.d.ts +505 -0
  14. package/lib/api/devicemng.d.ts +160 -0
  15. package/lib/api/diot.d.ts +12 -0
  16. package/lib/api/doc.d.ts +140 -0
  17. package/lib/api/drive.d.ts +87 -0
  18. package/lib/api/edu.d.ts +22 -0
  19. package/lib/api/esign.d.ts +33 -0
  20. package/lib/api/exclusive.d.ts +303 -0
  21. package/lib/api/h3yun.d.ts +437 -0
  22. package/lib/api/hrm.d.ts +214 -0
  23. package/lib/api/im.d.ts +772 -0
  24. package/lib/api/industry.d.ts +117 -0
  25. package/lib/api/jzcrm.d.ts +254 -0
  26. package/lib/api/link.d.ts +72 -0
  27. package/lib/api/live.d.ts +131 -0
  28. package/lib/api/microApp.d.ts +239 -0
  29. package/lib/api/oapi.d.ts +3361 -0
  30. package/lib/api/oauth2.d.ts +114 -0
  31. package/lib/api/pedia.d.ts +185 -0
  32. package/lib/api/project.d.ts +1118 -0
  33. package/lib/api/resident.d.ts +106 -0
  34. package/lib/api/robot.d.ts +255 -0
  35. package/lib/api/rooms.d.ts +255 -0
  36. package/lib/api/serviceGroup.d.ts +175 -0
  37. package/lib/api/storage.d.ts +1240 -0
  38. package/lib/api/swform.d.ts +70 -0
  39. package/lib/api/todo.d.ts +168 -0
  40. package/lib/api/wiki.d.ts +194 -0
  41. package/lib/api/workbench.d.ts +45 -0
  42. package/lib/api/yida.d.ts +1837 -0
  43. package/lib/bot.d.ts +30 -0
  44. package/lib/http.d.ts +7 -0
  45. package/lib/index.d.ts +7 -0
  46. package/lib/index.js +1814 -0
  47. package/lib/index.js.map +7 -0
  48. package/lib/internal.d.ts +7 -0
  49. package/lib/message.d.ts +17 -0
  50. package/lib/types/index.d.ts +133 -0
  51. package/lib/utils.d.ts +4 -0
  52. package/lib/ws.d.ts +12 -0
  53. package/package.json +31 -0
@@ -0,0 +1,114 @@
1
+ export interface CreateJsapiTicketResponse {
2
+ jsapiTicket?: string;
3
+ expireIn?: number;
4
+ }
5
+ export interface GetSsoAccessTokenParams {
6
+ /** 企业的corpId。 */
7
+ corpid: string;
8
+ /** sso密钥,可以在[开发者后台](https://open-dev.dingtalk.com/fe/old#/corpAuthInfo)**基本信息**—**开发信息**(****旧版****)页面查看。 */
9
+ ssoSecret: string;
10
+ }
11
+ export interface GetSsoAccessTokenResponse {
12
+ accessToken?: string;
13
+ expireIn?: number;
14
+ }
15
+ export interface GetPersonalAuthRuleResponse {
16
+ result?: {
17
+ resource: string;
18
+ authItems: number;
19
+ }[];
20
+ }
21
+ export interface GetAccessTokenParams {
22
+ /** 已创建的企业内部应用的AppKey。 */
23
+ appKey: string;
24
+ /** 已创建的企业内部应用的AppSecret。 */
25
+ appSecret?: string;
26
+ }
27
+ export interface GetAccessTokenResponse {
28
+ accessToken?: string;
29
+ expireIn?: number;
30
+ }
31
+ export interface GetCorpAccessTokenParams {
32
+ /** 已创建的第三方企业应用的SuiteKey。 */
33
+ suiteKey: string;
34
+ /** 已创建的第三方企业应用的SuiteSecret。 */
35
+ suiteSecret: string;
36
+ /** 授权企业的CorpId。 */
37
+ authCorpId: string;
38
+ /** 钉钉推送的suiteTicket。 */
39
+ suiteTicket: string;
40
+ }
41
+ export interface GetCorpAccessTokenResponse {
42
+ accessToken?: string;
43
+ expireIn?: number;
44
+ }
45
+ export interface GetUserTokenParams {
46
+ /** 应用id。可使用扫码登录应用或者第三方个人小程序的appId。 */
47
+ clientId: string;
48
+ /** 应用密钥。 */
49
+ clientSecret?: string;
50
+ /** OAuth 2.0 临时授权码。 */
51
+ code?: string;
52
+ /** OAuth2.0刷新令牌,从返回结果里面获取。 */
53
+ refreshToken?: string;
54
+ /** - 如果使用授权码换token,传authorization\_code。 */
55
+ grantType?: string;
56
+ }
57
+ export interface GetUserTokenResponse {
58
+ accessToken?: string;
59
+ refreshToken?: string;
60
+ expireIn?: number;
61
+ corpId?: string;
62
+ }
63
+ export interface GetSsoUserInfoQuery {
64
+ /** 临时授权码,管理员在钉钉管理后台,跳转到应用管理页面时,该授权码会附带在URL中。 */
65
+ code: string;
66
+ }
67
+ export interface GetSsoUserInfoResponse {
68
+ corpId: string;
69
+ corpName: string;
70
+ userId: string;
71
+ email: string;
72
+ userName: string;
73
+ avatar: string;
74
+ isAdmin: unknown;
75
+ }
76
+ declare module '../internal' {
77
+ interface Internal {
78
+ /**
79
+ * 生成jsapi ticket
80
+ * @see https://developers.dingtalk.com/document/isvapp/create-a-jsapi-ticket
81
+ */
82
+ createJsapiTicket(): Promise<CreateJsapiTicketResponse>;
83
+ /**
84
+ * 生成微应用管理后台accessToken
85
+ * @see https://developers.dingtalk.com/document/isvapp/obtain-the-access_token-of-the-micro-application-background-without-log-on
86
+ */
87
+ getSsoAccessToken(params: GetSsoAccessTokenParams): Promise<GetSsoAccessTokenResponse>;
88
+ /**
89
+ * 查询个人授权记录
90
+ * @see https://developers.dingtalk.com/document/isvapp/query-individual-authorization-records
91
+ */
92
+ getPersonalAuthRule(): Promise<GetPersonalAuthRuleResponse>;
93
+ /**
94
+ * 获取企业accessToken(企业内部应用)
95
+ * @see https://developers.dingtalk.com/document/orgapp/obtain-the-access_token-of-an-internal-app
96
+ */
97
+ getAccessToken(params: GetAccessTokenParams): Promise<GetAccessTokenResponse>;
98
+ /**
99
+ * 获取企业accessToken(应用商店应用)
100
+ * @see https://developers.dingtalk.com/document/isvapp/obtain-the-access_token-of-the-authorized-enterprise
101
+ */
102
+ getCorpAccessToken(params: GetCorpAccessTokenParams): Promise<GetCorpAccessTokenResponse>;
103
+ /**
104
+ * 获取用户token
105
+ * @see https://developers.dingtalk.com/document/isvapp/obtain-user-token
106
+ */
107
+ getUserToken(params: GetUserTokenParams): Promise<GetUserTokenResponse>;
108
+ /**
109
+ * 查询微应用后台免登的用户信息
110
+ * @see https://developers.dingtalk.com/document/isvapp/obtains-the-identity-of-an-application-administrator
111
+ */
112
+ getSsoUserInfo(query: GetSsoUserInfoQuery): Promise<GetSsoUserInfoResponse>;
113
+ }
114
+ }
@@ -0,0 +1,185 @@
1
+ export interface PediaWordsQueryQuery {
2
+ /** 查询主键编号。 */
3
+ uuid: number;
4
+ /** 当前操作用户的userId。 */
5
+ userId: string;
6
+ }
7
+ export interface PediaWordsQueryResponse {
8
+ data?: {
9
+ wordName?: string;
10
+ uuid?: number;
11
+ gmtCreate?: number;
12
+ gmtModify?: number;
13
+ wordAlias?: number;
14
+ highLightWordAlias?: number;
15
+ relatedDoc?: number;
16
+ relatedLink?: number;
17
+ creatorName?: string;
18
+ updaterName?: string;
19
+ approveName?: string;
20
+ wordParaphrase?: string;
21
+ simpleWordParaphrase?: string;
22
+ contacts?: number;
23
+ tagsList?: number;
24
+ appLink?: number;
25
+ imHighLight?: number;
26
+ simHighLight?: number;
27
+ picList?: number;
28
+ contactList?: number;
29
+ userId?: string;
30
+ parentUuid?: number;
31
+ };
32
+ success?: unknown;
33
+ }
34
+ export interface PediaWordsSearchParams {
35
+ /** 搜索关键词。 */
36
+ wordName?: string;
37
+ /** 操作人的userId。 */
38
+ userId: string;
39
+ /** 当前每页需要展示的数量,最大20。 */
40
+ pageSize: number;
41
+ /** 当前查询的页数,从1开始。 */
42
+ pageNumber: number;
43
+ /** 当前搜索列表的状态: */
44
+ status: string;
45
+ }
46
+ export interface PediaWordsSearchResponse {
47
+ data?: {
48
+ wordName?: string;
49
+ uuid?: number;
50
+ gmtCreate?: number;
51
+ gmtModify?: number;
52
+ wordAlias?: number;
53
+ highLightWordAlias?: number;
54
+ relatedLink?: number;
55
+ relatedDoc?: number;
56
+ creatorName?: string;
57
+ updaterName?: string;
58
+ approveName?: string;
59
+ wordParaphrase?: string;
60
+ simpleWordParaphrase?: string;
61
+ contacts?: number;
62
+ tagsList?: number;
63
+ appLink?: number;
64
+ imHighLight?: number;
65
+ simHighLight?: number;
66
+ picList?: number;
67
+ contactList?: number;
68
+ userId?: string;
69
+ parentUuid?: number;
70
+ }[];
71
+ success?: unknown;
72
+ }
73
+ export interface PediaWordsApproveParams {
74
+ /** 当前审核的词条的主键编号。 */
75
+ uuid: number;
76
+ /** 操作人的组织员工userId。 */
77
+ userId: string;
78
+ /** 审核的结果: */
79
+ approveStatus: string;
80
+ /** 拒绝的原因。 */
81
+ approveReason?: string;
82
+ /** 当前内部群是否高亮: */
83
+ imHighLight: unknown;
84
+ /** 服务群是否高亮: */
85
+ simHighLight: unknown;
86
+ }
87
+ export interface PediaWordsApproveResponse {
88
+ success?: unknown;
89
+ }
90
+ export interface PediaWordsDeleteQuery {
91
+ /** 当前需要删除的词条主键编号。 */
92
+ uuid: number;
93
+ /** 当前操作用户的userId。 */
94
+ userId: string;
95
+ }
96
+ export interface PediaWordsDeleteResponse {
97
+ uuid?: number;
98
+ success?: unknown;
99
+ }
100
+ export interface PediaWordsUpdateParams {
101
+ /** 需要更新的词条编号。 */
102
+ uuid: number;
103
+ /** 词条名称。 */
104
+ wordName: string;
105
+ /** 词条别名列表,最大值10。 */
106
+ wordAlias?: string[];
107
+ /** 可高亮的别名列表,最大值10。 */
108
+ highLightWordAlias?: string[];
109
+ /** 词条相关文档信息,最大值10。 */
110
+ relatedDoc?: object[];
111
+ /** 词条相关链接信息,最大值10。 */
112
+ relatedLink?: object[];
113
+ /** 词条释义。 */
114
+ wordParaphrase: string;
115
+ /** 相关应用对象。 */
116
+ appLink?: object[];
117
+ /** 操作人的userId。 */
118
+ userId?: string;
119
+ /** 词条的相关图片信息,最大值10。 */
120
+ picList?: object[];
121
+ /** 词条的相关联系人信息,最大值10。 */
122
+ contactList?: object[];
123
+ }
124
+ export interface PediaWordsUpdateResponse {
125
+ uuid?: number;
126
+ success?: unknown;
127
+ }
128
+ export interface PediaWordsAddParams {
129
+ /** 新增词条的名称。 */
130
+ wordName: string;
131
+ /** 词条的别名列表,多个名字的时候可以添加,每次调用最多传10个。 */
132
+ wordAlias?: string[];
133
+ /** 词条高亮别名列表,每次调用最多传10个。 */
134
+ highLightWordAlias?: string[];
135
+ /** 词条相关的文档列表,每次调用最多传10个。 */
136
+ relatedDoc?: object[];
137
+ /** 词条相关的链接信息,每次调用最多传10个。 */
138
+ relatedLink?: object[];
139
+ /** 词条释义,针对词条的描述内容。 */
140
+ wordParaphrase: string;
141
+ /** 词条相关的图片信息,每次调用最多传10个。 */
142
+ picList?: object[];
143
+ /** 组织对应的员工userId。 */
144
+ userId: string;
145
+ /** 词条相关的联系人信息,每次调用最多传10个。 */
146
+ contactList?: object[];
147
+ }
148
+ export interface PediaWordsAddResponse {
149
+ uuid?: number;
150
+ success?: unknown;
151
+ }
152
+ declare module '../internal' {
153
+ interface Internal {
154
+ /**
155
+ * 根据词条主键ID查询当前词条详情
156
+ * @see https://developers.dingtalk.com/document/app/entry-query
157
+ */
158
+ pediaWordsQuery(query: PediaWordsQueryQuery): Promise<PediaWordsQueryResponse>;
159
+ /**
160
+ * 分页获取企业词条信息
161
+ * @see https://developers.dingtalk.com/document/app/entry-search
162
+ */
163
+ pediaWordsSearch(params: PediaWordsSearchParams): Promise<PediaWordsSearchResponse>;
164
+ /**
165
+ * 企业百科针对待审核词条进行审核
166
+ * @see https://developers.dingtalk.com/document/app/entry-review
167
+ */
168
+ pediaWordsApprove(params: PediaWordsApproveParams): Promise<PediaWordsApproveResponse>;
169
+ /**
170
+ * 企业百科针对uuid删除当前词条
171
+ * @see https://developers.dingtalk.com/document/app/entry-delete
172
+ */
173
+ pediaWordsDelete(query: PediaWordsDeleteQuery): Promise<PediaWordsDeleteResponse>;
174
+ /**
175
+ * 企业百科对当前已经生效词条进行编辑
176
+ * @see https://developers.dingtalk.com/document/app/update-entry
177
+ */
178
+ pediaWordsUpdate(params: PediaWordsUpdateParams): Promise<PediaWordsUpdateResponse>;
179
+ /**
180
+ * 企业百科增加当前企业词条信息
181
+ * @see https://developers.dingtalk.com/document/app/new-entry
182
+ */
183
+ pediaWordsAdd(params: PediaWordsAddParams): Promise<PediaWordsAddResponse>;
184
+ }
185
+ }