@bedrock-rbx/ocale 0.3.4 → 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.
Files changed (85) hide show
  1. package/README.md +9 -5
  2. package/dist/badge-cost-mismatch-DrlvhlQc.mjs +47 -0
  3. package/dist/badge-cost-mismatch-DrlvhlQc.mjs.map +1 -0
  4. package/dist/badges.d.mts +228 -184
  5. package/dist/badges.d.mts.map +1 -1
  6. package/dist/badges.mjs +176 -18
  7. package/dist/badges.mjs.map +1 -1
  8. package/dist/capacity-admission-hycCFkTo.d.mts +355 -0
  9. package/dist/capacity-admission-hycCFkTo.d.mts.map +1 -0
  10. package/dist/{data.generated-B2ceLfSn.d.mts → data.generated-D_vpa5-g.d.mts} +23 -23
  11. package/dist/data.generated-D_vpa5-g.d.mts.map +1 -0
  12. package/dist/developer-products.d.mts +181 -186
  13. package/dist/developer-products.d.mts.map +1 -1
  14. package/dist/developer-products.mjs +24 -24
  15. package/dist/developer-products.mjs.map +1 -1
  16. package/dist/game-passes.d.mts +206 -203
  17. package/dist/game-passes.d.mts.map +1 -1
  18. package/dist/game-passes.mjs +26 -21
  19. package/dist/game-passes.mjs.map +1 -1
  20. package/dist/index.d.mts +905 -343
  21. package/dist/index.d.mts.map +1 -1
  22. package/dist/index.mjs +325 -10
  23. package/dist/index.mjs.map +1 -1
  24. package/dist/locales.d.mts +30 -2
  25. package/dist/locales.d.mts.map +1 -0
  26. package/dist/locales.mjs +24 -1
  27. package/dist/locales.mjs.map +1 -1
  28. package/dist/luau-execution.d.mts +154 -151
  29. package/dist/luau-execution.d.mts.map +1 -1
  30. package/dist/luau-execution.mjs +11 -8
  31. package/dist/luau-execution.mjs.map +1 -1
  32. package/dist/{network-error-DR9FX5hb.mjs → network-error-iVSng5MT.mjs} +44 -6
  33. package/dist/network-error-iVSng5MT.mjs.map +1 -0
  34. package/dist/places.d.mts +204 -180
  35. package/dist/places.d.mts.map +1 -1
  36. package/dist/places.mjs +66 -20
  37. package/dist/places.mjs.map +1 -1
  38. package/dist/{poll-timeout-3PXLsabj.mjs → poll-timeout-DzztDymd.mjs} +2 -2
  39. package/dist/{poll-timeout-3PXLsabj.mjs.map → poll-timeout-DzztDymd.mjs.map} +1 -1
  40. package/dist/{polling-helpers-CoVhsC33.mjs → polling-helpers-DfF5dspc.mjs} +249 -83
  41. package/dist/polling-helpers-DfF5dspc.mjs.map +1 -0
  42. package/dist/{price-information-B0tkOoAX.mjs → price-information-DEkEQ8Pq.mjs} +2 -2
  43. package/dist/{price-information-B0tkOoAX.mjs.map → price-information-DEkEQ8Pq.mjs.map} +1 -1
  44. package/dist/resource-client-BCKukheG.d.mts +168 -0
  45. package/dist/resource-client-BCKukheG.d.mts.map +1 -0
  46. package/dist/{resource-client-rqTMkBeR.mjs → resource-client-CaIVr-go.mjs} +586 -158
  47. package/dist/resource-client-CaIVr-go.mjs.map +1 -0
  48. package/dist/retry-C2oHesDx.d.mts +229 -0
  49. package/dist/retry-C2oHesDx.d.mts.map +1 -0
  50. package/dist/{retry-BlX4tUnT.mjs → retry-CMRDvAR4.mjs} +278 -18
  51. package/dist/retry-CMRDvAR4.mjs.map +1 -0
  52. package/dist/storage.d.mts +333 -334
  53. package/dist/storage.d.mts.map +1 -1
  54. package/dist/storage.mjs +29 -22
  55. package/dist/storage.mjs.map +1 -1
  56. package/dist/testing.d.mts +347 -360
  57. package/dist/testing.d.mts.map +1 -1
  58. package/dist/testing.mjs +3 -4
  59. package/dist/testing.mjs.map +1 -1
  60. package/dist/types-CdMr_J1M.d.mts +509 -0
  61. package/dist/types-CdMr_J1M.d.mts.map +1 -0
  62. package/dist/universes.d.mts +619 -422
  63. package/dist/universes.d.mts.map +1 -1
  64. package/dist/universes.mjs +421 -48
  65. package/dist/universes.mjs.map +1 -1
  66. package/dist/{validation-B_Zs1So2.mjs → validation-964VNlbp.mjs} +2 -2
  67. package/dist/{validation-B_Zs1So2.mjs.map → validation-964VNlbp.mjs.map} +1 -1
  68. package/dist/wire-DJqupefn.d.mts +41 -0
  69. package/dist/wire-DJqupefn.d.mts.map +1 -0
  70. package/package.json +14 -14
  71. package/dist/capacity-admission-IDO3fcUC.d.mts +0 -369
  72. package/dist/capacity-admission-IDO3fcUC.d.mts.map +0 -1
  73. package/dist/data.generated-B2ceLfSn.d.mts.map +0 -1
  74. package/dist/network-error-DR9FX5hb.mjs.map +0 -1
  75. package/dist/polling-helpers-CoVhsC33.mjs.map +0 -1
  76. package/dist/resource-client-B6NeFXUv.d.mts +0 -164
  77. package/dist/resource-client-B6NeFXUv.d.mts.map +0 -1
  78. package/dist/resource-client-rqTMkBeR.mjs.map +0 -1
  79. package/dist/retry-BlX4tUnT.mjs.map +0 -1
  80. package/dist/retry-war_-9tb.d.mts +0 -373
  81. package/dist/retry-war_-9tb.d.mts.map +0 -1
  82. package/dist/types-CvYh4SPC.d.mts +0 -386
  83. package/dist/types-CvYh4SPC.d.mts.map +0 -1
  84. package/dist/wire-D3K-a-UP.d.mts +0 -37
  85. package/dist/wire-D3K-a-UP.d.mts.map +0 -1
