@bedrock-rbx/ocale 0.3.4-beta.1 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (86) 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 +924 -306
  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-sKTsqEc1.mjs → polling-helpers-DfF5dspc.mjs} +249 -83
  41. package/dist/polling-helpers-DfF5dspc.mjs.map +1 -0
  42. package/dist/{price-information-hWXV6DAI.mjs → price-information-DEkEQ8Pq.mjs} +2 -2
  43. package/dist/{price-information-hWXV6DAI.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-CaIVr-go.mjs +1419 -0
  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-vpHMIwaU.mjs → retry-CMRDvAR4.mjs} +390 -20
  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-BvnJjY0S.d.mts +0 -369
  72. package/dist/capacity-admission-BvnJjY0S.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-sKTsqEc1.mjs.map +0 -1
  76. package/dist/resource-client-3cOhqZpX.mjs +0 -899
  77. package/dist/resource-client-3cOhqZpX.mjs.map +0 -1
  78. package/dist/resource-client-BivRq3JZ.d.mts +0 -164
  79. package/dist/resource-client-BivRq3JZ.d.mts.map +0 -1
  80. package/dist/retry-DXEklFrt.d.mts +0 -373
  81. package/dist/retry-DXEklFrt.d.mts.map +0 -1
  82. package/dist/retry-vpHMIwaU.mjs.map +0 -1
  83. package/dist/types-C3Egi37J.d.mts +0 -378
  84. package/dist/types-C3Egi37J.d.mts.map +0 -1
  85. package/dist/wire-D3K-a-UP.d.mts +0 -37
  86. package/dist/wire-D3K-a-UP.d.mts.map +0 -1
@@ -1,19 +1,18 @@
1
- import { f as Result, m as OpenCloudError, s as OpenCloudClientOptions, u as RequestOptions } from "./types-C3Egi37J.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 } 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/developer-products/products/types.d.ts
5
4
  /**
6
- * Pricing feature flags that can be enabled on a developer product. Values
7
- * mirror the Open Cloud `DeveloperProducts.PricingFeature` enum.
8
- *
9
- * @since 0.1.0
10
- */
5
+ * Pricing feature flags that can be enabled on a developer product. Values
6
+ * mirror the Open Cloud `DeveloperProducts.PricingFeature` enum.
7
+ *
8
+ * @since 0.1.0
9
+ */
11
10
  type DeveloperProductPricingFeature = "Invalid" | "PriceOptimization" | "RegionalPricing" | "UserFixedPrice";
