diff --git a/lib/ResponseDefinitions.php b/lib/ResponseDefinitions.php index 4189222dad3..263f3deb244 100644 --- a/lib/ResponseDefinitions.php +++ b/lib/ResponseDefinitions.php @@ -67,6 +67,32 @@ * statusMessage: ?string, * } * + * @psalm-type TalkRichObjectParameter = array{ + * type: string, + * id: string, + * name: string, + * server?: string, + * link?: string, + * 'call-type'?: 'one2one'|'group'|'public', + * 'icon-url'?: string, + * 'message-id'?: string, + * boardname?: string, + * stackname?: string, + * size?: string, + * path?: string, + * mimetype?: string, + * 'preview-available'?: 'yes'|'no', + * mtime?: string, + * latitude?: string, + * longitude?: string, + * description?: string, + * thumb?: string, + * website?: string, + * visibility?: '0'|'1', + * assignable?: '0'|'1', + * conversation?: string, + * } + * * @psalm-type TalkChatMessage = array{ * actorDisplayName: string, * actorId: string, @@ -77,7 +103,7 @@ * isReplyable: bool, * markdown: bool, * message: string, - * messageParameters: array>, + * messageParameters: array, * messageType: string, * reactions: array|\stdClass, * referenceId: string, @@ -97,7 +123,7 @@ * actorType: string, * expirationTimestamp: int, * message: string, - * messageParameters: array>, + * messageParameters: array, * messageType: string, * systemMessage: string, * } diff --git a/openapi-backend-sipbridge.json b/openapi-backend-sipbridge.json index 109f038f0be..6af28b900b5 100644 --- a/openapi-backend-sipbridge.json +++ b/openapi-backend-sipbridge.json @@ -263,10 +263,7 @@ "messageParameters": { "type": "object", "additionalProperties": { - "type": "object", - "additionalProperties": { - "type": "object" - } + "$ref": "#/components/schemas/RichObjectParameter" } }, "messageType": { @@ -353,6 +350,102 @@ } ] }, + "RichObjectParameter": { + "type": "object", + "required": [ + "type", + "id", + "name" + ], + "properties": { + "type": { + "type": "string" + }, + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "server": { + "type": "string" + }, + "link": { + "type": "string" + }, + "call-type": { + "type": "string", + "enum": [ + "one2one", + "group", + "public" + ] + }, + "icon-url": { + "type": "string" + }, + "message-id": { + "type": "string" + }, + "boardname": { + "type": "string" + }, + "stackname": { + "type": "string" + }, + "size": { + "type": "string" + }, + "path": { + "type": "string" + }, + "mimetype": { + "type": "string" + }, + "preview-available": { + "type": "string", + "enum": [ + "yes", + "no" + ] + }, + "mtime": { + "type": "string" + }, + "latitude": { + "type": "string" + }, + "longitude": { + "type": "string" + }, + "description": { + "type": "string" + }, + "thumb": { + "type": "string" + }, + "website": { + "type": "string" + }, + "visibility": { + "type": "string", + "enum": [ + "0", + "1" + ] + }, + "assignable": { + "type": "string", + "enum": [ + "0", + "1" + ] + }, + "conversation": { + "type": "string" + } + } + }, "Room": { "type": "object", "required": [ @@ -655,10 +748,7 @@ "messageParameters": { "type": "object", "additionalProperties": { - "type": "object", - "additionalProperties": { - "type": "object" - } + "$ref": "#/components/schemas/RichObjectParameter" } }, "messageType": { diff --git a/openapi-federation.json b/openapi-federation.json index 7336aaa20f1..73c52570625 100644 --- a/openapi-federation.json +++ b/openapi-federation.json @@ -263,10 +263,7 @@ "messageParameters": { "type": "object", "additionalProperties": { - "type": "object", - "additionalProperties": { - "type": "object" - } + "$ref": "#/components/schemas/RichObjectParameter" } }, "messageType": { @@ -407,6 +404,102 @@ } ] }, + "RichObjectParameter": { + "type": "object", + "required": [ + "type", + "id", + "name" + ], + "properties": { + "type": { + "type": "string" + }, + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "server": { + "type": "string" + }, + "link": { + "type": "string" + }, + "call-type": { + "type": "string", + "enum": [ + "one2one", + "group", + "public" + ] + }, + "icon-url": { + "type": "string" + }, + "message-id": { + "type": "string" + }, + "boardname": { + "type": "string" + }, + "stackname": { + "type": "string" + }, + "size": { + "type": "string" + }, + "path": { + "type": "string" + }, + "mimetype": { + "type": "string" + }, + "preview-available": { + "type": "string", + "enum": [ + "yes", + "no" + ] + }, + "mtime": { + "type": "string" + }, + "latitude": { + "type": "string" + }, + "longitude": { + "type": "string" + }, + "description": { + "type": "string" + }, + "thumb": { + "type": "string" + }, + "website": { + "type": "string" + }, + "visibility": { + "type": "string", + "enum": [ + "0", + "1" + ] + }, + "assignable": { + "type": "string", + "enum": [ + "0", + "1" + ] + }, + "conversation": { + "type": "string" + } + } + }, "Room": { "type": "object", "required": [ @@ -709,10 +802,7 @@ "messageParameters": { "type": "object", "additionalProperties": { - "type": "object", - "additionalProperties": { - "type": "object" - } + "$ref": "#/components/schemas/RichObjectParameter" } }, "messageType": { diff --git a/openapi-full.json b/openapi-full.json index cef8274f87c..cec04ca5716 100644 --- a/openapi-full.json +++ b/openapi-full.json @@ -424,10 +424,7 @@ "messageParameters": { "type": "object", "additionalProperties": { - "type": "object", - "additionalProperties": { - "type": "object" - } + "$ref": "#/components/schemas/RichObjectParameter" } }, "messageType": { @@ -872,6 +869,102 @@ } } }, + "RichObjectParameter": { + "type": "object", + "required": [ + "type", + "id", + "name" + ], + "properties": { + "type": { + "type": "string" + }, + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "server": { + "type": "string" + }, + "link": { + "type": "string" + }, + "call-type": { + "type": "string", + "enum": [ + "one2one", + "group", + "public" + ] + }, + "icon-url": { + "type": "string" + }, + "message-id": { + "type": "string" + }, + "boardname": { + "type": "string" + }, + "stackname": { + "type": "string" + }, + "size": { + "type": "string" + }, + "path": { + "type": "string" + }, + "mimetype": { + "type": "string" + }, + "preview-available": { + "type": "string", + "enum": [ + "yes", + "no" + ] + }, + "mtime": { + "type": "string" + }, + "latitude": { + "type": "string" + }, + "longitude": { + "type": "string" + }, + "description": { + "type": "string" + }, + "thumb": { + "type": "string" + }, + "website": { + "type": "string" + }, + "visibility": { + "type": "string", + "enum": [ + "0", + "1" + ] + }, + "assignable": { + "type": "string", + "enum": [ + "0", + "1" + ] + }, + "conversation": { + "type": "string" + } + } + }, "Room": { "type": "object", "required": [ @@ -1174,10 +1267,7 @@ "messageParameters": { "type": "object", "additionalProperties": { - "type": "object", - "additionalProperties": { - "type": "object" - } + "$ref": "#/components/schemas/RichObjectParameter" } }, "messageType": { diff --git a/openapi.json b/openapi.json index 9f7862926f8..93fb28bc7bd 100644 --- a/openapi.json +++ b/openapi.json @@ -365,10 +365,7 @@ "messageParameters": { "type": "object", "additionalProperties": { - "type": "object", - "additionalProperties": { - "type": "object" - } + "$ref": "#/components/schemas/RichObjectParameter" } }, "messageType": { @@ -759,6 +756,102 @@ } } }, + "RichObjectParameter": { + "type": "object", + "required": [ + "type", + "id", + "name" + ], + "properties": { + "type": { + "type": "string" + }, + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "server": { + "type": "string" + }, + "link": { + "type": "string" + }, + "call-type": { + "type": "string", + "enum": [ + "one2one", + "group", + "public" + ] + }, + "icon-url": { + "type": "string" + }, + "message-id": { + "type": "string" + }, + "boardname": { + "type": "string" + }, + "stackname": { + "type": "string" + }, + "size": { + "type": "string" + }, + "path": { + "type": "string" + }, + "mimetype": { + "type": "string" + }, + "preview-available": { + "type": "string", + "enum": [ + "yes", + "no" + ] + }, + "mtime": { + "type": "string" + }, + "latitude": { + "type": "string" + }, + "longitude": { + "type": "string" + }, + "description": { + "type": "string" + }, + "thumb": { + "type": "string" + }, + "website": { + "type": "string" + }, + "visibility": { + "type": "string", + "enum": [ + "0", + "1" + ] + }, + "assignable": { + "type": "string", + "enum": [ + "0", + "1" + ] + }, + "conversation": { + "type": "string" + } + } + }, "Room": { "type": "object", "required": [ @@ -1061,10 +1154,7 @@ "messageParameters": { "type": "object", "additionalProperties": { - "type": "object", - "additionalProperties": { - "type": "object" - } + "$ref": "#/components/schemas/RichObjectParameter" } }, "messageType": { diff --git a/src/types/openapi/openapi-backend-sipbridge.ts b/src/types/openapi/openapi-backend-sipbridge.ts index ab8a5879f80..026c7805dc1 100644 --- a/src/types/openapi/openapi-backend-sipbridge.ts +++ b/src/types/openapi/openapi-backend-sipbridge.ts @@ -104,9 +104,7 @@ export type components = { markdown: boolean; message: string; messageParameters: { - [key: string]: { - [key: string]: Record; - }; + [key: string]: components["schemas"]["RichObjectParameter"]; }; messageType: string; reactions: { @@ -134,6 +132,35 @@ export type components = { PublicCapabilities: OneOf<[{ spreed: components["schemas"]["Capabilities"]; }, unknown[]]>; + RichObjectParameter: { + type: string; + id: string; + name: string; + server?: string; + link?: string; + /** @enum {string} */ + "call-type"?: "one2one" | "group" | "public"; + "icon-url"?: string; + "message-id"?: string; + boardname?: string; + stackname?: string; + size?: string; + path?: string; + mimetype?: string; + /** @enum {string} */ + "preview-available"?: "yes" | "no"; + mtime?: string; + latitude?: string; + longitude?: string; + description?: string; + thumb?: string; + website?: string; + /** @enum {string} */ + visibility?: "0" | "1"; + /** @enum {string} */ + assignable?: "0" | "1"; + conversation?: string; + }; Room: { actorId: string; actorType: string; @@ -228,9 +255,7 @@ export type components = { expirationTimestamp: number; message: string; messageParameters: { - [key: string]: { - [key: string]: Record; - }; + [key: string]: components["schemas"]["RichObjectParameter"]; }; messageType: string; systemMessage: string; diff --git a/src/types/openapi/openapi-federation.ts b/src/types/openapi/openapi-federation.ts index 912d7ee5cdf..ea46a31bb16 100644 --- a/src/types/openapi/openapi-federation.ts +++ b/src/types/openapi/openapi-federation.ts @@ -111,9 +111,7 @@ export type components = { markdown: boolean; message: string; messageParameters: { - [key: string]: { - [key: string]: Record; - }; + [key: string]: components["schemas"]["RichObjectParameter"]; }; messageType: string; reactions: { @@ -157,6 +155,35 @@ export type components = { PublicCapabilities: OneOf<[{ spreed: components["schemas"]["Capabilities"]; }, unknown[]]>; + RichObjectParameter: { + type: string; + id: string; + name: string; + server?: string; + link?: string; + /** @enum {string} */ + "call-type"?: "one2one" | "group" | "public"; + "icon-url"?: string; + "message-id"?: string; + boardname?: string; + stackname?: string; + size?: string; + path?: string; + mimetype?: string; + /** @enum {string} */ + "preview-available"?: "yes" | "no"; + mtime?: string; + latitude?: string; + longitude?: string; + description?: string; + thumb?: string; + website?: string; + /** @enum {string} */ + visibility?: "0" | "1"; + /** @enum {string} */ + assignable?: "0" | "1"; + conversation?: string; + }; Room: { actorId: string; actorType: string; @@ -251,9 +278,7 @@ export type components = { expirationTimestamp: number; message: string; messageParameters: { - [key: string]: { - [key: string]: Record; - }; + [key: string]: components["schemas"]["RichObjectParameter"]; }; messageType: string; systemMessage: string; diff --git a/src/types/openapi/openapi-full.ts b/src/types/openapi/openapi-full.ts index 02fcb75e689..69a13e521a4 100644 --- a/src/types/openapi/openapi-full.ts +++ b/src/types/openapi/openapi-full.ts @@ -627,9 +627,7 @@ export type components = { markdown: boolean; message: string; messageParameters: { - [key: string]: { - [key: string]: Record; - }; + [key: string]: components["schemas"]["RichObjectParameter"]; }; messageType: string; reactions: { @@ -761,6 +759,35 @@ export type components = { /** Format: int64 */ timestamp: number; }; + RichObjectParameter: { + type: string; + id: string; + name: string; + server?: string; + link?: string; + /** @enum {string} */ + "call-type"?: "one2one" | "group" | "public"; + "icon-url"?: string; + "message-id"?: string; + boardname?: string; + stackname?: string; + size?: string; + path?: string; + mimetype?: string; + /** @enum {string} */ + "preview-available"?: "yes" | "no"; + mtime?: string; + latitude?: string; + longitude?: string; + description?: string; + thumb?: string; + website?: string; + /** @enum {string} */ + visibility?: "0" | "1"; + /** @enum {string} */ + assignable?: "0" | "1"; + conversation?: string; + }; Room: { actorId: string; actorType: string; @@ -855,9 +882,7 @@ export type components = { expirationTimestamp: number; message: string; messageParameters: { - [key: string]: { - [key: string]: Record; - }; + [key: string]: components["schemas"]["RichObjectParameter"]; }; messageType: string; systemMessage: string; diff --git a/src/types/openapi/openapi.ts b/src/types/openapi/openapi.ts index b58d20e7cf0..ace0b2c0586 100644 --- a/src/types/openapi/openapi.ts +++ b/src/types/openapi/openapi.ts @@ -474,9 +474,7 @@ export type components = { markdown: boolean; message: string; messageParameters: { - [key: string]: { - [key: string]: Record; - }; + [key: string]: components["schemas"]["RichObjectParameter"]; }; messageType: string; reactions: { @@ -592,6 +590,35 @@ export type components = { /** Format: int64 */ timestamp: number; }; + RichObjectParameter: { + type: string; + id: string; + name: string; + server?: string; + link?: string; + /** @enum {string} */ + "call-type"?: "one2one" | "group" | "public"; + "icon-url"?: string; + "message-id"?: string; + boardname?: string; + stackname?: string; + size?: string; + path?: string; + mimetype?: string; + /** @enum {string} */ + "preview-available"?: "yes" | "no"; + mtime?: string; + latitude?: string; + longitude?: string; + description?: string; + thumb?: string; + website?: string; + /** @enum {string} */ + visibility?: "0" | "1"; + /** @enum {string} */ + assignable?: "0" | "1"; + conversation?: string; + }; Room: { actorId: string; actorType: string; @@ -686,9 +713,7 @@ export type components = { expirationTimestamp: number; message: string; messageParameters: { - [key: string]: { - [key: string]: Record; - }; + [key: string]: components["schemas"]["RichObjectParameter"]; }; messageType: string; systemMessage: string;