wuzapi 1.4.0 → 1.5.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.
@@ -92,3 +92,58 @@ export interface DownloadMediaRequest {
92
92
  export interface DownloadMediaResponse {
93
93
  [key: string]: unknown;
94
94
  }
95
+ export interface DeleteMessageRequest {
96
+ Phone: string;
97
+ Id: string;
98
+ Remote?: boolean;
99
+ }
100
+ export interface DeleteMessageResponse {
101
+ Details: string;
102
+ }
103
+ export interface ChatButton {
104
+ ButtonId: string;
105
+ ButtonText: {
106
+ DisplayText: string;
107
+ };
108
+ Type: number;
109
+ }
110
+ export interface SendButtonsRequest {
111
+ Phone: string;
112
+ Body: string;
113
+ Footer?: string;
114
+ Buttons: ChatButton[];
115
+ ContextInfo?: SimpleContextInfo;
116
+ }
117
+ export interface ListItem {
118
+ Title: string;
119
+ Description?: string;
120
+ RowId: string;
121
+ }
122
+ export interface ListSection {
123
+ Title: string;
124
+ Rows: ListItem[];
125
+ }
126
+ export interface SendListRequest {
127
+ Phone: string;
128
+ Body: string;
129
+ Footer?: string;
130
+ Title: string;
131
+ ButtonText: string;
132
+ Sections: ListSection[];
133
+ ContextInfo?: SimpleContextInfo;
134
+ }
135
+ export interface ChatPollOption {
136
+ Name: string;
137
+ }
138
+ export interface SendPollRequest {
139
+ Phone: string;
140
+ Name: string;
141
+ Options: ChatPollOption[];
142
+ SelectableCount?: number;
143
+ ContextInfo?: SimpleContextInfo;
144
+ }
145
+ export interface EditMessageRequest {
146
+ Phone: string;
147
+ MessageId: string;
148
+ NewText: string;
149
+ }
@@ -74,3 +74,55 @@ export interface GroupPhotoRemoveRequest {
74
74
  export interface GroupPhotoRemoveResponse {
75
75
  Details: string;
76
76
  }
77
+ export interface GroupLeaveRequest {
78
+ GroupJID: string;
79
+ }
80
+ export interface GroupLeaveResponse {
81
+ Details: string;
82
+ }
83
+ export interface GroupTopicRequest {
84
+ GroupJID: string;
85
+ Topic: string;
86
+ }
87
+ export interface GroupTopicResponse {
88
+ Details: string;
89
+ }
90
+ export interface GroupAnnounceRequest {
91
+ GroupJID: string;
92
+ Announce: boolean;
93
+ }
94
+ export interface GroupAnnounceResponse {
95
+ Details: string;
96
+ }
97
+ export interface GroupJoinRequest {
98
+ InviteLink: string;
99
+ }
100
+ export interface GroupJoinResponse {
101
+ GroupJID: string;
102
+ Details: string;
103
+ }
104
+ export interface GroupInviteInfoRequest {
105
+ InviteLink: string;
106
+ }
107
+ export interface GroupInviteInfoResponse {
108
+ GroupJID: string;
109
+ Name: string;
110
+ Description: string;
111
+ Subject: string;
112
+ Owner: string;
113
+ Creation: string;
114
+ ParticipantsCount: number;
115
+ }
116
+ export interface GroupUpdateParticipantsRequest {
117
+ GroupJID: string;
118
+ Action: "add" | "remove" | "promote" | "demote";
119
+ Participants: string[];
120
+ }
121
+ export interface ParticipantUpdate {
122
+ JID: string;
123
+ Status: string;
124
+ Code: number;
125
+ }
126
+ export interface GroupUpdateParticipantsResponse {
127
+ Updates: ParticipantUpdate[];
128
+ }
@@ -5,5 +5,6 @@ export * from './user.js';
5
5
  export * from './chat.js';
6
6
  export * from './group.js';
7
7
  export * from './webhook.js';
8
+ export * from './newsletter.js';
8
9
  export * from './message.js';
9
10
  export * from './events.js';
@@ -0,0 +1,17 @@
1
+ export interface Newsletter {
2
+ ID: string;
3
+ Name: string;
4
+ Description: string;
5
+ ThreadJID: string;
6
+ InviteCode: string;
7
+ CreationTime: number;
8
+ Handle: string;
9
+ State: string;
10
+ ViewerMetadata: {
11
+ View: string;
12
+ Mute: string;
13
+ };
14
+ }
15
+ export interface NewsletterListResponse {
16
+ Newsletters: Newsletter[];
17
+ }
@@ -30,3 +30,19 @@ export interface S3TestResponse {
30
30
  Bucket: string;
31
31
  Region: string;
32
32
  }
33
+ export interface PairPhoneRequest {
34
+ Phone: string;
35
+ Code: string;
36
+ }
37
+ export interface PairPhoneResponse {
38
+ Details: string;
39
+ }
40
+ export interface HistoryResponse {
41
+ Details: string;
42
+ }
43
+ export interface ProxyRequest {
44
+ Proxy: string;
45
+ }
46
+ export interface ProxyResponse {
47
+ Details: string;
48
+ }
@@ -53,3 +53,8 @@ export interface Contact {
53
53
  export interface ContactsResponse {
54
54
  [jid: string]: Contact;
55
55
  }
56
+ export interface UserPresenceRequest {
57
+ Phone: string;
58
+ State: "available" | "unavailable";
59
+ LastSeen?: number;
60
+ }
@@ -8,6 +8,15 @@ export interface GetWebhookResponse {
8
8
  subscribe: string[];
9
9
  webhook: string;
10
10
  }
11
+ export interface UpdateWebhookRequest {
12
+ webhookURL: string;
13
+ }
14
+ export interface UpdateWebhookResponse {
15
+ webhook: string;
16
+ }
17
+ export interface DeleteWebhookResponse {
18
+ Details: string;
19
+ }
11
20
  export interface S3MediaInfo {
12
21
  url: string;
13
22
  key: string;
@@ -5,6 +5,7 @@ import { UserModule } from './modules/user.js';
5
5
  import { ChatModule } from './modules/chat.js';
6
6
  import { GroupModule } from './modules/group.js';
7
7
  import { WebhookModule } from './modules/webhook.js';
8
+ import { NewsletterModule } from './modules/newsletter.js';
8
9
  export declare class WuzapiClient {
9
10
  readonly admin: AdminModule;
10
11
  readonly session: SessionModule;
@@ -12,6 +13,7 @@ export declare class WuzapiClient {
12
13
  readonly chat: ChatModule;
13
14
  readonly group: GroupModule;
14
15
  readonly webhook: WebhookModule;
16
+ readonly newsletter: NewsletterModule;
15
17
  readonly users: UserModule;
16
18
  readonly message: ChatModule;
17
19
  constructor(config: WuzapiConfig);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wuzapi",
3
- "version": "1.4.0",
3
+ "version": "1.5.0",
4
4
  "description": "TypeScript client library for WuzAPI WhatsApp API",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",