rozod 6.7.1 → 6.9.0

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.
Files changed (87) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +75 -451
  3. package/lib/endpoints/accountinformationv1.d.ts +92 -95
  4. package/lib/endpoints/accountsettingsv1.d.ts +88 -110
  5. package/lib/endpoints/adconfigurationv2.d.ts +108 -215
  6. package/lib/endpoints/assetdeliveryv1.d.ts +267 -230
  7. package/lib/endpoints/assetdeliveryv1.js +38 -0
  8. package/lib/endpoints/assetdeliveryv2.d.ts +201 -176
  9. package/lib/endpoints/assetdeliveryv2.js +26 -0
  10. package/lib/endpoints/authv1.d.ts +480 -517
  11. package/lib/endpoints/authv1.js +3 -1
  12. package/lib/endpoints/authv2.d.ts +210 -222
  13. package/lib/endpoints/authv2.js +1 -1
  14. package/lib/endpoints/authv3.d.ts +32 -35
  15. package/lib/endpoints/avatarv1.d.ts +112 -117
  16. package/lib/endpoints/avatarv2.d.ts +71 -76
  17. package/lib/endpoints/avatarv3.d.ts +27 -33
  18. package/lib/endpoints/badgesv1.d.ts +96 -99
  19. package/lib/endpoints/badgesv1.js +4 -0
  20. package/lib/endpoints/catalogv1.d.ts +209 -234
  21. package/lib/endpoints/catalogv1.js +2 -1
  22. package/lib/endpoints/catalogv2.d.ts +106 -136
  23. package/lib/endpoints/catalogv2.js +21 -17
  24. package/lib/endpoints/chatv2.d.ts +778 -778
  25. package/lib/endpoints/clientsettingsv1.d.ts +33 -35
  26. package/lib/endpoints/clientsettingsv2.d.ts +62 -68
  27. package/lib/endpoints/contactsv1.d.ts +18 -20
  28. package/lib/endpoints/developv1.d.ts +233 -293
  29. package/lib/endpoints/developv1.js +3 -0
  30. package/lib/endpoints/developv2.d.ts +87 -138
  31. package/lib/endpoints/developv2.js +3 -1
  32. package/lib/endpoints/economycreatorstatsv1.d.ts +12 -12
  33. package/lib/endpoints/economyv1.d.ts +6 -6
  34. package/lib/endpoints/engagementpayoutsv1.d.ts +9 -9
  35. package/lib/endpoints/followingsv1.d.ts +33 -34
  36. package/lib/endpoints/followingsv2.d.ts +9 -9
  37. package/lib/endpoints/friendsv1.d.ts +416 -545
  38. package/lib/endpoints/friendsv1.js +213 -313
  39. package/lib/endpoints/gameinternationalizationv1.d.ts +1509 -1642
  40. package/lib/endpoints/gameinternationalizationv2.d.ts +62 -64
  41. package/lib/endpoints/gamejoinv1.d.ts +458 -458
  42. package/lib/endpoints/gamesv1.d.ts +183 -143
  43. package/lib/endpoints/gamesv1.js +2 -0
  44. package/lib/endpoints/gamesv2.d.ts +161 -158
  45. package/lib/endpoints/gamesv2.js +9 -0
  46. package/lib/endpoints/groupsv1.d.ts +967 -976
  47. package/lib/endpoints/groupsv1.js +48 -4
  48. package/lib/endpoints/groupsv2.d.ts +259 -277
  49. package/lib/endpoints/groupsv2.js +1 -0
  50. package/lib/endpoints/inventoryv1.d.ts +93 -122
  51. package/lib/endpoints/inventoryv1.js +3 -1
  52. package/lib/endpoints/inventoryv2.d.ts +163 -178
  53. package/lib/endpoints/inventoryv2.js +2 -0
  54. package/lib/endpoints/itemconfigurationv1.d.ts +33 -40
  55. package/lib/endpoints/localev1.d.ts +47 -48
  56. package/lib/endpoints/localizationtablesv1.d.ts +315 -353
  57. package/lib/endpoints/matchmakingv1.d.ts +184 -190
  58. package/lib/endpoints/metricsv1.d.ts +88 -88
  59. package/lib/endpoints/notificationsv2.d.ts +144 -158
  60. package/lib/endpoints/premiumfeaturesv1.d.ts +14 -14
  61. package/lib/endpoints/presencev1.d.ts +7 -12
  62. package/lib/endpoints/privatemessagesv1.d.ts +56 -64
  63. package/lib/endpoints/publishv1.d.ts +32 -32
  64. package/lib/endpoints/thumbnailsresizerv1.d.ts +52 -53
  65. package/lib/endpoints/thumbnailsv1.d.ts +317 -361
  66. package/lib/endpoints/thumbnailsv1.js +25 -0
  67. package/lib/endpoints/tradesv1.d.ts +92 -104
  68. package/lib/endpoints/tradesv2.d.ts +81 -84
  69. package/lib/endpoints/translationrolesv1.d.ts +46 -51
  70. package/lib/endpoints/twostepverificationv1.d.ts +233 -237
  71. package/lib/endpoints/usersv1.d.ts +110 -114
  72. package/lib/index.d.ts +152 -4
  73. package/lib/index.js +273 -4
  74. package/lib/opencloud/v1/asset-permissions.d.ts +1 -1
  75. package/lib/opencloud/v1/assets.d.ts +9 -9
  76. package/lib/opencloud/v1/datastores-ordered.d.ts +6 -6
  77. package/lib/opencloud/v1/datastores.d.ts +8 -8
  78. package/lib/opencloud/v1/developer-products.d.ts +4 -4
  79. package/lib/opencloud/v1/game-passes.d.ts +4 -4
  80. package/lib/opencloud/v1/messaging.d.ts +1 -1
  81. package/lib/opencloud/v1/open-eval.d.ts +2 -2
  82. package/lib/opencloud/v1/secrets-store.d.ts +5 -5
  83. package/lib/opencloud/v1/toolbox.d.ts +2 -2
  84. package/lib/opencloud/v1/universes.d.ts +1 -1
  85. package/lib/opencloud/v2/cloud.d.ts +172 -84
  86. package/lib/opencloud/v2/cloud.js +25 -9
  87. package/package.json +2 -2
@@ -1,16 +1,14 @@
1
- import { z } from "zod";
2
- import { endpoint } from "..";
1
+ import { z } from 'zod';
2
+ import { endpoint } from '..';
3
3
 
4
- const Roblox_Friends_Api_Models_Response_FriendsPageMetadataResponse = z.object(
5
- {
6
- isFriendsFilterBarEnabled: z.boolean(),
7
- isFriendsPageSortExperimentEnabled: z.boolean(),
8
- isFriendsUserDataStoreCacheEnabled: z.boolean(),
9
- frequentFriendSortRollout: z.number().int(),
10
- userName: z.string(),
11
- displayName: z.string(),
12
- }
13
- );
4
+ const Roblox_Friends_Api_Models_Response_FriendsPageMetadataResponse = z.object({
5
+ isFriendsFilterBarEnabled: z.boolean(),
6
+ isFriendsPageSortExperimentEnabled: z.boolean(),
7
+ isFriendsUserDataStoreCacheEnabled: z.boolean(),
8
+ frequentFriendSortRollout: z.number().int(),
9
+ userName: z.string(),
10
+ displayName: z.string(),
11
+ });
14
12
  const Roblox_Friends_Api_FriendsCountResponse = z.object({
15
13
  count: z.number().int(),
16
14
  });
