File tree 10 files changed +521
-671
lines changed
10 files changed +521
-671
lines changed Original file line number Diff line number Diff line change 59
59
* @method void setMetaData(?string $metaData)
60
60
* @method string|null getMetaData()
61
61
*
62
- * @psalm-import-type TalkRoomProxyMessage from ResponseDefinitions
62
+ * @psalm-import-type TalkChatProxyMessage from ResponseDefinitions
63
63
*/
64
64
class ProxyCacheMessage extends Entity implements \JsonSerializable {
65
65
public const METADATA_REPLY_TO_ACTOR_TYPE = 'replyToActorType ' ;
@@ -108,7 +108,7 @@ public function getParsedMetaData(): array {
108
108
}
109
109
110
110
/**
111
- * @return TalkRoomProxyMessage
111
+ * @return TalkChatProxyMessage
112
112
*/
113
113
public function jsonSerialize (): array {
114
114
$ expirationTimestamp = 0 ;
Original file line number Diff line number Diff line change 93
93
* conversation?: string,
94
94
* }
95
95
*
96
- * @psalm-type TalkChatMessage = array{
96
+ * @psalm-type TalkBaseMessage = array{
97
97
* actorDisplayName: string,
98
98
* actorId: string,
99
99
* actorType: string,
100
- * deleted?: true,
101
100
* expirationTimestamp: int,
102
- * id: int,
103
- * isReplyable: bool,
104
- * markdown: bool,
105
101
* message: string,
106
102
* messageParameters: array<string, TalkRichObjectParameter>,
107
103
* messageType: string,
104
+ * systemMessage: string,
105
+ * }
106
+ *
107
+ * @psalm-type TalkChatMessage = TalkBaseMessage&array{
108
+ * deleted?: true,
109
+ * id: int,
110
+ * isReplyable: bool,
111
+ * markdown: bool,
108
112
* reactions: array<string, integer>|\stdClass,
109
113
* referenceId: string,
110
- * systemMessage: string,
111
114
* timestamp: int,
112
115
* token: string,
113
116
* lastEditActorDisplayName?: string,
117
120
* silent?: bool,
118
121
* }
119
122
*
120
- * @psalm-type TalkRoomProxyMessage = array{
121
- * actorDisplayName: string,
122
- * actorId: string,
123
- * actorType: string,
124
- * expirationTimestamp: int,
125
- * message: string,
126
- * messageParameters: array<string, TalkRichObjectParameter>,
127
- * messageType: string,
128
- * systemMessage: string,
129
- * }
123
+ * @psalm-type TalkChatProxyMessage = TalkBaseMessage
130
124
*
131
- * @psalm-type TalkRoomLastMessage = TalkChatMessage|TalkRoomProxyMessage
125
+ * @psalm-type TalkRoomLastMessage = TalkChatMessage|TalkChatProxyMessage
132
126
*
133
127
* @psalm-type TalkChatMessageWithParent = TalkChatMessage&array{parent?: TalkChatMessage}
134
128
*
Original file line number Diff line number Diff line change 20
20
}
21
21
},
22
22
"schemas" : {
23
+ "BaseMessage" : {
24
+ "type" : " object" ,
25
+ "required" : [
26
+ " actorDisplayName" ,
27
+ " actorId" ,
28
+ " actorType" ,
29
+ " expirationTimestamp" ,
30
+ " message" ,
31
+ " messageParameters" ,
32
+ " messageType" ,
33
+ " systemMessage"
34
+ ],
35
+ "properties" : {
36
+ "actorDisplayName" : {
37
+ "type" : " string"
38
+ },
39
+ "actorId" : {
40
+ "type" : " string"
41
+ },
42
+ "actorType" : {
43
+ "type" : " string"
44
+ },
45
+ "expirationTimestamp" : {
46
+ "type" : " integer" ,
47
+ "format" : " int64"
48
+ },
49
+ "message" : {
50
+ "type" : " string"
51
+ },
52
+ "messageParameters" : {
53
+ "type" : " object" ,
54
+ "additionalProperties" : {
55
+ "$ref" : " #/components/schemas/RichObjectParameter"
56
+ }
57
+ },
58
+ "messageType" : {
59
+ "type" : " string"
60
+ },
61
+ "systemMessage" : {
62
+ "type" : " string"
63
+ }
64
+ }
65
+ },
23
66
"Capabilities" : {
24
67
"type" : " object" ,
25
68
"required" : [
209
252
}
210
253
},
211
254
"ChatMessage" : {
212
- "type" : " object" ,
213
- "required" : [
214
- " actorDisplayName" ,
215
- " actorId" ,
216
- " actorType" ,
217
- " expirationTimestamp" ,
218
- " id" ,
219
- " isReplyable" ,
220
- " markdown" ,
221
- " message" ,
222
- " messageParameters" ,
223
- " messageType" ,
224
- " reactions" ,
225
- " referenceId" ,
226
- " systemMessage" ,
227
- " timestamp" ,
228
- " token"
229
- ],
230
- "properties" : {
231
- "actorDisplayName" : {
232
- "type" : " string"
233
- },
234
- "actorId" : {
235
- "type" : " string"
236
- },
237
- "actorType" : {
238
- "type" : " string"
239
- },
240
- "deleted" : {
241
- "type" : " boolean" ,
242
- "enum" : [
243
- true
244
- ]
245
- },
246
- "expirationTimestamp" : {
247
- "type" : " integer" ,
248
- "format" : " int64"
249
- },
250
- "id" : {
251
- "type" : " integer" ,
252
- "format" : " int64"
253
- },
254
- "isReplyable" : {
255
- "type" : " boolean"
256
- },
257
- "markdown" : {
258
- "type" : " boolean"
259
- },
260
- "message" : {
261
- "type" : " string"
262
- },
263
- "messageParameters" : {
264
- "type" : " object" ,
265
- "additionalProperties" : {
266
- "$ref" : " #/components/schemas/RichObjectParameter"
267
- }
268
- },
269
- "messageType" : {
270
- "type" : " string"
255
+ "allOf" : [
256
+ {
257
+ "$ref" : " #/components/schemas/BaseMessage"
271
258
},
272
- "reactions" : {
259
+ {
273
260
"type" : " object" ,
274
- "additionalProperties" : {
275
- "type" : " integer" ,
276
- "format" : " int64"
261
+ "required" : [
262
+ " id" ,
263
+ " isReplyable" ,
264
+ " markdown" ,
265
+ " reactions" ,
266
+ " referenceId" ,
267
+ " timestamp" ,
268
+ " token"
269
+ ],
270
+ "properties" : {
271
+ "deleted" : {
272
+ "type" : " boolean" ,
273
+ "enum" : [
274
+ true
275
+ ]
276
+ },
277
+ "id" : {
278
+ "type" : " integer" ,
279
+ "format" : " int64"
280
+ },
281
+ "isReplyable" : {
282
+ "type" : " boolean"
283
+ },
284
+ "markdown" : {
285
+ "type" : " boolean"
286
+ },
287
+ "reactions" : {
288
+ "type" : " object" ,
289
+ "additionalProperties" : {
290
+ "type" : " integer" ,
291
+ "format" : " int64"
292
+ }
293
+ },
294
+ "referenceId" : {
295
+ "type" : " string"
296
+ },
297
+ "timestamp" : {
298
+ "type" : " integer" ,
299
+ "format" : " int64"
300
+ },
301
+ "token" : {
302
+ "type" : " string"
303
+ },
304
+ "lastEditActorDisplayName" : {
305
+ "type" : " string"
306
+ },
307
+ "lastEditActorId" : {
308
+ "type" : " string"
309
+ },
310
+ "lastEditActorType" : {
311
+ "type" : " string"
312
+ },
313
+ "lastEditTimestamp" : {
314
+ "type" : " integer" ,
315
+ "format" : " int64"
316
+ },
317
+ "silent" : {
318
+ "type" : " boolean"
319
+ }
277
320
}
278
- },
279
- "referenceId" : {
280
- "type" : " string"
281
- },
282
- "systemMessage" : {
283
- "type" : " string"
284
- },
285
- "timestamp" : {
286
- "type" : " integer" ,
287
- "format" : " int64"
288
- },
289
- "token" : {
290
- "type" : " string"
291
- },
292
- "lastEditActorDisplayName" : {
293
- "type" : " string"
294
- },
295
- "lastEditActorId" : {
296
- "type" : " string"
297
- },
298
- "lastEditActorType" : {
299
- "type" : " string"
300
- },
301
- "lastEditTimestamp" : {
302
- "type" : " integer" ,
303
- "format" : " int64"
304
- },
305
- "silent" : {
306
- "type" : " boolean"
307
321
}
308
- }
322
+ ]
323
+ },
324
+ "ChatProxyMessage" : {
325
+ "$ref" : " #/components/schemas/BaseMessage"
309
326
},
310
327
"OCSMeta" : {
311
328
"type" : " object" ,
712
729
"$ref" : " #/components/schemas/ChatMessage"
713
730
},
714
731
{
715
- "$ref" : " #/components/schemas/RoomProxyMessage "
732
+ "$ref" : " #/components/schemas/ChatProxyMessage "
716
733
}
717
734
]
718
- },
719
- "RoomProxyMessage" : {
720
- "type" : " object" ,
721
- "required" : [
722
- " actorDisplayName" ,
723
- " actorId" ,
724
- " actorType" ,
725
- " expirationTimestamp" ,
726
- " message" ,
727
- " messageParameters" ,
728
- " messageType" ,
729
- " systemMessage"
730
- ],
731
- "properties" : {
732
- "actorDisplayName" : {
733
- "type" : " string"
734
- },
735
- "actorId" : {
736
- "type" : " string"
737
- },
738
- "actorType" : {
739
- "type" : " string"
740
- },
741
- "expirationTimestamp" : {
742
- "type" : " integer" ,
743
- "format" : " int64"
744
- },
745
- "message" : {
746
- "type" : " string"
747
- },
748
- "messageParameters" : {
749
- "type" : " object" ,
750
- "additionalProperties" : {
751
- "$ref" : " #/components/schemas/RichObjectParameter"
752
- }
753
- },
754
- "messageType" : {
755
- "type" : " string"
756
- },
757
- "systemMessage" : {
758
- "type" : " string"
759
- }
760
- }
761
735
}
762
736
}
763
737
},
You can’t perform that action at this time.
0 commit comments