-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.d.ts
41 lines (35 loc) · 1.27 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
import Client = require('@alicloud/mns/lib/client');
interface MNSClientResponse {
code: any;
headers: {};
body: any;
}
interface MNSClient extends Client{
sendMessage(queueName: string, params: {}): Promise<MNSClientResponse>;
async batchSendMessage(queueName: string, params: {}): Promise<MNSClientResponse>;
receiveMessage(queueName: string, waitSeconds?: number): Promise<MNSClientResponse>;
async batchReceiveMessage(queueName: string, numOfMessages: number, waitSeconds?: number): Promise<MNSClientResponse>;
peekMessage(queueName: string): Promise<MNSClientResponse>;
async batchPeekMessage(queueName: string, numOfMessages: number): Promise<MNSClientResponse>;
deleteMessage(queueName: string, receiptHandle: string): Promise<MNSClientResponse>;
async batchDeleteMessage(queueName: string, receiptHandles: Array<string>): Promise<MNSClientResponse>;
}
interface EggAlicloudMNSOptions {
client: {
accountId: string,
accessKeyId: string,
secretAccessKey: string,
region: string,
secure: boolean,
internal: boolean,
vpc: boolean,
},
}
declare module 'egg' {
interface Application {
alicloudMns: MNSClient & Singleton<MNSClient>;
}
interface EggAppConfig {
alicloudMns: EggAlicloudMNSOptions;
}
}