@@ -1,37 +1,36 @@
1
- import { d as Page, f as Result, m as OpenCloudError, s as OpenCloudClientOptions, u as RequestOptions } from "./types-CvYh4SPC.mjs";
2
- import { i as RobloxLocale, r as RobloxLanguageCode } from "./data.generated-B2ceLfSn.mjs";
3
-
1
+ import { c as OpenCloudClientOptions, d as RequestOptions, g as OpenCloudError, m as Result, p as Page } from "./types-CdMr_J1M.mjs";
2
+ import { i as RobloxLocale, r as RobloxLanguageCode } from "./data.generated-D_vpa5-g.mjs";
4
3
  //#region src/domains/game-internationalization/game-pass-icon/types.d.ts
5
4
  /**
6
- * Parameters for uploading or replacing the per-locale icon registered
7
- * against a game pass. A subsequent upload for the same
8
- * `(gamePassId, languageCode)` pair replaces the existing icon for that
9
- * locale.
10
- *
11
- * @since 0.1.0
12
- */
5
+ * Parameters for uploading or replacing the per-locale icon registered
6
+ * against a game pass. A subsequent upload for the same
7
+ * `(gamePassId, languageCode)` pair replaces the existing icon for that
8
+ * locale.
9
+ *
10
+ * @since 0.1.0
11
+ */
13
12
  interface UploadGamePassIconParameters {
14
13
  /** Stringified ID of the game pass whose icon is being uploaded. */
15
14
  readonly gamePassId: string;
16
15
  /** Image bytes to upload. PNG and JPEG are accepted by the server. */
17
16
  readonly image: Blob | Uint8Array;
18
17
  /**
19
- * Roblox wire form the icon is being uploaded for. Either the
20
- * Language form (e.g. `en`, `fil`, `zh-hans`) or the Locale form
21
- * (e.g. `en_us`, `pt_br`, `ar_001`).
22
- */
18
+ * Roblox wire form the icon is being uploaded for. Either the
19
+ * Language form (e.g. `en`, `fil`, `zh-hans`) or the Locale form
20
+ * (e.g. `en_us`, `pt_br`, `ar_001`).
21
+ */
23
22
  readonly languageCode: RobloxLanguageCode | RobloxLocale;
24
23
  }
25
24
  //#endregion
26
25
  //#region src/domains/game-internationalization/game-pass-name-description/types.d.ts
