-
Notifications
You must be signed in to change notification settings - Fork 181
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: added update to messages (#960)
- Loading branch information
Showing
8 changed files
with
128 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
|
||
export enum UpdateMessageStatus { | ||
/** | ||
* The status to set for the message. Setting the status of an inbound WhatsApp | ||
* message to read indicates to the sender of the message that the | ||
* message has been read (blue ticks are shown on that message in the WhatsApp | ||
* UI). The status of an outbound WhatsApp message cannot be updated via | ||
* this endpoint. | ||
*/ | ||
READ ='read', | ||
|
||
|
||
/** | ||
* The status to set for the message. Setting the status of an outbound | ||
* RCS message to revoked revokes that message if possible. | ||
*/ | ||
REVOKED ='revoked', | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
export * from './Channels'; | ||
export * from './Messenger'; | ||
export * from './UpdateMessageStatus'; | ||
export * from './Viber'; | ||
export * from './WhatsApp'; | ||
export * from './Channels'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
packages/messages/lib/types/Requests/UpdateMessageRequest.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { UpdateMessageStatus } from '../../enums'; | ||
|
||
/** | ||
* The request object for the {@link Messages.update} method. | ||
*/ | ||
export type UpdateMessageRequest = { | ||
/** | ||
* The status to set for the message. | ||
* | ||
* This value depends on the type of message that was sent. The SDK has no way | ||
* to know which value will be correct for the message. Confirm with the API | ||
* specification or the API documentation which value is correct for the | ||
* message {@link https://developer.vonage.com/en/api/messages#UpdateMessage}. | ||
*/ | ||
status: UpdateMessageStatus | string; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters