Commit 699083d1 authored by nanahira's avatar nanahira

update some types

parent 82efc477
...@@ -37,7 +37,7 @@ export const BotConfig: Schema<BotConfig> = Schema.object({ ...@@ -37,7 +37,7 @@ export const BotConfig: Schema<BotConfig> = Schema.object({
export class WeComBot extends Bot<BotConfig> { export class WeComBot extends Bot<BotConfig> {
static schema = AdapterConfig; static schema = AdapterConfig;
private http: Quester; http: Quester;
private accessToken: string; private accessToken: string;
private accessTokenUntil: Moment; private accessTokenUntil: Moment;
...@@ -104,7 +104,7 @@ export class WeComBot extends Bot<BotConfig> { ...@@ -104,7 +104,7 @@ export class WeComBot extends Bot<BotConfig> {
'https://qyapi.weixin.qq.com/cgi-bin/agent/list', 'https://qyapi.weixin.qq.com/cgi-bin/agent/list',
{ {
params: { params: {
access_token: await this.getToken(), access_token: token,
}, },
}, },
); );
......
...@@ -37,6 +37,7 @@ export interface WecomEventBody { ...@@ -37,6 +37,7 @@ export interface WecomEventBody {
Event?: string; Event?: string;
AgentID: number; AgentID: number;
MsgId?: number; MsgId?: number;
EventKey?: string;
} }
export interface WecomChatBody extends WecomEventBody { export interface WecomChatBody extends WecomEventBody {
...@@ -51,10 +52,6 @@ export interface WecomPicBody extends WecomMediaBody { ...@@ -51,10 +52,6 @@ export interface WecomPicBody extends WecomMediaBody {
PicUrl: string; PicUrl: string;
} }
export interface WecomOnEventBody extends WecomEventBody {
EventKey: string;
}
export interface CardEventSelectedItems { export interface CardEventSelectedItems {
SelectedItem: CardEventSelectedItem | CardEventSelectedItem[]; SelectedItem: CardEventSelectedItem | CardEventSelectedItem[];
} }
...@@ -68,13 +65,13 @@ export interface CardEventOptionIds { ...@@ -68,13 +65,13 @@ export interface CardEventOptionIds {
OptionId: string | string[]; OptionId: string | string[];
} }
export interface WecomCardEventBody extends WecomOnEventBody { export interface WecomCardEventBody extends WecomEventBody {
TaskId: string; TaskId: string;
CardType: string; CardType: string;
SelectedItems?: CardEventSelectedItems; SelectedItems?: CardEventSelectedItems;
} }
export interface WecomLocationBody extends WecomOnEventBody { export interface WecomLocationBody extends WecomEventBody {
Latitude: number; Latitude: number;
Longitude: number; Longitude: number;
Precision: 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