wuzapi 1.3.1 → 1.4.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.
- package/README.md +162 -24
- package/dist/client.d.ts +10 -5
- package/dist/index.js +167 -98
- package/dist/index.js.map +1 -1
- package/dist/modules/admin.d.ts +4 -3
- package/dist/modules/chat.d.ts +17 -16
- package/dist/modules/group.d.ts +10 -9
- package/dist/modules/session.d.ts +10 -10
- package/dist/modules/user.d.ts +5 -4
- package/dist/modules/webhook.d.ts +3 -2
- package/dist/types/common.d.ts +4 -1
- package/dist/wuzapi-client.d.ts +2 -2
- package/package.json +1 -1
package/dist/modules/user.d.ts
CHANGED
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
import { BaseClient } from '../client.js';
|
|
2
|
+
import { RequestOptions } from '../types/common.js';
|
|
2
3
|
import { UserInfoResponse, UserCheckResponse, UserAvatarResponse, ContactsResponse } from '../types/user.js';
|
|
3
4
|
export declare class UserModule extends BaseClient {
|
|
4
5
|
/**
|
|
5
6
|
* Get user details for specified phone numbers
|
|
6
7
|
*/
|
|
7
|
-
getInfo(phones: string[]): Promise<UserInfoResponse>;
|
|
8
|
+
getInfo(phones: string[], options?: RequestOptions): Promise<UserInfoResponse>;
|
|
8
9
|
/**
|
|
9
10
|
* Check if phone numbers are registered WhatsApp users
|
|
10
11
|
*/
|
|
11
|
-
check(phones: string[]): Promise<UserCheckResponse>;
|
|
12
|
+
check(phones: string[], options?: RequestOptions): Promise<UserCheckResponse>;
|
|
12
13
|
/**
|
|
13
14
|
* Get user avatar/profile picture
|
|
14
15
|
*/
|
|
15
|
-
getAvatar(phone: string, preview?: boolean): Promise<UserAvatarResponse>;
|
|
16
|
+
getAvatar(phone: string, preview?: boolean, options?: RequestOptions): Promise<UserAvatarResponse>;
|
|
16
17
|
/**
|
|
17
18
|
* Get all contacts
|
|
18
19
|
*/
|
|
19
|
-
getContacts(): Promise<ContactsResponse>;
|
|
20
|
+
getContacts(options?: RequestOptions): Promise<ContactsResponse>;
|
|
20
21
|
}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { BaseClient } from '../client.js';
|
|
2
|
+
import { RequestOptions } from '../types/common.js';
|
|
2
3
|
import { SetWebhookResponse, GetWebhookResponse } from '../types/webhook.js';
|
|
3
4
|
export declare class WebhookModule extends BaseClient {
|
|
4
5
|
/**
|
|
5
6
|
* Set webhook URL and events to subscribe to
|
|
6
7
|
*/
|
|
7
|
-
setWebhook(webhookURL: string): Promise<SetWebhookResponse>;
|
|
8
|
+
setWebhook(webhookURL: string, options?: RequestOptions): Promise<SetWebhookResponse>;
|
|
8
9
|
/**
|
|
9
10
|
* Get current webhook configuration
|
|
10
11
|
*/
|
|
11
|
-
getWebhook(): Promise<GetWebhookResponse>;
|
|
12
|
+
getWebhook(options?: RequestOptions): Promise<GetWebhookResponse>;
|
|
12
13
|
}
|
package/dist/types/common.d.ts
CHANGED
package/dist/wuzapi-client.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { WuzapiConfig } from './types/common.js';
|
|
1
|
+
import { WuzapiConfig, RequestOptions } from './types/common.js';
|
|
2
2
|
import { AdminModule } from './modules/admin.js';
|
|
3
3
|
import { SessionModule } from './modules/session.js';
|
|
4
4
|
import { UserModule } from './modules/user.js';
|
|
@@ -18,5 +18,5 @@ export declare class WuzapiClient {
|
|
|
18
18
|
/**
|
|
19
19
|
* Test connection to the API
|
|
20
20
|
*/
|
|
21
|
-
ping(): Promise<boolean>;
|
|
21
|
+
ping(options?: RequestOptions): Promise<boolean>;
|
|
22
22
|
}
|