12
11
  /**
13
- * Public shape of a developer product's pricing configuration.
14
- *
15
- * @since 0.1.0
16
- */
12
+ * Public shape of a developer product's pricing configuration.
13
+ *
14
+ * @since 0.1.0
15
+ */
17
16
  interface DeveloperProductPrice {
18
17
  /** Default Robux price; `undefined` when no default price is configured. */
19
18
  readonly defaultPriceInRobux: number | undefined;
@@ -21,29 +20,29 @@ interface DeveloperProductPrice {
21
20
  readonly enabledFeatures: ReadonlyArray<DeveloperProductPricingFeature>;
22
21
  }
23
22
  /**
24
- * A Roblox developer product as exposed to SDK consumers. Fields use
25
- * DX-friendly names and types (stringified IDs, `Date` timestamps) rather
26
- * than the raw wire representation.
27
- *
28
- * @since 0.1.0
29
- */
23
+ * A Roblox developer product as exposed to SDK consumers. Fields use
24
+ * DX-friendly names and types (stringified IDs, `Date` timestamps) rather
25
+ * than the raw wire representation.
26
+ *
27
+ * @since 0.1.0
28
+ */
30
29
  interface DeveloperProduct {
31
30
  /**
32
- * Stringified developer product ID. The API returns an int64; always use
33
- * this.
34
- */
31
+ * Stringified developer product ID. The API returns an int64; always use
32
+ * this.
33
+ */
35
34
  readonly id: string;
36
35
  /** Display name of the developer product. */
37
36
  readonly name: string;
38
37
  /**
39
- * ISO timestamp at which the developer product was created, as a `Date`.
40
- */
38
+ * ISO timestamp at which the developer product was created, as a `Date`.
39
+ */
41
40
  readonly createdAt: Date;
42
41
  /** Consumer-facing description shown on the storefront. */
43
42
  readonly description: string;
44
43
  /**
45
- * Icon image asset ID as a string; `undefined` when no icon is uploaded.
46
- */
44
+ * Icon image asset ID as a string; `undefined` when no icon is uploaded.
45
+ */
47
46
  readonly iconImageAssetId: string | undefined;
48
47
  /** Whether the developer product is currently purchasable. */
49
48
  readonly isForSale: boolean;
@@ -53,22 +52,16 @@ interface DeveloperProduct {
53
52
  readonly isManagedPricingEnabled: boolean;
54
53
  /** Pricing configuration; `undefined` when pricing is not yet set. */
55
54
  readonly price: DeveloperProductPrice | undefined;
56
- /**
57
- * Whether the developer product appears on the external store page.
58
- * `undefined` when the response omits the field, as the create endpoint
59
- * does.
60
- */
61
- readonly storePageEnabled: boolean | undefined;
62
55
  /** Stringified ID of the universe that owns the developer product. */
63
56
  readonly universeId: string;
64
57
  /** ISO timestamp of the most recent update, as a `Date`. */
65
58
  readonly updatedAt: Date;
66
59
  }
67
60
  /**
68
- * Parameters for creating a new developer product under a universe.
69
- *
70
- * @since 0.1.0
71
- */
61
+ * Parameters for creating a new developer product under a universe.
62
+ *
63
+ * @since 0.1.0
64
+ */
72
65
  interface CreateDeveloperProductParameters {
73
66
  /** Display name of the new developer product. */
74
67
  readonly name: string;
@@ -78,18 +71,18 @@ interface CreateDeveloperProductParameters {
78
71
  readonly imageFile?: Blob | Uint8Array;
79
72
  /** Whether the developer product should be purchasable immediately. */
80
73
  readonly isForSale?: boolean;
81
- /** Whether regional pricing should be enabled at creation time. */
82
- readonly isRegionalPricingEnabled?: boolean;
74
+ /** Whether managed pricing should be enabled at creation time. */
75
+ readonly isManagedPricingEnabled?: boolean;
83
76
  /** Optional default price in Robux at creation time. */
84
77
  readonly price?: number;
85
78
  /** Stringified ID of the universe that owns the developer product. */
86
79
  readonly universeId: string;
87
80
  }
88
81
  /**
89
- * Parameters for reading a single developer product by ID.
90
- *
91
- * @since 0.1.0
92
- */
82
+ * Parameters for reading a single developer product by ID.
83
+ *
84
+ * @since 0.1.0
85
+ */
93
86
  interface GetDeveloperProductParameters {
94
87
  /** Stringified ID of the developer product to retrieve. */
95
88
  readonly productId: string;
@@ -97,13 +90,13 @@ interface GetDeveloperProductParameters {
97
90
  readonly universeId: string;
98
91
  }
99
92
  /**
100
- * Parameters for partially updating an existing developer product. Every
101
- * field except the identifiers is optional; omitted fields are not included
102
- * in the multipart PATCH body so the server leaves their current values
103
- * untouched.
104
- *
105
- * @since 0.1.0
106
- */
93
+ * Parameters for partially updating an existing developer product. Every
94
+ * field except the identifiers is optional; omitted fields are not included
95
+ * in the multipart PATCH body so the server leaves their current values
96
+ * untouched.
97
+ *
98
+ * @since 0.1.0
99
+ */
107
100
  interface UpdateDeveloperProductParameters {
108
101
  /** Optional new display name. */
109
102
  readonly name?: string;
@@ -113,35 +106,33 @@ interface UpdateDeveloperProductParameters {
113
106
  readonly imageFile?: Blob | Uint8Array;
114
107
  /** Optional flag toggling whether the product is purchasable. */
115
108
  readonly isForSale?: boolean;
116
- /** Optional flag toggling regional pricing. */
117
- readonly isRegionalPricingEnabled?: boolean;
109
+ /** Optional flag toggling managed pricing. */
110
+ readonly isManagedPricingEnabled?: boolean;
118
111
  /** Optional new default price in Robux. */
119
112
  readonly price?: number;
120
113
  /** Stringified ID of the developer product to update. */
121
114
  readonly productId: string;
122
- /** Optional flag toggling visibility on the external store page. */
123
- readonly storePageEnabled?: boolean;
124
115
  /** Stringified ID of the universe that owns the developer product. */
125
116
  readonly universeId: string;
126
117
  }
127
118
  //#endregion
128
119
  //#region src/domains/game-internationalization/developer-product-icon/types.d.ts
129
120
  /**
130
- * Parameters for uploading or replacing the per-locale icon registered
131
- * against a developer product. A subsequent upload for the same
132
- * `(productId, languageCode)` pair replaces the existing icon for that
133
- * locale.
134
- *
135
- * @since 0.1.0
136
- */
121
+ * Parameters for uploading or replacing the per-locale icon registered
122
+ * against a developer product. A subsequent upload for the same
123
+ * `(productId, languageCode)` pair replaces the existing icon for that
124
+ * locale.
125
+ *
126
+ * @since 0.1.0
127
+ */
137
128
  interface UploadDeveloperProductIconParameters {
138
129
  /** Image bytes to upload. PNG and JPEG are accepted by the server. */
139
130
  readonly image: Blob | Uint8Array;
140
131
  /**
141
- * Roblox wire form the icon is being uploaded for. Either the
142
- * Language form (e.g. `en`, `fil`, `zh-hans`) or the Locale form
143
- * (e.g. `en_us`, `pt_br`, `ar_001`).
144
- */
132
+ * Roblox wire form the icon is being uploaded for. Either the
133
+ * Language form (e.g. `en`, `fil`, `zh-hans`) or the Locale form
134
+ * (e.g. `en_us`, `pt_br`, `ar_001`).
135
+ */
145
136
  readonly languageCode: RobloxLanguageCode | RobloxLocale;
146
137
  /** Stringified ID of the developer product whose icon is being uploaded. */
147
138
  readonly productId: string;
@@ -149,159 +140,163 @@ interface UploadDeveloperProductIconParameters {
149
140
  //#endregion
150
141
  //#region src/domains/game-internationalization/developer-product-name-description/types.d.ts
151
142
  /**
152
- * Parameters for updating the per-locale name and/or description registered
153
- * against a developer product. Both `name` and `description` are optional;
154
- * fields omitted from the call are not included in the JSON body so the
155
- * server leaves the existing value for that locale untouched.
156
- *
157
- * @since 0.1.0
158
- */
143
+ * Parameters for updating the per-locale name and/or description registered
144
+ * against a developer product. Both `name` and `description` are optional;
145
+ * fields omitted from the call are not included in the JSON body so the
146
+ * server leaves the existing value for that locale untouched.
147
+ *
148
+ * @since 0.1.0
149
+ */
159
150
  interface UpdateDeveloperProductNameDescriptionParameters {
160
151
  /** Replacement display name for the supplied locale. */
161
152
  readonly name?: string;
162
153
  /** Replacement description for the supplied locale. */
163
154
  readonly description?: string;
164
155
  /**
165
- * Roblox wire form being updated. Either the Language form (e.g.
166
- * `en`, `fil`, `zh-hans`) or the Locale form (e.g. `en_us`, `pt_br`,
167
- * `ar_001`).
168
- */
156
+ * Roblox wire form being updated. Either the Language form (e.g.
157
+ * `en`, `fil`, `zh-hans`) or the Locale form (e.g. `en_us`, `pt_br`,
158
+ * `ar_001`).
159
+ */
169
160
  readonly languageCode: RobloxLanguageCode | RobloxLocale;
170
161
  /**
171
- * Stringified ID of the developer product whose localization is being
172
- * updated.
173
- */
162
+ * Stringified ID of the developer product whose localization is being
163
+ * updated.
164
+ */
174
165
  readonly productId: string;
175
166
  }
176
167
  //#endregion
177
168
  //#region src/resources/developer-products/client.d.ts
178
169
  interface DeveloperProductLocalizationHandle {
179
170
  /**
180
- * Updates the per-locale display name and/or description registered against
181
- * a developer product. Either `name`, `description`, or both may be
182
- * supplied; omitted fields are not forwarded so the server leaves the
183
- * existing value for that locale untouched. Mirrors the upstream `200 OK`
184
- * echo body as `undefined` data.
185
- *
186
- * @param parameters - Product and language identifiers plus the optional
187
- * replacement values.
188
- * @param options - Optional per-request overrides.
189
- * @returns A success {@link Result} with no payload, or the
190
- * {@link OpenCloudError} that caused the request to fail.
191
- */
171
+ * Updates the per-locale display name and/or description registered against
172
+ * a developer product. Either `name`, `description`, or both may be
173
+ * supplied; omitted fields are not forwarded so the server leaves the
174
+ * existing value for that locale untouched. Mirrors the upstream `200 OK`
175
+ * echo body as `undefined` data.
176
+ *
177
+ * @param parameters - Product and language identifiers plus the optional
178
+ * replacement values.
179
+ * @param options - Optional per-request overrides.
180
+ * @returns A success {@link Result} with no payload, or the
181
+ * {@link OpenCloudError} that caused the request to fail.
182
+ */
192
183
  updateNameDescription: (parameters: UpdateDeveloperProductNameDescriptionParameters, options?: RequestOptions) => Promise<Result<undefined, OpenCloudError>>;
193
184
  /**
194
- * Uploads or replaces the per-locale icon for a developer product. A
195
- * subsequent upload for the same `(productId, languageCode)` pair replaces
196
- * the existing icon for that locale. Does not retry on 5xx so a duplicate
197
- * upload cannot be created if the server fails mid-write.
198
- *
199
- * No default request timeout applies to this upload; pass `options.timeout`
200
- * to set a per-call deadline.
201
- *
202
- * @param parameters - Product and language identifiers plus the image
203
- * bytes to upload.
204
- * @param options - Optional per-request overrides.
205
- * @returns A success {@link Result} with no payload, or the
206
- * {@link OpenCloudError} that caused the request to fail.
207
- */
185
+ * Uploads or replaces the per-locale icon for a developer product. A
186
+ * subsequent upload for the same `(productId, languageCode)` pair replaces
187
+ * the existing icon for that locale. Does not retry on 5xx so a duplicate
188
+ * upload cannot be created if the server fails mid-write.
189
+ *
190
+ * No default request timeout applies to this upload; pass `options.timeout`
191
+ * to set a per-call deadline.
192
+ *
193
+ * @param parameters - Product and language identifiers plus the image
194
+ * bytes to upload.
195
+ * @param options - Optional per-request overrides.
196
+ * @returns A success {@link Result} with no payload, or the
197
+ * {@link OpenCloudError} that caused the request to fail.
198
+ */
208
199
  uploadIcon: (parameters: UploadDeveloperProductIconParameters, options?: RequestOptions) => Promise<Result<undefined, OpenCloudError>>;
209
200
  }
210
201
  /**
211
- * Public client for the Roblox Open Cloud Developer Products API.
212
- *
213
- * Wires request builders, the injected {@link
214
- * OpenCloudClientOptions.httpClient}, and response parsers into a single
215
- * ergonomic surface. Every method returns a {@link Result} so callers handle
216
- * failure explicitly; no thrown `OpenCloudError` ever escapes the client.
217
- *
218
- * ```ts
219
- * import { DeveloperProductsClient } from "@bedrock-rbx/ocale/developer-products";
220
- *
221
- * const client = new DeveloperProductsClient({ apiKey: process.env.ROBLOX_API_KEY! });
222
- *
223
- * const result = await client.get({
224
- * universeId: "1234567890",
225
- * productId: "9876543210",
226
- * });
227
- *
228
- * if (result.success) {
229
- * console.log(`${result.data.name} (${result.data.id})`);
230
- * } else {
231
- * console.error(result.err.message);
232
- * }
233
- * ```
234
- *
235
- * @since 0.1.0
236
- *
237
- * @example
238
- *
239
- * ```ts
240
- * import { DeveloperProductsClient } from "@bedrock-rbx/ocale/developer-products";
241
- *
242
- * const client = new DeveloperProductsClient({ apiKey: "your-key" });
243
- * expect(client).toBeInstanceOf(DeveloperProductsClient);
244
- * ```
245
- */
246
- declare class DeveloperProductsClient {
202
+ * Public client for the Roblox Open Cloud Developer Products API.
203
+ *
204
+ * Wires request builders, the injected {@link
205
+ * OpenCloudClientOptions.httpClient}, and response parsers into a single
206
+ * ergonomic surface. Every method returns a {@link Result} so callers handle
207
+ * failure explicitly; no thrown `OpenCloudError` ever escapes the client.
208
+ *
209
+ * ```ts
210
+ * import { DeveloperProductsClient } from "@bedrock-rbx/ocale/developer-products";
211
+ *
212
+ * const client = new DeveloperProductsClient({
213
+ * credential: { apiKey: process.env.ROBLOX_API_KEY!, kind: "apiKey" },
214
+ * });
215
+ *
216
+ * const result = await client.get({
217
+ * universeId: "1234567890",
218
+ * productId: "9876543210",
219
+ * });
220
+ *
221
+ * if (result.success) {
222
+ * console.log(`${result.data.name} (${result.data.id})`);
223
+ * } else {
224
+ * console.error(result.err.message);
225
+ * }
226
+ * ```
227
+ *
228
+ * @since 0.1.0
229
+ *
230
+ * @example
231
+ *
232
+ * ```ts
233
+ * import { DeveloperProductsClient } from "@bedrock-rbx/ocale/developer-products";
234
+ *
235
+ * const client = new DeveloperProductsClient({
236
+ * credential: { apiKey: "your-key", kind: "apiKey" },
237
+ * });
238
+ * expect(client).toBeInstanceOf(DeveloperProductsClient);
239
+ * ```
240
+ */
241
+ export declare class DeveloperProductsClient {
247
242
  #private;
248
243
  /**
249
- * Operation Group exposing per-locale localization Operations
250
- * (`updateNameDescription`, `uploadIcon`) backed by the
251
- * `legacy-game-internationalization` domain. Source-language values
252
- * remain on {@link DeveloperProductsClient.update}; methods on this
253
- * group set per-locale overlays on top. Shares the parent client's
254
- * HTTP, rate-limit, and retry plumbing.
255
- */
244
+ * Operation Group exposing per-locale localization Operations
245
+ * (`updateNameDescription`, `uploadIcon`) backed by the
246
+ * `legacy-game-internationalization` domain. Source-language values
247
+ * remain on {@link DeveloperProductsClient.update}; methods on this
248
+ * group set per-locale overlays on top. Shares the parent client's
249
+ * HTTP, rate-limit, and retry plumbing.
250
+ */
256
251
  readonly localization: DeveloperProductLocalizationHandle;
257
252
  /**
258
- * Creates a new {@link DeveloperProductsClient}. Configuration is frozen
259
- * on construction; per-request overrides are accepted on each method.
260
- *
261
- * @param options - Client-level configuration including the API key.
262
- */
253
+ * Creates a new {@link DeveloperProductsClient}. Configuration is frozen
254
+ * on construction; per-request overrides are accepted on each method.
255
+ *
256
+ * @param options - Client-level configuration including the API key.
257
+ */
263
258
  constructor(options: OpenCloudClientOptions);
264
259
  /**
265
- * Creates a new developer product under the supplied universe.
266
- *
267
- * No default request timeout applies to this upload; pass `options.timeout`
268
- * to set a per-call deadline.
269
- *
270
- * @param parameters - Creation fields including the universe and product name.
271
- * @param options - Optional per-request overrides.
272
- * @returns A {@link Result} wrapping the parsed {@link DeveloperProduct} or
273
- * the {@link OpenCloudError} that caused the request to fail.
274
- */
260
+ * Creates a new developer product under the supplied universe.
261
+ *
262
+ * No default request timeout applies to this upload; pass `options.timeout`
263
+ * to set a per-call deadline.
264
+ *
265
+ * @param parameters - Creation fields including the universe and product name.
266
+ * @param options - Optional per-request overrides.
267
+ * @returns A {@link Result} wrapping the parsed {@link DeveloperProduct} or
268
+ * the {@link OpenCloudError} that caused the request to fail.
269
+ */
275
270
  create(parameters: CreateDeveloperProductParameters, options?: RequestOptions): Promise<Result<DeveloperProduct, OpenCloudError>>;
276
271
  /**
277
- * Reads a single developer product by ID.
278
- *
279
- * @param parameters - Universe and product identifiers.
280
- * @param options - Optional per-request overrides (e.g. A different
281
- * {@link OpenCloudClientOptions.apiKey} for this call only).
282
- * @returns A {@link Result} wrapping the parsed {@link DeveloperProduct} or
283
- * the {@link OpenCloudError} that caused the request to fail.
284
- */
272
+ * Reads a single developer product by ID.
273
+ *
274
+ * @param parameters - Universe and product identifiers.
275
+ * @param options - Optional per-request overrides (e.g. A different
276
+ * {@link OpenCloudClientOptions.credential} for this call only).
277
+ * @returns A {@link Result} wrapping the parsed {@link DeveloperProduct} or
278
+ * the {@link OpenCloudError} that caused the request to fail.
279
+ */
285
280
  get(parameters: GetDeveloperProductParameters, options?: RequestOptions): Promise<Result<DeveloperProduct, OpenCloudError>>;
286
281
  /**
287
- * Partially updates an existing developer product. Mirrors the upstream
288
- * `204 No Content` response: a successful update yields `undefined` data.
289
- * Callers that need the post-update state (for example to observe a
290
- * server-derived `updatedTimestamp`) chain {@link
291
- * DeveloperProductsClient.get} themselves so the GET only fires when
292
- * actually needed.
293
- *
294
- * No default request timeout applies to this upload; pass `options.timeout`
295
- * to set a per-call deadline.
296
- *
297
- * @param parameters - The universe and product identifiers and the
298
- * fields to update. Only fields explicitly provided are forwarded.
299
- * @param options - Optional per-request overrides.
300
- * @returns A success {@link Result} with no payload, or the
301
- * {@link OpenCloudError} that caused the request to fail.
302
- */
282
+ * Partially updates an existing developer product. Mirrors the upstream
283
+ * `204 No Content` response: a successful update yields `undefined` data.
284
+ * Callers that need the post-update state (for example to observe a
285
+ * server-derived `updatedTimestamp`) chain {@link
286
+ * DeveloperProductsClient.get} themselves so the GET only fires when
287
+ * actually needed.
288
+ *
289
+ * No default request timeout applies to this upload; pass `options.timeout`
290
+ * to set a per-call deadline.
291
+ *
292
+ * @param parameters - The universe and product identifiers and the
293
+ * fields to update. Only fields explicitly provided are forwarded.
294
+ * @param options - Optional per-request overrides.
295
+ * @returns A success {@link Result} with no payload, or the
296
+ * {@link OpenCloudError} that caused the request to fail.
297
+ */
303
298
  update(parameters: UpdateDeveloperProductParameters, options?: RequestOptions): Promise<Result<undefined, OpenCloudError>>;
304
299
  }
305
300
  //#endregion
306
- export { type CreateDeveloperProductParameters, type DeveloperProduct, type DeveloperProductPrice, type DeveloperProductPricingFeature, DeveloperProductsClient, type GetDeveloperProductParameters, type UpdateDeveloperProductNameDescriptionParameters, type UpdateDeveloperProductParameters, type UploadDeveloperProductIconParameters };
301
+ export type { CreateDeveloperProductParameters, DeveloperProduct, DeveloperProductPrice, DeveloperProductPricingFeature, GetDeveloperProductParameters, UpdateDeveloperProductNameDescriptionParameters, UpdateDeveloperProductParameters, UploadDeveloperProductIconParameters };
307
302
  //# sourceMappingURL=developer-products.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"developer-products.d.mts","names":[],"sources":["../src/domains/developer-products/products/types.ts","../src/domains/game-internationalization/developer-product-icon/types.ts","../src/domains/game-internationalization/developer-product-name-description/types.ts","../src/resources/developer-products/client.ts"],"mappings":";;;;;;;;AAMA;;KAAY,8BAAA;;AAAA;AAWZ;;;UAAiB,qBAAA;;WAEP,mBAAA;;WAEA,eAAA,EAAiB,aAAA,CAAc,8BAAA;AAAA;AAAA;AAUzC;;;;;;AAVyC,UAUxB,gBAAA;EAmCI;;;;EAAA,SA9BX,EAAA;;WAEA,IAAA;;;;WAIA,SAAA,EAAW,IAAA;;WAEX,WAAA;;;;WAIA,gBAAA;EAkBW;EAAA,SAhBX,SAAA;EAwBO;EAAA,SAtBP,WAAA;EA4BmB;EAAA,SA1BnB,uBAAA;;WAEA,KAAA,EAAO,qBAAA;;;;;;WAMP,gBAAA;EA0BA;EAAA,SAxBA,UAAA;EAgCV;EAAA,SA9BU,SAAA,EAAW,IAAA;AAAA;;AAkCX;AAWV;;;UArCiB,gCAAA;;WAEP,IAAA;;WAEA,WAAA;;WAEA,SAAA,GAAY,IAAA,GAAO,UAAA;;WAEnB,SAAA;;WAEA,wBAAA;;WAEA,KAAA;EA2CA;EAAA,SAzCA,UAAA;AAAA;;AC9EV;;;;UDsFiB,6BAAA;;WAEP,SAAA;EChFmC;EAAA,SDkFnC,UAAA;AAAA;;;;;;;;AChFA;UD2FO,gCAAA;;WAEP,IAAA;EEvGV;EAAA,SFyGU,WAAA;;WAEA,SAAA,GAAY,IAAA,GAAO,UAAA;;WAEnB,SAAA;;WAEA,wBAAA;;WAEA,KAAA;EElGA;EAAA,SFoGA,SAAA;;WAEA,gBAAA;;WAEA,UAAA;AAAA;;;;;;AA3HV;;;;AAAY;UCIK,oCAAA;EDOA;EAAA,SCLP,KAAA,EAAO,IAAA,GAAO,UAAA;EDSG;;;;;EAAA,SCHjB,YAAA,EAAc,kBAAA,GAAqB,YAAA;EDGJ;EAAA,SCD/B,SAAA;AAAA;;;;;;ADdV;;;;AAAY;UEIK,+CAAA;EFOA;EAAA,SELP,IAAA;EFSiB;EAAA,SEPjB,WAAA;;;;;AFO+B;WED/B,YAAA,EAAc,kBAAA,GAAqB,YAAA;EFW5B;;;;EAAA,SENP,SAAA;AAAA;;;UCmEA,kCAAA;EHtFE;AAAA;AAWZ;;;;;;;;;AAIyC;AAUzC;EG2EC,qBAAA,GACC,UAAA,EAAY,+CAAA,EACZ,OAAA,GAAU,cAAA,KACN,OAAA,CAAQ,MAAA,YAAkB,cAAA;;;;;;;;;;;;;;;;EAgB/B,UAAA,GACC,UAAA,EAAY,oCAAA,EACZ,OAAA,GAAU,cAAA,KACN,OAAA,CAAQ,MAAA,YAAkB,cAAA;AAAA;;;;;;AH9DX;AAQrB;;;;;;;;;;;;;;AAcU;AAQV;;;;AAIU;AAWV;;;;;;;;;;cGwDa,uBAAA;EAAA;;;;;AHtCH;;;;WGiDO,YAAA,EAAc,kCAAA;EFxKd;;;;;;EEgLhB,WAAA,CAAY,OAAA,EAAS,sBAAA;EFxKuB;;;;;;;;;AAEnC;;EEsLT,MAAA,CACC,UAAA,EAAY,gCAAA,EACZ,OAAA,GAAU,cAAA,GACR,OAAA,CAAQ,MAAA,CAAO,gBAAA,EAAkB,cAAA;;ADnMrC;;;;;;;;ECgNC,GAAA,CACC,UAAA,EAAY,6BAAA,EACZ,OAAA,GAAU,cAAA,GACR,OAAA,CAAQ,MAAA,CAAO,gBAAA,EAAkB,cAAA;;;ADpM3B;;;;ACWkB;;;;;;;;;;;EA8M3B,MAAA,CACC,UAAA,EAAY,gCAAA,EACZ,OAAA,GAAU,cAAA,GACR,OAAA,CAAQ,MAAA,YAAkB,cAAA;AAAA"}
1
+ {"version":3,"file":"developer-products.d.mts","names":[],"sources":["../src/domains/developer-products/products/types.ts","../src/domains/game-internationalization/developer-product-icon/types.ts","../src/domains/game-internationalization/developer-product-name-description/types.ts","../src/resources/developer-products/client.ts"],"mappings":";;;;;;;;;KAMY;;;;;;UAWK;;WAEP;;WAEA,iBAAiB,cAAc;;;;;;;;;UAUxB;;;;;WAKP;;WAEA;;;;WAIA,WAAW;;WAEX;;;;WAIA;;WAEA;;WAEA;;WAEA;;WAEA,OAAO;;WAEP;;WAEA,WAAW;;;;;;;UAQJ;;WAEP;;WAEA;;WAEA,YAAY,OAAO;;WAEnB;;WAEA;;WAEA;;WAEA;;;;;;;UAQO;;WAEP;;WAEA;;;;;;;;;;UAWO;;WAEP;;WAEA;;WAEA,YAAY,OAAO;;WAEnB;;WAEA;;WAEA;;WAEA;;WAEA;;;;;;;;;;;;UC/GO;;WAEP,OAAO,OAAO;;;;;;WAMd,cAAc,qBAAqB;;WAEnC;;;;;;;;;;;;UCVO;;WAEP;;WAEA;;;;;;WAMA,cAAc,qBAAqB;;;;;WAKnC;;;;UCmEA;;;;;;;;;;;;;;EAcT,wBACC,YAAY,iDACZ,UAAU,mBACN,QAAQ,kBAAkB;;;;;;;;;;;;;;;;EAgB/B,aACC,YAAY,sCACZ,UAAU,mBACN,QAAQ,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBA2CnB;;;;;;;;;;WAWI,cAAc;;;;;;;EAQ9B,YAAY,SAAS;;;;;;;;;;;;EAgBrB,OACC,YAAY,kCACZ,UAAU,iBACR,QAAQ,OAAO,kBAAkB;;;;;;;;;;EAapC,IACC,YAAY,+BACZ,UAAU,iBACR,QAAQ,OAAO,kBAAkB;;;;;;;;;;;;;;;;;;EAqBpC,OACC,YAAY,kCACZ,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-vpHMIwaU.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-3cOhqZpX.mjs";
5
- import { n as isPriceInformationLike, t as copyPriceInformation } from "./price-information-hWXV6DAI.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/developer-products/products/builders.ts
7
6
  /**
8
7
  * Builds a `GET` request for the Open Cloud "read developer product"
@@ -31,8 +30,8 @@ function buildCreateRequest(parameters) {
31
30
  body.append("name", parameters.name);
32
31
  if (parameters.description !== void 0) body.append("description", parameters.description);
33
32
  if (parameters.isForSale !== void 0) body.append("isForSale", String(parameters.isForSale));
33
+ if (parameters.isManagedPricingEnabled !== void 0) body.append("isManagedPricingEnabled", String(parameters.isManagedPricingEnabled));
34
34
  if (parameters.price !== void 0) body.append("price", String(parameters.price));
35
- if (parameters.isRegionalPricingEnabled !== void 0) body.append("isRegionalPricingEnabled", String(parameters.isRegionalPricingEnabled));
36
35
  if (parameters.imageFile !== void 0) body.append("imageFile", toBlob(parameters.imageFile));
37
36
  return {
38
37
  body,
@@ -54,9 +53,8 @@ function buildUpdateRequest$1(parameters) {
54
53
  if (parameters.name !== void 0) body.append("name", parameters.name);
55
54
  if (parameters.description !== void 0) body.append("description", parameters.description);
56
55
  if (parameters.isForSale !== void 0) body.append("isForSale", String(parameters.isForSale));
56
+ if (parameters.isManagedPricingEnabled !== void 0) body.append("isManagedPricingEnabled", String(parameters.isManagedPricingEnabled));
57
57
  if (parameters.price !== void 0) body.append("price", String(parameters.price));
58
- if (parameters.isRegionalPricingEnabled !== void 0) body.append("isRegionalPricingEnabled", String(parameters.isRegionalPricingEnabled));
59
- if (parameters.storePageEnabled !== void 0) body.append("storePageEnabled", String(parameters.storePageEnabled));
60
58
  if (parameters.imageFile !== void 0) body.append("imageFile", toBlob(parameters.imageFile));
61
59
  return {
62
60
  body,
@@ -116,16 +114,16 @@ const WRITE_REQUIRED_SCOPES = Object.freeze(["developer-product:write"]);
116
114
  * malformed payloads without exceptions.
117
115
  *
118
116
  * @param response - The full {@link HttpResponse} from the Open Cloud API.
119
- * The status code is included on the returned `ApiError` when validation
120
- * fails; the headers are available for future parsers that need them.
117
+ * The status code is included on the returned `UnexpectedResponseError` when
118
+ * validation fails; the headers are available for future parsers that need
119
+ * them.
121
120
  * @returns A success result wrapping the converted `DeveloperProduct`, or
122
- * an `ApiError` when the body does not match the wire schema.
121
+ * an `UnexpectedResponseError` when the body does not match the wire schema.
123
122
  */
124
123
  function parseDeveloperProductResponse({ body, status: statusCode }) {
125
124
  if (!isDeveloperProductConfigV2(body)) return malformedDeveloperProduct(statusCode, body);
126
125
  const priceWire = body.priceInformation ?? void 0;
127
126
  const iconAssetId = body.iconImageAssetId ?? void 0;
128
- const storePageEnabled = body.storePageEnabled ?? void 0;
129
127
  return {
130
128
  data: {
131
129
  id: String(body.productId),
@@ -137,7 +135,6 @@ function parseDeveloperProductResponse({ body, status: statusCode }) {
137
135
  isImmutable: body.isImmutable,
138
136
  isManagedPricingEnabled: body.isManagedPricingEnabled,
139
137
  price: priceWire === void 0 ? void 0 : copyPriceInformation(priceWire),
140
- storePageEnabled,
141
138
  universeId: String(body.universeId),
142
139
  updatedAt: new Date(body.updatedTimestamp)
143
140
  },
@@ -146,7 +143,7 @@ function parseDeveloperProductResponse({ body, status: statusCode }) {
146
143
  }
147
144
  function malformedDeveloperProduct(statusCode, body) {
148
145
  return {
149
- err: new ApiError("Malformed developer product response", {
146
+ err: new UnexpectedResponseError("Malformed developer product response", {
150
147
  details: toJsonDetails(body),
151
148
  statusCode
152
149
  }),
@@ -166,8 +163,6 @@ function isDeveloperProductConfigV2(body) {
166
163
  if (iconImageAssetId !== void 0 && typeof iconImageAssetId !== "number") return false;
167
164
  const price = body["priceInformation"] ?? void 0;
168
165
  if (price !== void 0 && !isPriceInformationLike(price, isPricingFeatureWire)) return false;
169
- const storePageEnabled = body["storePageEnabled"] ?? void 0;
170
- if (storePageEnabled !== void 0 && typeof storePageEnabled !== "boolean") return false;
171
166
  return true;
172
167
  }
173
168
  //#endregion
@@ -215,12 +210,13 @@ function buildUpdateRequest(parameters) {
215
210
  //#endregion
216
211
  //#region src/domains/game-internationalization/developer-product-name-description/operations.ts
217
212
  /**
218
- * Per-second request ceiling for every developer-product localization
219
- * Operation. The legacy `gameinternationalization` service caps each API key
220
- * at 100 requests per minute *shared across the entire service* (see the
221
- * `x-roblox-rate-limits` extension on every operation in the vendored Open
222
- * Cloud spec), so all developer-product localization methods queue against
223
- * the same operation key.
213
+ * Per-second request ceiling for developer-product localization Operations,
214
+ * from each operation's `x-roblox-rate-limits.perApiKeyOwner` in the vendored
215
+ * schema (100 requests per minute). This family's key stays separate from
216
+ * other game-internationalization families: the #587 probe measured
217
+ * independent reported 100/minute counters, including on rejected requests.
218
+ * Successful writes may have additional service limits; see
219
+ * `docs/spikes/game-internationalization-rate-limits/README.md`.
224
220
  */
225
221
  const LOCALIZATION_OPERATION_LIMIT = Object.freeze({
226
222
  maxPerSecond: 100 / 60,
@@ -288,7 +284,9 @@ const UPLOAD_ICON_SPEC = makeSpec({
288
284
  * ```ts
289
285
  * import { DeveloperProductsClient } from "@bedrock-rbx/ocale/developer-products";
290
286
  *
291
- * const client = new DeveloperProductsClient({ apiKey: process.env.ROBLOX_API_KEY! });
287
+ * const client = new DeveloperProductsClient({
288
+ * credential: { apiKey: process.env.ROBLOX_API_KEY!, kind: "apiKey" },
289
+ * });
292
290
  *
293
291
  * const result = await client.get({
294
292
  * universeId: "1234567890",
@@ -309,7 +307,9 @@ const UPLOAD_ICON_SPEC = makeSpec({
309
307
  * ```ts
310
308
  * import { DeveloperProductsClient } from "@bedrock-rbx/ocale/developer-products";
311
309
  *
312
- * const client = new DeveloperProductsClient({ apiKey: "your-key" });
310
+ * const client = new DeveloperProductsClient({
311
+ * credential: { apiKey: "your-key", kind: "apiKey" },
312
+ * });
313
313
  * expect(client).toBeInstanceOf(DeveloperProductsClient);
314
314
  * ```
315
315
  */
@@ -357,7 +357,7 @@ var DeveloperProductsClient = class {
357
357
  *
358
358
  * @param parameters - Universe and product identifiers.
359
359
  * @param options - Optional per-request overrides (e.g. A different
360
- * {@link OpenCloudClientOptions.apiKey} for this call only).
360
+ * {@link OpenCloudClientOptions.credential} for this call only).
361
361
  * @returns A {@link Result} wrapping the parsed {@link DeveloperProduct} or
362
362
  * the {@link OpenCloudError} that caused the request to fail.
363
363
  */