@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.
Files changed (95) hide show
  1. package/README.md +10 -5
  2. package/dist/assets.d.mts +64 -0
  3. package/dist/assets.d.mts.map +1 -0
  4. package/dist/assets.mjs +301 -0
  5. package/dist/assets.mjs.map +1 -0
  6. package/dist/badge-insufficient-funds-BLFvQZt1.mjs +91 -0
  7. package/dist/badge-insufficient-funds-BLFvQZt1.mjs.map +1 -0
  8. package/dist/badges.d.mts +359 -196
  9. package/dist/badges.d.mts.map +1 -1
  10. package/dist/badges.mjs +493 -59
  11. package/dist/badges.mjs.map +1 -1
  12. package/dist/capacity-admission-Ce2V9QNb.d.mts +347 -0
  13. package/dist/capacity-admission-Ce2V9QNb.d.mts.map +1 -0
  14. package/dist/{data.generated-B2ceLfSn.d.mts → data.generated-B4Fztv_7.d.mts} +23 -25
  15. package/dist/data.generated-B4Fztv_7.d.mts.map +1 -0
  16. package/dist/developer-products.d.mts +207 -194
  17. package/dist/developer-products.d.mts.map +1 -1
  18. package/dist/developer-products.mjs +125 -39
  19. package/dist/developer-products.mjs.map +1 -1
  20. package/dist/game-passes.d.mts +206 -211
  21. package/dist/game-passes.d.mts.map +1 -1
  22. package/dist/game-passes.mjs +35 -36
  23. package/dist/game-passes.mjs.map +1 -1
  24. package/dist/index.d.mts +947 -366
  25. package/dist/index.d.mts.map +1 -1
  26. package/dist/index.mjs +324 -12
  27. package/dist/index.mjs.map +1 -1
  28. package/dist/is-date-time-string-C91G44SI.mjs +19 -0
  29. package/dist/is-date-time-string-C91G44SI.mjs.map +1 -0
  30. package/dist/locales.d.mts +28 -2
  31. package/dist/locales.d.mts.map +1 -0
  32. package/dist/locales.mjs +24 -3
  33. package/dist/locales.mjs.map +1 -1
  34. package/dist/luau-execution.d.mts +154 -157
  35. package/dist/luau-execution.d.mts.map +1 -1
  36. package/dist/luau-execution.mjs +15 -16
  37. package/dist/luau-execution.mjs.map +1 -1
  38. package/dist/{network-error-DR9FX5hb.mjs → network-error-P4An7nUB.mjs} +48 -14
  39. package/dist/network-error-P4An7nUB.mjs.map +1 -0
  40. package/dist/places.d.mts +258 -186
  41. package/dist/places.d.mts.map +1 -1
  42. package/dist/places.mjs +187 -35
  43. package/dist/places.mjs.map +1 -1
  44. package/dist/{poll-timeout-3PXLsabj.mjs → poll-timeout-BCxgN97O.mjs} +4 -6
  45. package/dist/{poll-timeout-3PXLsabj.mjs.map → poll-timeout-BCxgN97O.mjs.map} +1 -1
  46. package/dist/{polling-helpers-CoVhsC33.mjs → polling-helpers-BtEYR5dN.mjs} +260 -105
  47. package/dist/polling-helpers-BtEYR5dN.mjs.map +1 -0
  48. package/dist/{price-information-B0tkOoAX.mjs → price-information--d6GZAcp.mjs} +3 -4
  49. package/dist/{price-information-B0tkOoAX.mjs.map → price-information--d6GZAcp.mjs.map} +1 -1
  50. package/dist/resource-client-CF8SPsV8.d.mts +162 -0
  51. package/dist/resource-client-CF8SPsV8.d.mts.map +1 -0
  52. package/dist/{resource-client-rqTMkBeR.mjs → resource-client-Cm_bPcCs.mjs} +589 -197
  53. package/dist/resource-client-Cm_bPcCs.mjs.map +1 -0
  54. package/dist/retry-DYxm_eBU.d.mts +225 -0
  55. package/dist/retry-DYxm_eBU.d.mts.map +1 -0
  56. package/dist/{retry-BlX4tUnT.mjs → retry-Dv5TsY9O.mjs} +312 -54
  57. package/dist/retry-Dv5TsY9O.mjs.map +1 -0
  58. package/dist/{signatures-JF-7Psce.mjs → signatures-CtJ7jfVN.mjs} +2 -3
  59. package/dist/{signatures-JF-7Psce.mjs.map → signatures-CtJ7jfVN.mjs.map} +1 -1
  60. package/dist/storage.d.mts +333 -344
  61. package/dist/storage.d.mts.map +1 -1
  62. package/dist/storage.mjs +39 -40
  63. package/dist/storage.mjs.map +1 -1
  64. package/dist/testing.d.mts +369 -434
  65. package/dist/testing.d.mts.map +1 -1
  66. package/dist/testing.mjs +18 -33
  67. package/dist/testing.mjs.map +1 -1
  68. package/dist/{to-blob-RPqMBuft.mjs → to-blob-Bqu7bmlE.mjs} +2 -3
  69. package/dist/{to-blob-RPqMBuft.mjs.map → to-blob-Bqu7bmlE.mjs.map} +1 -1
  70. package/dist/types-Z4abDJfK.d.mts +501 -0
  71. package/dist/types-Z4abDJfK.d.mts.map +1 -0
  72. package/dist/universes.d.mts +619 -436
  73. package/dist/universes.d.mts.map +1 -1
  74. package/dist/universes.mjs +432 -79
  75. package/dist/universes.mjs.map +1 -1
  76. package/dist/{validation-B_Zs1So2.mjs → validation-kaTLLAD1.mjs} +3 -4
  77. package/dist/{validation-B_Zs1So2.mjs.map → validation-kaTLLAD1.mjs.map} +1 -1
  78. package/dist/wire-DDG87I-d.d.mts +39 -0
  79. package/dist/wire-DDG87I-d.d.mts.map +1 -0
  80. package/package.json +15 -14
  81. package/dist/capacity-admission-IDO3fcUC.d.mts +0 -369
  82. package/dist/capacity-admission-IDO3fcUC.d.mts.map +0 -1
  83. package/dist/data.generated-B2ceLfSn.d.mts.map +0 -1
  84. package/dist/network-error-DR9FX5hb.mjs.map +0 -1
  85. package/dist/polling-helpers-CoVhsC33.mjs.map +0 -1
  86. package/dist/resource-client-B6NeFXUv.d.mts +0 -164
  87. package/dist/resource-client-B6NeFXUv.d.mts.map +0 -1
  88. package/dist/resource-client-rqTMkBeR.mjs.map +0 -1
  89. package/dist/retry-BlX4tUnT.mjs.map +0 -1
  90. package/dist/retry-war_-9tb.d.mts +0 -373
  91. package/dist/retry-war_-9tb.d.mts.map +0 -1
  92. package/dist/types-CvYh4SPC.d.mts +0 -386
  93. package/dist/types-CvYh4SPC.d.mts.map +0 -1
  94. package/dist/wire-D3K-a-UP.d.mts +0 -37
  95. 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 Result, m as OpenCloudError, s as OpenCloudClientOptions, u as RequestOptions } from "./types-CvYh4SPC.mjs";
