rozod 6.3.0 → 6.4.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.
- package/lib/endpoints/accountsettingsv1.d.ts +27 -33
- package/lib/endpoints/accountsettingsv1.js +11 -22
- package/lib/endpoints/adconfigurationv2.d.ts +104 -119
- package/lib/endpoints/adconfigurationv2.js +32 -48
- package/lib/endpoints/assetdeliveryv1.d.ts +25 -24
- package/lib/endpoints/assetdeliveryv1.js +25 -24
- package/lib/endpoints/assetdeliveryv2.d.ts +25 -24
- package/lib/endpoints/assetdeliveryv2.js +25 -24
- package/lib/endpoints/authv1.d.ts +84 -84
- package/lib/endpoints/authv1.js +69 -62
- package/lib/endpoints/authv2.d.ts +56 -56
- package/lib/endpoints/authv2.js +57 -50
- package/lib/endpoints/authv3.d.ts +11 -11
- package/lib/endpoints/authv3.js +11 -11
- package/lib/endpoints/badgesv1.d.ts +6 -2
- package/lib/endpoints/badgesv1.js +2 -2
- package/lib/endpoints/catalogv1.d.ts +37 -43
- package/lib/endpoints/catalogv1.js +37 -37
- package/lib/endpoints/catalogv2.d.ts +11 -11
- package/lib/endpoints/catalogv2.js +11 -11
- package/lib/endpoints/clientsettingsv2.d.ts +7 -7
- package/lib/endpoints/clientsettingsv2.js +8 -1
- package/lib/endpoints/developv1.d.ts +31 -31
- package/lib/endpoints/developv1.js +26 -26
- package/lib/endpoints/developv2.d.ts +27 -27
- package/lib/endpoints/developv2.js +22 -22
- package/lib/endpoints/economycreatorstatsv1.d.ts +1 -1
- package/lib/endpoints/economycreatorstatsv1.js +1 -1
- package/lib/endpoints/followingsv2.d.ts +2 -2
- package/lib/endpoints/followingsv2.js +2 -2
- package/lib/endpoints/friendsv1.d.ts +24 -23
- package/lib/endpoints/friendsv1.js +24 -23
- package/lib/endpoints/gamesv1.d.ts +27 -615
- package/lib/endpoints/gamesv1.js +28 -608
- package/lib/endpoints/gamesv2.d.ts +187 -260
- package/lib/endpoints/gamesv2.js +130 -190
- package/lib/endpoints/groupsv1.d.ts +26 -26
- package/lib/endpoints/groupsv1.js +28 -16
- package/lib/endpoints/groupsv2.d.ts +92 -92
- package/lib/endpoints/groupsv2.js +93 -87
- package/lib/endpoints/inventoryv1.d.ts +9 -21
- package/lib/endpoints/inventoryv1.js +4 -4
- package/lib/endpoints/inventoryv2.d.ts +91 -91
- package/lib/endpoints/inventoryv2.js +86 -86
- package/lib/endpoints/itemconfigurationv1.d.ts +1 -1
- package/lib/endpoints/itemconfigurationv1.js +1 -1
- package/lib/endpoints/tradesv1.d.ts +10 -16
- package/lib/endpoints/tradesv1.js +10 -10
- package/lib/endpoints/twostepverificationv1.d.ts +59 -60
- package/lib/endpoints/twostepverificationv1.js +59 -60
- package/lib/endpoints/usersv1.d.ts +1 -1
- package/lib/endpoints/usersv1.js +1 -1
- package/lib/index.js +29 -3
- package/package.json +1 -1
|
@@ -34,18 +34,17 @@ const Roblox_TwoStepVerification_Api_MetadataResponse = zod_1.z.object({
|
|
|
34
34
|
maskedUserEmail: zod_1.z.string(),
|
|
35
35
|
isUserU13: zod_1.z.boolean(),
|
|
36
36
|
isDelayedUiEnabled: zod_1.z.boolean(),
|
|
37
|
-
is2svRecoveryEnabled: zod_1.z.boolean(),
|
|
38
37
|
});
|
|
39
38
|
const Roblox_TwoStepVerification_Api_UserConfigurationMethod = zod_1.z.object({
|
|
40
|
-
mediaType: zod_1.z.
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
39
|
+
mediaType: zod_1.z.enum([
|
|
40
|
+
'Email',
|
|
41
|
+
'SMS',
|
|
42
|
+
'Authenticator',
|
|
43
|
+
'RecoveryCode',
|
|
44
|
+
'SecurityKey',
|
|
45
|
+
'CrossDevice',
|
|
46
|
+
'Password',
|
|
47
|
+
'Passkey',
|
|
49
48
|
]),
|
|
50
49
|
enabled: zod_1.z.boolean(),
|
|
51
50
|
updated: zod_1.z.string().datetime({ offset: true }),
|
|
@@ -69,16 +68,16 @@ const Roblox_TwoStepVerification_Api_RecoveryCodesStatusResponse = zod_1.z.objec
|
|
|
69
68
|
});
|
|
70
69
|
const Roblox_TwoStepVerification_Api_VerifyCodeRequest = zod_1.z.object({
|
|
71
70
|
challengeId: zod_1.z.string(),
|
|
72
|
-
actionType: zod_1.z.
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
71
|
+
actionType: zod_1.z.enum([
|
|
72
|
+
'Unknown',
|
|
73
|
+
'Login',
|
|
74
|
+
'RobuxSpend',
|
|
75
|
+
'ItemTrade',
|
|
76
|
+
'Resale',
|
|
77
|
+
'PasswordReset',
|
|
78
|
+
'RevertAccount',
|
|
79
|
+
'Generic',
|
|
80
|
+
'GenericWithRecoveryCodes',
|
|
82
81
|
]),
|
|
83
82
|
code: zod_1.z.string(),
|
|
84
83
|
});
|
|
@@ -87,46 +86,46 @@ const Roblox_TwoStepVerification_Api_VerifyCodeResponse = zod_1.z.object({
|
|
|
87
86
|
});
|
|
88
87
|
const Roblox_TwoStepVerification_Api_RetractDialogRequest = zod_1.z.object({
|
|
89
88
|
challengeId: zod_1.z.string(),
|
|
90
|
-
actionType: zod_1.z.
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
89
|
+
actionType: zod_1.z.enum([
|
|
90
|
+
'Unknown',
|
|
91
|
+
'Login',
|
|
92
|
+
'RobuxSpend',
|
|
93
|
+
'ItemTrade',
|
|
94
|
+
'Resale',
|
|
95
|
+
'PasswordReset',
|
|
96
|
+
'RevertAccount',
|
|
97
|
+
'Generic',
|
|
98
|
+
'GenericWithRecoveryCodes',
|
|
100
99
|
]),
|
|
101
100
|
});
|
|
102
101
|
const Roblox_TwoStepVerification_Api_RetractDialogResponse = zod_1.z.object({});
|
|
103
102
|
const Roblox_TwoStepVerification_Api_RetryApprovalRequest = zod_1.z.object({
|
|
104
103
|
challengeId: zod_1.z.string(),
|
|
105
|
-
actionType: zod_1.z.
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
104
|
+
actionType: zod_1.z.enum([
|
|
105
|
+
'Unknown',
|
|
106
|
+
'Login',
|
|
107
|
+
'RobuxSpend',
|
|
108
|
+
'ItemTrade',
|
|
109
|
+
'Resale',
|
|
110
|
+
'PasswordReset',
|
|
111
|
+
'RevertAccount',
|
|
112
|
+
'Generic',
|
|
113
|
+
'GenericWithRecoveryCodes',
|
|
115
114
|
]),
|
|
116
115
|
});
|
|
117
116
|
const Roblox_TwoStepVerification_Api_RetryApprovalResponse = zod_1.z.object({});
|
|
118
117
|
const Roblox_TwoStepVerification_Api_VerifyApprovalRequest = zod_1.z.object({
|
|
119
118
|
challengeId: zod_1.z.string(),
|
|
120
|
-
actionType: zod_1.z.
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
119
|
+
actionType: zod_1.z.enum([
|
|
120
|
+
'Unknown',
|
|
121
|
+
'Login',
|
|
122
|
+
'RobuxSpend',
|
|
123
|
+
'ItemTrade',
|
|
124
|
+
'Resale',
|
|
125
|
+
'PasswordReset',
|
|
126
|
+
'RevertAccount',
|
|
127
|
+
'Generic',
|
|
128
|
+
'GenericWithRecoveryCodes',
|
|
130
129
|
]),
|
|
131
130
|
});
|
|
132
131
|
const Roblox_TwoStepVerification_Api_VerifyApprovalResponse = zod_1.z.object({
|
|
@@ -134,16 +133,16 @@ const Roblox_TwoStepVerification_Api_VerifyApprovalResponse = zod_1.z.object({
|
|
|
134
133
|
});
|
|
135
134
|
const Roblox_TwoStepVerification_Api_SendCodeRequest = zod_1.z.object({
|
|
136
135
|
challengeId: zod_1.z.string(),
|
|
137
|
-
actionType: zod_1.z.
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
136
|
+
actionType: zod_1.z.enum([
|
|
137
|
+
'Unknown',
|
|
138
|
+
'Login',
|
|
139
|
+
'RobuxSpend',
|
|
140
|
+
'ItemTrade',
|
|
141
|
+
'Resale',
|
|
142
|
+
'PasswordReset',
|
|
143
|
+
'RevertAccount',
|
|
144
|
+
'Generic',
|
|
145
|
+
'GenericWithRecoveryCodes',
|
|
147
146
|
]),
|
|
148
147
|
});
|
|
149
148
|
const Roblox_Web_WebAPI_ApiEmptyResponseModel = zod_1.z.object({});
|
|
@@ -21,7 +21,7 @@ const Roblox_Users_Api_DescriptionRequest = z.object({
|
|
|
21
21
|
});
|
|
22
22
|
const Roblox_Users_Api_GenderResponse = z.object({ gender: z.number().int() });
|
|
23
23
|
const Roblox_Users_Api_GenderRequest = z.object({
|
|
24
|
-
gender: z.
|
|
24
|
+
gender: z.enum(["Unknown", "Male", "Female"]),
|
|
25
25
|
});
|
|
26
26
|
const Roblox_Users_Api_GetUserResponse = z.object({
|
|
27
27
|
description: z.string(),
|
package/lib/endpoints/usersv1.js
CHANGED
|
@@ -23,7 +23,7 @@ const Roblox_Users_Api_DescriptionRequest = zod_1.z.object({
|
|
|
23
23
|
});
|
|
24
24
|
const Roblox_Users_Api_GenderResponse = zod_1.z.object({ gender: zod_1.z.number().int() });
|
|
25
25
|
const Roblox_Users_Api_GenderRequest = zod_1.z.object({
|
|
26
|
-
gender: zod_1.z.
|
|
26
|
+
gender: zod_1.z.enum(['Unknown', 'Male', 'Female']),
|
|
27
27
|
});
|
|
28
28
|
const Roblox_Users_Api_GetUserResponse = zod_1.z.object({
|
|
29
29
|
description: zod_1.z.string(),
|
package/lib/index.js
CHANGED
|
@@ -95,9 +95,35 @@ function prepareRequestUrl(endpoint, extendedParams) {
|
|
|
95
95
|
return endpoint.baseUrl + processedPath + query;
|
|
96
96
|
}
|
|
97
97
|
function prepareRequestBody(method, requestFormat, body, headers) {
|
|
98
|
-
if (method !== 'GET'
|
|
99
|
-
|
|
100
|
-
|
|
98
|
+
if (method !== 'GET') {
|
|
99
|
+
switch (requestFormat) {
|
|
100
|
+
case 'json':
|
|
101
|
+
body = JSON.stringify(body);
|
|
102
|
+
headers.set('content-type', 'application/json');
|
|
103
|
+
break;
|
|
104
|
+
case 'form-data': {
|
|
105
|
+
const formData = new FormData();
|
|
106
|
+
for (const [key, value] of Object.entries(body)) {
|
|
107
|
+
if (value instanceof Blob) {
|
|
108
|
+
formData.append(key, value);
|
|
109
|
+
}
|
|
110
|
+
else if (typeof value === 'string') {
|
|
111
|
+
formData.append(key, value);
|
|
112
|
+
}
|
|
113
|
+
else {
|
|
114
|
+
formData.append(key, JSON.stringify(value));
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
body = formData;
|
|
118
|
+
break;
|
|
119
|
+
}
|
|
120
|
+
case 'text':
|
|
121
|
+
headers.set('content-type', 'text/plain');
|
|
122
|
+
break;
|
|
123
|
+
default:
|
|
124
|
+
requestFormat;
|
|
125
|
+
throw new Error(`Unsupported request format: ${requestFormat}`);
|
|
126
|
+
}
|
|
101
127
|
}
|
|
102
128
|
return body;
|
|
103
129
|
}
|