rozod 6.7.0 → 6.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/endpoints/accountinformationv1.d.ts +50 -87
- package/lib/endpoints/accountinformationv1.js +46 -90
- package/lib/endpoints/assetdeliveryv1.d.ts +1 -0
- package/lib/endpoints/assetdeliveryv1.js +1 -0
- package/lib/endpoints/assetdeliveryv2.d.ts +1 -0
- package/lib/endpoints/assetdeliveryv2.js +1 -0
- package/lib/endpoints/authv1.d.ts +64 -1
- package/lib/endpoints/authv1.js +67 -3
- package/lib/endpoints/authv2.d.ts +21 -0
- package/lib/endpoints/authv2.js +22 -1
- package/lib/endpoints/avatarv1.d.ts +9 -6
- package/lib/endpoints/avatarv1.js +9 -6
- package/lib/endpoints/avatarv2.d.ts +11 -5
- package/lib/endpoints/avatarv2.js +11 -5
- package/lib/endpoints/avatarv3.d.ts +16 -7
- package/lib/endpoints/avatarv3.js +16 -7
- package/lib/endpoints/catalogv1.d.ts +23 -2
- package/lib/endpoints/catalogv1.js +19 -2
- package/lib/endpoints/catalogv2.d.ts +242 -6
- package/lib/endpoints/catalogv2.js +235 -7
- package/lib/endpoints/chatv2.d.ts +778 -778
- package/lib/endpoints/clientsettingsv2.d.ts +6 -0
- package/lib/endpoints/clientsettingsv2.js +6 -0
- package/lib/endpoints/contactsv1.d.ts +18 -22
- package/lib/endpoints/contactsv1.js +14 -22
- package/lib/endpoints/developv1.d.ts +33 -1
- package/lib/endpoints/developv1.js +9 -3
- package/lib/endpoints/developv2.d.ts +29 -2
- package/lib/endpoints/developv2.js +13 -4
- package/lib/endpoints/gameinternationalizationv1.d.ts +59 -0
- package/lib/endpoints/gameinternationalizationv1.js +57 -1
- package/lib/endpoints/gamejoinv1.d.ts +458 -458
- package/lib/endpoints/gamesv1.d.ts +77 -0
- package/lib/endpoints/gamesv1.js +68 -97
- package/lib/endpoints/gamesv2.d.ts +1 -0
- package/lib/endpoints/gamesv2.js +1 -0
- package/lib/endpoints/groupsv1.d.ts +7 -3
- package/lib/endpoints/groupsv1.js +7 -3
- package/lib/endpoints/groupsv2.d.ts +1 -0
- package/lib/endpoints/groupsv2.js +1 -0
- package/lib/endpoints/inventoryv2.d.ts +68 -0
- package/lib/endpoints/inventoryv2.js +66 -1
- package/lib/endpoints/localev1.d.ts +27 -0
- package/lib/endpoints/localev1.js +28 -1
- package/lib/endpoints/metricsv1.d.ts +88 -88
- package/lib/endpoints/publishv1.d.ts +3 -6
- package/lib/endpoints/publishv1.js +3 -6
- package/lib/opencloud/v2/cloud.d.ts +27 -5
- package/lib/opencloud/v2/cloud.js +43 -6
- package/package.json +108 -108
|
@@ -1,778 +1,778 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { endpoint } from '..';
|
|
3
|
-
|
|
4
|
-
const Roblox_Chat_Api_Models_ChatSettingsResponse = z.object({
|
|
5
|
-
chatEnabled: z.boolean(),
|
|
6
|
-
isActiveChatUser: z.boolean(),
|
|
7
|
-
isConnectTabEnabled: z.boolean(),
|
|
8
|
-
});
|
|
9
|
-
const Roblox_Chat_Api_Models_ChatParticipant = z.object({
|
|
10
|
-
type: z.enum(['User', 'System']),
|
|
11
|
-
targetId: z.number().int(),
|
|
12
|
-
name: z.string(),
|
|
13
|
-
displayName: z.string(),
|
|
14
|
-
hasVerifiedBadge: z.boolean(),
|
|
15
|
-
});
|
|
16
|
-
const Roblox_Chat_Api_Models_ConversationTitle = z.object({
|
|
17
|
-
titleForViewer: z.string(),
|
|
18
|
-
isDefaultTitle: z.boolean(),
|
|
19
|
-
});
|
|
20
|
-
const Roblox_Chat_Api_Models_ConversationUniverse = z.object({
|
|
21
|
-
universeId: z.number().int(),
|
|
22
|
-
rootPlaceId: z.number().int(),
|
|
23
|
-
});
|
|
24
|
-
const Roblox_Chat_Api_Models_Conversation = z.object({
|
|
25
|
-
id: z.number().int(),
|
|
26
|
-
title: z.string(),
|
|
27
|
-
initiator: Roblox_Chat_Api_Models_ChatParticipant,
|
|
28
|
-
hasUnreadMessages: z.boolean(),
|
|
29
|
-
participants: z.array(Roblox_Chat_Api_Models_ChatParticipant),
|
|
30
|
-
conversationType: z.enum(['OneToOneConversation', 'MultiUserConversation', 'CloudEditConversation']),
|
|
31
|
-
conversationTitle: Roblox_Chat_Api_Models_ConversationTitle,
|
|
32
|
-
lastUpdated: z.string().datetime({ offset: true }),
|
|
33
|
-
conversationUniverse: Roblox_Chat_Api_Models_ConversationUniverse,
|
|
34
|
-
});
|
|
35
|
-
const Roblox_Chat_Api_Models_GameLink = z.object({
|
|
36
|
-
universeId: z.number().int(),
|
|
37
|
-
});
|
|
38
|
-
const Roblox_Chat_Api_Models_Link = z.object({
|
|
39
|
-
type: z.literal('Game'),
|
|
40
|
-
game: Roblox_Chat_Api_Models_GameLink,
|
|
41
|
-
});
|
|
42
|
-
const Roblox_Chat_Api_Models_SetConversationUniverseEventBased = z.object({
|
|
43
|
-
actorUserId: z.number().int(),
|
|
44
|
-
universeId: z.number().int(),
|
|
45
|
-
});
|
|
46
|
-
const Roblox_Chat_Api_Models_EventBased = z.object({
|
|
47
|
-
type: z.literal('SetConversationUniverse'),
|
|
48
|
-
setConversationUniverse: Roblox_Chat_Api_Models_SetConversationUniverseEventBased,
|
|
49
|
-
});
|
|
50
|
-
const Roblox_Chat_Api_Models_ChatMessage = z.object({
|
|
51
|
-
id: z.string().uuid(),
|
|
52
|
-
senderType: z.enum(['User', 'System']),
|
|
53
|
-
sent: z.string().datetime({ offset: true }),
|
|
54
|
-
read: z.boolean(),
|
|
55
|
-
messageType: z.enum(['PlainText', 'Link', 'EventBased']),
|
|
56
|
-
decorators: z.array(z.string()),
|
|
57
|
-
senderTargetId: z.number().int(),
|
|
58
|
-
content: z.string(),
|
|
59
|
-
link: Roblox_Chat_Api_Models_Link,
|
|
60
|
-
eventBased: Roblox_Chat_Api_Models_EventBased,
|
|
61
|
-
});
|
|
62
|
-
const Roblox_Chat_Api_Models_RolloutSettingModel = z.object({
|
|
63
|
-
featureName: z.enum(['LuaChat', 'ConversationUniverse', 'PlayTogether', 'Party', 'GameLink', 'OldPlayTogether']),
|
|
64
|
-
isRolloutEnabled: z.boolean(),
|
|
65
|
-
});
|
|
66
|
-
const Roblox_Chat_Api_Models_RolloutSettingsResponse = z.object({
|
|
67
|
-
rolloutFeatures: z.array(Roblox_Chat_Api_Models_RolloutSettingModel),
|
|
68
|
-
});
|
|
69
|
-
const Roblox_Chat_Api_Models_UnreadConversationCountResponse = z.object({
|
|
70
|
-
count: z.number().int(),
|
|
71
|
-
});
|
|
72
|
-
const Roblox_Chat_Api_Models_MultigetConversationMessagesResponse = z.object({
|
|
73
|
-
conversationId: z.number().int(),
|
|
74
|
-
chatMessages: z.array(Roblox_Chat_Api_Models_ChatMessage),
|
|
75
|
-
});
|
|
76
|
-
const Roblox_Chat_Api_Models_ChatMetadataResponse = z.object({
|
|
77
|
-
isChatEnabledByPrivacySetting: z.union([z.literal(0), z.literal(1), z.literal(2)]),
|
|
78
|
-
languageForPrivacySettingUnavailable: z.string(),
|
|
79
|
-
maxConversationTitleLength: z.number().int(),
|
|
80
|
-
numberOfMembersForPartyChrome: z.number().int(),
|
|
81
|
-
partyChromeDisplayTimeStampInterval: z.number().int(),
|
|
82
|
-
signalRDisconnectionResponseInMilliseconds: z.number().int(),
|
|
83
|
-
typingInChatFromSenderThrottleMs: z.number().int(),
|
|
84
|
-
typingInChatForReceiverExpirationMs: z.number().int(),
|
|
85
|
-
relativeValueToRecordUiPerformance: z.number(),
|
|
86
|
-
isChatDataFromLocalStorageEnabled: z.boolean(),
|
|
87
|
-
chatDataFromLocalStorageExpirationSeconds: z.number().int(),
|
|
88
|
-
isUsingCacheToLoadFriendsInfoEnabled: z.boolean(),
|
|
89
|
-
cachedDataFromLocalStorageExpirationMS: z.number().int(),
|
|
90
|
-
senderTypesForUnknownMessageTypeError: z.array(z.string()),
|
|
91
|
-
isInvalidMessageTypeFallbackEnabled: z.boolean(),
|
|
92
|
-
isRespectingMessageTypeEnabled: z.boolean(),
|
|
93
|
-
validMessageTypesWhiteList: z.array(z.string()),
|
|
94
|
-
shouldRespectConversationHasUnreadMessageToMarkAsRead: z.boolean(),
|
|
95
|
-
isAliasChatForClientSideEnabled: z.boolean(),
|
|
96
|
-
isPlayTogetherForGameCardsEnabled: z.boolean(),
|
|
97
|
-
isRoactChatEnabled: z.boolean(),
|
|
98
|
-
webChatEventSampleRate: z.number().int(),
|
|
99
|
-
isPlatformChatApiEnabled: z.boolean(),
|
|
100
|
-
});
|
|
101
|
-
const Roblox_Chat_Api_Models_AddUsersToConversationRequest = z.object({
|
|
102
|
-
participantUserIds: z.array(z.number()),
|
|
103
|
-
conversationId: z.number().int(),
|
|
104
|
-
});
|
|
105
|
-
const Roblox_Chat_Api_Models_RejectedChatParticipant = z.object({
|
|
106
|
-
rejectedReason: z.string(),
|
|
107
|
-
type: z.enum(['User', 'System']),
|
|
108
|
-
targetId: z.number().int(),
|
|
109
|
-
name: z.string(),
|
|
110
|
-
displayName: z.string(),
|
|
111
|
-
hasVerifiedBadge: z.boolean(),
|
|
112
|
-
});
|
|
113
|
-
const Roblox_Chat_Api_Models_AddUserToConversationResponse = z.object({
|
|
114
|
-
conversationId: z.number().int(),
|
|
115
|
-
rejectedParticipants: z.array(Roblox_Chat_Api_Models_RejectedChatParticipant),
|
|
116
|
-
resultType: z.literal('Success'),
|
|
117
|
-
statusMessage: z.string(),
|
|
118
|
-
});
|
|
119
|
-
const Roblox_Chat_Api_Models_MarkAsReadRequest = z.object({
|
|
120
|
-
conversationId: z.number().int(),
|
|
121
|
-
endMessageId: z.string(),
|
|
122
|
-
});
|
|
123
|
-
const Roblox_Chat_Api_Models_MarkAsReadResponse = z.object({
|
|
124
|
-
resultType: z.literal('Success'),
|
|
125
|
-
});
|
|
126
|
-
const Roblox_Chat_Api_Models_MarkAsSeenRequest = z.object({
|
|
127
|
-
conversationsToMarkSeen: z.array(z.number()),
|
|
128
|
-
});
|
|
129
|
-
const Roblox_Chat_Api_Models_MarkAsSeenResponse = z.object({
|
|
130
|
-
resultType: z.literal('Success'),
|
|
131
|
-
});
|
|
132
|
-
const Roblox_Chat_Api_Models_RemoveUserFromConversationRequest = z.object({
|
|
133
|
-
participantUserId: z.number().int(),
|
|
134
|
-
conversationId: z.number().int(),
|
|
135
|
-
});
|
|
136
|
-
const Roblox_Chat_Api_Models_RemoveUserFromConversationResponse = z.object({
|
|
137
|
-
conversationId: z.number().int(),
|
|
138
|
-
resultType: z.literal('Success'),
|
|
139
|
-
statusMessage: z.string(),
|
|
140
|
-
});
|
|
141
|
-
const Roblox_Chat_Api_Models_RenameGroupConversationRequest = z.object({
|
|
142
|
-
conversationId: z.number().int(),
|
|
143
|
-
newTitle: z.string(),
|
|
144
|
-
});
|
|
145
|
-
const Roblox_Chat_Api_Models_RenameConversationResponse = z.object({
|
|
146
|
-
conversationTitle: z.string(),
|
|
147
|
-
resultType: z.enum(['Success', 'Moderated', 'TextTooLong']),
|
|
148
|
-
title: Roblox_Chat_Api_Models_ConversationTitle,
|
|
149
|
-
statusMessage: z.string(),
|
|
150
|
-
});
|
|
151
|
-
const Roblox_Chat_Api_Models_SendGameLinkChatMessageRequest = z.object({
|
|
152
|
-
universeId: z.number().int(),
|
|
153
|
-
isExperienceInvite: z.boolean(),
|
|
154
|
-
userId: z.number().int(),
|
|
155
|
-
placeId: z.number().int(),
|
|
156
|
-
conversationId: z.number().int(),
|
|
157
|
-
decorators: z.array(z.string()),
|
|
158
|
-
});
|
|
159
|
-
const Roblox_Chat_Api_Models_SendLinkChatResponse = z.object({
|
|
160
|
-
chatMessageLinkType: z.literal('Game'),
|
|
161
|
-
messageId: z.string(),
|
|
162
|
-
sent: z.string().datetime({ offset: true }),
|
|
163
|
-
messageType: z.enum(['PlainText', 'Link', 'EventBased']),
|
|
164
|
-
resultType: z.enum(['Success', 'Moderated', 'TextTooLong', 'NoRealtimeConnection']),
|
|
165
|
-
statusMessage: z.string(),
|
|
166
|
-
});
|
|
167
|
-
const Roblox_Chat_Api_Models_SendPlainTextChatMessageRequest = z.object({
|
|
168
|
-
message: z.string(),
|
|
169
|
-
isExperienceInvite: z.boolean(),
|
|
170
|
-
userId: z.number().int(),
|
|
171
|
-
conversationId: z.number().int(),
|
|
172
|
-
decorators: z.array(z.string()),
|
|
173
|
-
});
|
|
174
|
-
const Roblox_Chat_Api_Models_SendPlainTextChatMessageResponse = z.object({
|
|
175
|
-
content: z.string(),
|
|
176
|
-
filteredForReceivers: z.boolean(),
|
|
177
|
-
messageId: z.string(),
|
|
178
|
-
sent: z.string().datetime({ offset: true }),
|
|
179
|
-
messageType: z.enum(['PlainText', 'Link', 'EventBased']),
|
|
180
|
-
resultType: z.enum(['Success', 'Moderated', 'TextTooLong', 'NoRealtimeConnection']),
|
|
181
|
-
statusMessage: z.string(),
|
|
182
|
-
});
|
|
183
|
-
const Roblox_Chat_Api_Models_CreateCloudEditConversationRequest = z.object({
|
|
184
|
-
placeId: z.number().int(),
|
|
185
|
-
});
|
|
186
|
-
const Roblox_Chat_Api_Models_StartNewConversationResponse = z.object({
|
|
187
|
-
conversation: Roblox_Chat_Api_Models_Conversation,
|
|
188
|
-
rejectedParticipants: z.array(Roblox_Chat_Api_Models_RejectedChatParticipant),
|
|
189
|
-
resultType: z.literal('Success'),
|
|
190
|
-
statusMessage: z.string(),
|
|
191
|
-
});
|
|
192
|
-
const Roblox_Chat_Api_Models_CreateGroupConversationRequest = z.object({
|
|
193
|
-
participantUserIds: z.array(z.number()),
|
|
194
|
-
title: z.string(),
|
|
195
|
-
});
|
|
196
|
-
const Roblox_Chat_Api_Models_CreateOneToOneConversationRequest = z.object({
|
|
197
|
-
participantUserId: z.number().int(),
|
|
198
|
-
});
|
|
199
|
-
const Roblox_Chat_Api_Models_UpdateUserTypingStatusRequest = z.object({
|
|
200
|
-
conversationId: z.number().int(),
|
|
201
|
-
isTyping: z.boolean(),
|
|
202
|
-
});
|
|
203
|
-
const Roblox_Chat_Api_Models_UserVisibleStatusResponse = z.object({
|
|
204
|
-
statusMessage: z.string(),
|
|
205
|
-
});
|
|
206
|
-
|
|
207
|
-
/**
|
|
208
|
-
* @api POST https://chat.roblox.com/v2/add-to-conversation
|
|
209
|
-
* @summary Adds users to an existing conversation
|
|
210
|
-
* @param body
|
|
211
|
-
*/
|
|
212
|
-
export const postAddToConversation = endpoint({
|
|
213
|
-
method: 'POST',
|
|
214
|
-
path: '/v2/add-to-conversation',
|
|
215
|
-
baseUrl: 'https://chat.roblox.com',
|
|
216
|
-
requestFormat: 'json',
|
|
217
|
-
serializationMethod: {
|
|
218
|
-
body: {},
|
|
219
|
-
},
|
|
220
|
-
parameters: {},
|
|
221
|
-
body: Roblox_Chat_Api_Models_AddUsersToConversationRequest,
|
|
222
|
-
response: Roblox_Chat_Api_Models_AddUserToConversationResponse,
|
|
223
|
-
errors: [
|
|
224
|
-
{
|
|
225
|
-
status: 401,
|
|
226
|
-
description: `0: Authorization has been denied for this request.`,
|
|
227
|
-
},
|
|
228
|
-
{
|
|
229
|
-
status: 403,
|
|
230
|
-
description: `0: Token Validation Failed`,
|
|
231
|
-
},
|
|
232
|
-
],
|
|
233
|
-
});
|
|
234
|
-
/**
|
|
235
|
-
* @api GET https://chat.roblox.com/v2/chat-settings
|
|
236
|
-
* @summary For every authenticated user, the clients hit this endpoint to get the chat related settings. Example : Chat is enabled or not
|
|
237
|
-
*/
|
|
238
|
-
export const getChatSettings = endpoint({
|
|
239
|
-
method: 'GET',
|
|
240
|
-
path: '/v2/chat-settings',
|
|
241
|
-
baseUrl: 'https://chat.roblox.com',
|
|
242
|
-
requestFormat: 'json',
|
|
243
|
-
response: Roblox_Chat_Api_Models_ChatSettingsResponse,
|
|
244
|
-
errors: [
|
|
245
|
-
{
|
|
246
|
-
status: 401,
|
|
247
|
-
description: `0: Authorization has been denied for this request.`,
|
|
248
|
-
},
|
|
249
|
-
],
|
|
250
|
-
});
|
|
251
|
-
/**
|
|
252
|
-
* @api GET https://chat.roblox.com/v2/get-conversations
|
|
253
|
-
* @summary Gets conversations for the conversationIds specified in the parameters
|
|
254
|
-
* @param conversationIds Ids of the conversations to be returned
|
|
255
|
-
*/
|
|
256
|
-
export const getGetConversations = endpoint({
|
|
257
|
-
method: 'GET',
|
|
258
|
-
path: '/v2/get-conversations',
|
|
259
|
-
baseUrl: 'https://chat.roblox.com',
|
|
260
|
-
requestFormat: 'json',
|
|
261
|
-
serializationMethod: {
|
|
262
|
-
conversationIds: {
|
|
263
|
-
style: 'form',
|
|
264
|
-
explode: true,
|
|
265
|
-
},
|
|
266
|
-
},
|
|
267
|
-
parameters: {
|
|
268
|
-
conversationIds: z.array(z.number()),
|
|
269
|
-
},
|
|
270
|
-
response: z.array(Roblox_Chat_Api_Models_Conversation),
|
|
271
|
-
errors: [
|
|
272
|
-
{
|
|
273
|
-
status: 401,
|
|
274
|
-
description: `0: Authorization has been denied for this request.`,
|
|
275
|
-
},
|
|
276
|
-
],
|
|
277
|
-
});
|
|
278
|
-
/**
|
|
279
|
-
* @api GET https://chat.roblox.com/v2/get-messages
|
|
280
|
-
* @summary Gets messages corresponding to the given conversationId
|
|
281
|
-
* @param conversationId
|
|
282
|
-
* @param pageSize
|
|
283
|
-
* @param exclusiveStartMessageId
|
|
284
|
-
*/
|
|
285
|
-
export const getGetMessages = endpoint({
|
|
286
|
-
method: 'GET',
|
|
287
|
-
path: '/v2/get-messages',
|
|
288
|
-
baseUrl: 'https://chat.roblox.com',
|
|
289
|
-
requestFormat: 'json',
|
|
290
|
-
serializationMethod: {
|
|
291
|
-
conversationId: {
|
|
292
|
-
style: 'form',
|
|
293
|
-
explode: true,
|
|
294
|
-
},
|
|
295
|
-
pageSize: {
|
|
296
|
-
style: 'form',
|
|
297
|
-
explode: true,
|
|
298
|
-
},
|
|
299
|
-
exclusiveStartMessageId: {
|
|
300
|
-
style: 'form',
|
|
301
|
-
explode: true,
|
|
302
|
-
},
|
|
303
|
-
},
|
|
304
|
-
parameters: {
|
|
305
|
-
conversationId: z.number().int(),
|
|
306
|
-
pageSize: z.number().int(),
|
|
307
|
-
exclusiveStartMessageId: z.string().optional(),
|
|
308
|
-
},
|
|
309
|
-
response: z.array(Roblox_Chat_Api_Models_ChatMessage),
|
|
310
|
-
errors: [
|
|
311
|
-
{
|
|
312
|
-
status: 401,
|
|
313
|
-
description: `0: Authorization has been denied for this request.`,
|
|
314
|
-
},
|
|
315
|
-
],
|
|
316
|
-
});
|
|
317
|
-
/**
|
|
318
|
-
* @api GET https://chat.roblox.com/v2/get-rollout-settings
|
|
319
|
-
* @summary Gets the rollout settings for requested feature
|
|
320
|
-
* @param featureNames string array to request feature rollout settings
|
|
321
|
-
*/
|
|
322
|
-
export const getGetRolloutSettings = endpoint({
|
|
323
|
-
method: 'GET',
|
|
324
|
-
path: '/v2/get-rollout-settings',
|
|
325
|
-
baseUrl: 'https://chat.roblox.com',
|
|
326
|
-
requestFormat: 'json',
|
|
327
|
-
serializationMethod: {
|
|
328
|
-
featureNames: {
|
|
329
|
-
style: 'form',
|
|
330
|
-
explode: true,
|
|
331
|
-
},
|
|
332
|
-
},
|
|
333
|
-
parameters: {
|
|
334
|
-
featureNames: z.array(z.string()),
|
|
335
|
-
},
|
|
336
|
-
response: Roblox_Chat_Api_Models_RolloutSettingsResponse,
|
|
337
|
-
errors: [
|
|
338
|
-
{
|
|
339
|
-
status: 401,
|
|
340
|
-
description: `0: Authorization has been denied for this request.`,
|
|
341
|
-
},
|
|
342
|
-
],
|
|
343
|
-
});
|
|
344
|
-
/**
|
|
345
|
-
* @api GET https://chat.roblox.com/v2/get-unread-conversation-count
|
|
346
|
-
* @summary Gets the count of unread conversations
|
|
347
|
-
*/
|
|
348
|
-
export const getGetUnreadConversationCount = endpoint({
|
|
349
|
-
method: 'GET',
|
|
350
|
-
path: '/v2/get-unread-conversation-count',
|
|
351
|
-
baseUrl: 'https://chat.roblox.com',
|
|
352
|
-
requestFormat: 'json',
|
|
353
|
-
response: z.object({ count: z.number().int() }),
|
|
354
|
-
errors: [
|
|
355
|
-
{
|
|
356
|
-
status: 401,
|
|
357
|
-
description: `0: Authorization has been denied for this request.`,
|
|
358
|
-
},
|
|
359
|
-
],
|
|
360
|
-
});
|
|
361
|
-
/**
|
|
362
|
-
* @api GET https://chat.roblox.com/v2/get-unread-conversations
|
|
363
|
-
* @summary Gets a list of unread conversations
|
|
364
|
-
* @param pageNumber
|
|
365
|
-
* @param pageSize
|
|
366
|
-
*/
|
|
367
|
-
export const getGetUnreadConversations = endpoint({
|
|
368
|
-
method: 'GET',
|
|
369
|
-
path: '/v2/get-unread-conversations',
|
|
370
|
-
baseUrl: 'https://chat.roblox.com',
|
|
371
|
-
requestFormat: 'json',
|
|
372
|
-
serializationMethod: {
|
|
373
|
-
pageNumber: {
|
|
374
|
-
style: 'form',
|
|
375
|
-
explode: true,
|
|
376
|
-
},
|
|
377
|
-
pageSize: {
|
|
378
|
-
style: 'form',
|
|
379
|
-
explode: true,
|
|
380
|
-
},
|
|
381
|
-
},
|
|
382
|
-
parameters: {
|
|
383
|
-
pageNumber: z.number().int(),
|
|
384
|
-
pageSize: z.number().int(),
|
|
385
|
-
},
|
|
386
|
-
response: z.array(Roblox_Chat_Api_Models_Conversation),
|
|
387
|
-
errors: [
|
|
388
|
-
{
|
|
389
|
-
status: 401,
|
|
390
|
-
description: `0: Authorization has been denied for this request.`,
|
|
391
|
-
},
|
|
392
|
-
],
|
|
393
|
-
});
|
|
394
|
-
/**
|
|
395
|
-
* @api GET https://chat.roblox.com/v2/get-unread-messages
|
|
396
|
-
* @summary Gets the unread messages for the conversationIds specified in the parameters
|
|
397
|
-
* @param conversationIds
|
|
398
|
-
* @param pageSize
|
|
399
|
-
*/
|
|
400
|
-
export const getGetUnreadMessages = endpoint({
|
|
401
|
-
method: 'GET',
|
|
402
|
-
path: '/v2/get-unread-messages',
|
|
403
|
-
baseUrl: 'https://chat.roblox.com',
|
|
404
|
-
requestFormat: 'json',
|
|
405
|
-
serializationMethod: {
|
|
406
|
-
conversationIds: {
|
|
407
|
-
style: 'form',
|
|
408
|
-
explode: true,
|
|
409
|
-
},
|
|
410
|
-
pageSize: {
|
|
411
|
-
style: 'form',
|
|
412
|
-
explode: true,
|
|
413
|
-
},
|
|
414
|
-
},
|
|
415
|
-
parameters: {
|
|
416
|
-
conversationIds: z.array(z.number()),
|
|
417
|
-
pageSize: z.number().int(),
|
|
418
|
-
},
|
|
419
|
-
response: z.array(Roblox_Chat_Api_Models_MultigetConversationMessagesResponse),
|
|
420
|
-
errors: [
|
|
421
|
-
{
|
|
422
|
-
status: 401,
|
|
423
|
-
description: `0: Authorization has been denied for this request.`,
|
|
424
|
-
},
|
|
425
|
-
],
|
|
426
|
-
});
|
|
427
|
-
/**
|
|
428
|
-
* @api GET https://chat.roblox.com/v2/get-user-conversations
|
|
429
|
-
* @summary Gets all conversations associated with the logged-in User
|
|
430
|
-
* @param pageNumber
|
|
431
|
-
* @param pageSize
|
|
432
|
-
*/
|
|
433
|
-
export const getGetUserConversations = endpoint({
|
|
434
|
-
method: 'GET',
|
|
435
|
-
path: '/v2/get-user-conversations',
|
|
436
|
-
baseUrl: 'https://chat.roblox.com',
|
|
437
|
-
requestFormat: 'json',
|
|
438
|
-
serializationMethod: {
|
|
439
|
-
pageNumber: {
|
|
440
|
-
style: 'form',
|
|
441
|
-
explode: true,
|
|
442
|
-
},
|
|
443
|
-
pageSize: {
|
|
444
|
-
style: 'form',
|
|
445
|
-
explode: true,
|
|
446
|
-
},
|
|
447
|
-
},
|
|
448
|
-
parameters: {
|
|
449
|
-
pageNumber: z.number().int(),
|
|
450
|
-
pageSize: z.number().int(),
|
|
451
|
-
},
|
|
452
|
-
response: z.array(Roblox_Chat_Api_Models_Conversation),
|
|
453
|
-
errors: [
|
|
454
|
-
{
|
|
455
|
-
status: 401,
|
|
456
|
-
description: `0: Authorization has been denied for this request.`,
|
|
457
|
-
},
|
|
458
|
-
],
|
|
459
|
-
});
|
|
460
|
-
/**
|
|
461
|
-
* @api POST https://chat.roblox.com/v2/mark-as-read
|
|
462
|
-
* @summary Mark the specified conversation messages as read
|
|
463
|
-
* @param body
|
|
464
|
-
*/
|
|
465
|
-
export const postMarkAsRead = endpoint({
|
|
466
|
-
method: 'POST',
|
|
467
|
-
path: '/v2/mark-as-read',
|
|
468
|
-
baseUrl: 'https://chat.roblox.com',
|
|
469
|
-
requestFormat: 'json',
|
|
470
|
-
serializationMethod: {
|
|
471
|
-
body: {},
|
|
472
|
-
},
|
|
473
|
-
parameters: {},
|
|
474
|
-
body: Roblox_Chat_Api_Models_MarkAsReadRequest,
|
|
475
|
-
response: Roblox_Chat_Api_Models_MarkAsReadResponse,
|
|
476
|
-
errors: [
|
|
477
|
-
{
|
|
478
|
-
status: 401,
|
|
479
|
-
description: `0: Authorization has been denied for this request.`,
|
|
480
|
-
},
|
|
481
|
-
{
|
|
482
|
-
status: 403,
|
|
483
|
-
description: `0: Token Validation Failed`,
|
|
484
|
-
},
|
|
485
|
-
],
|
|
486
|
-
});
|
|
487
|
-
/**
|
|
488
|
-
* @api POST https://chat.roblox.com/v2/mark-as-seen
|
|
489
|
-
* @summary Mark the specified conversation messages as seen
|
|
490
|
-
* @param body
|
|
491
|
-
*/
|
|
492
|
-
export const postMarkAsSeen = endpoint({
|
|
493
|
-
method: 'POST',
|
|
494
|
-
path: '/v2/mark-as-seen',
|
|
495
|
-
baseUrl: 'https://chat.roblox.com',
|
|
496
|
-
requestFormat: 'json',
|
|
497
|
-
serializationMethod: {
|
|
498
|
-
body: {},
|
|
499
|
-
},
|
|
500
|
-
parameters: {},
|
|
501
|
-
body: Roblox_Chat_Api_Models_MarkAsSeenRequest,
|
|
502
|
-
response: Roblox_Chat_Api_Models_MarkAsSeenResponse,
|
|
503
|
-
errors: [
|
|
504
|
-
{
|
|
505
|
-
status: 401,
|
|
506
|
-
description: `0: Authorization has been denied for this request.`,
|
|
507
|
-
},
|
|
508
|
-
{
|
|
509
|
-
status: 403,
|
|
510
|
-
description: `0: Token Validation Failed`,
|
|
511
|
-
},
|
|
512
|
-
],
|
|
513
|
-
});
|
|
514
|
-
/**
|
|
515
|
-
* @api GET https://chat.roblox.com/v2/metadata
|
|
516
|
-
* @summary Get Chat metadata.
|
|
517
|
-
*/
|
|
518
|
-
export const getMetadata = endpoint({
|
|
519
|
-
method: 'GET',
|
|
520
|
-
path: '/v2/metadata',
|
|
521
|
-
baseUrl: 'https://chat.roblox.com',
|
|
522
|
-
requestFormat: 'json',
|
|
523
|
-
response: Roblox_Chat_Api_Models_ChatMetadataResponse,
|
|
524
|
-
errors: [
|
|
525
|
-
{
|
|
526
|
-
status: 401,
|
|
527
|
-
description: `0: Authorization has been denied for this request.`,
|
|
528
|
-
},
|
|
529
|
-
],
|
|
530
|
-
});
|
|
531
|
-
/**
|
|
532
|
-
* @api GET https://chat.roblox.com/v2/multi-get-latest-messages
|
|
533
|
-
* @summary Gets latest messages corresponding to the given list of conversation Ids
|
|
534
|
-
* @param conversationIds
|
|
535
|
-
* @param pageSize
|
|
536
|
-
*/
|
|
537
|
-
export const getMultiGetLatestMessages = endpoint({
|
|
538
|
-
method: 'GET',
|
|
539
|
-
path: '/v2/multi-get-latest-messages',
|
|
540
|
-
baseUrl: 'https://chat.roblox.com',
|
|
541
|
-
requestFormat: 'json',
|
|
542
|
-
serializationMethod: {
|
|
543
|
-
conversationIds: {
|
|
544
|
-
style: 'form',
|
|
545
|
-
explode: true,
|
|
546
|
-
},
|
|
547
|
-
pageSize: {
|
|
548
|
-
style: 'form',
|
|
549
|
-
explode: true,
|
|
550
|
-
},
|
|
551
|
-
},
|
|
552
|
-
parameters: {
|
|
553
|
-
conversationIds: z.array(z.number()),
|
|
554
|
-
pageSize: z.number().int(),
|
|
555
|
-
},
|
|
556
|
-
response: z.array(Roblox_Chat_Api_Models_MultigetConversationMessagesResponse),
|
|
557
|
-
errors: [
|
|
558
|
-
{
|
|
559
|
-
status: 401,
|
|
560
|
-
description: `0: Authorization has been denied for this request.`,
|
|
561
|
-
},
|
|
562
|
-
],
|
|
563
|
-
});
|
|
564
|
-
/**
|
|
565
|
-
* @api POST https://chat.roblox.com/v2/remove-from-conversation
|
|
566
|
-
* @summary Removes a user from an existing conversation
|
|
567
|
-
* @param body
|
|
568
|
-
*/
|
|
569
|
-
export const postRemoveFromConversation = endpoint({
|
|
570
|
-
method: 'POST',
|
|
571
|
-
path: '/v2/remove-from-conversation',
|
|
572
|
-
baseUrl: 'https://chat.roblox.com',
|
|
573
|
-
requestFormat: 'json',
|
|
574
|
-
serializationMethod: {
|
|
575
|
-
body: {},
|
|
576
|
-
},
|
|
577
|
-
parameters: {},
|
|
578
|
-
body: Roblox_Chat_Api_Models_RemoveUserFromConversationRequest,
|
|
579
|
-
response: Roblox_Chat_Api_Models_RemoveUserFromConversationResponse,
|
|
580
|
-
errors: [
|
|
581
|
-
{
|
|
582
|
-
status: 401,
|
|
583
|
-
description: `0: Authorization has been denied for this request.`,
|
|
584
|
-
},
|
|
585
|
-
{
|
|
586
|
-
status: 403,
|
|
587
|
-
description: `0: Token Validation Failed`,
|
|
588
|
-
},
|
|
589
|
-
],
|
|
590
|
-
});
|
|
591
|
-
/**
|
|
592
|
-
* @api POST https://chat.roblox.com/v2/rename-group-conversation
|
|
593
|
-
* @summary Renames the title of an existing conversation
|
|
594
|
-
* @param body
|
|
595
|
-
*/
|
|
596
|
-
export const postRenameGroupConversation = endpoint({
|
|
597
|
-
method: 'POST',
|
|
598
|
-
path: '/v2/rename-group-conversation',
|
|
599
|
-
baseUrl: 'https://chat.roblox.com',
|
|
600
|
-
requestFormat: 'json',
|
|
601
|
-
serializationMethod: {
|
|
602
|
-
body: {},
|
|
603
|
-
},
|
|
604
|
-
parameters: {},
|
|
605
|
-
body: Roblox_Chat_Api_Models_RenameGroupConversationRequest,
|
|
606
|
-
response: Roblox_Chat_Api_Models_RenameConversationResponse,
|
|
607
|
-
errors: [
|
|
608
|
-
{
|
|
609
|
-
status: 401,
|
|
610
|
-
description: `0: Authorization has been denied for this request.`,
|
|
611
|
-
},
|
|
612
|
-
{
|
|
613
|
-
status: 403,
|
|
614
|
-
description: `0: Token Validation Failed`,
|
|
615
|
-
},
|
|
616
|
-
],
|
|
617
|
-
});
|
|
618
|
-
/**
|
|
619
|
-
* @api POST https://chat.roblox.com/v2/send-game-link-message
|
|
620
|
-
* @param body
|
|
621
|
-
*/
|
|
622
|
-
export const postSendGameLinkMessage = endpoint({
|
|
623
|
-
method: 'POST',
|
|
624
|
-
path: '/v2/send-game-link-message',
|
|
625
|
-
baseUrl: 'https://chat.roblox.com',
|
|
626
|
-
requestFormat: 'json',
|
|
627
|
-
serializationMethod: {
|
|
628
|
-
body: {},
|
|
629
|
-
},
|
|
630
|
-
parameters: {},
|
|
631
|
-
body: Roblox_Chat_Api_Models_SendGameLinkChatMessageRequest,
|
|
632
|
-
response: Roblox_Chat_Api_Models_SendLinkChatResponse,
|
|
633
|
-
errors: [
|
|
634
|
-
{
|
|
635
|
-
status: 401,
|
|
636
|
-
description: `0: Authorization has been denied for this request.`,
|
|
637
|
-
},
|
|
638
|
-
{
|
|
639
|
-
status: 403,
|
|
640
|
-
description: `0: Token Validation Failed`,
|
|
641
|
-
},
|
|
642
|
-
],
|
|
643
|
-
});
|
|
644
|
-
/**
|
|
645
|
-
* @api POST https://chat.roblox.com/v2/send-message
|
|
646
|
-
* @summary Sends a chat message
|
|
647
|
-
* @param body
|
|
648
|
-
*/
|
|
649
|
-
export const postSendMessage = endpoint({
|
|
650
|
-
method: 'POST',
|
|
651
|
-
path: '/v2/send-message',
|
|
652
|
-
baseUrl: 'https://chat.roblox.com',
|
|
653
|
-
requestFormat: 'json',
|
|
654
|
-
serializationMethod: {
|
|
655
|
-
body: {},
|
|
656
|
-
},
|
|
657
|
-
parameters: {},
|
|
658
|
-
body: Roblox_Chat_Api_Models_SendPlainTextChatMessageRequest,
|
|
659
|
-
response: Roblox_Chat_Api_Models_SendPlainTextChatMessageResponse,
|
|
660
|
-
errors: [
|
|
661
|
-
{
|
|
662
|
-
status: 401,
|
|
663
|
-
description: `0: Authorization has been denied for this request.`,
|
|
664
|
-
},
|
|
665
|
-
{
|
|
666
|
-
status: 403,
|
|
667
|
-
description: `0: Token Validation Failed`,
|
|
668
|
-
},
|
|
669
|
-
],
|
|
670
|
-
});
|
|
671
|
-
/**
|
|
672
|
-
* @api POST https://chat.roblox.com/v2/start-cloud-edit-conversation
|
|
673
|
-
* @summary Creates a new cloud edit conversation
|
|
674
|
-
* @param body
|
|
675
|
-
*/
|
|
676
|
-
export const postStartCloudEditConversation = endpoint({
|
|
677
|
-
method: 'POST',
|
|
678
|
-
path: '/v2/start-cloud-edit-conversation',
|
|
679
|
-
baseUrl: 'https://chat.roblox.com',
|
|
680
|
-
requestFormat: 'json',
|
|
681
|
-
serializationMethod: {
|
|
682
|
-
body: {},
|
|
683
|
-
},
|
|
684
|
-
parameters: {},
|
|
685
|
-
body: z.object({ placeId: z.number().int() }),
|
|
686
|
-
response: Roblox_Chat_Api_Models_StartNewConversationResponse,
|
|
687
|
-
errors: [
|
|
688
|
-
{
|
|
689
|
-
status: 401,
|
|
690
|
-
description: `0: Authorization has been denied for this request.`,
|
|
691
|
-
},
|
|
692
|
-
{
|
|
693
|
-
status: 403,
|
|
694
|
-
description: `0: Token Validation Failed`,
|
|
695
|
-
},
|
|
696
|
-
],
|
|
697
|
-
});
|
|
698
|
-
/**
|
|
699
|
-
* @api POST https://chat.roblox.com/v2/start-group-conversation
|
|
700
|
-
* @summary Creates a new group conversation
|
|
701
|
-
* @param body
|
|
702
|
-
*/
|
|
703
|
-
export const postStartGroupConversation = endpoint({
|
|
704
|
-
method: 'POST',
|
|
705
|
-
path: '/v2/start-group-conversation',
|
|
706
|
-
baseUrl: 'https://chat.roblox.com',
|
|
707
|
-
requestFormat: 'json',
|
|
708
|
-
serializationMethod: {
|
|
709
|
-
body: {},
|
|
710
|
-
},
|
|
711
|
-
parameters: {},
|
|
712
|
-
body: Roblox_Chat_Api_Models_CreateGroupConversationRequest,
|
|
713
|
-
response: Roblox_Chat_Api_Models_StartNewConversationResponse,
|
|
714
|
-
errors: [
|
|
715
|
-
{
|
|
716
|
-
status: 401,
|
|
717
|
-
description: `0: Authorization has been denied for this request.`,
|
|
718
|
-
},
|
|
719
|
-
{
|
|
720
|
-
status: 403,
|
|
721
|
-
description: `0: Token Validation Failed`,
|
|
722
|
-
},
|
|
723
|
-
],
|
|
724
|
-
});
|
|
725
|
-
/**
|
|
726
|
-
* @api POST https://chat.roblox.com/v2/start-one-to-one-conversation
|
|
727
|
-
* @summary Creates a new one-on-one conversation
|
|
728
|
-
* @param body
|
|
729
|
-
*/
|
|
730
|
-
export const postStartOneToOneConversation = endpoint({
|
|
731
|
-
method: 'POST',
|
|
732
|
-
path: '/v2/start-one-to-one-conversation',
|
|
733
|
-
baseUrl: 'https://chat.roblox.com',
|
|
734
|
-
requestFormat: 'json',
|
|
735
|
-
serializationMethod: {
|
|
736
|
-
body: {},
|
|
737
|
-
},
|
|
738
|
-
parameters: {},
|
|
739
|
-
body: z.object({ participantUserId: z.number().int() }),
|
|
740
|
-
response: Roblox_Chat_Api_Models_StartNewConversationResponse,
|
|
741
|
-
errors: [
|
|
742
|
-
{
|
|
743
|
-
status: 401,
|
|
744
|
-
description: `0: Authorization has been denied for this request.`,
|
|
745
|
-
},
|
|
746
|
-
{
|
|
747
|
-
status: 403,
|
|
748
|
-
description: `0: Token Validation Failed`,
|
|
749
|
-
},
|
|
750
|
-
],
|
|
751
|
-
});
|
|
752
|
-
/**
|
|
753
|
-
* @api POST https://chat.roblox.com/v2/update-user-typing-status
|
|
754
|
-
* @summary Updates the status for whether a user is typing currently
|
|
755
|
-
* @param body
|
|
756
|
-
*/
|
|
757
|
-
export const postUpdateUserTypingStatus = endpoint({
|
|
758
|
-
method: 'POST',
|
|
759
|
-
path: '/v2/update-user-typing-status',
|
|
760
|
-
baseUrl: 'https://chat.roblox.com',
|
|
761
|
-
requestFormat: 'json',
|
|
762
|
-
serializationMethod: {
|
|
763
|
-
body: {},
|
|
764
|
-
},
|
|
765
|
-
parameters: {},
|
|
766
|
-
body: Roblox_Chat_Api_Models_UpdateUserTypingStatusRequest,
|
|
767
|
-
response: z.object({ statusMessage: z.string() }),
|
|
768
|
-
errors: [
|
|
769
|
-
{
|
|
770
|
-
status: 401,
|
|
771
|
-
description: `0: Authorization has been denied for this request.`,
|
|
772
|
-
},
|
|
773
|
-
{
|
|
774
|
-
status: 403,
|
|
775
|
-
description: `0: Token Validation Failed`,
|
|
776
|
-
},
|
|
777
|
-
],
|
|
778
|
-
});
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { endpoint } from '..';
|
|
3
|
+
|
|
4
|
+
const Roblox_Chat_Api_Models_ChatSettingsResponse = z.object({
|
|
5
|
+
chatEnabled: z.boolean(),
|
|
6
|
+
isActiveChatUser: z.boolean(),
|
|
7
|
+
isConnectTabEnabled: z.boolean(),
|
|
8
|
+
});
|
|
9
|
+
const Roblox_Chat_Api_Models_ChatParticipant = z.object({
|
|
10
|
+
type: z.enum(['User', 'System']),
|
|
11
|
+
targetId: z.number().int(),
|
|
12
|
+
name: z.string(),
|
|
13
|
+
displayName: z.string(),
|
|
14
|
+
hasVerifiedBadge: z.boolean(),
|
|
15
|
+
});
|
|
16
|
+
const Roblox_Chat_Api_Models_ConversationTitle = z.object({
|
|
17
|
+
titleForViewer: z.string(),
|
|
18
|
+
isDefaultTitle: z.boolean(),
|
|
19
|
+
});
|
|
20
|
+
const Roblox_Chat_Api_Models_ConversationUniverse = z.object({
|
|
21
|
+
universeId: z.number().int(),
|
|
22
|
+
rootPlaceId: z.number().int(),
|
|
23
|
+
});
|
|
24
|
+
const Roblox_Chat_Api_Models_Conversation = z.object({
|
|
25
|
+
id: z.number().int(),
|
|
26
|
+
title: z.string(),
|
|
27
|
+
initiator: Roblox_Chat_Api_Models_ChatParticipant,
|
|
28
|
+
hasUnreadMessages: z.boolean(),
|
|
29
|
+
participants: z.array(Roblox_Chat_Api_Models_ChatParticipant),
|
|
30
|
+
conversationType: z.enum(['OneToOneConversation', 'MultiUserConversation', 'CloudEditConversation']),
|
|
31
|
+
conversationTitle: Roblox_Chat_Api_Models_ConversationTitle,
|
|
32
|
+
lastUpdated: z.string().datetime({ offset: true }),
|
|
33
|
+
conversationUniverse: Roblox_Chat_Api_Models_ConversationUniverse,
|
|
34
|
+
});
|
|
35
|
+
const Roblox_Chat_Api_Models_GameLink = z.object({
|
|
36
|
+
universeId: z.number().int(),
|
|
37
|
+
});
|
|
38
|
+
const Roblox_Chat_Api_Models_Link = z.object({
|
|
39
|
+
type: z.literal('Game'),
|
|
40
|
+
game: Roblox_Chat_Api_Models_GameLink,
|
|
41
|
+
});
|
|
42
|
+
const Roblox_Chat_Api_Models_SetConversationUniverseEventBased = z.object({
|
|
43
|
+
actorUserId: z.number().int(),
|
|
44
|
+
universeId: z.number().int(),
|
|
45
|
+
});
|
|
46
|
+
const Roblox_Chat_Api_Models_EventBased = z.object({
|
|
47
|
+
type: z.literal('SetConversationUniverse'),
|
|
48
|
+
setConversationUniverse: Roblox_Chat_Api_Models_SetConversationUniverseEventBased,
|
|
49
|
+
});
|
|
50
|
+
const Roblox_Chat_Api_Models_ChatMessage = z.object({
|
|
51
|
+
id: z.string().uuid(),
|
|
52
|
+
senderType: z.enum(['User', 'System']),
|
|
53
|
+
sent: z.string().datetime({ offset: true }),
|
|
54
|
+
read: z.boolean(),
|
|
55
|
+
messageType: z.enum(['PlainText', 'Link', 'EventBased']),
|
|
56
|
+
decorators: z.array(z.string()),
|
|
57
|
+
senderTargetId: z.number().int(),
|
|
58
|
+
content: z.string(),
|
|
59
|
+
link: Roblox_Chat_Api_Models_Link,
|
|
60
|
+
eventBased: Roblox_Chat_Api_Models_EventBased,
|
|
61
|
+
});
|
|
62
|
+
const Roblox_Chat_Api_Models_RolloutSettingModel = z.object({
|
|
63
|
+
featureName: z.enum(['LuaChat', 'ConversationUniverse', 'PlayTogether', 'Party', 'GameLink', 'OldPlayTogether']),
|
|
64
|
+
isRolloutEnabled: z.boolean(),
|
|
65
|
+
});
|
|
66
|
+
const Roblox_Chat_Api_Models_RolloutSettingsResponse = z.object({
|
|
67
|
+
rolloutFeatures: z.array(Roblox_Chat_Api_Models_RolloutSettingModel),
|
|
68
|
+
});
|
|
69
|
+
const Roblox_Chat_Api_Models_UnreadConversationCountResponse = z.object({
|
|
70
|
+
count: z.number().int(),
|
|
71
|
+
});
|
|
72
|
+
const Roblox_Chat_Api_Models_MultigetConversationMessagesResponse = z.object({
|
|
73
|
+
conversationId: z.number().int(),
|
|
74
|
+
chatMessages: z.array(Roblox_Chat_Api_Models_ChatMessage),
|
|
75
|
+
});
|
|
76
|
+
const Roblox_Chat_Api_Models_ChatMetadataResponse = z.object({
|
|
77
|
+
isChatEnabledByPrivacySetting: z.union([z.literal(0), z.literal(1), z.literal(2)]),
|
|
78
|
+
languageForPrivacySettingUnavailable: z.string(),
|
|
79
|
+
maxConversationTitleLength: z.number().int(),
|
|
80
|
+
numberOfMembersForPartyChrome: z.number().int(),
|
|
81
|
+
partyChromeDisplayTimeStampInterval: z.number().int(),
|
|
82
|
+
signalRDisconnectionResponseInMilliseconds: z.number().int(),
|
|
83
|
+
typingInChatFromSenderThrottleMs: z.number().int(),
|
|
84
|
+
typingInChatForReceiverExpirationMs: z.number().int(),
|
|
85
|
+
relativeValueToRecordUiPerformance: z.number(),
|
|
86
|
+
isChatDataFromLocalStorageEnabled: z.boolean(),
|
|
87
|
+
chatDataFromLocalStorageExpirationSeconds: z.number().int(),
|
|
88
|
+
isUsingCacheToLoadFriendsInfoEnabled: z.boolean(),
|
|
89
|
+
cachedDataFromLocalStorageExpirationMS: z.number().int(),
|
|
90
|
+
senderTypesForUnknownMessageTypeError: z.array(z.string()),
|
|
91
|
+
isInvalidMessageTypeFallbackEnabled: z.boolean(),
|
|
92
|
+
isRespectingMessageTypeEnabled: z.boolean(),
|
|
93
|
+
validMessageTypesWhiteList: z.array(z.string()),
|
|
94
|
+
shouldRespectConversationHasUnreadMessageToMarkAsRead: z.boolean(),
|
|
95
|
+
isAliasChatForClientSideEnabled: z.boolean(),
|
|
96
|
+
isPlayTogetherForGameCardsEnabled: z.boolean(),
|
|
97
|
+
isRoactChatEnabled: z.boolean(),
|
|
98
|
+
webChatEventSampleRate: z.number().int(),
|
|
99
|
+
isPlatformChatApiEnabled: z.boolean(),
|
|
100
|
+
});
|
|
101
|
+
const Roblox_Chat_Api_Models_AddUsersToConversationRequest = z.object({
|
|
102
|
+
participantUserIds: z.array(z.number()),
|
|
103
|
+
conversationId: z.number().int(),
|
|
104
|
+
});
|
|
105
|
+
const Roblox_Chat_Api_Models_RejectedChatParticipant = z.object({
|
|
106
|
+
rejectedReason: z.string(),
|
|
107
|
+
type: z.enum(['User', 'System']),
|
|
108
|
+
targetId: z.number().int(),
|
|
109
|
+
name: z.string(),
|
|
110
|
+
displayName: z.string(),
|
|
111
|
+
hasVerifiedBadge: z.boolean(),
|
|
112
|
+
});
|
|
113
|
+
const Roblox_Chat_Api_Models_AddUserToConversationResponse = z.object({
|
|
114
|
+
conversationId: z.number().int(),
|
|
115
|
+
rejectedParticipants: z.array(Roblox_Chat_Api_Models_RejectedChatParticipant),
|
|
116
|
+
resultType: z.literal('Success'),
|
|
117
|
+
statusMessage: z.string(),
|
|
118
|
+
});
|
|
119
|
+
const Roblox_Chat_Api_Models_MarkAsReadRequest = z.object({
|
|
120
|
+
conversationId: z.number().int(),
|
|
121
|
+
endMessageId: z.string(),
|
|
122
|
+
});
|
|
123
|
+
const Roblox_Chat_Api_Models_MarkAsReadResponse = z.object({
|
|
124
|
+
resultType: z.literal('Success'),
|
|
125
|
+
});
|
|
126
|
+
const Roblox_Chat_Api_Models_MarkAsSeenRequest = z.object({
|
|
127
|
+
conversationsToMarkSeen: z.array(z.number()),
|
|
128
|
+
});
|
|
129
|
+
const Roblox_Chat_Api_Models_MarkAsSeenResponse = z.object({
|
|
130
|
+
resultType: z.literal('Success'),
|
|
131
|
+
});
|
|
132
|
+
const Roblox_Chat_Api_Models_RemoveUserFromConversationRequest = z.object({
|
|
133
|
+
participantUserId: z.number().int(),
|
|
134
|
+
conversationId: z.number().int(),
|
|
135
|
+
});
|
|
136
|
+
const Roblox_Chat_Api_Models_RemoveUserFromConversationResponse = z.object({
|
|
137
|
+
conversationId: z.number().int(),
|
|
138
|
+
resultType: z.literal('Success'),
|
|
139
|
+
statusMessage: z.string(),
|
|
140
|
+
});
|
|
141
|
+
const Roblox_Chat_Api_Models_RenameGroupConversationRequest = z.object({
|
|
142
|
+
conversationId: z.number().int(),
|
|
143
|
+
newTitle: z.string(),
|
|
144
|
+
});
|
|
145
|
+
const Roblox_Chat_Api_Models_RenameConversationResponse = z.object({
|
|
146
|
+
conversationTitle: z.string(),
|
|
147
|
+
resultType: z.enum(['Success', 'Moderated', 'TextTooLong']),
|
|
148
|
+
title: Roblox_Chat_Api_Models_ConversationTitle,
|
|
149
|
+
statusMessage: z.string(),
|
|
150
|
+
});
|
|
151
|
+
const Roblox_Chat_Api_Models_SendGameLinkChatMessageRequest = z.object({
|
|
152
|
+
universeId: z.number().int(),
|
|
153
|
+
isExperienceInvite: z.boolean(),
|
|
154
|
+
userId: z.number().int(),
|
|
155
|
+
placeId: z.number().int(),
|
|
156
|
+
conversationId: z.number().int(),
|
|
157
|
+
decorators: z.array(z.string()),
|
|
158
|
+
});
|
|
159
|
+
const Roblox_Chat_Api_Models_SendLinkChatResponse = z.object({
|
|
160
|
+
chatMessageLinkType: z.literal('Game'),
|
|
161
|
+
messageId: z.string(),
|
|
162
|
+
sent: z.string().datetime({ offset: true }),
|
|
163
|
+
messageType: z.enum(['PlainText', 'Link', 'EventBased']),
|
|
164
|
+
resultType: z.enum(['Success', 'Moderated', 'TextTooLong', 'NoRealtimeConnection']),
|
|
165
|
+
statusMessage: z.string(),
|
|
166
|
+
});
|
|
167
|
+
const Roblox_Chat_Api_Models_SendPlainTextChatMessageRequest = z.object({
|
|
168
|
+
message: z.string(),
|
|
169
|
+
isExperienceInvite: z.boolean(),
|
|
170
|
+
userId: z.number().int(),
|
|
171
|
+
conversationId: z.number().int(),
|
|
172
|
+
decorators: z.array(z.string()),
|
|
173
|
+
});
|
|
174
|
+
const Roblox_Chat_Api_Models_SendPlainTextChatMessageResponse = z.object({
|
|
175
|
+
content: z.string(),
|
|
176
|
+
filteredForReceivers: z.boolean(),
|
|
177
|
+
messageId: z.string(),
|
|
178
|
+
sent: z.string().datetime({ offset: true }),
|
|
179
|
+
messageType: z.enum(['PlainText', 'Link', 'EventBased']),
|
|
180
|
+
resultType: z.enum(['Success', 'Moderated', 'TextTooLong', 'NoRealtimeConnection']),
|
|
181
|
+
statusMessage: z.string(),
|
|
182
|
+
});
|
|
183
|
+
const Roblox_Chat_Api_Models_CreateCloudEditConversationRequest = z.object({
|
|
184
|
+
placeId: z.number().int(),
|
|
185
|
+
});
|
|
186
|
+
const Roblox_Chat_Api_Models_StartNewConversationResponse = z.object({
|
|
187
|
+
conversation: Roblox_Chat_Api_Models_Conversation,
|
|
188
|
+
rejectedParticipants: z.array(Roblox_Chat_Api_Models_RejectedChatParticipant),
|
|
189
|
+
resultType: z.literal('Success'),
|
|
190
|
+
statusMessage: z.string(),
|
|
191
|
+
});
|
|
192
|
+
const Roblox_Chat_Api_Models_CreateGroupConversationRequest = z.object({
|
|
193
|
+
participantUserIds: z.array(z.number()),
|
|
194
|
+
title: z.string(),
|
|
195
|
+
});
|
|
196
|
+
const Roblox_Chat_Api_Models_CreateOneToOneConversationRequest = z.object({
|
|
197
|
+
participantUserId: z.number().int(),
|
|
198
|
+
});
|
|
199
|
+
const Roblox_Chat_Api_Models_UpdateUserTypingStatusRequest = z.object({
|
|
200
|
+
conversationId: z.number().int(),
|
|
201
|
+
isTyping: z.boolean(),
|
|
202
|
+
});
|
|
203
|
+
const Roblox_Chat_Api_Models_UserVisibleStatusResponse = z.object({
|
|
204
|
+
statusMessage: z.string(),
|
|
205
|
+
});
|
|
206
|
+
|
|
207
|
+
/**
|
|
208
|
+
* @api POST https://chat.roblox.com/v2/add-to-conversation
|
|
209
|
+
* @summary Adds users to an existing conversation
|
|
210
|
+
* @param body
|
|
211
|
+
*/
|
|
212
|
+
export const postAddToConversation = endpoint({
|
|
213
|
+
method: 'POST',
|
|
214
|
+
path: '/v2/add-to-conversation',
|
|
215
|
+
baseUrl: 'https://chat.roblox.com',
|
|
216
|
+
requestFormat: 'json',
|
|
217
|
+
serializationMethod: {
|
|
218
|
+
body: {},
|
|
219
|
+
},
|
|
220
|
+
parameters: {},
|
|
221
|
+
body: Roblox_Chat_Api_Models_AddUsersToConversationRequest,
|
|
222
|
+
response: Roblox_Chat_Api_Models_AddUserToConversationResponse,
|
|
223
|
+
errors: [
|
|
224
|
+
{
|
|
225
|
+
status: 401,
|
|
226
|
+
description: `0: Authorization has been denied for this request.`,
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
status: 403,
|
|
230
|
+
description: `0: Token Validation Failed`,
|
|
231
|
+
},
|
|
232
|
+
],
|
|
233
|
+
});
|
|
234
|
+
/**
|
|
235
|
+
* @api GET https://chat.roblox.com/v2/chat-settings
|
|
236
|
+
* @summary For every authenticated user, the clients hit this endpoint to get the chat related settings. Example : Chat is enabled or not
|
|
237
|
+
*/
|
|
238
|
+
export const getChatSettings = endpoint({
|
|
239
|
+
method: 'GET',
|
|
240
|
+
path: '/v2/chat-settings',
|
|
241
|
+
baseUrl: 'https://chat.roblox.com',
|
|
242
|
+
requestFormat: 'json',
|
|
243
|
+
response: Roblox_Chat_Api_Models_ChatSettingsResponse,
|
|
244
|
+
errors: [
|
|
245
|
+
{
|
|
246
|
+
status: 401,
|
|
247
|
+
description: `0: Authorization has been denied for this request.`,
|
|
248
|
+
},
|
|
249
|
+
],
|
|
250
|
+
});
|
|
251
|
+
/**
|
|
252
|
+
* @api GET https://chat.roblox.com/v2/get-conversations
|
|
253
|
+
* @summary Gets conversations for the conversationIds specified in the parameters
|
|
254
|
+
* @param conversationIds Ids of the conversations to be returned
|
|
255
|
+
*/
|
|
256
|
+
export const getGetConversations = endpoint({
|
|
257
|
+
method: 'GET',
|
|
258
|
+
path: '/v2/get-conversations',
|
|
259
|
+
baseUrl: 'https://chat.roblox.com',
|
|
260
|
+
requestFormat: 'json',
|
|
261
|
+
serializationMethod: {
|
|
262
|
+
conversationIds: {
|
|
263
|
+
style: 'form',
|
|
264
|
+
explode: true,
|
|
265
|
+
},
|
|
266
|
+
},
|
|
267
|
+
parameters: {
|
|
268
|
+
conversationIds: z.array(z.number()),
|
|
269
|
+
},
|
|
270
|
+
response: z.array(Roblox_Chat_Api_Models_Conversation),
|
|
271
|
+
errors: [
|
|
272
|
+
{
|
|
273
|
+
status: 401,
|
|
274
|
+
description: `0: Authorization has been denied for this request.`,
|
|
275
|
+
},
|
|
276
|
+
],
|
|
277
|
+
});
|
|
278
|
+
/**
|
|
279
|
+
* @api GET https://chat.roblox.com/v2/get-messages
|
|
280
|
+
* @summary Gets messages corresponding to the given conversationId
|
|
281
|
+
* @param conversationId
|
|
282
|
+
* @param pageSize
|
|
283
|
+
* @param exclusiveStartMessageId
|
|
284
|
+
*/
|
|
285
|
+
export const getGetMessages = endpoint({
|
|
286
|
+
method: 'GET',
|
|
287
|
+
path: '/v2/get-messages',
|
|
288
|
+
baseUrl: 'https://chat.roblox.com',
|
|
289
|
+
requestFormat: 'json',
|
|
290
|
+
serializationMethod: {
|
|
291
|
+
conversationId: {
|
|
292
|
+
style: 'form',
|
|
293
|
+
explode: true,
|
|
294
|
+
},
|
|
295
|
+
pageSize: {
|
|
296
|
+
style: 'form',
|
|
297
|
+
explode: true,
|
|
298
|
+
},
|
|
299
|
+
exclusiveStartMessageId: {
|
|
300
|
+
style: 'form',
|
|
301
|
+
explode: true,
|
|
302
|
+
},
|
|
303
|
+
},
|
|
304
|
+
parameters: {
|
|
305
|
+
conversationId: z.number().int(),
|
|
306
|
+
pageSize: z.number().int(),
|
|
307
|
+
exclusiveStartMessageId: z.string().optional(),
|
|
308
|
+
},
|
|
309
|
+
response: z.array(Roblox_Chat_Api_Models_ChatMessage),
|
|
310
|
+
errors: [
|
|
311
|
+
{
|
|
312
|
+
status: 401,
|
|
313
|
+
description: `0: Authorization has been denied for this request.`,
|
|
314
|
+
},
|
|
315
|
+
],
|
|
316
|
+
});
|
|
317
|
+
/**
|
|
318
|
+
* @api GET https://chat.roblox.com/v2/get-rollout-settings
|
|
319
|
+
* @summary Gets the rollout settings for requested feature
|
|
320
|
+
* @param featureNames string array to request feature rollout settings
|
|
321
|
+
*/
|
|
322
|
+
export const getGetRolloutSettings = endpoint({
|
|
323
|
+
method: 'GET',
|
|
324
|
+
path: '/v2/get-rollout-settings',
|
|
325
|
+
baseUrl: 'https://chat.roblox.com',
|
|
326
|
+
requestFormat: 'json',
|
|
327
|
+
serializationMethod: {
|
|
328
|
+
featureNames: {
|
|
329
|
+
style: 'form',
|
|
330
|
+
explode: true,
|
|
331
|
+
},
|
|
332
|
+
},
|
|
333
|
+
parameters: {
|
|
334
|
+
featureNames: z.array(z.string()),
|
|
335
|
+
},
|
|
336
|
+
response: Roblox_Chat_Api_Models_RolloutSettingsResponse,
|
|
337
|
+
errors: [
|
|
338
|
+
{
|
|
339
|
+
status: 401,
|
|
340
|
+
description: `0: Authorization has been denied for this request.`,
|
|
341
|
+
},
|
|
342
|
+
],
|
|
343
|
+
});
|
|
344
|
+
/**
|
|
345
|
+
* @api GET https://chat.roblox.com/v2/get-unread-conversation-count
|
|
346
|
+
* @summary Gets the count of unread conversations
|
|
347
|
+
*/
|
|
348
|
+
export const getGetUnreadConversationCount = endpoint({
|
|
349
|
+
method: 'GET',
|
|
350
|
+
path: '/v2/get-unread-conversation-count',
|
|
351
|
+
baseUrl: 'https://chat.roblox.com',
|
|
352
|
+
requestFormat: 'json',
|
|
353
|
+
response: z.object({ count: z.number().int() }),
|
|
354
|
+
errors: [
|
|
355
|
+
{
|
|
356
|
+
status: 401,
|
|
357
|
+
description: `0: Authorization has been denied for this request.`,
|
|
358
|
+
},
|
|
359
|
+
],
|
|
360
|
+
});
|
|
361
|
+
/**
|
|
362
|
+
* @api GET https://chat.roblox.com/v2/get-unread-conversations
|
|
363
|
+
* @summary Gets a list of unread conversations
|
|
364
|
+
* @param pageNumber
|
|
365
|
+
* @param pageSize
|
|
366
|
+
*/
|
|
367
|
+
export const getGetUnreadConversations = endpoint({
|
|
368
|
+
method: 'GET',
|
|
369
|
+
path: '/v2/get-unread-conversations',
|
|
370
|
+
baseUrl: 'https://chat.roblox.com',
|
|
371
|
+
requestFormat: 'json',
|
|
372
|
+
serializationMethod: {
|
|
373
|
+
pageNumber: {
|
|
374
|
+
style: 'form',
|
|
375
|
+
explode: true,
|
|
376
|
+
},
|
|
377
|
+
pageSize: {
|
|
378
|
+
style: 'form',
|
|
379
|
+
explode: true,
|
|
380
|
+
},
|
|
381
|
+
},
|
|
382
|
+
parameters: {
|
|
383
|
+
pageNumber: z.number().int(),
|
|
384
|
+
pageSize: z.number().int(),
|
|
385
|
+
},
|
|
386
|
+
response: z.array(Roblox_Chat_Api_Models_Conversation),
|
|
387
|
+
errors: [
|
|
388
|
+
{
|
|
389
|
+
status: 401,
|
|
390
|
+
description: `0: Authorization has been denied for this request.`,
|
|
391
|
+
},
|
|
392
|
+
],
|
|
393
|
+
});
|
|
394
|
+
/**
|
|
395
|
+
* @api GET https://chat.roblox.com/v2/get-unread-messages
|
|
396
|
+
* @summary Gets the unread messages for the conversationIds specified in the parameters
|
|
397
|
+
* @param conversationIds
|
|
398
|
+
* @param pageSize
|
|
399
|
+
*/
|
|
400
|
+
export const getGetUnreadMessages = endpoint({
|
|
401
|
+
method: 'GET',
|
|
402
|
+
path: '/v2/get-unread-messages',
|
|
403
|
+
baseUrl: 'https://chat.roblox.com',
|
|
404
|
+
requestFormat: 'json',
|
|
405
|
+
serializationMethod: {
|
|
406
|
+
conversationIds: {
|
|
407
|
+
style: 'form',
|
|
408
|
+
explode: true,
|
|
409
|
+
},
|
|
410
|
+
pageSize: {
|
|
411
|
+
style: 'form',
|
|
412
|
+
explode: true,
|
|
413
|
+
},
|
|
414
|
+
},
|
|
415
|
+
parameters: {
|
|
416
|
+
conversationIds: z.array(z.number()),
|
|
417
|
+
pageSize: z.number().int(),
|
|
418
|
+
},
|
|
419
|
+
response: z.array(Roblox_Chat_Api_Models_MultigetConversationMessagesResponse),
|
|
420
|
+
errors: [
|
|
421
|
+
{
|
|
422
|
+
status: 401,
|
|
423
|
+
description: `0: Authorization has been denied for this request.`,
|
|
424
|
+
},
|
|
425
|
+
],
|
|
426
|
+
});
|
|
427
|
+
/**
|
|
428
|
+
* @api GET https://chat.roblox.com/v2/get-user-conversations
|
|
429
|
+
* @summary Gets all conversations associated with the logged-in User
|
|
430
|
+
* @param pageNumber
|
|
431
|
+
* @param pageSize
|
|
432
|
+
*/
|
|
433
|
+
export const getGetUserConversations = endpoint({
|
|
434
|
+
method: 'GET',
|
|
435
|
+
path: '/v2/get-user-conversations',
|
|
436
|
+
baseUrl: 'https://chat.roblox.com',
|
|
437
|
+
requestFormat: 'json',
|
|
438
|
+
serializationMethod: {
|
|
439
|
+
pageNumber: {
|
|
440
|
+
style: 'form',
|
|
441
|
+
explode: true,
|
|
442
|
+
},
|
|
443
|
+
pageSize: {
|
|
444
|
+
style: 'form',
|
|
445
|
+
explode: true,
|
|
446
|
+
},
|
|
447
|
+
},
|
|
448
|
+
parameters: {
|
|
449
|
+
pageNumber: z.number().int(),
|
|
450
|
+
pageSize: z.number().int(),
|
|
451
|
+
},
|
|
452
|
+
response: z.array(Roblox_Chat_Api_Models_Conversation),
|
|
453
|
+
errors: [
|
|
454
|
+
{
|
|
455
|
+
status: 401,
|
|
456
|
+
description: `0: Authorization has been denied for this request.`,
|
|
457
|
+
},
|
|
458
|
+
],
|
|
459
|
+
});
|
|
460
|
+
/**
|
|
461
|
+
* @api POST https://chat.roblox.com/v2/mark-as-read
|
|
462
|
+
* @summary Mark the specified conversation messages as read
|
|
463
|
+
* @param body
|
|
464
|
+
*/
|
|
465
|
+
export const postMarkAsRead = endpoint({
|
|
466
|
+
method: 'POST',
|
|
467
|
+
path: '/v2/mark-as-read',
|
|
468
|
+
baseUrl: 'https://chat.roblox.com',
|
|
469
|
+
requestFormat: 'json',
|
|
470
|
+
serializationMethod: {
|
|
471
|
+
body: {},
|
|
472
|
+
},
|
|
473
|
+
parameters: {},
|
|
474
|
+
body: Roblox_Chat_Api_Models_MarkAsReadRequest,
|
|
475
|
+
response: Roblox_Chat_Api_Models_MarkAsReadResponse,
|
|
476
|
+
errors: [
|
|
477
|
+
{
|
|
478
|
+
status: 401,
|
|
479
|
+
description: `0: Authorization has been denied for this request.`,
|
|
480
|
+
},
|
|
481
|
+
{
|
|
482
|
+
status: 403,
|
|
483
|
+
description: `0: Token Validation Failed`,
|
|
484
|
+
},
|
|
485
|
+
],
|
|
486
|
+
});
|
|
487
|
+
/**
|
|
488
|
+
* @api POST https://chat.roblox.com/v2/mark-as-seen
|
|
489
|
+
* @summary Mark the specified conversation messages as seen
|
|
490
|
+
* @param body
|
|
491
|
+
*/
|
|
492
|
+
export const postMarkAsSeen = endpoint({
|
|
493
|
+
method: 'POST',
|
|
494
|
+
path: '/v2/mark-as-seen',
|
|
495
|
+
baseUrl: 'https://chat.roblox.com',
|
|
496
|
+
requestFormat: 'json',
|
|
497
|
+
serializationMethod: {
|
|
498
|
+
body: {},
|
|
499
|
+
},
|
|
500
|
+
parameters: {},
|
|
501
|
+
body: Roblox_Chat_Api_Models_MarkAsSeenRequest,
|
|
502
|
+
response: Roblox_Chat_Api_Models_MarkAsSeenResponse,
|
|
503
|
+
errors: [
|
|
504
|
+
{
|
|
505
|
+
status: 401,
|
|
506
|
+
description: `0: Authorization has been denied for this request.`,
|
|
507
|
+
},
|
|
508
|
+
{
|
|
509
|
+
status: 403,
|
|
510
|
+
description: `0: Token Validation Failed`,
|
|
511
|
+
},
|
|
512
|
+
],
|
|
513
|
+
});
|
|
514
|
+
/**
|
|
515
|
+
* @api GET https://chat.roblox.com/v2/metadata
|
|
516
|
+
* @summary Get Chat metadata.
|
|
517
|
+
*/
|
|
518
|
+
export const getMetadata = endpoint({
|
|
519
|
+
method: 'GET',
|
|
520
|
+
path: '/v2/metadata',
|
|
521
|
+
baseUrl: 'https://chat.roblox.com',
|
|
522
|
+
requestFormat: 'json',
|
|
523
|
+
response: Roblox_Chat_Api_Models_ChatMetadataResponse,
|
|
524
|
+
errors: [
|
|
525
|
+
{
|
|
526
|
+
status: 401,
|
|
527
|
+
description: `0: Authorization has been denied for this request.`,
|
|
528
|
+
},
|
|
529
|
+
],
|
|
530
|
+
});
|
|
531
|
+
/**
|
|
532
|
+
* @api GET https://chat.roblox.com/v2/multi-get-latest-messages
|
|
533
|
+
* @summary Gets latest messages corresponding to the given list of conversation Ids
|
|
534
|
+
* @param conversationIds
|
|
535
|
+
* @param pageSize
|
|
536
|
+
*/
|
|
537
|
+
export const getMultiGetLatestMessages = endpoint({
|
|
538
|
+
method: 'GET',
|
|
539
|
+
path: '/v2/multi-get-latest-messages',
|
|
540
|
+
baseUrl: 'https://chat.roblox.com',
|
|
541
|
+
requestFormat: 'json',
|
|
542
|
+
serializationMethod: {
|
|
543
|
+
conversationIds: {
|
|
544
|
+
style: 'form',
|
|
545
|
+
explode: true,
|
|
546
|
+
},
|
|
547
|
+
pageSize: {
|
|
548
|
+
style: 'form',
|
|
549
|
+
explode: true,
|
|
550
|
+
},
|
|
551
|
+
},
|
|
552
|
+
parameters: {
|
|
553
|
+
conversationIds: z.array(z.number()),
|
|
554
|
+
pageSize: z.number().int(),
|
|
555
|
+
},
|
|
556
|
+
response: z.array(Roblox_Chat_Api_Models_MultigetConversationMessagesResponse),
|
|
557
|
+
errors: [
|
|
558
|
+
{
|
|
559
|
+
status: 401,
|
|
560
|
+
description: `0: Authorization has been denied for this request.`,
|
|
561
|
+
},
|
|
562
|
+
],
|
|
563
|
+
});
|
|
564
|
+
/**
|
|
565
|
+
* @api POST https://chat.roblox.com/v2/remove-from-conversation
|
|
566
|
+
* @summary Removes a user from an existing conversation
|
|
567
|
+
* @param body
|
|
568
|
+
*/
|
|
569
|
+
export const postRemoveFromConversation = endpoint({
|
|
570
|
+
method: 'POST',
|
|
571
|
+
path: '/v2/remove-from-conversation',
|
|
572
|
+
baseUrl: 'https://chat.roblox.com',
|
|
573
|
+
requestFormat: 'json',
|
|
574
|
+
serializationMethod: {
|
|
575
|
+
body: {},
|
|
576
|
+
},
|
|
577
|
+
parameters: {},
|
|
578
|
+
body: Roblox_Chat_Api_Models_RemoveUserFromConversationRequest,
|
|
579
|
+
response: Roblox_Chat_Api_Models_RemoveUserFromConversationResponse,
|
|
580
|
+
errors: [
|
|
581
|
+
{
|
|
582
|
+
status: 401,
|
|
583
|
+
description: `0: Authorization has been denied for this request.`,
|
|
584
|
+
},
|
|
585
|
+
{
|
|
586
|
+
status: 403,
|
|
587
|
+
description: `0: Token Validation Failed`,
|
|
588
|
+
},
|
|
589
|
+
],
|
|
590
|
+
});
|
|
591
|
+
/**
|
|
592
|
+
* @api POST https://chat.roblox.com/v2/rename-group-conversation
|
|
593
|
+
* @summary Renames the title of an existing conversation
|
|
594
|
+
* @param body
|
|
595
|
+
*/
|
|
596
|
+
export const postRenameGroupConversation = endpoint({
|
|
597
|
+
method: 'POST',
|
|
598
|
+
path: '/v2/rename-group-conversation',
|
|
599
|
+
baseUrl: 'https://chat.roblox.com',
|
|
600
|
+
requestFormat: 'json',
|
|
601
|
+
serializationMethod: {
|
|
602
|
+
body: {},
|
|
603
|
+
},
|
|
604
|
+
parameters: {},
|
|
605
|
+
body: Roblox_Chat_Api_Models_RenameGroupConversationRequest,
|
|
606
|
+
response: Roblox_Chat_Api_Models_RenameConversationResponse,
|
|
607
|
+
errors: [
|
|
608
|
+
{
|
|
609
|
+
status: 401,
|
|
610
|
+
description: `0: Authorization has been denied for this request.`,
|
|
611
|
+
},
|
|
612
|
+
{
|
|
613
|
+
status: 403,
|
|
614
|
+
description: `0: Token Validation Failed`,
|
|
615
|
+
},
|
|
616
|
+
],
|
|
617
|
+
});
|
|
618
|
+
/**
|
|
619
|
+
* @api POST https://chat.roblox.com/v2/send-game-link-message
|
|
620
|
+
* @param body
|
|
621
|
+
*/
|
|
622
|
+
export const postSendGameLinkMessage = endpoint({
|
|
623
|
+
method: 'POST',
|
|
624
|
+
path: '/v2/send-game-link-message',
|
|
625
|
+
baseUrl: 'https://chat.roblox.com',
|
|
626
|
+
requestFormat: 'json',
|
|
627
|
+
serializationMethod: {
|
|
628
|
+
body: {},
|
|
629
|
+
},
|
|
630
|
+
parameters: {},
|
|
631
|
+
body: Roblox_Chat_Api_Models_SendGameLinkChatMessageRequest,
|
|
632
|
+
response: Roblox_Chat_Api_Models_SendLinkChatResponse,
|
|
633
|
+
errors: [
|
|
634
|
+
{
|
|
635
|
+
status: 401,
|
|
636
|
+
description: `0: Authorization has been denied for this request.`,
|
|
637
|
+
},
|
|
638
|
+
{
|
|
639
|
+
status: 403,
|
|
640
|
+
description: `0: Token Validation Failed`,
|
|
641
|
+
},
|
|
642
|
+
],
|
|
643
|
+
});
|
|
644
|
+
/**
|
|
645
|
+
* @api POST https://chat.roblox.com/v2/send-message
|
|
646
|
+
* @summary Sends a chat message
|
|
647
|
+
* @param body
|
|
648
|
+
*/
|
|
649
|
+
export const postSendMessage = endpoint({
|
|
650
|
+
method: 'POST',
|
|
651
|
+
path: '/v2/send-message',
|
|
652
|
+
baseUrl: 'https://chat.roblox.com',
|
|
653
|
+
requestFormat: 'json',
|
|
654
|
+
serializationMethod: {
|
|
655
|
+
body: {},
|
|
656
|
+
},
|
|
657
|
+
parameters: {},
|
|
658
|
+
body: Roblox_Chat_Api_Models_SendPlainTextChatMessageRequest,
|
|
659
|
+
response: Roblox_Chat_Api_Models_SendPlainTextChatMessageResponse,
|
|
660
|
+
errors: [
|
|
661
|
+
{
|
|
662
|
+
status: 401,
|
|
663
|
+
description: `0: Authorization has been denied for this request.`,
|
|
664
|
+
},
|
|
665
|
+
{
|
|
666
|
+
status: 403,
|
|
667
|
+
description: `0: Token Validation Failed`,
|
|
668
|
+
},
|
|
669
|
+
],
|
|
670
|
+
});
|
|
671
|
+
/**
|
|
672
|
+
* @api POST https://chat.roblox.com/v2/start-cloud-edit-conversation
|
|
673
|
+
* @summary Creates a new cloud edit conversation
|
|
674
|
+
* @param body
|
|
675
|
+
*/
|
|
676
|
+
export const postStartCloudEditConversation = endpoint({
|
|
677
|
+
method: 'POST',
|
|
678
|
+
path: '/v2/start-cloud-edit-conversation',
|
|
679
|
+
baseUrl: 'https://chat.roblox.com',
|
|
680
|
+
requestFormat: 'json',
|
|
681
|
+
serializationMethod: {
|
|
682
|
+
body: {},
|
|
683
|
+
},
|
|
684
|
+
parameters: {},
|
|
685
|
+
body: z.object({ placeId: z.number().int() }),
|
|
686
|
+
response: Roblox_Chat_Api_Models_StartNewConversationResponse,
|
|
687
|
+
errors: [
|
|
688
|
+
{
|
|
689
|
+
status: 401,
|
|
690
|
+
description: `0: Authorization has been denied for this request.`,
|
|
691
|
+
},
|
|
692
|
+
{
|
|
693
|
+
status: 403,
|
|
694
|
+
description: `0: Token Validation Failed`,
|
|
695
|
+
},
|
|
696
|
+
],
|
|
697
|
+
});
|
|
698
|
+
/**
|
|
699
|
+
* @api POST https://chat.roblox.com/v2/start-group-conversation
|
|
700
|
+
* @summary Creates a new group conversation
|
|
701
|
+
* @param body
|
|
702
|
+
*/
|
|
703
|
+
export const postStartGroupConversation = endpoint({
|
|
704
|
+
method: 'POST',
|
|
705
|
+
path: '/v2/start-group-conversation',
|
|
706
|
+
baseUrl: 'https://chat.roblox.com',
|
|
707
|
+
requestFormat: 'json',
|
|
708
|
+
serializationMethod: {
|
|
709
|
+
body: {},
|
|
710
|
+
},
|
|
711
|
+
parameters: {},
|
|
712
|
+
body: Roblox_Chat_Api_Models_CreateGroupConversationRequest,
|
|
713
|
+
response: Roblox_Chat_Api_Models_StartNewConversationResponse,
|
|
714
|
+
errors: [
|
|
715
|
+
{
|
|
716
|
+
status: 401,
|
|
717
|
+
description: `0: Authorization has been denied for this request.`,
|
|
718
|
+
},
|
|
719
|
+
{
|
|
720
|
+
status: 403,
|
|
721
|
+
description: `0: Token Validation Failed`,
|
|
722
|
+
},
|
|
723
|
+
],
|
|
724
|
+
});
|
|
725
|
+
/**
|
|
726
|
+
* @api POST https://chat.roblox.com/v2/start-one-to-one-conversation
|
|
727
|
+
* @summary Creates a new one-on-one conversation
|
|
728
|
+
* @param body
|
|
729
|
+
*/
|
|
730
|
+
export const postStartOneToOneConversation = endpoint({
|
|
731
|
+
method: 'POST',
|
|
732
|
+
path: '/v2/start-one-to-one-conversation',
|
|
733
|
+
baseUrl: 'https://chat.roblox.com',
|
|
734
|
+
requestFormat: 'json',
|
|
735
|
+
serializationMethod: {
|
|
736
|
+
body: {},
|
|
737
|
+
},
|
|
738
|
+
parameters: {},
|
|
739
|
+
body: z.object({ participantUserId: z.number().int() }),
|
|
740
|
+
response: Roblox_Chat_Api_Models_StartNewConversationResponse,
|
|
741
|
+
errors: [
|
|
742
|
+
{
|
|
743
|
+
status: 401,
|
|
744
|
+
description: `0: Authorization has been denied for this request.`,
|
|
745
|
+
},
|
|
746
|
+
{
|
|
747
|
+
status: 403,
|
|
748
|
+
description: `0: Token Validation Failed`,
|
|
749
|
+
},
|
|
750
|
+
],
|
|
751
|
+
});
|
|
752
|
+
/**
|
|
753
|
+
* @api POST https://chat.roblox.com/v2/update-user-typing-status
|
|
754
|
+
* @summary Updates the status for whether a user is typing currently
|
|
755
|
+
* @param body
|
|
756
|
+
*/
|
|
757
|
+
export const postUpdateUserTypingStatus = endpoint({
|
|
758
|
+
method: 'POST',
|
|
759
|
+
path: '/v2/update-user-typing-status',
|
|
760
|
+
baseUrl: 'https://chat.roblox.com',
|
|
761
|
+
requestFormat: 'json',
|
|
762
|
+
serializationMethod: {
|
|
763
|
+
body: {},
|
|
764
|
+
},
|
|
765
|
+
parameters: {},
|
|
766
|
+
body: Roblox_Chat_Api_Models_UpdateUserTypingStatusRequest,
|
|
767
|
+
response: z.object({ statusMessage: z.string() }),
|
|
768
|
+
errors: [
|
|
769
|
+
{
|
|
770
|
+
status: 401,
|
|
771
|
+
description: `0: Authorization has been denied for this request.`,
|
|
772
|
+
},
|
|
773
|
+
{
|
|
774
|
+
status: 403,
|
|
775
|
+
description: `0: Token Validation Failed`,
|
|
776
|
+
},
|
|
777
|
+
],
|
|
778
|
+
});
|