@green-api/greenapi-integration 0.7.1 → 0.7.2

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.
@@ -97,7 +97,7 @@ export interface QueueMessage {
97
97
  export interface ClearMessagesQueue {
98
98
  isCleared: boolean;
99
99
  }
100
- export type MessageType = "textMessage" | "extendedTextMessage" | "imageMessage" | "videoMessage" | "documentMessage" | "audioMessage" | "contactMessage" | "locationMessage" | "contactsArrayMessage" | "pollMessage" | "reactionMessage" | "pollUpdateMessage" | "quotedMessage" | "stickerMessage" | "editedMessage" | "deletedMessage" | "buttonsMessage" | "listMessage" | "templateMessage" | "groupInviteMessage";
100
+ export type MessageType = "textMessage" | "extendedTextMessage" | "imageMessage" | "videoMessage" | "documentMessage" | "audioMessage" | "contactMessage" | "locationMessage" | "contactsArrayMessage" | "pollMessage" | "reactionMessage" | "pollUpdateMessage" | "quotedMessage" | "stickerMessage" | "editedMessage" | "deletedMessage" | "buttonsMessage" | "listMessage" | "templateMessage" | "groupInviteMessage" | "interactiveButtons" | "interactiveButtonsReply" | "templateButtonsReplyMessage";
101
101
  export interface GetMessage {
102
102
  chatId: string;
103
103
  idMessage: string;
@@ -212,6 +212,37 @@ export interface TemplateMessageData extends ForwardableMessage {
212
212
  footer?: string;
213
213
  buttons: TemplateButtonData[];
214
214
  }
215
+ export interface InteractiveButtonData {
216
+ type: "copy" | "call" | "url";
217
+ buttonId: string;
218
+ buttonText: string;
219
+ copyCode?: string;
220
+ phoneNumber?: string;
221
+ url?: string;
222
+ }
223
+ export interface InteractiveButtonsData extends ForwardableMessage {
224
+ titleText?: string;
225
+ contentText: string;
226
+ footerText?: string;
227
+ buttons: InteractiveButtonData[];
228
+ }
229
+ export interface InteractiveReplyButtonData {
230
+ type: "reply";
231
+ buttonId: string;
232
+ buttonText: string;
233
+ }
234
+ export interface InteractiveButtonsReplyData extends ForwardableMessage {
235
+ titleText?: string;
236
+ contentText: string;
237
+ footerText?: string;
238
+ buttons: InteractiveReplyButtonData[];
239
+ }
240
+ export interface TemplateButtonsReplyMessageData {
241
+ stanzaId: string;
242
+ selectedIndex: number;
243
+ selectedId: string;
244
+ selectedDisplayText: string;
245
+ }
215
246
  export interface GroupInviteMessageData {
216
247
  groupJid: string;
217
248
  inviteCode: string;
@@ -322,6 +353,22 @@ export type QuotedMessage = {
322
353
  } | {
323
354
  typeMessage: "groupInviteMessage";
324
355
  groupInviteMessageData: GroupInviteMessageData;
356
+ } | {
357
+ typeMessage: "interactiveButtons";
358
+ contentText: string;
359
+ titleText?: string;
360
+ footerText?: string;
361
+ buttons: InteractiveButtonData[];
362
+ } | {
363
+ typeMessage: "interactiveButtonsReply";
364
+ contentText: string;
365
+ titleText?: string;
366
+ footerText?: string;
367
+ buttons: InteractiveReplyButtonData[];
368
+ } | {
369
+ typeMessage: "templateButtonsReplyMessage";
370
+ selectedDisplayText: string;
371
+ selectedId: string;
325
372
  });
326
373
  export interface PollVote {
327
374
  optionName: string;
@@ -416,6 +463,15 @@ export type WebhookMessageData = {
416
463
  } | {
417
464
  typeMessage: "groupInviteMessage";
418
465
  groupInviteMessageData: GroupInviteMessageData;
466
+ } | {
467
+ typeMessage: "interactiveButtons";
468
+ interactiveButtons: InteractiveButtonsData;
469
+ } | {
470
+ typeMessage: "interactiveButtonsReply";
471
+ interactiveButtonsReply: InteractiveButtonsReplyData;
472
+ } | {
473
+ typeMessage: "templateButtonsReplyMessage";
474
+ templateButtonReplyMessage: TemplateButtonsReplyMessageData;
419
475
  };
420
476
  export interface MessageWebhook {
421
477
  typeWebhook: "incomingMessageReceived" | "outgoingMessageReceived" | "outgoingAPIMessageReceived";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@green-api/greenapi-integration",
3
- "version": "0.7.1",
3
+ "version": "0.7.2",
4
4
  "description": "GREEN-API Integration library",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",