@@ -19,17 +17,18 @@ const Roblox_Friends_Api_FriendRequest = z.object({
19
17
  senderId: z.number().int(),
20
18
  sourceUniverseId: z.number().int(),
21
19
  originSourceType: z.enum([
22
- "Unknown",
23
- "PlayerSearch",
24
- "QrCode",
25
- "InGame",
26
- "UserProfile",
27
- "QqContactImporter",
28
- "WeChatContactImporter",
29
- "ProfileShare",
30
- "PhoneContactImporter",
31
- "FriendRecommendations",
32
- "UserCommunities",
20
+ 'Unknown',
21
+ 'PlayerSearch',
22
+ 'QrCode',
23
+ 'InGame',
24
+ 'UserProfile',
25
+ 'QqContactImporter',
26
+ 'WeChatContactImporter',
27
+ 'ProfileShare',
28
+ 'PhoneContactImporter',
29
+ 'FriendRecommendations',
30
+ 'UserCommunities',
31
+ 'TrustedFriend',
33
32
  ]),
34
33
  contactName: z.string(),
35
34
  senderNickname: z.string(),
@@ -46,26 +45,18 @@ const Roblox_Friends_Api_FriendRequestResponse = z.object({
46
45
  name: z.string(),
47
46
  displayName: z.string(),
48
47
  });
49
- const Roblox_Web_WebAPI_Models_ApiPageResponse_Roblox_Friends_Api_FriendRequestResponse_ =
50
- z.object({
51
- previousPageCursor: z.string(),
52
- nextPageCursor: z.string(),
53
- data: z.array(Roblox_Friends_Api_FriendRequestResponse),
54
- });
55
- const Roblox_Friends_Api_Models_Response_NewFriendRequestsCountResponse =
56
- z.object({ count: z.number().int() });
48
+ const Roblox_Web_WebAPI_Models_ApiPageResponse_Roblox_Friends_Api_FriendRequestResponse_ = z.object({
49
+ previousPageCursor: z.string(),
50
+ nextPageCursor: z.string(),
51
+ data: z.array(Roblox_Friends_Api_FriendRequestResponse),
52
+ });
53
+ const Roblox_Friends_Api_Models_Response_NewFriendRequestsCountResponse = z.object({ count: z.number().int() });
57
54
  const Roblox_Friends_Api_PendingFriendRequestCountModel = z.object({
58
55
  count: z.number().int(),
59
56
  });
60
57
  const Roblox_Friends_Api_Models_Response_UserResponse = z.object({
61
58
  isOnline: z.boolean(),
62
- presenceType: z.union([
63
- z.literal(0),
64
- z.literal(1),
65
- z.literal(2),
66
- z.literal(3),
67
- z.literal(4),
68
- ]),
59
+ presenceType: z.union([z.literal(0), z.literal(1), z.literal(2), z.literal(3), z.literal(4)]),
69
60
  isDeleted: z.boolean(),
70
61
  friendFrequentScore: z.number().int(),
71
62
  friendFrequentRank: z.number().int(),
@@ -78,28 +69,27 @@ const Roblox_Friends_Api_Models_Response_UserResponse = z.object({
78
69
  name: z.string(),
79
70
  displayName: z.string(),
80
71
  });
81
- const Roblox_Web_WebAPI_Models_ApiPageResponse_Roblox_Friends_Api_Models_Response_UserResponse_ =
82
- z.object({
83
- previousPageCursor: z.string(),
84
- nextPageCursor: z.string(),
85
- data: z.array(Roblox_Friends_Api_Models_Response_UserResponse),
86
- });
72
+ const Roblox_Web_WebAPI_Models_ApiPageResponse_Roblox_Friends_Api_Models_Response_UserResponse_ = z.object({
73
+ previousPageCursor: z.string(),
74
+ nextPageCursor: z.string(),
75
+ data: z.array(Roblox_Friends_Api_Models_Response_UserResponse),
76
+ });
87
77
  const Roblox_Friends_Api_FollowCountResponse = z.object({
88
78
  count: z.number().int(),
89
79
  });
90
- const Roblox_Web_WebAPI_Models_ApiArrayResponse_Roblox_Friends_Api_Models_Response_UserResponse_ =
91
- z.object({ data: z.array(Roblox_Friends_Api_Models_Response_UserResponse) });
80
+ const Roblox_Web_WebAPI_Models_ApiArrayResponse_Roblox_Friends_Api_Models_Response_UserResponse_ = z.object({
81
+ data: z.array(Roblox_Friends_Api_Models_Response_UserResponse),
82
+ });
92
83
  const Roblox_Friends_Api_Models_Response_FriendResponse = z.object({
93
84
  id: z.number().int(),
94
85
  hasVerifiedBadge: z.boolean(),
95
86
  });
96
- const Roblox_Paging_CursoredPagedResult_Roblox_Friends_Api_Models_Response_FriendResponse_ =
97
- z.object({
98
- PreviousCursor: z.string(),
99
- PageItems: z.array(Roblox_Friends_Api_Models_Response_FriendResponse),
100
- NextCursor: z.string(),
101
- HasMore: z.boolean(),
102
- });
87
+ const Roblox_Paging_CursoredPagedResult_Roblox_Friends_Api_Models_Response_FriendResponse_ = z.object({
88
+ PreviousCursor: z.string(),
89
+ PageItems: z.array(Roblox_Friends_Api_Models_Response_FriendResponse),
90
+ NextCursor: z.string(),
91
+ HasMore: z.boolean(),
92
+ });
103
93
  const Roblox_Friends_Api_Models_Response_UserPresenceResponseModel = z.object({
104
94
  UserPresenceType: z.string(),
105
95
  UserLocationType: z.string(),
@@ -117,19 +107,15 @@ const Roblox_Friends_Api_Models_Response_UserPresenceResponse = z.object({
117
107
  name: z.string(),
118
108
  displayName: z.string(),
119
109
  });
120
- const Roblox_Web_WebAPI_Models_ApiArrayResponse_Roblox_Friends_Api_Models_Response_UserPresenceResponse_ =
121
- z.object({
122
- data: z.array(Roblox_Friends_Api_Models_Response_UserPresenceResponse),
123
- });
110
+ const Roblox_Web_WebAPI_Models_ApiArrayResponse_Roblox_Friends_Api_Models_Response_UserPresenceResponse_ = z.object({
111
+ data: z.array(Roblox_Friends_Api_Models_Response_UserPresenceResponse),
112
+ });
124
113
  const Roblox_Friends_Api_FriendStatusResponse = z.object({
125
114
  id: z.number().int(),
126
- status: z.enum(["NotFriends", "Friends", "RequestSent", "RequestReceived"]),
115
+ status: z.enum(['NotFriends', 'Friends', 'RequestSent', 'RequestReceived']),
127
116
  });
128
- const Roblox_Web_WebAPI_Models_ApiArrayResponse_Roblox_Friends_Api_FriendStatusResponse_ =
129
- z.object({ data: z.array(Roblox_Friends_Api_FriendStatusResponse) });
130
- const Roblox_Friends_Api_CaptchaStatusResponseModel = z.object({
131
- success: z.boolean(),
132
- isCaptchaRequired: z.boolean(),
117
+ const Roblox_Web_WebAPI_Models_ApiArrayResponse_Roblox_Friends_Api_FriendStatusResponse_ = z.object({
118
+ data: z.array(Roblox_Friends_Api_FriendStatusResponse),
133
119
  });
134
120
  const Roblox_Friends_Api_Models_Response_RefreshQrSessionResponse = z.object({
135
121
  Success: z.boolean(),
@@ -148,17 +134,8 @@ const Roblox_Friends_Api_Models_Response_FollowingExistsResponse = z.object({
148
134
  isFollowed: z.boolean(),
149
135
  userId: z.number().int(),
150
136
  });
151
- const Roblox_Friends_Api_Models_Response_FollowingExistsResponseModel =
152
- z.object({
153
- followings: z.array(
154
- Roblox_Friends_Api_Models_Response_FollowingExistsResponse
155
- ),
156
- });
157
- const Roblox_Friends_Api_Models_Response_DeclineAllFriendRequestsResponse =
158
- z.object({ backgrounded: z.boolean() });
159
- const Roblox_Web_WebAPI_ApiEmptyResponseModel = z.object({});
160
- const Roblox_Friends_Api_Models_Request_FriendingTokenRequestModel = z.object({
161
- friendingToken: z.string(),
137
+ const Roblox_Friends_Api_Models_Response_FollowingExistsResponseModel = z.object({
138
+ followings: z.array(Roblox_Friends_Api_Models_Response_FollowingExistsResponse),
162
139
  });
163
140
  const Roblox_Web_Captcha_Models_Request_CaptchaTokenRequest = z.object({
164
141
  captchaId: z.string(),
@@ -166,82 +143,24 @@ const Roblox_Web_Captcha_Models_Request_CaptchaTokenRequest = z.object({
166
143
  captchaProvider: z.string(),
167
144
  challengeId: z.string(),
168
145
  });
169
- const Roblox_Friends_Api_FriendshipRequestModel = z.object({
170
- friendshipOriginSourceType: z.enum([
171
- "Unknown",
172
- "PlayerSearch",
173
- "QrCode",
174
- "InGame",
175
- "UserProfile",
176
- "QqContactImporter",
177
- "WeChatContactImporter",
178
- "ProfileShare",
179
- "PhoneContactImporter",
180
- "FriendRecommendations",
181
- "UserCommunities",
182
- ]),
183
- senderNickname: z.string(),
146
+ const Roblox_Friends_Api_CaptchaStatusResponseModel = z.object({
147
+ success: z.boolean(),
148
+ isCaptchaRequired: z.boolean(),
184
149
  });
185
- const Roblox_Friends_Api_Models_Response_ClearNewFriendRequestResponse =
186
- z.object({ status: z.boolean() });
150
+ const Roblox_Web_WebAPI_ApiEmptyResponseModel = z.object({});
187
151
 
188
- /**
189
- * @api POST https://friends.roblox.com/v1/contacts/:targetContactId/request-friendship
190
- * @summary Send a contact friend request to target user
191
- * @param targetContactId The target contact Id for friend request
192
- */
193
- export const postContactsTargetcontactidRequestFriendship = endpoint({
194
- method: "POST",
195
- path: "/v1/contacts/:targetContactId/request-friendship",
196
- baseUrl: "https://friends.roblox.com",
197
- requestFormat: "json",
198
- serializationMethod: {
199
- targetContactId: {
200
- style: "simple",
201
- },
202
- },
203
- parameters: {
204
- targetContactId: z.string(),
205
- },
206
- response: Roblox_Friends_Api_CaptchaStatusResponseModel,
207
- errors: [
208
- {
209
- status: 400,
210
- description: `1: The target user is invalid or does not exist.
211
- 5: The target user is already a friend.
212
- 6: Invalid parameters.
213
- 7: The user cannot be friends with itself.
214
- 31: User with max friends sent friend request.`,
215
- },
216
- {
217
- status: 401,
218
- description: `0: Authorization has been denied for this request.`,
219
- },
220
- {
221
- status: 403,
222
- description: `0: Token Validation Failed
223
- 2: The user is banned from performing operation.
224
- 3: The user is blocked from performing this action.
225
- 14: The user has not passed the captcha.`,
226
- },
227
- {
228
- status: 429,
229
- description: `9: The flood limit has been exceeded.`,
230
- },
231
- ],
232
- });
233
152
  /**
234
153
  * @api GET https://friends.roblox.com/v1/metadata
235
154
  * @param targetUserId
236
155
  */
237
156
  export const getMetadata = endpoint({
238
- method: "GET",
239
- path: "/v1/metadata",
240
- baseUrl: "https://friends.roblox.com",
241
- requestFormat: "json",
157
+ method: 'GET',
158
+ path: '/v1/metadata',
159
+ baseUrl: 'https://friends.roblox.com',
160
+ requestFormat: 'json',
242
161
  serializationMethod: {
243
162
  targetUserId: {
244
- style: "form",
163
+ style: 'form',
245
164
  explode: true,
246
165
  },
247
166
  },
@@ -256,13 +175,13 @@ export const getMetadata = endpoint({
256
175
  * @param userId user Id that shows the qr code
257
176
  */
258
177
  export const getMyFriendsUseridCheckQrSession = endpoint({
259
- method: "GET",
260
- path: "/v1/my/friends/:userId/check-qr-session",
261
- baseUrl: "https://friends.roblox.com",
262
- requestFormat: "json",
178
+ method: 'GET',
179
+ path: '/v1/my/friends/:userId/check-qr-session',
180
+ baseUrl: 'https://friends.roblox.com',
181
+ requestFormat: 'json',
263
182
  serializationMethod: {
264
183
  userId: {
265
- style: "simple",
184
+ style: 'simple',
266
185
  },
267
186
  },
268
187
  parameters: {
@@ -281,10 +200,10 @@ export const getMyFriendsUseridCheckQrSession = endpoint({
281
200
  * @summary Get the number of friends a user has
282
201
  */
283
202
  export const getMyFriendsCount = endpoint({
284
- method: "GET",
285
- path: "/v1/my/friends/count",
286
- baseUrl: "https://friends.roblox.com",
287
- requestFormat: "json",
203
+ method: 'GET',
204
+ path: '/v1/my/friends/count',
205
+ baseUrl: 'https://friends.roblox.com',
206
+ requestFormat: 'json',
288
207
  response: z.object({ count: z.number().int() }),
289
208
  errors: [
290
209
  {
@@ -297,10 +216,10 @@ export const getMyFriendsCount = endpoint({
297
216
  * @api POST https://friends.roblox.com/v1/my/friends/refresh-qr-session
298
217
  */
299
218
  export const postMyFriendsRefreshQrSession = endpoint({
300
- method: "POST",
301
- path: "/v1/my/friends/refresh-qr-session",
302
- baseUrl: "https://friends.roblox.com",
303
- requestFormat: "json",
219
+ method: 'POST',
220
+ path: '/v1/my/friends/refresh-qr-session',
221
+ baseUrl: 'https://friends.roblox.com',
222
+ requestFormat: 'json',
304
223
  response: z.object({ Success: z.boolean() }),
305
224
  errors: [
306
225
  {
@@ -322,25 +241,25 @@ export const postMyFriendsRefreshQrSession = endpoint({
322
241
  * @param friendRequestSort
323
242
  */
324
243
  export const getMyFriendsRequests = endpoint({
325
- method: "GET",
326
- path: "/v1/my/friends/requests",
327
- baseUrl: "https://friends.roblox.com",
328
- requestFormat: "json",
244
+ method: 'GET',
245
+ path: '/v1/my/friends/requests',
246
+ baseUrl: 'https://friends.roblox.com',
247
+ requestFormat: 'json',
329
248
  serializationMethod: {
330
249
  limit: {
331
- style: "form",
250
+ style: 'form',
332
251
  explode: true,
333
252
  },
334
253
  cursor: {
335
- style: "form",
254
+ style: 'form',
336
255
  explode: true,
337
256
  },
338
257
  sessionId: {
339
- style: "form",
258
+ style: 'form',
340
259
  explode: true,
341
260
  },
342
261
  friendRequestSort: {
343
- style: "form",
262
+ style: 'form',
344
263
  explode: true,
345
264
  },
346
265
  },
@@ -353,8 +272,7 @@ export const getMyFriendsRequests = endpoint({
353
272
  .optional()
354
273
  .default(1),
355
274
  },
356
- response:
357
- Roblox_Web_WebAPI_Models_ApiPageResponse_Roblox_Friends_Api_FriendRequestResponse_,
275
+ response: Roblox_Web_WebAPI_Models_ApiPageResponse_Roblox_Friends_Api_FriendRequestResponse_,
358
276
  errors: [
359
277
  {
360
278
  status: 400,
@@ -376,34 +294,14 @@ export const getMyFriendsRequests = endpoint({
376
294
  },
377
295
  ],
378
296
  });
379
- /**
380
- * @api DELETE https://friends.roblox.com/v1/my/new-friend-requests
381
- */
382
- export const deleteMyNewFriendRequests = endpoint({
383
- method: "DELETE",
384
- path: "/v1/my/new-friend-requests",
385
- baseUrl: "https://friends.roblox.com",
386
- requestFormat: "json",
387
- response: z.object({ status: z.boolean() }),
388
- errors: [
389
- {
390
- status: 401,
391
- description: `0: Authorization has been denied for this request.`,
392
- },
393
- {
394
- status: 403,
395
- description: `0: Token Validation Failed`,
396
- },
397
- ],
398
- });
399
297
  /**
400
298
  * @api GET https://friends.roblox.com/v1/my/new-friend-requests/count
401
299
  */
402
300
  export const getMyNewFriendRequestsCount = endpoint({
403
- method: "GET",
404
- path: "/v1/my/new-friend-requests/count",
405
- baseUrl: "https://friends.roblox.com",
406
- requestFormat: "json",
301
+ method: 'GET',
302
+ path: '/v1/my/new-friend-requests/count',
303
+ baseUrl: 'https://friends.roblox.com',
304
+ requestFormat: 'json',
407
305
  response: z.object({ count: z.number().int() }),
408
306
  errors: [
409
307
  {
@@ -417,10 +315,10 @@ export const getMyNewFriendRequestsCount = endpoint({
417
315
  * @summary Get the number of trusted friends a user has
418
316
  */
419
317
  export const getMyTrustedFriendsCount = endpoint({
420
- method: "GET",
421
- path: "/v1/my/trusted-friends/count",
422
- baseUrl: "https://friends.roblox.com",
423
- requestFormat: "json",
318
+ method: 'GET',
319
+ path: '/v1/my/trusted-friends/count',
320
+ baseUrl: 'https://friends.roblox.com',
321
+ requestFormat: 'json',
424
322
  response: z.object({ count: z.number().int() }),
425
323
  errors: [
426
324
  {
@@ -436,14 +334,14 @@ export const getMyTrustedFriendsCount = endpoint({
436
334
  * @param userId The requesting userId.
437
335
  */
438
336
  export const postUserUseridMultigetAreFriends = endpoint({
439
- method: "POST",
440
- path: "/v1/user/:userId/multiget-are-friends",
441
- baseUrl: "https://friends.roblox.com",
442
- requestFormat: "json",
337
+ method: 'POST',
338
+ path: '/v1/user/:userId/multiget-are-friends',
339
+ baseUrl: 'https://friends.roblox.com',
340
+ requestFormat: 'json',
443
341
  serializationMethod: {
444
342
  body: {},
445
343
  userId: {
446
- style: "simple",
344
+ style: 'simple',
447
345
  },
448
346
  },
449
347
  parameters: {
@@ -468,10 +366,10 @@ export const postUserUseridMultigetAreFriends = endpoint({
468
366
  * @param body The userIds potentially being followed
469
367
  */
470
368
  export const postUserFollowingExists = endpoint({
471
- method: "POST",
472
- path: "/v1/user/following-exists",
473
- baseUrl: "https://friends.roblox.com",
474
- requestFormat: "json",
369
+ method: 'POST',
370
+ path: '/v1/user/following-exists',
371
+ baseUrl: 'https://friends.roblox.com',
372
+ requestFormat: 'json',
475
373
  serializationMethod: {
476
374
  body: {},
477
375
  },
@@ -502,10 +400,10 @@ export const postUserFollowingExists = endpoint({
502
400
  * @summary Return the number of pending friend requests.
503
401
  */
504
402
  export const getUserFriendRequestsCount = endpoint({
505
- method: "GET",
506
- path: "/v1/user/friend-requests/count",
507
- baseUrl: "https://friends.roblox.com",
508
- requestFormat: "json",
403
+ method: 'GET',
404
+ path: '/v1/user/friend-requests/count',
405
+ baseUrl: 'https://friends.roblox.com',
406
+ requestFormat: 'json',
509
407
  response: z.object({ count: z.number().int() }),
510
408
  errors: [
511
409
  {
@@ -514,143 +412,6 @@ export const getUserFriendRequestsCount = endpoint({
514
412
  },
515
413
  ],
516
414
  });
517
- /**
518
- * @api POST https://friends.roblox.com/v1/user/friend-requests/decline-all
519
- * @summary Decline all pending friend requests for the authenticated user.
520
- */
521
- export const postUserFriendRequestsDeclineAll = endpoint({
522
- method: "POST",
523
- path: "/v1/user/friend-requests/decline-all",
524
- baseUrl: "https://friends.roblox.com",
525
- requestFormat: "json",
526
- response: z.object({ backgrounded: z.boolean() }),
527
- errors: [
528
- {
529
- status: 401,
530
- description: `0: Authorization has been denied for this request.`,
531
- },
532
- {
533
- status: 403,
534
- description: `0: Token Validation Failed`,
535
- },
536
- ],
537
- });
538
- /**
539
- * @api POST https://friends.roblox.com/v1/users/:requesterUserId/accept-friend-request
540
- * @summary Accept a friend request.
541
- * @param requesterUserId The user Id of the requester
542
- */
543
- export const postUsersRequesteruseridAcceptFriendRequest = endpoint({
544
- method: "POST",
545
- path: "/v1/users/:requesterUserId/accept-friend-request",
546
- baseUrl: "https://friends.roblox.com",
547
- requestFormat: "json",
548
- serializationMethod: {
549
- requesterUserId: {
550
- style: "simple",
551
- },
552
- },
553
- parameters: {
554
- requesterUserId: z.number().int(),
555
- },
556
- response: z.object({}),
557
- errors: [
558
- {
559
- status: 400,
560
- description: `1: The target user is invalid or does not exist.
561
- 10: The friend request does not exist.
562
- 11: The current users friends limit has been exceeded.
563
- 12: The target users friends limit has been exceeded.`,
564
- },
565
- {
566
- status: 401,
567
- description: `0: Authorization has been denied for this request.`,
568
- },
569
- {
570
- status: 403,
571
- description: `0: Token Validation Failed
572
- 3: The user is blocked from performing this action.`,
573
- },
574
- ],
575
- });
576
- /**
577
- * @api POST https://friends.roblox.com/v1/users/:requesterUserId/decline-friend-request
578
- * @summary Decline a friend request.
579
- * @param requesterUserId The user Id of the requester
580
- */
581
- export const postUsersRequesteruseridDeclineFriendRequest = endpoint({
582
- method: "POST",
583
- path: "/v1/users/:requesterUserId/decline-friend-request",
584
- baseUrl: "https://friends.roblox.com",
585
- requestFormat: "json",
586
- serializationMethod: {
587
- requesterUserId: {
588
- style: "simple",
589
- },
590
- },
591
- parameters: {
592
- requesterUserId: z.number().int(),
593
- },
594
- response: z.object({}),
595
- errors: [
596
- {
597
- status: 400,
598
- description: `1: The target user is invalid or does not exist.
599
- 10: The friend request does not exist.`,
600
- },
601
- {
602
- status: 401,
603
- description: `0: Authorization has been denied for this request.`,
604
- },
605
- {
606
- status: 403,
607
- description: `0: Token Validation Failed`,
608
- },
609
- ],
610
- });
611
- /**
612
- * @api POST https://friends.roblox.com/v1/users/:senderUserId/accept-friend-request-with-token
613
- * @summary Accept a friend request with an Off Network Friending token.
614
- * @param body
615
- * @param senderUserId The user id of the sender of the off network friend request
616
- */
617
- export const postUsersSenderuseridAcceptFriendRequestWithToken = endpoint({
618
- method: "POST",
619
- path: "/v1/users/:senderUserId/accept-friend-request-with-token",
620
- baseUrl: "https://friends.roblox.com",
621
- requestFormat: "json",
622
- serializationMethod: {
623
- body: {},
624
- senderUserId: {
625
- style: "simple",
626
- },
627
- },
628
- parameters: {
629
- senderUserId: z.number().int(),
630
- },
631
- body: z.object({ friendingToken: z.string() }),
632
- response: z.object({}),
633
- errors: [
634
- {
635
- status: 400,
636
- description: `1: The target user is invalid or does not exist.
637
- 3: The user is blocked from performing this action.
638
- 5: The target user is already a friend.
639
- 6: Invalid parameters.
640
- 7: The user cannot be friends with itself.
641
- 11: The current users friends limit has been exceeded.
642
- 12: The target users friends limit has been exceeded.`,
643
- },
644
- {
645
- status: 401,
646
- description: `0: Authorization has been denied for this request.`,
647
- },
648
- {
649
- status: 403,
650
- description: `0: Token Validation Failed`,
651
- },
652
- ],
653
- });
654
415
  /**
655
416
  * @api POST https://friends.roblox.com/v1/users/:targetUserId/follow
656
417
  * @summary Creates the following between a user and user with targetUserId
@@ -658,14 +419,14 @@ export const postUsersSenderuseridAcceptFriendRequestWithToken = endpoint({
658
419
  * @param targetUserId
659
420
  */
660
421
  export const postUsersTargetuseridFollow = endpoint({
661
- method: "POST",
662
- path: "/v1/users/:targetUserId/follow",
663
- baseUrl: "https://friends.roblox.com",
664
- requestFormat: "json",
422
+ method: 'POST',
423
+ path: '/v1/users/:targetUserId/follow',
424
+ baseUrl: 'https://friends.roblox.com',
425
+ requestFormat: 'json',
665
426
  serializationMethod: {
666
427
  body: {},
667
428
  targetUserId: {
668
- style: "simple",
429
+ style: 'simple',
669
430
  },
670
431
  },
671
432
  parameters: {
@@ -706,44 +467,37 @@ export const postUsersTargetuseridFollow = endpoint({
706
467
  * @param sortOrder The order the results are sorted in.
707
468
  */
708
469
  export const getUsersTargetuseridFollowers = endpoint({
709
- method: "GET",
710
- path: "/v1/users/:targetUserId/followers",
711
- baseUrl: "https://friends.roblox.com",
712
- requestFormat: "json",
470
+ method: 'GET',
471
+ path: '/v1/users/:targetUserId/followers',
472
+ baseUrl: 'https://friends.roblox.com',
473
+ requestFormat: 'json',
713
474
  serializationMethod: {
714
475
  targetUserId: {
715
- style: "simple",
476
+ style: 'simple',
716
477
  },
717
478
  limit: {
718
- style: "form",
479
+ style: 'form',
719
480
  explode: true,
720
481
  },
721
482
  cursor: {
722
- style: "form",
483
+ style: 'form',
723
484
  explode: true,
724
485
  },
725
486
  sortOrder: {
726
- style: "form",
487
+ style: 'form',
727
488
  explode: true,
728
489
  },
729
490
  },
730
491
  parameters: {
731
492
  targetUserId: z.number().int(),
732
493
  limit: z
733
- .union([
734
- z.literal(10),
735
- z.literal(18),
736
- z.literal(25),
737
- z.literal(50),
738
- z.literal(100),
739
- ])
494
+ .union([z.literal(10), z.literal(18), z.literal(25), z.literal(50), z.literal(100)])
740
495
  .optional()
741
496
  .default(10),
742
497
  cursor: z.string().optional(),
743
- sortOrder: z.enum(["Asc", "Desc"]).optional().default("Asc"),
498
+ sortOrder: z.enum(['Asc', 'Desc']).optional().default('Asc'),
744
499
  },
745
- response:
746
- Roblox_Web_WebAPI_Models_ApiPageResponse_Roblox_Friends_Api_Models_Response_UserResponse_,
500
+ response: Roblox_Web_WebAPI_Models_ApiPageResponse_Roblox_Friends_Api_Models_Response_UserResponse_,
747
501
  errors: [
748
502
  {
749
503
  status: 400,
@@ -767,13 +521,13 @@ export const getUsersTargetuseridFollowers = endpoint({
767
521
  * @param targetUserId
768
522
  */
769
523
  export const getUsersTargetuseridFollowersCount = endpoint({
770
- method: "GET",
771
- path: "/v1/users/:targetUserId/followers/count",
772
- baseUrl: "https://friends.roblox.com",
773
- requestFormat: "json",
524
+ method: 'GET',
525
+ path: '/v1/users/:targetUserId/followers/count',
526
+ baseUrl: 'https://friends.roblox.com',
527
+ requestFormat: 'json',
774
528
  serializationMethod: {
775
529
  targetUserId: {
776
- style: "simple",
530
+ style: 'simple',
777
531
  },
778
532
  },
779
533
  parameters: {
@@ -796,44 +550,37 @@ export const getUsersTargetuseridFollowersCount = endpoint({
796
550
  * @param sortOrder The order the results are sorted in.
797
551
  */
798
552
  export const getUsersTargetuseridFollowings = endpoint({
799
- method: "GET",
800
- path: "/v1/users/:targetUserId/followings",
801
- baseUrl: "https://friends.roblox.com",
802
- requestFormat: "json",
553
+ method: 'GET',
554
+ path: '/v1/users/:targetUserId/followings',
555
+ baseUrl: 'https://friends.roblox.com',
556
+ requestFormat: 'json',
803
557
  serializationMethod: {
804
558
  targetUserId: {
805
- style: "simple",
559
+ style: 'simple',
806
560
  },
807
561
  limit: {
808
- style: "form",
562
+ style: 'form',
809
563
  explode: true,
810
564
  },
811
565
  cursor: {
812
- style: "form",
566
+ style: 'form',
813
567
  explode: true,
814
568
  },
815
569
  sortOrder: {
816
- style: "form",
570
+ style: 'form',
817
571
  explode: true,
818
572
  },
819
573
  },
820
574
  parameters: {
821
575
  targetUserId: z.number().int(),
822
576
  limit: z
823
- .union([
824
- z.literal(10),
825
- z.literal(18),
826
- z.literal(25),
827
- z.literal(50),
828
- z.literal(100),
829
- ])
577
+ .union([z.literal(10), z.literal(18), z.literal(25), z.literal(50), z.literal(100)])
830
578
  .optional()
831
579
  .default(10),
832
580
  cursor: z.string().optional(),
833
- sortOrder: z.enum(["Asc", "Desc"]).optional().default("Asc"),
581
+ sortOrder: z.enum(['Asc', 'Desc']).optional().default('Asc'),
834
582
  },
835
- response:
836
- Roblox_Web_WebAPI_Models_ApiPageResponse_Roblox_Friends_Api_Models_Response_UserResponse_,
583
+ response: Roblox_Web_WebAPI_Models_ApiPageResponse_Roblox_Friends_Api_Models_Response_UserResponse_,
837
584
  errors: [
838
585
  {
839
586
  status: 400,
@@ -857,13 +604,13 @@ export const getUsersTargetuseridFollowings = endpoint({
857
604
  * @param targetUserId
858
605
  */
859
606
  export const getUsersTargetuseridFollowingsCount = endpoint({
860
- method: "GET",
861
- path: "/v1/users/:targetUserId/followings/count",
862
- baseUrl: "https://friends.roblox.com",
863
- requestFormat: "json",
607
+ method: 'GET',
608
+ path: '/v1/users/:targetUserId/followings/count',
609
+ baseUrl: 'https://friends.roblox.com',
610
+ requestFormat: 'json',
864
611
  serializationMethod: {
865
612
  targetUserId: {
866
- style: "simple",
613
+ style: 'simple',
867
614
  },
868
615
  },
869
616
  parameters: {
@@ -877,70 +624,19 @@ export const getUsersTargetuseridFollowingsCount = endpoint({
877
624
  },
878
625
  ],
879
626
  });
880
- /**
881
- * @api POST https://friends.roblox.com/v1/users/:targetUserId/request-friendship
882
- * @summary Send a friend request to target user
883
- * @param body The source which the friend request originated from
884
- * @param targetUserId The target user Id for friend request
885
- */
886
- export const postUsersTargetuseridRequestFriendship = endpoint({
887
- method: "POST",
888
- path: "/v1/users/:targetUserId/request-friendship",
889
- baseUrl: "https://friends.roblox.com",
890
- requestFormat: "json",
891
- serializationMethod: {
892
- body: {},
893
- targetUserId: {
894
- style: "simple",
895
- },
896
- },
897
- parameters: {
898
- targetUserId: z.number().int(),
899
- },
900
- body: Roblox_Friends_Api_FriendshipRequestModel,
901
- response: Roblox_Friends_Api_CaptchaStatusResponseModel,
902
- errors: [
903
- {
904
- status: 400,
905
- description: `1: The target user is invalid or does not exist.
906
- 5: The target user is already a friend.
907
- 6: Invalid parameters.
908
- 7: The user cannot be friends with itself.
909
- 10: The friend request does not exist.
910
- 13: The users are not in the same game.
911
- 31: User with max friends sent friend request.
912
- 35: Invalid nickname.`,
913
- },
914
- {
915
- status: 401,
916
- description: `0: Authorization has been denied for this request.`,
917
- },
918
- {
919
- status: 403,
920
- description: `0: Token Validation Failed
921
- 2: The user is banned from performing operation.
922
- 3: The user is blocked from performing this action.
923
- 14: The user has not passed the captcha.`,
924
- },
925
- {
926
- status: 429,
927
- description: `9: The flood limit has been exceeded.`,
928
- },
929
- ],
930
- });
931
627
  /**
932
628
  * @api POST https://friends.roblox.com/v1/users/:targetUserId/unfollow
933
629
  * @summary Deletes the following between a user and user with targetUserId
934
630
  * @param targetUserId
935
631
  */
936
632
  export const postUsersTargetuseridUnfollow = endpoint({
937
- method: "POST",
938
- path: "/v1/users/:targetUserId/unfollow",
939
- baseUrl: "https://friends.roblox.com",
940
- requestFormat: "json",
633
+ method: 'POST',
634
+ path: '/v1/users/:targetUserId/unfollow',
635
+ baseUrl: 'https://friends.roblox.com',
636
+ requestFormat: 'json',
941
637
  serializationMethod: {
942
638
  targetUserId: {
943
- style: "simple",
639
+ style: 'simple',
944
640
  },
945
641
  },
946
642
  parameters: {
@@ -971,40 +667,6 @@ export const postUsersTargetuseridUnfollow = endpoint({
971
667
  },
972
668
  ],
973
669
  });
974
- /**
975
- * @api POST https://friends.roblox.com/v1/users/:targetUserId/unfriend
976
- * @summary Unfriend a user
977
- * @param targetUserId The target user id to unfriend
978
- */
979
- export const postUsersTargetuseridUnfriend = endpoint({
980
- method: "POST",
981
- path: "/v1/users/:targetUserId/unfriend",
982
- baseUrl: "https://friends.roblox.com",
983
- requestFormat: "json",
984
- serializationMethod: {
985
- targetUserId: {
986
- style: "simple",
987
- },
988
- },
989
- parameters: {
990
- targetUserId: z.number().int(),
991
- },
992
- response: z.object({}),
993
- errors: [
994
- {
995
- status: 400,
996
- description: `1: The target user is invalid or does not exist.`,
997
- },
998
- {
999
- status: 401,
1000
- description: `0: Authorization has been denied for this request.`,
1001
- },
1002
- {
1003
- status: 403,
1004
- description: `0: Token Validation Failed`,
1005
- },
1006
- ],
1007
- });
1008
670
  /**
1009
671
  * @api GET https://friends.roblox.com/v1/users/:userId/friends
1010
672
  * @summary Get list of all friends for the specified user.
@@ -1012,16 +674,16 @@ export const postUsersTargetuseridUnfriend = endpoint({
1012
674
  * @param userSort Specifies how to sort the returned friends.
1013
675
  */
1014
676
  export const getUsersUseridFriends = endpoint({
1015
- method: "GET",
1016
- path: "/v1/users/:userId/friends",
1017
- baseUrl: "https://friends.roblox.com",
1018
- requestFormat: "json",
677
+ method: 'GET',
678
+ path: '/v1/users/:userId/friends',
679
+ baseUrl: 'https://friends.roblox.com',
680
+ requestFormat: 'json',
1019
681
  serializationMethod: {
1020
682
  userId: {
1021
- style: "simple",
683
+ style: 'simple',
1022
684
  },
1023
685
  userSort: {
1024
- style: "form",
686
+ style: 'form',
1025
687
  explode: true,
1026
688
  },
1027
689
  },
@@ -1029,8 +691,7 @@ export const getUsersUseridFriends = endpoint({
1029
691
  userId: z.number().int(),
1030
692
  userSort: z.union([z.literal(0), z.literal(1), z.literal(2)]).optional(),
1031
693
  },
1032
- response:
1033
- Roblox_Web_WebAPI_Models_ApiArrayResponse_Roblox_Friends_Api_Models_Response_UserResponse_,
694
+ response: Roblox_Web_WebAPI_Models_ApiArrayResponse_Roblox_Friends_Api_Models_Response_UserResponse_,
1034
695
  errors: [
1035
696
  {
1036
697
  status: 400,
@@ -1044,13 +705,13 @@ export const getUsersUseridFriends = endpoint({
1044
705
  * @param userId
1045
706
  */
1046
707
  export const getUsersUseridFriendsCount = endpoint({
1047
- method: "GET",
1048
- path: "/v1/users/:userId/friends/count",
1049
- baseUrl: "https://friends.roblox.com",
1050
- requestFormat: "json",
708
+ method: 'GET',
709
+ path: '/v1/users/:userId/friends/count',
710
+ baseUrl: 'https://friends.roblox.com',
711
+ requestFormat: 'json',
1051
712
  serializationMethod: {
1052
713
  userId: {
1053
- style: "simple",
714
+ style: 'simple',
1054
715
  },
1055
716
  },
1056
717
  parameters: {
@@ -1074,28 +735,28 @@ export const getUsersUseridFriendsCount = endpoint({
1074
735
  * @param findFriendsType
1075
736
  */
1076
737
  export const getUsersUseridFriendsFind = endpoint({
1077
- method: "GET",
1078
- path: "/v1/users/:userId/friends/find",
1079
- baseUrl: "https://friends.roblox.com",
1080
- requestFormat: "json",
738
+ method: 'GET',
739
+ path: '/v1/users/:userId/friends/find',
740
+ baseUrl: 'https://friends.roblox.com',
741
+ requestFormat: 'json',
1081
742
  serializationMethod: {
1082
743
  userId: {
1083
- style: "simple",
744
+ style: 'simple',
1084
745
  },
1085
746
  userSort: {
1086
- style: "form",
747
+ style: 'form',
1087
748
  explode: true,
1088
749
  },
1089
750
  cursor: {
1090
- style: "form",
751
+ style: 'form',
1091
752
  explode: true,
1092
753
  },
1093
754
  limit: {
1094
- style: "form",
755
+ style: 'form',
1095
756
  explode: true,
1096
757
  },
1097
758
  findFriendsType: {
1098
- style: "form",
759
+ style: 'form',
1099
760
  explode: true,
1100
761
  },
1101
762
  },
@@ -1109,8 +770,7 @@ export const getUsersUseridFriendsFind = endpoint({
1109
770
  limit: z.number().int().optional().default(50),
1110
771
  findFriendsType: z.union([z.literal(0), z.literal(1)]).optional(),
1111
772
  },
1112
- response:
1113
- Roblox_Paging_CursoredPagedResult_Roblox_Friends_Api_Models_Response_FriendResponse_,
773
+ response: Roblox_Paging_CursoredPagedResult_Roblox_Friends_Api_Models_Response_FriendResponse_,
1114
774
  errors: [
1115
775
  {
1116
776
  status: 400,
@@ -1125,20 +785,19 @@ export const getUsersUseridFriendsFind = endpoint({
1125
785
  * @param userId The user Id to get the friends for.
1126
786
  */
1127
787
  export const getUsersUseridFriendsInactive = endpoint({
1128
- method: "GET",
1129
- path: "/v1/users/:userId/friends/inactive",
1130
- baseUrl: "https://friends.roblox.com",
1131
- requestFormat: "json",
788
+ method: 'GET',
789
+ path: '/v1/users/:userId/friends/inactive',
790
+ baseUrl: 'https://friends.roblox.com',
791
+ requestFormat: 'json',
1132
792
  serializationMethod: {
1133
793
  userId: {
1134
- style: "simple",
794
+ style: 'simple',
1135
795
  },
1136
796
  },
1137
797
  parameters: {
1138
798
  userId: z.number().int(),
1139
799
  },
1140
- response:
1141
- Roblox_Web_WebAPI_Models_ApiArrayResponse_Roblox_Friends_Api_Models_Response_UserResponse_,
800
+ response: Roblox_Web_WebAPI_Models_ApiArrayResponse_Roblox_Friends_Api_Models_Response_UserResponse_,
1142
801
  errors: [
1143
802
  {
1144
803
  status: 400,
@@ -1158,16 +817,16 @@ export const getUsersUseridFriendsInactive = endpoint({
1158
817
  * @param userSort The sort order to return the friends.
1159
818
  */
1160
819
  export const getUsersUseridFriendsOnline = endpoint({
1161
- method: "GET",
1162
- path: "/v1/users/:userId/friends/online",
1163
- baseUrl: "https://friends.roblox.com",
1164
- requestFormat: "json",
820
+ method: 'GET',
821
+ path: '/v1/users/:userId/friends/online',
822
+ baseUrl: 'https://friends.roblox.com',
823
+ requestFormat: 'json',
1165
824
  serializationMethod: {
1166
825
  userId: {
1167
- style: "simple",
826
+ style: 'simple',
1168
827
  },
1169
828
  userSort: {
1170
- style: "form",
829
+ style: 'form',
1171
830
  explode: true,
1172
831
  },
1173
832
  },
@@ -1175,8 +834,7 @@ export const getUsersUseridFriendsOnline = endpoint({
1175
834
  userId: z.number().int(),
1176
835
  userSort: z.union([z.literal(0), z.literal(1), z.literal(2)]).optional(),
1177
836
  },
1178
- response:
1179
- Roblox_Web_WebAPI_Models_ApiArrayResponse_Roblox_Friends_Api_Models_Response_UserPresenceResponse_,
837
+ response: Roblox_Web_WebAPI_Models_ApiArrayResponse_Roblox_Friends_Api_Models_Response_UserPresenceResponse_,
1180
838
  errors: [
1181
839
  {
1182
840
  status: 400,
@@ -1198,24 +856,24 @@ export const getUsersUseridFriendsOnline = endpoint({
1198
856
  * @param limit The number of results per request.
1199
857
  */
1200
858
  export const getUsersUseridFriendsSearch = endpoint({
1201
- method: "GET",
1202
- path: "/v1/users/:userId/friends/search",
1203
- baseUrl: "https://friends.roblox.com",
1204
- requestFormat: "json",
859
+ method: 'GET',
860
+ path: '/v1/users/:userId/friends/search',
861
+ baseUrl: 'https://friends.roblox.com',
862
+ requestFormat: 'json',
1205
863
  serializationMethod: {
1206
864
  userId: {
1207
- style: "simple",
865
+ style: 'simple',
1208
866
  },
1209
867
  query: {
1210
- style: "form",
868
+ style: 'form',
1211
869
  explode: true,
1212
870
  },
1213
871
  cursor: {
1214
- style: "form",
872
+ style: 'form',
1215
873
  explode: true,
1216
874
  },
1217
875
  limit: {
1218
- style: "form",
876
+ style: 'form',
1219
877
  explode: true,
1220
878
  },
1221
879
  },
@@ -1225,8 +883,7 @@ export const getUsersUseridFriendsSearch = endpoint({
1225
883
  cursor: z.string().optional(),
1226
884
  limit: z.number().int().optional().default(20),
1227
885
  },
1228
- response:
1229
- Roblox_Paging_CursoredPagedResult_Roblox_Friends_Api_Models_Response_FriendResponse_,
886
+ response: Roblox_Paging_CursoredPagedResult_Roblox_Friends_Api_Models_Response_FriendResponse_,
1230
887
  errors: [
1231
888
  {
1232
889
  status: 400,
@@ -1246,24 +903,23 @@ export const getUsersUseridFriendsSearch = endpoint({
1246
903
  * @param userIds
1247
904
  */
1248
905
  export const getUsersUseridFriendsStatuses = endpoint({
1249
- method: "GET",
1250
- path: "/v1/users/:userId/friends/statuses",
1251
- baseUrl: "https://friends.roblox.com",
1252
- requestFormat: "json",
906
+ method: 'GET',
907
+ path: '/v1/users/:userId/friends/statuses',
908
+ baseUrl: 'https://friends.roblox.com',
909
+ requestFormat: 'json',
1253
910
  serializationMethod: {
1254
911
  userId: {
1255
- style: "simple",
912
+ style: 'simple',
1256
913
  },
1257
914
  userIds: {
1258
- style: "form",
915
+ style: 'form',
1259
916
  },
1260
917
  },
1261
918
  parameters: {
1262
919
  userId: z.number().int(),
1263
920
  userIds: z.array(z.number()),
1264
921
  },
1265
- response:
1266
- Roblox_Web_WebAPI_Models_ApiArrayResponse_Roblox_Friends_Api_FriendStatusResponse_,
922
+ response: Roblox_Web_WebAPI_Models_ApiArrayResponse_Roblox_Friends_Api_FriendStatusResponse_,
1267
923
  errors: [
1268
924
  {
1269
925
  status: 400,
@@ -1279,13 +935,13 @@ export const getUsersUseridFriendsStatuses = endpoint({
1279
935
  * @param userId
1280
936
  */
1281
937
  export const getUsersUseridTrustedFriendsCount = endpoint({
1282
- method: "GET",
1283
- path: "/v1/users/:userId/trusted-friends/count",
1284
- baseUrl: "https://friends.roblox.com",
1285
- requestFormat: "json",
938
+ method: 'GET',
939
+ path: '/v1/users/:userId/trusted-friends/count',
940
+ baseUrl: 'https://friends.roblox.com',
941
+ requestFormat: 'json',
1286
942
  serializationMethod: {
1287
943
  userId: {
1288
- style: "simple",
944
+ style: 'simple',
1289
945
  },
1290
946
  },
1291
947
  parameters: {
@@ -1337,7 +993,222 @@ export const getUserUseridMultigetAreTrustedFriends = endpoint({
1337
993
  userIds: z.array(z.number()),
1338
994
  },
1339
995
  response: Patch_MultigetAreTrustedFriendsResponse,
996
+ errors: [{ status: 400, description: `1: The target user is invalid or does not exist.` }],
997
+ });
998
+
999
+ // Friend-management write endpoints Roblox removed from its published API docs but
1000
+ // which remain functional. Not on the official deprecated-endpoints list; the docs
1001
+ // only list the older /api/friends/* and api.roblox.com/user/* variants as removed.
1002
+
1003
+ const Patch_FriendshipRequestModel = z.object({
1004
+ friendshipOriginSourceType: z.enum([
1005
+ 'Unknown',
1006
+ 'PlayerSearch',
1007
+ 'QrCode',
1008
+ 'InGame',
1009
+ 'UserProfile',
1010
+ 'QqContactImporter',
1011
+ 'WeChatContactImporter',
1012
+ 'ProfileShare',
1013
+ 'PhoneContactImporter',
1014
+ 'FriendRecommendations',
1015
+ 'UserCommunities',
1016
+ ]),
1017
+ senderNickname: z.string(),
1018
+ });
1019
+
1020
+ export const postContactsTargetcontactidRequestFriendship = endpoint({
1021
+ method: 'POST',
1022
+ path: '/v1/contacts/:targetContactId/request-friendship',
1023
+ baseUrl: 'https://friends.roblox.com',
1024
+ requestFormat: 'json',
1025
+ serializationMethod: {
1026
+ targetContactId: { style: 'simple' },
1027
+ },
1028
+ parameters: {
1029
+ targetContactId: z.string(),
1030
+ },
1031
+ response: Roblox_Friends_Api_CaptchaStatusResponseModel,
1032
+ errors: [
1033
+ {
1034
+ status: 400,
1035
+ description: `1: The target user is invalid or does not exist.
1036
+ 5: The target user is already a friend.
1037
+ 6: Invalid parameters.
1038
+ 7: The user cannot be friends with itself.
1039
+ 31: User with max friends sent friend request.`,
1040
+ },
1041
+ { status: 401, description: `0: Authorization has been denied for this request.` },
1042
+ {
1043
+ status: 403,
1044
+ description: `0: Token Validation Failed
1045
+ 2: The user is banned from performing operation.
1046
+ 3: The user is blocked from performing this action.
1047
+ 14: The user has not passed the captcha.`,
1048
+ },
1049
+ { status: 429, description: `9: The flood limit has been exceeded.` },
1050
+ ],
1051
+ });
1052
+
1053
+ export const deleteMyNewFriendRequests = endpoint({
1054
+ method: 'DELETE',
1055
+ path: '/v1/my/new-friend-requests',
1056
+ baseUrl: 'https://friends.roblox.com',
1057
+ requestFormat: 'json',
1058
+ response: z.object({ status: z.boolean() }),
1059
+ errors: [
1060
+ { status: 401, description: `0: Authorization has been denied for this request.` },
1061
+ { status: 403, description: `0: Token Validation Failed` },
1062
+ ],
1063
+ });
1064
+
1065
+ export const postUserFriendRequestsDeclineAll = endpoint({
1066
+ method: 'POST',
1067
+ path: '/v1/user/friend-requests/decline-all',
1068
+ baseUrl: 'https://friends.roblox.com',
1069
+ requestFormat: 'json',
1070
+ response: z.object({ backgrounded: z.boolean() }),
1071
+ errors: [
1072
+ { status: 401, description: `0: Authorization has been denied for this request.` },
1073
+ { status: 403, description: `0: Token Validation Failed` },
1074
+ ],
1075
+ });
1076
+
1077
+ export const postUsersRequesteruseridAcceptFriendRequest = endpoint({
1078
+ method: 'POST',
1079
+ path: '/v1/users/:requesterUserId/accept-friend-request',
1080
+ baseUrl: 'https://friends.roblox.com',
1081
+ requestFormat: 'json',
1082
+ serializationMethod: {
1083
+ requesterUserId: { style: 'simple' },
1084
+ },
1085
+ parameters: {
1086
+ requesterUserId: z.number().int(),
1087
+ },
1088
+ response: z.object({}),
1089
+ errors: [
1090
+ {
1091
+ status: 400,
1092
+ description: `1: The target user is invalid or does not exist.
1093
+ 10: The friend request does not exist.
1094
+ 11: The current users friends limit has been exceeded.
1095
+ 12: The target users friends limit has been exceeded.`,
1096
+ },
1097
+ { status: 401, description: `0: Authorization has been denied for this request.` },
1098
+ {
1099
+ status: 403,
1100
+ description: `0: Token Validation Failed
1101
+ 3: The user is blocked from performing this action.`,
1102
+ },
1103
+ ],
1104
+ });
1105
+
1106
+ export const postUsersRequesteruseridDeclineFriendRequest = endpoint({
1107
+ method: 'POST',
1108
+ path: '/v1/users/:requesterUserId/decline-friend-request',
1109
+ baseUrl: 'https://friends.roblox.com',
1110
+ requestFormat: 'json',
1111
+ serializationMethod: {
1112
+ requesterUserId: { style: 'simple' },
1113
+ },
1114
+ parameters: {
1115
+ requesterUserId: z.number().int(),
1116
+ },
1117
+ response: z.object({}),
1118
+ errors: [
1119
+ {
1120
+ status: 400,
1121
+ description: `1: The target user is invalid or does not exist.
1122
+ 10: The friend request does not exist.`,
1123
+ },
1124
+ { status: 401, description: `0: Authorization has been denied for this request.` },
1125
+ { status: 403, description: `0: Token Validation Failed` },
1126
+ ],
1127
+ });
1128
+
1129
+ export const postUsersSenderuseridAcceptFriendRequestWithToken = endpoint({
1130
+ method: 'POST',
1131
+ path: '/v1/users/:senderUserId/accept-friend-request-with-token',
1132
+ baseUrl: 'https://friends.roblox.com',
1133
+ requestFormat: 'json',
1134
+ serializationMethod: {
1135
+ body: {},
1136
+ senderUserId: { style: 'simple' },
1137
+ },
1138
+ parameters: {
1139
+ senderUserId: z.number().int(),
1140
+ },
1141
+ body: z.object({ friendingToken: z.string() }),
1142
+ response: z.object({}),
1143
+ errors: [
1144
+ {
1145
+ status: 400,
1146
+ description: `1: The target user is invalid or does not exist.
1147
+ 3: The user is blocked from performing this action.
1148
+ 5: The target user is already a friend.
1149
+ 6: Invalid parameters.
1150
+ 7: The user cannot be friends with itself.
1151
+ 11: The current users friends limit has been exceeded.
1152
+ 12: The target users friends limit has been exceeded.`,
1153
+ },
1154
+ { status: 401, description: `0: Authorization has been denied for this request.` },
1155
+ { status: 403, description: `0: Token Validation Failed` },
1156
+ ],
1157
+ });
1158
+
1159
+ export const postUsersTargetuseridRequestFriendship = endpoint({
1160
+ method: 'POST',
1161
+ path: '/v1/users/:targetUserId/request-friendship',
1162
+ baseUrl: 'https://friends.roblox.com',
1163
+ requestFormat: 'json',
1164
+ serializationMethod: {
1165
+ body: {},
1166
+ targetUserId: { style: 'simple' },
1167
+ },
1168
+ parameters: {
1169
+ targetUserId: z.number().int(),
1170
+ },
1171
+ body: Patch_FriendshipRequestModel,
1172
+ response: Roblox_Friends_Api_CaptchaStatusResponseModel,
1173
+ errors: [
1174
+ {
1175
+ status: 400,
1176
+ description: `1: The target user is invalid or does not exist.
1177
+ 5: The target user is already a friend.
1178
+ 6: Invalid parameters.
1179
+ 7: The user cannot be friends with itself.
1180
+ 10: The friend request does not exist.
1181
+ 13: The users are not in the same game.
1182
+ 31: User with max friends sent friend request.
1183
+ 35: Invalid nickname.`,
1184
+ },
1185
+ { status: 401, description: `0: Authorization has been denied for this request.` },
1186
+ {
1187
+ status: 403,
1188
+ description: `0: Token Validation Failed
1189
+ 2: The user is banned from performing operation.
1190
+ 3: The user is blocked from performing this action.
1191
+ 14: The user has not passed the captcha.`,
1192
+ },
1193
+ { status: 429, description: `9: The flood limit has been exceeded.` },
1194
+ ],
1195
+ });
1196
+
1197
+ export const postUsersTargetuseridUnfriend = endpoint({
1198
+ method: 'POST',
1199
+ path: '/v1/users/:targetUserId/unfriend',
1200
+ baseUrl: 'https://friends.roblox.com',
1201
+ requestFormat: 'json',
1202
+ serializationMethod: {
1203
+ targetUserId: { style: 'simple' },
1204
+ },
1205
+ parameters: {
1206
+ targetUserId: z.number().int(),
1207
+ },
1208
+ response: z.object({}),
1340
1209
  errors: [
1341
1210
  { status: 400, description: `1: The target user is invalid or does not exist.` },
1211
+ { status: 401, description: `0: Authorization has been denied for this request.` },
1212
+ { status: 403, description: `0: Token Validation Failed` },
1342
1213
  ],
1343
1214
  });