Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
K
koishi-plugin-adapter-wecom
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
3rdeye
koishi-plugin-adapter-wecom
Commits
699083d1
Commit
699083d1
authored
Mar 17, 2022
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update some types
parent
82efc477
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
8 deletions
+5
-8
src/bot.ts
src/bot.ts
+2
-2
src/def/def.ts
src/def/def.ts
+3
-6
No files found.
src/bot.ts
View file @
699083d1
...
...
@@ -37,7 +37,7 @@ export const BotConfig: Schema<BotConfig> = Schema.object({
export
class
WeComBot
extends
Bot
<
BotConfig
>
{
static
schema
=
AdapterConfig
;
private
http
:
Quester
;
http
:
Quester
;
private
accessToken
:
string
;
private
accessTokenUntil
:
Moment
;
...
...
@@ -104,7 +104,7 @@ export class WeComBot extends Bot<BotConfig> {
'
https://qyapi.weixin.qq.com/cgi-bin/agent/list
'
,
{
params
:
{
access_token
:
await
this
.
getToken
()
,
access_token
:
token
,
},
},
);
...
...
src/def/def.ts
View file @
699083d1
...
...
@@ -37,6 +37,7 @@ export interface WecomEventBody {
Event
?:
string
;
AgentID
:
number
;
MsgId
?:
number
;
EventKey
?:
string
;
}
export
interface
WecomChatBody
extends
WecomEventBody
{
...
...
@@ -51,10 +52,6 @@ export interface WecomPicBody extends WecomMediaBody {
PicUrl
:
string
;
}
export
interface
WecomOnEventBody
extends
WecomEventBody
{
EventKey
:
string
;
}
export
interface
CardEventSelectedItems
{
SelectedItem
:
CardEventSelectedItem
|
CardEventSelectedItem
[];
}
...
...
@@ -68,13 +65,13 @@ export interface CardEventOptionIds {
OptionId
:
string
|
string
[];
}
export
interface
WecomCardEventBody
extends
Wecom
On
EventBody
{
export
interface
WecomCardEventBody
extends
WecomEventBody
{
TaskId
:
string
;
CardType
:
string
;
SelectedItems
?:
CardEventSelectedItems
;
}
export
interface
WecomLocationBody
extends
Wecom
On
EventBody
{
export
interface
WecomLocationBody
extends
WecomEventBody
{
Latitude
:
number
;
Longitude
:
number
;
Precision
:
number
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment