@bedrock-rbx/ocale 0.3.4 → 0.5.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 +10 -5
- package/dist/assets.d.mts +64 -0
- package/dist/assets.d.mts.map +1 -0
- package/dist/assets.mjs +301 -0
- package/dist/assets.mjs.map +1 -0
- package/dist/badge-insufficient-funds-BLFvQZt1.mjs +91 -0
- package/dist/badge-insufficient-funds-BLFvQZt1.mjs.map +1 -0
- package/dist/badges.d.mts +359 -196
- package/dist/badges.d.mts.map +1 -1
- package/dist/badges.mjs +493 -59
- package/dist/badges.mjs.map +1 -1
- package/dist/capacity-admission-Ce2V9QNb.d.mts +347 -0
- package/dist/capacity-admission-Ce2V9QNb.d.mts.map +1 -0
- package/dist/{data.generated-B2ceLfSn.d.mts → data.generated-B4Fztv_7.d.mts} +23 -25
- package/dist/data.generated-B4Fztv_7.d.mts.map +1 -0
- package/dist/developer-products.d.mts +207 -194
- package/dist/developer-products.d.mts.map +1 -1
- package/dist/developer-products.mjs +125 -39
- package/dist/developer-products.mjs.map +1 -1
- package/dist/game-passes.d.mts +206 -211
- package/dist/game-passes.d.mts.map +1 -1
- package/dist/game-passes.mjs +35 -36
- package/dist/game-passes.mjs.map +1 -1
- package/dist/index.d.mts +947 -366
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +324 -12
- package/dist/index.mjs.map +1 -1
- package/dist/is-date-time-string-C91G44SI.mjs +19 -0
- package/dist/is-date-time-string-C91G44SI.mjs.map +1 -0
- package/dist/locales.d.mts +28 -2
- package/dist/locales.d.mts.map +1 -0
- package/dist/locales.mjs +24 -3
- package/dist/locales.mjs.map +1 -1
- package/dist/luau-execution.d.mts +154 -157
- package/dist/luau-execution.d.mts.map +1 -1
- package/dist/luau-execution.mjs +15 -16
- package/dist/luau-execution.mjs.map +1 -1
- package/dist/{network-error-DR9FX5hb.mjs → network-error-P4An7nUB.mjs} +48 -14
- package/dist/network-error-P4An7nUB.mjs.map +1 -0
- package/dist/places.d.mts +258 -186
- package/dist/places.d.mts.map +1 -1
- package/dist/places.mjs +187 -35
- package/dist/places.mjs.map +1 -1
- package/dist/{poll-timeout-3PXLsabj.mjs → poll-timeout-BCxgN97O.mjs} +4 -6
- package/dist/{poll-timeout-3PXLsabj.mjs.map → poll-timeout-BCxgN97O.mjs.map} +1 -1
- package/dist/{polling-helpers-CoVhsC33.mjs → polling-helpers-BtEYR5dN.mjs} +260 -105
- package/dist/polling-helpers-BtEYR5dN.mjs.map +1 -0
- package/dist/{price-information-B0tkOoAX.mjs → price-information--d6GZAcp.mjs} +3 -4
- package/dist/{price-information-B0tkOoAX.mjs.map → price-information--d6GZAcp.mjs.map} +1 -1
- package/dist/resource-client-CF8SPsV8.d.mts +162 -0
- package/dist/resource-client-CF8SPsV8.d.mts.map +1 -0
- package/dist/{resource-client-rqTMkBeR.mjs → resource-client-Cm_bPcCs.mjs} +589 -197
- package/dist/resource-client-Cm_bPcCs.mjs.map +1 -0
- package/dist/retry-DYxm_eBU.d.mts +225 -0
- package/dist/retry-DYxm_eBU.d.mts.map +1 -0
- package/dist/{retry-BlX4tUnT.mjs → retry-Dv5TsY9O.mjs} +312 -54
- package/dist/retry-Dv5TsY9O.mjs.map +1 -0
- package/dist/{signatures-JF-7Psce.mjs → signatures-CtJ7jfVN.mjs} +2 -3
- package/dist/{signatures-JF-7Psce.mjs.map → signatures-CtJ7jfVN.mjs.map} +1 -1
- package/dist/storage.d.mts +333 -344
- package/dist/storage.d.mts.map +1 -1
- package/dist/storage.mjs +39 -40
- package/dist/storage.mjs.map +1 -1
- package/dist/testing.d.mts +369 -434
- package/dist/testing.d.mts.map +1 -1
- package/dist/testing.mjs +18 -33
- package/dist/testing.mjs.map +1 -1
- package/dist/{to-blob-RPqMBuft.mjs → to-blob-Bqu7bmlE.mjs} +2 -3
- package/dist/{to-blob-RPqMBuft.mjs.map → to-blob-Bqu7bmlE.mjs.map} +1 -1
- package/dist/types-Z4abDJfK.d.mts +501 -0
- package/dist/types-Z4abDJfK.d.mts.map +1 -0
- package/dist/universes.d.mts +619 -436
- package/dist/universes.d.mts.map +1 -1
- package/dist/universes.mjs +432 -79
- package/dist/universes.mjs.map +1 -1
- package/dist/{validation-B_Zs1So2.mjs → validation-kaTLLAD1.mjs} +3 -4
- package/dist/{validation-B_Zs1So2.mjs.map → validation-kaTLLAD1.mjs.map} +1 -1
- package/dist/wire-DDG87I-d.d.mts +39 -0
- package/dist/wire-DDG87I-d.d.mts.map +1 -0
- package/package.json +15 -14
- package/dist/capacity-admission-IDO3fcUC.d.mts +0 -369
- package/dist/capacity-admission-IDO3fcUC.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-CoVhsC33.mjs.map +0 -1
- package/dist/resource-client-B6NeFXUv.d.mts +0 -164
- package/dist/resource-client-B6NeFXUv.d.mts.map +0 -1
- package/dist/resource-client-rqTMkBeR.mjs.map +0 -1
- package/dist/retry-BlX4tUnT.mjs.map +0 -1
- package/dist/retry-war_-9tb.d.mts +0 -373
- package/dist/retry-war_-9tb.d.mts.map +0 -1
- package/dist/types-CvYh4SPC.d.mts +0 -386
- package/dist/types-CvYh4SPC.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/places.d.mts
CHANGED
|
@@ -1,15 +1,24 @@
|
|
|
1
|
-
import { f as
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
//#region src/domains/cloud-v2/places/types.d.ts
|
|
1
|
+
import { a as ListLogsParameters, f as LuauExecutionTask, h as SubmitAtVersionParameters, m as SubmitAtHeadParameters, n as LuauExecutionSubmitOptions, o as LogMessage, p as LuauExecutionTaskRef, r as PollUntilDoneOptions, s as LogPage, t as LuauExecutionRunOptions, u as GetParameters } from "./capacity-admission-Ce2V9QNb.mjs";
|
|
2
|
+
import { c as OpenCloudClientOptions, d as RequestOptions, g as OpenCloudError, m as Result, p as Page } from "./types-Z4abDJfK.mjs";
|
|
5
3
|
/**
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
4
|
+
* Identifies a place to read through `PlacesClient.get`.
|
|
5
|
+
*
|
|
6
|
+
* @since 0.4.0
|
|
7
|
+
*/
|
|
8
|
+
interface GetPlaceParameters {
|
|
9
|
+
/** Stringified place ID. */
|
|
10
|
+
readonly placeId: string;
|
|
11
|
+
/** Stringified ID of the universe that owns the place. */
|
|
12
|
+
readonly universeId: string;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Caller-supplied input for the `update` method on `PlacesClient`.
|
|
16
|
+
* Every writable field is optional; presence of a key drives the
|
|
17
|
+
* `updateMask` query string that the server uses as the field-mask
|
|
18
|
+
* for the partial update. Absent keys are left untouched server-side.
|
|
19
|
+
*
|
|
20
|
+
* @since 0.1.0
|
|
21
|
+
*/
|
|
13
22
|
interface UpdatePlaceParameters {
|
|
14
23
|
/** New description for the place. */
|
|
15
24
|
readonly description?: string;
|
|
@@ -23,11 +32,11 @@ interface UpdatePlaceParameters {
|
|
|
23
32
|
readonly universeId: string;
|
|
24
33
|
}
|
|
25
34
|
/**
|
|
26
|
-
* Parsed representation of a Roblox place's configuration, as returned
|
|
27
|
-
* by the Open Cloud `Cloud_GetPlace` and `Cloud_UpdatePlace` endpoints.
|
|
28
|
-
*
|
|
29
|
-
* @since 0.1.0
|
|
30
|
-
*/
|
|
35
|
+
* Parsed representation of a Roblox place's configuration, as returned
|
|
36
|
+
* by the Open Cloud `Cloud_GetPlace` and `Cloud_UpdatePlace` endpoints.
|
|
37
|
+
*
|
|
38
|
+
* @since 0.1.0
|
|
39
|
+
*/
|
|
31
40
|
interface Place {
|
|
32
41
|
/** Stringified place ID, extracted from the wire `path`. */
|
|
33
42
|
readonly id: string;
|
|
@@ -48,25 +57,59 @@ interface Place {
|
|
|
48
57
|
/** Timestamp of the most recent update. */
|
|
49
58
|
readonly updatedAt: Date;
|
|
50
59
|
}
|
|
51
|
-
//#endregion
|
|
52
|
-
//#region src/domains/universes/places/types.d.ts
|
|
53
60
|
/**
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
+
* Page sizes the develop places endpoint accepts. Any other value is
|
|
62
|
+
* rejected with HTTP 400.
|
|
63
|
+
*
|
|
64
|
+
* @since 0.5.0
|
|
65
|
+
*/
|
|
66
|
+
type ListPlacesPageSize = 10 | 25 | 50 | 100;
|
|
67
|
+
/**
|
|
68
|
+
* Parameters for listing the places of a universe. Pass the returned
|
|
69
|
+
* `nextPageToken` as `pageToken` until it is undefined.
|
|
70
|
+
*
|
|
71
|
+
* @since 0.5.0
|
|
72
|
+
*/
|
|
73
|
+
interface ListPlacesParameters {
|
|
74
|
+
/** Optional page size; the server defaults to 10. */
|
|
75
|
+
readonly pageSize?: ListPlacesPageSize;
|
|
76
|
+
/** Cursor returned by the previous page. */
|
|
77
|
+
readonly pageToken?: string;
|
|
78
|
+
/** Stringified universe ID. */
|
|
79
|
+
readonly universeId: string;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* One place in a universe, as listed by `PlacesClient.list`.
|
|
83
|
+
*
|
|
84
|
+
* @since 0.5.0
|
|
85
|
+
*/
|
|
86
|
+
interface PlaceSummary {
|
|
87
|
+
/** Stringified place ID. */
|
|
88
|
+
readonly id: string;
|
|
89
|
+
/** Place name. */
|
|
90
|
+
readonly name: string;
|
|
91
|
+
/** Place description; empty when unset. */
|
|
92
|
+
readonly description: string;
|
|
93
|
+
/** Stringified ID of the universe that owns the place. */
|
|
94
|
+
readonly universeId: string;
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Caller-supplied input for the `publish` and `save` methods on
|
|
98
|
+
* `PlacesClient`. Both methods take the same parameter shape; which
|
|
99
|
+
* version-type query string is used is decided by the method, not the
|
|
100
|
+
* caller.
|
|
101
|
+
*
|
|
102
|
+
* @since 0.1.0
|
|
103
|
+
*/
|
|
61
104
|
interface PublishParameters {
|
|
62
105
|
/** Raw `.rbxl` or `.rbxlx` file bytes. Must be non-empty. */
|
|
63
106
|
readonly body: Uint8Array<ArrayBuffer>;
|
|
64
107
|
/**
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
108
|
+
* Whether `body` is the binary or XML place format. The transport
|
|
109
|
+
* sends `application/octet-stream` for `"rbxl"` and `application/xml`
|
|
110
|
+
* for `"rbxlx"`, and the builder rejects payloads whose magic bytes
|
|
111
|
+
* disagree with the declared format before any HTTP call.
|
|
112
|
+
*/
|
|
70
113
|
readonly format: "rbxl" | "rbxlx";
|
|
71
114
|
/** Stringified ID of the place inside the universe. */
|
|
72
115
|
readonly placeId: string;
|
|
@@ -74,189 +117,218 @@ interface PublishParameters {
|
|
|
74
117
|
readonly universeId: string;
|
|
75
118
|
}
|
|
76
119
|
/**
|
|
77
|
-
* Successful response from publishing or saving a new place version.
|
|
78
|
-
*
|
|
79
|
-
* @since 0.1.0
|
|
80
|
-
*/
|
|
120
|
+
* Successful response from publishing or saving a new place version.
|
|
121
|
+
*
|
|
122
|
+
* @since 0.1.0
|
|
123
|
+
*/
|
|
81
124
|
interface PlaceVersion {
|
|
82
125
|
/**
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
126
|
+
* Auto-incrementing version number assigned by Roblox. Always at least
|
|
127
|
+
* `1` for the first publish; increases by one for every subsequent
|
|
128
|
+
* publish or save against the same place.
|
|
129
|
+
*/
|
|
87
130
|
readonly versionNumber: number;
|
|
88
131
|
}
|
|
89
|
-
//#endregion
|
|
90
|
-
//#region src/resources/places/client.d.ts
|
|
91
132
|
/**
|
|
92
|
-
* Operation Group exposed by {@link PlacesClient} as the
|
|
93
|
-
* `luauExecution` namespace. Provides `submit` to queue a Luau script,
|
|
94
|
-
* `get` to fetch a task's current state, and `listLogs` to retrieve
|
|
95
|
-
* structured log messages. Shares the same dispatch wiring as the
|
|
96
|
-
* top-level `LuauExecutionClient` exposed at
|
|
97
|
-
* `@bedrock-rbx/ocale/luau-execution`.
|
|
98
|
-
*
|
|
99
|
-
* @since 0.1.0
|
|
100
|
-
*/
|
|
133
|
+
* Operation Group exposed by {@link PlacesClient} as the
|
|
134
|
+
* `luauExecution` namespace. Provides `submit` to queue a Luau script,
|
|
135
|
+
* `get` to fetch a task's current state, and `listLogs` to retrieve
|
|
136
|
+
* structured log messages. Shares the same dispatch wiring as the
|
|
137
|
+
* top-level `LuauExecutionClient` exposed at
|
|
138
|
+
* `@bedrock-rbx/ocale/luau-execution`.
|
|
139
|
+
*
|
|
140
|
+
* @since 0.1.0
|
|
141
|
+
*/
|
|
101
142
|
interface LuauExecutionHandle {
|
|
102
143
|
/**
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
144
|
+
* Fetches the current state of a previously-submitted Luau
|
|
145
|
+
* execution task. Uses idempotent retry semantics for both 429 and
|
|
146
|
+
* 5xx.
|
|
147
|
+
*
|
|
148
|
+
* @param parameters - The task ref plus an optional `view` selector.
|
|
149
|
+
* @param options - Optional per-request overrides (e.g. A different
|
|
150
|
+
* {@link OpenCloudClientOptions.credential} for this call only).
|
|
151
|
+
* @returns A {@link Result} wrapping the parsed
|
|
152
|
+
* {@link LuauExecutionTask} or the {@link OpenCloudError} that
|
|
153
|
+
* caused the request to fail.
|
|
154
|
+
*/
|
|
114
155
|
get(parameters: GetParameters, options?: RequestOptions): Promise<Result<LuauExecutionTask, OpenCloudError>>;
|
|
115
156
|
/**
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
157
|
+
* Lists one page of structured log messages produced by a
|
|
158
|
+
* previously-submitted Luau execution task. Messages from multiple
|
|
159
|
+
* server-side chunks are flattened into a single ordered array.
|
|
160
|
+
* Uses idempotent retry semantics for both 429 and 5xx.
|
|
161
|
+
*
|
|
162
|
+
* @param parameters - The task ref and optional pagination controls
|
|
163
|
+
* (`pageSize`, `pageToken`).
|
|
164
|
+
* @param options - Optional per-request overrides (e.g. A different
|
|
165
|
+
* {@link OpenCloudClientOptions.credential} for this call only).
|
|
166
|
+
* @returns A {@link Result} wrapping the parsed {@link LogPage} or
|
|
167
|
+
* the {@link OpenCloudError} that caused the request to fail.
|
|
168
|
+
*/
|
|
128
169
|
listLogs(parameters: ListLogsParameters, options?: RequestOptions): Promise<Result<LogPage, OpenCloudError>>;
|
|
129
170
|
/**
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
171
|
+
* Polls `get` with `view=BASIC` on a configurable backoff schedule until
|
|
172
|
+
* the task reaches a terminal state, the wall-clock budget is exhausted,
|
|
173
|
+
* or the supplied `AbortSignal` fires. Returns the terminal task on
|
|
174
|
+
* success. The budget also bounds an in-flight
|
|
175
|
+
* request through its request deadline, so a hanging request ends with
|
|
176
|
+
* `PollTimeoutError` at the budget.
|
|
177
|
+
*
|
|
178
|
+
* @param ref - Reference to the task to poll, typically returned by `submit`.
|
|
179
|
+
* @param options - Polling and per-request overrides.
|
|
180
|
+
* @returns A {@link Result} wrapping the terminal {@link LuauExecutionTask},
|
|
181
|
+
* or an error if aborted, timed out, or the transport fails.
|
|
182
|
+
*/
|
|
140
183
|
pollUntilDone(ref: LuauExecutionTaskRef, options?: PollUntilDoneOptions): Promise<Result<LuauExecutionTask, OpenCloudError>>;
|
|
141
184
|
/**
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
185
|
+
* Submits a Luau script and polls `get` with `view=BASIC` until the
|
|
186
|
+
* task reaches a terminal state, the wall-clock budget is exhausted,
|
|
187
|
+
* or the supplied `AbortSignal` fires. Combines `submit` and
|
|
188
|
+
* `pollUntilDone` in one call. The budget opens before the submit
|
|
189
|
+
* and covers it, and bounds each in-flight request through its request
|
|
190
|
+
* deadline.
|
|
191
|
+
*
|
|
192
|
+
* @param parameters - The same input accepted by `submit`.
|
|
193
|
+
* @param options - Polling and per-request overrides.
|
|
194
|
+
* @returns A {@link Result} wrapping the terminal
|
|
195
|
+
* {@link LuauExecutionTask}, or an error if submit fails, the task
|
|
196
|
+
* is aborted, timed out, or the transport fails.
|
|
197
|
+
*/
|
|
153
198
|
runUntilDone(parameters: SubmitAtHeadParameters | SubmitAtVersionParameters, options?: LuauExecutionRunOptions): Promise<Result<LuauExecutionTask, OpenCloudError>>;
|
|
154
199
|
/**
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
200
|
+
* Submits a Luau script for execution against a place. Dispatches
|
|
201
|
+
* to the head-version URL when `versionId` is omitted, or to the
|
|
202
|
+
* specific-version URL when one is supplied. Both URL shapes share
|
|
203
|
+
* one rate-limit queue and one required-scope set.
|
|
204
|
+
*
|
|
205
|
+
* @param parameters - The universe and place identifiers, the
|
|
206
|
+
* script to run, an optional `versionId`, and any other writable
|
|
207
|
+
* submit fields.
|
|
208
|
+
* @param options - Optional per-request overrides (e.g. A different
|
|
209
|
+
* {@link OpenCloudClientOptions.credential} for this call only).
|
|
210
|
+
* @returns A {@link Result} wrapping the parsed
|
|
211
|
+
* {@link LuauExecutionTask} or the {@link OpenCloudError} that
|
|
212
|
+
* caused the request to fail.
|
|
213
|
+
*/
|
|
169
214
|
submit(parameters: SubmitAtHeadParameters | SubmitAtVersionParameters, options?: LuauExecutionSubmitOptions): Promise<Result<LuauExecutionTask, OpenCloudError>>;
|
|
170
215
|
}
|
|
171
216
|
/**
|
|
172
|
-
* Public client for the Roblox Open Cloud `Place` resource. Covers
|
|
173
|
-
* place-version publishing (`publish`, `save`), place-configuration
|
|
174
|
-
* updates (`update`), and the Luau execution Operation Group
|
|
175
|
-
* (`luauExecution.submit`, `luauExecution.get`). Every method returns
|
|
176
|
-
* a {@link Result} so callers handle failure explicitly; no thrown
|
|
177
|
-
* {@link OpenCloudError} ever escapes the client.
|
|
178
|
-
*
|
|
179
|
-
* Publishing or saving a 5xx-failed place version is not retried
|
|
180
|
-
* automatically: Roblox does not support idempotency keys, so a retry
|
|
181
|
-
* could publish a duplicate version unnoticed. Callers that *can* detect
|
|
182
|
-
* duplicates externally may opt back into 5xx retry per-call by passing
|
|
183
|
-
* `retryableStatuses` on the second argument. The `update` method, by
|
|
184
|
-
* contrast, is idempotent and retries both 429 and 5xx automatically.
|
|
185
|
-
*
|
|
186
|
-
* Failures that never reached Open Cloud *are* retried: transient transport
|
|
187
|
-
* errors, and responses served by an edge gateway rather than the API. Neither
|
|
188
|
-
* can have created a version, so neither risks the duplicate a 5xx does.
|
|
189
|
-
*
|
|
190
|
-
* @since 0.1.0
|
|
191
|
-
*
|
|
192
|
-
* @example
|
|
193
|
-
*
|
|
194
|
-
* ```ts
|
|
195
|
-
* import { PlacesClient } from "@bedrock-rbx/ocale/places";
|
|
196
|
-
*
|
|
197
|
-
* const client = new PlacesClient({ apiKey: "your-key" });
|
|
198
|
-
* expect(client).toBeInstanceOf(PlacesClient);
|
|
199
|
-
* ```
|
|
200
|
-
*/
|
|
201
|
-
declare class PlacesClient {
|
|
217
|
+
* Public client for the Roblox Open Cloud `Place` resource. Covers
|
|
218
|
+
* place-version publishing (`publish`, `save`), place-configuration
|
|
219
|
+
* updates (`update`), and the Luau execution Operation Group
|
|
220
|
+
* (`luauExecution.submit`, `luauExecution.get`). Every method returns
|
|
221
|
+
* a {@link Result} so callers handle failure explicitly; no thrown
|
|
222
|
+
* {@link OpenCloudError} ever escapes the client.
|
|
223
|
+
*
|
|
224
|
+
* Publishing or saving a 5xx-failed place version is not retried
|
|
225
|
+
* automatically: Roblox does not support idempotency keys, so a retry
|
|
226
|
+
* could publish a duplicate version unnoticed. Callers that *can* detect
|
|
227
|
+
* duplicates externally may opt back into 5xx retry per-call by passing
|
|
228
|
+
* `retryableStatuses` on the second argument. The `update` method, by
|
|
229
|
+
* contrast, is idempotent and retries both 429 and 5xx automatically.
|
|
230
|
+
*
|
|
231
|
+
* Failures that never reached Open Cloud *are* retried: transient transport
|
|
232
|
+
* errors, and responses served by an edge gateway rather than the API. Neither
|
|
233
|
+
* can have created a version, so neither risks the duplicate a 5xx does.
|
|
234
|
+
*
|
|
235
|
+
* @since 0.1.0
|
|
236
|
+
*
|
|
237
|
+
* @example
|
|
238
|
+
*
|
|
239
|
+
* ```ts
|
|
240
|
+
* import { PlacesClient } from "@bedrock-rbx/ocale/places";
|
|
241
|
+
*
|
|
242
|
+
* const client = new PlacesClient({ credential: { apiKey: "your-key", kind: "apiKey" } });
|
|
243
|
+
* expect(client).toBeInstanceOf(PlacesClient);
|
|
244
|
+
* ```
|
|
245
|
+
*/
|
|
246
|
+
export declare class PlacesClient {
|
|
202
247
|
#private;
|
|
203
248
|
readonly luauExecution: LuauExecutionHandle;
|
|
204
249
|
/**
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
250
|
+
* Creates a new {@link PlacesClient}. Configuration is frozen on
|
|
251
|
+
* construction; per-request overrides are accepted on each method.
|
|
252
|
+
*
|
|
253
|
+
* @param options - Client-level configuration including the API key.
|
|
254
|
+
*/
|
|
210
255
|
constructor(options: OpenCloudClientOptions);
|
|
211
256
|
/**
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
257
|
+
* Reads a place's configuration, including whether it is the universe's
|
|
258
|
+
* root.
|
|
259
|
+
*
|
|
260
|
+
* @since 0.4.0
|
|
261
|
+
* @param parameters - Owning universe and place identifiers.
|
|
262
|
+
* @param options - Per-request overrides.
|
|
263
|
+
* @returns The parsed place or the Open Cloud failure.
|
|
264
|
+
*/
|
|
265
|
+
get(parameters: GetPlaceParameters, options?: RequestOptions): Promise<Result<Place, OpenCloudError>>;
|
|
266
|
+
/**
|
|
267
|
+
* Lists one page of the places of a universe. Omit `pageToken` for the
|
|
268
|
+
* first page, then pass the returned `nextPageToken` until it is
|
|
269
|
+
* undefined. An unknown universe yields an empty page.
|
|
270
|
+
*
|
|
271
|
+
* The read is unauthenticated: it sends no credential and is served from
|
|
272
|
+
* `https://develop.roblox.com`, so the client `baseUrl` does not apply.
|
|
273
|
+
* `pageSize` accepts only 10, 25, 50 or 100 and defaults to 10.
|
|
274
|
+
* Roblox allows 10000 reads per caller in a fixed 60-second window. A 429
|
|
275
|
+
* waits until the reported `x-ratelimit-reset` before it retries.
|
|
276
|
+
*
|
|
277
|
+
* @since 0.5.0
|
|
278
|
+
* @param parameters - Universe ID and optional pagination fields.
|
|
279
|
+
* @param options - Optional per-request overrides.
|
|
280
|
+
* @returns A {@link Result} wrapping the page of {@link PlaceSummary}
|
|
281
|
+
* items, or the {@link OpenCloudError} that caused the request to fail.
|
|
282
|
+
*/
|
|
283
|
+
list(parameters: ListPlacesParameters, options?: RequestOptions): Promise<Result<Page<PlaceSummary>, OpenCloudError>>;
|
|
284
|
+
/**
|
|
285
|
+
* Publishes a new live version of a place.
|
|
286
|
+
*
|
|
287
|
+
* No default request timeout applies to this upload; pass `options.timeout`
|
|
288
|
+
* to set a per-call deadline.
|
|
289
|
+
*
|
|
290
|
+
* @param parameters - Universe and place identifiers, the place file
|
|
291
|
+
* bytes, and their declared `format`.
|
|
292
|
+
* @param options - Optional per-request overrides (e.g. A different
|
|
293
|
+
* {@link OpenCloudClientOptions.credential} for this call only).
|
|
294
|
+
* @returns A {@link Result} wrapping the parsed {@link PlaceVersion}
|
|
295
|
+
* or the {@link OpenCloudError} that caused the request to fail.
|
|
296
|
+
*/
|
|
224
297
|
publish(parameters: PublishParameters, options?: RequestOptions): Promise<Result<PlaceVersion, OpenCloudError>>;
|
|
225
298
|
/**
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
299
|
+
* Saves a new draft version of a place. Identical to {@link publish}
|
|
300
|
+
* except the resulting version is not made live; consumers can list or
|
|
301
|
+
* promote it later. Shares a single per-API-key rate-limit queue with
|
|
302
|
+
* `publish` because Roblox attributes both calls to the same per-minute
|
|
303
|
+
* quota.
|
|
304
|
+
*
|
|
305
|
+
* No default request timeout applies to this upload; pass `options.timeout`
|
|
306
|
+
* to set a per-call deadline.
|
|
307
|
+
*
|
|
308
|
+
* @param parameters - Universe and place identifiers, the place file
|
|
309
|
+
* bytes, and their declared `format`.
|
|
310
|
+
* @param options - Optional per-request overrides (e.g. A different
|
|
311
|
+
* {@link OpenCloudClientOptions.credential} for this call only).
|
|
312
|
+
* @returns A {@link Result} wrapping the parsed {@link PlaceVersion}
|
|
313
|
+
* or the {@link OpenCloudError} that caused the request to fail.
|
|
314
|
+
*/
|
|
242
315
|
save(parameters: PublishParameters, options?: RequestOptions): Promise<Result<PlaceVersion, OpenCloudError>>;
|
|
243
316
|
/**
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
317
|
+
* Partially updates a place's configuration. The fields supplied on
|
|
318
|
+
* `parameters` (excluding the identifiers) are forwarded to the
|
|
319
|
+
* server via a Google-style `updateMask`; unmentioned fields are
|
|
320
|
+
* left untouched. The universe's root place is the canonical place
|
|
321
|
+
* to update when changing a universe's description or display name:
|
|
322
|
+
* both are derived server-side from the root place.
|
|
323
|
+
*
|
|
324
|
+
* @param parameters - The universe and place identifiers and the
|
|
325
|
+
* fields to update. At least one writable field must be supplied.
|
|
326
|
+
* @param options - Optional per-request overrides (e.g. A different
|
|
327
|
+
* {@link OpenCloudClientOptions.credential} for this call only).
|
|
328
|
+
* @returns A {@link Result} wrapping the parsed {@link Place} or
|
|
329
|
+
* the {@link OpenCloudError} that caused the request to fail.
|
|
330
|
+
*/
|
|
258
331
|
update(parameters: UpdatePlaceParameters, options?: RequestOptions): Promise<Result<Place, OpenCloudError>>;
|
|
259
332
|
}
|
|
260
|
-
|
|
261
|
-
export { type ListLogsParameters, type LogMessage, type LogPage, type LuauExecutionHandle, type Place, type PlaceVersion, PlacesClient, type PublishParameters, type UpdatePlaceParameters };
|
|
333
|
+
export type { GetPlaceParameters, ListLogsParameters, ListPlacesPageSize, ListPlacesParameters, LogMessage, LogPage, LuauExecutionHandle, Place, PlaceSummary, PlaceVersion, PublishParameters, UpdatePlaceParameters };
|
|
262
334
|
//# sourceMappingURL=places.d.mts.map
|
package/dist/places.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"places.d.mts","names":[],"sources":["../src/domains/cloud-v2/places/types.ts","../src/domains/universes/places/types.ts","../src/resources/places/client.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"places.d.mts","names":[],"sources":["../src/domains/cloud-v2/places/types.ts","../src/domains/develop/places/types.ts","../src/domains/universes/places/types.ts","../src/resources/places/client.ts"],"mappings":";;;;;;;UAKiB;;WAEP;;WAEA;;;;;;;;;;UAWO;;WAEP;;WAEA;;WAEA;;WAEA;;WAEA;;;;;;;;UASO;;WAEP;;WAEA,WAAW;;WAEX;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA,WAAW;;;;;;;;KCnDT;;;;;;;UAQK;;WAEP,WAAW;;WAEX;;WAEA;;;;;;;UAQO;;WAEP;;WAEA;;WAEA;;WAEA;;;;;;;;;;UC5BO;;WAEP,MAAM,WAAW;;;;;;;WAOjB;;WAEA;;WAEA;;;;;;;UAQO;;;;;;WAMP;;;;;;;;;;;;UCoCO;;;;;;;;;;;;;EAahB,IACC,YAAY,eACZ,UAAU,iBACR,QAAQ,OAAO,mBAAmB;;;;;;;;;;;;;;EAcrC,SACC,YAAY,oBACZ,UAAU,iBACR,QAAQ,OAAO,SAAS;;;;;;;;;;;;;;EAc3B,cACC,KAAK,sBACL,UAAU,uBACR,QAAQ,OAAO,mBAAmB;;;;;;;;;;;;;;;EAerC,aACC,YAAY,yBAAyB,2BACrC,UAAU,0BACR,QAAQ,OAAO,mBAAmB;;;;;;;;;;;;;;;;EAgBrC,OACC,YAAY,yBAAyB,2BACrC,UAAU,6BACR,QAAQ,OAAO,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAmFzB;;WAGI,eAAe;;;;;;;EAQ/B,YAAY,SAAS;;;;;;;;;;EAcrB,IACC,YAAY,oBACZ,UAAU,iBACR,QAAQ,OAAO,OAAO;;;;;;;;;;;;;;;;;;EAqBzB,KACC,YAAY,sBACZ,UAAU,iBACR,QAAQ,OAAO,KAAK,eAAe;;;;;;;;;;;;;;EAsBtC,QACC,YAAY,mBACZ,UAAU,iBACR,QAAQ,OAAO,cAAc;;;;;;;;;;;;;;;;;;EAqBhC,KACC,YAAY,mBACZ,UAAU,iBACR,QAAQ,OAAO,cAAc;;;;;;;;;;;;;;;;EAmBhC,OACC,YAAY,uBACZ,UAAU,iBACR,QAAQ,OAAO,OAAO"}
|