@raphaelvserafim/client-api-whatsapp 1.2.0 → 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.
Files changed (41) hide show
  1. package/README.md +154 -1
  2. package/dist/WhatsApp.d.ts +40 -2
  3. package/dist/WhatsApp.js +36 -1
  4. package/dist/WhatsApp.js.map +1 -1
  5. package/dist/index.d.ts +3 -1
  6. package/dist/index.js +5 -1
  7. package/dist/index.js.map +1 -1
  8. package/dist/services/CallService.d.ts +2 -0
  9. package/dist/services/CallService.js +14 -0
  10. package/dist/services/CallService.js.map +1 -1
  11. package/dist/services/ChatService.d.ts +4 -1
  12. package/dist/services/ChatService.js +27 -2
  13. package/dist/services/ChatService.js.map +1 -1
  14. package/dist/services/CommunityService.d.ts +8 -1
  15. package/dist/services/CommunityService.js +49 -0
  16. package/dist/services/CommunityService.js.map +1 -1
  17. package/dist/services/ContactService.d.ts +6 -0
  18. package/dist/services/ContactService.js +38 -0
  19. package/dist/services/ContactService.js.map +1 -1
  20. package/dist/services/GroupService.d.ts +5 -0
  21. package/dist/services/GroupService.js +13 -0
  22. package/dist/services/GroupService.js.map +1 -1
  23. package/dist/services/InstanceService.d.ts +1 -0
  24. package/dist/services/InstanceService.js +6 -0
  25. package/dist/services/InstanceService.js.map +1 -1
  26. package/dist/services/LabelService.d.ts +1 -0
  27. package/dist/services/LabelService.js +7 -1
  28. package/dist/services/LabelService.js.map +1 -1
  29. package/dist/services/MessageService.d.ts +10 -1
  30. package/dist/services/MessageService.js +65 -0
  31. package/dist/services/MessageService.js.map +1 -1
  32. package/dist/services/NewsletterService.d.ts +23 -0
  33. package/dist/services/NewsletterService.js +129 -0
  34. package/dist/services/NewsletterService.js.map +1 -0
  35. package/dist/services/StatusService.d.ts +14 -0
  36. package/dist/services/StatusService.js +46 -0
  37. package/dist/services/StatusService.js.map +1 -0
  38. package/dist/types/index.d.ts +53 -2
  39. package/dist/types/index.js +2 -0
  40. package/dist/types/index.js.map +1 -1
  41. package/package.json +2 -1
