Commit 699083d1 authored by nanahira's avatar nanahira

update some types

parent 82efc477
......@@ -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,
},
},
);
......
......@@ -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 WecomOnEventBody {
export interface WecomCardEventBody extends WecomEventBody {
TaskId: string;
CardType: string;
SelectedItems?: CardEventSelectedItems;
}
export interface WecomLocationBody extends WecomOnEventBody {
export interface WecomLocationBody extends WecomEventBody {
Latitude: number;
Longitude: number;
Precision: number;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment