From 858aaadd16cfdb5db7a0b2479f98fb830fffeedf Mon Sep 17 00:00:00 2001 From: Steven Lindsay Date: Wed, 9 Oct 2024 18:16:59 +0100 Subject: [PATCH] update the MessageAction fields. --- ably.d.ts | 12 ++++++------ src/common/lib/types/message.ts | 25 ++++++++++++------------- 2 files changed, 18 insertions(+), 19 deletions(-) diff --git a/ably.d.ts b/ably.d.ts index a60ca1024..4b7bb7bbe 100644 --- a/ably.d.ts +++ b/ably.d.ts @@ -2457,27 +2457,27 @@ export enum MessageAction { /** * Message action has not been set. */ - MessageUnset = 'message_unset', + MESSAGE_UNSET = 'MESSAGE_UNSET', /** * Message action for a newly created message. */ - MessageCreate = 'message_create', + MESSAGE_CREATE = 'MESSAGE_CREATE', /** * Message action for an updated message. */ - MessageUpdate = 'message_update', + MESSAGE_UPDATE = 'MESSAGE_UPDATE', /** * Message action for a deleted message. */ - MessageDelete = 'message_delete', + MESSAGE_DELETE = 'MESSAGE_DELETE', /** * Message action for a newly created annotation. */ - MessageAnnotationCreate = 'message_annotation_create', + ANNOTATION_CREATE = 'ANNOTATION_CREATE', /** * Message action for a deleted annotation. */ - MessageAnnotationDelete = 'message_annotation_delete', + ANNOTATION_DELETE = 'ANNOTATION_DELETE', } diff --git a/src/common/lib/types/message.ts b/src/common/lib/types/message.ts index b13956728..126620db2 100644 --- a/src/common/lib/types/message.ts +++ b/src/common/lib/types/message.ts @@ -9,7 +9,6 @@ import * as API from '../../../../ably'; import { IUntypedCryptoStatic } from 'common/types/ICryptoStatic'; import { MsgPack } from 'common/types/msgpack'; - /** * Enum containing the different types of message actions. */ @@ -17,36 +16,36 @@ enum MessageAction { /** * Message action has not been set. */ - MessageUnset = 'MESSAGE_UNSET', + MESSAGE_UNSET = 'MESSAGE_UNSET', /** * Message action for a newly created message. */ - MessageCreate = 'MESSAGE_CREATE', + MESSAGE_CREATE = 'MESSAGE_CREATE', /** * Message action for an updated message. */ - MessageUpdate = 'MESSAGE_UPDATE', + MESSAGE_UPDATE = 'MESSAGE_UPDATE', /** * Message action for a deleted message. */ - MessageDelete = 'MESSAGE_DELETE', + MESSAGE_DELETE = 'MESSAGE_DELETE', /** * Message action for a newly created annotation. */ - AnnotationCreate = 'ANNOTATION_CREATE', + ANNOTATION_CREATE = 'ANNOTATION_CREATE', /** * Message action for a deleted annotation. */ - AnnotationDelete = 'ANNOTATION_DELETE', + ANNOTATION_DELETE = 'ANNOTATION_DELETE', } const MessageActionNumberMap: Record = { - 0: MessageAction.MessageUnset, - 1: MessageAction.MessageCreate, - 2: MessageAction.MessageUpdate, - 3: MessageAction.MessageDelete, - 4: MessageAction.AnnotationCreate, - 5: MessageAction.AnnotationDelete, + 0: MessageAction.MESSAGE_UNSET, + 1: MessageAction.MESSAGE_CREATE, + 2: MessageAction.MESSAGE_UPDATE, + 3: MessageAction.MESSAGE_DELETE, + 4: MessageAction.ANNOTATION_CREATE, + 5: MessageAction.ANNOTATION_DELETE, }; function getMessageAction(actionNumber: number): MessageAction {