27
26
  /**
28
- * Parameters for updating the per-locale name and/or description registered
29
- * against a game pass. Both `name` and `description` are optional; fields
30
- * omitted from the call are not included in the JSON body so the server
31
- * leaves the existing value for that locale untouched.
32
- *
33
- * @since 0.1.0
34
- */
27
+ * Parameters for updating the per-locale name and/or description registered
28
+ * against a game pass. Both `name` and `description` are optional; fields
29
+ * omitted from the call are not included in the JSON body so the server
30
+ * leaves the existing value for that locale untouched.
31
+ *
32
+ * @since 0.1.0
33
+ */
35
34
  interface UpdateGamePassNameDescriptionParameters {
36
35
  /** Replacement display name for the supplied locale. */
37
36
  readonly name?: string;
@@ -40,26 +39,26 @@ interface UpdateGamePassNameDescriptionParameters {
40
39
  /** Stringified ID of the game pass whose localization is being updated. */
41
40
  readonly gamePassId: string;
42
41
  /**
43
- * Roblox wire form being updated. Either the Language form (e.g.
44
- * `en`, `fil`, `zh-hans`) or the Locale form (e.g. `en_us`, `pt_br`,
45
- * `ar_001`).
46
- */
42
+ * Roblox wire form being updated. Either the Language form (e.g.
43
+ * `en`, `fil`, `zh-hans`) or the Locale form (e.g. `en_us`, `pt_br`,
44
+ * `ar_001`).
45
+ */
47
46
  readonly languageCode: RobloxLanguageCode | RobloxLocale;
48
47
  }
49
48
  //#endregion
50
49
  //#region src/domains/game-passes/game-passes/types.d.ts
51
50
  /**
52
- * Pricing feature flags that can be enabled on a game pass. Values
53
- * mirror the Open Cloud `GamePasses.PricingFeature` enum.
54
- *
55
- * @since 0.1.0
56
- */
51
+ * Pricing feature flags that can be enabled on a game pass. Values
52
+ * mirror the Open Cloud `GamePasses.PricingFeature` enum.
53
+ *
54
+ * @since 0.1.0
55
+ */
57
56
  type GamePassPricingFeature = "Invalid" | "PriceOptimization" | "RegionalPricing" | "UserFixedPrice";
58
57
  /**
59
- * Public shape of a game pass's pricing configuration.
60
- *
61
- * @since 0.1.0
62
- */
58
+ * Public shape of a game pass's pricing configuration.
59
+ *
60
+ * @since 0.1.0
61
+ */
63
62
  interface GamePassPrice {
64
63
  /** Default Robux price; `undefined` when no default price is configured. */
65
64
  readonly defaultPriceInRobux: number | undefined;
@@ -67,12 +66,12 @@ interface GamePassPrice {
67
66
  readonly enabledFeatures: ReadonlyArray<GamePassPricingFeature>;
68
67
  }
69
68
  /**
70
- * A Roblox game pass as exposed to SDK consumers. Fields use DX-friendly
71
- * names and types (stringified IDs, `Date` timestamps) rather than the
72
- * raw wire representation.
73
- *
74
- * @since 0.1.0
75
- */
69
+ * A Roblox game pass as exposed to SDK consumers. Fields use DX-friendly
70
+ * names and types (stringified IDs, `Date` timestamps) rather than the
71
+ * raw wire representation.
72
+ *
73
+ * @since 0.1.0
74
+ */
76
75
  interface GamePass {
77
76
  /** Stringified game pass ID. The API returns an int64; always use this. */
78
77
  readonly id: string;
@@ -94,10 +93,10 @@ interface GamePass {
94
93
  readonly updatedAt: Date;
95
94
  }
96
95
  /**
97
- * Parameters for creating a new game pass under a universe.
98
- *
99
- * @since 0.1.0
100
- */
96
+ * Parameters for creating a new game pass under a universe.
97
+ *
98
+ * @since 0.1.0
99
+ */
101
100
  interface CreateGamePassParameters {
102
101
  /** Display name of the new game pass. */
103
102
  readonly name: string;
@@ -107,18 +106,18 @@ interface CreateGamePassParameters {
107
106
  readonly imageFile?: Blob | Uint8Array;
108
107
  /** Whether the game pass should be purchasable immediately. */
109
108
  readonly isForSale?: boolean;
110
- /** Whether regional pricing should be enabled at creation time. */
111
- readonly isRegionalPricingEnabled?: boolean;
109
+ /** Whether managed pricing should be enabled at creation time. */
110
+ readonly isManagedPricingEnabled?: boolean;
112
111
  /** Optional default price in Robux at creation time. */
113
112
  readonly price?: number;
114
113
  /** Stringified ID of the universe that owns the game pass. */
115
114
  readonly universeId: string;
116
115
  }
117
116
  /**
118
- * Parameters for reading a single game pass by ID.
119
- *
120
- * @since 0.1.0
121
- */
117
+ * Parameters for reading a single game pass by ID.
118
+ *
119
+ * @since 0.1.0
120
+ */
122
121
  interface GetGamePassParameters {
123
122
  /** Stringified ID of the game pass to retrieve. */
124
123
  readonly gamePassId: string;
@@ -126,13 +125,13 @@ interface GetGamePassParameters {
126
125
  readonly universeId: string;
127
126
  }
128
127
  /**
129
- * Parameters for listing the game passes registered against a universe.
130
- * Pagination is cursor-based: omit `pageToken` to fetch the first page,
131
- * then thread the previous response's `nextPageToken` back in until it
132
- * is `undefined`.
133
- *
134
- * @since 0.1.0
135
- */
128
+ * Parameters for listing the game passes registered against a universe.
129
+ * Pagination is cursor-based: omit `pageToken` to fetch the first page,
130
+ * then thread the previous response's `nextPageToken` back in until it
131
+ * is `undefined`.
132
+ *
133
+ * @since 0.1.0
134
+ */
136
135
  interface ListGamePassesParameters {
137
136
  /** Optional page size; the server defaults to 50 when omitted. */
138
137
  readonly pageSize?: number;
@@ -142,13 +141,13 @@ interface ListGamePassesParameters {
142
141
  readonly universeId: string;
143
142
  }
144
143
  /**
145
- * Parameters for partially updating an existing game pass. Every field
146
- * except the identifiers is optional; omitted fields are not included
147
- * in the multipart body so the server leaves their current values
148
- * untouched.
149
- *
150
- * @since 0.1.0
151
- */
144
+ * Parameters for partially updating an existing game pass. Every field
145
+ * except the identifiers is optional; omitted fields are not included
146
+ * in the multipart body so the server leaves their current values
147
+ * untouched.
148
+ *
149
+ * @since 0.1.0
150
+ */
152
151
  interface UpdateGamePassParameters {
153
152
  /** Optional new display name for the game pass. */
154
153
  readonly name?: string;
@@ -160,8 +159,8 @@ interface UpdateGamePassParameters {
160
159
  readonly imageFile?: Blob | Uint8Array;
161
160
  /** Optional new value for whether the game pass is purchasable. */
162
161
  readonly isForSale?: boolean;
163
- /** Optional new value for whether regional pricing is enabled. */
164
- readonly isRegionalPricingEnabled?: boolean;
162
+ /** Optional new value for whether managed pricing is enabled. */
163
+ readonly isManagedPricingEnabled?: boolean;
165
164
  /** Optional new default price in Robux. */
166
165
  readonly price?: number;
167
166
  /** Stringified ID of the universe that owns the game pass. */
@@ -171,161 +170,165 @@ interface UpdateGamePassParameters {
171
170
  //#region src/resources/game-passes/client.d.ts
172
171
  interface GamePassLocalizationHandle {
173
172
  /**
174
- * Updates the per-locale display name and/or description registered against
175
- * a game pass. Either `name`, `description`, or both may be supplied;
176
- * omitted fields are not forwarded so the server leaves the existing value
177
- * for that locale untouched. Mirrors the upstream `200 OK` echo body as
178
- * `undefined` data.
179
- *
180
- * @param parameters - Game pass and language identifiers plus the optional
181
- * replacement values.
182
- * @param options - Optional per-request overrides.
183
- * @returns A success {@link Result} with no payload, or the
184
- * {@link OpenCloudError} that caused the request to fail.
185
- */
173
+ * Updates the per-locale display name and/or description registered against
174
+ * a game pass. Either `name`, `description`, or both may be supplied;
175
+ * omitted fields are not forwarded so the server leaves the existing value
176
+ * for that locale untouched. Mirrors the upstream `200 OK` echo body as
177
+ * `undefined` data.
178
+ *
179
+ * @param parameters - Game pass and language identifiers plus the optional
180
+ * replacement values.
181
+ * @param options - Optional per-request overrides.
182
+ * @returns A success {@link Result} with no payload, or the
183
+ * {@link OpenCloudError} that caused the request to fail.
184
+ */
186
185
  updateNameDescription: (parameters: UpdateGamePassNameDescriptionParameters, options?: RequestOptions) => Promise<Result<undefined, OpenCloudError>>;
187
186
  /**
188
- * Uploads or replaces the per-locale icon for a game pass. A subsequent
189
- * upload for the same `(gamePassId, languageCode)` pair replaces the
190
- * existing icon for that locale. Does not retry on 5xx so a duplicate
191
- * upload cannot be created if the server fails mid-write.
192
- *
193
- * No default request timeout applies to this upload; pass `options.timeout`
194
- * to set a per-call deadline.
195
- *
196
- * @param parameters - Game pass and language identifiers plus the image
197
- * bytes to upload.
198
- * @param options - Optional per-request overrides.
199
- * @returns A success {@link Result} with no payload, or the
200
- * {@link OpenCloudError} that caused the request to fail.
201
- */
187
+ * Uploads or replaces the per-locale icon for a game pass. A subsequent
188
+ * upload for the same `(gamePassId, languageCode)` pair replaces the
189
+ * existing icon for that locale. Does not retry on 5xx so a duplicate
190
+ * upload cannot be created if the server fails mid-write.
191
+ *
192
+ * No default request timeout applies to this upload; pass `options.timeout`
193
+ * to set a per-call deadline.
194
+ *
195
+ * @param parameters - Game pass and language identifiers plus the image
196
+ * bytes to upload.
197
+ * @param options - Optional per-request overrides.
198
+ * @returns A success {@link Result} with no payload, or the
199
+ * {@link OpenCloudError} that caused the request to fail.
200
+ */
202
201
  uploadIcon: (parameters: UploadGamePassIconParameters, options?: RequestOptions) => Promise<Result<undefined, OpenCloudError>>;
203
202
  }
204
203
  /**
205
- * Public client for the Roblox Open Cloud Game Passes API.
206
- *
207
- * Wires request builders, the injected {@link
208
- * OpenCloudClientOptions.httpClient}, and response parsers into a single
209
- * ergonomic surface. Every method returns a {@link Result} so callers handle
210
- * failure explicitly; no thrown `OpenCloudError` ever escapes the client.
211
- *
212
- * ```ts
213
- * import { GamePassesClient } from "@bedrock-rbx/ocale/game-passes";
214
- *
215
- * const client = new GamePassesClient({ apiKey: process.env.ROBLOX_API_KEY! });
216
- *
217
- * const result = await client.get({
218
- * universeId: "1234567890",
219
- * gamePassId: "9876543210",
220
- * });
221
- *
222
- * if (result.success) {
223
- * console.log(`${result.data.name} (${result.data.id})`);
224
- * } else {
225
- * console.error(result.err.message);
226
- * }
227
- * ```
228
- *
229
- * Listing is cursor-paginated; drive the loop on `nextPageToken`:
230
- *
231
- * ```ts
232
- * let pageToken: string | undefined;
233
- * do {
234
- * const page = await client.list({ universeId: "1234567890", pageToken });
235
- * if (!page.success) {
236
- * console.error(page.err.message);
237
- * break;
238
- * }
239
- *
240
- * for (const pass of page.data.items) {
241
- * console.log(`${pass.name} (${pass.id})`);
242
- * }
243
- *
244
- * pageToken = page.data.nextPageToken;
245
- * } while (pageToken !== undefined);
246
- * ```
247
- *
248
- * @since 0.1.0
249
- *
250
- * @example
251
- *
252
- * ```ts
253
- * import { GamePassesClient } from "@bedrock-rbx/ocale/game-passes";
254
- *
255
- * const client = new GamePassesClient({ apiKey: "your-key" });
256
- * expect(client).toBeInstanceOf(GamePassesClient);
257
- * ```
258
- */
259
- declare class GamePassesClient {
204
+ * Public client for the Roblox Open Cloud Game Passes API.
205
+ *
206
+ * Wires request builders, the injected {@link
207
+ * OpenCloudClientOptions.httpClient}, and response parsers into a single
208
+ * ergonomic surface. Every method returns a {@link Result} so callers handle
209
+ * failure explicitly; no thrown `OpenCloudError` ever escapes the client.
210
+ *
211
+ * ```ts
212
+ * import { GamePassesClient } from "@bedrock-rbx/ocale/game-passes";
213
+ *
214
+ * const client = new GamePassesClient({
215
+ * credential: { apiKey: process.env.ROBLOX_API_KEY!, kind: "apiKey" },
216
+ * });
217
+ *
218
+ * const result = await client.get({
219
+ * universeId: "1234567890",
220
+ * gamePassId: "9876543210",
221
+ * });
222
+ *
223
+ * if (result.success) {
224
+ * console.log(`${result.data.name} (${result.data.id})`);
225
+ * } else {
226
+ * console.error(result.err.message);
227
+ * }
228
+ * ```
229
+ *
230
+ * Listing is cursor-paginated; drive the loop on `nextPageToken`:
231
+ *
232
+ * ```ts
233
+ * let pageToken: string | undefined;
234
+ * do {
235
+ * const page = await client.list({ universeId: "1234567890", pageToken });
236
+ * if (!page.success) {
237
+ * console.error(page.err.message);
238
+ * break;
239
+ * }
240
+ *
241
+ * for (const pass of page.data.items) {
242
+ * console.log(`${pass.name} (${pass.id})`);
243
+ * }
244
+ *
245
+ * pageToken = page.data.nextPageToken;
246
+ * } while (pageToken !== undefined);
247
+ * ```
248
+ *
249
+ * @since 0.1.0
250
+ *
251
+ * @example
252
+ *
253
+ * ```ts
254
+ * import { GamePassesClient } from "@bedrock-rbx/ocale/game-passes";
255
+ *
256
+ * const client = new GamePassesClient({
257
+ * credential: { apiKey: "your-key", kind: "apiKey" },
258
+ * });
259
+ * expect(client).toBeInstanceOf(GamePassesClient);
260
+ * ```
261
+ */
262
+ export declare class GamePassesClient {
260
263
  #private;
261
264
  /**
262
- * Operation Group exposing per-locale localization Operations
263
- * (`updateNameDescription`, `uploadIcon`) backed by the
264
- * `legacy-game-internationalization` domain. Source-language values
265
- * remain on {@link GamePassesClient.update}; methods on this group set
266
- * per-locale overlays on top. Shares the parent client's HTTP,
267
- * rate-limit, and retry plumbing.
268
- */
265
+ * Operation Group exposing per-locale localization Operations
266
+ * (`updateNameDescription`, `uploadIcon`) backed by the
267
+ * `legacy-game-internationalization` domain. Source-language values
268
+ * remain on {@link GamePassesClient.update}; methods on this group set
269
+ * per-locale overlays on top. Shares the parent client's HTTP,
270
+ * rate-limit, and retry plumbing.
271
+ */
269
272
  readonly localization: GamePassLocalizationHandle;
270
273
  /**
271
- * Creates a new {@link GamePassesClient}. Configuration is frozen on
272
- * construction; per-request overrides are accepted on each method.
273
- *
274
- * @param options - Client-level configuration including the API key.
275
- */
274
+ * Creates a new {@link GamePassesClient}. Configuration is frozen on
275
+ * construction; per-request overrides are accepted on each method.
276
+ *
277
+ * @param options - Client-level configuration including the API key.
278
+ */
276
279
  constructor(options: OpenCloudClientOptions);
277
280
  /**
278
- * Creates a new game pass under the supplied universe.
279
- *
280
- * No default request timeout applies to this upload; pass `options.timeout`
281
- * to set a per-call deadline.
282
- *
283
- * @param parameters - Creation fields including the universe and pass name.
284
- * @param options - Optional per-request overrides.
285
- * @returns A {@link Result} wrapping the parsed {@link GamePass} or the
286
- * {@link OpenCloudError} that caused the request to fail.
287
- */
281
+ * Creates a new game pass under the supplied universe.
282
+ *
283
+ * No default request timeout applies to this upload; pass `options.timeout`
284
+ * to set a per-call deadline.
285
+ *
286
+ * @param parameters - Creation fields including the universe and pass name.
287
+ * @param options - Optional per-request overrides.
288
+ * @returns A {@link Result} wrapping the parsed {@link GamePass} or the
289
+ * {@link OpenCloudError} that caused the request to fail.
290
+ */
288
291
  create(parameters: CreateGamePassParameters, options?: RequestOptions): Promise<Result<GamePass, OpenCloudError>>;
289
292
  /**
290
- * Reads a single game pass by ID.
291
- *
292
- * @param parameters - Universe and game pass identifiers.
293
- * @param options - Optional per-request overrides (e.g. A different
294
- * {@link OpenCloudClientOptions.apiKey} for this call only).
295
- * @returns A {@link Result} wrapping the parsed {@link GamePass} or the
296
- * {@link OpenCloudError} that caused the request to fail.
297
- */
293
+ * Reads a single game pass by ID.
294
+ *
295
+ * @param parameters - Universe and game pass identifiers.
296
+ * @param options - Optional per-request overrides (e.g. A different
297
+ * {@link OpenCloudClientOptions.credential} for this call only).
298
+ * @returns A {@link Result} wrapping the parsed {@link GamePass} or the
299
+ * {@link OpenCloudError} that caused the request to fail.
300
+ */
298
301
  get(parameters: GetGamePassParameters, options?: RequestOptions): Promise<Result<GamePass, OpenCloudError>>;
299
302
  /**
300
- * Lists one page of game passes for the supplied universe. Pagination is
301
- * cursor-based: omit `pageToken` for the first page, then thread the
302
- * previous response's `nextPageToken` back in until it is `undefined`.
303
- *
304
- * @param parameters - Universe identifier and optional page cursors.
305
- * @param options - Optional per-request overrides.
306
- * @returns A {@link Result} wrapping a {@link Page} of {@link GamePass},
307
- * or the {@link OpenCloudError} that caused the request to fail.
308
- */
303
+ * Lists one page of game passes for the supplied universe. Pagination is
304
+ * cursor-based: omit `pageToken` for the first page, then thread the
305
+ * previous response's `nextPageToken` back in until it is `undefined`.
306
+ *
307
+ * @param parameters - Universe identifier and optional page cursors.
308
+ * @param options - Optional per-request overrides.
309
+ * @returns A {@link Result} wrapping a {@link Page} of {@link GamePass},
310
+ * or the {@link OpenCloudError} that caused the request to fail.
311
+ */
309
312
  list(parameters: ListGamePassesParameters, options?: RequestOptions): Promise<Result<Page<GamePass>, OpenCloudError>>;
310
313
  /**
311
- * Partially updates an existing game pass. Mirrors the upstream
312
- * `204 No Content` response: a successful update yields `undefined`
313
- * data. Callers that need the post-update state (for example to
314
- * observe a server-derived `updatedAt`) chain
315
- * {@link GamePassesClient.get} themselves so the GET only fires when
316
- * actually needed.
317
- *
318
- * No default request timeout applies to this upload; pass `options.timeout`
319
- * to set a per-call deadline.
320
- *
321
- * @param parameters - The universe and game pass identifiers and the
322
- * fields to update. Only fields explicitly provided are forwarded.
323
- * @param options - Optional per-request overrides.
324
- * @returns A success {@link Result} with no payload, or the
325
- * {@link OpenCloudError} that caused the request to fail.
326
- */
314
+ * Partially updates an existing game pass. Mirrors the upstream
315
+ * `204 No Content` response: a successful update yields `undefined`
316
+ * data. Callers that need the post-update state (for example to
317
+ * observe a server-derived `updatedAt`) chain
318
+ * {@link GamePassesClient.get} themselves so the GET only fires when
319
+ * actually needed.
320
+ *
321
+ * No default request timeout applies to this upload; pass `options.timeout`
322
+ * to set a per-call deadline.
323
+ *
324
+ * @param parameters - The universe and game pass identifiers and the
325
+ * fields to update. Only fields explicitly provided are forwarded.
326
+ * @param options - Optional per-request overrides.
327
+ * @returns A success {@link Result} with no payload, or the
328
+ * {@link OpenCloudError} that caused the request to fail.
329
+ */
327
330
  update(parameters: UpdateGamePassParameters, options?: RequestOptions): Promise<Result<undefined, OpenCloudError>>;
328
331
  }
329
332
  //#endregion
330
- export { type CreateGamePassParameters, type GamePass, type GamePassPrice, type GamePassPricingFeature, GamePassesClient, type GetGamePassParameters, type ListGamePassesParameters, type UpdateGamePassNameDescriptionParameters, type UpdateGamePassParameters, type UploadGamePassIconParameters };
333
+ export type { CreateGamePassParameters, GamePass, GamePassPrice, GamePassPricingFeature, GetGamePassParameters, ListGamePassesParameters, UpdateGamePassNameDescriptionParameters, UpdateGamePassParameters, UploadGamePassIconParameters };
331
334
  //# sourceMappingURL=game-passes.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"game-passes.d.mts","names":[],"sources":["../src/domains/game-internationalization/game-pass-icon/types.ts","../src/domains/game-internationalization/game-pass-name-description/types.ts","../src/domains/game-passes/game-passes/types.ts","../src/resources/game-passes/client.ts"],"mappings":";;;;;;;AAUA;;;;;UAAiB,4BAAA;;WAEP,UAAA;EAQmC;EAAA,SANnC,KAAA,EAAO,IAAA,GAAO,UAAA;;;;;;WAMd,YAAA,EAAc,kBAAA,GAAqB,YAAA;AAAA;;;;;;AAV7C;;;;;UCAiB,uCAAA;;WAEP,IAAA;EDQmC;EAAA,SCNnC,WAAA;;WAEA,UAAA;;;;;;WAMA,YAAA,EAAc,kBAAA,GAAqB,YAAA;AAAA;;;;;;;ADZ7C;;KEJY,sBAAA;;;;;;UAWK,aAAA;;WAEP,mBAAA;;WAEA,eAAA,EAAiB,aAAA,CAAc,sBAAA;AAAA;;;;AFDI;;;;UEW5B,QAAA;EDrBA;EAAA,SCuBP,EAAA;EDXmC;EAAA,SCanC,IAAA;;WAEA,SAAA,EAAW,IAAA;;WAEX,WAAA;;WAEA,WAAA;EDnBmC;EAAA,SCqBnC,SAAA;;WAEA,uBAAA;EAvCV;EAAA,SAyCU,KAAA,EAAO,aAAA;;WAEP,SAAA,EAAW,IAAA;AAAA;AAhCrB;;;;;AAAA,UAwCiB,wBAAA;;WAEP,IAAA;EAtC+B;EAAA,SAwC/B,WAAA;EA9BV;EAAA,SAgCU,SAAA,GAAY,IAAA,GAAO,UAAA;;WAEnB,SAAA;;WAEA,wBAAA;EAlBW;EAAA,SAoBX,KAAA;;WAEA,UAAA;AAAA;;;;;;UAQO,qBAAA;;WAEP,UAAA;;WAEA,UAAA;AAAA;AA1BV;;;;;;;;AAAA,UAqCiB,wBAAA;;WAEP,QAAA;;WAEA,SAAA;EA3BA;EAAA,SA6BA,UAAA;AAAA;;;;AAjBA;AAWV;;;;UAiBiB,wBAAA;;WAEP,IAAA;EAbA;EAAA,SAeA,WAAA;EAJV;EAAA,SAMU,UAAA;;WAEA,SAAA,GAAY,IAAA,GAAO,UAAA;;WAEnB,SAAA;;WAEA,wBAAA;;WAEA,KAAA;;WAEA,UAAA;AAAA;;;UCvBA,0BAAA;;;;;;;;;;;;;;EAcT,qBAAA,GACC,UAAA,EAAY,uCAAA,EACZ,OAAA,GAAU,cAAA,KACN,OAAA,CAAQ,MAAA,YAAkB,cAAA;EHrGa;;;;ACV7C;;;;;;;;;;;EE+HC,UAAA,GACC,UAAA,EAAY,4BAAA,EACZ,OAAA,GAAU,cAAA,KACN,OAAA,CAAQ,MAAA,YAAkB,cAAA;AAAA;;;ADtIhC;;;;AAAY;AAWZ;;;;;;;;;AAIyC;AAUzC;;;;;;;;;;;;;;;;;;;;;AAkBqB;AAQrB;;;;;;;;;;;;;;AAcU;AAQV;cCuHa,gBAAA;EAAA;EDvHI;AAIP;AAWV;;;;;;EAfiB,SCkIA,YAAA,EAAc,0BAAA;ED7GrB;AAAA;AAWV;;;;EC0GC,WAAA,CAAY,OAAA,EAAS,sBAAA;;;;;;;;;;;AD1FZ;EC0GT,MAAA,CACC,UAAA,EAAY,wBAAA,EACZ,OAAA,GAAU,cAAA,GACR,OAAA,CAAQ,MAAA,CAAO,QAAA,EAAU,cAAA;;;AAhMK;;;;;;;EA6MjC,GAAA,CACC,UAAA,EAAY,qBAAA,EACZ,OAAA,GAAU,cAAA,GACR,OAAA,CAAQ,MAAA,CAAO,QAAA,EAAU,cAAA;;;;;;;;;;;EAc5B,IAAA,CACC,UAAA,EAAY,wBAAA,EACZ,OAAA,GAAU,cAAA,GACR,OAAA,CAAQ,MAAA,CAAO,IAAA,CAAK,QAAA,GAAW,cAAA;;;;;;;;;;;;;;AAjIH;AA0DhC;;;EA4FC,MAAA,CACC,UAAA,EAAY,wBAAA,EACZ,OAAA,GAAU,cAAA,GACR,OAAA,CAAQ,MAAA,YAAkB,cAAA;AAAA"}
1
+ {"version":3,"file":"game-passes.d.mts","names":[],"sources":["../src/domains/game-internationalization/game-pass-icon/types.ts","../src/domains/game-internationalization/game-pass-name-description/types.ts","../src/domains/game-passes/game-passes/types.ts","../src/resources/game-passes/client.ts"],"mappings":";;;;;;;;;;;UAUiB;;WAEP;;WAEA,OAAO,OAAO;;;;;;WAMd,cAAc,qBAAqB;;;;;;;;;;;;UCV5B;;WAEP;;WAEA;;WAEA;;;;;;WAMA,cAAc,qBAAqB;;;;;;;;;;KChBjC;;;;;;UAWK;;WAEP;;WAEA,iBAAiB,cAAc;;;;;;;;;UAUxB;;WAEP;;WAEA;;WAEA,WAAW;;WAEX;;WAEA;;WAEA;;WAEA;;WAEA,OAAO;;WAEP,WAAW;;;;;;;UAQJ;;WAEP;;WAEA;;WAEA,YAAY,OAAO;;WAEnB;;WAEA;;WAEA;;WAEA;;;;;;;UAQO;;WAEP;;WAEA;;;;;;;;;;UAWO;;WAEP;;WAEA;;WAEA;;;;;;;;;;UAWO;;WAEP;;WAEA;;WAEA;;WAEA,YAAY,OAAO;;WAEnB;;WAEA;;WAEA;;WAEA;;;;UCvBA;;;;;;;;;;;;;;EAcT,wBACC,YAAY,yCACZ,UAAU,mBACN,QAAQ,kBAAkB;;;;;;;;;;;;;;;;EAgB/B,aACC,YAAY,8BACZ,UAAU,mBACN,QAAQ,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBA8DnB;;;;;;;;;;WAWI,cAAc;;;;;;;EAQ9B,YAAY,SAAS;;;;;;;;;;;;EAgBrB,OACC,YAAY,0BACZ,UAAU,iBACR,QAAQ,OAAO,UAAU;;;;;;;;;;EAa5B,IACC,YAAY,uBACZ,UAAU,iBACR,QAAQ,OAAO,UAAU;;;;;;;;;;;EAc5B,KACC,YAAY,0BACZ,UAAU,iBACR,QAAQ,OAAO,KAAK,WAAW;;;;;;;;;;;;;;;;;;EAqBlC,OACC,YAAY,0BACZ,UAAU,iBACR,QAAQ,kBAAkB"}
@@ -1,8 +1,7 @@
1
- import { a as ApiError } from "./network-error-DR9FX5hb.mjs";
2
- import { r as IDEMPOTENT_METHOD_DEFAULTS, t as CREATE_METHOD_DEFAULTS } from "./retry-BlX4tUnT.mjs";
1
+ import { j as isRecord, m as UnexpectedResponseError, r as IDEMPOTENT_METHOD_DEFAULTS, t as CREATE_METHOD_DEFAULTS } from "./retry-CMRDvAR4.mjs";
3
2
  import { t as toBlob } from "./to-blob-RPqMBuft.mjs";
4
- import { c as isDateTimeString, n as okRequest, o as toJsonDetails, r as parseEmptyResponse, s as isRecord, t as ResourceClient } from "./resource-client-rqTMkBeR.mjs";
5
- import { n as isPriceInformationLike, t as copyPriceInformation } from "./price-information-B0tkOoAX.mjs";
3
+ import { c as isDateTimeString, n as okRequest, r as parseEmptyResponse, s as toJsonDetails, t as ResourceClient } from "./resource-client-CaIVr-go.mjs";
4
+ import { n as isPriceInformationLike, t as copyPriceInformation } from "./price-information-DEkEQ8Pq.mjs";
6
5
  //#region src/domains/game-internationalization/game-pass-icon/builders.ts
7
6
  /**
8
7
  * Builds a `POST` request for the localized "upload game-pass icon"
@@ -47,12 +46,13 @@ function buildUpdateRequest$1(parameters) {
47
46
  //#endregion
48
47
  //#region src/domains/game-internationalization/game-pass-name-description/operations.ts
49
48
  /**
50
- * Per-second request ceiling for every game-pass localization Operation.
51
- * The legacy `gameinternationalization` service caps each API key at 100
52
- * requests per minute *shared across the entire service* (see the
53
- * `x-roblox-rate-limits` extension on every operation in the vendored Open
54
- * Cloud spec), so all game-pass localization methods queue against the same
55
- * operation key.
49
+ * Per-second request ceiling for game-pass localization Operations, from
50
+ * each operation's `x-roblox-rate-limits.perApiKeyOwner` in the vendored schema
51
+ * (100 requests per minute). This family's key stays separate from other
52
+ * game-internationalization families: the #587 probe measured independent
53
+ * reported 100/minute counters, including on rejected requests. Successful
54
+ * writes may have additional service limits; see
55
+ * `docs/spikes/game-internationalization-rate-limits/README.md`.
56
56
  */
57
57
  const LOCALIZATION_OPERATION_LIMIT = Object.freeze({
58
58
  maxPerSecond: 100 / 60,
@@ -110,8 +110,8 @@ function buildCreateRequest(parameters) {
110
110
  body.append("name", parameters.name);
111
111
  if (parameters.description !== void 0) body.append("description", parameters.description);
112
112
  if (parameters.isForSale !== void 0) body.append("isForSale", String(parameters.isForSale));
113
+ if (parameters.isManagedPricingEnabled !== void 0) body.append("isManagedPricingEnabled", String(parameters.isManagedPricingEnabled));
113
114
  if (parameters.price !== void 0) body.append("price", String(parameters.price));
114
- if (parameters.isRegionalPricingEnabled !== void 0) body.append("isRegionalPricingEnabled", String(parameters.isRegionalPricingEnabled));
115
115
  if (parameters.imageFile !== void 0) body.append("imageFile", toBlob(parameters.imageFile));
116
116
  return {
117
117
  body,
@@ -139,8 +139,8 @@ function buildUpdateRequest(parameters) {
139
139
  if (parameters.name !== void 0) body.append("name", parameters.name);
140
140
  if (parameters.description !== void 0) body.append("description", parameters.description);
141
141
  if (parameters.isForSale !== void 0) body.append("isForSale", String(parameters.isForSale));
142
+ if (parameters.isManagedPricingEnabled !== void 0) body.append("isManagedPricingEnabled", String(parameters.isManagedPricingEnabled));
142
143
  if (parameters.price !== void 0) body.append("price", String(parameters.price));
143
- if (parameters.isRegionalPricingEnabled !== void 0) body.append("isRegionalPricingEnabled", String(parameters.isRegionalPricingEnabled));
144
144
  if (parameters.imageFile !== void 0) body.append("file", toBlob(parameters.imageFile));
145
145
  return {
146
146
  body,
@@ -217,14 +217,15 @@ const LIST_REQUIRED_SCOPES = Object.freeze(["game-pass:read"]);
217
217
  * without exceptions.
218
218
  *
219
219
  * @param response - The full {@link HttpResponse} from the Open Cloud API.
220
- * The status code is included on the returned `ApiError` when validation
221
- * fails; the headers are available for future parsers that need them.
220
+ * The status code is included on the returned `UnexpectedResponseError` when
221
+ * validation fails; the headers are available for future parsers that need
222
+ * them.
222
223
  * @returns A success result wrapping the converted `GamePass`, or an
223
- * `ApiError` when the body does not match the wire schema.
224
+ * `UnexpectedResponseError` when the body does not match the wire schema.
224
225
  */
225
226
  function parseGamePassResponse({ body, status: statusCode }) {
226
227
  if (!isGamePassConfigV2(body)) return {
227
- err: new ApiError("Malformed game pass response", {
228
+ err: new UnexpectedResponseError("Malformed game pass response", {
228
229
  details: toJsonDetails(body),
229
230
  statusCode
230
231
  }),
@@ -243,11 +244,11 @@ function parseGamePassResponse({ body, status: statusCode }) {
243
244
  *
244
245
  * @param response - The full {@link HttpResponse} from the Open Cloud API.
245
246
  * @returns A success result wrapping the converted page, or an
246
- * `ApiError` when the body does not match the wire schema.
247
+ * `UnexpectedResponseError` when the body does not match the wire schema.
247
248
  */
248
249
  function parseGamePassesListResponse({ body, status: statusCode }) {
249
250
  if (!isListResponseWire(body)) return {
250
- err: new ApiError("Malformed game passes list response", {
251
+ err: new UnexpectedResponseError("Malformed game passes list response", {
251
252
  details: toJsonDetails(body),
252
253
  statusCode
253
254
  }),
@@ -361,7 +362,9 @@ const UPLOAD_ICON_SPEC = makeSpec({
361
362
  * ```ts
362
363
  * import { GamePassesClient } from "@bedrock-rbx/ocale/game-passes";
363
364
  *
364
- * const client = new GamePassesClient({ apiKey: process.env.ROBLOX_API_KEY! });
365
+ * const client = new GamePassesClient({
366
+ * credential: { apiKey: process.env.ROBLOX_API_KEY!, kind: "apiKey" },
367
+ * });
365
368
  *
366
369
  * const result = await client.get({
367
370
  * universeId: "1234567890",
@@ -401,7 +404,9 @@ const UPLOAD_ICON_SPEC = makeSpec({
401
404
  * ```ts
402
405
  * import { GamePassesClient } from "@bedrock-rbx/ocale/game-passes";
403
406
  *
404
- * const client = new GamePassesClient({ apiKey: "your-key" });
407
+ * const client = new GamePassesClient({
408
+ * credential: { apiKey: "your-key", kind: "apiKey" },
409
+ * });
405
410
  * expect(client).toBeInstanceOf(GamePassesClient);
406
411
  * ```
407
412
  */
@@ -449,7 +454,7 @@ var GamePassesClient = class {
449
454
  *
450
455
  * @param parameters - Universe and game pass identifiers.
451
456
  * @param options - Optional per-request overrides (e.g. A different
452
- * {@link OpenCloudClientOptions.apiKey} for this call only).
457
+ * {@link OpenCloudClientOptions.credential} for this call only).
453
458
  * @returns A {@link Result} wrapping the parsed {@link GamePass} or the
454
459
  * {@link OpenCloudError} that caused the request to fail.
455
460
  */