From 158c7bb05c894aa96fb8a4d5f7d533212497d4a6 Mon Sep 17 00:00:00 2001 From: provokateurin Date: Wed, 10 Apr 2024 13:41:35 +0200 Subject: [PATCH] refactor(OpenAPI): Use proper type inheritance for chat messages Signed-off-by: provokateurin --- lib/Model/ProxyCacheMessage.php | 4 +- lib/ResponseDefinitions.php | 28 +- openapi-backend-sipbridge.json | 175 ++++++------- openapi-federation.json | 175 ++++++------- openapi-full.json | 243 ++++++++---------- openapi.json | 243 ++++++++---------- .../openapi/openapi-backend-sipbridge.ts | 33 +-- src/types/openapi/openapi-federation.ts | 33 +-- src/types/openapi/openapi-full.ts | 41 ++- src/types/openapi/openapi.ts | 41 ++- 10 files changed, 424 insertions(+), 592 deletions(-) diff --git a/lib/Model/ProxyCacheMessage.php b/lib/Model/ProxyCacheMessage.php index 7e3e7dec5a68..4b378890e446 100644 --- a/lib/Model/ProxyCacheMessage.php +++ b/lib/Model/ProxyCacheMessage.php @@ -59,7 +59,7 @@ * @method void setMetaData(?string $metaData) * @method string|null getMetaData() * - * @psalm-import-type TalkRoomProxyMessage from ResponseDefinitions + * @psalm-import-type TalkChatBaseMessage from ResponseDefinitions */ class ProxyCacheMessage extends Entity implements \JsonSerializable { public const METADATA_REPLY_TO_ACTOR_TYPE = 'replyToActorType'; @@ -108,7 +108,7 @@ public function getParsedMetaData(): array { } /** - * @return TalkRoomProxyMessage + * @return TalkChatBaseMessage */ public function jsonSerialize(): array { $expirationTimestamp = 0; diff --git a/lib/ResponseDefinitions.php b/lib/ResponseDefinitions.php index 263f3deb2444..cf00281b750b 100644 --- a/lib/ResponseDefinitions.php +++ b/lib/ResponseDefinitions.php @@ -93,21 +93,24 @@ * conversation?: string, * } * - * @psalm-type TalkChatMessage = array{ + * @psalm-type TalkChatBaseMessage = array{ * actorDisplayName: string, * actorId: string, * actorType: string, - * deleted?: true, * expirationTimestamp: int, - * id: int, - * isReplyable: bool, - * markdown: bool, * message: string, * messageParameters: array, * messageType: string, + * systemMessage: string, + * } + * + * @psalm-type TalkChatMessage = TalkChatBaseMessage&array{ + * deleted?: true, + * id: int, + * isReplyable: bool, + * markdown: bool, * reactions: array|\stdClass, * referenceId: string, - * systemMessage: string, * timestamp: int, * token: string, * lastEditActorDisplayName?: string, @@ -117,18 +120,7 @@ * silent?: bool, * } * - * @psalm-type TalkRoomProxyMessage = array{ - * actorDisplayName: string, - * actorId: string, - * actorType: string, - * expirationTimestamp: int, - * message: string, - * messageParameters: array, - * messageType: string, - * systemMessage: string, - * } - * - * @psalm-type TalkRoomLastMessage = TalkChatMessage|TalkRoomProxyMessage + * @psalm-type TalkRoomLastMessage = TalkChatMessage|TalkChatBaseMessage * * @psalm-type TalkChatMessageWithParent = TalkChatMessage&array{parent?: TalkChatMessage} * diff --git a/openapi-backend-sipbridge.json b/openapi-backend-sipbridge.json index 4d9fee9b107f..b5d4b68a8e45 100644 --- a/openapi-backend-sipbridge.json +++ b/openapi-backend-sipbridge.json @@ -208,24 +208,17 @@ } } }, - "ChatMessage": { + "ChatBaseMessage": { "type": "object", "required": [ "actorDisplayName", "actorId", "actorType", "expirationTimestamp", - "id", - "isReplyable", - "markdown", "message", "messageParameters", "messageType", - "reactions", - "referenceId", - "systemMessage", - "timestamp", - "token" + "systemMessage" ], "properties": { "actorDisplayName": { @@ -237,26 +230,10 @@ "actorType": { "type": "string" }, - "deleted": { - "type": "boolean", - "enum": [ - true - ] - }, "expirationTimestamp": { "type": "integer", "format": "int64" }, - "id": { - "type": "integer", - "format": "int64" - }, - "isReplyable": { - "type": "boolean" - }, - "markdown": { - "type": "boolean" - }, "message": { "type": "string" }, @@ -269,44 +246,81 @@ "messageType": { "type": "string" }, - "reactions": { - "type": "object", - "additionalProperties": { - "type": "integer", - "format": "int64" - } - }, - "referenceId": { - "type": "string" - }, "systemMessage": { "type": "string" - }, - "timestamp": { - "type": "integer", - "format": "int64" - }, - "token": { - "type": "string" - }, - "lastEditActorDisplayName": { - "type": "string" - }, - "lastEditActorId": { - "type": "string" - }, - "lastEditActorType": { - "type": "string" - }, - "lastEditTimestamp": { - "type": "integer", - "format": "int64" - }, - "silent": { - "type": "boolean" } } }, + "ChatMessage": { + "allOf": [ + { + "$ref": "#/components/schemas/ChatBaseMessage" + }, + { + "type": "object", + "required": [ + "id", + "isReplyable", + "markdown", + "reactions", + "referenceId", + "timestamp", + "token" + ], + "properties": { + "deleted": { + "type": "boolean", + "enum": [ + true + ] + }, + "id": { + "type": "integer", + "format": "int64" + }, + "isReplyable": { + "type": "boolean" + }, + "markdown": { + "type": "boolean" + }, + "reactions": { + "type": "object", + "additionalProperties": { + "type": "integer", + "format": "int64" + } + }, + "referenceId": { + "type": "string" + }, + "timestamp": { + "type": "integer", + "format": "int64" + }, + "token": { + "type": "string" + }, + "lastEditActorDisplayName": { + "type": "string" + }, + "lastEditActorId": { + "type": "string" + }, + "lastEditActorType": { + "type": "string" + }, + "lastEditTimestamp": { + "type": "integer", + "format": "int64" + }, + "silent": { + "type": "boolean" + } + } + } + ] + }, "OCSMeta": { "type": "object", "required": [ @@ -712,52 +726,9 @@ "$ref": "#/components/schemas/ChatMessage" }, { - "$ref": "#/components/schemas/RoomProxyMessage" + "$ref": "#/components/schemas/ChatBaseMessage" } ] - }, - "RoomProxyMessage": { - "type": "object", - "required": [ - "actorDisplayName", - "actorId", - "actorType", - "expirationTimestamp", - "message", - "messageParameters", - "messageType", - "systemMessage" - ], - "properties": { - "actorDisplayName": { - "type": "string" - }, - "actorId": { - "type": "string" - }, - "actorType": { - "type": "string" - }, - "expirationTimestamp": { - "type": "integer", - "format": "int64" - }, - "message": { - "type": "string" - }, - "messageParameters": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/RichObjectParameter" - } - }, - "messageType": { - "type": "string" - }, - "systemMessage": { - "type": "string" - } - } } } }, diff --git a/openapi-federation.json b/openapi-federation.json index 26404c9559d0..5dd743c9760e 100644 --- a/openapi-federation.json +++ b/openapi-federation.json @@ -208,24 +208,17 @@ } } }, - "ChatMessage": { + "ChatBaseMessage": { "type": "object", "required": [ "actorDisplayName", "actorId", "actorType", "expirationTimestamp", - "id", - "isReplyable", - "markdown", "message", "messageParameters", "messageType", - "reactions", - "referenceId", - "systemMessage", - "timestamp", - "token" + "systemMessage" ], "properties": { "actorDisplayName": { @@ -237,26 +230,10 @@ "actorType": { "type": "string" }, - "deleted": { - "type": "boolean", - "enum": [ - true - ] - }, "expirationTimestamp": { "type": "integer", "format": "int64" }, - "id": { - "type": "integer", - "format": "int64" - }, - "isReplyable": { - "type": "boolean" - }, - "markdown": { - "type": "boolean" - }, "message": { "type": "string" }, @@ -269,44 +246,81 @@ "messageType": { "type": "string" }, - "reactions": { - "type": "object", - "additionalProperties": { - "type": "integer", - "format": "int64" - } - }, - "referenceId": { - "type": "string" - }, "systemMessage": { "type": "string" - }, - "timestamp": { - "type": "integer", - "format": "int64" - }, - "token": { - "type": "string" - }, - "lastEditActorDisplayName": { - "type": "string" - }, - "lastEditActorId": { - "type": "string" - }, - "lastEditActorType": { - "type": "string" - }, - "lastEditTimestamp": { - "type": "integer", - "format": "int64" - }, - "silent": { - "type": "boolean" } } }, + "ChatMessage": { + "allOf": [ + { + "$ref": "#/components/schemas/ChatBaseMessage" + }, + { + "type": "object", + "required": [ + "id", + "isReplyable", + "markdown", + "reactions", + "referenceId", + "timestamp", + "token" + ], + "properties": { + "deleted": { + "type": "boolean", + "enum": [ + true + ] + }, + "id": { + "type": "integer", + "format": "int64" + }, + "isReplyable": { + "type": "boolean" + }, + "markdown": { + "type": "boolean" + }, + "reactions": { + "type": "object", + "additionalProperties": { + "type": "integer", + "format": "int64" + } + }, + "referenceId": { + "type": "string" + }, + "timestamp": { + "type": "integer", + "format": "int64" + }, + "token": { + "type": "string" + }, + "lastEditActorDisplayName": { + "type": "string" + }, + "lastEditActorId": { + "type": "string" + }, + "lastEditActorType": { + "type": "string" + }, + "lastEditTimestamp": { + "type": "integer", + "format": "int64" + }, + "silent": { + "type": "boolean" + } + } + } + ] + }, "FederationInvite": { "type": "object", "required": [ @@ -766,52 +780,9 @@ "$ref": "#/components/schemas/ChatMessage" }, { - "$ref": "#/components/schemas/RoomProxyMessage" + "$ref": "#/components/schemas/ChatBaseMessage" } ] - }, - "RoomProxyMessage": { - "type": "object", - "required": [ - "actorDisplayName", - "actorId", - "actorType", - "expirationTimestamp", - "message", - "messageParameters", - "messageType", - "systemMessage" - ], - "properties": { - "actorDisplayName": { - "type": "string" - }, - "actorId": { - "type": "string" - }, - "actorType": { - "type": "string" - }, - "expirationTimestamp": { - "type": "integer", - "format": "int64" - }, - "message": { - "type": "string" - }, - "messageParameters": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/RichObjectParameter" - } - }, - "messageType": { - "type": "string" - }, - "systemMessage": { - "type": "string" - } - } } } }, diff --git a/openapi-full.json b/openapi-full.json index 8cc1e159c92f..0ecc2fbd1784 100644 --- a/openapi-full.json +++ b/openapi-full.json @@ -325,68 +325,17 @@ } } }, - "ChatMentionSuggestion": { - "type": "object", - "required": [ - "id", - "label", - "source", - "mentionId", - "status", - "statusClearAt", - "statusIcon", - "statusMessage" - ], - "properties": { - "id": { - "type": "string" - }, - "label": { - "type": "string" - }, - "source": { - "type": "string" - }, - "mentionId": { - "type": "string" - }, - "status": { - "type": "string", - "nullable": true - }, - "statusClearAt": { - "type": "integer", - "format": "int64", - "nullable": true - }, - "statusIcon": { - "type": "string", - "nullable": true - }, - "statusMessage": { - "type": "string", - "nullable": true - } - } - }, - "ChatMessage": { + "ChatBaseMessage": { "type": "object", "required": [ "actorDisplayName", "actorId", "actorType", "expirationTimestamp", - "id", - "isReplyable", - "markdown", "message", "messageParameters", "messageType", - "reactions", - "referenceId", - "systemMessage", - "timestamp", - "token" + "systemMessage" ], "properties": { "actorDisplayName": { @@ -398,26 +347,10 @@ "actorType": { "type": "string" }, - "deleted": { - "type": "boolean", - "enum": [ - true - ] - }, "expirationTimestamp": { "type": "integer", "format": "int64" }, - "id": { - "type": "integer", - "format": "int64" - }, - "isReplyable": { - "type": "boolean" - }, - "markdown": { - "type": "boolean" - }, "message": { "type": "string" }, @@ -430,44 +363,125 @@ "messageType": { "type": "string" }, - "reactions": { - "type": "object", - "additionalProperties": { - "type": "integer", - "format": "int64" - } - }, - "referenceId": { - "type": "string" - }, "systemMessage": { "type": "string" - }, - "timestamp": { - "type": "integer", - "format": "int64" - }, - "token": { + } + } + }, + "ChatMentionSuggestion": { + "type": "object", + "required": [ + "id", + "label", + "source", + "mentionId", + "status", + "statusClearAt", + "statusIcon", + "statusMessage" + ], + "properties": { + "id": { "type": "string" }, - "lastEditActorDisplayName": { + "label": { "type": "string" }, - "lastEditActorId": { + "source": { "type": "string" }, - "lastEditActorType": { + "mentionId": { "type": "string" }, - "lastEditTimestamp": { + "status": { + "type": "string", + "nullable": true + }, + "statusClearAt": { "type": "integer", - "format": "int64" + "format": "int64", + "nullable": true }, - "silent": { - "type": "boolean" + "statusIcon": { + "type": "string", + "nullable": true + }, + "statusMessage": { + "type": "string", + "nullable": true } } }, + "ChatMessage": { + "allOf": [ + { + "$ref": "#/components/schemas/ChatBaseMessage" + }, + { + "type": "object", + "required": [ + "id", + "isReplyable", + "markdown", + "reactions", + "referenceId", + "timestamp", + "token" + ], + "properties": { + "deleted": { + "type": "boolean", + "enum": [ + true + ] + }, + "id": { + "type": "integer", + "format": "int64" + }, + "isReplyable": { + "type": "boolean" + }, + "markdown": { + "type": "boolean" + }, + "reactions": { + "type": "object", + "additionalProperties": { + "type": "integer", + "format": "int64" + } + }, + "referenceId": { + "type": "string" + }, + "timestamp": { + "type": "integer", + "format": "int64" + }, + "token": { + "type": "string" + }, + "lastEditActorDisplayName": { + "type": "string" + }, + "lastEditActorId": { + "type": "string" + }, + "lastEditActorType": { + "type": "string" + }, + "lastEditTimestamp": { + "type": "integer", + "format": "int64" + }, + "silent": { + "type": "boolean" + } + } + } + ] + }, "ChatMessageWithParent": { "allOf": [ { @@ -1231,53 +1245,10 @@ "$ref": "#/components/schemas/ChatMessage" }, { - "$ref": "#/components/schemas/RoomProxyMessage" + "$ref": "#/components/schemas/ChatBaseMessage" } ] }, - "RoomProxyMessage": { - "type": "object", - "required": [ - "actorDisplayName", - "actorId", - "actorType", - "expirationTimestamp", - "message", - "messageParameters", - "messageType", - "systemMessage" - ], - "properties": { - "actorDisplayName": { - "type": "string" - }, - "actorId": { - "type": "string" - }, - "actorType": { - "type": "string" - }, - "expirationTimestamp": { - "type": "integer", - "format": "int64" - }, - "message": { - "type": "string" - }, - "messageParameters": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/RichObjectParameter" - } - }, - "messageType": { - "type": "string" - }, - "systemMessage": { - "type": "string" - } - } - }, "SignalingSession": { "type": "object", "required": [ diff --git a/openapi.json b/openapi.json index a352fd839b49..a88586dfe4fc 100644 --- a/openapi.json +++ b/openapi.json @@ -266,68 +266,17 @@ } } }, - "ChatMentionSuggestion": { - "type": "object", - "required": [ - "id", - "label", - "source", - "mentionId", - "status", - "statusClearAt", - "statusIcon", - "statusMessage" - ], - "properties": { - "id": { - "type": "string" - }, - "label": { - "type": "string" - }, - "source": { - "type": "string" - }, - "mentionId": { - "type": "string" - }, - "status": { - "type": "string", - "nullable": true - }, - "statusClearAt": { - "type": "integer", - "format": "int64", - "nullable": true - }, - "statusIcon": { - "type": "string", - "nullable": true - }, - "statusMessage": { - "type": "string", - "nullable": true - } - } - }, - "ChatMessage": { + "ChatBaseMessage": { "type": "object", "required": [ "actorDisplayName", "actorId", "actorType", "expirationTimestamp", - "id", - "isReplyable", - "markdown", "message", "messageParameters", "messageType", - "reactions", - "referenceId", - "systemMessage", - "timestamp", - "token" + "systemMessage" ], "properties": { "actorDisplayName": { @@ -339,26 +288,10 @@ "actorType": { "type": "string" }, - "deleted": { - "type": "boolean", - "enum": [ - true - ] - }, "expirationTimestamp": { "type": "integer", "format": "int64" }, - "id": { - "type": "integer", - "format": "int64" - }, - "isReplyable": { - "type": "boolean" - }, - "markdown": { - "type": "boolean" - }, "message": { "type": "string" }, @@ -371,44 +304,125 @@ "messageType": { "type": "string" }, - "reactions": { - "type": "object", - "additionalProperties": { - "type": "integer", - "format": "int64" - } - }, - "referenceId": { - "type": "string" - }, "systemMessage": { "type": "string" - }, - "timestamp": { - "type": "integer", - "format": "int64" - }, - "token": { + } + } + }, + "ChatMentionSuggestion": { + "type": "object", + "required": [ + "id", + "label", + "source", + "mentionId", + "status", + "statusClearAt", + "statusIcon", + "statusMessage" + ], + "properties": { + "id": { "type": "string" }, - "lastEditActorDisplayName": { + "label": { "type": "string" }, - "lastEditActorId": { + "source": { "type": "string" }, - "lastEditActorType": { + "mentionId": { "type": "string" }, - "lastEditTimestamp": { + "status": { + "type": "string", + "nullable": true + }, + "statusClearAt": { "type": "integer", - "format": "int64" + "format": "int64", + "nullable": true }, - "silent": { - "type": "boolean" + "statusIcon": { + "type": "string", + "nullable": true + }, + "statusMessage": { + "type": "string", + "nullable": true } } }, + "ChatMessage": { + "allOf": [ + { + "$ref": "#/components/schemas/ChatBaseMessage" + }, + { + "type": "object", + "required": [ + "id", + "isReplyable", + "markdown", + "reactions", + "referenceId", + "timestamp", + "token" + ], + "properties": { + "deleted": { + "type": "boolean", + "enum": [ + true + ] + }, + "id": { + "type": "integer", + "format": "int64" + }, + "isReplyable": { + "type": "boolean" + }, + "markdown": { + "type": "boolean" + }, + "reactions": { + "type": "object", + "additionalProperties": { + "type": "integer", + "format": "int64" + } + }, + "referenceId": { + "type": "string" + }, + "timestamp": { + "type": "integer", + "format": "int64" + }, + "token": { + "type": "string" + }, + "lastEditActorDisplayName": { + "type": "string" + }, + "lastEditActorId": { + "type": "string" + }, + "lastEditActorType": { + "type": "string" + }, + "lastEditTimestamp": { + "type": "integer", + "format": "int64" + }, + "silent": { + "type": "boolean" + } + } + } + ] + }, "ChatMessageWithParent": { "allOf": [ { @@ -1118,53 +1132,10 @@ "$ref": "#/components/schemas/ChatMessage" }, { - "$ref": "#/components/schemas/RoomProxyMessage" + "$ref": "#/components/schemas/ChatBaseMessage" } ] }, - "RoomProxyMessage": { - "type": "object", - "required": [ - "actorDisplayName", - "actorId", - "actorType", - "expirationTimestamp", - "message", - "messageParameters", - "messageType", - "systemMessage" - ], - "properties": { - "actorDisplayName": { - "type": "string" - }, - "actorId": { - "type": "string" - }, - "actorType": { - "type": "string" - }, - "expirationTimestamp": { - "type": "integer", - "format": "int64" - }, - "message": { - "type": "string" - }, - "messageParameters": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/RichObjectParameter" - } - }, - "messageType": { - "type": "string" - }, - "systemMessage": { - "type": "string" - } - } - }, "SignalingSession": { "type": "object", "required": [ diff --git a/src/types/openapi/openapi-backend-sipbridge.ts b/src/types/openapi/openapi-backend-sipbridge.ts index f3e8913655b8..215a82e19d41 100644 --- a/src/types/openapi/openapi-backend-sipbridge.ts +++ b/src/types/openapi/openapi-backend-sipbridge.ts @@ -90,28 +90,30 @@ export type components = { }; version: string; }; - ChatMessage: { + ChatBaseMessage: { actorDisplayName: string; actorId: string; actorType: string; - /** @enum {boolean} */ - deleted?: true; /** Format: int64 */ expirationTimestamp: number; - /** Format: int64 */ - id: number; - isReplyable: boolean; - markdown: boolean; message: string; messageParameters: { [key: string]: components["schemas"]["RichObjectParameter"]; }; messageType: string; + systemMessage: string; + }; + ChatMessage: components["schemas"]["ChatBaseMessage"] & { + /** @enum {boolean} */ + deleted?: true; + /** Format: int64 */ + id: number; + isReplyable: boolean; + markdown: boolean; reactions: { [key: string]: number; }; referenceId: string; - systemMessage: string; /** Format: int64 */ timestamp: number; token: string; @@ -246,20 +248,7 @@ export type components = { /** Format: int64 */ unreadMessages: number; }; - RoomLastMessage: components["schemas"]["ChatMessage"] | components["schemas"]["RoomProxyMessage"]; - RoomProxyMessage: { - actorDisplayName: string; - actorId: string; - actorType: string; - /** Format: int64 */ - expirationTimestamp: number; - message: string; - messageParameters: { - [key: string]: components["schemas"]["RichObjectParameter"]; - }; - messageType: string; - systemMessage: string; - }; + RoomLastMessage: components["schemas"]["ChatMessage"] | components["schemas"]["ChatBaseMessage"]; }; responses: never; parameters: never; diff --git a/src/types/openapi/openapi-federation.ts b/src/types/openapi/openapi-federation.ts index e971f60d30b6..ef79e54cb2b0 100644 --- a/src/types/openapi/openapi-federation.ts +++ b/src/types/openapi/openapi-federation.ts @@ -105,28 +105,30 @@ export type components = { }; version: string; }; - ChatMessage: { + ChatBaseMessage: { actorDisplayName: string; actorId: string; actorType: string; - /** @enum {boolean} */ - deleted?: true; /** Format: int64 */ expirationTimestamp: number; - /** Format: int64 */ - id: number; - isReplyable: boolean; - markdown: boolean; message: string; messageParameters: { [key: string]: components["schemas"]["RichObjectParameter"]; }; messageType: string; + systemMessage: string; + }; + ChatMessage: components["schemas"]["ChatBaseMessage"] & { + /** @enum {boolean} */ + deleted?: true; + /** Format: int64 */ + id: number; + isReplyable: boolean; + markdown: boolean; reactions: { [key: string]: number; }; referenceId: string; - systemMessage: string; /** Format: int64 */ timestamp: number; token: string; @@ -277,20 +279,7 @@ export type components = { /** Format: int64 */ unreadMessages: number; }; - RoomLastMessage: components["schemas"]["ChatMessage"] | components["schemas"]["RoomProxyMessage"]; - RoomProxyMessage: { - actorDisplayName: string; - actorId: string; - actorType: string; - /** Format: int64 */ - expirationTimestamp: number; - message: string; - messageParameters: { - [key: string]: components["schemas"]["RichObjectParameter"]; - }; - messageType: string; - systemMessage: string; - }; + RoomLastMessage: components["schemas"]["ChatMessage"] | components["schemas"]["ChatBaseMessage"]; }; responses: never; parameters: never; diff --git a/src/types/openapi/openapi-full.ts b/src/types/openapi/openapi-full.ts index c785ed3c4e14..8ba6a0b88367 100644 --- a/src/types/openapi/openapi-full.ts +++ b/src/types/openapi/openapi-full.ts @@ -613,6 +613,19 @@ export type components = { }; version: string; }; + ChatBaseMessage: { + actorDisplayName: string; + actorId: string; + actorType: string; + /** Format: int64 */ + expirationTimestamp: number; + message: string; + messageParameters: { + [key: string]: components["schemas"]["RichObjectParameter"]; + }; + messageType: string; + systemMessage: string; + }; ChatMentionSuggestion: { id: string; label: string; @@ -624,28 +637,17 @@ export type components = { statusIcon: string | null; statusMessage: string | null; }; - ChatMessage: { - actorDisplayName: string; - actorId: string; - actorType: string; + ChatMessage: components["schemas"]["ChatBaseMessage"] & { /** @enum {boolean} */ deleted?: true; /** Format: int64 */ - expirationTimestamp: number; - /** Format: int64 */ id: number; isReplyable: boolean; markdown: boolean; - message: string; - messageParameters: { - [key: string]: components["schemas"]["RichObjectParameter"]; - }; - messageType: string; reactions: { [key: string]: number; }; referenceId: string; - systemMessage: string; /** Format: int64 */ timestamp: number; token: string; @@ -884,20 +886,7 @@ export type components = { /** Format: int64 */ unreadMessages: number; }; - RoomLastMessage: components["schemas"]["ChatMessage"] | components["schemas"]["RoomProxyMessage"]; - RoomProxyMessage: { - actorDisplayName: string; - actorId: string; - actorType: string; - /** Format: int64 */ - expirationTimestamp: number; - message: string; - messageParameters: { - [key: string]: components["schemas"]["RichObjectParameter"]; - }; - messageType: string; - systemMessage: string; - }; + RoomLastMessage: components["schemas"]["ChatMessage"] | components["schemas"]["ChatBaseMessage"]; SignalingSession: { /** Format: int64 */ inCall: number; diff --git a/src/types/openapi/openapi.ts b/src/types/openapi/openapi.ts index 4a6845fe3b72..8f8cfbe5fa9b 100644 --- a/src/types/openapi/openapi.ts +++ b/src/types/openapi/openapi.ts @@ -452,6 +452,19 @@ export type components = { }; version: string; }; + ChatBaseMessage: { + actorDisplayName: string; + actorId: string; + actorType: string; + /** Format: int64 */ + expirationTimestamp: number; + message: string; + messageParameters: { + [key: string]: components["schemas"]["RichObjectParameter"]; + }; + messageType: string; + systemMessage: string; + }; ChatMentionSuggestion: { id: string; label: string; @@ -463,28 +476,17 @@ export type components = { statusIcon: string | null; statusMessage: string | null; }; - ChatMessage: { - actorDisplayName: string; - actorId: string; - actorType: string; + ChatMessage: components["schemas"]["ChatBaseMessage"] & { /** @enum {boolean} */ deleted?: true; /** Format: int64 */ - expirationTimestamp: number; - /** Format: int64 */ id: number; isReplyable: boolean; markdown: boolean; - message: string; - messageParameters: { - [key: string]: components["schemas"]["RichObjectParameter"]; - }; - messageType: string; reactions: { [key: string]: number; }; referenceId: string; - systemMessage: string; /** Format: int64 */ timestamp: number; token: string; @@ -707,20 +709,7 @@ export type components = { /** Format: int64 */ unreadMessages: number; }; - RoomLastMessage: components["schemas"]["ChatMessage"] | components["schemas"]["RoomProxyMessage"]; - RoomProxyMessage: { - actorDisplayName: string; - actorId: string; - actorType: string; - /** Format: int64 */ - expirationTimestamp: number; - message: string; - messageParameters: { - [key: string]: components["schemas"]["RichObjectParameter"]; - }; - messageType: string; - systemMessage: string; - }; + RoomLastMessage: components["schemas"]["ChatMessage"] | components["schemas"]["ChatBaseMessage"]; SignalingSession: { /** Format: int64 */ inCall: number;