@bedrock-rbx/ocale 0.3.4-beta.1 → 0.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/README.md +9 -5
- package/dist/badge-cost-mismatch-DrlvhlQc.mjs +47 -0
- package/dist/badge-cost-mismatch-DrlvhlQc.mjs.map +1 -0
- package/dist/badges.d.mts +228 -184
- package/dist/badges.d.mts.map +1 -1
- package/dist/badges.mjs +176 -18
- package/dist/badges.mjs.map +1 -1
- package/dist/capacity-admission-hycCFkTo.d.mts +355 -0
- package/dist/capacity-admission-hycCFkTo.d.mts.map +1 -0
- package/dist/{data.generated-B2ceLfSn.d.mts → data.generated-D_vpa5-g.d.mts} +23 -23
- package/dist/data.generated-D_vpa5-g.d.mts.map +1 -0
- package/dist/developer-products.d.mts +181 -186
- package/dist/developer-products.d.mts.map +1 -1
- package/dist/developer-products.mjs +24 -24
- package/dist/developer-products.mjs.map +1 -1
- package/dist/game-passes.d.mts +206 -203
- package/dist/game-passes.d.mts.map +1 -1
- package/dist/game-passes.mjs +26 -21
- package/dist/game-passes.mjs.map +1 -1
- package/dist/index.d.mts +924 -306
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +325 -10
- package/dist/index.mjs.map +1 -1
- package/dist/locales.d.mts +30 -2
- package/dist/locales.d.mts.map +1 -0
- package/dist/locales.mjs +24 -1
- package/dist/locales.mjs.map +1 -1
- package/dist/luau-execution.d.mts +154 -151
- package/dist/luau-execution.d.mts.map +1 -1
- package/dist/luau-execution.mjs +11 -8
- package/dist/luau-execution.mjs.map +1 -1
- package/dist/{network-error-DR9FX5hb.mjs → network-error-iVSng5MT.mjs} +44 -6
- package/dist/network-error-iVSng5MT.mjs.map +1 -0
- package/dist/places.d.mts +204 -180
- package/dist/places.d.mts.map +1 -1
- package/dist/places.mjs +66 -20
- package/dist/places.mjs.map +1 -1
- package/dist/{poll-timeout-3PXLsabj.mjs → poll-timeout-DzztDymd.mjs} +2 -2
- package/dist/{poll-timeout-3PXLsabj.mjs.map → poll-timeout-DzztDymd.mjs.map} +1 -1
- package/dist/{polling-helpers-sKTsqEc1.mjs → polling-helpers-DfF5dspc.mjs} +249 -83
- package/dist/polling-helpers-DfF5dspc.mjs.map +1 -0
- package/dist/{price-information-hWXV6DAI.mjs → price-information-DEkEQ8Pq.mjs} +2 -2
- package/dist/{price-information-hWXV6DAI.mjs.map → price-information-DEkEQ8Pq.mjs.map} +1 -1
- package/dist/resource-client-BCKukheG.d.mts +168 -0
- package/dist/resource-client-BCKukheG.d.mts.map +1 -0
- package/dist/resource-client-CaIVr-go.mjs +1419 -0
- package/dist/resource-client-CaIVr-go.mjs.map +1 -0
- package/dist/retry-C2oHesDx.d.mts +229 -0
- package/dist/retry-C2oHesDx.d.mts.map +1 -0
- package/dist/{retry-vpHMIwaU.mjs → retry-CMRDvAR4.mjs} +390 -20
- package/dist/retry-CMRDvAR4.mjs.map +1 -0
- package/dist/storage.d.mts +333 -334
- package/dist/storage.d.mts.map +1 -1
- package/dist/storage.mjs +29 -22
- package/dist/storage.mjs.map +1 -1
- package/dist/testing.d.mts +347 -360
- package/dist/testing.d.mts.map +1 -1
- package/dist/testing.mjs +3 -4
- package/dist/testing.mjs.map +1 -1
- package/dist/types-CdMr_J1M.d.mts +509 -0
- package/dist/types-CdMr_J1M.d.mts.map +1 -0
- package/dist/universes.d.mts +619 -422
- package/dist/universes.d.mts.map +1 -1
- package/dist/universes.mjs +421 -48
- package/dist/universes.mjs.map +1 -1
- package/dist/{validation-B_Zs1So2.mjs → validation-964VNlbp.mjs} +2 -2
- package/dist/{validation-B_Zs1So2.mjs.map → validation-964VNlbp.mjs.map} +1 -1
- package/dist/wire-DJqupefn.d.mts +41 -0
- package/dist/wire-DJqupefn.d.mts.map +1 -0
- package/package.json +14 -14
- package/dist/capacity-admission-BvnJjY0S.d.mts +0 -369
- package/dist/capacity-admission-BvnJjY0S.d.mts.map +0 -1
- package/dist/data.generated-B2ceLfSn.d.mts.map +0 -1
- package/dist/network-error-DR9FX5hb.mjs.map +0 -1
- package/dist/polling-helpers-sKTsqEc1.mjs.map +0 -1
- package/dist/resource-client-3cOhqZpX.mjs +0 -899
- package/dist/resource-client-3cOhqZpX.mjs.map +0 -1
- package/dist/resource-client-BivRq3JZ.d.mts +0 -164
- package/dist/resource-client-BivRq3JZ.d.mts.map +0 -1
- package/dist/retry-DXEklFrt.d.mts +0 -373
- package/dist/retry-DXEklFrt.d.mts.map +0 -1
- package/dist/retry-vpHMIwaU.mjs.map +0 -1
- package/dist/types-C3Egi37J.d.mts +0 -378
- package/dist/types-C3Egi37J.d.mts.map +0 -1
- package/dist/wire-D3K-a-UP.d.mts +0 -37
- package/dist/wire-D3K-a-UP.d.mts.map +0 -1
package/dist/universes.d.mts
CHANGED
|
@@ -1,23 +1,22 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { i as RobloxLocale, r as RobloxLanguageCode } from "./data.generated-
|
|
3
|
-
import { t as ResourceClient } from "./resource-client-
|
|
4
|
-
import { n as GameIconState } from "./wire-
|
|
5
|
-
|
|
1
|
+
import { c as OpenCloudClientOptions, d as RequestOptions, g as OpenCloudError, m as Result } from "./types-CdMr_J1M.mjs";
|
|
2
|
+
import { i as RobloxLocale, r as RobloxLanguageCode } from "./data.generated-D_vpa5-g.mjs";
|
|
3
|
+
import { t as ResourceClient } from "./resource-client-BCKukheG.mjs";
|
|
4
|
+
import { n as GameIconState } from "./wire-DJqupefn.mjs";
|
|
6
5
|
//#region src/domains/cloud-v2/universes/types.d.ts
|
|
7
6
|
/**
|
|
8
|
-
* Caller-supplied input for the `get` method on `UniversesClient`.
|
|
9
|
-
*
|
|
10
|
-
* @since 0.1.0
|
|
11
|
-
*/
|
|
7
|
+
* Caller-supplied input for the `get` method on `UniversesClient`.
|
|
8
|
+
*
|
|
9
|
+
* @since 0.1.0
|
|
10
|
+
*/
|
|
12
11
|
interface GetUniverseParameters {
|
|
13
12
|
/** Stringified ID of the universe to fetch. */
|
|
14
13
|
readonly universeId: string;
|
|
15
14
|
}
|
|
16
15
|
/**
|
|
17
|
-
* A social link that may be associated with a universe.
|
|
18
|
-
*
|
|
19
|
-
* @since 0.1.0
|
|
20
|
-
*/
|
|
16
|
+
* A social link that may be associated with a universe.
|
|
17
|
+
*
|
|
18
|
+
* @since 0.1.0
|
|
19
|
+
*/
|
|
21
20
|
interface SocialLink {
|
|
22
21
|
/** Display title of the link. */
|
|
23
22
|
readonly title: string;
|
|
@@ -25,22 +24,22 @@ interface SocialLink {
|
|
|
25
24
|
readonly uri: string;
|
|
26
25
|
}
|
|
27
26
|
/**
|
|
28
|
-
* Public visibility classification.
|
|
29
|
-
*
|
|
30
|
-
* @since 0.1.0
|
|
31
|
-
*/
|
|
27
|
+
* Public visibility classification.
|
|
28
|
+
*
|
|
29
|
+
* @since 0.1.0
|
|
30
|
+
*/
|
|
32
31
|
type UniverseVisibility = "private" | "public" | "unspecified";
|
|
33
32
|
/**
|
|
34
|
-
* Caller-supplied input for the `update` method on `UniversesClient`.
|
|
35
|
-
* Every writable field is optional; presence of a key drives the
|
|
36
|
-
* `updateMask` query string that the server uses as the field-mask for
|
|
37
|
-
* the partial update. Absent keys are left untouched server-side.
|
|
38
|
-
* Setting a key to `undefined` clears the corresponding server-side
|
|
39
|
-
* value (applicable to `privateServerPriceRobux` and each optional
|
|
40
|
-
* social link).
|
|
41
|
-
*
|
|
42
|
-
* @since 0.1.0
|
|
43
|
-
*/
|
|
33
|
+
* Caller-supplied input for the `update` method on `UniversesClient`.
|
|
34
|
+
* Every writable field is optional; presence of a key drives the
|
|
35
|
+
* `updateMask` query string that the server uses as the field-mask for
|
|
36
|
+
* the partial update. Absent keys are left untouched server-side.
|
|
37
|
+
* Setting a key to `undefined` clears the corresponding server-side
|
|
38
|
+
* value (applicable to `privateServerPriceRobux` and each optional
|
|
39
|
+
* social link).
|
|
40
|
+
*
|
|
41
|
+
* @since 0.1.0
|
|
42
|
+
*/
|
|
44
43
|
interface UpdateUniverseParameters {
|
|
45
44
|
/** Whether console players can join. */
|
|
46
45
|
readonly consoleEnabled?: boolean;
|
|
@@ -74,30 +73,30 @@ interface UpdateUniverseParameters {
|
|
|
74
73
|
readonly youtubeSocialLink?: SocialLink | undefined;
|
|
75
74
|
}
|
|
76
75
|
/**
|
|
77
|
-
* Discriminated-union representation of a universe's owner.
|
|
78
|
-
*
|
|
79
|
-
* @since 0.1.0
|
|
80
|
-
*/
|
|
76
|
+
* Discriminated-union representation of a universe's owner.
|
|
77
|
+
*
|
|
78
|
+
* @since 0.1.0
|
|
79
|
+
*/
|
|
81
80
|
interface UniverseOwner {
|
|
82
81
|
/**
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
82
|
+
* Stringified numeric owner ID, extracted from the wire
|
|
83
|
+
* `users/{id}` or `groups/{id}` resource path.
|
|
84
|
+
*/
|
|
86
85
|
readonly id: string;
|
|
87
86
|
/** Whether the owner is a user or a group. */
|
|
88
87
|
readonly kind: "group" | "user";
|
|
89
88
|
}
|
|
90
89
|
/**
|
|
91
|
-
* Public age-rating classification.
|
|
92
|
-
*
|
|
93
|
-
* @since 0.1.0
|
|
94
|
-
*/
|
|
90
|
+
* Public age-rating classification.
|
|
91
|
+
*
|
|
92
|
+
* @since 0.1.0
|
|
93
|
+
*/
|
|
95
94
|
type UniverseAgeRating = "9Plus" | "13Plus" | "17Plus" | "all" | "unspecified";
|
|
96
95
|
/**
|
|
97
|
-
* Parsed representation of a Roblox universe's configuration.
|
|
98
|
-
*
|
|
99
|
-
* @since 0.1.0
|
|
100
|
-
*/
|
|
96
|
+
* Parsed representation of a Roblox universe's configuration.
|
|
97
|
+
*
|
|
98
|
+
* @since 0.1.0
|
|
99
|
+
*/
|
|
101
100
|
interface Universe {
|
|
102
101
|
/** Stringified universe ID, extracted from the wire `path`. */
|
|
103
102
|
readonly id: string;
|
|
@@ -128,8 +127,8 @@ interface Universe {
|
|
|
128
127
|
/** Roblox Group social link; `undefined` when absent. */
|
|
129
128
|
readonly robloxGroupSocialLink: SocialLink | undefined;
|
|
130
129
|
/**
|
|
131
|
-
|
|
132
|
-
|
|
130
|
+
* Root place ID; `undefined` when the universe has no resolved root place.
|
|
131
|
+
*/
|
|
133
132
|
readonly rootPlaceId: string | undefined;
|
|
134
133
|
/** Whether tablet players can join. */
|
|
135
134
|
readonly tabletEnabled: boolean;
|
|
@@ -149,94 +148,118 @@ interface Universe {
|
|
|
149
148
|
readonly youtubeSocialLink: SocialLink | undefined;
|
|
150
149
|
}
|
|
151
150
|
/**
|
|
152
|
-
* Caller-supplied input for the `restartServers` method on
|
|
153
|
-
* `UniversesClient`.
|
|
154
|
-
*
|
|
155
|
-
* @since 0.3.3
|
|
156
|
-
*/
|
|
151
|
+
* Caller-supplied input for the `restartServers` method on
|
|
152
|
+
* `UniversesClient`.
|
|
153
|
+
*
|
|
154
|
+
* @since 0.3.3
|
|
155
|
+
*/
|
|
157
156
|
interface RestartUniverseServersParameters {
|
|
158
157
|
/**
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
158
|
+
* Minutes (1-60) that selected servers stay up, closed to matchmaking,
|
|
159
|
+
* before they shut down. Omit to shut them down at once.
|
|
160
|
+
*/
|
|
162
161
|
readonly bleedOffDurationMinutes?: number;
|
|
163
162
|
/**
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
163
|
+
* When `true`, restarts servers on every place version. When omitted or
|
|
164
|
+
* `false`, restarts only servers on an older version than the latest
|
|
165
|
+
* published one.
|
|
166
|
+
*/
|
|
168
167
|
readonly closeAllVersions?: boolean;
|
|
169
168
|
/**
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
169
|
+
* Stringified IDs of the places to restart. Omit to restart every place;
|
|
170
|
+
* an empty list is rejected, since Roblox reads it as every place.
|
|
171
|
+
* Roblox answers 500 when a listed place has no live server and
|
|
172
|
+
* `closeAllVersions` is not `true`; `restarts.restartOutdated` skips
|
|
173
|
+
* such places for you.
|
|
174
|
+
*/
|
|
175
175
|
readonly placeIds?: ReadonlyArray<string>;
|
|
176
176
|
/** Stringified ID of the universe whose servers to restart. */
|
|
177
177
|
readonly universeId: string;
|
|
178
178
|
}
|
|
179
179
|
//#endregion
|
|
180
|
+
//#region src/domains/develop/universes/types.d.ts
|
|
181
|
+
/**
|
|
182
|
+
* Identifies the experience to make public.
|
|
183
|
+
*
|
|
184
|
+
* @since 0.4.0
|
|
185
|
+
*/
|
|
186
|
+
interface ActivateUniverseParameters {
|
|
187
|
+
/** Stringified ID of the universe to activate. */
|
|
188
|
+
readonly universeId: string;
|
|
189
|
+
}
|
|
190
|
+
/**
|
|
191
|
+
* Identifies the experience to make private.
|
|
192
|
+
*
|
|
193
|
+
* @since 0.4.0
|
|
194
|
+
*/
|
|
195
|
+
interface DeactivateUniverseParameters {
|
|
196
|
+
/** Stringified ID of the universe to deactivate. */
|
|
197
|
+
readonly universeId: string;
|
|
198
|
+
}
|
|
199
|
+
//#endregion
|
|
180
200
|
//#region src/domains/game-internationalization/game-icon/types.d.ts
|
|
181
201
|
/**
|
|
182
|
-
* A localized icon entry returned by listing icons for an experience.
|
|
183
|
-
*
|
|
184
|
-
* @since 0.1.0
|
|
185
|
-
*/
|
|
202
|
+
* A localized icon entry returned by listing icons for an experience.
|
|
203
|
+
*
|
|
204
|
+
* @since 0.1.0
|
|
205
|
+
*/
|
|
186
206
|
interface ExperienceIcon {
|
|
187
|
-
/**
|
|
188
|
-
|
|
207
|
+
/**
|
|
208
|
+
* Stringified ID of the uploaded icon image, or `undefined` when the
|
|
209
|
+
* locale is still on the default icon.
|
|
210
|
+
*/
|
|
211
|
+
readonly imageId: string | undefined;
|
|
189
212
|
/** CDN URL the icon can be loaded from. */
|
|
190
213
|
readonly imageUrl: string;
|
|
191
214
|
/**
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
215
|
+
* Roblox wire form the icon is registered against. Either the
|
|
216
|
+
* Language form (e.g. `en`, `fil`, `zh-hans`) or the Locale form
|
|
217
|
+
* (e.g. `en_us`, `pt_br`, `ar_001`).
|
|
218
|
+
*/
|
|
196
219
|
readonly languageCode: string;
|
|
197
220
|
/** Moderation state of the icon. */
|
|
198
221
|
readonly state: GameIconState;
|
|
199
222
|
}
|
|
200
223
|
/**
|
|
201
|
-
* Parameters for uploading or replacing a localized experience icon. A
|
|
202
|
-
* subsequent upload for the same `(universeId, languageCode)` pair replaces
|
|
203
|
-
* the existing icon for that locale.
|
|
204
|
-
*
|
|
205
|
-
* @since 0.1.0
|
|
206
|
-
*/
|
|
224
|
+
* Parameters for uploading or replacing a localized experience icon. A
|
|
225
|
+
* subsequent upload for the same `(universeId, languageCode)` pair replaces
|
|
226
|
+
* the existing icon for that locale.
|
|
227
|
+
*
|
|
228
|
+
* @since 0.1.0
|
|
229
|
+
*/
|
|
207
230
|
interface UploadExperienceIconParameters {
|
|
208
231
|
/** Image bytes to upload. PNG and JPEG are accepted by the server. */
|
|
209
232
|
readonly image: Blob | Uint8Array;
|
|
210
233
|
/**
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
234
|
+
* Roblox wire form the icon is being uploaded for. Either the
|
|
235
|
+
* Language form (e.g. `en`, `fil`, `zh-hans`) or the Locale form
|
|
236
|
+
* (e.g. `en_us`, `pt_br`, `ar_001`).
|
|
237
|
+
*/
|
|
215
238
|
readonly languageCode: RobloxLanguageCode | RobloxLocale;
|
|
216
239
|
/** Stringified ID of the universe whose icon is being uploaded. */
|
|
217
240
|
readonly universeId: string;
|
|
218
241
|
}
|
|
219
242
|
/**
|
|
220
|
-
* Parameters for deleting the localized icon registered against a universe
|
|
221
|
-
* for a given language.
|
|
222
|
-
*
|
|
223
|
-
* @since 0.1.0
|
|
224
|
-
*/
|
|
243
|
+
* Parameters for deleting the localized icon registered against a universe
|
|
244
|
+
* for a given language.
|
|
245
|
+
*
|
|
246
|
+
* @since 0.1.0
|
|
247
|
+
*/
|
|
225
248
|
interface DeleteExperienceIconParameters {
|
|
226
249
|
/**
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
250
|
+
* Roblox wire form of the icon to delete. Either the Language form
|
|
251
|
+
* (e.g. `en`, `fil`, `zh-hans`) or the Locale form (e.g. `en_us`,
|
|
252
|
+
* `pt_br`, `ar_001`).
|
|
253
|
+
*/
|
|
231
254
|
readonly languageCode: RobloxLanguageCode | RobloxLocale;
|
|
232
255
|
/** Stringified ID of the universe whose icon is being deleted. */
|
|
233
256
|
readonly universeId: string;
|
|
234
257
|
}
|
|
235
258
|
/**
|
|
236
|
-
* Parameters for listing every localized icon registered against a universe.
|
|
237
|
-
*
|
|
238
|
-
* @since 0.1.0
|
|
239
|
-
*/
|
|
259
|
+
* Parameters for listing every localized icon registered against a universe.
|
|
260
|
+
*
|
|
261
|
+
* @since 0.1.0
|
|
262
|
+
*/
|
|
240
263
|
interface ListExperienceIconsParameters {
|
|
241
264
|
/** Stringified ID of the universe whose icons are being listed. */
|
|
242
265
|
readonly universeId: string;
|
|
@@ -244,63 +267,63 @@ interface ListExperienceIconsParameters {
|
|
|
244
267
|
//#endregion
|
|
245
268
|
//#region src/domains/game-internationalization/game-thumbnails/types.d.ts
|
|
246
269
|
/**
|
|
247
|
-
* Result of uploading a localized experience thumbnail.
|
|
248
|
-
*
|
|
249
|
-
* @since 0.1.0
|
|
250
|
-
*/
|
|
270
|
+
* Result of uploading a localized experience thumbnail.
|
|
271
|
+
*
|
|
272
|
+
* @since 0.1.0
|
|
273
|
+
*/
|
|
251
274
|
interface UploadedExperienceThumbnail {
|
|
252
275
|
/** Stringified media asset ID of the uploaded thumbnail. */
|
|
253
276
|
readonly mediaAssetId: string;
|
|
254
277
|
}
|
|
255
278
|
/**
|
|
256
|
-
* Parameters for uploading a new localized experience thumbnail. Each upload
|
|
257
|
-
* appends a new entry to the carousel; reorder via {@link
|
|
258
|
-
* ReorderExperienceThumbnailsParameters} after multiple uploads to set the
|
|
259
|
-
* display order.
|
|
260
|
-
*
|
|
261
|
-
* @since 0.1.0
|
|
262
|
-
*/
|
|
279
|
+
* Parameters for uploading a new localized experience thumbnail. Each upload
|
|
280
|
+
* appends a new entry to the carousel; reorder via {@link
|
|
281
|
+
* ReorderExperienceThumbnailsParameters} after multiple uploads to set the
|
|
282
|
+
* display order.
|
|
283
|
+
*
|
|
284
|
+
* @since 0.1.0
|
|
285
|
+
*/
|
|
263
286
|
interface UploadExperienceThumbnailParameters {
|
|
264
287
|
/** Image bytes to upload. PNG and JPEG are accepted by the server. */
|
|
265
288
|
readonly image: Blob | Uint8Array;
|
|
266
289
|
/**
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
290
|
+
* Roblox wire form the thumbnail is being uploaded for. Either the
|
|
291
|
+
* Language form (e.g. `en`, `fil`, `zh-hans`) or the Locale form
|
|
292
|
+
* (e.g. `en_us`, `pt_br`, `ar_001`).
|
|
293
|
+
*/
|
|
271
294
|
readonly languageCode: RobloxLanguageCode | RobloxLocale;
|
|
272
295
|
/** Stringified ID of the universe whose carousel is being appended to. */
|
|
273
296
|
readonly universeId: string;
|
|
274
297
|
}
|
|
275
298
|
/**
|
|
276
|
-
* Parameters for deleting a single thumbnail by media asset ID.
|
|
277
|
-
*
|
|
278
|
-
* @since 0.1.0
|
|
279
|
-
*/
|
|
299
|
+
* Parameters for deleting a single thumbnail by media asset ID.
|
|
300
|
+
*
|
|
301
|
+
* @since 0.1.0
|
|
302
|
+
*/
|
|
280
303
|
interface DeleteExperienceThumbnailParameters {
|
|
281
304
|
/** Stringified media asset ID of the thumbnail to delete. */
|
|
282
305
|
readonly imageId: string;
|
|
283
306
|
/**
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
307
|
+
* Roblox wire form of the thumbnail to delete. Either the Language
|
|
308
|
+
* form (e.g. `en`, `fil`, `zh-hans`) or the Locale form (e.g.
|
|
309
|
+
* `en_us`, `pt_br`, `ar_001`).
|
|
310
|
+
*/
|
|
288
311
|
readonly languageCode: RobloxLanguageCode | RobloxLocale;
|
|
289
312
|
/** Stringified ID of the universe whose carousel is being modified. */
|
|
290
313
|
readonly universeId: string;
|
|
291
314
|
}
|
|
292
315
|
/**
|
|
293
|
-
* Parameters for reordering the localized thumbnail carousel. The supplied
|
|
294
|
-
* `orderedImageIds` describes the new display order from first to last.
|
|
295
|
-
*
|
|
296
|
-
* @since 0.1.0
|
|
297
|
-
*/
|
|
316
|
+
* Parameters for reordering the localized thumbnail carousel. The supplied
|
|
317
|
+
* `orderedImageIds` describes the new display order from first to last.
|
|
318
|
+
*
|
|
319
|
+
* @since 0.1.0
|
|
320
|
+
*/
|
|
298
321
|
interface ReorderExperienceThumbnailsParameters {
|
|
299
322
|
/**
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
323
|
+
* Roblox wire form of the carousel being reordered. Either the
|
|
324
|
+
* Language form (e.g. `en`, `fil`, `zh-hans`) or the Locale form
|
|
325
|
+
* (e.g. `en_us`, `pt_br`, `ar_001`).
|
|
326
|
+
*/
|
|
304
327
|
readonly languageCode: RobloxLanguageCode | RobloxLocale;
|
|
305
328
|
/** Stringified media asset IDs in the desired display order. */
|
|
306
329
|
readonly orderedImageIds: ReadonlyArray<string>;
|
|
@@ -310,33 +333,33 @@ interface ReorderExperienceThumbnailsParameters {
|
|
|
310
333
|
//#endregion
|
|
311
334
|
//#region src/domains/server-management/restarts/types.d.ts
|
|
312
335
|
/**
|
|
313
|
-
* Caller-supplied input for the `restarts.forecast` method on
|
|
314
|
-
* `UniversesClient`.
|
|
315
|
-
*
|
|
316
|
-
* @since 0.3.3
|
|
317
|
-
*/
|
|
336
|
+
* Caller-supplied input for the `restarts.forecast` method on
|
|
337
|
+
* `UniversesClient`.
|
|
338
|
+
*
|
|
339
|
+
* @since 0.3.3
|
|
340
|
+
*/
|
|
318
341
|
interface ForecastRestartParameters {
|
|
319
342
|
/** Stringified ID of the universe to forecast. */
|
|
320
343
|
readonly universeId: string;
|
|
321
344
|
}
|
|
322
345
|
/**
|
|
323
|
-
* The live servers of one place, and how many of them a restart would
|
|
324
|
-
* close.
|
|
325
|
-
*
|
|
326
|
-
* @since 0.3.3
|
|
327
|
-
*/
|
|
346
|
+
* The live servers of one place, and how many of them a restart would
|
|
347
|
+
* close.
|
|
348
|
+
*
|
|
349
|
+
* @since 0.3.3
|
|
350
|
+
*/
|
|
328
351
|
interface PlaceRestartForecast {
|
|
329
352
|
/**
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
353
|
+
* Servers a restart would close. Live captures suggest this counts only
|
|
354
|
+
* servers on an older place version; Roblox does not document it.
|
|
355
|
+
*/
|
|
333
356
|
readonly instancesImpacted: number;
|
|
334
357
|
/** Live server count keyed by place version. */
|
|
335
358
|
readonly instancesPerVersion: Readonly<Record<string, number>>;
|
|
336
359
|
/**
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
360
|
+
* `true` when the place has moved to another universe but still has
|
|
361
|
+
* live servers from before the move.
|
|
362
|
+
*/
|
|
340
363
|
readonly isNotInUniverse: boolean;
|
|
341
364
|
/** Most recent place version running on any live server. */
|
|
342
365
|
readonly latestPlaceVersion: string | undefined;
|
|
@@ -354,28 +377,29 @@ interface PlaceRestartForecast {
|
|
|
354
377
|
readonly totalPlayers: number;
|
|
355
378
|
}
|
|
356
379
|
/**
|
|
357
|
-
* Which versions of one place a restart closes. An empty filter closes
|
|
358
|
-
* every version. `versions` and `excludeCurrentVersion` are exclusive:
|
|
359
|
-
* the type enforces what Roblox documents, although the server accepts
|
|
360
|
-
* both together.
|
|
361
|
-
*
|
|
362
|
-
* Roblox answers 500 to `excludeCurrentVersion` on a place with no live
|
|
363
|
-
* server, so forecast first when the place may be empty
|
|
364
|
-
*
|
|
365
|
-
*
|
|
366
|
-
*
|
|
367
|
-
*
|
|
368
|
-
*
|
|
369
|
-
*
|
|
370
|
-
*
|
|
371
|
-
*
|
|
372
|
-
*
|
|
373
|
-
*
|
|
374
|
-
*
|
|
375
|
-
* }
|
|
376
|
-
*
|
|
377
|
-
*
|
|
378
|
-
|
|
380
|
+
* Which versions of one place a restart closes. An empty filter closes
|
|
381
|
+
* every version. `versions` and `excludeCurrentVersion` are exclusive:
|
|
382
|
+
* the type enforces what Roblox documents, although the server accepts
|
|
383
|
+
* both together.
|
|
384
|
+
*
|
|
385
|
+
* Roblox answers 500 to `excludeCurrentVersion` on a place with no live
|
|
386
|
+
* server, so forecast first when the place may be empty, or use
|
|
387
|
+
* `restarts.restartOutdated`.
|
|
388
|
+
*
|
|
389
|
+
* @since 0.3.3
|
|
390
|
+
*
|
|
391
|
+
* @example
|
|
392
|
+
* ```ts
|
|
393
|
+
* import type { RestartPlaceFilter } from "@bedrock-rbx/ocale/universes";
|
|
394
|
+
*
|
|
395
|
+
* const places: Record<string, RestartPlaceFilter> = {
|
|
396
|
+
* 111: {},
|
|
397
|
+
* 222: { versions: [4, 5] },
|
|
398
|
+
* 333: { excludeCurrentVersion: true },
|
|
399
|
+
* };
|
|
400
|
+
* expect(Object.keys(places)).toEqual(["111", "222", "333"]);
|
|
401
|
+
* ```
|
|
402
|
+
*/
|
|
379
403
|
type RestartPlaceFilter = {
|
|
380
404
|
readonly excludeCurrentVersion: boolean;
|
|
381
405
|
readonly versions?: never;
|
|
@@ -387,40 +411,40 @@ type RestartPlaceFilter = {
|
|
|
387
411
|
readonly versions?: never;
|
|
388
412
|
};
|
|
389
413
|
/**
|
|
390
|
-
* Caller-supplied input for the `restarts.launch` method on
|
|
391
|
-
* `UniversesClient`.
|
|
392
|
-
*
|
|
393
|
-
* @since 0.3.3
|
|
394
|
-
*/
|
|
414
|
+
* Caller-supplied input for the `restarts.launch` method on
|
|
415
|
+
* `UniversesClient`.
|
|
416
|
+
*
|
|
417
|
+
* @since 0.3.3
|
|
418
|
+
*/
|
|
395
419
|
interface LaunchRestartParameters {
|
|
396
420
|
/**
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
421
|
+
* JSON object (at most 500 bytes serialized) that Roblox sends to the
|
|
422
|
+
* game servers when the restart is scheduled.
|
|
423
|
+
*/
|
|
400
424
|
readonly attributes?: Readonly<Record<string, JSONValue>>;
|
|
401
425
|
/**
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
426
|
+
* Minutes (1-240) before servers start to close. Players are not
|
|
427
|
+
* matched into the selected servers during this period.
|
|
428
|
+
*/
|
|
405
429
|
readonly bleedOffDurationMinutes?: number;
|
|
406
430
|
/**
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
431
|
+
* Version filter keyed by stringified place ID. Omit to restart every
|
|
432
|
+
* version of every place in the universe.
|
|
433
|
+
*/
|
|
410
434
|
readonly places?: Readonly<Record<string, RestartPlaceFilter>>;
|
|
411
435
|
/** Stringified ID of the universe whose servers to restart. */
|
|
412
436
|
readonly universeId: string;
|
|
413
437
|
}
|
|
414
438
|
/**
|
|
415
|
-
* A restart Roblox accepted, and how much of the universe it reaches.
|
|
416
|
-
*
|
|
417
|
-
* @since 0.3.3
|
|
418
|
-
*/
|
|
439
|
+
* A restart Roblox accepted, and how much of the universe it reaches.
|
|
440
|
+
*
|
|
441
|
+
* @since 0.3.3
|
|
442
|
+
*/
|
|
419
443
|
interface LaunchedRestart {
|
|
420
444
|
/**
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
445
|
+
* Restart ID, as reported by `restarts.list`. `undefined` when no live
|
|
446
|
+
* server matched: Roblox then records no restart.
|
|
447
|
+
*/
|
|
424
448
|
readonly id: string | undefined;
|
|
425
449
|
/** Servers the restart will close. */
|
|
426
450
|
readonly instancesImpacted: number;
|
|
@@ -428,34 +452,34 @@ interface LaunchedRestart {
|
|
|
428
452
|
readonly playersImpacted: number;
|
|
429
453
|
}
|
|
430
454
|
/**
|
|
431
|
-
* Caller-supplied input for the `restarts.list` method on
|
|
432
|
-
* `UniversesClient`.
|
|
433
|
-
*
|
|
434
|
-
* @since 0.3.3
|
|
435
|
-
*/
|
|
455
|
+
* Caller-supplied input for the `restarts.list` method on
|
|
456
|
+
* `UniversesClient`.
|
|
457
|
+
*
|
|
458
|
+
* @since 0.3.3
|
|
459
|
+
*/
|
|
436
460
|
interface ListRestartsParameters {
|
|
437
461
|
/** Stringified ID of the universe whose restarts to list. */
|
|
438
462
|
readonly universeId: string;
|
|
439
463
|
}
|
|
440
464
|
/**
|
|
441
|
-
* Progress of a restart in one place: `DELAYING` during the bleed-off
|
|
442
|
-
* period, `RESTARTING` while servers close, then `SUCCEEDED`.
|
|
443
|
-
*
|
|
444
|
-
* @since 0.3.3
|
|
445
|
-
*/
|
|
465
|
+
* Progress of a restart in one place: `DELAYING` during the bleed-off
|
|
466
|
+
* period, `RESTARTING` while servers close, then `SUCCEEDED`.
|
|
467
|
+
*
|
|
468
|
+
* @since 0.3.3
|
|
469
|
+
*/
|
|
446
470
|
type RestartState = "DELAYING" | "RESTARTING" | "SUCCEEDED";
|
|
447
471
|
/**
|
|
448
|
-
* Progress of a restart in one place.
|
|
449
|
-
*
|
|
450
|
-
* @since 0.3.3
|
|
451
|
-
*/
|
|
472
|
+
* Progress of a restart in one place.
|
|
473
|
+
*
|
|
474
|
+
* @since 0.3.3
|
|
475
|
+
*/
|
|
452
476
|
interface PlaceRestartStatus {
|
|
453
477
|
/** When the place restart ended; `undefined` while it runs. */
|
|
454
478
|
readonly endedAt: Date | undefined;
|
|
455
479
|
/**
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
480
|
+
* The versions the restart selected. Roblox records a launch without
|
|
481
|
+
* a filter as the versions it found, not as an empty filter.
|
|
482
|
+
*/
|
|
459
483
|
readonly filter: RestartPlaceFilter | undefined;
|
|
460
484
|
/** Latest place version when the restart launched. */
|
|
461
485
|
readonly latestVersion: string | undefined;
|
|
@@ -475,10 +499,52 @@ interface PlaceRestartStatus {
|
|
|
475
499
|
readonly totalPlayers: number;
|
|
476
500
|
}
|
|
477
501
|
/**
|
|
478
|
-
*
|
|
479
|
-
*
|
|
480
|
-
*
|
|
481
|
-
|
|
502
|
+
* Caller-supplied input for the `restarts.restartOutdated` method on
|
|
503
|
+
* `UniversesClient`.
|
|
504
|
+
*
|
|
505
|
+
* @since 0.4.0
|
|
506
|
+
*/
|
|
507
|
+
interface RestartOutdatedParameters {
|
|
508
|
+
/**
|
|
509
|
+
* Stringified IDs of the places to check. Must not be empty. A place
|
|
510
|
+
* with no server on an older version is skipped.
|
|
511
|
+
*/
|
|
512
|
+
readonly placeIds: ReadonlyArray<string>;
|
|
513
|
+
/** Stringified ID of the universe whose servers to restart. */
|
|
514
|
+
readonly universeId: string;
|
|
515
|
+
}
|
|
516
|
+
/**
|
|
517
|
+
* The outcome of a `restarts.restartOutdated` call for one place.
|
|
518
|
+
*
|
|
519
|
+
* @since 0.4.0
|
|
520
|
+
*/
|
|
521
|
+
interface PlaceOutdatedRestart {
|
|
522
|
+
/**
|
|
523
|
+
* Outdated servers the latest forecast counted for the place (0 when
|
|
524
|
+
* absent).
|
|
525
|
+
*/
|
|
526
|
+
readonly instancesImpacted: number;
|
|
527
|
+
/** Stringified ID of the place. */
|
|
528
|
+
readonly placeId: string;
|
|
529
|
+
/** `true` when the place was in the restart call that succeeded. */
|
|
530
|
+
readonly restarted: boolean;
|
|
531
|
+
}
|
|
532
|
+
/**
|
|
533
|
+
* The outcome of a `restarts.restartOutdated` call.
|
|
534
|
+
*
|
|
535
|
+
* @since 0.4.0
|
|
536
|
+
*/
|
|
537
|
+
interface OutdatedRestart {
|
|
538
|
+
/** One entry per requested place (duplicates removed), in request order. */
|
|
539
|
+
readonly places: ReadonlyArray<PlaceOutdatedRestart>;
|
|
540
|
+
/** `true` when at least one place restarted. */
|
|
541
|
+
readonly restarted: boolean;
|
|
542
|
+
}
|
|
543
|
+
/**
|
|
544
|
+
* A restart of a universe's servers and its progress per place.
|
|
545
|
+
*
|
|
546
|
+
* @since 0.3.3
|
|
547
|
+
*/
|
|
482
548
|
interface RestartStatus {
|
|
483
549
|
/** Restart ID, as returned by `restarts.launch`. */
|
|
484
550
|
readonly id: string;
|
|
@@ -492,267 +558,398 @@ interface RestartStatus {
|
|
|
492
558
|
//#endregion
|
|
493
559
|
//#region src/resources/universes/restarts-group.d.ts
|
|
494
560
|
/**
|
|
495
|
-
* Operation Group on `UniversesClient` that exposes the server-management
|
|
496
|
-
* restart endpoints: preview a restart, launch one, and track it.
|
|
497
|
-
*
|
|
498
|
-
|
|
561
|
+
* Operation Group on `UniversesClient` that exposes the server-management
|
|
562
|
+
* restart endpoints: preview a restart, launch one, and track it. Its
|
|
563
|
+
* `restartOutdated` also uses the universe `:restartServers` method. The
|
|
564
|
+
* server-management endpoints are BETA on the Roblox side.
|
|
565
|
+
*/
|
|
499
566
|
declare class UniverseRestartsGroup {
|
|
500
567
|
#private;
|
|
501
568
|
/**
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
569
|
+
* Wraps the shared {@link ResourceClient} so the Operation Group
|
|
570
|
+
* routes calls through the same retry, hooks, and rate-limit queues
|
|
571
|
+
* as the rest of the parent client.
|
|
572
|
+
*
|
|
573
|
+
* @param inner - The shared {@link ResourceClient} owned by the
|
|
574
|
+
* parent client.
|
|
575
|
+
*/
|
|
509
576
|
constructor(inner: ResourceClient);
|
|
510
577
|
/**
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
578
|
+
* Reads the live servers of every active place in a universe, and how
|
|
579
|
+
* many of them a restart of old place versions would close.
|
|
580
|
+
*
|
|
581
|
+
* @param parameters - The universe identifier.
|
|
582
|
+
* @param options - Optional per-request overrides.
|
|
583
|
+
* @returns A {@link Result} wrapping one {@link PlaceRestartForecast}
|
|
584
|
+
* per active place (empty when no server runs), or the
|
|
585
|
+
* {@link OpenCloudError} that caused the request to fail.
|
|
586
|
+
*/
|
|
520
587
|
forecast(parameters: ForecastRestartParameters, options?: RequestOptions): Promise<Result<ReadonlyArray<PlaceRestartForecast>, OpenCloudError>>;
|
|
521
588
|
/**
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
589
|
+
* Launches a restart of a universe's live servers and returns its ID,
|
|
590
|
+
* which `list` reports while the restart runs. When no live server
|
|
591
|
+
* matches, Roblox records no restart and `id` is `undefined`.
|
|
592
|
+
*
|
|
593
|
+
* @example
|
|
594
|
+
* ```ts
|
|
595
|
+
* import { createFakeHttpClient } from "@bedrock-rbx/ocale/testing";
|
|
596
|
+
* import { UniversesClient } from "@bedrock-rbx/ocale/universes";
|
|
597
|
+
*
|
|
598
|
+
* const httpClient = createFakeHttpClient().mockResponse({
|
|
599
|
+
* body: {
|
|
600
|
+
* id: "00000000-0000-0000-0000-000000000000",
|
|
601
|
+
* instancesImpacted: 0,
|
|
602
|
+
* playersImpacted: 0,
|
|
603
|
+
* },
|
|
604
|
+
* status: 200,
|
|
605
|
+
* });
|
|
606
|
+
* const client = new UniversesClient({
|
|
607
|
+
* credential: { apiKey: "your-key", kind: "apiKey" },
|
|
608
|
+
* httpClient,
|
|
609
|
+
* });
|
|
610
|
+
*
|
|
611
|
+
* return client.restarts
|
|
612
|
+
* .launch({ bleedOffDurationMinutes: 5, universeId: "42" })
|
|
613
|
+
* .then((result) => {
|
|
614
|
+
* expect(result).toEqual({
|
|
615
|
+
* data: { id: undefined, instancesImpacted: 0, playersImpacted: 0 },
|
|
616
|
+
* success: true,
|
|
617
|
+
* });
|
|
618
|
+
* });
|
|
619
|
+
* ```
|
|
620
|
+
*
|
|
621
|
+
* @param parameters - The universe identifier.
|
|
622
|
+
* @param options - Optional per-request overrides.
|
|
623
|
+
* @returns A {@link Result} wrapping the {@link LaunchedRestart}, or
|
|
624
|
+
* the {@link OpenCloudError} that caused the request to fail.
|
|
625
|
+
*/
|
|
556
626
|
launch(parameters: LaunchRestartParameters, options?: RequestOptions): Promise<Result<LaunchedRestart, OpenCloudError>>;
|
|
557
627
|
/**
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
628
|
+
* Lists a universe's restarts with their progress per place. A
|
|
629
|
+
* `:restartServers` call that selected a server appears here too, but
|
|
630
|
+
* only `launch` returns the ID to match it by.
|
|
631
|
+
*
|
|
632
|
+
* @param parameters - The universe identifier.
|
|
633
|
+
* @param options - Optional per-request overrides.
|
|
634
|
+
* @returns A {@link Result} wrapping one {@link RestartStatus} per
|
|
635
|
+
* restart, or the {@link OpenCloudError} that caused the request to
|
|
636
|
+
* fail.
|
|
637
|
+
*/
|
|
568
638
|
list(parameters: ListRestartsParameters, options?: RequestOptions): Promise<Result<ReadonlyArray<RestartStatus>, OpenCloudError>>;
|
|
639
|
+
/**
|
|
640
|
+
* Restarts only the servers that run an older version of the given
|
|
641
|
+
* places, for example after a publish. It reads the forecast
|
|
642
|
+
* (`universe:read`), keeps each place with at least one outdated
|
|
643
|
+
* server, and sends one `:restartServers` call (`universe:write`) for
|
|
644
|
+
* them. When no place has an outdated server, it sends no restart.
|
|
645
|
+
*
|
|
646
|
+
* Roblox answers a 500 when any listed place has no live server, which
|
|
647
|
+
* happens when a place loses its last outdated server between the
|
|
648
|
+
* forecast and the restart. On that 500 it reads the forecast once more
|
|
649
|
+
* and sends one more restart for the places still outdated. A 502, 503
|
|
650
|
+
* or 504 on the restart is retried. The selection relies on the
|
|
651
|
+
* forecast's `instancesImpacted` counting only servers on an older
|
|
652
|
+
* version, which live captures show but Roblox does not document.
|
|
653
|
+
*
|
|
654
|
+
* @example
|
|
655
|
+
* ```ts
|
|
656
|
+
* import { createFakeHttpClient } from "@bedrock-rbx/ocale/testing";
|
|
657
|
+
* import { UniversesClient } from "@bedrock-rbx/ocale/universes";
|
|
658
|
+
*
|
|
659
|
+
* const httpClient = createFakeHttpClient()
|
|
660
|
+
* .mockResponse({
|
|
661
|
+
* body: {
|
|
662
|
+
* placeForecasts: {
|
|
663
|
+
* 111: {
|
|
664
|
+
* instancesImpacted: 2,
|
|
665
|
+
* instancesPerVersion: { 5: 2, 6: 1 },
|
|
666
|
+
* isNotInUniverse: false,
|
|
667
|
+
* latestPlaceVersion: "6",
|
|
668
|
+
* playersImpacted: 4,
|
|
669
|
+
* playersPerVersion: { 5: 4, 6: 1 },
|
|
670
|
+
* publishTime: "2026-04-24T02:36:28.673Z",
|
|
671
|
+
* totalInstances: 3,
|
|
672
|
+
* totalPlayers: 5,
|
|
673
|
+
* },
|
|
674
|
+
* },
|
|
675
|
+
* },
|
|
676
|
+
* status: 200,
|
|
677
|
+
* })
|
|
678
|
+
* .mockResponse({ body: {}, status: 200 });
|
|
679
|
+
* const client = new UniversesClient({
|
|
680
|
+
* credential: { apiKey: "your-key", kind: "apiKey" },
|
|
681
|
+
* httpClient,
|
|
682
|
+
* });
|
|
683
|
+
*
|
|
684
|
+
* return client.restarts
|
|
685
|
+
* .restartOutdated({ placeIds: ["111", "222"], universeId: "42" })
|
|
686
|
+
* .then((result) => {
|
|
687
|
+
* expect(result).toEqual({
|
|
688
|
+
* data: {
|
|
689
|
+
* places: [
|
|
690
|
+
* { instancesImpacted: 2, placeId: "111", restarted: true },
|
|
691
|
+
* { instancesImpacted: 0, placeId: "222", restarted: false },
|
|
692
|
+
* ],
|
|
693
|
+
* restarted: true,
|
|
694
|
+
* },
|
|
695
|
+
* success: true,
|
|
696
|
+
* });
|
|
697
|
+
* });
|
|
698
|
+
* ```
|
|
699
|
+
*
|
|
700
|
+
* @param parameters - The universe and the places to check.
|
|
701
|
+
* @param options - Optional per-request overrides, applied to every
|
|
702
|
+
* request.
|
|
703
|
+
* @returns A {@link Result} wrapping the {@link OutdatedRestart}, or
|
|
704
|
+
* the {@link OpenCloudError} that caused a request to fail.
|
|
705
|
+
*/
|
|
706
|
+
restartOutdated({ placeIds, universeId }: RestartOutdatedParameters, options?: RequestOptions): Promise<Result<OutdatedRestart, OpenCloudError>>;
|
|
569
707
|
}
|
|
570
708
|
//#endregion
|
|
571
709
|
//#region src/resources/universes/client.d.ts
|
|
572
710
|
interface UniverseIconHandle {
|
|
573
711
|
/**
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
712
|
+
* Deletes the localized icon registered against a universe for a given
|
|
713
|
+
* language. Removing the source-language icon is rejected server-side;
|
|
714
|
+
* consumers must replace it via {@link UniverseIconHandle.upload}
|
|
715
|
+
* instead.
|
|
716
|
+
*
|
|
717
|
+
* @param parameters - Universe and language identifiers of the icon to
|
|
718
|
+
* delete.
|
|
719
|
+
* @param options - Optional per-request overrides.
|
|
720
|
+
* @returns A success {@link Result} with no payload, or the
|
|
721
|
+
* {@link OpenCloudError} that caused the request to fail.
|
|
722
|
+
*/
|
|
585
723
|
delete: (parameters: DeleteExperienceIconParameters, options?: RequestOptions) => Promise<Result<undefined, OpenCloudError>>;
|
|
586
724
|
/**
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
725
|
+
* Lists every localized icon registered against an experience. The
|
|
726
|
+
* server returns one entry per locale that has an icon registered.
|
|
727
|
+
*
|
|
728
|
+
* @param parameters - Universe identifier whose icons to list.
|
|
729
|
+
* @param options - Optional per-request overrides.
|
|
730
|
+
* @returns A {@link Result} wrapping the parsed array of
|
|
731
|
+
* {@link ExperienceIcon} entries or the {@link OpenCloudError} that
|
|
732
|
+
* caused the request to fail.
|
|
733
|
+
*/
|
|
596
734
|
list: (parameters: ListExperienceIconsParameters, options?: RequestOptions) => Promise<Result<ReadonlyArray<ExperienceIcon>, OpenCloudError>>;
|
|
597
735
|
/**
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
736
|
+
* Uploads or replaces the localized icon for an experience. A
|
|
737
|
+
* subsequent upload for the same `(universeId, languageCode)` pair
|
|
738
|
+
* replaces the existing icon for that locale.
|
|
739
|
+
*
|
|
740
|
+
* No default request timeout applies to this upload; pass `options.timeout`
|
|
741
|
+
* to set a per-call deadline.
|
|
742
|
+
*
|
|
743
|
+
* @param parameters - Universe and language identifiers plus the image
|
|
744
|
+
* bytes to upload.
|
|
745
|
+
* @param options - Optional per-request overrides (e.g. A different
|
|
746
|
+
* {@link OpenCloudClientOptions.credential} for this call only).
|
|
747
|
+
* @returns A success {@link Result} with no payload, or the
|
|
748
|
+
* {@link OpenCloudError} that caused the request to fail.
|
|
749
|
+
*/
|
|
612
750
|
upload: (parameters: UploadExperienceIconParameters, options?: RequestOptions) => Promise<Result<undefined, OpenCloudError>>;
|
|
613
751
|
}
|
|
614
752
|
interface UniverseThumbnailsHandle {
|
|
615
753
|
/**
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
754
|
+
* Deletes a single thumbnail by media asset ID. Idempotent: deleting an
|
|
755
|
+
* already-removed thumbnail surfaces the server's 404 unchanged.
|
|
756
|
+
*
|
|
757
|
+
* @param parameters - Universe, language, and image identifiers of the
|
|
758
|
+
* thumbnail to delete.
|
|
759
|
+
* @param options - Optional per-request overrides.
|
|
760
|
+
* @returns A success {@link Result} with no payload, or the
|
|
761
|
+
* {@link OpenCloudError} that caused the request to fail.
|
|
762
|
+
*/
|
|
625
763
|
delete: (parameters: DeleteExperienceThumbnailParameters, options?: RequestOptions) => Promise<Result<undefined, OpenCloudError>>;
|
|
626
764
|
/**
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
765
|
+
* Reorders the localized thumbnail carousel. The supplied
|
|
766
|
+
* `orderedImageIds` describes the desired display order from first to
|
|
767
|
+
* last. Image IDs must be positive integers within the safe-integer
|
|
768
|
+
* range; invalid input is rejected with a {@link OpenCloudError} of
|
|
769
|
+
* kind `ValidationError` before any HTTP round-trip.
|
|
770
|
+
*
|
|
771
|
+
* @param parameters - Universe, language, and the desired display order.
|
|
772
|
+
* @param options - Optional per-request overrides.
|
|
773
|
+
* @returns A success {@link Result} with no payload, or the
|
|
774
|
+
* {@link OpenCloudError} that caused the request to fail.
|
|
775
|
+
*/
|
|
638
776
|
reorder: (parameters: ReorderExperienceThumbnailsParameters, options?: RequestOptions) => Promise<Result<undefined, OpenCloudError>>;
|
|
639
777
|
/**
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
778
|
+
* Uploads a new thumbnail and appends it to the localized carousel. Use
|
|
779
|
+
* {@link UniverseThumbnailsHandle.reorder} after multiple uploads to
|
|
780
|
+
* set the display order.
|
|
781
|
+
*
|
|
782
|
+
* No default request timeout applies to this upload; pass `options.timeout`
|
|
783
|
+
* to set a per-call deadline.
|
|
784
|
+
*
|
|
785
|
+
* @param parameters - Universe and language identifiers plus the image
|
|
786
|
+
* bytes to upload.
|
|
787
|
+
* @param options - Optional per-request overrides (e.g. A different
|
|
788
|
+
* {@link OpenCloudClientOptions.credential} for this call only).
|
|
789
|
+
* @returns A {@link Result} wrapping the parsed
|
|
790
|
+
* {@link UploadedExperienceThumbnail} or the {@link OpenCloudError}
|
|
791
|
+
* that caused the request to fail.
|
|
792
|
+
*/
|
|
655
793
|
upload: (parameters: UploadExperienceThumbnailParameters, options?: RequestOptions) => Promise<Result<UploadedExperienceThumbnail, OpenCloudError>>;
|
|
656
794
|
}
|
|
657
795
|
/**
|
|
658
|
-
* Public client for the Roblox Open Cloud `Universe` resource. Wires
|
|
659
|
-
* the request builders, the injected
|
|
660
|
-
* {@link OpenCloudClientOptions.httpClient}, and the response parser
|
|
661
|
-
* into a single ergonomic surface. Every method returns a
|
|
662
|
-
* {@link Result} so callers handle failure explicitly; no thrown
|
|
663
|
-
* {@link OpenCloudError} ever escapes the client.
|
|
664
|
-
*
|
|
665
|
-
* Partial updates use a Google-style `updateMask` query string derived
|
|
666
|
-
* from the keys present on the update parameters. Setting a clearable
|
|
667
|
-
* field (`privateServerPriceRobux` or any social link) to `undefined`
|
|
668
|
-
* sends JSON `null` for that field so the server clears the
|
|
669
|
-
* corresponding value.
|
|
670
|
-
*
|
|
671
|
-
* Localized experience-icon and experience-thumbnail Operations are
|
|
672
|
-
* bound on the {@link UniversesClient.icon} and
|
|
673
|
-
* {@link UniversesClient.thumbnails} Operation Groups so callers reach
|
|
674
|
-
* for one client per universe.
|
|
675
|
-
*
|
|
676
|
-
* @since 0.1.0
|
|
677
|
-
*
|
|
678
|
-
* @example
|
|
679
|
-
*
|
|
680
|
-
* ```ts
|
|
681
|
-
* import { UniversesClient } from "@bedrock-rbx/ocale/universes";
|
|
682
|
-
*
|
|
683
|
-
* const client = new UniversesClient({ apiKey: "your-key" });
|
|
684
|
-
* expect(client).toBeInstanceOf(UniversesClient);
|
|
685
|
-
* ```
|
|
686
|
-
*/
|
|
687
|
-
declare class UniversesClient {
|
|
796
|
+
* Public client for the Roblox Open Cloud `Universe` resource. Wires
|
|
797
|
+
* the request builders, the injected
|
|
798
|
+
* {@link OpenCloudClientOptions.httpClient}, and the response parser
|
|
799
|
+
* into a single ergonomic surface. Every method returns a
|
|
800
|
+
* {@link Result} so callers handle failure explicitly; no thrown
|
|
801
|
+
* {@link OpenCloudError} ever escapes the client.
|
|
802
|
+
*
|
|
803
|
+
* Partial updates use a Google-style `updateMask` query string derived
|
|
804
|
+
* from the keys present on the update parameters. Setting a clearable
|
|
805
|
+
* field (`privateServerPriceRobux` or any social link) to `undefined`
|
|
806
|
+
* sends JSON `null` for that field so the server clears the
|
|
807
|
+
* corresponding value.
|
|
808
|
+
*
|
|
809
|
+
* Localized experience-icon and experience-thumbnail Operations are
|
|
810
|
+
* bound on the {@link UniversesClient.icon} and
|
|
811
|
+
* {@link UniversesClient.thumbnails} Operation Groups so callers reach
|
|
812
|
+
* for one client per universe.
|
|
813
|
+
*
|
|
814
|
+
* @since 0.1.0
|
|
815
|
+
*
|
|
816
|
+
* @example
|
|
817
|
+
*
|
|
818
|
+
* ```ts
|
|
819
|
+
* import { UniversesClient } from "@bedrock-rbx/ocale/universes";
|
|
820
|
+
*
|
|
821
|
+
* const client = new UniversesClient({ credential: { apiKey: "your-key", kind: "apiKey" } });
|
|
822
|
+
* expect(client).toBeInstanceOf(UniversesClient);
|
|
823
|
+
* ```
|
|
824
|
+
*/
|
|
825
|
+
export declare class UniversesClient {
|
|
688
826
|
#private;
|
|
689
827
|
/**
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
828
|
+
* Operation Group exposing the localized experience-icon
|
|
829
|
+
* Operations (`upload`, `delete`, `list`) backed by the
|
|
830
|
+
* `legacy-game-internationalization` domain. Shares the parent
|
|
831
|
+
* client's HTTP, rate-limit, and retry plumbing.
|
|
832
|
+
*/
|
|
695
833
|
readonly icon: UniverseIconHandle;
|
|
696
834
|
/**
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
835
|
+
* Operation Group exposing the server-management restart Operations
|
|
836
|
+
* (`forecast`, `launch`, `list`, `restartOutdated`). `restartOutdated`
|
|
837
|
+
* also uses the universe `:restartServers` method. Shares the parent
|
|
838
|
+
* client's HTTP, rate-limit, and retry plumbing.
|
|
839
|
+
*/
|
|
701
840
|
readonly restarts: UniverseRestartsGroup;
|
|
702
841
|
/**
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
842
|
+
* Operation Group exposing the localized experience-thumbnail
|
|
843
|
+
* Operations (`upload`, `delete`, `reorder`) backed by the
|
|
844
|
+
* `legacy-game-internationalization` domain. No list-thumbnails
|
|
845
|
+
* endpoint is bridged; consumers must track uploaded
|
|
846
|
+
* `mediaAssetId`s in their own state store to reconcile against
|
|
847
|
+
* the existing carousel. Shares the parent client's HTTP,
|
|
848
|
+
* rate-limit, and retry plumbing.
|
|
849
|
+
*/
|
|
711
850
|
readonly thumbnails: UniverseThumbnailsHandle;
|
|
712
851
|
/**
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
852
|
+
* Creates a new {@link UniversesClient}. Configuration is frozen
|
|
853
|
+
* on construction; per-request overrides are accepted on each
|
|
854
|
+
* method.
|
|
855
|
+
*
|
|
856
|
+
* @param options - Client-level configuration including the API key.
|
|
857
|
+
*/
|
|
719
858
|
constructor(options: OpenCloudClientOptions);
|
|
720
859
|
/**
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
860
|
+
* Makes an experience public. The API key needs `legacy-universe:manage`.
|
|
861
|
+
* A missing content maturity rating can cause a misleading 403; complete
|
|
862
|
+
* the content questionnaire in Creator Hub before activating.
|
|
863
|
+
* On a 504, reads the universe's visibility and succeeds only if public.
|
|
864
|
+
* This verification needs permission to read the universe. Otherwise the
|
|
865
|
+
* original 504 is returned, leaving the outcome unconfirmed.
|
|
866
|
+
*
|
|
867
|
+
* @since 0.4.0
|
|
868
|
+
* @param parameters - The universe identifier.
|
|
869
|
+
* @param options - Optional per-request overrides.
|
|
870
|
+
* @returns A success Result with no payload, or the Open Cloud error.
|
|
871
|
+
*
|
|
872
|
+
* @example
|
|
873
|
+
*
|
|
874
|
+
* ```ts
|
|
875
|
+
* import { UniversesClient } from "@bedrock-rbx/ocale/universes";
|
|
876
|
+
* import { createFakeHttpClient } from "@bedrock-rbx/ocale/testing";
|
|
877
|
+
* const httpClient = createFakeHttpClient()
|
|
878
|
+
* .mockResponse({ body: {}, status: 200 });
|
|
879
|
+
* const client = new UniversesClient({
|
|
880
|
+
* credential: { apiKey: "your-key", kind: "apiKey" },
|
|
881
|
+
* httpClient,
|
|
882
|
+
* });
|
|
883
|
+
* const result = client.activate({ universeId: "123" });
|
|
884
|
+
* return expect(result).resolves.toEqual({ data: undefined, success: true });
|
|
885
|
+
* ```
|
|
886
|
+
*/
|
|
887
|
+
activate(parameters: ActivateUniverseParameters, options?: RequestOptions): Promise<Result<undefined, OpenCloudError>>;
|
|
888
|
+
/**
|
|
889
|
+
* Makes an experience private, including one that is already private.
|
|
890
|
+
* The API key needs `legacy-universe:manage`.
|
|
891
|
+
* On a 504, reads the universe's visibility and succeeds only if private.
|
|
892
|
+
* This verification needs permission to read the universe. Otherwise the
|
|
893
|
+
* original 504 is returned, leaving the outcome unconfirmed.
|
|
894
|
+
*
|
|
895
|
+
* @since 0.4.0
|
|
896
|
+
* @param parameters - The universe identifier.
|
|
897
|
+
* @param options - Optional per-request overrides.
|
|
898
|
+
* @returns A success Result with no payload, or the Open Cloud error.
|
|
899
|
+
*
|
|
900
|
+
* @example
|
|
901
|
+
*
|
|
902
|
+
* ```ts
|
|
903
|
+
* import { UniversesClient } from "@bedrock-rbx/ocale/universes";
|
|
904
|
+
* import { createFakeHttpClient } from "@bedrock-rbx/ocale/testing";
|
|
905
|
+
*
|
|
906
|
+
* const httpClient = createFakeHttpClient()
|
|
907
|
+
* .mockResponse({ body: {}, status: 200 });
|
|
908
|
+
* const client = new UniversesClient({
|
|
909
|
+
* credential: { apiKey: "your-key", kind: "apiKey" },
|
|
910
|
+
* httpClient,
|
|
911
|
+
* });
|
|
912
|
+
* const result = client.deactivate({ universeId: "123" });
|
|
913
|
+
* return expect(result).resolves.toEqual({ data: undefined, success: true });
|
|
914
|
+
* ```
|
|
915
|
+
*/
|
|
916
|
+
deactivate(parameters: DeactivateUniverseParameters, options?: RequestOptions): Promise<Result<undefined, OpenCloudError>>;
|
|
917
|
+
/**
|
|
918
|
+
* Fetches the current configuration of a universe.
|
|
919
|
+
*
|
|
920
|
+
* @param parameters - The universe identifier.
|
|
921
|
+
* @param options - Optional per-request overrides (e.g. A different
|
|
922
|
+
* {@link OpenCloudClientOptions.credential} for this call only).
|
|
923
|
+
* @returns A {@link Result} wrapping the parsed {@link Universe}
|
|
924
|
+
* or the {@link OpenCloudError} that caused the request to fail.
|
|
925
|
+
*/
|
|
729
926
|
get(parameters: GetUniverseParameters, options?: RequestOptions): Promise<Result<Universe, OpenCloudError>>;
|
|
730
927
|
/**
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
928
|
+
* Restarts the live servers of a universe so players move onto the
|
|
929
|
+
* latest published place versions.
|
|
930
|
+
*
|
|
931
|
+
* @param parameters - The universe identifier, plus optional place,
|
|
932
|
+
* version, and bleed-off selection.
|
|
933
|
+
* @param options - Optional per-request overrides.
|
|
934
|
+
* @returns A success {@link Result} with no payload, or the
|
|
935
|
+
* {@link OpenCloudError} that caused the request to fail.
|
|
936
|
+
*/
|
|
740
937
|
restartServers(parameters: RestartUniverseServersParameters, options?: RequestOptions): Promise<Result<undefined, OpenCloudError>>;
|
|
741
938
|
/**
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
939
|
+
* Partially updates a universe's configuration. The fields
|
|
940
|
+
* supplied on `parameters` (excluding `universeId`) are forwarded
|
|
941
|
+
* to the server via a Google-style `updateMask`; unmentioned
|
|
942
|
+
* fields are left untouched.
|
|
943
|
+
*
|
|
944
|
+
* @param parameters - The universe identifier and the fields to
|
|
945
|
+
* update. At least one updatable field must be supplied.
|
|
946
|
+
* @param options - Optional per-request overrides (e.g. A different
|
|
947
|
+
* {@link OpenCloudClientOptions.credential} for this call only).
|
|
948
|
+
* @returns A {@link Result} wrapping the parsed {@link Universe}
|
|
949
|
+
* or the {@link OpenCloudError} that caused the request to fail.
|
|
950
|
+
*/
|
|
754
951
|
update(parameters: UpdateUniverseParameters, options?: RequestOptions): Promise<Result<Universe, OpenCloudError>>;
|
|
755
952
|
}
|
|
756
953
|
//#endregion
|
|
757
|
-
export {
|
|
954
|
+
export type { ActivateUniverseParameters, DeactivateUniverseParameters, DeleteExperienceIconParameters, DeleteExperienceThumbnailParameters, ExperienceIcon, ForecastRestartParameters, GameIconState, GetUniverseParameters, LaunchRestartParameters, LaunchedRestart, ListExperienceIconsParameters, ListRestartsParameters, OutdatedRestart, PlaceOutdatedRestart, PlaceRestartForecast, PlaceRestartStatus, ReorderExperienceThumbnailsParameters, RestartOutdatedParameters, RestartPlaceFilter, RestartState, RestartStatus, RestartUniverseServersParameters, SocialLink, Universe, UniverseAgeRating, UniverseOwner, UniverseVisibility, UpdateUniverseParameters, UploadExperienceIconParameters, UploadExperienceThumbnailParameters, UploadedExperienceThumbnail };
|
|
758
955
|
//# sourceMappingURL=universes.d.mts.map
|