rozod 6.5.0 → 6.5.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/README.md CHANGED
@@ -25,7 +25,7 @@
25
25
 
26
26
  ## About
27
27
 
28
- `RoZod` makes working with Roblox APIs simple and type-safe in TypeScript. With **650+ classic Roblox web API endpoints** and **95+ OpenCloud endpoints** (all code-generated from official Roblox documentation), you get comprehensive coverage of virtually every available Roblox API with full type safety.
28
+ `RoZod` makes working with Roblox APIs simple and type-safe in TypeScript. With **695+ classic Roblox web API endpoints** and **115+ OpenCloud endpoints** (all code-generated from official Roblox documentation), you get comprehensive coverage of virtually every available Roblox API with full type safety.
29
29
 
30
30
  Perfect for everything from small one-time NodeJS/Bun/Deno scripts to large-scale production applications. RoZod powers [RoGold](https://rogold.live), a browser extension with **800,000+ active users**, handling millions of API requests daily across both frontend extensions and backend workflows.
31
31
 
@@ -33,7 +33,7 @@ Perfect for everything from small one-time NodeJS/Bun/Deno scripts to large-scal
33
33
 
34
34
  - ✨ **Simple Interface** - Easy to understand API with minimal boilerplate
35
35
  - 🔒 **Type Safety** - Complete TypeScript type safety for requests and responses
36
- - 📚 **750+ Total Endpoints** - 650+ classic web APIs + 95+ OpenCloud APIs, all code-generated from official docs
36
+ - 📚 **810+ Total Endpoints** - 695+ classic web APIs + 115+ OpenCloud APIs, all code-generated from official docs
37
37
  - 🚀 **Production Ready** - Battle-tested in applications serving 800,000+ users
38
38
  - 🔄 **Pagination Helpers** - Easy tools for handling paginated responses
39
39
  - 🔁 **Batch Processing** - Split large requests automatically to avoid API limits
@@ -46,6 +46,8 @@ Perfect for everything from small one-time NodeJS/Bun/Deno scripts to large-scal
46
46
  ```bash
47
47
  npm install rozod
48
48
  # or
49
+ bun add rozod
50
+ # or
49
51
  yarn add rozod
50
52
  # or
51
53
  pnpm add rozod
@@ -54,15 +56,15 @@ pnpm add rozod
54
56
  ## Quick Start
55
57
 
56
58
  ```ts
57
- import { fetchApi } from 'rozod';
58
- import { getUsersUserdetails } from 'rozod/lib/endpoints/usersv1';
59
+ import { fetchApi, isAnyErrorResponse } from 'rozod';
60
+ import { getUsersUserid } from 'rozod/lib/endpoints/usersv1';
59
61
 
60
62
  // Fetch user details with full type safety
61
- const userInfo = await fetchApi(getUsersUserdetails, { userIds: [1, 123456] });
63
+ const userInfo = await fetchApi(getUsersUserid, { userId: 1 });
62
64
  if (isAnyErrorResponse(userInfo)) {
63
65
  return;
64
66
  }
65
- console.log(userInfo.data[0].displayName); // Properly typed!
67
+ console.log(userInfo.displayName); // Properly typed!
66
68
  ```
67
69
 
68
70
  ## Usage
@@ -70,33 +72,38 @@ console.log(userInfo.data[0].displayName); // Properly typed!
70
72
  ### Fetch a Single Request
71
73
 
72
74
  ```ts
73
- import { fetchApi } from 'rozod';
74
- import { getGamesIcons } from 'rozod/lib/endpoints/gamesv1';
75
+ import { fetchApi, isAnyErrorResponse } from 'rozod';
76
+ import { getGamesIcons } from 'rozod/lib/endpoints/thumbnailsv1';
75
77
 
76
78
  const response = await fetchApi(getGamesIcons, { universeIds: [1534453623, 65241] });
77
- console.log(response.data);
79
+ if (!isAnyErrorResponse(response)) {
80
+ console.log(response.data);
81
+ }
78
82
  ```
79
83
 
80
84
  ### Handle Paginated Responses
81
85
 
82
86
  ```ts
83
- import { fetchApiPages } from 'rozod';
87
+ import { fetchApiPages, isAnyErrorResponse } from 'rozod';
84
88
  import { getGroupsGroupidWallPosts } from 'rozod/lib/endpoints/groupsv2';
85
89
 
86
90
  // Automatically fetches all pages
87
- const allPosts = await fetchApiPages(getGroupsGroupidWallPosts, { groupId: 11479637 });
88
- console.log(`Found ${allPosts.length} wall posts`);
91
+ const pages = await fetchApiPages(getGroupsGroupidWallPosts, { groupId: 11479637 });
92
+ if (!isAnyErrorResponse(pages)) {
93
+ console.log(`Fetched ${pages.length} pages of wall posts`);
94
+ }
89
95
  ```
90
96
 
91
97
  ### Process Pages One at a Time
92
98
 
93
99
  ```ts
94
- import { fetchApiPagesGenerator } from 'rozod';
100
+ import { fetchApiPagesGenerator, isAnyErrorResponse } from 'rozod';
95
101
  import { getGroupsGroupidWallPosts } from 'rozod/lib/endpoints/groupsv2';
96
102
 
97
103
  // Process pages as they arrive
98
104
  const pages = fetchApiPagesGenerator(getGroupsGroupidWallPosts, { groupId: 11479637 });
99
105
  for await (const page of pages) {
106
+ if (isAnyErrorResponse(page)) break;
100
107
  console.log(`Processing page with ${page.data.length} posts`);
101
108
  // Do something with this page
102
109
  }
@@ -106,7 +113,7 @@ for await (const page of pages) {
106
113
 
107
114
  ```ts
108
115
  import { fetchApiSplit } from 'rozod';
109
- import { getGamesIcons } from 'rozod/lib/endpoints/gamesv1';
116
+ import { getGamesIcons } from 'rozod/lib/endpoints/thumbnailsv1';
110
117
 
111
118
  // Will automatically split into smaller batches of 100 universeIds per request
112
119
  const data = await fetchApiSplit(
@@ -123,7 +130,7 @@ By default, requests return either the success type or a simple `AnyError`. Use
123
130
 
124
131
  ```ts
125
132
  import { fetchApi, isAnyErrorResponse } from 'rozod';
126
- import { getGamesIcons } from 'rozod/lib/endpoints/gamesv1';
133
+ import { getGamesIcons } from 'rozod/lib/endpoints/thumbnailsv1';
127
134
 
128
135
  const res = await fetchApi(getGamesIcons, { universeIds: [1534453623] });
129
136
  if (isAnyErrorResponse(res)) {
@@ -156,7 +163,7 @@ const json = await resp.json();
156
163
  RoZod supports Roblox's newer OpenCloud APIs with the same easy interface:
157
164
 
158
165
  ```ts
159
- import { fetchApi } from 'rozod';
166
+ import { fetchApi, isAnyErrorResponse } from 'rozod';
160
167
  import { v2 } from 'rozod/lib/opencloud';
161
168
 
162
169
  // Get universe details through OpenCloud
@@ -164,9 +171,11 @@ const universeInfo = await fetchApi(v2.getCloudV2UniversesUniverseId, {
164
171
  universe_id: '123456789',
165
172
  });
166
173
 
167
- // Access typed properties
168
- console.log(universeInfo.displayName);
169
- console.log(universeInfo.description);
174
+ if (!isAnyErrorResponse(universeInfo)) {
175
+ // Access typed properties
176
+ console.log(universeInfo.displayName);
177
+ console.log(universeInfo.description);
178
+ }
170
179
  ```
171
180
 
172
181
  ### Access DataStores via OpenCloud
@@ -192,10 +201,10 @@ In browsers, authentication works automatically when users are logged into Roblo
192
201
 
193
202
  ```ts
194
203
  import { fetchApi } from 'rozod';
195
- import { getUsersUserdetails } from 'rozod/lib/endpoints/usersv1';
204
+ import { getUsersUserid } from 'rozod/lib/endpoints/usersv1';
196
205
 
197
206
  // Cookies are sent automatically - no setup required!
198
- const userInfo = await fetchApi(getUsersUserdetails, { userIds: [123456] });
207
+ const userInfo = await fetchApi(getUsersUserid, { userId: 123456 });
199
208
  ```
200
209
 
201
210
  ### Server Environments (Node.js/Bun/Deno)
@@ -204,13 +213,13 @@ For server environments, use `configureServer()` to set up authentication once:
204
213
 
205
214
  ```ts
206
215
  import { configureServer, fetchApi } from 'rozod';
207
- import { getUsersUserdetails } from 'rozod/lib/endpoints/usersv1';
216
+ import { getUsersUserid } from 'rozod/lib/endpoints/usersv1';
208
217
 
209
218
  // Configure once at startup
210
219
  configureServer({ cookies: 'your_roblosecurity_cookie_here' });
211
220
 
212
221
  // All subsequent requests automatically include the cookie
213
- const userInfo = await fetchApi(getUsersUserdetails, { userIds: [123456] });
222
+ const userInfo = await fetchApi(getUsersUserid, { userId: 123456 });
214
223
  ```
215
224
 
216
225
  #### Multiple Accounts (Cookie Pool)
@@ -273,7 +282,7 @@ configureServer({ cookies: '...', userAgents: [] });
273
282
  For OpenCloud endpoints (`apis.roblox.com`), set your API key once:
274
283
 
275
284
  ```ts
276
- import { configureServer } from 'rozod';
285
+ import { configureServer, fetchApi } from 'rozod';
277
286
  import { v2 } from 'rozod/lib/opencloud';
278
287
 
279
288
  // Configure OpenCloud API key
@@ -315,8 +324,8 @@ You can still pass headers manually per-request if needed:
315
324
 
316
325
  ```ts
317
326
  const userInfo = await fetchApi(
318
- getUsersUserdetails,
319
- { userIds: [123456] },
327
+ getUsersUserid,
328
+ { userId: 123456 },
320
329
  {
321
330
  headers: {
322
331
  'Cookie': '.ROBLOSECURITY=your_cookie_here'
@@ -408,37 +417,6 @@ const keyPair = await crypto.subtle.generateKey(
408
417
  changeHBAKeys(keyPair);
409
418
  ```
410
419
 
411
- ### OpenCloud Authentication
412
-
413
- OpenCloud APIs require API keys. Use `configureServer()` for automatic injection:
414
-
415
- ```ts
416
- import { configureServer, fetchApi } from 'rozod';
417
- import { v2 } from 'rozod/lib/opencloud';
418
-
419
- // Configure once at startup
420
- configureServer({ cloudKey: 'your_opencloud_api_key_here' });
421
-
422
- // All OpenCloud requests automatically include x-api-key
423
- const universeInfo = await fetchApi(v2.getCloudV2UniversesUniverseId, {
424
- universe_id: '123456789',
425
- });
426
- ```
427
-
428
- Or pass headers manually per-request:
429
-
430
- ```ts
431
- const universeInfo = await fetchApi(
432
- v2.getCloudV2UniversesUniverseId,
433
- { universe_id: '123456789' },
434
- {
435
- headers: {
436
- 'x-api-key': 'your_opencloud_api_key_here'
437
- }
438
- }
439
- );
440
- ```
441
-
442
420
  ## Custom Endpoints
443
421
 
444
422
  You can define custom endpoints for your specific needs:
@@ -404,7 +404,7 @@ const Roblox_Authentication_Api_Models_ReferralDataModel = z.object({
404
404
  });
405
405
  const Roblox_Authentication_Api_Models_Request_OtpSessionModel = z.object({
406
406
  otpSessionToken: z.string(),
407
- otpContactType: z.enum(["Unset", "Email"]),
407
+ otpContactType: z.enum(["Unset", "Email", "Phone"]),
408
408
  });
409
409
  const Roblox_Authentication_Api_Models_Request_AuditContentValue = z.object({
410
410
  translationKey: z.string(),
@@ -377,7 +377,7 @@ const Roblox_Authentication_Api_Models_ReferralDataModel = zod_1.z.object({
377
377
  });
378
378
  const Roblox_Authentication_Api_Models_Request_OtpSessionModel = zod_1.z.object({
379
379
  otpSessionToken: zod_1.z.string(),
380
- otpContactType: zod_1.z.enum(['Unset', 'Email']),
380
+ otpContactType: zod_1.z.enum(['Unset', 'Email', 'Phone']),
381
381
  });
382
382
  const Roblox_Authentication_Api_Models_Request_AuditContentValue = zod_1.z.object({
383
383
  translationKey: zod_1.z.string(),
@@ -238,7 +238,7 @@ const Roblox_Authentication_Api_Models_ReferralDataModel = z.object({
238
238
  });
239
239
  const Roblox_Authentication_Api_Models_Request_OtpSessionModel = z.object({
240
240
  otpSessionToken: z.string(),
241
- otpContactType: z.enum(["Unset", "Email"]),
241
+ otpContactType: z.enum(["Unset", "Email", "Phone"]),
242
242
  });
243
243
  const Roblox_Authentication_Api_Models_Request_AuditContentValue = z.object({
244
244
  translationKey: z.string(),
@@ -231,7 +231,7 @@ const Roblox_Authentication_Api_Models_ReferralDataModel = zod_1.z.object({
231
231
  });
232
232
  const Roblox_Authentication_Api_Models_Request_OtpSessionModel = zod_1.z.object({
233
233
  otpSessionToken: zod_1.z.string(),
234
- otpContactType: zod_1.z.enum(['Unset', 'Email']),
234
+ otpContactType: zod_1.z.enum(['Unset', 'Email', 'Phone']),
235
235
  });
236
236
  const Roblox_Authentication_Api_Models_Request_AuditContentValue = zod_1.z.object({
237
237
  translationKey: zod_1.z.string(),
@@ -112,7 +112,6 @@ const Roblox_Friends_Api_Models_Response_UserPresenceResponseModel = z.object({
112
112
  const Roblox_Friends_Api_Models_Response_UserPresenceResponse = z.object({
113
113
  userPresence: Roblox_Friends_Api_Models_Response_UserPresenceResponseModel,
114
114
  sortScore: z.number(),
115
- loggingJoinKey: z.string(),
116
115
  id: z.number().int(),
117
116
  name: z.string(),
118
117
  displayName: z.string(),
@@ -317,6 +316,7 @@ export const postMyFriendsRefreshQrSession = endpoint({
317
316
  * @summary Get all users that friend requests with targetUserId using exclusive start paging
318
317
  * @param limit The number of results per request.
319
318
  * @param cursor The paging cursor for the previous or next page.
319
+ * @param sessionId Optional session identifier.
320
320
  * @param friendRequestSort
321
321
  */
322
322
  export const getMyFriendsRequests = endpoint({
@@ -333,6 +333,10 @@ export const getMyFriendsRequests = endpoint({
333
333
  style: "form",
334
334
  explode: true,
335
335
  },
336
+ sessionId: {
337
+ style: "form",
338
+ explode: true,
339
+ },
336
340
  friendRequestSort: {
337
341
  style: "form",
338
342
  explode: true,
@@ -341,6 +345,7 @@ export const getMyFriendsRequests = endpoint({
341
345
  parameters: {
342
346
  limit: z.number().int().optional().default(10),
343
347
  cursor: z.string().optional(),
348
+ sessionId: z.string().optional(),
344
349
  friendRequestSort: z
345
350
  .union([z.literal(0), z.literal(1), z.literal(2)])
346
351
  .optional()
@@ -103,7 +103,6 @@ const Roblox_Friends_Api_Models_Response_UserPresenceResponseModel = zod_1.z.obj
103
103
  const Roblox_Friends_Api_Models_Response_UserPresenceResponse = zod_1.z.object({
104
104
  userPresence: Roblox_Friends_Api_Models_Response_UserPresenceResponseModel,
105
105
  sortScore: zod_1.z.number(),
106
- loggingJoinKey: zod_1.z.string(),
107
106
  id: zod_1.z.number().int(),
108
107
  name: zod_1.z.string(),
109
108
  displayName: zod_1.z.string(),
@@ -302,6 +301,7 @@ exports.postMyFriendsRefreshQrSession = (0, __1.endpoint)({
302
301
  * @summary Get all users that friend requests with targetUserId using exclusive start paging
303
302
  * @param limit The number of results per request.
304
303
  * @param cursor The paging cursor for the previous or next page.
304
+ * @param sessionId Optional session identifier.
305
305
  * @param friendRequestSort
306
306
  */
307
307
  exports.getMyFriendsRequests = (0, __1.endpoint)({
@@ -318,6 +318,10 @@ exports.getMyFriendsRequests = (0, __1.endpoint)({
318
318
  style: 'form',
319
319
  explode: true,
320
320
  },
321
+ sessionId: {
322
+ style: 'form',
323
+ explode: true,
324
+ },
321
325
  friendRequestSort: {
322
326
  style: 'form',
323
327
  explode: true,
@@ -326,6 +330,7 @@ exports.getMyFriendsRequests = (0, __1.endpoint)({
326
330
  parameters: {
327
331
  limit: zod_1.z.number().int().optional().default(10),
328
332
  cursor: zod_1.z.string().optional(),
333
+ sessionId: zod_1.z.string().optional(),
329
334
  friendRequestSort: zod_1.z
330
335
  .union([zod_1.z.literal(0), zod_1.z.literal(1), zod_1.z.literal(2)])
331
336
  .optional()
@@ -44,6 +44,7 @@ const Roblox_Groups_Api_GroupRoleResponse = z.object({
44
44
  description: z.string(),
45
45
  rank: z.number().int(),
46
46
  memberCount: z.number().int(),
47
+ isBase: z.boolean(),
47
48
  });
48
49
  const Roblox_Groups_Api_UserGroupRoleResponse = z.object({
49
50
  user: Roblox_Groups_Api_Models_Response_UserModel,
@@ -249,6 +250,9 @@ const Roblox_Groups_Api_PayoutRequest = z.object({
249
250
  Recipients: z.array(Roblox_Groups_Api_PayoutRecipientRequest),
250
251
  IdempotencyKey: z.string(),
251
252
  });
253
+ const Roblox_Groups_Api_OneTimePayoutResponse = z.object({
254
+ status: z.enum(["NotHeld", "Held"]),
255
+ });
252
256
  const Roblox_Groups_Api_GroupRelationshipsResponse = z.object({
253
257
  groupId: z.number().int(),
254
258
  relationshipType: z.enum(["Allies", "Enemies"]),
@@ -483,6 +487,7 @@ const Roblox_Groups_Api_GroupRoleDetailResponse = z.object({
483
487
  description: z.string(),
484
488
  rank: z.number().int(),
485
489
  memberCount: z.number().int(),
490
+ isBase: z.boolean(),
486
491
  });
487
492
  const Roblox_Web_WebAPI_Models_ApiArrayResponse_Roblox_Groups_Api_GroupRoleDetailResponse_ =
488
493
  z.object({ data: z.array(Roblox_Groups_Api_GroupRoleDetailResponse) });
@@ -1991,7 +1996,7 @@ export const postGroupsGroupidPayouts = endpoint({
1991
1996
  groupId: z.number().int(),
1992
1997
  },
1993
1998
  body: Roblox_Groups_Api_PayoutRequest,
1994
- response: z.object({}),
1999
+ response: Roblox_Groups_Api_OneTimePayoutResponse,
1995
2000
  errors: [
1996
2001
  {
1997
2002
  status: 400,
@@ -41,6 +41,7 @@ const Roblox_Groups_Api_GroupRoleResponse = zod_1.z.object({
41
41
  description: zod_1.z.string(),
42
42
  rank: zod_1.z.number().int(),
43
43
  memberCount: zod_1.z.number().int(),
44
+ isBase: zod_1.z.boolean(),
44
45
  });
45
46
  const Roblox_Groups_Api_UserGroupRoleResponse = zod_1.z.object({
46
47
  user: Roblox_Groups_Api_Models_Response_UserModel,
@@ -238,6 +239,9 @@ const Roblox_Groups_Api_PayoutRequest = zod_1.z.object({
238
239
  Recipients: zod_1.z.array(Roblox_Groups_Api_PayoutRecipientRequest),
239
240
  IdempotencyKey: zod_1.z.string(),
240
241
  });
242
+ const Roblox_Groups_Api_OneTimePayoutResponse = zod_1.z.object({
243
+ status: zod_1.z.enum(['NotHeld', 'Held']),
244
+ });
241
245
  const Roblox_Groups_Api_GroupRelationshipsResponse = zod_1.z.object({
242
246
  groupId: zod_1.z.number().int(),
243
247
  relationshipType: zod_1.z.enum(['Allies', 'Enemies']),
@@ -454,6 +458,7 @@ const Roblox_Groups_Api_GroupRoleDetailResponse = zod_1.z.object({
454
458
  description: zod_1.z.string(),
455
459
  rank: zod_1.z.number().int(),
456
460
  memberCount: zod_1.z.number().int(),
461
+ isBase: zod_1.z.boolean(),
457
462
  });
458
463
  const Roblox_Web_WebAPI_Models_ApiArrayResponse_Roblox_Groups_Api_GroupRoleDetailResponse_ = zod_1.z.object({
459
464
  data: zod_1.z.array(Roblox_Groups_Api_GroupRoleDetailResponse),
@@ -1959,7 +1964,7 @@ exports.postGroupsGroupidPayouts = (0, __1.endpoint)({
1959
1964
  groupId: zod_1.z.number().int(),
1960
1965
  },
1961
1966
  body: Roblox_Groups_Api_PayoutRequest,
1962
- response: zod_1.z.object({}),
1967
+ response: Roblox_Groups_Api_OneTimePayoutResponse,
1963
1968
  errors: [
1964
1969
  {
1965
1970
  status: 400,
@@ -181,6 +181,7 @@ const Roblox_Groups_Api_GroupRoleResponse = z.object({
181
181
  description: z.string(),
182
182
  rank: z.number().int(),
183
183
  memberCount: z.number().int(),
184
+ isBase: z.boolean(),
184
185
  });
185
186
  const Roblox_Groups_Api_UserGroupRoleResponse = z.object({
186
187
  user: Roblox_Groups_Api_Models_Response_UserModel,
@@ -171,6 +171,7 @@ const Roblox_Groups_Api_GroupRoleResponse = zod_1.z.object({
171
171
  description: zod_1.z.string(),
172
172
  rank: zod_1.z.number().int(),
173
173
  memberCount: zod_1.z.number().int(),
174
+ isBase: zod_1.z.boolean(),
174
175
  });
175
176
  const Roblox_Groups_Api_UserGroupRoleResponse = zod_1.z.object({
176
177
  user: Roblox_Groups_Api_Models_Response_UserModel,
@@ -11,31 +11,6 @@ const Roblox_Web_WebAPI_Models_ApiPageResponse_Roblox_ItemConfiguration_Api_Asse
11
11
  nextPageCursor: z.string(),
12
12
  data: z.array(Roblox_ItemConfiguration_Api_AssetCreationsResponse),
13
13
  });
14
- const Roblox_ItemConfiguration_Api_TagDetails = z.object({
15
- tagId: z.string(),
16
- name: z.string(),
17
- localizedDisplayName: z.string(),
18
- status: z.enum(["Success", "MissingItem"]),
19
- });
20
- const Roblox_ItemConfiguration_Api_ItemTagDetails = z.object({
21
- id: z.string(),
22
- tag: Roblox_ItemConfiguration_Api_TagDetails,
23
- });
24
- const Roblox_ItemConfiguration_Api_ItemWithTags = z.object({
25
- id: z.string(),
26
- itemTags: z.array(Roblox_ItemConfiguration_Api_ItemTagDetails),
27
- });
28
- const Roblox_Web_WebAPI_Models_ApiArrayResponse_Roblox_ItemConfiguration_Api_ItemWithTags_ =
29
- z.object({ data: z.array(Roblox_ItemConfiguration_Api_ItemWithTags) });
30
- const Roblox_ItemConfiguration_Api_CreateItemTagRequest = z.object({
31
- itemId: z.string(),
32
- tagId: z.string(),
33
- });
34
- const Roblox_ItemConfiguration_Api_ItemTagsMetadataResponse = z.object({
35
- isItemTagsFeatureEnabled: z.boolean(),
36
- enabledAssetTypes: z.array(z.string()),
37
- maximumItemTagsPerItem: z.number().int(),
38
- });
39
14
  const Roblox_ItemConfiguration_Api_AssetCreationsDetailsRequest = z.object({
40
15
  AssetIds: z.array(z.number()),
41
16
  });
@@ -79,7 +54,6 @@ const Roblox_ItemConfiguration_Api_AssetCreationsDetailsResponse = z.object({
79
54
  isDelisted: z.boolean(),
80
55
  isCreatedForBundle: z.boolean(),
81
56
  });
82
- const Roblox_Web_WebAPI_ApiEmptyResponseModel = z.object({});
83
57
 
84
58
  /**
85
59
  * @api POST https://itemconfiguration.roblox.com/v1/creations/get-asset-details
@@ -198,147 +172,15 @@ export const getCreationsGetAssets = endpoint({
198
172
  },
199
173
  ],
200
174
  });
201
- /**
202
- * @api GET https://itemconfiguration.roblox.com/v1/item-tags
203
- * @summary Gets all related item tags for each item id listed.
204
- * @param itemIds
205
- */
206
- export const getItemTags = endpoint({
207
- method: "GET",
208
- path: "/v1/item-tags",
209
- baseUrl: "https://itemconfiguration.roblox.com",
210
- requestFormat: "json",
211
- serializationMethod: {
212
- itemIds: {
213
- style: "form",
214
- },
215
- },
216
- parameters: {
217
- itemIds: z.array(z.string()),
218
- },
219
- response:
220
- Roblox_Web_WebAPI_Models_ApiArrayResponse_Roblox_ItemConfiguration_Api_ItemWithTags_,
221
- errors: [
222
- {
223
- status: 400,
224
- description: `1: No item tag Ids requested
225
- 2: Too many item tag Ids requested
226
- 3: Invalid item id
227
- 6: Invalid item namespace`,
228
- },
229
- {
230
- status: 404,
231
- description: `10: The endpoint was not found`,
232
- },
233
- {
234
- status: 429,
235
- description: `7: Too many requests`,
236
- },
237
- ],
238
- });
239
- /**
240
- * @api POST https://itemconfiguration.roblox.com/v1/item-tags
241
- * @summary Creates a new item tag.
242
- * @param body
243
- */
244
- export const postItemTags = endpoint({
245
- method: "POST",
246
- path: "/v1/item-tags",
247
- baseUrl: "https://itemconfiguration.roblox.com",
248
- requestFormat: "json",
249
- serializationMethod: {
250
- body: {},
251
- },
252
- parameters: {},
253
- body: Roblox_ItemConfiguration_Api_CreateItemTagRequest,
254
- response: Roblox_ItemConfiguration_Api_ItemTagDetails,
255
- errors: [
256
- {
257
- status: 400,
258
- description: `3: Invalid item id
259
- 4: Invalid tag id
260
- 6: Invalid item namespace
261
- 8: The given item is ineligible for item tags
262
- 9: The given item has already reached its maximum item tag count`,
263
- },
264
- {
265
- status: 401,
266
- description: `0: Authorization has been denied for this request.`,
267
- },
268
- {
269
- status: 403,
270
- description: `0: Token Validation Failed
271
- 5: The current user is missing permissions for the endpoint`,
272
- },
273
- {
274
- status: 404,
275
- description: `10: The endpoint was not found`,
276
- },
277
- {
278
- status: 429,
279
- description: `7: Too many requests`,
280
- },
281
- ],
282
- });
283
- /**
284
- * @api DELETE https://itemconfiguration.roblox.com/v1/item-tags/:itemTagId
285
- * @summary Deletes an item tag from an item.
286
- * @param itemTagId
287
- */
288
- export const deleteItemTagsItemtagid = endpoint({
289
- method: "DELETE",
290
- path: "/v1/item-tags/:itemTagId",
291
- baseUrl: "https://itemconfiguration.roblox.com",
292
- requestFormat: "json",
293
- serializationMethod: {
294
- itemTagId: {
295
- style: "simple",
296
- },
297
- },
298
- parameters: {
299
- itemTagId: z.string(),
300
- },
301
- response: z.object({}),
302
- errors: [
303
- {
304
- status: 401,
305
- description: `0: Authorization has been denied for this request.`,
306
- },
307
- {
308
- status: 403,
309
- description: `0: Token Validation Failed
310
- 5: The current user is missing permissions for the endpoint`,
311
- },
312
- {
313
- status: 404,
314
- description: `10: The endpoint was not found`,
315
- },
316
- {
317
- status: 429,
318
- description: `7: Too many requests`,
319
- },
320
- ],
321
- });
322
- /**
323
- * @api GET https://itemconfiguration.roblox.com/v1/item-tags/metadata
324
- * @summary Gets the metadata related to item tags.
325
- */
326
- export const getItemTagsMetadata = endpoint({
327
- method: "GET",
328
- path: "/v1/item-tags/metadata",
329
- baseUrl: "https://itemconfiguration.roblox.com",
330
- requestFormat: "json",
331
- response: Roblox_ItemConfiguration_Api_ItemTagsMetadataResponse,
332
- errors: [
333
- {
334
- status: 404,
335
- description: `10: The endpoint was not found`,
336
- },
337
- ],
338
- });
339
175
 
340
176
  // Patched endpoints removed from Roblox API docs (v6.1.0 compat)
341
177
 
178
+ const Roblox_ItemConfiguration_Api_TagDetails = z.object({
179
+ tagId: z.string(),
180
+ name: z.string(),
181
+ localizedDisplayName: z.string(),
182
+ status: z.enum(['Success', 'MissingItem']),
183
+ });
342
184
  const Patch_ApiArrayResponse_TagDetails = z.object({
343
185
  data: z.array(Roblox_ItemConfiguration_Api_TagDetails),
344
186
  });