@@ -0,0 +1,129 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.NewsletterService = void 0;
4
+ const types_1 = require("../types");
5
+ class NewsletterService {
6
+ constructor(http) {
7
+ this.http = http;
8
+ }
9
+ async create(name, description) {
10
+ return this.http.request({
11
+ route: types_1.Routes.NEWSLETTER,
12
+ method: types_1.HttpMethod.POST,
13
+ body: { name, description },
14
+ });
15
+ }
16
+ async getMetadata(type, id) {
17
+ return this.http.request({
18
+ route: `${types_1.Routes.NEWSLETTER}/metadata`,
19
+ method: types_1.HttpMethod.GET,
20
+ params: { type, id },
21
+ });
22
+ }
23
+ async getSubscribers(id) {
24
+ return this.http.request({
25
+ route: `${types_1.Routes.NEWSLETTER}/${id}/subscribers`,
26
+ method: types_1.HttpMethod.GET,
27
+ });
28
+ }
29
+ async getAdmins(id) {
30
+ return this.http.request({
31
+ route: `${types_1.Routes.NEWSLETTER}/${id}/admins`,
32
+ method: types_1.HttpMethod.GET,
33
+ });
34
+ }
35
+ async follow(id) {
36
+ return this.http.request({
37
+ route: `${types_1.Routes.NEWSLETTER}/${id}/follow`,
38
+ method: types_1.HttpMethod.POST,
39
+ });
40
+ }
41
+ async unfollow(id) {
42
+ return this.http.request({
43
+ route: `${types_1.Routes.NEWSLETTER}/${id}/unfollow`,
44
+ method: types_1.HttpMethod.POST,
45
+ });
46
+ }
47
+ async updateName(id, name) {
48
+ return this.http.request({
49
+ route: `${types_1.Routes.NEWSLETTER}/${id}/name`,
50
+ method: types_1.HttpMethod.PUT,
51
+ body: { name },
52
+ });
53
+ }
54
+ async updateDescription(id, description) {
55
+ return this.http.request({
56
+ route: `${types_1.Routes.NEWSLETTER}/${id}/description`,
57
+ method: types_1.HttpMethod.PUT,
58
+ body: { description },
59
+ });
60
+ }
61
+ async updatePicture(id, url) {
62
+ return this.http.request({
63
+ route: `${types_1.Routes.NEWSLETTER}/${id}/picture`,
64
+ method: types_1.HttpMethod.PUT,
65
+ body: { url },
66
+ });
67
+ }
68
+ async removePicture(id) {
69
+ return this.http.request({
70
+ route: `${types_1.Routes.NEWSLETTER}/${id}/picture`,
71
+ method: types_1.HttpMethod.DELETE,
72
+ });
73
+ }
74
+ async transferOwnership(id, newOwnerJid) {
75
+ return this.http.request({
76
+ route: `${types_1.Routes.NEWSLETTER}/${id}/owner`,
77
+ method: types_1.HttpMethod.PUT,
78
+ body: { newOwnerJid },
79
+ });
80
+ }
81
+ async demoteAdmin(id, userJid) {
82
+ return this.http.request({
83
+ route: `${types_1.Routes.NEWSLETTER}/${id}/demote`,
84
+ method: types_1.HttpMethod.PUT,
85
+ body: { userJid },
86
+ });
87
+ }
88
+ async getMessages(id, count, since, after) {
89
+ const params = {};
90
+ if (count !== undefined)
91
+ params.count = count;
92
+ if (since !== undefined)
93
+ params.since = since;
94
+ if (after !== undefined)
95
+ params.after = after;
96
+ return this.http.request({
97
+ route: `${types_1.Routes.NEWSLETTER}/${id}/messages`,
98
+ method: types_1.HttpMethod.GET,
99
+ params,
100
+ });
101
+ }
102
+ async react(id, serverId, reaction) {
103
+ return this.http.request({
104
+ route: `${types_1.Routes.NEWSLETTER}/${id}/react`,
105
+ method: types_1.HttpMethod.POST,
106
+ body: { serverId, reaction },
107
+ });
108
+ }
109
+ async mute(id) {
110
+ return this.http.request({
111
+ route: `${types_1.Routes.NEWSLETTER}/${id}/mute`,
112
+ method: types_1.HttpMethod.POST,
113
+ });
114
+ }
115
+ async unmute(id) {
116
+ return this.http.request({
117
+ route: `${types_1.Routes.NEWSLETTER}/${id}/unmute`,
118
+ method: types_1.HttpMethod.POST,
119
+ });
120
+ }
121
+ async delete(id) {
122
+ return this.http.request({
123
+ route: `${types_1.Routes.NEWSLETTER}/${id}`,
124
+ method: types_1.HttpMethod.DELETE,
125
+ });
126
+ }
127
+ }
128
+ exports.NewsletterService = NewsletterService;
129
+ //# sourceMappingURL=NewsletterService.js.map
@@ -0,0 +1 @@
1
+ {"version":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,UAAU,IAAI,EAAE,QAAQ;YACzC,MAAM,EAAE,kBAAU,CAAC,IAAI;YACvB,IAAI,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE;SAC7B,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,EAAU;QACnB,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAc;YACpC,KAAK,EAAE,GAAG,cAAM,CAAC,UAAU,IAAI,EAAE,OAAO;YACxC,MAAM,EAAE,kBAAU,CAAC,IAAI;SACxB,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,EAAU;QACrB,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAc;YACpC,KAAK,EAAE,GAAG,cAAM,CAAC,UAAU,IAAI,EAAE,SAAS;YAC1C,MAAM,EAAE,kBAAU,CAAC,IAAI;SACxB,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,EAAU;QACrB,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAc;YACpC,KAAK,EAAE,GAAG,cAAM,CAAC,UAAU,IAAI,EAAE,EAAE;YACnC,MAAM,EAAE,kBAAU,CAAC,MAAM;SAC1B,CAAC,CAAC;IACL,CAAC;CACF;AAtID,8CAsIC","sourcesContent":["import { IHttpClient } from '../client/IHttpClient';\nimport { Routes, HttpMethod, ApiResponse, NewsletterInfo } from '../types';\n\nexport class NewsletterService {\n constructor(private readonly http: IHttpClient) {}\n\n async create(name: string, description?: string): Promise<ApiResponse> {\n return this.http.request<ApiResponse>({\n route: Routes.NEWSLETTER,\n method: HttpMethod.POST,\n body: { name, description },\n });\n }\n\n async getMetadata(type: string, id: string): Promise<ApiResponse> {\n return this.http.request<ApiResponse>({\n route: `${Routes.NEWSLETTER}/metadata`,\n method: HttpMethod.GET,\n params: { type, id },\n });\n }\n\n async getSubscribers(id: string): Promise<ApiResponse> {\n return this.http.request<ApiResponse>({\n route: `${Routes.NEWSLETTER}/${id}/subscribers`,\n method: HttpMethod.GET,\n });\n }\n\n async getAdmins(id: string): Promise<ApiResponse> {\n return this.http.request<ApiResponse>({\n route: `${Routes.NEWSLETTER}/${id}/admins`,\n method: HttpMethod.GET,\n });\n }\n\n async follow(id: string): Promise<ApiResponse> {\n return this.http.request<ApiResponse>({\n route: `${Routes.NEWSLETTER}/${id}/follow`,\n method: HttpMethod.POST,\n });\n }\n\n async unfollow(id: string): Promise<ApiResponse> {\n return this.http.request<ApiResponse>({\n route: `${Routes.NEWSLETTER}/${id}/unfollow`,\n method: HttpMethod.POST,\n });\n }\n\n async updateName(id: string, name: string): Promise<ApiResponse> {\n return this.http.request<ApiResponse>({\n route: `${Routes.NEWSLETTER}/${id}/name`,\n method: HttpMethod.PUT,\n body: { name },\n });\n }\n\n async updateDescription(id: string, description: string): Promise<ApiResponse> {\n return this.http.request<ApiResponse>({\n route: `${Routes.NEWSLETTER}/${id}/description`,\n method: HttpMethod.PUT,\n body: { description },\n });\n }\n\n async updatePicture(id: string, url: string): Promise<ApiResponse> {\n return this.http.request<ApiResponse>({\n route: `${Routes.NEWSLETTER}/${id}/picture`,\n method: HttpMethod.PUT,\n body: { url },\n });\n }\n\n async removePicture(id: string): Promise<ApiResponse> {\n return this.http.request<ApiResponse>({\n route: `${Routes.NEWSLETTER}/${id}/picture`,\n method: HttpMethod.DELETE,\n });\n }\n\n async transferOwnership(id: string, newOwnerJid: string): Promise<ApiResponse> {\n return this.http.request<ApiResponse>({\n route: `${Routes.NEWSLETTER}/${id}/owner`,\n method: HttpMethod.PUT,\n body: { newOwnerJid },\n });\n }\n\n async demoteAdmin(id: string, userJid: string): Promise<ApiResponse> {\n return this.http.request<ApiResponse>({\n route: `${Routes.NEWSLETTER}/${id}/demote`,\n method: HttpMethod.PUT,\n body: { userJid },\n });\n }\n\n async getMessages(id: string, count?: number, since?: number, after?: number): Promise<ApiResponse> {\n const params: Record<string, number> = {};\n if (count !== undefined) params.count = count;\n if (since !== undefined) params.since = since;\n if (after !== undefined) params.after = after;\n return this.http.request<ApiResponse>({\n route: `${Routes.NEWSLETTER}/${id}/messages`,\n method: HttpMethod.GET,\n params,\n });\n }\n\n async react(id: string, serverId: string, reaction: string): Promise<ApiResponse> {\n return this.http.request<ApiResponse>({\n route: `${Routes.NEWSLETTER}/${id}/react`,\n method: HttpMethod.POST,\n body: { serverId, reaction },\n });\n }\n\n async mute(id: string): Promise<ApiResponse> {\n return this.http.request<ApiResponse>({\n route: `${Routes.NEWSLETTER}/${id}/mute`,\n method: HttpMethod.POST,\n });\n }\n\n async unmute(id: string): Promise<ApiResponse> {\n return this.http.request<ApiResponse>({\n route: `${Routes.NEWSLETTER}/${id}/unmute`,\n method: HttpMethod.POST,\n });\n }\n\n async delete(id: string): Promise<ApiResponse> {\n return this.http.request<ApiResponse>({\n route: `${Routes.NEWSLETTER}/${id}`,\n method: HttpMethod.DELETE,\n });\n }\n}\n"]}
@@ -0,0 +1,14 @@
1
+ import { IHttpClient } from '../client/IHttpClient';
2
+ import { ApiResponse, StatusTextData, StatusMediaData, StatusMentionData } from '../types';
3
+ export declare class StatusService {
4
+ private readonly http;
5
+ constructor(http: IHttpClient);
6
+ sendText(data: StatusTextData): Promise<ApiResponse>;
7
+ sendImage(data: StatusMediaData): Promise<ApiResponse>;
8
+ sendVideo(data: StatusMediaData): Promise<ApiResponse>;
9
+ sendAudio(data: {
10
+ url: string;
11
+ statusJidList?: string[];
12
+ }): Promise<ApiResponse>;
13
+ mention(data: StatusMentionData): Promise<ApiResponse>;
14
+ }
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.StatusService = void 0;
4
+ const types_1 = require("../types");
5
+ class StatusService {
6
+ constructor(http) {
7
+ this.http = http;
8
+ }
9
+ async sendText(data) {
10
+ return this.http.request({
11
+ route: `${types_1.Routes.STATUS}/text`,
12
+ method: types_1.HttpMethod.POST,
13
+ body: data,
14
+ });
15
+ }
16
+ async sendImage(data) {
17
+ return this.http.request({
18
+ route: `${types_1.Routes.STATUS}/image`,
19
+ method: types_1.HttpMethod.POST,
20
+ body: data,
21
+ });
22
+ }
23
+ async sendVideo(data) {
24
+ return this.http.request({
25
+ route: `${types_1.Routes.STATUS}/video`,
26
+ method: types_1.HttpMethod.POST,
27
+ body: data,
28
+ });
29
+ }
30
+ async sendAudio(data) {
31
+ return this.http.request({
32
+ route: `${types_1.Routes.STATUS}/audio`,
33
+ method: types_1.HttpMethod.POST,
34
+ body: data,
35
+ });
36
+ }
37
+ async mention(data) {
38
+ return this.http.request({
39
+ route: `${types_1.Routes.STATUS}/mention`,
40
+ method: types_1.HttpMethod.POST,
41
+ body: data,
42
+ });
43
+ }
44
+ }
45
+ exports.StatusService = StatusService;
46
+ //# sourceMappingURL=StatusService.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StatusService.js","sourceRoot":"","sources":["../../src/services/StatusService.ts"],"names":[],"mappings":";;;AACA,oCAA+G;AAE/G,MAAa,aAAa;IACxB,YAA6B,IAAiB;QAAjB,SAAI,GAAJ,IAAI,CAAa;IAAG,CAAC;IAElD,KAAK,CAAC,QAAQ,CAAC,IAAoB;QACjC,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAc;YACpC,KAAK,EAAE,GAAG,cAAM,CAAC,MAAM,OAAO;YAC9B,MAAM,EAAE,kBAAU,CAAC,IAAI;YACvB,IAAI,EAAE,IAAI;SACX,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,SAAS,CAAC,IAAqB;QACnC,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAc;YACpC,KAAK,EAAE,GAAG,cAAM,CAAC,MAAM,QAAQ;YAC/B,MAAM,EAAE,kBAAU,CAAC,IAAI;YACvB,IAAI,EAAE,IAAI;SACX,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,SAAS,CAAC,IAAqB;QACnC,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAc;YACpC,KAAK,EAAE,GAAG,cAAM,CAAC,MAAM,QAAQ;YAC/B,MAAM,EAAE,kBAAU,CAAC,IAAI;YACvB,IAAI,EAAE,IAAI;SACX,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,SAAS,CAAC,IAA+C;QAC7D,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAc;YACpC,KAAK,EAAE,GAAG,cAAM,CAAC,MAAM,QAAQ;YAC/B,MAAM,EAAE,kBAAU,CAAC,IAAI;YACvB,IAAI,EAAE,IAAI;SACX,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,OAAO,CAAC,IAAuB;QACnC,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAc;YACpC,KAAK,EAAE,GAAG,cAAM,CAAC,MAAM,UAAU;YACjC,MAAM,EAAE,kBAAU,CAAC,IAAI;YACvB,IAAI,EAAE,IAAI;SACX,CAAC,CAAC;IACL,CAAC;CACF;AA1CD,sCA0CC","sourcesContent":["import { IHttpClient } from '../client/IHttpClient';\nimport { Routes, HttpMethod, ApiResponse, StatusTextData, StatusMediaData, StatusMentionData } from '../types';\n\nexport class StatusService {\n constructor(private readonly http: IHttpClient) {}\n\n async sendText(data: StatusTextData): Promise<ApiResponse> {\n return this.http.request<ApiResponse>({\n route: `${Routes.STATUS}/text`,\n method: HttpMethod.POST,\n body: data,\n });\n }\n\n async sendImage(data: StatusMediaData): Promise<ApiResponse> {\n return this.http.request<ApiResponse>({\n route: `${Routes.STATUS}/image`,\n method: HttpMethod.POST,\n body: data,\n });\n }\n\n async sendVideo(data: StatusMediaData): Promise<ApiResponse> {\n return this.http.request<ApiResponse>({\n route: `${Routes.STATUS}/video`,\n method: HttpMethod.POST,\n body: data,\n });\n }\n\n async sendAudio(data: { url: string; statusJidList?: string[] }): Promise<ApiResponse> {\n return this.http.request<ApiResponse>({\n route: `${Routes.STATUS}/audio`,\n method: HttpMethod.POST,\n body: data,\n });\n }\n\n async mention(data: StatusMentionData): Promise<ApiResponse> {\n return this.http.request<ApiResponse>({\n route: `${Routes.STATUS}/mention`,\n method: HttpMethod.POST,\n body: data,\n });\n }\n}\n"]}
@@ -19,7 +19,9 @@ export declare enum Routes {
19
19
  CHAT = "chat",
20
20
  LABELS = "labels",
21
21
  COMMUNITY = "community",
22
- BUSINESS = "business"
22
+ BUSINESS = "business",
23
+ NEWSLETTER = "newsletter",
24
+ STATUS = "status"
23
25
  }
24
26
  export declare enum TypeMessage {
25
27
  PRESENCE = "presence",
@@ -215,7 +217,6 @@ export interface GroupParticipantsAction {
215
217
  export interface MobileRegisterData {
216
218
  phoneNumberCountryCode: string;
217
219
  phoneNumberNationalNumber: string;
218
- phoneNumberMobileCountryCode: string;
219
220
  phoneNumberMobileNetworkCode: string;
220
221
  }
221
222
  export interface EventData {
@@ -294,3 +295,53 @@ export interface CallResponse {
294
295
  status: number;
295
296
  data: Record<string, unknown>;
296
297
  }
298
+ export interface LiveLocationData {
299
+ to: string;
300
+ latitude: number;
301
+ longitude: number;
302
+ caption?: string;
303
+ }
304
+ export interface SendContactsData {
305
+ to: string;
306
+ displayName: string;
307
+ contacts: Contact[];
308
+ }
309
+ export interface ProductMessageData {
310
+ to: string;
311
+ businessOwnerJid: string;
312
+ productId: string;
313
+ catalogId: string;
314
+ body?: string;
315
+ footer?: string;
316
+ }
317
+ export interface GroupInviteMessageData {
318
+ to: string;
319
+ groupJid: string;
320
+ groupName: string;
321
+ inviteCode: string;
322
+ inviteExpiration?: number;
323
+ caption?: string;
324
+ }
325
+ export interface StatusTextData {
326
+ text: string;
327
+ statusJidList?: string[];
328
+ }
329
+ export interface StatusMediaData {
330
+ url: string;
331
+ caption?: string;
332
+ statusJidList?: string[];
333
+ }
334
+ export interface StatusMentionData {
335
+ jid: string;
336
+ statusMsgId: string;
337
+ }
338
+ export interface NewsletterInfo {
339
+ id: string;
340
+ name?: string;
341
+ description?: string;
342
+ subscribers?: number;
343
+ }
344
+ export interface CommunityGroupCreate {
345
+ subject: string;
346
+ participants?: string[];
347
+ }
@@ -21,6 +21,8 @@ var Routes;
21
21
  Routes["LABELS"] = "labels";
22
22
  Routes["COMMUNITY"] = "community";
23
23
  Routes["BUSINESS"] = "business";
24
+ Routes["NEWSLETTER"] = "newsletter";
25
+ Routes["STATUS"] = "status";
24
26
  })(Routes || (exports.Routes = Routes = {}));
25
27
  var TypeMessage;
26
28
  (function (TypeMessage) {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":";;;AAKA,IAAY,UAMX;AAND,WAAY,UAAU;IACpB,yBAAW,CAAA;IACX,2BAAa,CAAA;IACb,yBAAW,CAAA;IACX,+BAAiB,CAAA;IACjB,6BAAe,CAAA;AACjB,CAAC,EANW,UAAU,0BAAV,UAAU,QAMrB;AAGD,IAAY,MAWX;AAXD,WAAY,MAAM;IAChB,gCAAsB,CAAA;IACtB,8BAAoB,CAAA;IACpB,+BAAqB,CAAA;IACrB,2BAAiB,CAAA;IACjB,6BAAmB,CAAA;IACnB,uBAAa,CAAA;IACb,uBAAa,CAAA;IACb,2BAAiB,CAAA;IACjB,iCAAuB,CAAA;IACvB,+BAAqB,CAAA;AACvB,CAAC,EAXW,MAAM,sBAAN,MAAM,QAWjB;AAGD,IAAY,WAuBX;AAvBD,WAAY,WAAW;IACrB,oCAAqB,CAAA;IACrB,4BAAa,CAAA;IACb,8BAAe,CAAA;IACf,8BAAe,CAAA;IACf,8BAAe,CAAA;IACf,oCAAqB,CAAA;IACrB,kCAAmB,CAAA;IACnB,oCAAqB,CAAA;IACrB,oCAAqB,CAAA;IACrB,4BAAa,CAAA;IACb,8BAAe,CAAA;IACf,4CAA6B,CAAA;IAC7B,8CAA+B,CAAA;IAC/B,iCAAkB,CAAA;IAClB,8BAAe,CAAA;IACf,4BAAa,CAAA;IACb,kCAAmB,CAAA;IACnB,wCAAyB,CAAA;IACzB,+BAAgB,CAAA;IAChB,8BAAe,CAAA;IACf,0BAAW,CAAA;IACX,sCAAuB,CAAA;AACzB,CAAC,EAvBW,WAAW,2BAAX,WAAW,QAuBtB;AAGD,IAAY,cAMX;AAND,WAAY,cAAc;IACxB,6CAA2B,CAAA;IAC3B,yCAAuB,CAAA;IACvB,yCAAuB,CAAA;IACvB,yCAAuB,CAAA;IACvB,mCAAiB,CAAA;AACnB,CAAC,EANW,cAAc,8BAAd,cAAc,QAMzB","sourcesContent":["export interface Init {\n server: string;\n key: string;\n}\n\nexport enum HttpMethod {\n GET = 'GET',\n POST = 'POST',\n PUT = 'PUT',\n DELETE = 'DELETE',\n PATCH = 'PATCH',\n}\n\n\nexport enum Routes {\n INSTANCES = 'instance',\n MESSAGES = 'message',\n CONTACTS = 'contacts',\n GROUPS = 'groups',\n ACTIONS = 'actions',\n CALL = 'call',\n CHAT = 'chat',\n LABELS = 'labels',\n COMMUNITY = 'community',\n BUSINESS = 'business',\n}\n\n\nexport enum TypeMessage {\n PRESENCE = 'presence',\n TEXT = 'text',\n AUDIO = 'audio',\n IMAGE = 'image',\n VIDEO = 'video',\n DOCUMENT = 'document',\n CONTACT = 'contact',\n LOCATION = 'location',\n REACTION = 'reaction',\n LINK = 'link',\n TITLE = 'title',\n BUTTON_REPLY = 'button_reply',\n BUTTON_ACTION = 'button_action',\n BUTTON_PIX = 'pix',\n POLL = 'survey',\n MENU = 'list',\n STICKER = 'sticker',\n VIDEO_NOTE = 'video-note',\n POLL_V2 = 'poll',\n EVENT = 'event',\n PIN = 'pin',\n CALL_LINK = 'call-link',\n}\n\n\nexport enum StatusPresence {\n UNAVAILABLE = 'unavailable',\n AVAILABLE = 'available',\n COMPOSING = 'composing',\n RECORDING = 'recording',\n PAUSED = 'paused',\n}\n\n\nexport interface ApiResponse {\n status: number;\n message: string;\n}\n\n\nexport interface WebhookBody {\n allowWebhook: boolean;\n allowNumber?: string;\n webhookMessage: string;\n webhookGroup: string;\n webhookConnection: string;\n webhookQrCode: string;\n webhookMessageFromMe: string;\n webhookHistory: string;\n}\n\nexport interface Contact {\n fullName: string;\n phoneNumber: string;\n organization?: string;\n}\n\n\nexport interface Location {\n latitude: number;\n longitude: number;\n address: string;\n}\n\nexport interface Row {\n title: string;\n description: string;\n rowId: string;\n}\n\nexport interface Section {\n title: string;\n rows: Row[];\n}\n\n\n\nexport interface InfoInstance {\n status: number;\n instance: Instance;\n}\n\nexport interface Instance {\n receive_status_message: boolean;\n save_media: boolean;\n receive_presence: boolean;\n permission: number;\n mark_messages: boolean;\n blocked: boolean;\n user?: User;\n phoneConnected: boolean;\n webhook: Webhook;\n businessProfile?: BusinessProfile;\n}\n\nexport interface User {\n id?: string;\n lid?: string;\n name?: string;\n imageProfile?: string;\n}\n\nexport interface Webhook {\n allowWebhook: boolean;\n allowNumber?: string;\n webhookMessage: string;\n webhookGroup: string;\n webhookConnection: string;\n webhookQrCode: string;\n webhookMessageFromMe: string;\n webhookHistory: string;\n}\n\n\n\nexport interface SendMessageRoot {\n status: number;\n data: MessageData;\n}\n\nexport interface MessageData {\n key: MessageKey;\n message: MessageContent;\n messageTimestamp: string;\n status: string;\n}\n\nexport interface MessageKey {\n remoteJid: string;\n fromMe: boolean;\n id: string;\n}\n\nexport interface MessageContent {\n extendedTextMessage?: ExtendedTextMessage;\n}\n\nexport interface ExtendedTextMessage {\n text: string;\n}\n\nexport interface Connect {\n status: number;\n phoneConnected: boolean;\n qrcode: string;\n image: string;\n user?: User;\n}\n\n\nexport interface PairingCodeResponse {\n status: number;\n code: string;\n}\n\n\nexport interface BusinessProfile {\n wid: string;\n description: string;\n website: string[];\n category: string;\n business_hours: Record<string, unknown>;\n}\n\n\n\nexport interface Buttons {\n type: \"quick_reply\" | \"cta_copy\" | \"cta_url\" | \"cta_call\";\n copy_code?: string;\n phone_number?: string;\n url?: string;\n id?: string;\n text: string;\n}\n\n\nexport interface Items {\n id: string;\n name: string;\n price: number;\n quantity: number;\n}\n\n\nexport interface HeaderMedia {\n title?: string;\n hasMediaAttachment?: boolean;\n imageMessage?: { url: string };\n videoMessage?: { url: string };\n documentMessage?: { url: string; mimetype?: string; fileName?: string };\n}\n\n\nexport interface DownloadableMessage {\n mediaKey: string;\n directPath: string;\n url: string;\n}\n\n\nexport interface Product {\n name: string;\n description?: string;\n originCountryCode?: string;\n currency?: string;\n price?: number;\n images?: { url: string }[];\n}\n\n\nexport interface CommunityCreate {\n name: string;\n subject: string;\n}\n\nexport interface CommunityUpdate {\n subject: string;\n description: string;\n}\n\n\nexport interface GroupParticipantsAction {\n participants: string[];\n action: 'reject' | 'approve';\n}\n\n\nexport interface MobileRegisterData {\n phoneNumberCountryCode: string;\n phoneNumberNationalNumber: string;\n phoneNumberMobileCountryCode: string;\n phoneNumberMobileNetworkCode: string;\n}\n\n\nexport interface EventData {\n to: string;\n name: string;\n description?: string;\n startTime?: string;\n locationName?: string;\n locationAddress?: string;\n}\n\n\nexport interface RegisteredResponse {\n status: number;\n registered: boolean;\n}\n\n\nexport interface ContactInfo {\n id: string;\n name?: string;\n notify?: string;\n imgUrl?: string;\n}\n\n\nexport interface GroupInfo {\n id: string;\n subject: string;\n owner: string;\n creation: number;\n desc?: string;\n participants: GroupParticipant[];\n}\n\nexport interface GroupParticipant {\n id: string;\n admin?: string;\n}\n\n\nexport interface InviteCodeResponse {\n status: number;\n inviteCode: string;\n}\n\n\nexport interface ChatInfo {\n id: string;\n name?: string;\n timestamp?: number;\n unreadCount?: number;\n}\n\n\nexport interface LabelInfo {\n id: string;\n name: string;\n color?: number;\n}\n\n\nexport interface CommunityInfo {\n id: string;\n name: string;\n subject?: string;\n description?: string;\n participants?: GroupParticipant[];\n}\n\n\nexport interface CatalogResponse {\n status: number;\n data: Product[];\n cursor?: string;\n}\n\n\nexport interface WebhookStatistics {\n status: number;\n data: Record<string, unknown>;\n}\n\n\nexport interface ListMessagesResponse {\n status: number;\n data: MessageData[];\n page?: number;\n limit?: number;\n total?: number;\n}\n\n\nexport interface DownloadMediaResponse {\n status: number;\n data: string;\n}\n\n\nexport interface CallResponse {\n status: number;\n data: Record<string, unknown>;\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":";;;AAKA,IAAY,UAMX;AAND,WAAY,UAAU;IACpB,yBAAW,CAAA;IACX,2BAAa,CAAA;IACb,yBAAW,CAAA;IACX,+BAAiB,CAAA;IACjB,6BAAe,CAAA;AACjB,CAAC,EANW,UAAU,0BAAV,UAAU,QAMrB;AAGD,IAAY,MAaX;AAbD,WAAY,MAAM;IAChB,gCAAsB,CAAA;IACtB,8BAAoB,CAAA;IACpB,+BAAqB,CAAA;IACrB,2BAAiB,CAAA;IACjB,6BAAmB,CAAA;IACnB,uBAAa,CAAA;IACb,uBAAa,CAAA;IACb,2BAAiB,CAAA;IACjB,iCAAuB,CAAA;IACvB,+BAAqB,CAAA;IACrB,mCAAyB,CAAA;IACzB,2BAAiB,CAAA;AACnB,CAAC,EAbW,MAAM,sBAAN,MAAM,QAajB;AAGD,IAAY,WAuBX;AAvBD,WAAY,WAAW;IACrB,oCAAqB,CAAA;IACrB,4BAAa,CAAA;IACb,8BAAe,CAAA;IACf,8BAAe,CAAA;IACf,8BAAe,CAAA;IACf,oCAAqB,CAAA;IACrB,kCAAmB,CAAA;IACnB,oCAAqB,CAAA;IACrB,oCAAqB,CAAA;IACrB,4BAAa,CAAA;IACb,8BAAe,CAAA;IACf,4CAA6B,CAAA;IAC7B,8CAA+B,CAAA;IAC/B,iCAAkB,CAAA;IAClB,8BAAe,CAAA;IACf,4BAAa,CAAA;IACb,kCAAmB,CAAA;IACnB,wCAAyB,CAAA;IACzB,+BAAgB,CAAA;IAChB,8BAAe,CAAA;IACf,0BAAW,CAAA;IACX,sCAAuB,CAAA;AACzB,CAAC,EAvBW,WAAW,2BAAX,WAAW,QAuBtB;AAGD,IAAY,cAMX;AAND,WAAY,cAAc;IACxB,6CAA2B,CAAA;IAC3B,yCAAuB,CAAA;IACvB,yCAAuB,CAAA;IACvB,yCAAuB,CAAA;IACvB,mCAAiB,CAAA;AACnB,CAAC,EANW,cAAc,8BAAd,cAAc,QAMzB","sourcesContent":["export interface Init {\n server: string;\n key: string;\n}\n\nexport enum HttpMethod {\n GET = 'GET',\n POST = 'POST',\n PUT = 'PUT',\n DELETE = 'DELETE',\n PATCH = 'PATCH',\n}\n\n\nexport enum Routes {\n INSTANCES = 'instance',\n MESSAGES = 'message',\n CONTACTS = 'contacts',\n GROUPS = 'groups',\n ACTIONS = 'actions',\n CALL = 'call',\n CHAT = 'chat',\n LABELS = 'labels',\n COMMUNITY = 'community',\n BUSINESS = 'business',\n NEWSLETTER = 'newsletter',\n STATUS = 'status',\n}\n\n\nexport enum TypeMessage {\n PRESENCE = 'presence',\n TEXT = 'text',\n AUDIO = 'audio',\n IMAGE = 'image',\n VIDEO = 'video',\n DOCUMENT = 'document',\n CONTACT = 'contact',\n LOCATION = 'location',\n REACTION = 'reaction',\n LINK = 'link',\n TITLE = 'title',\n BUTTON_REPLY = 'button_reply',\n BUTTON_ACTION = 'button_action',\n BUTTON_PIX = 'pix',\n POLL = 'survey',\n MENU = 'list',\n STICKER = 'sticker',\n VIDEO_NOTE = 'video-note',\n POLL_V2 = 'poll',\n EVENT = 'event',\n PIN = 'pin',\n CALL_LINK = 'call-link',\n}\n\n\nexport enum StatusPresence {\n UNAVAILABLE = 'unavailable',\n AVAILABLE = 'available',\n COMPOSING = 'composing',\n RECORDING = 'recording',\n PAUSED = 'paused',\n}\n\n\nexport interface ApiResponse {\n status: number;\n message: string;\n}\n\n\nexport interface WebhookBody {\n allowWebhook: boolean;\n allowNumber?: string;\n webhookMessage: string;\n webhookGroup: string;\n webhookConnection: string;\n webhookQrCode: string;\n webhookMessageFromMe: string;\n webhookHistory: string;\n}\n\nexport interface Contact {\n fullName: string;\n phoneNumber: string;\n organization?: string;\n}\n\n\nexport interface Location {\n latitude: number;\n longitude: number;\n address: string;\n}\n\nexport interface Row {\n title: string;\n description: string;\n rowId: string;\n}\n\nexport interface Section {\n title: string;\n rows: Row[];\n}\n\n\n\nexport interface InfoInstance {\n status: number;\n instance: Instance;\n}\n\nexport interface Instance {\n receive_status_message: boolean;\n save_media: boolean;\n receive_presence: boolean;\n permission: number;\n mark_messages: boolean;\n blocked: boolean;\n user?: User;\n phoneConnected: boolean;\n webhook: Webhook;\n businessProfile?: BusinessProfile;\n}\n\nexport interface User {\n id?: string;\n lid?: string;\n name?: string;\n imageProfile?: string;\n}\n\nexport interface Webhook {\n allowWebhook: boolean;\n allowNumber?: string;\n webhookMessage: string;\n webhookGroup: string;\n webhookConnection: string;\n webhookQrCode: string;\n webhookMessageFromMe: string;\n webhookHistory: string;\n}\n\n\n\nexport interface SendMessageRoot {\n status: number;\n data: MessageData;\n}\n\nexport interface MessageData {\n key: MessageKey;\n message: MessageContent;\n messageTimestamp: string;\n status: string;\n}\n\nexport interface MessageKey {\n remoteJid: string;\n fromMe: boolean;\n id: string;\n}\n\nexport interface MessageContent {\n extendedTextMessage?: ExtendedTextMessage;\n}\n\nexport interface ExtendedTextMessage {\n text: string;\n}\n\nexport interface Connect {\n status: number;\n phoneConnected: boolean;\n qrcode: string;\n image: string;\n user?: User;\n}\n\n\nexport interface PairingCodeResponse {\n status: number;\n code: string;\n}\n\n\nexport interface BusinessProfile {\n wid: string;\n description: string;\n website: string[];\n category: string;\n business_hours: Record<string, unknown>;\n}\n\n\n\nexport interface Buttons {\n type: \"quick_reply\" | \"cta_copy\" | \"cta_url\" | \"cta_call\";\n copy_code?: string;\n phone_number?: string;\n url?: string;\n id?: string;\n text: string;\n}\n\n\nexport interface Items {\n id: string;\n name: string;\n price: number;\n quantity: number;\n}\n\n\nexport interface HeaderMedia {\n title?: string;\n hasMediaAttachment?: boolean;\n imageMessage?: { url: string };\n videoMessage?: { url: string };\n documentMessage?: { url: string; mimetype?: string; fileName?: string };\n}\n\n\nexport interface DownloadableMessage {\n mediaKey: string;\n directPath: string;\n url: string;\n}\n\n\nexport interface Product {\n name: string;\n description?: string;\n originCountryCode?: string;\n currency?: string;\n price?: number;\n images?: { url: string }[];\n}\n\n\nexport interface CommunityCreate {\n name: string;\n subject: string;\n}\n\nexport interface CommunityUpdate {\n subject: string;\n description: string;\n}\n\n\nexport interface GroupParticipantsAction {\n participants: string[];\n action: 'reject' | 'approve';\n}\n\n\nexport interface MobileRegisterData {\n phoneNumberCountryCode: string;\n phoneNumberNationalNumber: string;\n phoneNumberMobileNetworkCode: string;\n}\n\n\nexport interface EventData {\n to: string;\n name: string;\n description?: string;\n startTime?: string;\n locationName?: string;\n locationAddress?: string;\n}\n\n\nexport interface RegisteredResponse {\n status: number;\n registered: boolean;\n}\n\n\nexport interface ContactInfo {\n id: string;\n name?: string;\n notify?: string;\n imgUrl?: string;\n}\n\n\nexport interface GroupInfo {\n id: string;\n subject: string;\n owner: string;\n creation: number;\n desc?: string;\n participants: GroupParticipant[];\n}\n\nexport interface GroupParticipant {\n id: string;\n admin?: string;\n}\n\n\nexport interface InviteCodeResponse {\n status: number;\n inviteCode: string;\n}\n\n\nexport interface ChatInfo {\n id: string;\n name?: string;\n timestamp?: number;\n unreadCount?: number;\n}\n\n\nexport interface LabelInfo {\n id: string;\n name: string;\n color?: number;\n}\n\n\nexport interface CommunityInfo {\n id: string;\n name: string;\n subject?: string;\n description?: string;\n participants?: GroupParticipant[];\n}\n\n\nexport interface CatalogResponse {\n status: number;\n data: Product[];\n cursor?: string;\n}\n\n\nexport interface WebhookStatistics {\n status: number;\n data: Record<string, unknown>;\n}\n\n\nexport interface ListMessagesResponse {\n status: number;\n data: MessageData[];\n page?: number;\n limit?: number;\n total?: number;\n}\n\n\nexport interface DownloadMediaResponse {\n status: number;\n data: string;\n}\n\n\nexport interface CallResponse {\n status: number;\n data: Record<string, unknown>;\n}\n\n\nexport interface LiveLocationData {\n to: string;\n latitude: number;\n longitude: number;\n caption?: string;\n}\n\n\nexport interface SendContactsData {\n to: string;\n displayName: string;\n contacts: Contact[];\n}\n\n\nexport interface ProductMessageData {\n to: string;\n businessOwnerJid: string;\n productId: string;\n catalogId: string;\n body?: string;\n footer?: string;\n}\n\n\nexport interface GroupInviteMessageData {\n to: string;\n groupJid: string;\n groupName: string;\n inviteCode: string;\n inviteExpiration?: number;\n caption?: string;\n}\n\n\nexport interface StatusTextData {\n text: string;\n statusJidList?: string[];\n}\n\n\nexport interface StatusMediaData {\n url: string;\n caption?: string;\n statusJidList?: string[];\n}\n\n\nexport interface StatusMentionData {\n jid: string;\n statusMsgId: string;\n}\n\n\nexport interface NewsletterInfo {\n id: string;\n name?: string;\n description?: string;\n subscribers?: number;\n}\n\n\nexport interface CommunityGroupCreate {\n subject: string;\n participants?: string[];\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@raphaelvserafim/client-api-whatsapp",
3
- "version": "1.2.0",
3
+ "version": "1.4.0",
4
4
  "description": "With our API, you can send text, audio, video, and image messages quickly and easily. Adapt to your business communication needs comprehensively.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -21,6 +21,7 @@
21
21
  "scripts": {
22
22
  "build": "tsc --project tsconfig.compile.json",
23
23
  "test": "echo \"Error: no test specified\" && exit 1",
24
+ "generate:llms": "node scripts/generate-llms-txt.js",
24
25
  "deploy": "npm run build && npm publish --access=public"
25
26
  },
26
27
  "author": "Raphael Serafim <raphaelvserafim@gmail.com>",