2
- 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-IDO3fcUC.mjs";
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
- * Caller-supplied input for the `update` method on `PlacesClient`.
7
- * Every writable field is optional; presence of a key drives the
8
- * `updateMask` query string that the server uses as the field-mask
9
- * for the partial update. Absent keys are left untouched server-side.
10
- *
11
- * @since 0.1.0
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
- * Caller-supplied input for the `publish` and `save` methods on
55
- * `PlacesClient`. Both methods take the same parameter shape; which
56
- * version-type query string is used is decided by the method, not the
57
- * caller.
58
- *
59
- * @since 0.1.0
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
- * Whether `body` is the binary or XML place format. The transport
66
- * sends `application/octet-stream` for `"rbxl"` and `application/xml`
67
- * for `"rbxlx"`, and the builder rejects payloads whose magic bytes
68
- * disagree with the declared format before any HTTP call.
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
- * Auto-incrementing version number assigned by Roblox. Always at least
84
- * `1` for the first publish; increases by one for every subsequent
85
- * publish or save against the same place.
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
- * Fetches the current state of a previously-submitted Luau
104
- * execution task. Uses idempotent retry semantics for both 429 and
105
- * 5xx.
106
- *
107
- * @param parameters - The task ref plus an optional `view` selector.
108
- * @param options - Optional per-request overrides (e.g. A different
109
- * {@link OpenCloudClientOptions.apiKey} for this call only).
110
- * @returns A {@link Result} wrapping the parsed
111
- * {@link LuauExecutionTask} or the {@link OpenCloudError} that
112
- * caused the request to fail.
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
- * Lists one page of structured log messages produced by a
117
- * previously-submitted Luau execution task. Messages from multiple
118
- * server-side chunks are flattened into a single ordered array.
119
- * Uses idempotent retry semantics for both 429 and 5xx.
120
- *
121
- * @param parameters - The task ref and optional pagination controls
122
- * (`pageSize`, `pageToken`).
123
- * @param options - Optional per-request overrides (e.g. A different
124
- * {@link OpenCloudClientOptions.apiKey} for this call only).
125
- * @returns A {@link Result} wrapping the parsed {@link LogPage} or
126
- * the {@link OpenCloudError} that caused the request to fail.
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
- * Polls `get` with `view=BASIC` on a configurable backoff schedule until
131
- * the task reaches a terminal state, the wall-clock budget is exhausted,
132
- * or the supplied `AbortSignal` fires. Returns the terminal task on
133
- * success.
134
- *
135
- * @param ref - Reference to the task to poll, typically returned by `submit`.
136
- * @param options - Polling and per-request overrides.
137
- * @returns A {@link Result} wrapping the terminal {@link LuauExecutionTask},
138
- * or an error if aborted, timed out, or the transport fails.
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
- * Submits a Luau script and polls `get` with `view=BASIC` until the
143
- * task reaches a terminal state, the wall-clock budget is exhausted,
144
- * or the supplied `AbortSignal` fires. Combines `submit` and
145
- * `pollUntilDone` in one call.
146
- *
147
- * @param parameters - The same input accepted by `submit`.
148
- * @param options - Polling and per-request overrides.
149
- * @returns A {@link Result} wrapping the terminal
150
- * {@link LuauExecutionTask}, or an error if submit fails, the task
151
- * is aborted, timed out, or the transport fails.
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
- * Submits a Luau script for execution against a place. Dispatches
156
- * to the head-version URL when `versionId` is omitted, or to the
157
- * specific-version URL when one is supplied. Both URL shapes share
158
- * one rate-limit queue and one required-scope set.
159
- *
160
- * @param parameters - The universe and place identifiers, the
161
- * script to run, an optional `versionId`, and any other writable
162
- * submit fields.
163
- * @param options - Optional per-request overrides (e.g. A different
164
- * {@link OpenCloudClientOptions.apiKey} for this call only).
165
- * @returns A {@link Result} wrapping the parsed
166
- * {@link LuauExecutionTask} or the {@link OpenCloudError} that
167
- * caused the request to fail.
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
- * Creates a new {@link PlacesClient}. Configuration is frozen on
206
- * construction; per-request overrides are accepted on each method.
207
- *
208
- * @param options - Client-level configuration including the API key.
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
- * Publishes a new live version of a place.
213
- *
214
- * No default request timeout applies to this upload; pass `options.timeout`
215
- * to set a per-call deadline.
216
- *
217
- * @param parameters - Universe and place identifiers, the place file
218
- * bytes, and their declared `format`.
219
- * @param options - Optional per-request overrides (e.g. A different
220
- * {@link OpenCloudClientOptions.apiKey} for this call only).
221
- * @returns A {@link Result} wrapping the parsed {@link PlaceVersion}
222
- * or the {@link OpenCloudError} that caused the request to fail.
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
- * Saves a new draft version of a place. Identical to {@link publish}
227
- * except the resulting version is not made live; consumers can list or
228
- * promote it later. Shares a single per-API-key rate-limit queue with
229
- * `publish` because Roblox attributes both calls to the same per-minute
230
- * quota.
231
- *
232
- * No default request timeout applies to this upload; pass `options.timeout`
233
- * to set a per-call deadline.
234
- *
235
- * @param parameters - Universe and place identifiers, the place file
236
- * bytes, and their declared `format`.
237
- * @param options - Optional per-request overrides (e.g. A different
238
- * {@link OpenCloudClientOptions.apiKey} for this call only).
239
- * @returns A {@link Result} wrapping the parsed {@link PlaceVersion}
240
- * or the {@link OpenCloudError} that caused the request to fail.
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
- * Partially updates a place's configuration. The fields supplied on
245
- * `parameters` (excluding the identifiers) are forwarded to the
246
- * server via a Google-style `updateMask`; unmentioned fields are
247
- * left untouched. The universe's root place is the canonical place
248
- * to update when changing a universe's description or display name:
249
- * both are derived server-side from the root place.
250
- *
251
- * @param parameters - The universe and place identifiers and the
252
- * fields to update. At least one writable field must be supplied.
253
- * @param options - Optional per-request overrides (e.g. A different
254
- * {@link OpenCloudClientOptions.apiKey} for this call only).
255
- * @returns A {@link Result} wrapping the parsed {@link Place} or
256
- * the {@link OpenCloudError} that caused the request to fail.
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
- //#endregion
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
@@ -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":";;;;;;;;AAQA;;;;UAAiB,qBAAA;;WAEP,WAAA;;WAEA,WAAA;EAMA;EAAA,SAJA,OAAA;EAaV;EAAA,SAXU,UAAA;;WAEA,UAAA;AAAA;;;;;;;UASO,KAAA;;WAEP,EAAA;;WAEA,SAAA,EAAW,IAAA;EAcA;EAAA,SAZX,WAAA;;WAEA,WAAA;EC3BV;EAAA,SD6BU,IAAA;;WAEA,UAAA;;WAEA,UAAA;;WAEA,uBAAA;;WAEA,SAAA,EAAW,IAAA;AAAA;;;;;;;AArCrB;;;;UCAiB,iBAAA;;WAEP,IAAA,EAAM,UAAA,CAAW,WAAA;;;;ADQjB;AASV;;WCVU,MAAA;ED4BW;EAAA,SC1BX,OAAA;;WAEA,UAAA;AAAA;;;;;;UAQO,YAAA;;;ADgBI;;;WCVX,aAAA;AAAA;;;;;;;;ADjBA;AASV;;;;UEuBiB,mBAAA;;;;;;;;;;;;AFLI;EEkBpB,GAAA,CACC,UAAA,EAAY,aAAA,EACZ,OAAA,GAAU,cAAA,GACR,OAAA,CAAQ,MAAA,CAAO,iBAAA,EAAmB,cAAA;;;AD1DtC;;;;;;;;;;;ECwEC,QAAA,CACC,UAAA,EAAY,kBAAA,EACZ,OAAA,GAAU,cAAA,GACR,OAAA,CAAQ,MAAA,CAAO,OAAA,EAAS,cAAA;EDtD5B;;;;AAMU;;;;ACeV;;;EA6CC,aAAA,CACC,GAAA,EAAK,oBAAA,EACL,OAAA,GAAU,oBAAA,GACR,OAAA,CAAQ,MAAA,CAAO,iBAAA,EAAmB,cAAA;;;;;;;;;;;;;EAarC,YAAA,CACC,UAAA,EAAY,sBAAA,GAAyB,yBAAA,EACrC,OAAA,GAAU,uBAAA,GACR,OAAA,CAAQ,MAAA,CAAO,iBAAA,EAAmB,cAAA;;;;;;;;;;;;;;;;EAgBrC,MAAA,CACC,UAAA,EAAY,sBAAA,GAAyB,yBAAA,EACrC,OAAA,GAAU,0BAAA,GACR,OAAA,CAAQ,MAAA,CAAO,iBAAA,EAAmB,cAAA;AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA4DzB,YAAA;EAAA;WAGI,aAAA,EAAe,mBAAA;;;;;;;EAQ/B,WAAA,CAAY,OAAA,EAAS,sBAAA;;;;;;;;;;;;AAvEgB;AA4DtC;EA6BC,OAAA,CACC,UAAA,EAAY,iBAAA,EACZ,OAAA,GAAU,cAAA,GACR,OAAA,CAAQ,MAAA,CAAO,YAAA,EAAc,cAAA;;;;;;;;;;;;;;;;;;EAqBhC,IAAA,CACC,UAAA,EAAY,iBAAA,EACZ,OAAA,GAAU,cAAA,GACR,OAAA,CAAQ,MAAA,CAAO,YAAA,EAAc,cAAA;;;;;;;;;;;;;;;;EAmBhC,MAAA,CACC,UAAA,EAAY,qBAAA,EACZ,OAAA,GAAU,cAAA,GACR,OAAA,CAAQ,MAAA,CAAO,KAAA,EAAO,cAAA;AAAA"}
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"}