wuzapi 1.0.1 → 1.2.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.
@@ -0,0 +1,32 @@
1
+ import { S3Config } from './common.js';
2
+ export interface ConnectRequest {
3
+ Subscribe: string[];
4
+ Immediate?: boolean;
5
+ }
6
+ export interface ConnectResponse {
7
+ details: string;
8
+ events: string;
9
+ jid: string;
10
+ webhook: string;
11
+ }
12
+ export interface DisconnectResponse {
13
+ Details: string;
14
+ }
15
+ export interface LogoutResponse {
16
+ Details: string;
17
+ }
18
+ export interface StatusResponse {
19
+ Connected: boolean;
20
+ LoggedIn: boolean;
21
+ }
22
+ export interface QRCodeResponse {
23
+ QRCode: string;
24
+ }
25
+ export interface S3ConfigResponse extends S3Config {
26
+ accessKey: string;
27
+ }
28
+ export interface S3TestResponse {
29
+ Details: string;
30
+ Bucket: string;
31
+ Region: string;
32
+ }
@@ -0,0 +1,55 @@
1
+ export interface UserInfoRequest {
2
+ Phone: string[];
3
+ }
4
+ export interface VerifiedName {
5
+ Certificate: {
6
+ details: string;
7
+ signature: string;
8
+ };
9
+ Details: {
10
+ issuer: string;
11
+ serial: number;
12
+ verifiedName: string;
13
+ };
14
+ }
15
+ export interface UserInfo {
16
+ Devices: string[];
17
+ PictureID: string;
18
+ Status: string;
19
+ VerifiedName: VerifiedName | null;
20
+ }
21
+ export interface UserInfoResponse {
22
+ Users: Record<string, UserInfo>;
23
+ }
24
+ export interface UserCheckRequest {
25
+ Phone: string[];
26
+ }
27
+ export interface UserCheck {
28
+ IsInWhatsapp: boolean;
29
+ JID: string;
30
+ Query: string;
31
+ VerifiedName: string;
32
+ }
33
+ export interface UserCheckResponse {
34
+ Users: UserCheck[];
35
+ }
36
+ export interface UserAvatarRequest {
37
+ Phone: string;
38
+ Preview: boolean;
39
+ }
40
+ export interface UserAvatarResponse {
41
+ URL: string;
42
+ ID: string;
43
+ Type: string;
44
+ DirectPath: string;
45
+ }
46
+ export interface Contact {
47
+ BusinessName: string;
48
+ FirstName: string;
49
+ Found: boolean;
50
+ FullName: string;
51
+ PushName: string;
52
+ }
53
+ export interface ContactsResponse {
54
+ [jid: string]: Contact;
55
+ }
@@ -0,0 +1,10 @@
1
+ export interface SetWebhookRequest {
2
+ webhookURL: string;
3
+ }
4
+ export interface SetWebhookResponse {
5
+ webhook: string;
6
+ }
7
+ export interface GetWebhookResponse {
8
+ subscribe: string[];
9
+ webhook: string;
10
+ }
@@ -0,0 +1 @@
1
+ /// <reference types="vite/client" />
@@ -0,0 +1,22 @@
1
+ import { WuzapiConfig } from './types/common.js';
2
+ import { AdminModule } from './modules/admin.js';
3
+ import { SessionModule } from './modules/session.js';
4
+ import { UserModule } from './modules/user.js';
5
+ import { ChatModule } from './modules/chat.js';
6
+ import { GroupModule } from './modules/group.js';
7
+ import { WebhookModule } from './modules/webhook.js';
8
+ export declare class WuzapiClient {
9
+ readonly admin: AdminModule;
10
+ readonly session: SessionModule;
11
+ readonly user: UserModule;
12
+ readonly chat: ChatModule;
13
+ readonly group: GroupModule;
14
+ readonly webhook: WebhookModule;
15
+ readonly users: UserModule;
16
+ readonly message: ChatModule;
17
+ constructor(config: WuzapiConfig);
18
+ /**
19
+ * Test connection to the API
20
+ */
21
+ ping(): Promise<boolean>;
22
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wuzapi",
3
- "version": "1.0.1",
3
+ "version": "1.2.0",
4
4
  "description": "TypeScript client library for WuzAPI WhatsApp API",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -17,7 +17,7 @@
17
17
  ],
18
18
  "scripts": {
19
19
  "dev": "vite",
20
- "build": "tsc -p tsconfig.build.json && vite build",
20
+ "build": "vite build",
21
21
  "preview": "vite preview",
22
22
  "lint": "eslint src --ext .ts,.tsx",
23
23
  "lint:fix": "eslint src --ext .ts,.tsx --fix",
@@ -50,7 +50,8 @@
50
50
  "@typescript-eslint/parser": "^8.41.0",
51
51
  "eslint": "^9.34.0",
52
52
  "typescript": "~5.8.3",
53
- "vite": "^7.1.2"
53
+ "vite": "^7.1.2",
54
+ "vite-plugin-dts": "^4.5.4"
54
55
  },
55
56
  "dependencies": {
56
57
  "axios": "^1.11.0"